Skip to content

Commit 0a9426d

Browse files
committed
UAPI: (Scripted) Disintegrate arch/sh/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>
1 parent 9e2d865 commit 0a9426d

32 files changed

Lines changed: 173 additions & 153 deletions

‎arch/sh/include/asm/Kbuild‎

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

32
generic-y += bitsperlong.h
43
generic-y += cputime.h
@@ -33,13 +32,3 @@ generic-y += termbits.h
3332
generic-y += termios.h
3433
generic-y += ucontext.h
3534
generic-y += xor.h
36-
37-
header-y += cachectl.h
38-
header-y += cpu-features.h
39-
header-y += hw_breakpoint.h
40-
header-y += posix_types_32.h
41-
header-y += posix_types_64.h
42-
header-y += ptrace_32.h
43-
header-y += ptrace_64.h
44-
header-y += unistd_32.h
45-
header-y += unistd_64.h

‎arch/sh/include/asm/hw_breakpoint.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#ifndef __ASM_SH_HW_BREAKPOINT_H
22
#define __ASM_SH_HW_BREAKPOINT_H
33

4-
#ifdef __KERNEL__
4+
#include <uapi/asm/hw_breakpoint.h>
5+
56
#define __ARCH_HW_BREAKPOINT_H
67

78
#include <linux/kdebug.h>
@@ -66,5 +67,4 @@ extern int register_sh_ubc(struct sh_ubc *);
6667

6768
extern struct pmu perf_ops_bp;
6869

69-
#endif /* __KERNEL__ */
7070
#endif /* __ASM_SH_HW_BREAKPOINT_H */

‎arch/sh/include/asm/posix_types.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
#ifdef __KERNEL__
21
# ifdef CONFIG_SUPERH32
32
# include <asm/posix_types_32.h>
43
# else
54
# include <asm/posix_types_64.h>
65
# endif
7-
#else
8-
# ifdef __SH5__
9-
# include <asm/posix_types_64.h>
10-
# else
11-
# include <asm/posix_types_32.h>
12-
# endif
13-
#endif /* __KERNEL__ */

‎arch/sh/include/asm/ptrace.h‎

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,16 @@
1-
#ifndef __ASM_SH_PTRACE_H
2-
#define __ASM_SH_PTRACE_H
3-
41
/*
52
* Copyright (C) 1999, 2000 Niibe Yutaka
63
*/
4+
#ifndef __ASM_SH_PTRACE_H
5+
#define __ASM_SH_PTRACE_H
76

8-
#define PTRACE_GETREGS 12 /* General registers */
9-
#define PTRACE_SETREGS 13
10-
11-
#define PTRACE_GETFPREGS 14 /* FPU registers */
12-
#define PTRACE_SETFPREGS 15
13-
14-
#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */
15-
16-
#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
17-
#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
18-
19-
#define PTRACE_GETDSPREGS 55 /* DSP registers */
20-
#define PTRACE_SETDSPREGS 56
21-
22-
#define PT_TEXT_END_ADDR 240
23-
#define PT_TEXT_ADDR 244 /* &(struct user)->start_code */
24-
#define PT_DATA_ADDR 248 /* &(struct user)->start_data */
25-
#define PT_TEXT_LEN 252
26-
27-
#if defined(__SH5__) || defined(CONFIG_CPU_SH5)
28-
#include <asm/ptrace_64.h>
29-
#else
30-
#include <asm/ptrace_32.h>
31-
#endif
32-
33-
#ifdef __KERNEL__
347

358
#include <linux/stringify.h>
369
#include <linux/stddef.h>
3710
#include <linux/thread_info.h>
3811
#include <asm/addrspace.h>
3912
#include <asm/page.h>
13+
#include <uapi/asm/ptrace.h>
4014

4115
#define user_mode(regs) (((regs)->sr & 0x40000000)==0)
4216
#define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15])
@@ -140,6 +114,4 @@ static inline unsigned long profile_pc(struct pt_regs *regs)
140114
#define profile_pc profile_pc
141115

142116
#include <asm-generic/ptrace.h>
143-
#endif /* __KERNEL__ */
144-
145117
#endif /* __ASM_SH_PTRACE_H */

‎arch/sh/include/asm/ptrace_32.h‎

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,13 @@
11
#ifndef __ASM_SH_PTRACE_32_H
22
#define __ASM_SH_PTRACE_32_H
33

4-
/*
5-
* GCC defines register number like this:
6-
* -----------------------------
7-
* 0 - 15 are integer registers
8-
* 17 - 22 are control/special registers
9-
* 24 - 39 fp registers
10-
* 40 - 47 xd registers
11-
* 48 - fpscr register
12-
* -----------------------------
13-
*
14-
* We follows above, except:
15-
* 16 --- program counter (PC)
16-
* 22 --- syscall #
17-
* 23 --- floating point communication register
18-
*/
19-
#define REG_REG0 0
20-
#define REG_REG15 15
4+
#include <uapi/asm/ptrace_32.h>
215

22-
#define REG_PC 16
23-
24-
#define REG_PR 17
25-
#define REG_SR 18
26-
#define REG_GBR 19
27-
#define REG_MACH 20
28-
#define REG_MACL 21
29-
30-
#define REG_SYSCALL 22
31-
32-
#define REG_FPREG0 23
33-
#define REG_FPREG15 38
34-
#define REG_XFREG0 39
35-
#define REG_XFREG15 54
36-
37-
#define REG_FPSCR 55
38-
#define REG_FPUL 56
39-
40-
/*
41-
* This struct defines the way the registers are stored on the
42-
* kernel stack during a system call or other kernel entry.
43-
*/
44-
struct pt_regs {
45-
unsigned long regs[16];
46-
unsigned long pc;
47-
unsigned long pr;
48-
unsigned long sr;
49-
unsigned long gbr;
50-
unsigned long mach;
51-
unsigned long macl;
52-
long tra;
53-
};
54-
55-
/*
56-
* This struct defines the way the DSP registers are stored on the
57-
* kernel stack during a system call or other kernel entry.
58-
*/
59-
struct pt_dspregs {
60-
unsigned long a1;
61-
unsigned long a0g;
62-
unsigned long a1g;
63-
unsigned long m0;
64-
unsigned long m1;
65-
unsigned long a0;
66-
unsigned long x0;
67-
unsigned long x1;
68-
unsigned long y0;
69-
unsigned long y1;
70-
unsigned long dsr;
71-
unsigned long rs;
72-
unsigned long re;
73-
unsigned long mod;
74-
};
75-
76-
#ifdef __KERNEL__
776

787
#define MAX_REG_OFFSET offsetof(struct pt_regs, tra)
798
static inline long regs_return_value(struct pt_regs *regs)
809
{
8110
return regs->regs[0];
8211
}
8312

84-
#endif /* __KERNEL__ */
85-
8613
#endif /* __ASM_SH_PTRACE_32_H */

‎arch/sh/include/asm/ptrace_64.h‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
#ifndef __ASM_SH_PTRACE_64_H
22
#define __ASM_SH_PTRACE_64_H
33

4-
struct pt_regs {
5-
unsigned long long pc;
6-
unsigned long long sr;
7-
long long syscall_nr;
8-
unsigned long long regs[63];
9-
unsigned long long tregs[8];
10-
unsigned long long pad[2];
11-
};
4+
#include <uapi/asm/ptrace_64.h>
125

13-
#ifdef __KERNEL__
146

157
#define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7])
168
static inline long regs_return_value(struct pt_regs *regs)
179
{
1810
return regs->regs[3];
1911
}
2012

21-
#endif /* __KERNEL__ */
22-
2313
#endif /* __ASM_SH_PTRACE_64_H */

‎arch/sh/include/asm/setup.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#ifndef _SH_SETUP_H
22
#define _SH_SETUP_H
33

4-
#include <asm-generic/setup.h>
4+
#include <uapi/asm/setup.h>
55

6-
#ifdef __KERNEL__
76
/*
87
* This is set up by the setup-routine at boot-time
98
*/
@@ -22,6 +21,4 @@ void sh_mv_setup(void);
2221
void check_for_initrd(void);
2322
void per_cpu_trap_init(void);
2423

25-
#endif /* __KERNEL__ */
26-
2724
#endif /* _SH_SETUP_H */

‎arch/sh/include/asm/types.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#ifndef __ASM_SH_TYPES_H
22
#define __ASM_SH_TYPES_H
33

4-
#include <asm-generic/types.h>
4+
#include <uapi/asm/types.h>
55

66
/*
77
* These aren't exported outside the kernel to avoid name space clashes
88
*/
9-
#ifdef __KERNEL__
109
#ifndef __ASSEMBLY__
1110

1211
#ifdef CONFIG_SUPERH32
@@ -18,6 +17,4 @@ typedef u64 reg_size_t;
1817
#endif
1918

2019
#endif /* __ASSEMBLY__ */
21-
#endif /* __KERNEL__ */
22-
2320
#endif /* __ASM_SH_TYPES_H */

‎arch/sh/include/asm/unistd.h‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#ifdef __KERNEL__
21
# ifdef CONFIG_SUPERH32
32
# include <asm/unistd_32.h>
43
# else
@@ -38,10 +37,4 @@
3837
*/
3938
# define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
4039

41-
#else
42-
# ifdef __SH5__
43-
# include <asm/unistd_64.h>
44-
# else
45-
# include <asm/unistd_32.h>
46-
# endif
47-
#endif
40+
#include <uapi/asm/unistd.h>

‎arch/sh/include/uapi/asm/Kbuild‎

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

4+
header-y += auxvec.h
5+
header-y += byteorder.h
6+
header-y += cachectl.h
7+
header-y += cpu-features.h
8+
header-y += hw_breakpoint.h
9+
header-y += ioctls.h
10+
header-y += posix_types.h
11+
header-y += posix_types_32.h
12+
header-y += posix_types_64.h
13+
header-y += ptrace.h
14+
header-y += ptrace_32.h
15+
header-y += ptrace_64.h
16+
header-y += setup.h
17+
header-y += sigcontext.h
18+
header-y += signal.h
19+
header-y += sockios.h
20+
header-y += stat.h
21+
header-y += swab.h
22+
header-y += types.h
23+
header-y += unistd.h
24+
header-y += unistd_32.h
25+
header-y += unistd_64.h

0 commit comments

Comments
 (0)