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

UAPI: (Scripted) Disintegrate arch/arm64/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>

+225 -132
-2
arch/arm64/include/asm/Kbuild
··· 1 - include include/asm-generic/Kbuild.asm 2 1 3 - header-y += hwcap.h 4 2 5 3 generic-y += bug.h 6 4 generic-y += bugs.h
arch/arm64/include/asm/auxvec.h arch/arm64/include/uapi/asm/auxvec.h
arch/arm64/include/asm/bitsperlong.h arch/arm64/include/uapi/asm/bitsperlong.h
arch/arm64/include/asm/byteorder.h arch/arm64/include/uapi/asm/byteorder.h
arch/arm64/include/asm/fcntl.h arch/arm64/include/uapi/asm/fcntl.h
+1 -8
arch/arm64/include/asm/hwcap.h
··· 16 16 #ifndef __ASM_HWCAP_H 17 17 #define __ASM_HWCAP_H 18 18 19 - /* 20 - * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP 21 - */ 22 - #define HWCAP_FP (1 << 0) 23 - #define HWCAP_ASIMD (1 << 1) 19 + #include <uapi/asm/hwcap.h> 24 20 25 - #ifdef __KERNEL__ 26 21 #define COMPAT_HWCAP_HALF (1 << 1) 27 22 #define COMPAT_HWCAP_THUMB (1 << 2) 28 23 #define COMPAT_HWCAP_FAST_MULT (1 << 4) ··· 45 50 46 51 extern unsigned int elf_hwcap; 47 52 #endif 48 - #endif 49 - 50 53 #endif
arch/arm64/include/asm/param.h arch/arm64/include/uapi/asm/param.h
+1 -74
arch/arm64/include/asm/ptrace.h
··· 19 19 #ifndef __ASM_PTRACE_H 20 20 #define __ASM_PTRACE_H 21 21 22 - #include <linux/types.h> 22 + #include <uapi/asm/ptrace.h> 23 23 24 - #include <asm/hwcap.h> 25 - 26 - #ifdef __KERNEL__ 27 24 /* AArch32-specific ptrace requests */ 28 25 #define COMPAT_PTRACE_GETREGS 12 29 26 #define COMPAT_PTRACE_SETREGS 13 ··· 30 33 #define COMPAT_PTRACE_SETVFPREGS 28 31 34 #define COMPAT_PTRACE_GETHBPREGS 29 32 35 #define COMPAT_PTRACE_SETHBPREGS 30 33 - #endif 34 - 35 - /* 36 - * PSR bits 37 - */ 38 - #define PSR_MODE_EL0t 0x00000000 39 - #define PSR_MODE_EL1t 0x00000004 40 - #define PSR_MODE_EL1h 0x00000005 41 - #define PSR_MODE_EL2t 0x00000008 42 - #define PSR_MODE_EL2h 0x00000009 43 - #define PSR_MODE_EL3t 0x0000000c 44 - #define PSR_MODE_EL3h 0x0000000d 45 - #define PSR_MODE_MASK 0x0000000f 46 - 47 - /* AArch32 CPSR bits */ 48 - #define PSR_MODE32_BIT 0x00000010 49 - #ifdef __KERNEL__ 50 36 #define COMPAT_PSR_MODE_USR 0x00000010 51 37 #define COMPAT_PSR_T_BIT 0x00000020 52 38 #define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ 53 - #endif 54 - 55 - /* AArch64 SPSR bits */ 56 - #define PSR_F_BIT 0x00000040 57 - #define PSR_I_BIT 0x00000080 58 - #define PSR_A_BIT 0x00000100 59 - #define PSR_D_BIT 0x00000200 60 - #define PSR_Q_BIT 0x08000000 61 - #define PSR_V_BIT 0x10000000 62 - #define PSR_C_BIT 0x20000000 63 - #define PSR_Z_BIT 0x40000000 64 - #define PSR_N_BIT 0x80000000 65 - 66 - /* 67 - * Groups of PSR bits 68 - */ 69 - #define PSR_f 0xff000000 /* Flags */ 70 - #define PSR_s 0x00ff0000 /* Status */ 71 - #define PSR_x 0x0000ff00 /* Extension */ 72 - #define PSR_c 0x000000ff /* Control */ 73 - 74 - #ifdef __KERNEL__ 75 39 /* 76 40 * These are 'magic' values for PTRACE_PEEKUSR that return info about where a 77 41 * process is located in memory. ··· 40 82 #define COMPAT_PT_TEXT_ADDR 0x10000 41 83 #define COMPAT_PT_DATA_ADDR 0x10004 42 84 #define COMPAT_PT_TEXT_END_ADDR 0x10008 43 - #endif 44 - 45 85 #ifndef __ASSEMBLY__ 46 - 47 - /* 48 - * User structures for general purpose, floating point and debug registers. 49 - */ 50 - struct user_pt_regs { 51 - __u64 regs[31]; 52 - __u64 sp; 53 - __u64 pc; 54 - __u64 pstate; 55 - }; 56 - 57 - struct user_fpsimd_state { 58 - __uint128_t vregs[32]; 59 - __u32 fpsr; 60 - __u32 fpcr; 61 - }; 62 - 63 - struct user_hwdebug_state { 64 - __u32 dbg_info; 65 - struct { 66 - __u64 addr; 67 - __u32 ctrl; 68 - } dbg_regs[16]; 69 - }; 70 - 71 - #ifdef __KERNEL__ 72 86 73 87 /* sizeof(struct user) for AArch32 */ 74 88 #define COMPAT_USER_SZ 296 ··· 136 206 137 207 extern int aarch32_break_trap(struct pt_regs *regs); 138 208 139 - #endif /* __KERNEL__ */ 140 - 141 209 #endif /* __ASSEMBLY__ */ 142 - 143 210 #endif
arch/arm64/include/asm/setup.h arch/arm64/include/uapi/asm/setup.h
+1 -39
arch/arm64/include/asm/sigcontext.h
··· 16 16 #ifndef __ASM_SIGCONTEXT_H 17 17 #define __ASM_SIGCONTEXT_H 18 18 19 - #include <linux/types.h> 19 + #include <uapi/asm/sigcontext.h> 20 20 21 - /* 22 - * Signal context structure - contains all info to do with the state 23 - * before the signal handler was invoked. 24 - */ 25 - struct sigcontext { 26 - __u64 fault_address; 27 - /* AArch64 registers */ 28 - __u64 regs[31]; 29 - __u64 sp; 30 - __u64 pc; 31 - __u64 pstate; 32 - /* 4K reserved for FP/SIMD state and future expansion */ 33 - __u8 __reserved[4096] __attribute__((__aligned__(16))); 34 - }; 35 - 36 - /* 37 - * Header to be used at the beginning of structures extending the user 38 - * context. Such structures must be placed after the rt_sigframe on the stack 39 - * and be 16-byte aligned. The last structure must be a dummy one with the 40 - * magic and size set to 0. 41 - */ 42 - struct _aarch64_ctx { 43 - __u32 magic; 44 - __u32 size; 45 - }; 46 - 47 - #define FPSIMD_MAGIC 0x46508001 48 - 49 - struct fpsimd_context { 50 - struct _aarch64_ctx head; 51 - __u32 fpsr; 52 - __u32 fpcr; 53 - __uint128_t vregs[32]; 54 - }; 55 - 56 - #ifdef __KERNEL__ 57 21 /* 58 22 * Auxiliary context saved in the sigcontext.__reserved array. Not exported to 59 23 * user space as it will change with the addition of new context. User space ··· 28 64 /* additional context to be added before "end" */ 29 65 struct _aarch64_ctx end; 30 66 }; 31 - #endif 32 - 33 67 #endif
arch/arm64/include/asm/siginfo.h arch/arm64/include/uapi/asm/siginfo.h
arch/arm64/include/asm/signal.h arch/arm64/include/uapi/asm/signal.h
+1 -4
arch/arm64/include/asm/stat.h
··· 16 16 #ifndef __ASM_STAT_H 17 17 #define __ASM_STAT_H 18 18 19 - #include <asm-generic/stat.h> 19 + #include <uapi/asm/stat.h> 20 20 21 - #ifdef __KERNEL__ 22 21 #ifdef CONFIG_COMPAT 23 22 24 23 #include <asm/compat.h> ··· 58 59 }; 59 60 60 61 #endif 61 - #endif 62 - 63 62 #endif
arch/arm64/include/asm/statfs.h arch/arm64/include/uapi/asm/statfs.h
+1 -5
arch/arm64/include/asm/unistd.h
··· 13 13 * You should have received a copy of the GNU General Public License 14 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 15 */ 16 - 17 - #include <asm-generic/unistd.h> 18 - 19 - #ifdef __KERNEL__ 20 16 #ifdef CONFIG_COMPAT 21 17 #define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION 22 18 #define __ARCH_WANT_COMPAT_STAT64 ··· 26 30 #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 27 31 #define __ARCH_WANT_COMPAT_SYS_SENDFILE 28 32 #endif 29 - #endif 33 + #include <uapi/asm/unistd.h>
+14
arch/arm64/include/uapi/asm/Kbuild
··· 1 1 # UAPI Header export list 2 2 include include/uapi/asm-generic/Kbuild.asm 3 3 4 + header-y += auxvec.h 5 + header-y += bitsperlong.h 6 + header-y += byteorder.h 7 + header-y += fcntl.h 8 + header-y += hwcap.h 9 + header-y += param.h 10 + header-y += ptrace.h 11 + header-y += setup.h 12 + header-y += sigcontext.h 13 + header-y += siginfo.h 14 + header-y += signal.h 15 + header-y += stat.h 16 + header-y += statfs.h 17 + header-y += unistd.h
+26
arch/arm64/include/uapi/asm/hwcap.h
··· 1 + /* 2 + * Copyright (C) 2012 ARM Ltd. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + * This program is distributed in the hope that it will be useful, 9 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + * 13 + * You should have received a copy of the GNU General Public License 14 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 + */ 16 + #ifndef _UAPI__ASM_HWCAP_H 17 + #define _UAPI__ASM_HWCAP_H 18 + 19 + /* 20 + * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP 21 + */ 22 + #define HWCAP_FP (1 << 0) 23 + #define HWCAP_ASIMD (1 << 1) 24 + 25 + 26 + #endif /* _UAPI__ASM_HWCAP_H */
+91
arch/arm64/include/uapi/asm/ptrace.h
··· 1 + /* 2 + * Based on arch/arm/include/asm/ptrace.h 3 + * 4 + * Copyright (C) 1996-2003 Russell King 5 + * Copyright (C) 2012 ARM Ltd. 6 + * 7 + * This program is free software; you can redistribute it and/or modify 8 + * it under the terms of the GNU General Public License version 2 as 9 + * published by the Free Software Foundation. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + #ifndef _UAPI__ASM_PTRACE_H 20 + #define _UAPI__ASM_PTRACE_H 21 + 22 + #include <linux/types.h> 23 + 24 + #include <asm/hwcap.h> 25 + 26 + 27 + /* 28 + * PSR bits 29 + */ 30 + #define PSR_MODE_EL0t 0x00000000 31 + #define PSR_MODE_EL1t 0x00000004 32 + #define PSR_MODE_EL1h 0x00000005 33 + #define PSR_MODE_EL2t 0x00000008 34 + #define PSR_MODE_EL2h 0x00000009 35 + #define PSR_MODE_EL3t 0x0000000c 36 + #define PSR_MODE_EL3h 0x0000000d 37 + #define PSR_MODE_MASK 0x0000000f 38 + 39 + /* AArch32 CPSR bits */ 40 + #define PSR_MODE32_BIT 0x00000010 41 + 42 + /* AArch64 SPSR bits */ 43 + #define PSR_F_BIT 0x00000040 44 + #define PSR_I_BIT 0x00000080 45 + #define PSR_A_BIT 0x00000100 46 + #define PSR_D_BIT 0x00000200 47 + #define PSR_Q_BIT 0x08000000 48 + #define PSR_V_BIT 0x10000000 49 + #define PSR_C_BIT 0x20000000 50 + #define PSR_Z_BIT 0x40000000 51 + #define PSR_N_BIT 0x80000000 52 + 53 + /* 54 + * Groups of PSR bits 55 + */ 56 + #define PSR_f 0xff000000 /* Flags */ 57 + #define PSR_s 0x00ff0000 /* Status */ 58 + #define PSR_x 0x0000ff00 /* Extension */ 59 + #define PSR_c 0x000000ff /* Control */ 60 + 61 + 62 + #ifndef __ASSEMBLY__ 63 + 64 + /* 65 + * User structures for general purpose, floating point and debug registers. 66 + */ 67 + struct user_pt_regs { 68 + __u64 regs[31]; 69 + __u64 sp; 70 + __u64 pc; 71 + __u64 pstate; 72 + }; 73 + 74 + struct user_fpsimd_state { 75 + __uint128_t vregs[32]; 76 + __u32 fpsr; 77 + __u32 fpcr; 78 + }; 79 + 80 + struct user_hwdebug_state { 81 + __u32 dbg_info; 82 + struct { 83 + __u64 addr; 84 + __u32 ctrl; 85 + } dbg_regs[16]; 86 + }; 87 + 88 + 89 + #endif /* __ASSEMBLY__ */ 90 + 91 + #endif /* _UAPI__ASM_PTRACE_H */
+57
arch/arm64/include/uapi/asm/sigcontext.h
··· 1 + /* 2 + * Copyright (C) 2012 ARM Ltd. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + * This program is distributed in the hope that it will be useful, 9 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + * 13 + * You should have received a copy of the GNU General Public License 14 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 + */ 16 + #ifndef _UAPI__ASM_SIGCONTEXT_H 17 + #define _UAPI__ASM_SIGCONTEXT_H 18 + 19 + #include <linux/types.h> 20 + 21 + /* 22 + * Signal context structure - contains all info to do with the state 23 + * before the signal handler was invoked. 24 + */ 25 + struct sigcontext { 26 + __u64 fault_address; 27 + /* AArch64 registers */ 28 + __u64 regs[31]; 29 + __u64 sp; 30 + __u64 pc; 31 + __u64 pstate; 32 + /* 4K reserved for FP/SIMD state and future expansion */ 33 + __u8 __reserved[4096] __attribute__((__aligned__(16))); 34 + }; 35 + 36 + /* 37 + * Header to be used at the beginning of structures extending the user 38 + * context. Such structures must be placed after the rt_sigframe on the stack 39 + * and be 16-byte aligned. The last structure must be a dummy one with the 40 + * magic and size set to 0. 41 + */ 42 + struct _aarch64_ctx { 43 + __u32 magic; 44 + __u32 size; 45 + }; 46 + 47 + #define FPSIMD_MAGIC 0x46508001 48 + 49 + struct fpsimd_context { 50 + struct _aarch64_ctx head; 51 + __u32 fpsr; 52 + __u32 fpcr; 53 + __uint128_t vregs[32]; 54 + }; 55 + 56 + 57 + #endif /* _UAPI__ASM_SIGCONTEXT_H */
+16
arch/arm64/include/uapi/asm/stat.h
··· 1 + /* 2 + * Copyright (C) 2012 ARM Ltd. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + * This program is distributed in the hope that it will be useful, 9 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + * 13 + * You should have received a copy of the GNU General Public License 14 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 + */ 16 + #include <asm-generic/stat.h>
+16
arch/arm64/include/uapi/asm/unistd.h
··· 1 + /* 2 + * Copyright (C) 2012 ARM Ltd. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + * This program is distributed in the hope that it will be useful, 9 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + * 13 + * You should have received a copy of the GNU General Public License 14 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 + */ 16 + #include <asm-generic/unistd.h>