Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
4e83be7b 2f972202

+22 -31
-18
arch/s390/kernel/process.c
··· 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 183 extern void kernel_thread_starter(void); 202 184 203 185 asm(
+22 -4
arch/s390/kernel/traps.c
··· 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 118 register unsigned long __r15 asm ("15"); 119 119 unsigned long sp; ··· 161 161 show_trace(task, sp); 162 162 } 163 163 164 - #ifdef CONFIG_64BIT 165 - void show_last_breaking_event(struct pt_regs *regs) 164 + static void show_last_breaking_event(struct pt_regs *regs) 166 165 { 166 + #ifdef CONFIG_64BIT 167 167 printk("Last Breaking-Event-Address:\n"); 168 168 printk(" [<%016lx>] ", regs->args[0] & PSW_ADDR_INSN); 169 169 print_symbol("%s\n", regs->args[0] & PSW_ADDR_INSN); 170 - } 171 170 #endif 171 + } 172 172 173 173 /* 174 174 * The architecture-independent dump_stack generator ··· 222 222 223 223 show_code(regs); 224 224 } 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 + } 225 243 226 244 /* This is called from fs/proc/array.c */ 227 245 void task_show_regs(struct seq_file *m, struct task_struct *task)
-9
include/asm-s390/processor.h
··· 172 172 */ 173 173 extern void task_show_regs(struct seq_file *m, struct task_struct *task); 174 174 175 - extern void show_registers(struct pt_regs *regs); 176 175 extern void show_code(struct pt_regs *regs); 177 - extern void show_trace(struct task_struct *task, unsigned long *sp); 178 - #ifdef CONFIG_64BIT 179 - extern void show_last_breaking_event(struct pt_regs *regs); 180 - #else 181 - static inline void show_last_breaking_event(struct pt_regs *regs) 182 - { 183 - } 184 - #endif 185 176 186 177 unsigned long get_wchan(struct task_struct *p); 187 178 #define task_pt_regs(tsk) ((struct pt_regs *) \