diff options
Diffstat (limited to 'arch/sh/include')
52 files changed, 228 insertions, 206 deletions
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index 7b673ddcd55..29f83beeef7 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild @@ -1,4 +1,3 @@ -include include/asm-generic/Kbuild.asm generic-y += bitsperlong.h generic-y += cputime.h @@ -7,6 +6,7 @@ generic-y += delay.h generic-y += div64.h generic-y += emergency-restart.h generic-y += errno.h +generic-y += exec.h generic-y += fcntl.h generic-y += ioctl.h generic-y += ipcbuf.h @@ -33,13 +33,3 @@ generic-y += termbits.h generic-y += termios.h generic-y += ucontext.h generic-y += xor.h - -header-y += cachectl.h -header-y += cpu-features.h -header-y += hw_breakpoint.h -header-y += posix_types_32.h -header-y += posix_types_64.h -header-y += ptrace_32.h -header-y += ptrace_64.h -header-y += unistd_32.h -header-y += unistd_64.h diff --git a/arch/sh/include/asm/bl_bit.h b/arch/sh/include/asm/bl_bit.h index 45e6b9fc37a..06e4163c674 100644 --- a/arch/sh/include/asm/bl_bit.h +++ b/arch/sh/include/asm/bl_bit.h @@ -2,9 +2,9 @@ #define __ASM_SH_BL_BIT_H #ifdef CONFIG_SUPERH32 -# include "bl_bit_32.h" +# include <asm/bl_bit_32.h> #else -# include "bl_bit_64.h" +# include <asm/bl_bit_64.h> #endif #endif /* __ASM_SH_BL_BIT_H */ diff --git a/arch/sh/include/asm/cache_insns.h b/arch/sh/include/asm/cache_insns.h index d25fbe53090..355cb06b7a3 100644 --- a/arch/sh/include/asm/cache_insns.h +++ b/arch/sh/include/asm/cache_insns.h @@ -3,9 +3,9 @@ #ifdef CONFIG_SUPERH32 -# include "cache_insns_32.h" +# include <asm/cache_insns_32.h> #else -# include "cache_insns_64.h" +# include <asm/cache_insns_64.h> #endif #endif /* __ASM_SH_CACHE_INSNS_H */ diff --git a/arch/sh/include/asm/checksum.h b/arch/sh/include/asm/checksum.h index fc26d1f4b59..34ae2620452 100644 --- a/arch/sh/include/asm/checksum.h +++ b/arch/sh/include/asm/checksum.h @@ -1,5 +1,5 @@ #ifdef CONFIG_SUPERH32 -# include "checksum_32.h" +# include <asm/checksum_32.h> #else # include <asm-generic/checksum.h> #endif diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h index f38112be67d..37924afa8d8 100644 --- a/arch/sh/include/asm/elf.h +++ b/arch/sh/include/asm/elf.h @@ -183,7 +183,8 @@ do { \ } while (0) #endif -#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) +#define SET_PERSONALITY(ex) \ + set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK))) #ifdef CONFIG_VSYSCALL /* vDSO has arch_setup_additional_pages */ diff --git a/arch/sh/include/asm/exec.h b/arch/sh/include/asm/exec.h deleted file mode 100644 index 69486a9497f..00000000000 --- a/arch/sh/include/asm/exec.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima - * Copyright (C) 2002 Paul Mundt - */ -#ifndef __ASM_SH_EXEC_H -#define __ASM_SH_EXEC_H - -#define arch_align_stack(x) (x) - -#endif /* __ASM_SH_EXEC_H */ diff --git a/arch/sh/include/asm/hugetlb.h b/arch/sh/include/asm/hugetlb.h index 967068fb79a..b3808c7d67b 100644 --- a/arch/sh/include/asm/hugetlb.h +++ b/arch/sh/include/asm/hugetlb.h @@ -1,6 +1,7 @@ #ifndef _ASM_SH_HUGETLB_H #define _ASM_SH_HUGETLB_H +#include <asm/cacheflush.h> #include <asm/page.h> @@ -89,4 +90,9 @@ static inline void arch_release_hugepage(struct page *page) { } +static inline void arch_clear_hugepage_flags(struct page *page) +{ + clear_bit(PG_dcache_clean, &page->flags); +} + #endif /* _ASM_SH_HUGETLB_H */ diff --git a/arch/sh/include/asm/hw_breakpoint.h b/arch/sh/include/asm/hw_breakpoint.h index 89890f61a7b..ec9ad593c3d 100644 --- a/arch/sh/include/asm/hw_breakpoint.h +++ b/arch/sh/include/asm/hw_breakpoint.h @@ -1,7 +1,8 @@ #ifndef __ASM_SH_HW_BREAKPOINT_H #define __ASM_SH_HW_BREAKPOINT_H -#ifdef __KERNEL__ +#include <uapi/asm/hw_breakpoint.h> + #define __ARCH_HW_BREAKPOINT_H #include <linux/kdebug.h> @@ -66,5 +67,4 @@ extern int register_sh_ubc(struct sh_ubc *); extern struct pmu perf_ops_bp; -#endif /* __KERNEL__ */ #endif /* __ASM_SH_HW_BREAKPOINT_H */ diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 0cf60a62881..73a23f4617a 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -134,7 +134,7 @@ __BUILD_MEMORY_STRING(__raw_, q, u64) * load/store instructions. sh_io_port_base is the virtual address to * which all ports are being mapped. */ -extern const unsigned long sh_io_port_base; +extern unsigned long sh_io_port_base; static inline void __set_io_port_base(unsigned long pbase) { diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h index 384c7471a37..21c5088788d 100644 --- a/arch/sh/include/asm/mmu_context.h +++ b/arch/sh/include/asm/mmu_context.h @@ -46,9 +46,9 @@ #define MMU_VPN_MASK 0xfffff000 #if defined(CONFIG_SUPERH32) -#include "mmu_context_32.h" +#include <asm/mmu_context_32.h> #else -#include "mmu_context_64.h" +#include <asm/mmu_context_64.h> #endif /* diff --git a/arch/sh/include/asm/module.h b/arch/sh/include/asm/module.h index b7927de86f9..81300d8b544 100644 --- a/arch/sh/include/asm/module.h +++ b/arch/sh/include/asm/module.h @@ -1,21 +1,13 @@ #ifndef _ASM_SH_MODULE_H #define _ASM_SH_MODULE_H -struct mod_arch_specific { +#include <asm-generic/module.h> + #ifdef CONFIG_DWARF_UNWINDER +struct mod_arch_specific { struct list_head fde_list; struct list_head cie_list; -#endif }; - -#ifdef CONFIG_64BIT -#define Elf_Shdr Elf64_Shdr -#define Elf_Sym Elf64_Sym -#define Elf_Ehdr Elf64_Ehdr -#else -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr #endif #ifdef CONFIG_CPU_LITTLE_ENDIAN diff --git a/arch/sh/include/asm/posix_types.h b/arch/sh/include/asm/posix_types.h index 4eeb723aee7..1aa781079b1 100644 --- a/arch/sh/include/asm/posix_types.h +++ b/arch/sh/include/asm/posix_types.h @@ -1,13 +1,5 @@ -#ifdef __KERNEL__ # ifdef CONFIG_SUPERH32 -# include "posix_types_32.h" +# include <asm/posix_types_32.h> # else -# include "posix_types_64.h" +# include <asm/posix_types_64.h> # endif -#else -# ifdef __SH5__ -# include "posix_types_64.h" -# else -# include "posix_types_32.h" -# endif -#endif /* __KERNEL__ */ diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h index 3d14aeaef57..5448f9bbf4a 100644 --- a/arch/sh/include/asm/processor.h +++ b/arch/sh/include/asm/processor.h @@ -175,9 +175,9 @@ extern unsigned int instruction_size(unsigned int insn); #endif /* __ASSEMBLY__ */ #ifdef CONFIG_SUPERH32 -# include "processor_32.h" +# include <asm/processor_32.h> #else -# include "processor_64.h" +# include <asm/processor_64.h> #endif #endif /* __ASM_SH_PROCESSOR_H */ diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index c7b7e1ed194..2506c7db76b 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h @@ -1,42 +1,16 @@ -#ifndef __ASM_SH_PTRACE_H -#define __ASM_SH_PTRACE_H - /* * Copyright (C) 1999, 2000 Niibe Yutaka */ +#ifndef __ASM_SH_PTRACE_H +#define __ASM_SH_PTRACE_H -#define PTRACE_GETREGS 12 /* General registers */ -#define PTRACE_SETREGS 13 - -#define PTRACE_GETFPREGS 14 /* FPU registers */ -#define PTRACE_SETFPREGS 15 - -#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ - -#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ -#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ - -#define PTRACE_GETDSPREGS 55 /* DSP registers */ -#define PTRACE_SETDSPREGS 56 - -#define PT_TEXT_END_ADDR 240 -#define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ -#define PT_DATA_ADDR 248 /* &(struct user)->start_data */ -#define PT_TEXT_LEN 252 - -#if defined(__SH5__) || defined(CONFIG_CPU_SH5) -#include "ptrace_64.h" -#else -#include "ptrace_32.h" -#endif - -#ifdef __KERNEL__ #include <linux/stringify.h> #include <linux/stddef.h> #include <linux/thread_info.h> #include <asm/addrspace.h> #include <asm/page.h> +#include <uapi/asm/ptrace.h> #define user_mode(regs) (((regs)->sr & 0x40000000)==0) #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) @@ -140,6 +114,4 @@ static inline unsigned long profile_pc(struct pt_regs *regs) #define profile_pc profile_pc #include <asm-generic/ptrace.h> -#endif /* __KERNEL__ */ - #endif /* __ASM_SH_PTRACE_H */ diff --git a/arch/sh/include/asm/ptrace_32.h b/arch/sh/include/asm/ptrace_32.h index 2d3e906aa72..1dd4480c536 100644 --- a/arch/sh/include/asm/ptrace_32.h +++ b/arch/sh/include/asm/ptrace_32.h @@ -1,79 +1,8 @@ #ifndef __ASM_SH_PTRACE_32_H #define __ASM_SH_PTRACE_32_H -/* - * GCC defines register number like this: - * ----------------------------- - * 0 - 15 are integer registers - * 17 - 22 are control/special registers - * 24 - 39 fp registers - * 40 - 47 xd registers - * 48 - fpscr register - * ----------------------------- - * - * We follows above, except: - * 16 --- program counter (PC) - * 22 --- syscall # - * 23 --- floating point communication register - */ -#define REG_REG0 0 -#define REG_REG15 15 +#include <uapi/asm/ptrace_32.h> -#define REG_PC 16 - -#define REG_PR 17 -#define REG_SR 18 -#define REG_GBR 19 -#define REG_MACH 20 -#define REG_MACL 21 - -#define REG_SYSCALL 22 - -#define REG_FPREG0 23 -#define REG_FPREG15 38 -#define REG_XFREG0 39 -#define REG_XFREG15 54 - -#define REG_FPSCR 55 -#define REG_FPUL 56 - -/* - * This struct defines the way the registers are stored on the - * kernel stack during a system call or other kernel entry. - */ -struct pt_regs { - unsigned long regs[16]; - unsigned long pc; - unsigned long pr; - unsigned long sr; - unsigned long gbr; - unsigned long mach; - unsigned long macl; - long tra; -}; - -/* - * This struct defines the way the DSP registers are stored on the - * kernel stack during a system call or other kernel entry. - */ -struct pt_dspregs { - unsigned long a1; - unsigned long a0g; - unsigned long a1g; - unsigned long m0; - unsigned long m1; - unsigned long a0; - unsigned long x0; - unsigned long x1; - unsigned long y0; - unsigned long y1; - unsigned long dsr; - unsigned long rs; - unsigned long re; - unsigned long mod; -}; - -#ifdef __KERNEL__ #define MAX_REG_OFFSET offsetof(struct pt_regs, tra) static inline long regs_return_value(struct pt_regs *regs) @@ -81,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs) return regs->regs[0]; } -#endif /* __KERNEL__ */ - #endif /* __ASM_SH_PTRACE_32_H */ diff --git a/arch/sh/include/asm/ptrace_64.h b/arch/sh/include/asm/ptrace_64.h index eb3fcceaf64..97f4b5660f2 100644 --- a/arch/sh/include/asm/ptrace_64.h +++ b/arch/sh/include/asm/ptrace_64.h @@ -1,16 +1,8 @@ #ifndef __ASM_SH_PTRACE_64_H #define __ASM_SH_PTRACE_64_H -struct pt_regs { - unsigned long long pc; - unsigned long long sr; - long long syscall_nr; - unsigned long long regs[63]; - unsigned long long tregs[8]; - unsigned long long pad[2]; -}; +#include <uapi/asm/ptrace_64.h> -#ifdef __KERNEL__ #define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) static inline long regs_return_value(struct pt_regs *regs) @@ -18,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs) return regs->regs[3]; } -#endif /* __KERNEL__ */ - #endif /* __ASM_SH_PTRACE_64_H */ diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h index 465a22df8fd..99238108e7a 100644 --- a/arch/sh/include/asm/setup.h +++ b/arch/sh/include/asm/setup.h @@ -1,9 +1,8 @@ #ifndef _SH_SETUP_H #define _SH_SETUP_H -#include <asm-generic/setup.h> +#include <uapi/asm/setup.h> -#ifdef __KERNEL__ /* * This is set up by the setup-routine at boot-time */ @@ -22,6 +21,4 @@ void sh_mv_setup(void); void check_for_initrd(void); void per_cpu_trap_init(void); -#endif /* __KERNEL__ */ - #endif /* _SH_SETUP_H */ diff --git a/arch/sh/include/asm/string.h b/arch/sh/include/asm/string.h index 8c1ea21dc0a..114011fa08a 100644 --- a/arch/sh/include/asm/string.h +++ b/arch/sh/include/asm/string.h @@ -1,5 +1,5 @@ #ifdef CONFIG_SUPERH32 -# include "string_32.h" +# include <asm/string_32.h> #else -# include "string_64.h" +# include <asm/string_64.h> #endif diff --git a/arch/sh/include/asm/switch_to.h b/arch/sh/include/asm/switch_to.h index 62b1941813e..bcd722fc834 100644 --- a/arch/sh/include/asm/switch_to.h +++ b/arch/sh/include/asm/switch_to.h @@ -11,9 +11,9 @@ #define __ASM_SH_SWITCH_TO_H #ifdef CONFIG_SUPERH32 -# include "switch_to_32.h" +# include <asm/switch_to_32.h> #else -# include "switch_to_64.h" +# include <asm/switch_to_64.h> #endif #endif /* __ASM_SH_SWITCH_TO_H */ diff --git a/arch/sh/include/asm/syscall.h b/arch/sh/include/asm/syscall.h index aa7777bdc37..847128da6ea 100644 --- a/arch/sh/include/asm/syscall.h +++ b/arch/sh/include/asm/syscall.h @@ -4,9 +4,9 @@ extern const unsigned long sys_call_table[]; #ifdef CONFIG_SUPERH32 -# include "syscall_32.h" +# include <asm/syscall_32.h> #else -# include "syscall_64.h" +# include <asm/syscall_64.h> #endif #endif /* __ASM_SH_SYSCALL_H */ diff --git a/arch/sh/include/asm/syscalls.h b/arch/sh/include/asm/syscalls.h index 507725af2e5..3dbfef06f6b 100644 --- a/arch/sh/include/asm/syscalls.h +++ b/arch/sh/include/asm/syscalls.h @@ -11,9 +11,9 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, unsigned long fd, unsigned long pgoff); #ifdef CONFIG_SUPERH32 -# include "syscalls_32.h" +# include <asm/syscalls_32.h> #else -# include "syscalls_64.h" +# include <asm/syscalls_64.h> #endif #endif /* __KERNEL__ */ diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index bc13b57cdc8..7d5ac4e4848 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h @@ -206,6 +206,9 @@ static inline bool test_and_clear_restore_sigmask(void) ti->status &= ~TS_RESTORE_SIGMASK; return true; } + +#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) + #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ diff --git a/arch/sh/include/asm/tlb.h b/arch/sh/include/asm/tlb.h index ec88bfcdf7c..e61d43d9f68 100644 --- a/arch/sh/include/asm/tlb.h +++ b/arch/sh/include/asm/tlb.h @@ -2,7 +2,7 @@ #define __ASM_SH_TLB_H #ifdef CONFIG_SUPERH64 -# include "tlb_64.h" +# include <asm/tlb_64.h> #endif #ifndef __ASSEMBLY__ diff --git a/arch/sh/include/asm/traps.h b/arch/sh/include/asm/traps.h index afd9df8d064..9cc149a0dbd 100644 --- a/arch/sh/include/asm/traps.h +++ b/arch/sh/include/asm/traps.h @@ -4,9 +4,9 @@ #include <linux/compiler.h> #ifdef CONFIG_SUPERH32 -# include "traps_32.h" +# include <asm/traps_32.h> #else -# include "traps_64.h" +# include <asm/traps_64.h> #endif BUILD_TRAP_HANDLER(address_error); diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h index f8421f7ad63..6a31053fa5e 100644 --- a/arch/sh/include/asm/types.h +++ b/arch/sh/include/asm/types.h @@ -1,12 +1,11 @@ #ifndef __ASM_SH_TYPES_H #define __ASM_SH_TYPES_H -#include <asm-generic/types.h> +#include <uapi/asm/types.h> /* * These aren't exported outside the kernel to avoid name space clashes */ -#ifdef __KERNEL__ #ifndef __ASSEMBLY__ #ifdef CONFIG_SUPERH32 @@ -18,6 +17,4 @@ typedef u64 reg_size_t; #endif #endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ - #endif /* __ASM_SH_TYPES_H */ diff --git a/arch/sh/include/asm/uaccess.h b/arch/sh/include/asm/uaccess.h index 8698a80ed00..9486376605f 100644 --- a/arch/sh/include/asm/uaccess.h +++ b/arch/sh/include/asm/uaccess.h @@ -97,9 +97,9 @@ struct __large_struct { unsigned long buf[100]; }; }) #ifdef CONFIG_SUPERH32 -# include "uaccess_32.h" +# include <asm/uaccess_32.h> #else -# include "uaccess_64.h" +# include <asm/uaccess_64.h> #endif extern long strncpy_from_user(char *dest, const char __user *src, long count); diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h index 7bc67076baa..38956dfa76f 100644 --- a/arch/sh/include/asm/unistd.h +++ b/arch/sh/include/asm/unistd.h @@ -1,8 +1,7 @@ -#ifdef __KERNEL__ # ifdef CONFIG_SUPERH32 -# include "unistd_32.h" +# include <asm/unistd_32.h> # else -# include "unistd_64.h" +# include <asm/unistd_64.h> # endif # define __ARCH_WANT_SYS_RT_SIGSUSPEND @@ -38,10 +37,4 @@ */ # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#else -# ifdef __SH5__ -# include "unistd_64.h" -# else -# include "unistd_32.h" -# endif -#endif +#include <uapi/asm/unistd.h> diff --git a/arch/sh/include/mach-ecovec24/mach/romimage.h b/arch/sh/include/mach-ecovec24/mach/romimage.h index d63ef51ec18..60f3e8af05f 100644 --- a/arch/sh/include/mach-ecovec24/mach/romimage.h +++ b/arch/sh/include/mach-ecovec24/mach/romimage.h @@ -6,7 +6,7 @@ */ #include <asm/romimage-macros.h> -#include "partner-jet-setup.txt" +#include <mach/partner-jet-setup.txt> /* execute icbi after enabling cache */ mov.l 1f, r0 diff --git a/arch/sh/include/mach-kfr2r09/mach/romimage.h b/arch/sh/include/mach-kfr2r09/mach/romimage.h index 7a883167c84..1afae21ced5 100644 --- a/arch/sh/include/mach-kfr2r09/mach/romimage.h +++ b/arch/sh/include/mach-kfr2r09/mach/romimage.h @@ -6,7 +6,7 @@ */ #include <asm/romimage-macros.h> -#include "partner-jet-setup.txt" +#include <mach/partner-jet-setup.txt> /* execute icbi after enabling cache */ mov.l 1f, r0 diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild new file mode 100644 index 00000000000..60613ae7851 --- /dev/null +++ b/arch/sh/include/uapi/asm/Kbuild @@ -0,0 +1,25 @@ +# UAPI Header export list +include include/uapi/asm-generic/Kbuild.asm + +header-y += auxvec.h +header-y += byteorder.h +header-y += cachectl.h +header-y += cpu-features.h +header-y += hw_breakpoint.h +header-y += ioctls.h +header-y += posix_types.h +header-y += posix_types_32.h +header-y += posix_types_64.h +header-y += ptrace.h +header-y += ptrace_32.h +header-y += ptrace_64.h +header-y += setup.h +header-y += sigcontext.h +header-y += signal.h +header-y += sockios.h +header-y += stat.h +header-y += swab.h +header-y += types.h +header-y += unistd.h +header-y += unistd_32.h +header-y += unistd_64.h diff --git a/arch/sh/include/asm/auxvec.h b/arch/sh/include/uapi/asm/auxvec.h index 8bcc51af936..8bcc51af936 100644 --- a/arch/sh/include/asm/auxvec.h +++ b/arch/sh/include/uapi/asm/auxvec.h diff --git a/arch/sh/include/asm/byteorder.h b/arch/sh/include/uapi/asm/byteorder.h index db2f5d7cb17..db2f5d7cb17 100644 --- a/arch/sh/include/asm/byteorder.h +++ b/arch/sh/include/uapi/asm/byteorder.h diff --git a/arch/sh/include/asm/cachectl.h b/arch/sh/include/uapi/asm/cachectl.h index 6ffb4b7a212..6ffb4b7a212 100644 --- a/arch/sh/include/asm/cachectl.h +++ b/arch/sh/include/uapi/asm/cachectl.h diff --git a/arch/sh/include/asm/cpu-features.h b/arch/sh/include/uapi/asm/cpu-features.h index 694abe490ed..694abe490ed 100644 --- a/arch/sh/include/asm/cpu-features.h +++ b/arch/sh/include/uapi/asm/cpu-features.h diff --git a/arch/sh/include/uapi/asm/hw_breakpoint.h b/arch/sh/include/uapi/asm/hw_breakpoint.h new file mode 100644 index 00000000000..ae5704fa77a --- /dev/null +++ b/arch/sh/include/uapi/asm/hw_breakpoint.h @@ -0,0 +1,4 @@ +/* + * There isn't anything here anymore, but the file must not be empty or patch + * will delete it. + */ diff --git a/arch/sh/include/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h index a6769f352bf..a6769f352bf 100644 --- a/arch/sh/include/asm/ioctls.h +++ b/arch/sh/include/uapi/asm/ioctls.h diff --git a/arch/sh/include/uapi/asm/posix_types.h b/arch/sh/include/uapi/asm/posix_types.h new file mode 100644 index 00000000000..dc55e5adfe1 --- /dev/null +++ b/arch/sh/include/uapi/asm/posix_types.h @@ -0,0 +1,7 @@ +#ifndef __KERNEL__ +# ifdef __SH5__ +# include <asm/posix_types_64.h> +# else +# include <asm/posix_types_32.h> +# endif +#endif /* __KERNEL__ */ diff --git a/arch/sh/include/asm/posix_types_32.h b/arch/sh/include/uapi/asm/posix_types_32.h index ba0bdc423b0..ba0bdc423b0 100644 --- a/arch/sh/include/asm/posix_types_32.h +++ b/arch/sh/include/uapi/asm/posix_types_32.h diff --git a/arch/sh/include/asm/posix_types_64.h b/arch/sh/include/uapi/asm/posix_types_64.h index 244f7e950e1..244f7e950e1 100644 --- a/arch/sh/include/asm/posix_types_64.h +++ b/arch/sh/include/uapi/asm/posix_types_64.h diff --git a/arch/sh/include/uapi/asm/ptrace.h b/arch/sh/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..8b8c5aca9c2 --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 1999, 2000 Niibe Yutaka + */ +#ifndef _UAPI__ASM_SH_PTRACE_H +#define _UAPI__ASM_SH_PTRACE_H + + +#define PTRACE_GETREGS 12 /* General registers */ +#define PTRACE_SETREGS 13 + +#define PTRACE_GETFPREGS 14 /* FPU registers */ +#define PTRACE_SETFPREGS 15 + +#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ + +#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ +#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ + +#define PTRACE_GETDSPREGS 55 /* DSP registers */ +#define PTRACE_SETDSPREGS 56 + +#define PT_TEXT_END_ADDR 240 +#define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ +#define PT_DATA_ADDR 248 /* &(struct user)->start_data */ +#define PT_TEXT_LEN 252 + +#if defined(__SH5__) || defined(CONFIG_CPU_SH5) +#include <asm/ptrace_64.h> +#else +#include <asm/ptrace_32.h> +#endif + + +#endif /* _UAPI__ASM_SH_PTRACE_H */ diff --git a/arch/sh/include/uapi/asm/ptrace_32.h b/arch/sh/include/uapi/asm/ptrace_32.h new file mode 100644 index 00000000000..926e0cefc2b --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace_32.h @@ -0,0 +1,77 @@ +#ifndef _UAPI__ASM_SH_PTRACE_32_H +#define _UAPI__ASM_SH_PTRACE_32_H + +/* + * GCC defines register number like this: + * ----------------------------- + * 0 - 15 are integer registers + * 17 - 22 are control/special registers + * 24 - 39 fp registers + * 40 - 47 xd registers + * 48 - fpscr register + * ----------------------------- + * + * We follows above, except: + * 16 --- program counter (PC) + * 22 --- syscall # + * 23 --- floating point communication register + */ +#define REG_REG0 0 +#define REG_REG15 15 + +#define REG_PC 16 + +#define REG_PR 17 +#define REG_SR 18 +#define REG_GBR 19 +#define REG_MACH 20 +#define REG_MACL 21 + +#define REG_SYSCALL 22 + +#define REG_FPREG0 23 +#define REG_FPREG15 38 +#define REG_XFREG0 39 +#define REG_XFREG15 54 + +#define REG_FPSCR 55 +#define REG_FPUL 56 + +/* + * This struct defines the way the registers are stored on the + * kernel stack during a system call or other kernel entry. + */ +struct pt_regs { + unsigned long regs[16]; + unsigned long pc; + unsigned long pr; + unsigned long sr; + unsigned long gbr; + unsigned long mach; + unsigned long macl; + long tra; +}; + +/* + * This struct defines the way the DSP registers are stored on the + * kernel stack during a system call or other kernel entry. + */ +struct pt_dspregs { + unsigned long a1; + unsigned long a0g; + unsigned long a1g; + unsigned long m0; + unsigned long m1; + unsigned long a0; + unsigned long x0; + unsigned long x1; + unsigned long y0; + unsigned long y1; + unsigned long dsr; + unsigned long rs; + unsigned long re; + unsigned long mod; +}; + + +#endif /* _UAPI__ASM_SH_PTRACE_32_H */ diff --git a/arch/sh/include/uapi/asm/ptrace_64.h b/arch/sh/include/uapi/asm/ptrace_64.h new file mode 100644 index 00000000000..0e52ee83e94 --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace_64.h @@ -0,0 +1,14 @@ +#ifndef _UAPI__ASM_SH_PTRACE_64_H +#define _UAPI__ASM_SH_PTRACE_64_H + +struct pt_regs { + unsigned long long pc; + unsigned long long sr; + long long syscall_nr; + unsigned long long regs[63]; + unsigned long long tregs[8]; + unsigned long long pad[2]; +}; + + +#endif /* _UAPI__ASM_SH_PTRACE_64_H */ diff --git a/arch/sh/include/uapi/asm/setup.h b/arch/sh/include/uapi/asm/setup.h new file mode 100644 index 00000000000..552df83f1a4 --- /dev/null +++ b/arch/sh/include/uapi/asm/setup.h @@ -0,0 +1 @@ +#include <asm-generic/setup.h> diff --git a/arch/sh/include/asm/sigcontext.h b/arch/sh/include/uapi/asm/sigcontext.h index 8ce1435bc0b..8ce1435bc0b 100644 --- a/arch/sh/include/asm/sigcontext.h +++ b/arch/sh/include/uapi/asm/sigcontext.h diff --git a/arch/sh/include/asm/signal.h b/arch/sh/include/uapi/asm/signal.h index 9ac530a90bc..9ac530a90bc 100644 --- a/arch/sh/include/asm/signal.h +++ b/arch/sh/include/uapi/asm/signal.h diff --git a/arch/sh/include/asm/sockios.h b/arch/sh/include/uapi/asm/sockios.h index cf8b96b1f9a..cf8b96b1f9a 100644 --- a/arch/sh/include/asm/sockios.h +++ b/arch/sh/include/uapi/asm/sockios.h diff --git a/arch/sh/include/asm/stat.h b/arch/sh/include/uapi/asm/stat.h index e1810cc6e3d..e1810cc6e3d 100644 --- a/arch/sh/include/asm/stat.h +++ b/arch/sh/include/uapi/asm/stat.h diff --git a/arch/sh/include/asm/swab.h b/arch/sh/include/uapi/asm/swab.h index 1cd09767a7a..1cd09767a7a 100644 --- a/arch/sh/include/asm/swab.h +++ b/arch/sh/include/uapi/asm/swab.h diff --git a/arch/sh/include/uapi/asm/types.h b/arch/sh/include/uapi/asm/types.h new file mode 100644 index 00000000000..b9e79bc580d --- /dev/null +++ b/arch/sh/include/uapi/asm/types.h @@ -0,0 +1 @@ +#include <asm-generic/types.h> diff --git a/arch/sh/include/uapi/asm/unistd.h b/arch/sh/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..eeef88dd53c --- /dev/null +++ b/arch/sh/include/uapi/asm/unistd.h @@ -0,0 +1,7 @@ +#ifndef __KERNEL__ +# ifdef __SH5__ +# include <asm/unistd_64.h> +# else +# include <asm/unistd_32.h> +# endif +#endif diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h index 72fd1e06100..9e465f246dc 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/uapi/asm/unistd_32.h @@ -378,7 +378,8 @@ #define __NR_setns 364 #define __NR_process_vm_readv 365 #define __NR_process_vm_writev 366 +#define __NR_kcmp 367 -#define NR_syscalls 367 +#define NR_syscalls 368 #endif /* __ASM_SH_UNISTD_32_H */ diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/uapi/asm/unistd_64.h index a28edc32969..8e3a2edd284 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/uapi/asm/unistd_64.h @@ -398,7 +398,8 @@ #define __NR_setns 375 #define __NR_process_vm_readv 376 #define __NR_process_vm_writev 377 +#define __NR_kcmp 378 -#define NR_syscalls 378 +#define NR_syscalls 379 #endif /* __ASM_SH_UNISTD_64_H */ |