Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

LoongArch: Use UAPI types in ptrace UAPI header

The kernel UAPI headers already contain fixed-width integer types, there
is no need to rely on the libc types. There may not be a libc available
or the libc may not provides the <stdint.h>, like for example on nolibc.

This also aligns the header with the rest of the LoongArch UAPI headers.

Fixes: 803b0fc5c3f2 ("LoongArch: Add process management")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

authored by

Thomas Weißschuh and committed by
Huacai Chen
20d7338f 6a23ae0a

+18 -22
+18 -22
arch/loongarch/include/uapi/asm/ptrace.h
··· 10 10 11 11 #include <linux/types.h> 12 12 13 - #ifndef __KERNEL__ 14 - #include <stdint.h> 15 - #endif 16 - 17 13 /* 18 14 * For PTRACE_{POKE,PEEK}USR. 0 - 31 are GPRs, 19 15 * 32 is syscall's original ARG0, 33 is PC, 34 is BADVADDR. ··· 37 41 } __attribute__((aligned(8))); 38 42 39 43 struct user_fp_state { 40 - uint64_t fpr[32]; 41 - uint64_t fcc; 42 - uint32_t fcsr; 44 + __u64 fpr[32]; 45 + __u64 fcc; 46 + __u32 fcsr; 43 47 }; 44 48 45 49 struct user_lsx_state { 46 50 /* 32 registers, 128 bits width per register. */ 47 - uint64_t vregs[32*2]; 51 + __u64 vregs[32*2]; 48 52 }; 49 53 50 54 struct user_lasx_state { 51 55 /* 32 registers, 256 bits width per register. */ 52 - uint64_t vregs[32*4]; 56 + __u64 vregs[32*4]; 53 57 }; 54 58 55 59 struct user_lbt_state { 56 - uint64_t scr[4]; 57 - uint32_t eflags; 58 - uint32_t ftop; 60 + __u64 scr[4]; 61 + __u32 eflags; 62 + __u32 ftop; 59 63 }; 60 64 61 65 struct user_watch_state { 62 - uint64_t dbg_info; 66 + __u64 dbg_info; 63 67 struct { 64 - uint64_t addr; 65 - uint64_t mask; 66 - uint32_t ctrl; 67 - uint32_t pad; 68 + __u64 addr; 69 + __u64 mask; 70 + __u32 ctrl; 71 + __u32 pad; 68 72 } dbg_regs[8]; 69 73 }; 70 74 71 75 struct user_watch_state_v2 { 72 - uint64_t dbg_info; 76 + __u64 dbg_info; 73 77 struct { 74 - uint64_t addr; 75 - uint64_t mask; 76 - uint32_t ctrl; 77 - uint32_t pad; 78 + __u64 addr; 79 + __u64 mask; 80 + __u32 ctrl; 81 + __u32 pad; 78 82 } dbg_regs[14]; 79 83 }; 80 84