···11#ifndef __ASM_SH_PTRACE_32_H22#define __ASM_SH_PTRACE_32_H3344-/*55- * GCC defines register number like this:66- * -----------------------------77- * 0 - 15 are integer registers88- * 17 - 22 are control/special registers99- * 24 - 39 fp registers1010- * 40 - 47 xd registers1111- * 48 - fpscr register1212- * -----------------------------1313- *1414- * We follows above, except:1515- * 16 --- program counter (PC)1616- * 22 --- syscall #1717- * 23 --- floating point communication register1818- */1919-#define REG_REG0 02020-#define REG_REG15 1544+#include <uapi/asm/ptrace_32.h>2152222-#define REG_PC 162323-2424-#define REG_PR 172525-#define REG_SR 182626-#define REG_GBR 192727-#define REG_MACH 202828-#define REG_MACL 212929-3030-#define REG_SYSCALL 223131-3232-#define REG_FPREG0 233333-#define REG_FPREG15 383434-#define REG_XFREG0 393535-#define REG_XFREG15 543636-3737-#define REG_FPSCR 553838-#define REG_FPUL 563939-4040-/*4141- * This struct defines the way the registers are stored on the4242- * kernel stack during a system call or other kernel entry.4343- */4444-struct pt_regs {4545- unsigned long regs[16];4646- unsigned long pc;4747- unsigned long pr;4848- unsigned long sr;4949- unsigned long gbr;5050- unsigned long mach;5151- unsigned long macl;5252- long tra;5353-};5454-5555-/*5656- * This struct defines the way the DSP registers are stored on the5757- * kernel stack during a system call or other kernel entry.5858- */5959-struct pt_dspregs {6060- unsigned long a1;6161- unsigned long a0g;6262- unsigned long a1g;6363- unsigned long m0;6464- unsigned long m1;6565- unsigned long a0;6666- unsigned long x0;6767- unsigned long x1;6868- unsigned long y0;6969- unsigned long y1;7070- unsigned long dsr;7171- unsigned long rs;7272- unsigned long re;7373- unsigned long mod;7474-};7575-7676-#ifdef __KERNEL__776787#define MAX_REG_OFFSET offsetof(struct pt_regs, tra)798static inline long regs_return_value(struct pt_regs *regs)809{8110 return regs->regs[0];8211}8383-8484-#endif /* __KERNEL__ */85128613#endif /* __ASM_SH_PTRACE_32_H */
+1-11
arch/sh/include/asm/ptrace_64.h
···11#ifndef __ASM_SH_PTRACE_64_H22#define __ASM_SH_PTRACE_64_H3344-struct pt_regs {55- unsigned long long pc;66- unsigned long long sr;77- long long syscall_nr;88- unsigned long long regs[63];99- unsigned long long tregs[8];1010- unsigned long long pad[2];1111-};44+#include <uapi/asm/ptrace_64.h>1251313-#ifdef __KERNEL__146157#define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7])168static inline long regs_return_value(struct pt_regs *regs)179{1810 return regs->regs[3];1911}2020-2121-#endif /* __KERNEL__ */22122313#endif /* __ASM_SH_PTRACE_64_H */
+1-4
arch/sh/include/asm/setup.h
···11#ifndef _SH_SETUP_H22#define _SH_SETUP_H3344-#include <asm-generic/setup.h>44+#include <uapi/asm/setup.h>5566-#ifdef __KERNEL__76/*87 * This is set up by the setup-routine at boot-time98 */···2021void sh_mv_setup(void);2122void check_for_initrd(void);2223void per_cpu_trap_init(void);2323-2424-#endif /* __KERNEL__ */25242625#endif /* _SH_SETUP_H */
···11+#ifndef _UAPI__ASM_SH_PTRACE_32_H22+#define _UAPI__ASM_SH_PTRACE_32_H33+44+/*55+ * GCC defines register number like this:66+ * -----------------------------77+ * 0 - 15 are integer registers88+ * 17 - 22 are control/special registers99+ * 24 - 39 fp registers1010+ * 40 - 47 xd registers1111+ * 48 - fpscr register1212+ * -----------------------------1313+ *1414+ * We follows above, except:1515+ * 16 --- program counter (PC)1616+ * 22 --- syscall #1717+ * 23 --- floating point communication register1818+ */1919+#define REG_REG0 02020+#define REG_REG15 152121+2222+#define REG_PC 162323+2424+#define REG_PR 172525+#define REG_SR 182626+#define REG_GBR 192727+#define REG_MACH 202828+#define REG_MACL 212929+3030+#define REG_SYSCALL 223131+3232+#define REG_FPREG0 233333+#define REG_FPREG15 383434+#define REG_XFREG0 393535+#define REG_XFREG15 543636+3737+#define REG_FPSCR 553838+#define REG_FPUL 563939+4040+/*4141+ * This struct defines the way the registers are stored on the4242+ * kernel stack during a system call or other kernel entry.4343+ */4444+struct pt_regs {4545+ unsigned long regs[16];4646+ unsigned long pc;4747+ unsigned long pr;4848+ unsigned long sr;4949+ unsigned long gbr;5050+ unsigned long mach;5151+ unsigned long macl;5252+ long tra;5353+};5454+5555+/*5656+ * This struct defines the way the DSP registers are stored on the5757+ * kernel stack during a system call or other kernel entry.5858+ */5959+struct pt_dspregs {6060+ unsigned long a1;6161+ unsigned long a0g;6262+ unsigned long a1g;6363+ unsigned long m0;6464+ unsigned long m1;6565+ unsigned long a0;6666+ unsigned long x0;6767+ unsigned long x1;6868+ unsigned long y0;6969+ unsigned long y1;7070+ unsigned long dsr;7171+ unsigned long rs;7272+ unsigned long re;7373+ unsigned long mod;7474+};7575+7676+7777+#endif /* _UAPI__ASM_SH_PTRACE_32_H */
+14
arch/sh/include/uapi/asm/ptrace_64.h
···11+#ifndef _UAPI__ASM_SH_PTRACE_64_H22+#define _UAPI__ASM_SH_PTRACE_64_H33+44+struct pt_regs {55+ unsigned long long pc;66+ unsigned long long sr;77+ long long syscall_nr;88+ unsigned long long regs[63];99+ unsigned long long tregs[8];1010+ unsigned long long pad[2];1111+};1212+1313+1414+#endif /* _UAPI__ASM_SH_PTRACE_64_H */