diff options
Diffstat (limited to 'arch/s390/kernel/traps.c')
-rw-r--r-- | arch/s390/kernel/traps.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 57b607b61100..4584d81984c0 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -113,7 +113,7 @@ __show_trace(unsigned long sp, unsigned long low, unsigned long high) | |||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | void show_trace(struct task_struct *task, unsigned long *stack) | 116 | static void show_trace(struct task_struct *task, unsigned long *stack) |
117 | { | 117 | { |
118 | register unsigned long __r15 asm ("15"); | 118 | register unsigned long __r15 asm ("15"); |
119 | unsigned long sp; | 119 | unsigned long sp; |
@@ -161,14 +161,14 @@ void show_stack(struct task_struct *task, unsigned long *sp) | |||
161 | show_trace(task, sp); | 161 | show_trace(task, sp); |
162 | } | 162 | } |
163 | 163 | ||
164 | #ifdef CONFIG_64BIT | 164 | static void show_last_breaking_event(struct pt_regs *regs) |
165 | void show_last_breaking_event(struct pt_regs *regs) | ||
166 | { | 165 | { |
166 | #ifdef CONFIG_64BIT | ||
167 | printk("Last Breaking-Event-Address:\n"); | 167 | printk("Last Breaking-Event-Address:\n"); |
168 | printk(" [<%016lx>] ", regs->args[0] & PSW_ADDR_INSN); | 168 | printk(" [<%016lx>] ", regs->args[0] & PSW_ADDR_INSN); |
169 | print_symbol("%s\n", regs->args[0] & PSW_ADDR_INSN); | 169 | print_symbol("%s\n", regs->args[0] & PSW_ADDR_INSN); |
170 | } | ||
171 | #endif | 170 | #endif |
171 | } | ||
172 | 172 | ||
173 | /* | 173 | /* |
174 | * The architecture-independent dump_stack generator | 174 | * The architecture-independent dump_stack generator |
@@ -223,6 +223,24 @@ void show_registers(struct pt_regs *regs) | |||
223 | show_code(regs); | 223 | show_code(regs); |
224 | } | 224 | } |
225 | 225 | ||
226 | void show_regs(struct pt_regs *regs) | ||
227 | { | ||
228 | print_modules(); | ||
229 | printk("CPU: %d %s %s %.*s\n", | ||
230 | task_thread_info(current)->cpu, print_tainted(), | ||
231 | init_utsname()->release, | ||
232 | (int)strcspn(init_utsname()->version, " "), | ||
233 | init_utsname()->version); | ||
234 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | ||
235 | current->comm, current->pid, current, | ||
236 | (void *) current->thread.ksp); | ||
237 | show_registers(regs); | ||
238 | /* Show stack backtrace if pt_regs is from kernel mode */ | ||
239 | if (!(regs->psw.mask & PSW_MASK_PSTATE)) | ||
240 | show_trace(NULL, (unsigned long *) regs->gprs[15]); | ||
241 | show_last_breaking_event(regs); | ||
242 | } | ||
243 | |||
226 | /* This is called from fs/proc/array.c */ | 244 | /* This is called from fs/proc/array.c */ |
227 | void task_show_regs(struct seq_file *m, struct task_struct *task) | 245 | void task_show_regs(struct seq_file *m, struct task_struct *task) |
228 | { | 246 | { |