diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-01-26 08:11:01 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-01-26 08:11:12 -0500 |
commit | 5c699714d01ac358c58be9943234081b36b69cdd (patch) | |
tree | feaae46fcc1b120d1ed1ef0a04567a56f0df0cfd /arch/s390/kernel/traps.c | |
parent | 5fd9c6e214547a32d3da6ee4284c79004d667bc8 (diff) |
[S390] Print kernel version in dump_stack() and show_regs().
Also print PREEMPT and/or SMP if the kernel was configured that way.
Makes s390 look a bit more like other architectures.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/traps.c')
-rw-r--r-- | arch/s390/kernel/traps.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 8ed16a83fba..52b8342c6bf 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/reboot.h> | 31 | #include <linux/reboot.h> |
32 | #include <linux/kprobes.h> | 32 | #include <linux/kprobes.h> |
33 | #include <linux/bug.h> | 33 | #include <linux/bug.h> |
34 | #include <linux/utsname.h> | ||
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
35 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
@@ -168,9 +169,16 @@ void show_stack(struct task_struct *task, unsigned long *sp) | |||
168 | */ | 169 | */ |
169 | void dump_stack(void) | 170 | void dump_stack(void) |
170 | { | 171 | { |
172 | printk("CPU: %d %s %s %.*s\n", | ||
173 | task_thread_info(current)->cpu, print_tainted(), | ||
174 | init_utsname()->release, | ||
175 | (int)strcspn(init_utsname()->version, " "), | ||
176 | init_utsname()->version); | ||
177 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | ||
178 | current->comm, current->pid, current, | ||
179 | (void *) current->thread.ksp); | ||
171 | show_stack(NULL, NULL); | 180 | show_stack(NULL, NULL); |
172 | } | 181 | } |
173 | |||
174 | EXPORT_SYMBOL(dump_stack); | 182 | EXPORT_SYMBOL(dump_stack); |
175 | 183 | ||
176 | static inline int mask_bits(struct pt_regs *regs, unsigned long bits) | 184 | static inline int mask_bits(struct pt_regs *regs, unsigned long bits) |
@@ -258,8 +266,14 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
258 | console_verbose(); | 266 | console_verbose(); |
259 | spin_lock_irq(&die_lock); | 267 | spin_lock_irq(&die_lock); |
260 | bust_spinlocks(1); | 268 | bust_spinlocks(1); |
261 | printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); | 269 | printk("%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter); |
262 | print_modules(); | 270 | #ifdef CONFIG_PREEMPT |
271 | printk("PREEMPT "); | ||
272 | #endif | ||
273 | #ifdef CONFIG_SMP | ||
274 | printk("SMP"); | ||
275 | #endif | ||
276 | printk("\n"); | ||
263 | notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV); | 277 | notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV); |
264 | show_regs(regs); | 278 | show_regs(regs); |
265 | bust_spinlocks(0); | 279 | bust_spinlocks(0); |