diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-30 07:38:34 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-04-30 07:38:43 -0400 |
commit | 4e83be7b24ba4fe40acf0b967bd6ae8c9ac79bde (patch) | |
tree | 2f900726b0e3c6c3e4eb9e84227d9eed5fa93097 /arch | |
parent | 2f972202315cf71fd60e890ebbed7d5bcf620ba4 (diff) |
[S390] Move show_regs to traps.c.
This is where it should be and we can get rid of some externs
and a static inline function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/process.c | 18 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 26 |
2 files changed, 22 insertions, 22 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index c1aff194141d..7920861109d2 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -180,24 +180,6 @@ void cpu_idle(void) | |||
180 | } | 180 | } |
181 | } | 181 | } |
182 | 182 | ||
183 | void show_regs(struct pt_regs *regs) | ||
184 | { | ||
185 | print_modules(); | ||
186 | printk("CPU: %d %s %s %.*s\n", | ||
187 | task_thread_info(current)->cpu, print_tainted(), | ||
188 | init_utsname()->release, | ||
189 | (int)strcspn(init_utsname()->version, " "), | ||
190 | init_utsname()->version); | ||
191 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | ||
192 | current->comm, current->pid, current, | ||
193 | (void *) current->thread.ksp); | ||
194 | show_registers(regs); | ||
195 | /* Show stack backtrace if pt_regs is from kernel mode */ | ||
196 | if (!(regs->psw.mask & PSW_MASK_PSTATE)) | ||
197 | show_trace(NULL, (unsigned long *) regs->gprs[15]); | ||
198 | show_last_breaking_event(regs); | ||
199 | } | ||
200 | |||
201 | extern void kernel_thread_starter(void); | 183 | extern void kernel_thread_starter(void); |
202 | 184 | ||
203 | asm( | 185 | asm( |
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 | { |