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

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>

+173 -153
-11
arch/sh/include/asm/Kbuild
··· 1 - include include/asm-generic/Kbuild.asm 2 1 3 2 generic-y += bitsperlong.h 4 3 generic-y += cputime.h ··· 32 33 generic-y += termios.h 33 34 generic-y += ucontext.h 34 35 generic-y += xor.h 35 - 36 - header-y += cachectl.h 37 - header-y += cpu-features.h 38 - header-y += hw_breakpoint.h 39 - header-y += posix_types_32.h 40 - header-y += posix_types_64.h 41 - header-y += ptrace_32.h 42 - header-y += ptrace_64.h 43 - header-y += unistd_32.h 44 - header-y += unistd_64.h
arch/sh/include/asm/auxvec.h arch/sh/include/uapi/asm/auxvec.h
arch/sh/include/asm/byteorder.h arch/sh/include/uapi/asm/byteorder.h
arch/sh/include/asm/cachectl.h arch/sh/include/uapi/asm/cachectl.h
arch/sh/include/asm/cpu-features.h arch/sh/include/uapi/asm/cpu-features.h
+2 -2
arch/sh/include/asm/hw_breakpoint.h
··· 1 1 #ifndef __ASM_SH_HW_BREAKPOINT_H 2 2 #define __ASM_SH_HW_BREAKPOINT_H 3 3 4 - #ifdef __KERNEL__ 4 + #include <uapi/asm/hw_breakpoint.h> 5 + 5 6 #define __ARCH_HW_BREAKPOINT_H 6 7 7 8 #include <linux/kdebug.h> ··· 67 66 68 67 extern struct pmu perf_ops_bp; 69 68 70 - #endif /* __KERNEL__ */ 71 69 #endif /* __ASM_SH_HW_BREAKPOINT_H */
arch/sh/include/asm/ioctls.h arch/sh/include/uapi/asm/ioctls.h
-8
arch/sh/include/asm/posix_types.h
··· 1 - #ifdef __KERNEL__ 2 1 # ifdef CONFIG_SUPERH32 3 2 # include <asm/posix_types_32.h> 4 3 # else 5 4 # include <asm/posix_types_64.h> 6 5 # 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/posix_types_32.h arch/sh/include/uapi/asm/posix_types_32.h
arch/sh/include/asm/posix_types_64.h arch/sh/include/uapi/asm/posix_types_64.h
+3 -31
arch/sh/include/asm/ptrace.h
··· 1 - #ifndef __ASM_SH_PTRACE_H 2 - #define __ASM_SH_PTRACE_H 3 - 4 1 /* 5 2 * Copyright (C) 1999, 2000 Niibe Yutaka 6 3 */ 4 + #ifndef __ASM_SH_PTRACE_H 5 + #define __ASM_SH_PTRACE_H 7 6 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__ 34 7 35 8 #include <linux/stringify.h> 36 9 #include <linux/stddef.h> 37 10 #include <linux/thread_info.h> 38 11 #include <asm/addrspace.h> 39 12 #include <asm/page.h> 13 + #include <uapi/asm/ptrace.h> 40 14 41 15 #define user_mode(regs) (((regs)->sr & 0x40000000)==0) 42 16 #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) ··· 114 140 #define profile_pc profile_pc 115 141 116 142 #include <asm-generic/ptrace.h> 117 - #endif /* __KERNEL__ */ 118 - 119 143 #endif /* __ASM_SH_PTRACE_H */
+1 -74
arch/sh/include/asm/ptrace_32.h
··· 1 1 #ifndef __ASM_SH_PTRACE_32_H 2 2 #define __ASM_SH_PTRACE_32_H 3 3 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> 21 5 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__ 77 6 78 7 #define MAX_REG_OFFSET offsetof(struct pt_regs, tra) 79 8 static inline long regs_return_value(struct pt_regs *regs) 80 9 { 81 10 return regs->regs[0]; 82 11 } 83 - 84 - #endif /* __KERNEL__ */ 85 12 86 13 #endif /* __ASM_SH_PTRACE_32_H */
+1 -11
arch/sh/include/asm/ptrace_64.h
··· 1 1 #ifndef __ASM_SH_PTRACE_64_H 2 2 #define __ASM_SH_PTRACE_64_H 3 3 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> 12 5 13 - #ifdef __KERNEL__ 14 6 15 7 #define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) 16 8 static inline long regs_return_value(struct pt_regs *regs) 17 9 { 18 10 return regs->regs[3]; 19 11 } 20 - 21 - #endif /* __KERNEL__ */ 22 12 23 13 #endif /* __ASM_SH_PTRACE_64_H */
+1 -4
arch/sh/include/asm/setup.h
··· 1 1 #ifndef _SH_SETUP_H 2 2 #define _SH_SETUP_H 3 3 4 - #include <asm-generic/setup.h> 4 + #include <uapi/asm/setup.h> 5 5 6 - #ifdef __KERNEL__ 7 6 /* 8 7 * This is set up by the setup-routine at boot-time 9 8 */ ··· 20 21 void sh_mv_setup(void); 21 22 void check_for_initrd(void); 22 23 void per_cpu_trap_init(void); 23 - 24 - #endif /* __KERNEL__ */ 25 24 26 25 #endif /* _SH_SETUP_H */
arch/sh/include/asm/sigcontext.h arch/sh/include/uapi/asm/sigcontext.h
arch/sh/include/asm/signal.h arch/sh/include/uapi/asm/signal.h
arch/sh/include/asm/sockios.h arch/sh/include/uapi/asm/sockios.h
arch/sh/include/asm/stat.h arch/sh/include/uapi/asm/stat.h
arch/sh/include/asm/swab.h arch/sh/include/uapi/asm/swab.h
+1 -4
arch/sh/include/asm/types.h
··· 1 1 #ifndef __ASM_SH_TYPES_H 2 2 #define __ASM_SH_TYPES_H 3 3 4 - #include <asm-generic/types.h> 4 + #include <uapi/asm/types.h> 5 5 6 6 /* 7 7 * These aren't exported outside the kernel to avoid name space clashes 8 8 */ 9 - #ifdef __KERNEL__ 10 9 #ifndef __ASSEMBLY__ 11 10 12 11 #ifdef CONFIG_SUPERH32 ··· 17 18 #endif 18 19 19 20 #endif /* __ASSEMBLY__ */ 20 - #endif /* __KERNEL__ */ 21 - 22 21 #endif /* __ASM_SH_TYPES_H */
+1 -8
arch/sh/include/asm/unistd.h
··· 1 - #ifdef __KERNEL__ 2 1 # ifdef CONFIG_SUPERH32 3 2 # include <asm/unistd_32.h> 4 3 # else ··· 37 38 */ 38 39 # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 39 40 40 - #else 41 - # ifdef __SH5__ 42 - # include <asm/unistd_64.h> 43 - # else 44 - # include <asm/unistd_32.h> 45 - # endif 46 - #endif 41 + #include <uapi/asm/unistd.h>
arch/sh/include/asm/unistd_32.h arch/sh/include/uapi/asm/unistd_32.h
arch/sh/include/asm/unistd_64.h arch/sh/include/uapi/asm/unistd_64.h
+22
arch/sh/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 += 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
arch/sh/include/uapi/asm/hw_breakpoint.h
+7
arch/sh/include/uapi/asm/posix_types.h
··· 1 + #ifndef __KERNEL__ 2 + # ifdef __SH5__ 3 + # include <asm/posix_types_64.h> 4 + # else 5 + # include <asm/posix_types_32.h> 6 + # endif 7 + #endif /* __KERNEL__ */
+34
arch/sh/include/uapi/asm/ptrace.h
··· 1 + /* 2 + * Copyright (C) 1999, 2000 Niibe Yutaka 3 + */ 4 + #ifndef _UAPI__ASM_SH_PTRACE_H 5 + #define _UAPI__ASM_SH_PTRACE_H 6 + 7 + 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 + 34 + #endif /* _UAPI__ASM_SH_PTRACE_H */
+77
arch/sh/include/uapi/asm/ptrace_32.h
··· 1 + #ifndef _UAPI__ASM_SH_PTRACE_32_H 2 + #define _UAPI__ASM_SH_PTRACE_32_H 3 + 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 21 + 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 + 77 + #endif /* _UAPI__ASM_SH_PTRACE_32_H */
+14
arch/sh/include/uapi/asm/ptrace_64.h
··· 1 + #ifndef _UAPI__ASM_SH_PTRACE_64_H 2 + #define _UAPI__ASM_SH_PTRACE_64_H 3 + 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 + }; 12 + 13 + 14 + #endif /* _UAPI__ASM_SH_PTRACE_64_H */
+1
arch/sh/include/uapi/asm/setup.h
··· 1 + #include <asm-generic/setup.h>
+1
arch/sh/include/uapi/asm/types.h
··· 1 + #include <asm-generic/types.h>
+7
arch/sh/include/uapi/asm/unistd.h
··· 1 + #ifndef __KERNEL__ 2 + # ifdef __SH5__ 3 + # include <asm/unistd_64.h> 4 + # else 5 + # include <asm/unistd_32.h> 6 + # endif 7 + #endif