aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/sysrq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/sysrq.c')
-rw-r--r--arch/um/kernel/sysrq.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c
index 93263571d813..56d43d0a3960 100644
--- a/arch/um/kernel/sysrq.c
+++ b/arch/um/kernel/sysrq.c
@@ -1,38 +1,37 @@
1/* 1/*
2 * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/sched.h" 6#include <linux/kallsyms.h>
7#include "linux/kernel.h" 7#include <linux/kernel.h>
8#include "linux/module.h" 8#include <linux/module.h>
9#include "linux/kallsyms.h" 9#include <linux/sched.h>
10#include "asm/page.h"
11#include "asm/processor.h"
12#include "sysrq.h" 10#include "sysrq.h"
13 11
14/* Catch non-i386 SUBARCH's. */ 12/* Catch non-i386 SUBARCH's. */
15#if !defined(CONFIG_UML_X86) || defined(CONFIG_64BIT) 13#if !defined(CONFIG_UML_X86) || defined(CONFIG_64BIT)
16void show_trace(struct task_struct *task, unsigned long * stack) 14void show_trace(struct task_struct *task, unsigned long * stack)
17{ 15{
18 unsigned long addr; 16 unsigned long addr;
19 17
20 if (!stack) { 18 if (!stack) {
21 stack = (unsigned long*) &stack; 19 stack = (unsigned long*) &stack;
22 WARN_ON(1); 20 WARN_ON(1);
23 } 21 }
24 22
25 printk("Call Trace: \n"); 23 printk(KERN_INFO "Call Trace: \n");
26 while (((long) stack & (THREAD_SIZE-1)) != 0) { 24 while (((long) stack & (THREAD_SIZE-1)) != 0) {
27 addr = *stack; 25 addr = *stack;
28 if (__kernel_text_address(addr)) { 26 if (__kernel_text_address(addr)) {
29 printk("%08lx: [<%08lx>]", (unsigned long) stack, addr); 27 printk(KERN_INFO "%08lx: [<%08lx>]",
30 print_symbol(" %s", addr); 28 (unsigned long) stack, addr);
31 printk("\n"); 29 print_symbol(KERN_CONT " %s", addr);
32 } 30 printk(KERN_CONT "\n");
33 stack++; 31 }
34 } 32 stack++;
35 printk("\n"); 33 }
34 printk(KERN_INFO "\n");
36} 35}
37#endif 36#endif
38 37
@@ -67,14 +66,13 @@ void show_stack(struct task_struct *task, unsigned long *esp)
67 } 66 }
68 67
69 stack = esp; 68 stack = esp;
70 for(i = 0; i < kstack_depth_to_print; i++) { 69 for (i = 0; i < kstack_depth_to_print; i++) {
71 if (kstack_end(stack)) 70 if (kstack_end(stack))
72 break; 71 break;
73 if (i && ((i % 8) == 0)) 72 if (i && ((i % 8) == 0))
74 printk("\n "); 73 printk("\n" KERN_INFO " ");
75 printk("%08lx ", *stack++); 74 printk("%08lx ", *stack++);
76 } 75 }
77 76
78 printk("Call Trace: \n");
79 show_trace(task, esp); 77 show_trace(task, esp);
80} 78}