diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-09 02:57:27 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:42 -0500 |
commit | 33f242ed11ce6b5fbe73fe4ece7ef4bc2f4e2851 (patch) | |
tree | a5312fd61d92c66a27c07d6cdb25721ed17334f3 /include | |
parent | fe51bc9eaf45253bd437907ed04031a93640ca69 (diff) |
sh: SH-5 pt_regs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sh/ptrace.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h index b9789c8b4d15..a83a7b45ba6f 100644 --- a/include/asm-sh/ptrace.h +++ b/include/asm-sh/ptrace.h | |||
@@ -5,7 +5,16 @@ | |||
5 | * Copyright (C) 1999, 2000 Niibe Yutaka | 5 | * Copyright (C) 1999, 2000 Niibe Yutaka |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | #if defined(__SH5__) || defined(CONFIG_SUPERH64) | |
9 | struct pt_regs { | ||
10 | unsigned long long pc; | ||
11 | unsigned long long sr; | ||
12 | unsigned long long syscall_nr; | ||
13 | unsigned long long regs[63]; | ||
14 | unsigned long long tregs[8]; | ||
15 | unsigned long long pad[2]; | ||
16 | }; | ||
17 | #else | ||
9 | /* | 18 | /* |
10 | * GCC defines register number like this: | 19 | * GCC defines register number like this: |
11 | * ----------------------------- | 20 | * ----------------------------- |
@@ -28,7 +37,7 @@ | |||
28 | 37 | ||
29 | #define REG_PR 17 | 38 | #define REG_PR 17 |
30 | #define REG_SR 18 | 39 | #define REG_SR 18 |
31 | #define REG_GBR 19 | 40 | #define REG_GBR 19 |
32 | #define REG_MACH 20 | 41 | #define REG_MACH 20 |
33 | #define REG_MACL 21 | 42 | #define REG_MACL 21 |
34 | 43 | ||
@@ -80,10 +89,14 @@ struct pt_dspregs { | |||
80 | 89 | ||
81 | #define PTRACE_GETDSPREGS 55 | 90 | #define PTRACE_GETDSPREGS 55 |
82 | #define PTRACE_SETDSPREGS 56 | 91 | #define PTRACE_SETDSPREGS 56 |
92 | #endif | ||
83 | 93 | ||
84 | #ifdef __KERNEL__ | 94 | #ifdef __KERNEL__ |
85 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) | 95 | #include <asm/addrspace.h> |
86 | #define instruction_pointer(regs) ((regs)->pc) | 96 | |
97 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) | ||
98 | #define instruction_pointer(regs) ((regs)->pc) | ||
99 | |||
87 | extern void show_regs(struct pt_regs *); | 100 | extern void show_regs(struct pt_regs *); |
88 | 101 | ||
89 | #ifdef CONFIG_SH_DSP | 102 | #ifdef CONFIG_SH_DSP |
@@ -100,10 +113,13 @@ static inline unsigned long profile_pc(struct pt_regs *regs) | |||
100 | { | 113 | { |
101 | unsigned long pc = instruction_pointer(regs); | 114 | unsigned long pc = instruction_pointer(regs); |
102 | 115 | ||
103 | if (pc >= 0xa0000000UL && pc < 0xc0000000UL) | 116 | #ifdef P2SEG |
117 | if (pc >= P2SEG && pc < P3SEG) | ||
104 | pc -= 0x20000000; | 118 | pc -= 0x20000000; |
119 | #endif | ||
120 | |||
105 | return pc; | 121 | return pc; |
106 | } | 122 | } |
107 | #endif | 123 | #endif /* __KERNEL__ */ |
108 | 124 | ||
109 | #endif /* __ASM_SH_PTRACE_H */ | 125 | #endif /* __ASM_SH_PTRACE_H */ |