diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-01-30 07:33:25 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:25 -0500 |
commit | a5ff677c2fb10567d1e750fb9e4417d95081071b (patch) | |
tree | db7be4151a8aefcb4078843046f44a11df2e0746 /arch/x86/kernel/traps_64.c | |
parent | 625d6cffcac1c96faa18d629f1271d63af0e05f2 (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.c | 11 |
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 | ||
101 | int kstack_depth_to_print = 12; | 101 | int kstack_depth_to_print = 12; |
102 | 102 | ||
103 | #ifdef CONFIG_KALLSYMS | ||
104 | void printk_address(unsigned long address, int reliable) | 103 | void 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 |
128 | void 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 | ||
134 | static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | 131 | static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, |
135 | unsigned *usedp, char **idp) | 132 | unsigned *usedp, char **idp) |