aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps_64.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-01-30 07:33:25 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:25 -0500
commita5ff677c2fb10567d1e750fb9e4417d95081071b (patch)
treedb7be4151a8aefcb4078843046f44a11df2e0746 /arch/x86/kernel/traps_64.c
parent625d6cffcac1c96faa18d629f1271d63af0e05f2 (diff)
x86: make printk_address available on X86_32
Small fomatting fixes to 64-bit as well, trailing whitespace and extra semicolon, also move the ifdefs for CONFIG_KALLSYMS into the function itself. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/traps_64.c')
-rw-r--r--arch/x86/kernel/traps_64.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 4aa4520f9499..4ea727869ded 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -100,15 +100,15 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
100 100
101int kstack_depth_to_print = 12; 101int kstack_depth_to_print = 12;
102 102
103#ifdef CONFIG_KALLSYMS
104void printk_address(unsigned long address, int reliable) 103void printk_address(unsigned long address, int reliable)
105{ 104{
105#ifdef CONFIG_KALLSYMS
106 unsigned long offset = 0, symsize; 106 unsigned long offset = 0, symsize;
107 const char *symname; 107 const char *symname;
108 char *modname; 108 char *modname;
109 char *delim = ":"; 109 char *delim = ":";
110 char namebuf[128]; 110 char namebuf[128];
111 char reliab[4] = "";; 111 char reliab[4] = "";
112 112
113 symname = kallsyms_lookup(address, &symsize, &offset, 113 symname = kallsyms_lookup(address, &symsize, &offset,
114 &modname, namebuf); 114 &modname, namebuf);
@@ -120,16 +120,13 @@ void printk_address(unsigned long address, int reliable)
120 strcpy(reliab, "? "); 120 strcpy(reliab, "? ");
121 121
122 if (!modname) 122 if (!modname)
123 modname = delim = ""; 123 modname = delim = "";
124 printk(" [<%016lx>] %s%s%s%s%s+0x%lx/0x%lx\n", 124 printk(" [<%016lx>] %s%s%s%s%s+0x%lx/0x%lx\n",
125 address, reliab, delim, modname, delim, symname, offset, symsize); 125 address, reliab, delim, modname, delim, symname, offset, symsize);
126}
127#else 126#else
128void printk_address(unsigned long address, int reliable)
129{
130 printk(" [<%016lx>]\n", address); 127 printk(" [<%016lx>]\n", address);
131}
132#endif 128#endif
129}
133 130
134static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, 131static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
135 unsigned *usedp, char **idp) 132 unsigned *usedp, char **idp)