diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-05-14 00:04:08 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-05-14 00:04:08 -0400 |
commit | f007688a50cf5724049a4a5f17023fcdb0966b54 (patch) | |
tree | ea073ce3675a1ebd56699381f5cac75d263abf88 /arch/sh/include/asm/traps_64.h | |
parent | dbdb4e9f3fd4914caba6f102e62eef23920ab1f4 (diff) |
sh64: Provide EXPEVT helper.
We need a lookup_exception_vector() helper for sh64 in order to use the
common page fault code.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/traps_64.h')
-rw-r--r-- | arch/sh/include/asm/traps_64.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sh/include/asm/traps_64.h b/arch/sh/include/asm/traps_64.h index c52d7f9a06c1..ef5eff919449 100644 --- a/arch/sh/include/asm/traps_64.h +++ b/arch/sh/include/asm/traps_64.h | |||
@@ -10,8 +10,22 @@ | |||
10 | #ifndef __ASM_SH_TRAPS_64_H | 10 | #ifndef __ASM_SH_TRAPS_64_H |
11 | #define __ASM_SH_TRAPS_64_H | 11 | #define __ASM_SH_TRAPS_64_H |
12 | 12 | ||
13 | #include <cpu/registers.h> | ||
14 | |||
13 | extern void phys_stext(void); | 15 | extern void phys_stext(void); |
14 | 16 | ||
17 | #define lookup_exception_vector() \ | ||
18 | ({ \ | ||
19 | unsigned long _vec; \ | ||
20 | \ | ||
21 | __asm__ __volatile__ ( \ | ||
22 | "getcon " __EXPEVT ", %0\n\t" \ | ||
23 | : "=r" (_vec) \ | ||
24 | ); \ | ||
25 | \ | ||
26 | _vec; \ | ||
27 | }) | ||
28 | |||
15 | static inline void trigger_address_error(void) | 29 | static inline void trigger_address_error(void) |
16 | { | 30 | { |
17 | phys_stext(); | 31 | phys_stext(); |