From d66d8c7187989cedae43cb349626a7f304c60ec6 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 20 Dec 2012 10:53:58 +0000 Subject: [PATCH] UAPI: (Scripted) Disintegrate arch/score/include/asm Signed-off-by: David Howells Acked-by: Arnd Bergmann Acked-by: Thomas Gleixner Acked-by: Michael Kerrisk Acked-by: Paul E. McKenney Acked-by: Dave Jones Acked-by: Lennox Wu Acked-by: Liqin Chen --- arch/score/include/asm/Kbuild | 1 - arch/score/include/asm/ptrace.h | 74 +----------------- arch/score/include/asm/setup.h | 7 +- arch/score/include/uapi/asm/Kbuild | 31 ++++++++ arch/score/include/{ => uapi}/asm/auxvec.h | 0 .../include/{ => uapi}/asm/bitsperlong.h | 0 arch/score/include/{ => uapi}/asm/byteorder.h | 0 arch/score/include/{ => uapi}/asm/errno.h | 0 arch/score/include/{ => uapi}/asm/fcntl.h | 0 arch/score/include/{ => uapi}/asm/ioctl.h | 0 arch/score/include/{ => uapi}/asm/ioctls.h | 0 arch/score/include/{ => uapi}/asm/ipcbuf.h | 0 arch/score/include/{ => uapi}/asm/kvm_para.h | 0 arch/score/include/{ => uapi}/asm/mman.h | 0 arch/score/include/{ => uapi}/asm/msgbuf.h | 0 arch/score/include/{ => uapi}/asm/param.h | 0 arch/score/include/{ => uapi}/asm/poll.h | 0 .../include/{ => uapi}/asm/posix_types.h | 0 arch/score/include/uapi/asm/ptrace.h | 76 +++++++++++++++++++ arch/score/include/{ => uapi}/asm/resource.h | 0 arch/score/include/{ => uapi}/asm/sembuf.h | 0 arch/score/include/uapi/asm/setup.h | 9 +++ arch/score/include/{ => uapi}/asm/shmbuf.h | 0 .../score/include/{ => uapi}/asm/sigcontext.h | 0 arch/score/include/{ => uapi}/asm/siginfo.h | 0 arch/score/include/{ => uapi}/asm/signal.h | 0 arch/score/include/{ => uapi}/asm/socket.h | 0 arch/score/include/{ => uapi}/asm/sockios.h | 0 arch/score/include/{ => uapi}/asm/stat.h | 0 arch/score/include/{ => uapi}/asm/statfs.h | 0 arch/score/include/{ => uapi}/asm/swab.h | 0 arch/score/include/{ => uapi}/asm/termbits.h | 0 arch/score/include/{ => uapi}/asm/termios.h | 0 arch/score/include/{ => uapi}/asm/types.h | 0 arch/score/include/{ => uapi}/asm/unistd.h | 0 35 files changed, 118 insertions(+), 80 deletions(-) rename arch/score/include/{ => uapi}/asm/auxvec.h (100%) rename arch/score/include/{ => uapi}/asm/bitsperlong.h (100%) rename arch/score/include/{ => uapi}/asm/byteorder.h (100%) rename arch/score/include/{ => uapi}/asm/errno.h (100%) rename arch/score/include/{ => uapi}/asm/fcntl.h (100%) rename arch/score/include/{ => uapi}/asm/ioctl.h (100%) rename arch/score/include/{ => uapi}/asm/ioctls.h (100%) rename arch/score/include/{ => uapi}/asm/ipcbuf.h (100%) rename arch/score/include/{ => uapi}/asm/kvm_para.h (100%) rename arch/score/include/{ => uapi}/asm/mman.h (100%) rename arch/score/include/{ => uapi}/asm/msgbuf.h (100%) rename arch/score/include/{ => uapi}/asm/param.h (100%) rename arch/score/include/{ => uapi}/asm/poll.h (100%) rename arch/score/include/{ => uapi}/asm/posix_types.h (100%) create mode 100644 arch/score/include/uapi/asm/ptrace.h rename arch/score/include/{ => uapi}/asm/resource.h (100%) rename arch/score/include/{ => uapi}/asm/sembuf.h (100%) create mode 100644 arch/score/include/uapi/asm/setup.h rename arch/score/include/{ => uapi}/asm/shmbuf.h (100%) rename arch/score/include/{ => uapi}/asm/sigcontext.h (100%) rename arch/score/include/{ => uapi}/asm/siginfo.h (100%) rename arch/score/include/{ => uapi}/asm/signal.h (100%) rename arch/score/include/{ => uapi}/asm/socket.h (100%) rename arch/score/include/{ => uapi}/asm/sockios.h (100%) rename arch/score/include/{ => uapi}/asm/stat.h (100%) rename arch/score/include/{ => uapi}/asm/statfs.h (100%) rename arch/score/include/{ => uapi}/asm/swab.h (100%) rename arch/score/include/{ => uapi}/asm/termbits.h (100%) rename arch/score/include/{ => uapi}/asm/termios.h (100%) rename arch/score/include/{ => uapi}/asm/types.h (100%) rename arch/score/include/{ => uapi}/asm/unistd.h (100%) diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index 16e41fe1a419..cebaff8069a1 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild @@ -1,4 +1,3 @@ -include include/asm-generic/Kbuild.asm header-y += diff --git a/arch/score/include/asm/ptrace.h b/arch/score/include/asm/ptrace.h index e89dc9b1ef49..78fc538db84c 100644 --- a/arch/score/include/asm/ptrace.h +++ b/arch/score/include/asm/ptrace.h @@ -1,78 +1,8 @@ #ifndef _ASM_SCORE_PTRACE_H #define _ASM_SCORE_PTRACE_H -#define PTRACE_GETREGS 12 -#define PTRACE_SETREGS 13 +#include -#define PC 32 -#define CONDITION 33 -#define ECR 34 -#define EMA 35 -#define CEH 36 -#define CEL 37 -#define COUNTER 38 -#define LDCR 39 -#define STCR 40 -#define PSR 41 - -#define SINGLESTEP16_INSN 0x7006 -#define SINGLESTEP32_INSN 0x840C8000 -#define BREAKPOINT16_INSN 0x7002 /* work on SPG300 */ -#define BREAKPOINT32_INSN 0x84048000 /* work on SPG300 */ - -/* Define instruction mask */ -#define INSN32_MASK 0x80008000 - -#define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */ -#define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */ - -#define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */ -#define B32M 0xFC008000 -#define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */ -#define BL32M B32 -#define BR32 0x80008008 /* 1_00000_0000000000_1_00000000_000100_0 */ -#define BR32M 0xFFE0807E -#define BRL32 0x80008009 /* 1_00000_0000000000_1_00000000_000100_1 */ -#define BRL32M BR32M - -#define B32_SET (J32 | B32 | BL32 | BR32 | BRL32) - -#define J16 0x3000 /* 0_011_....... */ -#define J16M 0xF000 -#define B16 0x4000 /* 0_100_....... */ -#define B16M 0xF000 -#define BR16 0x0004 /* 0_000.......0100 */ -#define BR16M 0xF00F -#define B16_SET (J16 | B16 | BR16) - - -/* - * This struct defines the way the registers are stored on the stack during a - * system call/exception. As usual the registers k0/k1 aren't being saved. - */ -struct pt_regs { - unsigned long pad0[6]; /* stack arguments */ - unsigned long orig_r4; - unsigned long orig_r7; - long is_syscall; - - unsigned long regs[32]; - - unsigned long cel; - unsigned long ceh; - - unsigned long sr0; /* cnt */ - unsigned long sr1; /* lcr */ - unsigned long sr2; /* scr */ - - unsigned long cp0_epc; - unsigned long cp0_ema; - unsigned long cp0_psr; - unsigned long cp0_ecr; - unsigned long cp0_condition; -}; - -#ifdef __KERNEL__ struct task_struct; @@ -91,6 +21,4 @@ extern int read_tsk_short(struct task_struct *, unsigned long, #define arch_has_single_step() (1) -#endif /* __KERNEL__ */ - #endif /* _ASM_SCORE_PTRACE_H */ diff --git a/arch/score/include/asm/setup.h b/arch/score/include/asm/setup.h index 3cb944dc68dc..1f3aa7262fa3 100644 --- a/arch/score/include/asm/setup.h +++ b/arch/score/include/asm/setup.h @@ -1,11 +1,8 @@ #ifndef _ASM_SCORE_SETUP_H #define _ASM_SCORE_SETUP_H -#define COMMAND_LINE_SIZE 256 -#define MEMORY_START 0 -#define MEMORY_SIZE 0x2000000 +#include -#ifdef __KERNEL__ extern void pagetable_init(void); extern void pgd_init(unsigned long page); @@ -36,6 +33,4 @@ extern void debug_exception_vector(void); extern void general_exception_vector(void); extern void interrupt_exception_vector(void); -#endif /* __KERNEL__ */ - #endif /* _ASM_SCORE_SETUP_H */ diff --git a/arch/score/include/uapi/asm/Kbuild b/arch/score/include/uapi/asm/Kbuild index baebb3da1d44..040178cdb3eb 100644 --- a/arch/score/include/uapi/asm/Kbuild +++ b/arch/score/include/uapi/asm/Kbuild @@ -1,3 +1,34 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +header-y += auxvec.h +header-y += bitsperlong.h +header-y += byteorder.h +header-y += errno.h +header-y += fcntl.h +header-y += ioctl.h +header-y += ioctls.h +header-y += ipcbuf.h +header-y += kvm_para.h +header-y += mman.h +header-y += msgbuf.h +header-y += param.h +header-y += poll.h +header-y += posix_types.h +header-y += ptrace.h +header-y += resource.h +header-y += sembuf.h +header-y += setup.h +header-y += shmbuf.h +header-y += sigcontext.h +header-y += siginfo.h +header-y += signal.h +header-y += socket.h +header-y += sockios.h +header-y += stat.h +header-y += statfs.h +header-y += swab.h +header-y += termbits.h +header-y += termios.h +header-y += types.h +header-y += unistd.h diff --git a/arch/score/include/asm/auxvec.h b/arch/score/include/uapi/asm/auxvec.h similarity index 100% rename from arch/score/include/asm/auxvec.h rename to arch/score/include/uapi/asm/auxvec.h diff --git a/arch/score/include/asm/bitsperlong.h b/arch/score/include/uapi/asm/bitsperlong.h similarity index 100% rename from arch/score/include/asm/bitsperlong.h rename to arch/score/include/uapi/asm/bitsperlong.h diff --git a/arch/score/include/asm/byteorder.h b/arch/score/include/uapi/asm/byteorder.h similarity index 100% rename from arch/score/include/asm/byteorder.h rename to arch/score/include/uapi/asm/byteorder.h diff --git a/arch/score/include/asm/errno.h b/arch/score/include/uapi/asm/errno.h similarity index 100% rename from arch/score/include/asm/errno.h rename to arch/score/include/uapi/asm/errno.h diff --git a/arch/score/include/asm/fcntl.h b/arch/score/include/uapi/asm/fcntl.h similarity index 100% rename from arch/score/include/asm/fcntl.h rename to arch/score/include/uapi/asm/fcntl.h diff --git a/arch/score/include/asm/ioctl.h b/arch/score/include/uapi/asm/ioctl.h similarity index 100% rename from arch/score/include/asm/ioctl.h rename to arch/score/include/uapi/asm/ioctl.h diff --git a/arch/score/include/asm/ioctls.h b/arch/score/include/uapi/asm/ioctls.h similarity index 100% rename from arch/score/include/asm/ioctls.h rename to arch/score/include/uapi/asm/ioctls.h diff --git a/arch/score/include/asm/ipcbuf.h b/arch/score/include/uapi/asm/ipcbuf.h similarity index 100% rename from arch/score/include/asm/ipcbuf.h rename to arch/score/include/uapi/asm/ipcbuf.h diff --git a/arch/score/include/asm/kvm_para.h b/arch/score/include/uapi/asm/kvm_para.h similarity index 100% rename from arch/score/include/asm/kvm_para.h rename to arch/score/include/uapi/asm/kvm_para.h diff --git a/arch/score/include/asm/mman.h b/arch/score/include/uapi/asm/mman.h similarity index 100% rename from arch/score/include/asm/mman.h rename to arch/score/include/uapi/asm/mman.h diff --git a/arch/score/include/asm/msgbuf.h b/arch/score/include/uapi/asm/msgbuf.h similarity index 100% rename from arch/score/include/asm/msgbuf.h rename to arch/score/include/uapi/asm/msgbuf.h diff --git a/arch/score/include/asm/param.h b/arch/score/include/uapi/asm/param.h similarity index 100% rename from arch/score/include/asm/param.h rename to arch/score/include/uapi/asm/param.h diff --git a/arch/score/include/asm/poll.h b/arch/score/include/uapi/asm/poll.h similarity index 100% rename from arch/score/include/asm/poll.h rename to arch/score/include/uapi/asm/poll.h diff --git a/arch/score/include/asm/posix_types.h b/arch/score/include/uapi/asm/posix_types.h similarity index 100% rename from arch/score/include/asm/posix_types.h rename to arch/score/include/uapi/asm/posix_types.h diff --git a/arch/score/include/uapi/asm/ptrace.h b/arch/score/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..f59771a3f127 --- /dev/null +++ b/arch/score/include/uapi/asm/ptrace.h @@ -0,0 +1,76 @@ +#ifndef _UAPI_ASM_SCORE_PTRACE_H +#define _UAPI_ASM_SCORE_PTRACE_H + +#define PTRACE_GETREGS 12 +#define PTRACE_SETREGS 13 + +#define PC 32 +#define CONDITION 33 +#define ECR 34 +#define EMA 35 +#define CEH 36 +#define CEL 37 +#define COUNTER 38 +#define LDCR 39 +#define STCR 40 +#define PSR 41 + +#define SINGLESTEP16_INSN 0x7006 +#define SINGLESTEP32_INSN 0x840C8000 +#define BREAKPOINT16_INSN 0x7002 /* work on SPG300 */ +#define BREAKPOINT32_INSN 0x84048000 /* work on SPG300 */ + +/* Define instruction mask */ +#define INSN32_MASK 0x80008000 + +#define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */ +#define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */ + +#define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */ +#define B32M 0xFC008000 +#define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */ +#define BL32M B32 +#define BR32 0x80008008 /* 1_00000_0000000000_1_00000000_000100_0 */ +#define BR32M 0xFFE0807E +#define BRL32 0x80008009 /* 1_00000_0000000000_1_00000000_000100_1 */ +#define BRL32M BR32M + +#define B32_SET (J32 | B32 | BL32 | BR32 | BRL32) + +#define J16 0x3000 /* 0_011_....... */ +#define J16M 0xF000 +#define B16 0x4000 /* 0_100_....... */ +#define B16M 0xF000 +#define BR16 0x0004 /* 0_000.......0100 */ +#define BR16M 0xF00F +#define B16_SET (J16 | B16 | BR16) + + +/* + * This struct defines the way the registers are stored on the stack during a + * system call/exception. As usual the registers k0/k1 aren't being saved. + */ +struct pt_regs { + unsigned long pad0[6]; /* stack arguments */ + unsigned long orig_r4; + unsigned long orig_r7; + long is_syscall; + + unsigned long regs[32]; + + unsigned long cel; + unsigned long ceh; + + unsigned long sr0; /* cnt */ + unsigned long sr1; /* lcr */ + unsigned long sr2; /* scr */ + + unsigned long cp0_epc; + unsigned long cp0_ema; + unsigned long cp0_psr; + unsigned long cp0_ecr; + unsigned long cp0_condition; +}; + + +#endif /* _UAPI_ASM_SCORE_PTRACE_H */ diff --git a/arch/score/include/asm/resource.h b/arch/score/include/uapi/asm/resource.h similarity index 100% rename from arch/score/include/asm/resource.h rename to arch/score/include/uapi/asm/resource.h diff --git a/arch/score/include/asm/sembuf.h b/arch/score/include/uapi/asm/sembuf.h similarity index 100% rename from arch/score/include/asm/sembuf.h rename to arch/score/include/uapi/asm/sembuf.h diff --git a/arch/score/include/uapi/asm/setup.h b/arch/score/include/uapi/asm/setup.h new file mode 100644 index 000000000000..ab9dbdb59bba --- /dev/null +++ b/arch/score/include/uapi/asm/setup.h @@ -0,0 +1,9 @@ +#ifndef _UAPI_ASM_SCORE_SETUP_H +#define _UAPI_ASM_SCORE_SETUP_H + +#define COMMAND_LINE_SIZE 256 +#define MEMORY_START 0 +#define MEMORY_SIZE 0x2000000 + + +#endif /* _UAPI_ASM_SCORE_SETUP_H */ diff --git a/arch/score/include/asm/shmbuf.h b/arch/score/include/uapi/asm/shmbuf.h similarity index 100% rename from arch/score/include/asm/shmbuf.h rename to arch/score/include/uapi/asm/shmbuf.h diff --git a/arch/score/include/asm/sigcontext.h b/arch/score/include/uapi/asm/sigcontext.h similarity index 100% rename from arch/score/include/asm/sigcontext.h rename to arch/score/include/uapi/asm/sigcontext.h diff --git a/arch/score/include/asm/siginfo.h b/arch/score/include/uapi/asm/siginfo.h similarity index 100% rename from arch/score/include/asm/siginfo.h rename to arch/score/include/uapi/asm/siginfo.h diff --git a/arch/score/include/asm/signal.h b/arch/score/include/uapi/asm/signal.h similarity index 100% rename from arch/score/include/asm/signal.h rename to arch/score/include/uapi/asm/signal.h diff --git a/arch/score/include/asm/socket.h b/arch/score/include/uapi/asm/socket.h similarity index 100% rename from arch/score/include/asm/socket.h rename to arch/score/include/uapi/asm/socket.h diff --git a/arch/score/include/asm/sockios.h b/arch/score/include/uapi/asm/sockios.h similarity index 100% rename from arch/score/include/asm/sockios.h rename to arch/score/include/uapi/asm/sockios.h diff --git a/arch/score/include/asm/stat.h b/arch/score/include/uapi/asm/stat.h similarity index 100% rename from arch/score/include/asm/stat.h rename to arch/score/include/uapi/asm/stat.h diff --git a/arch/score/include/asm/statfs.h b/arch/score/include/uapi/asm/statfs.h similarity index 100% rename from arch/score/include/asm/statfs.h rename to arch/score/include/uapi/asm/statfs.h diff --git a/arch/score/include/asm/swab.h b/arch/score/include/uapi/asm/swab.h similarity index 100% rename from arch/score/include/asm/swab.h rename to arch/score/include/uapi/asm/swab.h diff --git a/arch/score/include/asm/termbits.h b/arch/score/include/uapi/asm/termbits.h similarity index 100% rename from arch/score/include/asm/termbits.h rename to arch/score/include/uapi/asm/termbits.h diff --git a/arch/score/include/asm/termios.h b/arch/score/include/uapi/asm/termios.h similarity index 100% rename from arch/score/include/asm/termios.h rename to arch/score/include/uapi/asm/termios.h diff --git a/arch/score/include/asm/types.h b/arch/score/include/uapi/asm/types.h similarity index 100% rename from arch/score/include/asm/types.h rename to arch/score/include/uapi/asm/types.h diff --git a/arch/score/include/asm/unistd.h b/arch/score/include/uapi/asm/unistd.h similarity index 100% rename from arch/score/include/asm/unistd.h rename to arch/score/include/uapi/asm/unistd.h -- 2.34.1