summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2018-01-22 04:40:50 -0500
committerPetr Mladek <pmladek@suse.com>2018-01-22 04:40:50 -0500
commit51ccbb0ae865e153c43117e6c3244fa373ea6bd6 (patch)
tree4bfa54ad5ec0542f24627971d937166960c32723
parent3ccdc5190f8df12dfafff9264e406c5496401da5 (diff)
parentd2279c9d7f7db7f97567368bfc4539b3411adf8d (diff)
Merge branch 'for-4.16-print-symbol' into for-4.16
-rw-r--r--Documentation/filesystems/sysfs.txt4
-rw-r--r--Documentation/translations/zh_CN/filesystems/sysfs.txt4
-rw-r--r--arch/arm/kernel/process.c5
-rw-r--r--arch/arm64/kernel/process.c5
-rw-r--r--arch/c6x/kernel/traps.c4
-rw-r--r--arch/ia64/kernel/process.c10
-rw-r--r--arch/mn10300/kernel/traps.c4
-rw-r--r--arch/sh/kernel/process_32.c5
-rw-r--r--arch/unicore32/kernel/process.c5
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c3
-rw-r--r--arch/x86/mm/mmio-mod.c5
-rw-r--r--drivers/base/core.c5
-rw-r--r--fs/sysfs/file.c5
-rw-r--r--include/linux/kallsyms.h18
-rw-r--r--kernel/irq/debug.h14
-rw-r--r--kernel/kallsyms.c11
-rw-r--r--lib/smp_processor_id.c3
17 files changed, 31 insertions, 79 deletions
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 9a3658cc399e..a1426cabcef1 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -154,8 +154,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
154 if (dev_attr->show) 154 if (dev_attr->show)
155 ret = dev_attr->show(dev, dev_attr, buf); 155 ret = dev_attr->show(dev, dev_attr, buf);
156 if (ret >= (ssize_t)PAGE_SIZE) { 156 if (ret >= (ssize_t)PAGE_SIZE) {
157 print_symbol("dev_attr_show: %s returned bad count\n", 157 printk("dev_attr_show: %pS returned bad count\n",
158 (unsigned long)dev_attr->show); 158 dev_attr->show);
159 } 159 }
160 return ret; 160 return ret;
161} 161}
diff --git a/Documentation/translations/zh_CN/filesystems/sysfs.txt b/Documentation/translations/zh_CN/filesystems/sysfs.txt
index 7d3b05edb8ce..452271dda141 100644
--- a/Documentation/translations/zh_CN/filesystems/sysfs.txt
+++ b/Documentation/translations/zh_CN/filesystems/sysfs.txt
@@ -167,8 +167,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
167 if (dev_attr->show) 167 if (dev_attr->show)
168 ret = dev_attr->show(dev, dev_attr, buf); 168 ret = dev_attr->show(dev, dev_attr, buf);
169 if (ret >= (ssize_t)PAGE_SIZE) { 169 if (ret >= (ssize_t)PAGE_SIZE) {
170 print_symbol("dev_attr_show: %s returned bad count\n", 170 printk("dev_attr_show: %pS returned bad count\n",
171 (unsigned long)dev_attr->show); 171 dev_attr->show);
172 } 172 }
173 return ret; 173 return ret;
174} 174}
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index d96714e1858c..1523cb18b109 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -21,7 +21,6 @@
21#include <linux/unistd.h> 21#include <linux/unistd.h>
22#include <linux/user.h> 22#include <linux/user.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/kallsyms.h>
25#include <linux/init.h> 24#include <linux/init.h>
26#include <linux/elfcore.h> 25#include <linux/elfcore.h>
27#include <linux/pm.h> 26#include <linux/pm.h>
@@ -121,8 +120,8 @@ void __show_regs(struct pt_regs *regs)
121 120
122 show_regs_print_info(KERN_DEFAULT); 121 show_regs_print_info(KERN_DEFAULT);
123 122
124 print_symbol("PC is at %s\n", instruction_pointer(regs)); 123 printk("PC is at %pS\n", (void *)instruction_pointer(regs));
125 print_symbol("LR is at %s\n", regs->ARM_lr); 124 printk("LR is at %pS\n", (void *)regs->ARM_lr);
126 printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n", 125 printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n",
127 regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr); 126 regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr);
128 printk("sp : %08lx ip : %08lx fp : %08lx\n", 127 printk("sp : %08lx ip : %08lx fp : %08lx\n",
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index b2adcce7bc18..37c9470cbdaa 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -35,7 +35,6 @@
35#include <linux/delay.h> 35#include <linux/delay.h>
36#include <linux/reboot.h> 36#include <linux/reboot.h>
37#include <linux/interrupt.h> 37#include <linux/interrupt.h>
38#include <linux/kallsyms.h>
39#include <linux/init.h> 38#include <linux/init.h>
40#include <linux/cpu.h> 39#include <linux/cpu.h>
41#include <linux/elfcore.h> 40#include <linux/elfcore.h>
@@ -221,8 +220,8 @@ void __show_regs(struct pt_regs *regs)
221 220
222 show_regs_print_info(KERN_DEFAULT); 221 show_regs_print_info(KERN_DEFAULT);
223 print_pstate(regs); 222 print_pstate(regs);
224 print_symbol("pc : %s\n", regs->pc); 223 printk("pc : %pS\n", (void *)regs->pc);
225 print_symbol("lr : %s\n", lr); 224 printk("lr : %pS\n", (void *)lr);
226 printk("sp : %016llx\n", sp); 225 printk("sp : %016llx\n", sp);
227 226
228 i = top_reg; 227 i = top_reg;
diff --git a/arch/c6x/kernel/traps.c b/arch/c6x/kernel/traps.c
index 09b8a40d5680..4c1d4b84dd2b 100644
--- a/arch/c6x/kernel/traps.c
+++ b/arch/c6x/kernel/traps.c
@@ -11,7 +11,6 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/ptrace.h> 12#include <linux/ptrace.h>
13#include <linux/sched/debug.h> 13#include <linux/sched/debug.h>
14#include <linux/kallsyms.h>
15#include <linux/bug.h> 14#include <linux/bug.h>
16 15
17#include <asm/soc.h> 16#include <asm/soc.h>
@@ -375,8 +374,7 @@ static void show_trace(unsigned long *stack, unsigned long *endstack)
375 if (i % 5 == 0) 374 if (i % 5 == 0)
376 pr_debug("\n "); 375 pr_debug("\n ");
377#endif 376#endif
378 pr_debug(" [<%08lx>]", addr); 377 pr_debug(" [<%08lx>] %pS\n", addr, (void *)addr);
379 print_symbol(" %s\n", addr);
380 i++; 378 i++;
381 } 379 }
382 } 380 }
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index dda0082056b3..968b5f33e725 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -13,7 +13,6 @@
13#include <linux/pm.h> 13#include <linux/pm.h>
14#include <linux/elf.h> 14#include <linux/elf.h>
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/kallsyms.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
19#include <linux/slab.h> 18#include <linux/slab.h>
@@ -69,7 +68,6 @@ void
69ia64_do_show_stack (struct unw_frame_info *info, void *arg) 68ia64_do_show_stack (struct unw_frame_info *info, void *arg)
70{ 69{
71 unsigned long ip, sp, bsp; 70 unsigned long ip, sp, bsp;
72 char buf[128]; /* don't make it so big that it overflows the stack! */
73 71
74 printk("\nCall Trace:\n"); 72 printk("\nCall Trace:\n");
75 do { 73 do {
@@ -79,11 +77,9 @@ ia64_do_show_stack (struct unw_frame_info *info, void *arg)
79 77
80 unw_get_sp(info, &sp); 78 unw_get_sp(info, &sp);
81 unw_get_bsp(info, &bsp); 79 unw_get_bsp(info, &bsp);
82 snprintf(buf, sizeof(buf), 80 printk(" [<%016lx>] %pS\n"
83 " [<%016lx>] %%s\n"
84 " sp=%016lx bsp=%016lx\n", 81 " sp=%016lx bsp=%016lx\n",
85 ip, sp, bsp); 82 ip, (void *)ip, sp, bsp);
86 print_symbol(buf, ip);
87 } while (unw_unwind(info) >= 0); 83 } while (unw_unwind(info) >= 0);
88} 84}
89 85
@@ -111,7 +107,7 @@ show_regs (struct pt_regs *regs)
111 printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n", 107 printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n",
112 regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(), 108 regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(),
113 init_utsname()->release); 109 init_utsname()->release);
114 print_symbol("ip is at %s\n", ip); 110 printk("ip is at %pS\n", (void *)ip);
115 printk("unat: %016lx pfs : %016lx rsc : %016lx\n", 111 printk("unat: %016lx pfs : %016lx rsc : %016lx\n",
116 regs->ar_unat, regs->ar_pfs, regs->ar_rsc); 112 regs->ar_unat, regs->ar_pfs, regs->ar_rsc);
117 printk("rnat: %016lx bsps: %016lx pr : %016lx\n", 113 printk("rnat: %016lx bsps: %016lx pr : %016lx\n",
diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c
index 800fd0801969..72d1015b2ae7 100644
--- a/arch/mn10300/kernel/traps.c
+++ b/arch/mn10300/kernel/traps.c
@@ -22,7 +22,6 @@
22#include <linux/delay.h> 22#include <linux/delay.h>
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/kallsyms.h>
26#include <linux/pci.h> 25#include <linux/pci.h>
27#include <linux/kdebug.h> 26#include <linux/kdebug.h>
28#include <linux/bug.h> 27#include <linux/bug.h>
@@ -262,8 +261,7 @@ void show_trace(unsigned long *sp)
262 raslot = ULONG_MAX; 261 raslot = ULONG_MAX;
263 else 262 else
264 printk(" ?"); 263 printk(" ?");
265 print_symbol(" %s", addr); 264 printk(" %pS\n", (void *)addr);
266 printk("\n");
267 } 265 }
268 } 266 }
269 267
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 2c7bdf8cb934..93522069cb15 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -20,7 +20,6 @@
20#include <linux/sched/task_stack.h> 20#include <linux/sched/task_stack.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/elfcore.h> 22#include <linux/elfcore.h>
23#include <linux/kallsyms.h>
24#include <linux/fs.h> 23#include <linux/fs.h>
25#include <linux/ftrace.h> 24#include <linux/ftrace.h>
26#include <linux/hw_breakpoint.h> 25#include <linux/hw_breakpoint.h>
@@ -37,8 +36,8 @@ void show_regs(struct pt_regs * regs)
37 printk("\n"); 36 printk("\n");
38 show_regs_print_info(KERN_DEFAULT); 37 show_regs_print_info(KERN_DEFAULT);
39 38
40 print_symbol("PC is at %s\n", instruction_pointer(regs)); 39 printk("PC is at %pS\n", (void *)instruction_pointer(regs));
41 print_symbol("PR is at %s\n", regs->pr); 40 printk("PR is at %pS\n", (void *)regs->pr);
42 41
43 printk("PC : %08lx SP : %08lx SR : %08lx ", 42 printk("PC : %08lx SP : %08lx SR : %08lx ",
44 regs->pc, regs->regs[15], regs->sr); 43 regs->pc, regs->regs[15], regs->sr);
diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c
index ddaf78ae6854..2bc10b8e9cf4 100644
--- a/arch/unicore32/kernel/process.c
+++ b/arch/unicore32/kernel/process.c
@@ -23,7 +23,6 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/reboot.h> 24#include <linux/reboot.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/kallsyms.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/cpu.h> 27#include <linux/cpu.h>
29#include <linux/elfcore.h> 28#include <linux/elfcore.h>
@@ -139,8 +138,8 @@ void __show_regs(struct pt_regs *regs)
139 char buf[64]; 138 char buf[64];
140 139
141 show_regs_print_info(KERN_DEFAULT); 140 show_regs_print_info(KERN_DEFAULT);
142 print_symbol("PC is at %s\n", instruction_pointer(regs)); 141 printk("PC is at %pS\n", (void *)instruction_pointer(regs));
143 print_symbol("LR is at %s\n", regs->UCreg_lr); 142 printk("LR is at %pS\n", (void *)regs->UCreg_lr);
144 printk(KERN_DEFAULT "pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n" 143 printk(KERN_DEFAULT "pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
145 "sp : %08lx ip : %08lx fp : %08lx\n", 144 "sp : %08lx ip : %08lx fp : %08lx\n",
146 regs->UCreg_pc, regs->UCreg_lr, regs->UCreg_asr, 145 regs->UCreg_pc, regs->UCreg_lr, regs->UCreg_asr,
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index b1d616d08eee..8ca8f6eb32db 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -14,7 +14,6 @@
14#include <linux/capability.h> 14#include <linux/capability.h>
15#include <linux/miscdevice.h> 15#include <linux/miscdevice.h>
16#include <linux/ratelimit.h> 16#include <linux/ratelimit.h>
17#include <linux/kallsyms.h>
18#include <linux/rcupdate.h> 17#include <linux/rcupdate.h>
19#include <linux/kobject.h> 18#include <linux/kobject.h>
20#include <linux/uaccess.h> 19#include <linux/uaccess.h>
@@ -235,7 +234,7 @@ static void __print_mce(struct mce *m)
235 m->cs, m->ip); 234 m->cs, m->ip);
236 235
237 if (m->cs == __KERNEL_CS) 236 if (m->cs == __KERNEL_CS)
238 print_symbol("{%s}", m->ip); 237 pr_cont("{%pS}", (void *)m->ip);
239 pr_cont("\n"); 238 pr_cont("\n");
240 } 239 }
241 240
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index 4d434ddb75db..2c1ecf4763c4 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -29,7 +29,6 @@
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/uaccess.h> 30#include <linux/uaccess.h>
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/kallsyms.h>
33#include <asm/pgtable.h> 32#include <asm/pgtable.h>
34#include <linux/mmiotrace.h> 33#include <linux/mmiotrace.h>
35#include <asm/e820/api.h> /* for ISA_START_ADDRESS */ 34#include <asm/e820/api.h> /* for ISA_START_ADDRESS */
@@ -123,8 +122,8 @@ static void die_kmmio_nesting_error(struct pt_regs *regs, unsigned long addr)
123 pr_emerg("unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx\n", 122 pr_emerg("unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx\n",
124 addr, my_reason->addr); 123 addr, my_reason->addr);
125 print_pte(addr); 124 print_pte(addr);
126 print_symbol(KERN_EMERG "faulting IP is at %s\n", regs->ip); 125 pr_emerg("faulting IP is at %pS\n", (void *)regs->ip);
127 print_symbol(KERN_EMERG "last faulting IP was at %s\n", my_reason->ip); 126 pr_emerg("last faulting IP was at %pS\n", (void *)my_reason->ip);
128#ifdef __i386__ 127#ifdef __i386__
129 pr_emerg("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", 128 pr_emerg("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n",
130 regs->ax, regs->bx, regs->cx, regs->dx); 129 regs->ax, regs->bx, regs->cx, regs->dx);
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 110230d86527..409298942d5a 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -22,7 +22,6 @@
22#include <linux/of.h> 22#include <linux/of.h>
23#include <linux/of_device.h> 23#include <linux/of_device.h>
24#include <linux/genhd.h> 24#include <linux/genhd.h>
25#include <linux/kallsyms.h>
26#include <linux/mutex.h> 25#include <linux/mutex.h>
27#include <linux/pm_runtime.h> 26#include <linux/pm_runtime.h>
28#include <linux/netdevice.h> 27#include <linux/netdevice.h>
@@ -687,8 +686,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
687 if (dev_attr->show) 686 if (dev_attr->show)
688 ret = dev_attr->show(dev, dev_attr, buf); 687 ret = dev_attr->show(dev, dev_attr, buf);
689 if (ret >= (ssize_t)PAGE_SIZE) { 688 if (ret >= (ssize_t)PAGE_SIZE) {
690 print_symbol("dev_attr_show: %s returned bad count\n", 689 printk("dev_attr_show: %pS returned bad count\n",
691 (unsigned long)dev_attr->show); 690 dev_attr->show);
692 } 691 }
693 return ret; 692 return ret;
694} 693}
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 39c75a86c67f..bfcbe486d385 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/kobject.h> 14#include <linux/kobject.h>
15#include <linux/kallsyms.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include <linux/list.h> 16#include <linux/list.h>
18#include <linux/mutex.h> 17#include <linux/mutex.h>
@@ -70,8 +69,8 @@ static int sysfs_kf_seq_show(struct seq_file *sf, void *v)
70 * indicate truncated result or overflow in normal use cases. 69 * indicate truncated result or overflow in normal use cases.
71 */ 70 */
72 if (count >= (ssize_t)PAGE_SIZE) { 71 if (count >= (ssize_t)PAGE_SIZE) {
73 print_symbol("fill_read_buffer: %s returned bad count\n", 72 printk("fill_read_buffer: %pS returned bad count\n",
74 (unsigned long)ops->show); 73 ops->show);
75 /* Try to struggle along */ 74 /* Try to struggle along */
76 count = PAGE_SIZE - 1; 75 count = PAGE_SIZE - 1;
77 } 76 }
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index e4f2e5a65f14..7574b1db483d 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -100,9 +100,6 @@ extern int sprint_symbol(char *buffer, unsigned long address);
100extern int sprint_symbol_no_offset(char *buffer, unsigned long address); 100extern int sprint_symbol_no_offset(char *buffer, unsigned long address);
101extern int sprint_backtrace(char *buffer, unsigned long address); 101extern int sprint_backtrace(char *buffer, unsigned long address);
102 102
103/* Look up a kernel symbol and print it to the kernel messages. */
104extern void __print_symbol(const char *fmt, unsigned long address);
105
106int lookup_symbol_name(unsigned long addr, char *symname); 103int lookup_symbol_name(unsigned long addr, char *symname);
107int lookup_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name); 104int lookup_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
108 105
@@ -172,23 +169,8 @@ static inline int kallsyms_show_value(void)
172 return false; 169 return false;
173} 170}
174 171
175/* Stupid that this does nothing, but I didn't create this mess. */
176#define __print_symbol(fmt, addr)
177#endif /*CONFIG_KALLSYMS*/ 172#endif /*CONFIG_KALLSYMS*/
178 173
179/* This macro allows us to keep printk typechecking */
180static __printf(1, 2)
181void __check_printsym_format(const char *fmt, ...)
182{
183}
184
185static inline void print_symbol(const char *fmt, unsigned long addr)
186{
187 __check_printsym_format(fmt, "");
188 __print_symbol(fmt, (unsigned long)
189 __builtin_extract_return_addr((void *)addr));
190}
191
192static inline void print_ip_sym(unsigned long ip) 174static inline void print_ip_sym(unsigned long ip)
193{ 175{
194 printk("[<%p>] %pS\n", (void *) ip, (void *) ip); 176 printk("[<%p>] %pS\n", (void *) ip, (void *) ip);
diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h
index 17f05ef8f575..7e06dd275c17 100644
--- a/kernel/irq/debug.h
+++ b/kernel/irq/debug.h
@@ -3,8 +3,6 @@
3 * Debugging printout: 3 * Debugging printout:
4 */ 4 */
5 5
6#include <linux/kallsyms.h>
7
8#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f) 6#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
9#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f) 7#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
10/* FIXME */ 8/* FIXME */
@@ -14,14 +12,14 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
14{ 12{
15 printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n", 13 printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
16 irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled); 14 irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
17 printk("->handle_irq(): %p, ", desc->handle_irq); 15 printk("->handle_irq(): %p, %pS\n",
18 print_symbol("%s\n", (unsigned long)desc->handle_irq); 16 desc->handle_irq, desc->handle_irq);
19 printk("->irq_data.chip(): %p, ", desc->irq_data.chip); 17 printk("->irq_data.chip(): %p, %pS\n",
20 print_symbol("%s\n", (unsigned long)desc->irq_data.chip); 18 desc->irq_data.chip, desc->irq_data.chip);
21 printk("->action(): %p\n", desc->action); 19 printk("->action(): %p\n", desc->action);
22 if (desc->action) { 20 if (desc->action) {
23 printk("->action->handler(): %p, ", desc->action->handler); 21 printk("->action->handler(): %p, %pS\n",
24 print_symbol("%s\n", (unsigned long)desc->action->handler); 22 desc->action->handler, desc->action->handler);
25 } 23 }
26 24
27 ___P(IRQ_LEVEL); 25 ___P(IRQ_LEVEL);
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 0e4c0922908a..05082eab736b 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -429,17 +429,6 @@ int sprint_backtrace(char *buffer, unsigned long address)
429 return __sprint_symbol(buffer, address, -1, 1); 429 return __sprint_symbol(buffer, address, -1, 1);
430} 430}
431 431
432/* Look up a kernel symbol and print it to the kernel messages. */
433void __print_symbol(const char *fmt, unsigned long address)
434{
435 char buffer[KSYM_SYMBOL_LEN];
436
437 sprint_symbol(buffer, address);
438
439 printk(fmt, buffer);
440}
441EXPORT_SYMBOL(__print_symbol);
442
443/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */ 432/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */
444struct kallsym_iter { 433struct kallsym_iter {
445 loff_t pos; 434 loff_t pos;
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 835cc6df2776..85925aaa4fff 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -5,7 +5,6 @@
5 * DEBUG_PREEMPT variant of smp_processor_id(). 5 * DEBUG_PREEMPT variant of smp_processor_id().
6 */ 6 */
7#include <linux/export.h> 7#include <linux/export.h>
8#include <linux/kallsyms.h>
9#include <linux/sched.h> 8#include <linux/sched.h>
10 9
11notrace static unsigned int check_preemption_disabled(const char *what1, 10notrace static unsigned int check_preemption_disabled(const char *what1,
@@ -43,7 +42,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
43 printk(KERN_ERR "BUG: using %s%s() in preemptible [%08x] code: %s/%d\n", 42 printk(KERN_ERR "BUG: using %s%s() in preemptible [%08x] code: %s/%d\n",
44 what1, what2, preempt_count() - 1, current->comm, current->pid); 43 what1, what2, preempt_count() - 1, current->comm, current->pid);
45 44
46 print_symbol("caller is %s\n", (long)__builtin_return_address(0)); 45 printk("caller is %pS\n", __builtin_return_address(0));
47 dump_stack(); 46 dump_stack();
48 47
49out_enable: 48out_enable: