Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
51ccbb0a
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
51ccbb0a
编写于
1月 22, 2018
作者:
P
Petr Mladek
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-4.16-print-symbol' into for-4.16
上级
3ccdc519
d2279c9d
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
31 addition
and
79 deletion
+31
-79
Documentation/filesystems/sysfs.txt
Documentation/filesystems/sysfs.txt
+2
-2
Documentation/translations/zh_CN/filesystems/sysfs.txt
Documentation/translations/zh_CN/filesystems/sysfs.txt
+2
-2
arch/arm/kernel/process.c
arch/arm/kernel/process.c
+2
-3
arch/arm64/kernel/process.c
arch/arm64/kernel/process.c
+2
-3
arch/c6x/kernel/traps.c
arch/c6x/kernel/traps.c
+1
-3
arch/ia64/kernel/process.c
arch/ia64/kernel/process.c
+3
-7
arch/mn10300/kernel/traps.c
arch/mn10300/kernel/traps.c
+1
-3
arch/sh/kernel/process_32.c
arch/sh/kernel/process_32.c
+2
-3
arch/unicore32/kernel/process.c
arch/unicore32/kernel/process.c
+2
-3
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/mcheck/mce.c
+1
-2
arch/x86/mm/mmio-mod.c
arch/x86/mm/mmio-mod.c
+2
-3
drivers/base/core.c
drivers/base/core.c
+2
-3
fs/sysfs/file.c
fs/sysfs/file.c
+2
-3
include/linux/kallsyms.h
include/linux/kallsyms.h
+0
-18
kernel/irq/debug.h
kernel/irq/debug.h
+6
-8
kernel/kallsyms.c
kernel/kallsyms.c
+0
-11
lib/smp_processor_id.c
lib/smp_processor_id.c
+1
-2
未找到文件。
Documentation/filesystems/sysfs.txt
浏览文件 @
51ccbb0a
...
@@ -154,8 +154,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
...
@@ -154,8 +154,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
if (dev_attr->show)
if (dev_attr->show)
ret = dev_attr->show(dev, dev_attr, buf);
ret = dev_attr->show(dev, dev_attr, buf);
if (ret >= (ssize_t)PAGE_SIZE) {
if (ret >= (ssize_t)PAGE_SIZE) {
print
_symbol("dev_attr_show: %s
returned bad count\n",
print
k("dev_attr_show: %pS
returned bad count\n",
(unsigned long)
dev_attr->show);
dev_attr->show);
}
}
return ret;
return ret;
}
}
...
...
Documentation/translations/zh_CN/filesystems/sysfs.txt
浏览文件 @
51ccbb0a
...
@@ -167,8 +167,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
...
@@ -167,8 +167,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
if (dev_attr->show)
if (dev_attr->show)
ret = dev_attr->show(dev, dev_attr, buf);
ret = dev_attr->show(dev, dev_attr, buf);
if (ret >= (ssize_t)PAGE_SIZE) {
if (ret >= (ssize_t)PAGE_SIZE) {
print
_symbol("dev_attr_show: %s
returned bad count\n",
print
k("dev_attr_show: %pS
returned bad count\n",
(unsigned long)
dev_attr->show);
dev_attr->show);
}
}
return ret;
return ret;
}
}
...
...
arch/arm/kernel/process.c
浏览文件 @
51ccbb0a
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#include <linux/unistd.h>
#include <linux/unistd.h>
#include <linux/user.h>
#include <linux/user.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/elfcore.h>
#include <linux/elfcore.h>
#include <linux/pm.h>
#include <linux/pm.h>
...
@@ -121,8 +120,8 @@ void __show_regs(struct pt_regs *regs)
...
@@ -121,8 +120,8 @@ void __show_regs(struct pt_regs *regs)
show_regs_print_info
(
KERN_DEFAULT
);
show_regs_print_info
(
KERN_DEFAULT
);
print
_symbol
(
"PC is at %s
\n
"
,
instruction_pointer
(
regs
));
print
k
(
"PC is at %pS
\n
"
,
(
void
*
)
instruction_pointer
(
regs
));
print
_symbol
(
"LR is at %s
\n
"
,
regs
->
ARM_lr
);
print
k
(
"LR is at %pS
\n
"
,
(
void
*
)
regs
->
ARM_lr
);
printk
(
"pc : [<%08lx>] lr : [<%08lx>] psr: %08lx
\n
"
,
printk
(
"pc : [<%08lx>] lr : [<%08lx>] psr: %08lx
\n
"
,
regs
->
ARM_pc
,
regs
->
ARM_lr
,
regs
->
ARM_cpsr
);
regs
->
ARM_pc
,
regs
->
ARM_lr
,
regs
->
ARM_cpsr
);
printk
(
"sp : %08lx ip : %08lx fp : %08lx
\n
"
,
printk
(
"sp : %08lx ip : %08lx fp : %08lx
\n
"
,
...
...
arch/arm64/kernel/process.c
浏览文件 @
51ccbb0a
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/reboot.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/cpu.h>
#include <linux/elfcore.h>
#include <linux/elfcore.h>
...
@@ -221,8 +220,8 @@ void __show_regs(struct pt_regs *regs)
...
@@ -221,8 +220,8 @@ void __show_regs(struct pt_regs *regs)
show_regs_print_info
(
KERN_DEFAULT
);
show_regs_print_info
(
KERN_DEFAULT
);
print_pstate
(
regs
);
print_pstate
(
regs
);
print
_symbol
(
"pc : %s
\n
"
,
regs
->
pc
);
print
k
(
"pc : %pS
\n
"
,
(
void
*
)
regs
->
pc
);
print
_symbol
(
"lr : %s
\n
"
,
lr
);
print
k
(
"lr : %pS
\n
"
,
(
void
*
)
lr
);
printk
(
"sp : %016llx
\n
"
,
sp
);
printk
(
"sp : %016llx
\n
"
,
sp
);
i
=
top_reg
;
i
=
top_reg
;
...
...
arch/c6x/kernel/traps.c
浏览文件 @
51ccbb0a
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/ptrace.h>
#include <linux/sched/debug.h>
#include <linux/sched/debug.h>
#include <linux/kallsyms.h>
#include <linux/bug.h>
#include <linux/bug.h>
#include <asm/soc.h>
#include <asm/soc.h>
...
@@ -375,8 +374,7 @@ static void show_trace(unsigned long *stack, unsigned long *endstack)
...
@@ -375,8 +374,7 @@ static void show_trace(unsigned long *stack, unsigned long *endstack)
if
(
i
%
5
==
0
)
if
(
i
%
5
==
0
)
pr_debug
(
"
\n
"
);
pr_debug
(
"
\n
"
);
#endif
#endif
pr_debug
(
" [<%08lx>]"
,
addr
);
pr_debug
(
" [<%08lx>] %pS
\n
"
,
addr
,
(
void
*
)
addr
);
print_symbol
(
" %s
\n
"
,
addr
);
i
++
;
i
++
;
}
}
}
}
...
...
arch/ia64/kernel/process.c
浏览文件 @
51ccbb0a
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
#include <linux/pm.h>
#include <linux/pm.h>
#include <linux/elf.h>
#include <linux/elf.h>
#include <linux/errno.h>
#include <linux/errno.h>
#include <linux/kallsyms.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/slab.h>
...
@@ -69,7 +68,6 @@ void
...
@@ -69,7 +68,6 @@ void
ia64_do_show_stack
(
struct
unw_frame_info
*
info
,
void
*
arg
)
ia64_do_show_stack
(
struct
unw_frame_info
*
info
,
void
*
arg
)
{
{
unsigned
long
ip
,
sp
,
bsp
;
unsigned
long
ip
,
sp
,
bsp
;
char
buf
[
128
];
/* don't make it so big that it overflows the stack! */
printk
(
"
\n
Call Trace:
\n
"
);
printk
(
"
\n
Call Trace:
\n
"
);
do
{
do
{
...
@@ -79,11 +77,9 @@ ia64_do_show_stack (struct unw_frame_info *info, void *arg)
...
@@ -79,11 +77,9 @@ ia64_do_show_stack (struct unw_frame_info *info, void *arg)
unw_get_sp
(
info
,
&
sp
);
unw_get_sp
(
info
,
&
sp
);
unw_get_bsp
(
info
,
&
bsp
);
unw_get_bsp
(
info
,
&
bsp
);
snprintf
(
buf
,
sizeof
(
buf
),
printk
(
" [<%016lx>] %pS
\n
"
" [<%016lx>] %%s
\n
"
" sp=%016lx bsp=%016lx
\n
"
,
" sp=%016lx bsp=%016lx
\n
"
,
ip
,
sp
,
bsp
);
ip
,
(
void
*
)
ip
,
sp
,
bsp
);
print_symbol
(
buf
,
ip
);
}
while
(
unw_unwind
(
info
)
>=
0
);
}
while
(
unw_unwind
(
info
)
>=
0
);
}
}
...
@@ -111,7 +107,7 @@ show_regs (struct pt_regs *regs)
...
@@ -111,7 +107,7 @@ show_regs (struct pt_regs *regs)
printk
(
"psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)
\n
"
,
printk
(
"psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)
\n
"
,
regs
->
cr_ipsr
,
regs
->
cr_ifs
,
ip
,
print_tainted
(),
regs
->
cr_ipsr
,
regs
->
cr_ifs
,
ip
,
print_tainted
(),
init_utsname
()
->
release
);
init_utsname
()
->
release
);
print
_symbol
(
"ip is at %s
\n
"
,
ip
);
print
k
(
"ip is at %pS
\n
"
,
(
void
*
)
ip
);
printk
(
"unat: %016lx pfs : %016lx rsc : %016lx
\n
"
,
printk
(
"unat: %016lx pfs : %016lx rsc : %016lx
\n
"
,
regs
->
ar_unat
,
regs
->
ar_pfs
,
regs
->
ar_rsc
);
regs
->
ar_unat
,
regs
->
ar_pfs
,
regs
->
ar_rsc
);
printk
(
"rnat: %016lx bsps: %016lx pr : %016lx
\n
"
,
printk
(
"rnat: %016lx bsps: %016lx pr : %016lx
\n
"
,
...
...
arch/mn10300/kernel/traps.c
浏览文件 @
51ccbb0a
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/kdebug.h>
#include <linux/kdebug.h>
#include <linux/bug.h>
#include <linux/bug.h>
...
@@ -262,8 +261,7 @@ void show_trace(unsigned long *sp)
...
@@ -262,8 +261,7 @@ void show_trace(unsigned long *sp)
raslot
=
ULONG_MAX
;
raslot
=
ULONG_MAX
;
else
else
printk
(
" ?"
);
printk
(
" ?"
);
print_symbol
(
" %s"
,
addr
);
printk
(
" %pS
\n
"
,
(
void
*
)
addr
);
printk
(
"
\n
"
);
}
}
}
}
...
...
arch/sh/kernel/process_32.c
浏览文件 @
51ccbb0a
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include <linux/sched/task_stack.h>
#include <linux/sched/task_stack.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/elfcore.h>
#include <linux/elfcore.h>
#include <linux/kallsyms.h>
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/ftrace.h>
#include <linux/ftrace.h>
#include <linux/hw_breakpoint.h>
#include <linux/hw_breakpoint.h>
...
@@ -37,8 +36,8 @@ void show_regs(struct pt_regs * regs)
...
@@ -37,8 +36,8 @@ void show_regs(struct pt_regs * regs)
printk
(
"
\n
"
);
printk
(
"
\n
"
);
show_regs_print_info
(
KERN_DEFAULT
);
show_regs_print_info
(
KERN_DEFAULT
);
print
_symbol
(
"PC is at %s
\n
"
,
instruction_pointer
(
regs
));
print
k
(
"PC is at %pS
\n
"
,
(
void
*
)
instruction_pointer
(
regs
));
print
_symbol
(
"PR is at %s
\n
"
,
regs
->
pr
);
print
k
(
"PR is at %pS
\n
"
,
(
void
*
)
regs
->
pr
);
printk
(
"PC : %08lx SP : %08lx SR : %08lx "
,
printk
(
"PC : %08lx SP : %08lx SR : %08lx "
,
regs
->
pc
,
regs
->
regs
[
15
],
regs
->
sr
);
regs
->
pc
,
regs
->
regs
[
15
],
regs
->
sr
);
...
...
arch/unicore32/kernel/process.c
浏览文件 @
51ccbb0a
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/reboot.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/cpu.h>
#include <linux/elfcore.h>
#include <linux/elfcore.h>
...
@@ -139,8 +138,8 @@ void __show_regs(struct pt_regs *regs)
...
@@ -139,8 +138,8 @@ void __show_regs(struct pt_regs *regs)
char
buf
[
64
];
char
buf
[
64
];
show_regs_print_info
(
KERN_DEFAULT
);
show_regs_print_info
(
KERN_DEFAULT
);
print
_symbol
(
"PC is at %s
\n
"
,
instruction_pointer
(
regs
));
print
k
(
"PC is at %pS
\n
"
,
(
void
*
)
instruction_pointer
(
regs
));
print
_symbol
(
"LR is at %s
\n
"
,
regs
->
UCreg_lr
);
print
k
(
"LR is at %pS
\n
"
,
(
void
*
)
regs
->
UCreg_lr
);
printk
(
KERN_DEFAULT
"pc : [<%08lx>] lr : [<%08lx>] psr: %08lx
\n
"
printk
(
KERN_DEFAULT
"pc : [<%08lx>] lr : [<%08lx>] psr: %08lx
\n
"
"sp : %08lx ip : %08lx fp : %08lx
\n
"
,
"sp : %08lx ip : %08lx fp : %08lx
\n
"
,
regs
->
UCreg_pc
,
regs
->
UCreg_lr
,
regs
->
UCreg_asr
,
regs
->
UCreg_pc
,
regs
->
UCreg_lr
,
regs
->
UCreg_asr
,
...
...
arch/x86/kernel/cpu/mcheck/mce.c
浏览文件 @
51ccbb0a
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
#include <linux/capability.h>
#include <linux/capability.h>
#include <linux/miscdevice.h>
#include <linux/miscdevice.h>
#include <linux/ratelimit.h>
#include <linux/ratelimit.h>
#include <linux/kallsyms.h>
#include <linux/rcupdate.h>
#include <linux/rcupdate.h>
#include <linux/kobject.h>
#include <linux/kobject.h>
#include <linux/uaccess.h>
#include <linux/uaccess.h>
...
@@ -235,7 +234,7 @@ static void __print_mce(struct mce *m)
...
@@ -235,7 +234,7 @@ static void __print_mce(struct mce *m)
m
->
cs
,
m
->
ip
);
m
->
cs
,
m
->
ip
);
if
(
m
->
cs
==
__KERNEL_CS
)
if
(
m
->
cs
==
__KERNEL_CS
)
pr
int_symbol
(
"{%s}"
,
m
->
ip
);
pr
_cont
(
"{%pS}"
,
(
void
*
)
m
->
ip
);
pr_cont
(
"
\n
"
);
pr_cont
(
"
\n
"
);
}
}
...
...
arch/x86/mm/mmio-mod.c
浏览文件 @
51ccbb0a
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/io.h>
#include <linux/kallsyms.h>
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <linux/mmiotrace.h>
#include <linux/mmiotrace.h>
#include <asm/e820/api.h>
/* for ISA_START_ADDRESS */
#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,8 +122,8 @@ static void die_kmmio_nesting_error(struct pt_regs *regs, unsigned long addr)
pr_emerg
(
"unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx
\n
"
,
pr_emerg
(
"unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx
\n
"
,
addr
,
my_reason
->
addr
);
addr
,
my_reason
->
addr
);
print_pte
(
addr
);
print_pte
(
addr
);
pr
int_symbol
(
KERN_EMERG
"faulting IP is at %s
\n
"
,
regs
->
ip
);
pr
_emerg
(
"faulting IP is at %pS
\n
"
,
(
void
*
)
regs
->
ip
);
pr
int_symbol
(
KERN_EMERG
"last faulting IP was at %s
\n
"
,
my_reason
->
ip
);
pr
_emerg
(
"last faulting IP was at %pS
\n
"
,
(
void
*
)
my_reason
->
ip
);
#ifdef __i386__
#ifdef __i386__
pr_emerg
(
"eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx
\n
"
,
pr_emerg
(
"eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx
\n
"
,
regs
->
ax
,
regs
->
bx
,
regs
->
cx
,
regs
->
dx
);
regs
->
ax
,
regs
->
bx
,
regs
->
cx
,
regs
->
dx
);
...
...
drivers/base/core.c
浏览文件 @
51ccbb0a
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
#include <linux/of.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_device.h>
#include <linux/genhd.h>
#include <linux/genhd.h>
#include <linux/kallsyms.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
#include <linux/pm_runtime.h>
#include <linux/pm_runtime.h>
#include <linux/netdevice.h>
#include <linux/netdevice.h>
...
@@ -687,8 +686,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
...
@@ -687,8 +686,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
if
(
dev_attr
->
show
)
if
(
dev_attr
->
show
)
ret
=
dev_attr
->
show
(
dev
,
dev_attr
,
buf
);
ret
=
dev_attr
->
show
(
dev
,
dev_attr
,
buf
);
if
(
ret
>=
(
ssize_t
)
PAGE_SIZE
)
{
if
(
ret
>=
(
ssize_t
)
PAGE_SIZE
)
{
print
_symbol
(
"dev_attr_show: %s
returned bad count
\n
"
,
print
k
(
"dev_attr_show: %pS
returned bad count
\n
"
,
(
unsigned
long
)
dev_attr
->
show
);
dev_attr
->
show
);
}
}
return
ret
;
return
ret
;
}
}
...
...
fs/sysfs/file.c
浏览文件 @
51ccbb0a
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/kobject.h>
#include <linux/kobject.h>
#include <linux/kallsyms.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
...
@@ -70,8 +69,8 @@ static int sysfs_kf_seq_show(struct seq_file *sf, void *v)
...
@@ -70,8 +69,8 @@ static int sysfs_kf_seq_show(struct seq_file *sf, void *v)
* indicate truncated result or overflow in normal use cases.
* indicate truncated result or overflow in normal use cases.
*/
*/
if
(
count
>=
(
ssize_t
)
PAGE_SIZE
)
{
if
(
count
>=
(
ssize_t
)
PAGE_SIZE
)
{
print
_symbol
(
"fill_read_buffer: %s
returned bad count
\n
"
,
print
k
(
"fill_read_buffer: %pS
returned bad count
\n
"
,
(
unsigned
long
)
ops
->
show
);
ops
->
show
);
/* Try to struggle along */
/* Try to struggle along */
count
=
PAGE_SIZE
-
1
;
count
=
PAGE_SIZE
-
1
;
}
}
...
...
include/linux/kallsyms.h
浏览文件 @
51ccbb0a
...
@@ -100,9 +100,6 @@ extern int sprint_symbol(char *buffer, unsigned long address);
...
@@ -100,9 +100,6 @@ extern int sprint_symbol(char *buffer, unsigned long address);
extern
int
sprint_symbol_no_offset
(
char
*
buffer
,
unsigned
long
address
);
extern
int
sprint_symbol_no_offset
(
char
*
buffer
,
unsigned
long
address
);
extern
int
sprint_backtrace
(
char
*
buffer
,
unsigned
long
address
);
extern
int
sprint_backtrace
(
char
*
buffer
,
unsigned
long
address
);
/* Look up a kernel symbol and print it to the kernel messages. */
extern
void
__print_symbol
(
const
char
*
fmt
,
unsigned
long
address
);
int
lookup_symbol_name
(
unsigned
long
addr
,
char
*
symname
);
int
lookup_symbol_name
(
unsigned
long
addr
,
char
*
symname
);
int
lookup_symbol_attrs
(
unsigned
long
addr
,
unsigned
long
*
size
,
unsigned
long
*
offset
,
char
*
modname
,
char
*
name
);
int
lookup_symbol_attrs
(
unsigned
long
addr
,
unsigned
long
*
size
,
unsigned
long
*
offset
,
char
*
modname
,
char
*
name
);
...
@@ -172,23 +169,8 @@ static inline int kallsyms_show_value(void)
...
@@ -172,23 +169,8 @@ static inline int kallsyms_show_value(void)
return
false
;
return
false
;
}
}
/* Stupid that this does nothing, but I didn't create this mess. */
#define __print_symbol(fmt, addr)
#endif
/*CONFIG_KALLSYMS*/
#endif
/*CONFIG_KALLSYMS*/
/* This macro allows us to keep printk typechecking */
static
__printf
(
1
,
2
)
void
__check_printsym_format
(
const
char
*
fmt
,
...)
{
}
static
inline
void
print_symbol
(
const
char
*
fmt
,
unsigned
long
addr
)
{
__check_printsym_format
(
fmt
,
""
);
__print_symbol
(
fmt
,
(
unsigned
long
)
__builtin_extract_return_addr
((
void
*
)
addr
));
}
static
inline
void
print_ip_sym
(
unsigned
long
ip
)
static
inline
void
print_ip_sym
(
unsigned
long
ip
)
{
{
printk
(
"[<%p>] %pS
\n
"
,
(
void
*
)
ip
,
(
void
*
)
ip
);
printk
(
"[<%p>] %pS
\n
"
,
(
void
*
)
ip
,
(
void
*
)
ip
);
...
...
kernel/irq/debug.h
浏览文件 @
51ccbb0a
...
@@ -3,8 +3,6 @@
...
@@ -3,8 +3,6 @@
* Debugging printout:
* Debugging printout:
*/
*/
#include <linux/kallsyms.h>
#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
/* FIXME */
/* FIXME */
...
@@ -14,14 +12,14 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
...
@@ -14,14 +12,14 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
{
{
printk
(
"irq %d, desc: %p, depth: %d, count: %d, unhandled: %d
\n
"
,
printk
(
"irq %d, desc: %p, depth: %d, count: %d, unhandled: %d
\n
"
,
irq
,
desc
,
desc
->
depth
,
desc
->
irq_count
,
desc
->
irqs_unhandled
);
irq
,
desc
,
desc
->
depth
,
desc
->
irq_count
,
desc
->
irqs_unhandled
);
printk
(
"->handle_irq(): %p,
"
,
desc
->
handle_irq
);
printk
(
"->handle_irq(): %p,
%pS
\n
"
,
print_symbol
(
"%s
\n
"
,
(
unsigned
long
)
desc
->
handle_irq
);
desc
->
handle_irq
,
desc
->
handle_irq
);
printk
(
"->irq_data.chip(): %p,
"
,
desc
->
irq_data
.
chip
);
printk
(
"->irq_data.chip(): %p,
%pS
\n
"
,
print_symbol
(
"%s
\n
"
,
(
unsigned
long
)
desc
->
irq_data
.
chip
);
desc
->
irq_data
.
chip
,
desc
->
irq_data
.
chip
);
printk
(
"->action(): %p
\n
"
,
desc
->
action
);
printk
(
"->action(): %p
\n
"
,
desc
->
action
);
if
(
desc
->
action
)
{
if
(
desc
->
action
)
{
printk
(
"->action->handler(): %p,
"
,
desc
->
action
->
handler
);
printk
(
"->action->handler(): %p,
%pS
\n
"
,
print_symbol
(
"%s
\n
"
,
(
unsigned
long
)
desc
->
action
->
handler
);
desc
->
action
->
handler
,
desc
->
action
->
handler
);
}
}
___P
(
IRQ_LEVEL
);
___P
(
IRQ_LEVEL
);
...
...
kernel/kallsyms.c
浏览文件 @
51ccbb0a
...
@@ -429,17 +429,6 @@ int sprint_backtrace(char *buffer, unsigned long address)
...
@@ -429,17 +429,6 @@ int sprint_backtrace(char *buffer, unsigned long address)
return
__sprint_symbol
(
buffer
,
address
,
-
1
,
1
);
return
__sprint_symbol
(
buffer
,
address
,
-
1
,
1
);
}
}
/* Look up a kernel symbol and print it to the kernel messages. */
void
__print_symbol
(
const
char
*
fmt
,
unsigned
long
address
)
{
char
buffer
[
KSYM_SYMBOL_LEN
];
sprint_symbol
(
buffer
,
address
);
printk
(
fmt
,
buffer
);
}
EXPORT_SYMBOL
(
__print_symbol
);
/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */
/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */
struct
kallsym_iter
{
struct
kallsym_iter
{
loff_t
pos
;
loff_t
pos
;
...
...
lib/smp_processor_id.c
浏览文件 @
51ccbb0a
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
* DEBUG_PREEMPT variant of smp_processor_id().
* DEBUG_PREEMPT variant of smp_processor_id().
*/
*/
#include <linux/export.h>
#include <linux/export.h>
#include <linux/kallsyms.h>
#include <linux/sched.h>
#include <linux/sched.h>
notrace
static
unsigned
int
check_preemption_disabled
(
const
char
*
what1
,
notrace
static
unsigned
int
check_preemption_disabled
(
const
char
*
what1
,
...
@@ -43,7 +42,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
...
@@ -43,7 +42,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
printk
(
KERN_ERR
"BUG: using %s%s() in preemptible [%08x] code: %s/%d
\n
"
,
printk
(
KERN_ERR
"BUG: using %s%s() in preemptible [%08x] code: %s/%d
\n
"
,
what1
,
what2
,
preempt_count
()
-
1
,
current
->
comm
,
current
->
pid
);
what1
,
what2
,
preempt_count
()
-
1
,
current
->
comm
,
current
->
pid
);
print
_symbol
(
"caller is %s
\n
"
,
(
long
)
__builtin_return_address
(
0
));
print
k
(
"caller is %pS
\n
"
,
__builtin_return_address
(
0
));
dump_stack
();
dump_stack
();
out_enable:
out_enable:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录