diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-20 04:08:06 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:50 -0500 |
commit | 5a4f7c66be981c6b5f44a4d66a14ea6ac9b7b6b0 (patch) | |
tree | a605424a32ce11d189a1aa1385c3fc22f972449f /include/asm-sh | |
parent | 811d50cb43eb730cc325df0c6913556e25739797 (diff) |
sh: Share bug/debug traps across _32 and _64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/ptrace.h | 2 | ||||
-rw-r--r-- | include/asm-sh/system.h | 25 | ||||
-rw-r--r-- | include/asm-sh/types.h | 6 |
3 files changed, 26 insertions, 7 deletions
diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h index a83a7b45ba6f..8d6c92b3e770 100644 --- a/include/asm-sh/ptrace.h +++ b/include/asm-sh/ptrace.h | |||
@@ -95,7 +95,7 @@ struct pt_dspregs { | |||
95 | #include <asm/addrspace.h> | 95 | #include <asm/addrspace.h> |
96 | 96 | ||
97 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) | 97 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) |
98 | #define instruction_pointer(regs) ((regs)->pc) | 98 | #define instruction_pointer(regs) ((unsigned long)(regs)->pc) |
99 | 99 | ||
100 | extern void show_regs(struct pt_regs *); | 100 | extern void show_regs(struct pt_regs *); |
101 | 101 | ||
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 0cfa96aa5844..6b02dfd587ea 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -185,12 +185,25 @@ void default_idle(void); | |||
185 | void per_cpu_trap_init(void); | 185 | void per_cpu_trap_init(void); |
186 | 186 | ||
187 | asmlinkage void break_point_trap(void); | 187 | asmlinkage void break_point_trap(void); |
188 | asmlinkage void debug_trap_handler(unsigned long r4, unsigned long r5, | 188 | |
189 | unsigned long r6, unsigned long r7, | 189 | #ifdef CONFIG_SUPERH32 |
190 | struct pt_regs __regs); | 190 | #define BUILD_TRAP_HANDLER(name) \ |
191 | asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5, | 191 | asmlinkage void name##_trap_handler(unsigned long r4, unsigned long r5, \ |
192 | unsigned long r6, unsigned long r7, | 192 | unsigned long r6, unsigned long r7, \ |
193 | struct pt_regs __regs); | 193 | struct pt_regs __regs) |
194 | |||
195 | #define TRAP_HANDLER_DECL \ | ||
196 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); \ | ||
197 | unsigned int vec = regs->tra; | ||
198 | #else | ||
199 | #define BUILD_TRAP_HANDLER(name) \ | ||
200 | asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs) | ||
201 | #define TRAP_HANDLER_DECL | ||
202 | #endif | ||
203 | |||
204 | BUILD_TRAP_HANDLER(address_error); | ||
205 | BUILD_TRAP_HANDLER(debug); | ||
206 | BUILD_TRAP_HANDLER(bug); | ||
194 | 207 | ||
195 | #define arch_align_stack(x) (x) | 208 | #define arch_align_stack(x) (x) |
196 | 209 | ||
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index 7ba69d9707ef..a6e1d4126e67 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h | |||
@@ -52,6 +52,12 @@ typedef unsigned long long u64; | |||
52 | 52 | ||
53 | typedef u32 dma_addr_t; | 53 | typedef u32 dma_addr_t; |
54 | 54 | ||
55 | #ifdef CONFIG_SUPERH32 | ||
56 | typedef u16 opcode_t; | ||
57 | #else | ||
58 | typedef u32 opcode_t; | ||
59 | #endif | ||
60 | |||
55 | #endif /* __ASSEMBLY__ */ | 61 | #endif /* __ASSEMBLY__ */ |
56 | 62 | ||
57 | #endif /* __KERNEL__ */ | 63 | #endif /* __KERNEL__ */ |