Skip to content

Commit 48b3b32

Browse files
committed
Merge tag 'disintegrate-arm64-20121011' of git://git.infradead.org/users/dhowells/linux-headers into uapi
UAPI Disintegration 2012-10-11 * tag 'disintegrate-arm64-20121011' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: (Scripted) Disintegrate arch/arm64/include/asm
2 parents 7606c37 + 4262a72 commit 48b3b32

File tree

21 files changed

+225
-132
lines changed

21 files changed

+225
-132
lines changed

arch/arm64/include/asm/Kbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
include include/asm-generic/Kbuild.asm
21

3-
header-y += hwcap.h
42

53
generic-y += bug.h
64
generic-y += bugs.h

arch/arm64/include/asm/hwcap.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@
1616
#ifndef __ASM_HWCAP_H
1717
#define __ASM_HWCAP_H
1818

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>
2420

25-
#ifdef __KERNEL__
2621
#define COMPAT_HWCAP_HALF (1 << 1)
2722
#define COMPAT_HWCAP_THUMB (1 << 2)
2823
#define COMPAT_HWCAP_FAST_MULT (1 << 4)
@@ -51,5 +46,3 @@
5146
extern unsigned int elf_hwcap;
5247
#endif
5348
#endif
54-
55-
#endif

arch/arm64/include/asm/ptrace.h

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919
#ifndef __ASM_PTRACE_H
2020
#define __ASM_PTRACE_H
2121

22-
#include <linux/types.h>
22+
#include <uapi/asm/ptrace.h>
2323

24-
#include <asm/hwcap.h>
25-
26-
#ifdef __KERNEL__
2724
/* AArch32-specific ptrace requests */
2825
#define COMPAT_PTRACE_GETREGS 12
2926
#define COMPAT_PTRACE_SETREGS 13
@@ -33,85 +30,18 @@
3330
#define COMPAT_PTRACE_SETVFPREGS 28
3431
#define COMPAT_PTRACE_GETHBPREGS 29
3532
#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__
5333
#define COMPAT_PSR_MODE_USR 0x00000010
5434
#define COMPAT_PSR_T_BIT 0x00000020
5535
#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__
7836
/*
7937
* These are 'magic' values for PTRACE_PEEKUSR that return info about where a
8038
* process is located in memory.
8139
*/
8240
#define COMPAT_PT_TEXT_ADDR 0x10000
8341
#define COMPAT_PT_DATA_ADDR 0x10004
8442
#define COMPAT_PT_TEXT_END_ADDR 0x10008
85-
#endif
86-
8743
#ifndef __ASSEMBLY__
8844

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-
11545
/* sizeof(struct user) for AArch32 */
11646
#define COMPAT_USER_SZ 296
11747
/* AArch32 uses x13 as the stack pointer... */
@@ -206,8 +136,5 @@ extern unsigned long profile_pc(struct pt_regs *regs);
206136

207137
extern int aarch32_break_trap(struct pt_regs *regs);
208138

209-
#endif /* __KERNEL__ */
210-
211139
#endif /* __ASSEMBLY__ */
212-
213140
#endif

arch/arm64/include/asm/sigcontext.h

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,8 @@
1616
#ifndef __ASM_SIGCONTEXT_H
1717
#define __ASM_SIGCONTEXT_H
1818

19-
#include <linux/types.h>
19+
#include <uapi/asm/sigcontext.h>
2020

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__
5721
/*
5822
* Auxiliary context saved in the sigcontext.__reserved array. Not exported to
5923
* user space as it will change with the addition of new context. User space
@@ -65,5 +29,3 @@ struct aux_context {
6529
struct _aarch64_ctx end;
6630
};
6731
#endif
68-
69-
#endif

arch/arm64/include/asm/stat.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
#ifndef __ASM_STAT_H
1717
#define __ASM_STAT_H
1818

19-
#include <asm-generic/stat.h>
19+
#include <uapi/asm/stat.h>
2020

21-
#ifdef __KERNEL__
2221
#ifdef CONFIG_COMPAT
2322

2423
#include <asm/compat.h>
@@ -60,5 +59,3 @@ struct stat64 {
6059

6160
#endif
6261
#endif
63-
64-
#endif

arch/arm64/include/asm/unistd.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
* You should have received a copy of the GNU General Public License
1414
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
16-
17-
#include <asm-generic/unistd.h>
18-
19-
#ifdef __KERNEL__
2016
#ifdef CONFIG_COMPAT
2117
#define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION
2218
#define __ARCH_WANT_COMPAT_STAT64
@@ -30,4 +26,4 @@
3026
#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
3127
#define __ARCH_WANT_COMPAT_SYS_SENDFILE
3228
#endif
33-
#endif
29+
#include <uapi/asm/unistd.h>

arch/arm64/include/uapi/asm/Kbuild

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
# UAPI Header export list
22
include include/uapi/asm-generic/Kbuild.asm
33

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
File renamed without changes.

arch/arm64/include/uapi/asm/hwcap.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 */
File renamed without changes.

arch/arm64/include/uapi/asm/ptrace.h

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 */
File renamed without changes.

0 commit comments

Comments
 (0)