diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2008-10-16 01:01:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:29 -0400 |
commit | 9791af55b5edb44d89608b9934a0022e7a27f625 (patch) | |
tree | 9bb9ffa8e927879e8aefb81afdb6398a0406ea5f /arch/h8300/kernel | |
parent | 81d423e280d193d351f41eacdb3f82c3bb9610c1 (diff) |
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 4fd7138a6e03..cfc9127d2ced 100644 --- a/arch/h8300/kernel/module.c +++ b/arch/h8300/kernel/module.c | |||
@@ -114,9 +114,10 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
114 | const Elf_Shdr *sechdrs, | 114 | const Elf_Shdr *sechdrs, |
115 | struct module *me) | 115 | struct module *me) |
116 | { | 116 | { |
117 | return 0; | 117 | return module_bug_finalize(hdr, sechdrs, me); |
118 | } | 118 | } |
119 | 119 | ||
120 | void module_arch_cleanup(struct module *mod) | 120 | void module_arch_cleanup(struct module *mod) |
121 | { | 121 | { |
122 | module_bug_cleanup(mod); | ||
122 | } | 123 | } |
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index f8f7d7ea97f1..3c0b66bc669e 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c | |||
@@ -20,12 +20,14 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/bug.h> | ||
23 | 24 | ||
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
25 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
26 | #include <asm/traps.h> | 27 | #include <asm/traps.h> |
27 | #include <asm/page.h> | 28 | #include <asm/page.h> |
28 | #include <asm/gpio.h> | 29 | |
30 | static DEFINE_SPINLOCK(die_lock); | ||
29 | 31 | ||
30 | /* | 32 | /* |
31 | * this must be called very early as the kernel might | 33 | * this must be called very early as the kernel might |
@@ -94,16 +96,19 @@ static void dump(struct pt_regs *fp) | |||
94 | printk("\n\n"); | 96 | printk("\n\n"); |
95 | } | 97 | } |
96 | 98 | ||
97 | void die_if_kernel (char *str, struct pt_regs *fp, int nr) | 99 | void die(char *str, struct pt_regs *fp, unsigned long err) |
98 | { | 100 | { |
99 | extern int console_loglevel; | 101 | static int diecount; |
100 | 102 | ||
101 | if (!(fp->ccr & PS_S)) | 103 | oops_enter(); |
102 | return; | ||
103 | 104 | ||
104 | console_loglevel = 15; | 105 | console_verbose(); |
106 | spin_lock_irq(&die_lock); | ||
107 | report_bug(fp->pc, fp); | ||
108 | printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++diecount); | ||
105 | dump(fp); | 109 | dump(fp); |
106 | 110 | ||
111 | spin_unlock_irq(&die_lock); | ||
107 | do_exit(SIGSEGV); | 112 | do_exit(SIGSEGV); |
108 | } | 113 | } |
109 | 114 | ||