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/system.h | |
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/system.h')
-rw-r--r-- | include/asm-sh/system.h | 25 |
1 files changed, 19 insertions, 6 deletions
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 | ||