代码修改
增加dump_stack()函数
tatic int bcm2835_clk_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct clk_hw **hws;
struct bcm2835_cprman *cprman;
struct resource *res;
const struct bcm2835_clk_desc *desc;
const size_t asize = ARRAY_SIZE(clk_desc_array);
const struct cprman_plat_data *pdata;
struct device_node *fw_node;
size_t i;
u32 clk_id;
int ret;
dump_stack();
pdata = of_device_get_match_data(&pdev->dev);
........}
输出展示
[ 0.338902] Serial: AMBA PL011 UART driver
[ 0.348399] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.19.127-v8+ #16
[ 0.350153] Hardware name: Raspberry Pi 3 Model B+ (DT)
[ 0.350571] Call trace:
[ 0.351331] dump_backtrace+0x0/0x178
[ 0.351465] show_stack+0x28/0x34
[ 0.351567] __dump_stack+0x20/0x28
[ 0.351669] dump_stack+0x88/0xc4
[ 0.351770] bcm2835_clk_probe+0x3c/0x248
[ 0.351903] platform_drv_probe+0x60/0xb4
[ 0.352088] really_probe+0x24c/0x294
[ 0.352198] driver_probe_device+0xa4/0xb4
[ 0.352305] __device_attach_driver+0x88/0xb4
[ 0.352410] bus_for_each_drv+0x7c/0xc4
[ 0.352479] __device_attach+0xe4/0x148
[ 0.352565] device_initial_probe+0x28/0x34
[ 0.352659] bus_probe_device+0x58/0xa8
[ 0.352752] device_add+0x248/0x36c
[ 0.352863] of_device_add+0x40/0x58
[ 0.352974] of_platform_device_create_pdata+0xbc/0x13c
[ 0.353122] of_platform_bus_create+0xe4/0x1a8
[ 0.353262] of_platform_bus_create+0x128/0x1a8
[ 0.353397] of_platform_populate+0x74/0xe4
[ 0.353520] of_platform_default_populate+0x44/0x54
[ 0.353665] of_platform_default_populate_init+0x84/0xcc
[ 0.353819] do_one_initcall+0xf4/0x280
[ 0.353941] do_initcall_level+0x18c/0x194
[ 0.354071] do_initcalls+0x38/0x40
[ 0.354183] do_basic_setup+0x30/0x38
[ 0.354300] kernel_init_freeable+0xdc/0x1a0
[ 0.354431] kernel_init+0x18/0xfc
[ 0.354561] ret_from_fork+0x10/0x18