aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-20 04:08:06 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:18:50 -0500
commit5a4f7c66be981c6b5f44a4d66a14ea6ac9b7b6b0 (patch)
treea605424a32ce11d189a1aa1385c3fc22f972449f /include
parent811d50cb43eb730cc325df0c6913556e25739797 (diff)
sh: Share bug/debug traps across _32 and _64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sh/ptrace.h2
-rw-r--r--include/asm-sh/system.h25
-rw-r--r--include/asm-sh/types.h6
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
100extern void show_regs(struct pt_regs *); 100extern 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);
185void per_cpu_trap_init(void); 185void per_cpu_trap_init(void);
186 186
187asmlinkage void break_point_trap(void); 187asmlinkage void break_point_trap(void);
188asmlinkage 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) \
191asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5, 191asmlinkage 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) \
200asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs)
201#define TRAP_HANDLER_DECL
202#endif
203
204BUILD_TRAP_HANDLER(address_error);
205BUILD_TRAP_HANDLER(debug);
206BUILD_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
53typedef u32 dma_addr_t; 53typedef u32 dma_addr_t;
54 54
55#ifdef CONFIG_SUPERH32
56typedef u16 opcode_t;
57#else
58typedef u32 opcode_t;
59#endif
60
55#endif /* __ASSEMBLY__ */ 61#endif /* __ASSEMBLY__ */
56 62
57#endif /* __KERNEL__ */ 63#endif /* __KERNEL__ */