diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 16:28:25 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 16:28:25 -0400 |
commit | e115f2c17cbceee93b34d787a7a4a867fc73e7b4 (patch) | |
tree | 6ee0f20dcb5eca29793d68e97242c5e483c24cfc /arch/sh/include | |
parent | c153a58e715e16ffcd6c4b3da7fc6b4a556bf917 (diff) |
sh: unwinder: Use a special bug flag for unwinder traps.
This simplifies the unwinder trap handling, dropping the use of the
special trapa vector and simply piggybacking on top of the BUG support. A
new BUGFLAG_UNWINDER is added for flagging the unwinder fault, before
continuing on with regular BUG dispatch.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/bug.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h index b7d9822fd6c2..23c5504a3a01 100644 --- a/arch/sh/include/asm/bug.h +++ b/arch/sh/include/asm/bug.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef __ASM_SH_BUG_H | 1 | #ifndef __ASM_SH_BUG_H |
2 | #define __ASM_SH_BUG_H | 2 | #define __ASM_SH_BUG_H |
3 | 3 | ||
4 | #define TRAPA_UNWINDER_BUG_OPCODE 0xc33b /* trapa #0x3b */ | ||
5 | #define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */ | 4 | #define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */ |
5 | #define BUGFLAG_UNWINDER (1 << 1) | ||
6 | 6 | ||
7 | #ifdef CONFIG_GENERIC_BUG | 7 | #ifdef CONFIG_GENERIC_BUG |
8 | #define HAVE_ARCH_BUG | 8 | #define HAVE_ARCH_BUG |
@@ -73,15 +73,16 @@ do { \ | |||
73 | unlikely(__ret_warn_on); \ | 73 | unlikely(__ret_warn_on); \ |
74 | }) | 74 | }) |
75 | 75 | ||
76 | #define UNWINDER_BUG() \ | 76 | #define UNWINDER_BUG() \ |
77 | do { \ | 77 | do { \ |
78 | __asm__ __volatile__ ( \ | 78 | __asm__ __volatile__ ( \ |
79 | "1:\t.short %O0\n" \ | 79 | "1:\t.short %O0\n" \ |
80 | _EMIT_BUG_ENTRY \ | 80 | _EMIT_BUG_ENTRY \ |
81 | : \ | 81 | : \ |
82 | : "n" (TRAPA_UNWINDER_BUG_OPCODE), \ | 82 | : "n" (TRAPA_BUG_OPCODE), \ |
83 | "i" (__FILE__), \ | 83 | "i" (__FILE__), \ |
84 | "i" (__LINE__), "i" (0), \ | 84 | "i" (__LINE__), \ |
85 | "i" (BUGFLAG_UNWINDER), \ | ||
85 | "i" (sizeof(struct bug_entry))); \ | 86 | "i" (sizeof(struct bug_entry))); \ |
86 | } while (0) | 87 | } while (0) |
87 | 88 | ||