cancel
Showing results for 
Search instead for 
Did you mean: 

Kernel trace with custom stm32mp151c board and device tree (Workqueue: events deferred_probe_work_func)

MScho.6
Associate II

Hi!

I have a custom board with custom device tree. As far as I can say, it works (boot over emmc) but the kernel gives a trace at the start.

[    0.255543] debugfs: Directory 'cpu0' with parent 'opp' already present!
[    0.261757] Unable to get STM32 DDR PMU clock
[    0.294819] stm32-mdma 58000000.dma: STM32 MDMA driver registered
[    0.296155] stm32-dma 48000000.dma: no dma pool: can't use MDMA: 0
[    0.297740] stm32-dma 48000000.dma: STM32 DMA driver registered
[    0.298366] reg11: supplied by fixed_3v3
[    0.298741] reg18: supplied by fixed_3v3
[    0.299068] usb33: supplied by fixed_3v3
[    0.304778] dwc2 49000000.usb-otg: 49000000.usb-otg supply vusb_d not found, using dummy regulator
[    0.304931] dwc2 49000000.usb-otg: 49000000.usb-otg supply vusb_a not found, using dummy regulator
[    0.307539] debugfs: Directory 'cpu0' with parent 'opp' already present!
[    0.307696] ------------[ cut here ]------------
[    0.307729] WARNING: CPU: 0 PID: 16 at drivers/opp/of.c:686 _of_add_opp_table_v2+0x50c/0x5c0
[    0.307738] Modules linked in:
[    0.307757] CPU: 0 PID: 16 Comm: kworker/0:1 Not tainted 5.4.69-yocto-standard #1
[    0.307766] Hardware name: STM32 (Device Tree Support)
[    0.307787] Workqueue: events deferred_probe_work_func
[    0.307825] [<c01104b4>] (unwind_backtrace) from [<c010c6d0>] (show_stack+0x10/0x14)
[    0.307849] [<c010c6d0>] (show_stack) from [<c0aa6d4c>] (dump_stack+0xbc/0xd0)
[    0.307871] [<c0aa6d4c>] (dump_stack) from [<c0122c7c>] (__warn+0xbc/0xd8)
[    0.307890] [<c0122c7c>] (__warn) from [<c0122cfc>] (warn_slowpath_fmt+0x64/0xc4)
[    0.307911] [<c0122cfc>] (warn_slowpath_fmt) from [<c0824c38>] (_of_add_opp_table_v2+0x50c/0x5c0)
[    0.307932] [<c0824c38>] (_of_add_opp_table_v2) from [<c0824d20>] (dev_pm_opp_of_add_table+0x34/0x164)
[    0.307953] [<c0824d20>] (dev_pm_opp_of_add_table) from [<c0824e88>] (dev_pm_opp_of_cpumask_add_table+0x38/0xfc)
[    0.307973] [<c0824e88>] (dev_pm_opp_of_cpumask_add_table) from [<c082c070>] (cpufreq_init+0x104/0x304)
[    0.307994] [<c082c070>] (cpufreq_init) from [<c0828f4c>] (cpufreq_online+0x420/0x9b4)
[    0.308016] [<c0828f4c>] (cpufreq_online) from [<c082957c>] (cpufreq_add_dev+0x8c/0xc0)
[    0.308036] [<c082957c>] (cpufreq_add_dev) from [<c05e86d4>] (subsys_interface_register+0xa4/0xf8)
[    0.308057] [<c05e86d4>] (subsys_interface_register) from [<c082789c>] (cpufreq_register_driver+0x150/0x2ac)
[    0.308078] [<c082789c>] (cpufreq_register_driver) from [<c082c314>] (dt_cpufreq_probe+0xa4/0x1b8)
[    0.308098] [<c082c314>] (dt_cpufreq_probe) from [<c05ec514>] (platform_drv_probe+0x48/0x98)
[    0.308117] [<c05ec514>] (platform_drv_probe) from [<c05ea360>] (really_probe+0x24c/0x488)
[    0.308136] [<c05ea360>] (really_probe) from [<c05ea764>] (driver_probe_device+0x78/0x154)
[    0.308154] [<c05ea764>] (driver_probe_device) from [<c05e83b0>] (bus_for_each_drv+0x84/0xd0)
[    0.308171] [<c05e83b0>] (bus_for_each_drv) from [<c05ea074>] (__device_attach+0xf0/0x188)
[    0.308189] [<c05ea074>] (__device_attach) from [<c05e917c>] (bus_probe_device+0x84/0x8c)
[    0.308207] [<c05e917c>] (bus_probe_device) from [<c05e96cc>] (deferred_probe_work_func+0x84/0xc4)
[    0.308228] [<c05e96cc>] (deferred_probe_work_func) from [<c013ce34>] (process_one_work+0x1c8/0x420)
[    0.308248] [<c013ce34>] (process_one_work) from [<c013d2d4>] (worker_thread+0x248/0x528)
[    0.308267] [<c013d2d4>] (worker_thread) from [<c0142670>] (kthread+0x144/0x180)
[    0.308285] [<c0142670>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[    0.308295] Exception stack(0xc717bfb0 to 0xc717bff8)
[    0.308310] bfa0:                                     00000000 00000000 00000000 00000000
[    0.308326] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.308341] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.308352] ---[ end trace 872afcafb31983a3 ]---
[    0.308802] debugfs: Directory 'cpu0' with parent 'opp' already present!
[    0.308884] sysfs: cannot create duplicate filename '/devices/platform/cpufreq-dt'
[    0.308903] CPU: 0 PID: 16 Comm: kworker/0:1 Tainted: G        W         5.4.69-yocto-standard #1
[    0.308911] Hardware name: STM32 (Device Tree Support)
[    0.308929] Workqueue: events deferred_probe_work_func
[    0.308958] [<c01104b4>] (unwind_backtrace) from [<c010c6d0>] (show_stack+0x10/0x14)
[    0.308979] [<c010c6d0>] (show_stack) from [<c0aa6d4c>] (dump_stack+0xbc/0xd0)
[    0.309001] [<c0aa6d4c>] (dump_stack) from [<c02f044c>] (sysfs_warn_dup+0x54/0x60)
[    0.309021] [<c02f044c>] (sysfs_warn_dup) from [<c02f0588>] (sysfs_create_dir_ns+0xec/0xfc)
[    0.309041] [<c02f0588>] (sysfs_create_dir_ns) from [<c0aac3ac>] (kobject_add_internal+0xb4/0x354)
[    0.309060] [<c0aac3ac>] (kobject_add_internal) from [<c0aac6a8>] (kobject_add+0x5c/0xc8)
[    0.309082] [<c0aac6a8>] (kobject_add) from [<c05e59fc>] (device_add+0x110/0x640)
[    0.309104] [<c05e59fc>] (device_add) from [<c05ec2b0>] (platform_device_add+0x108/0x248)
[    0.309125] [<c05ec2b0>] (platform_device_add) from [<c05ece4c>] (platform_device_register_full+0xd0/0x110)
[    0.309146] [<c05ece4c>] (platform_device_register_full) from [<c082c53c>] (stm32_cpufreq_probe+0xec/0x194)
[    0.309166] [<c082c53c>] (stm32_cpufreq_probe) from [<c05ec514>] (platform_drv_probe+0x48/0x98)
[    0.309185] [<c05ec514>] (platform_drv_probe) from [<c05ea360>] (really_probe+0x24c/0x488)
[    0.309204] [<c05ea360>] (really_probe) from [<c05ea764>] (driver_probe_device+0x78/0x154)
[    0.309222] [<c05ea764>] (driver_probe_device) from [<c05e83b0>] (bus_for_each_drv+0x84/0xd0)
[    0.309239] [<c05e83b0>] (bus_for_each_drv) from [<c05ea074>] (__device_attach+0xf0/0x188)
[    0.309257] [<c05ea074>] (__device_attach) from [<c05e917c>] (bus_probe_device+0x84/0x8c)
[    0.309275] [<c05e917c>] (bus_probe_device) from [<c05e96cc>] (deferred_probe_work_func+0x84/0xc4)
[    0.309294] [<c05e96cc>] (deferred_probe_work_func) from [<c013ce34>] (process_one_work+0x1c8/0x420)
[    0.309314] [<c013ce34>] (process_one_work) from [<c013d2d4>] (worker_thread+0x248/0x528)
[    0.309333] [<c013d2d4>] (worker_thread) from [<c0142670>] (kthread+0x144/0x180)
[    0.309350] [<c0142670>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[    0.309360] Exception stack(0xc717bfb0 to 0xc717bff8)
[    0.309373] bfa0:                                     00000000 00000000 00000000 00000000
[    0.309390] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.309405] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.309419] kobject_add_internal failed for cpufreq-dt with -EEXIST, don't try to register things with the same name in the same directory.
[    0.310927] stm32-hash 54002000.hash: will run requests pump with realtime priority
[    0.312665] stm32-hash 54002000.hash: Init HASH done HW ver 23 DMA mode 1
[    0.313866] stm32-ddr-pmu: probed (ID=0x00140061 VER=0x00000010), DDR@533MHz

Thanks and Regards,

Matthias

1 ACCEPTED SOLUTION

Accepted Solutions

To be more specific, fix is this one :

It was also nessesary to blacklist the device_id in drivers/cpufreq/cpufreq-dt-platdev.c

static const struct of_device_id blacklist[] __initconst = {

...

{ .compatible = "st,stm32mp157", },

+++ { .compatible = "st,stm32mp151", },

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

8 REPLIES 8
Olivier GALLIEN
ST Employee

Hi @MScho.6​ ,

I guess you get similar issue than in this post :

https://community.st.com/s/question/0D53W000009340DSAQ/how-to-configuration-for-stm32mp151

The patch to be applied is explain in the comment marked "Best Answer" .

Proper fix will be integrated in a coming release.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

To be more specific, fix is this one :

It was also nessesary to blacklist the device_id in drivers/cpufreq/cpufreq-dt-platdev.c

static const struct of_device_id blacklist[] __initconst = {

...

{ .compatible = "st,stm32mp157", },

+++ { .compatible = "st,stm32mp151", },

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MScho.6
Associate II

No, I do not believe it has to do with that. The second trace is from: drivers/cpufreq/stm32-cpufreq.c:67 if that helps. We have a discrete power supply. Maybe some misconfiguration on my side there?! What are the dt nodes one should look at?

Hi @MScho.6​ ,

Did you make a trial of the patch ?

Please provide new traces once applied

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MScho.6
Associate II

I tried and the patch did it. Thank you and have a nice weekend.

@Olivier GALLIEN 

Please add that to the next version of OpenSTLinux sources for STM32MP151. It removes at least one error.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer

Hi @DMårt 

The bug mentioned in this thread supposed to be fixed and integrated for a while. (2021)

If you faced similar error using the latest version 5.0 or 5.1 please create a new topic/question. 

Thanks 

Olivier  

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@Olivier GALLIEN 

Yes....supposed to be fixed...supposed yes.

https://github.com/STMicroelectronics/linux/blob/4c4175804a542f40c50d091cc694bb0b186728a0/drivers/cpufreq/cpufreq-dt-platdev.c#L157

	{ .compatible = "st,stih407", },
	{ .compatible = "st,stih410", },
	{ .compatible = "st,stih418", },
	{ .compatible = "st,stm32mp157", },

 

The stm32mp153 and stm32mp151 are still missing.  Anyway! I'm working on a STM32MP151 low cost board with eMMC. If you are interested, you can have a look at it.

 

 

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer