diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/process.c | 18 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 20 |
2 files changed, 27 insertions, 11 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 29f7884b4ffa..0e7aca039307 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/notifier.h> | 38 | #include <linux/notifier.h> |
39 | 39 | #include <linux/utsname.h> | |
40 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
41 | #include <asm/pgtable.h> | 41 | #include <asm/pgtable.h> |
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
@@ -182,13 +182,15 @@ void cpu_idle(void) | |||
182 | 182 | ||
183 | void show_regs(struct pt_regs *regs) | 183 | void show_regs(struct pt_regs *regs) |
184 | { | 184 | { |
185 | struct task_struct *tsk = current; | 185 | print_modules(); |
186 | 186 | printk("CPU: %d %s %s %.*s\n", | |
187 | printk("CPU: %d %s\n", task_thread_info(tsk)->cpu, print_tainted()); | 187 | task_thread_info(current)->cpu, print_tainted(), |
188 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | 188 | init_utsname()->release, |
189 | current->comm, task_pid_nr(current), (void *) tsk, | 189 | (int)strcspn(init_utsname()->version, " "), |
190 | (void *) tsk->thread.ksp); | 190 | init_utsname()->version); |
191 | 191 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | |
192 | current->comm, current->pid, current, | ||
193 | (void *) current->thread.ksp); | ||
192 | show_registers(regs); | 194 | show_registers(regs); |
193 | /* Show stack backtrace if pt_regs is from kernel mode */ | 195 | /* Show stack backtrace if pt_regs is from kernel mode */ |
194 | if (!(regs->psw.mask & PSW_MASK_PSTATE)) | 196 | if (!(regs->psw.mask & PSW_MASK_PSTATE)) |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 8ed16a83fba7..52b8342c6bf2 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); |