diff options
21 files changed, 225 insertions, 132 deletions
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 35924a542d43..fe77e51a7847 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -1,6 +1,4 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += hwcap.h | ||
4 | 2 | ||
5 | generic-y += bug.h | 3 | generic-y += bug.h |
6 | generic-y += bugs.h | 4 | generic-y += bugs.h |
diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index 2cb430082edf..6d4482fa35bc 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h | |||
@@ -16,13 +16,8 @@ | |||
16 | #ifndef __ASM_HWCAP_H | 16 | #ifndef __ASM_HWCAP_H |
17 | #define __ASM_HWCAP_H | 17 | #define __ASM_HWCAP_H |
18 | 18 | ||
19 | /* | 19 | #include <uapi/asm/hwcap.h> |
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 | 20 | ||
25 | #ifdef __KERNEL__ | ||
26 | #define COMPAT_HWCAP_HALF (1 << 1) | 21 | #define COMPAT_HWCAP_HALF (1 << 1) |
27 | #define COMPAT_HWCAP_THUMB (1 << 2) | 22 | #define COMPAT_HWCAP_THUMB (1 << 2) |
28 | #define COMPAT_HWCAP_FAST_MULT (1 << 4) | 23 | #define COMPAT_HWCAP_FAST_MULT (1 << 4) |
@@ -51,5 +46,3 @@ | |||
51 | extern unsigned int elf_hwcap; | 46 | extern unsigned int elf_hwcap; |
52 | #endif | 47 | #endif |
53 | #endif | 48 | #endif |
54 | |||
55 | #endif | ||
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index fc2772a27c78..b04d3404f0d1 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h | |||
@@ -19,11 +19,8 @@ | |||
19 | #ifndef __ASM_PTRACE_H | 19 | #ifndef __ASM_PTRACE_H |
20 | #define __ASM_PTRACE_H | 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 | /* AArch32-specific ptrace requests */ | 24 | /* AArch32-specific ptrace requests */ |
28 | #define COMPAT_PTRACE_GETREGS 12 | 25 | #define COMPAT_PTRACE_GETREGS 12 |
29 | #define COMPAT_PTRACE_SETREGS 13 | 26 | #define COMPAT_PTRACE_SETREGS 13 |
@@ -33,48 +30,9 @@ | |||
33 | #define COMPAT_PTRACE_SETVFPREGS 28 | 30 | #define COMPAT_PTRACE_SETVFPREGS 28 |
34 | #define COMPAT_PTRACE_GETHBPREGS 29 | 31 | #define COMPAT_PTRACE_GETHBPREGS 29 |
35 | #define COMPAT_PTRACE_SETHBPREGS 30 | 32 | #define COMPAT_PTRACE_SETHBPREGS 30 |
36 | #endif | ||
37 | |||
38 | /* | ||
39 | * PSR bits | ||
40 | */ | ||
41 | #define PSR_MODE_EL0t 0x00000000 | ||
42 | #define PSR_MODE_EL1t 0x00000004 | ||
43 | #define PSR_MODE_EL1h 0x00000005 | ||
44 | #define PSR_MODE_EL2t 0x00000008 | ||
45 | #define PSR_MODE_EL2h 0x00000009 | ||
46 | #define PSR_MODE_EL3t 0x0000000c | ||
47 | #define PSR_MODE_EL3h 0x0000000d | ||
48 | #define PSR_MODE_MASK 0x0000000f | ||
49 | |||
50 | /* AArch32 CPSR bits */ | ||
51 | #define PSR_MODE32_BIT 0x00000010 | ||
52 | #ifdef __KERNEL__ | ||
53 | #define COMPAT_PSR_MODE_USR 0x00000010 | 33 | #define COMPAT_PSR_MODE_USR 0x00000010 |
54 | #define COMPAT_PSR_T_BIT 0x00000020 | 34 | #define COMPAT_PSR_T_BIT 0x00000020 |
55 | #define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | 35 | #define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ |
56 | #endif | ||
57 | |||
58 | /* AArch64 SPSR bits */ | ||
59 | #define PSR_F_BIT 0x00000040 | ||
60 | #define PSR_I_BIT 0x00000080 | ||
61 | #define PSR_A_BIT 0x00000100 | ||
62 | #define PSR_D_BIT 0x00000200 | ||
63 | #define PSR_Q_BIT 0x08000000 | ||
64 | #define PSR_V_BIT 0x10000000 | ||
65 | #define PSR_C_BIT 0x20000000 | ||
66 | #define PSR_Z_BIT 0x40000000 | ||
67 | #define PSR_N_BIT 0x80000000 | ||
68 | |||
69 | /* | ||
70 | * Groups of PSR bits | ||
71 | */ | ||
72 | #define PSR_f 0xff000000 /* Flags */ | ||
73 | #define PSR_s 0x00ff0000 /* Status */ | ||
74 | #define PSR_x 0x0000ff00 /* Extension */ | ||
75 | #define PSR_c 0x000000ff /* Control */ | ||
76 | |||
77 | #ifdef __KERNEL__ | ||
78 | /* | 36 | /* |
79 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a | 37 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a |
80 | * process is located in memory. | 38 | * process is located in memory. |
@@ -82,36 +40,8 @@ | |||
82 | #define COMPAT_PT_TEXT_ADDR 0x10000 | 40 | #define COMPAT_PT_TEXT_ADDR 0x10000 |
83 | #define COMPAT_PT_DATA_ADDR 0x10004 | 41 | #define COMPAT_PT_DATA_ADDR 0x10004 |
84 | #define COMPAT_PT_TEXT_END_ADDR 0x10008 | 42 | #define COMPAT_PT_TEXT_END_ADDR 0x10008 |
85 | #endif | ||
86 | |||
87 | #ifndef __ASSEMBLY__ | 43 | #ifndef __ASSEMBLY__ |
88 | 44 | ||
89 | /* | ||
90 | * User structures for general purpose, floating point and debug registers. | ||
91 | */ | ||
92 | struct user_pt_regs { | ||
93 | __u64 regs[31]; | ||
94 | __u64 sp; | ||
95 | __u64 pc; | ||
96 | __u64 pstate; | ||
97 | }; | ||
98 | |||
99 | struct user_fpsimd_state { | ||
100 | __uint128_t vregs[32]; | ||
101 | __u32 fpsr; | ||
102 | __u32 fpcr; | ||
103 | }; | ||
104 | |||
105 | struct user_hwdebug_state { | ||
106 | __u32 dbg_info; | ||
107 | struct { | ||
108 | __u64 addr; | ||
109 | __u32 ctrl; | ||
110 | } dbg_regs[16]; | ||
111 | }; | ||
112 | |||
113 | #ifdef __KERNEL__ | ||
114 | |||
115 | /* sizeof(struct user) for AArch32 */ | 45 | /* sizeof(struct user) for AArch32 */ |
116 | #define COMPAT_USER_SZ 296 | 46 | #define COMPAT_USER_SZ 296 |
117 | /* AArch32 uses x13 as the stack pointer... */ | 47 | /* AArch32 uses x13 as the stack pointer... */ |
@@ -206,8 +136,5 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
206 | 136 | ||
207 | extern int aarch32_break_trap(struct pt_regs *regs); | 137 | extern int aarch32_break_trap(struct pt_regs *regs); |
208 | 138 | ||
209 | #endif /* __KERNEL__ */ | ||
210 | |||
211 | #endif /* __ASSEMBLY__ */ | 139 | #endif /* __ASSEMBLY__ */ |
212 | |||
213 | #endif | 140 | #endif |
diff --git a/arch/arm64/include/asm/sigcontext.h b/arch/arm64/include/asm/sigcontext.h index 573cec778819..dca1094acc74 100644 --- a/arch/arm64/include/asm/sigcontext.h +++ b/arch/arm64/include/asm/sigcontext.h | |||
@@ -16,45 +16,9 @@ | |||
16 | #ifndef __ASM_SIGCONTEXT_H | 16 | #ifndef __ASM_SIGCONTEXT_H |
17 | #define __ASM_SIGCONTEXT_H | 17 | #define __ASM_SIGCONTEXT_H |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <uapi/asm/sigcontext.h> |
20 | 20 | ||
21 | /* | 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 | /* | ||
58 | * Auxiliary context saved in the sigcontext.__reserved array. Not exported to | 22 | * Auxiliary context saved in the sigcontext.__reserved array. Not exported to |
59 | * user space as it will change with the addition of new context. User space | 23 | * user space as it will change with the addition of new context. User space |
60 | * should check the magic/size information. | 24 | * should check the magic/size information. |
@@ -65,5 +29,3 @@ struct aux_context { | |||
65 | struct _aarch64_ctx end; | 29 | struct _aarch64_ctx end; |
66 | }; | 30 | }; |
67 | #endif | 31 | #endif |
68 | |||
69 | #endif | ||
diff --git a/arch/arm64/include/asm/stat.h b/arch/arm64/include/asm/stat.h index a9f580c28f7b..15e35598ac40 100644 --- a/arch/arm64/include/asm/stat.h +++ b/arch/arm64/include/asm/stat.h | |||
@@ -16,9 +16,8 @@ | |||
16 | #ifndef __ASM_STAT_H | 16 | #ifndef __ASM_STAT_H |
17 | #define __ASM_STAT_H | 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 | #ifdef CONFIG_COMPAT | 21 | #ifdef CONFIG_COMPAT |
23 | 22 | ||
24 | #include <asm/compat.h> | 23 | #include <asm/compat.h> |
@@ -60,5 +59,3 @@ struct stat64 { | |||
60 | 59 | ||
61 | #endif | 60 | #endif |
62 | #endif | 61 | #endif |
63 | |||
64 | #endif | ||
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 9a981b2663c4..63f853f8b718 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h | |||
@@ -13,10 +13,6 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 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/>. | 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 | #ifdef CONFIG_COMPAT | 16 | #ifdef CONFIG_COMPAT |
21 | #define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION | 17 | #define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION |
22 | #define __ARCH_WANT_COMPAT_STAT64 | 18 | #define __ARCH_WANT_COMPAT_STAT64 |
@@ -30,4 +26,4 @@ | |||
30 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 26 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
31 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE | 27 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE |
32 | #endif | 28 | #endif |
33 | #endif | 29 | #include <uapi/asm/unistd.h> |
diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild index baebb3da1d44..ca5b65f75c7b 100644 --- a/arch/arm64/include/uapi/asm/Kbuild +++ b/arch/arm64/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,17 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 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 | ||
diff --git a/arch/arm64/include/asm/auxvec.h b/arch/arm64/include/uapi/asm/auxvec.h index 22d6d8885854..22d6d8885854 100644 --- a/arch/arm64/include/asm/auxvec.h +++ b/arch/arm64/include/uapi/asm/auxvec.h | |||
diff --git a/arch/arm64/include/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h index fce9c2924fa3..fce9c2924fa3 100644 --- a/arch/arm64/include/asm/bitsperlong.h +++ b/arch/arm64/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/arm64/include/asm/byteorder.h b/arch/arm64/include/uapi/asm/byteorder.h index 2b92046aafc5..2b92046aafc5 100644 --- a/arch/arm64/include/asm/byteorder.h +++ b/arch/arm64/include/uapi/asm/byteorder.h | |||
diff --git a/arch/arm64/include/asm/fcntl.h b/arch/arm64/include/uapi/asm/fcntl.h index cd2e630c235e..cd2e630c235e 100644 --- a/arch/arm64/include/asm/fcntl.h +++ b/arch/arm64/include/uapi/asm/fcntl.h | |||
diff --git a/arch/arm64/include/uapi/asm/hwcap.h b/arch/arm64/include/uapi/asm/hwcap.h new file mode 100644 index 000000000000..eea497578b87 --- /dev/null +++ b/arch/arm64/include/uapi/asm/hwcap.h | |||
@@ -0,0 +1,26 @@ | |||
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 */ | ||
diff --git a/arch/arm64/include/asm/param.h b/arch/arm64/include/uapi/asm/param.h index 8e3a281d448a..8e3a281d448a 100644 --- a/arch/arm64/include/asm/param.h +++ b/arch/arm64/include/uapi/asm/param.h | |||
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..9b131b4efa0b --- /dev/null +++ b/arch/arm64/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,91 @@ | |||
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 */ | ||
diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/uapi/asm/setup.h index 9cf2e46fbbdf..9cf2e46fbbdf 100644 --- a/arch/arm64/include/asm/setup.h +++ b/arch/arm64/include/uapi/asm/setup.h | |||
diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h new file mode 100644 index 000000000000..690ad51cc901 --- /dev/null +++ b/arch/arm64/include/uapi/asm/sigcontext.h | |||
@@ -0,0 +1,57 @@ | |||
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 */ | ||
diff --git a/arch/arm64/include/asm/siginfo.h b/arch/arm64/include/uapi/asm/siginfo.h index 5a74a0853db0..5a74a0853db0 100644 --- a/arch/arm64/include/asm/siginfo.h +++ b/arch/arm64/include/uapi/asm/siginfo.h | |||
diff --git a/arch/arm64/include/asm/signal.h b/arch/arm64/include/uapi/asm/signal.h index 8d1e7236431b..8d1e7236431b 100644 --- a/arch/arm64/include/asm/signal.h +++ b/arch/arm64/include/uapi/asm/signal.h | |||
diff --git a/arch/arm64/include/uapi/asm/stat.h b/arch/arm64/include/uapi/asm/stat.h new file mode 100644 index 000000000000..eeb702e5074a --- /dev/null +++ b/arch/arm64/include/uapi/asm/stat.h | |||
@@ -0,0 +1,16 @@ | |||
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> | ||
diff --git a/arch/arm64/include/asm/statfs.h b/arch/arm64/include/uapi/asm/statfs.h index 6f6219050978..6f6219050978 100644 --- a/arch/arm64/include/asm/statfs.h +++ b/arch/arm64/include/uapi/asm/statfs.h | |||
diff --git a/arch/arm64/include/uapi/asm/unistd.h b/arch/arm64/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..1caadc24e3fe --- /dev/null +++ b/arch/arm64/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,16 @@ | |||
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> | ||