diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2008-10-15 22:01:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 11:21:29 -0700 |
commit | 9791af55b5edb44d89608b9934a0022e7a27f625 (patch) | |
tree | 9bb9ffa8e927879e8aefb81afdb6398a0406ea5f /arch/h8300/kernel | |
parent | 81d423e280d193d351f41eacdb3f82c3bb9610c1 (diff) | |
download | op-kernel-dev-9791af55b5edb44d89608b9934a0022e7a27f625.zip op-kernel-dev-9791af55b5edb44d89608b9934a0022e7a27f625.tar.gz |
h8300: GENERIC_BUG support
CONFIG_GENERIC_BUG support.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/h8300/kernel')
-rw-r--r-- | arch/h8300/kernel/module.c | 3 | ||||
-rw-r--r-- | arch/h8300/kernel/traps.c | 17 |
2 files changed, 13 insertions, 7 deletions
diff --git a/arch/h8300/kernel/module.c b/arch/h8300/kernel/module.c index 4fd7138..cfc9127 100644 --- a/arch/h8300/kernel/module.c +++ b/arch/h8300/kernel/module.c @@ -114,9 +114,10 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) { - return 0; + return module_bug_finalize(hdr, sechdrs, me); } void module_arch_cleanup(struct module *mod) { + module_bug_cleanup(mod); } diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index f8f7d7ea..3c0b66b 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c @@ -20,12 +20,14 @@ #include <linux/errno.h> #include <linux/init.h> #include <linux/module.h> +#include <linux/bug.h> #include <asm/system.h> #include <asm/irq.h> #include <asm/traps.h> #include <asm/page.h> -#include <asm/gpio.h> + +static DEFINE_SPINLOCK(die_lock); /* * this must be called very early as the kernel might @@ -94,16 +96,19 @@ static void dump(struct pt_regs *fp) printk("\n\n"); } -void die_if_kernel (char *str, struct pt_regs *fp, int nr) +void die(char *str, struct pt_regs *fp, unsigned long err) { - extern int console_loglevel; + static int diecount; - if (!(fp->ccr & PS_S)) - return; + oops_enter(); - console_loglevel = 15; + console_verbose(); + spin_lock_irq(&die_lock); + report_bug(fp->pc, fp); + printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++diecount); dump(fp); + spin_unlock_irq(&die_lock); do_exit(SIGSEGV); } |