summaryrefslogtreecommitdiff
path: root/arch/sh/include
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-21 20:28:25 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2009-08-21 20:28:25 (GMT)
commite115f2c17cbceee93b34d787a7a4a867fc73e7b4 (patch)
tree6ee0f20dcb5eca29793d68e97242c5e483c24cfc /arch/sh/include
parentc153a58e715e16ffcd6c4b3da7fc6b4a556bf917 (diff)
downloadlinux-e115f2c17cbceee93b34d787a7a4a867fc73e7b4.tar.xz
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.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
index b7d9822..23c5504 100644
--- a/arch/sh/include/asm/bug.h
+++ b/arch/sh/include/asm/bug.h
@@ -1,8 +1,8 @@
#ifndef __ASM_SH_BUG_H
#define __ASM_SH_BUG_H
-#define TRAPA_UNWINDER_BUG_OPCODE 0xc33b /* trapa #0x3b */
#define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */
+#define BUGFLAG_UNWINDER (1 << 1)
#ifdef CONFIG_GENERIC_BUG
#define HAVE_ARCH_BUG
@@ -73,15 +73,16 @@ do { \
unlikely(__ret_warn_on); \
})
-#define UNWINDER_BUG() \
+#define UNWINDER_BUG() \
do { \
__asm__ __volatile__ ( \
"1:\t.short %O0\n" \
- _EMIT_BUG_ENTRY \
+ _EMIT_BUG_ENTRY \
: \
- : "n" (TRAPA_UNWINDER_BUG_OPCODE), \
+ : "n" (TRAPA_BUG_OPCODE), \
"i" (__FILE__), \
- "i" (__LINE__), "i" (0), \
+ "i" (__LINE__), \
+ "i" (BUGFLAG_UNWINDER), \
"i" (sizeof(struct bug_entry))); \
} while (0)