[technical discussions should go to the proper mailing lists]
Hi Andreas,
Am 19.06.2018 um 19:46 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 19.06.2018 um 19:22 schrieb Andreas Kemnade andreas@kemnade.info:
On Tue, 19 Jun 2018 11:38:26 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, we did hunt a while for a big bug in the kernel. It was a little flaky and random but the main symptom was a kernel NULL pointer panic in strcmp().
The result was that the GTA04 (and also the Pyra) did not continue to boot properly. Sometimes it came to a login: but then several drivers were missing.
After hunting down the bug it was not a device driver but a race and dangling pointer problem in the pincontrol subsystem.
Now we got some patches from the maintainer and the problem seems to have disappeared.
Well, has it or hasn't is?
compiled dca26f608a765008b869991bf29fa241769599fb + my compile fix
result: strcmp problem again. [ 7.335571] [<c074abc0>] (strcmp) from [<c04266bc>] (pinctrl_generic_add_group+0x50/0xc4) [ 7.344116] [<c04266bc>] (pinctrl_generic_add_group) from [<c042b920>] (pcs_dt_node_to_map+0x484/0x820) [ 7.353912] [<c042b920>] (pcs_dt_node_to_map) from [<c04298f4>] (pinctrl_dt_to_map+0x220/0x2bc) [ 7.363006] [<c04298f4>] (pinctrl_dt_to_map) from [<c04269c4>] (create_pinctrl+0x5c/0x318)
Hm...
I did a quick boot - and on first boot I also got a strcmp(NULL). From the SD card which I had used for extensive testing yesterday.
What the hell is going on here?
Maybe it is still a bug to devm_kzalloc something and store in the radix tree and leave it there, even if the driver is detached?
Then we still try to access this memory region by scanning the tree.
For test purposes we could replace the devm_kzalloc by kzalloc. This whould leak a little memory, but my hope is that the problem disappears.
Do you have a repeatable (at least >some%) scenario to reproduce the bug?
BR, Nikolaus
Hi,
On Tue, 19 Jun 2018 20:07:23 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
[technical discussions should go to the proper mailing lists]
Hi Andreas,
Am 19.06.2018 um 19:46 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 19.06.2018 um 19:22 schrieb Andreas Kemnade andreas@kemnade.info:
On Tue, 19 Jun 2018 11:38:26 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, we did hunt a while for a big bug in the kernel. It was a little flaky and random but the main symptom was a kernel NULL pointer panic in strcmp().
The result was that the GTA04 (and also the Pyra) did not continue to boot properly. Sometimes it came to a login: but then several drivers were missing.
After hunting down the bug it was not a device driver but a race and dangling pointer problem in the pincontrol subsystem.
Now we got some patches from the maintainer and the problem seems to have disappeared.
Well, has it or hasn't is?
compiled dca26f608a765008b869991bf29fa241769599fb + my compile fix
result: strcmp problem again. [ 7.335571] [<c074abc0>] (strcmp) from [<c04266bc>] (pinctrl_generic_add_group+0x50/0xc4) [ 7.344116] [<c04266bc>] (pinctrl_generic_add_group) from [<c042b920>] (pcs_dt_node_to_map+0x484/0x820) [ 7.353912] [<c042b920>] (pcs_dt_node_to_map) from [<c04298f4>] (pinctrl_dt_to_map+0x220/0x2bc) [ 7.363006] [<c04298f4>] (pinctrl_dt_to_map) from [<c04269c4>] (create_pinctrl+0x5c/0x318)
Hm...
I did a quick boot - and on first boot I also got a strcmp(NULL). From the SD card which I had used for extensive testing yesterday.
What the hell is going on here?
Maybe it is still a bug to devm_kzalloc something and store in the radix tree and leave it there, even if the driver is detached?
Then we still try to access this memory region by scanning the tree.
For test purposes we could replace the devm_kzalloc by kzalloc. This whould leak a little memory, but my hope is that the problem disappears.
Do you have a repeatable (at least >some%) scenario to reproduce the bug?
unfortunately not, maybe we should pass init=/modprobe-mess.sh to kernel commandline, and create a worst case modprobe scenario there. So we can control probing order more.
Regards, Andreas
* Andreas Kemnade andreas@kemnade.info [180619 21:35]:
Hi,
On Tue, 19 Jun 2018 20:07:23 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
[technical discussions should go to the proper mailing lists]
Hi Andreas,
Am 19.06.2018 um 19:46 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 19.06.2018 um 19:22 schrieb Andreas Kemnade andreas@kemnade.info:
On Tue, 19 Jun 2018 11:38:26 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, we did hunt a while for a big bug in the kernel. It was a little flaky and random but the main symptom was a kernel NULL pointer panic in strcmp().
The result was that the GTA04 (and also the Pyra) did not continue to boot properly. Sometimes it came to a login: but then several drivers were missing.
After hunting down the bug it was not a device driver but a race and dangling pointer problem in the pincontrol subsystem.
Now we got some patches from the maintainer and the problem seems to have disappeared.
Well, has it or hasn't is?
compiled dca26f608a765008b869991bf29fa241769599fb + my compile fix
result: strcmp problem again. [ 7.335571] [<c074abc0>] (strcmp) from [<c04266bc>] (pinctrl_generic_add_group+0x50/0xc4) [ 7.344116] [<c04266bc>] (pinctrl_generic_add_group) from [<c042b920>] (pcs_dt_node_to_map+0x484/0x820) [ 7.353912] [<c042b920>] (pcs_dt_node_to_map) from [<c04298f4>] (pinctrl_dt_to_map+0x220/0x2bc) [ 7.363006] [<c04298f4>] (pinctrl_dt_to_map) from [<c04269c4>] (create_pinctrl+0x5c/0x318)
Hm...
I did a quick boot - and on first boot I also got a strcmp(NULL). From the SD card which I had used for extensive testing yesterday.
What the hell is going on here?
Maybe it is still a bug to devm_kzalloc something and store in the radix tree and leave it there, even if the driver is detached?
Or you guys using and older version of the patches? The check for not allowing to add NULL named entries was added. Not sure how you would end up with NULL names though unless some parts are still freed on deferred probe. Care to try with the updated patches and add dump_stack for NULL names?
Then we still try to access this memory region by scanning the tree.
For test purposes we could replace the devm_kzalloc by kzalloc. This whould leak a little memory, but my hope is that the problem disappears.
Do you have a repeatable (at least >some%) scenario to reproduce the bug?
unfortunately not, maybe we should pass init=/modprobe-mess.sh to kernel commandline, and create a worst case modprobe scenario there. So we can control probing order more.
Funny how I have not seen these. Probably because I got rid of that PID 1 software years ago.
Regards,
Tony
Hi Tony,
Am 20.06.2018 um 06:26 schrieb Tony Lindgren tony@atomide.com:
I did a quick boot - and on first boot I also got a strcmp(NULL). From the SD card which I had used for extensive testing yesterday.
What the hell is going on here?
One more observation: the strcmp(NULL) has moved from pinctrl_get_group_selector() to to pinctrl_generic_add_group() i.e. now happens in pinctrl_generic_group_name_to_selector().
Maybe it is still a bug to devm_kzalloc something and store in the radix tree and leave it there, even if the driver is detached?
Or you guys using and older version of the patches?
We use these:
http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/work/le... http://git.goldelico.com/?p=gta04-kernel.git;a=commit;h=d73fac5da046cc09fe08...
I.e. from Fri, 15 Jun 2018 13:11:37 +0200 (04:11 -0700).
The check for not allowing to add NULL named entries was added. Not sure how you would end up with NULL names though unless some parts are still freed on deferred probe. Care to try with the updated patches and add dump_stack for NULL names?
This does IMHO not solve the real problem. Would just hide it - mostly.
Problem seems to be:
1. before driver is probed pinmux does a group = devm_kzalloc 2. this is added to radix tree 3. driver probe fails for some reason 4. devres_release_all(driver) ==> does a kfree(group) 5. someone reuses the memory area defined by kzalloc 6. other driver is probed and wants to check if selector exists 7. scans through radix tree (in pinctrl_generic_group_name_to_selector) 8. finds NULLified memory area [or maybe other stale data!] 9. strcmp(NULL)
This happens despite our checking for duplicates.
So we should not fix #9 but #4 to properly remove groups from radix tree and make sure that it is skipped during scanning for selectors (this is what a NULL test #9 finally would do - the test alone isn't enough).
Andy already pointed to a location where the cleanup should take place:
I think there is a simple way to clean up pinctrl stuff on failed probe. See https://elixir.bootlin.com/linux/v4.18-rc1/source/drivers/base/dd.c#L416
We only bind pins, and do not perform any actions when failure happens later on.
Or have we missed this patch?
Then we still try to access this memory region by scanning the tree.
For test purposes we could replace the devm_kzalloc by kzalloc. This whould leak a little memory, but my hope is that the problem disappears.
Do you have a repeatable (at least >some%) scenario to reproduce the bug?
unfortunately not, maybe we should pass init=/modprobe-mess.sh to kernel commandline, and create a worst case modprobe scenario there. So we can control probing order more.
Funny how I have not seen these. Probably because I got rid of that PID 1 software years ago.
I think it depends on which drivers are modprobed and how they defer probing. If all drivers are succeeding immediately one doesn't see it.
BR, Nikolaus
* H. Nikolaus Schaller hns@goldelico.com [180620 04:58]:
Problem seems to be:
- before driver is probed pinmux does a group = devm_kzalloc
- this is added to radix tree
- driver probe fails for some reason
- devres_release_all(driver) ==> does a kfree(group)
This should not happen as the devm alloc is done for the pin controller instance, not for a consumer driver instance. So we either free it in pinctrl-single.c somehow, or do you have maybe deferred probing happending for some additional pinctrl instance we don't have in the mainline kernel?
To try to figure out where we free something, do you see pcs_dt_free_map() get called for example?
- someone reuses the memory area defined by kzalloc
- other driver is probed and wants to check if selector exists
- scans through radix tree (in pinctrl_generic_group_name_to_selector)
- finds NULLified memory area [or maybe other stale data!]
- strcmp(NULL)
This happens despite our checking for duplicates.
So we should not fix #9 but #4 to properly remove groups from radix tree and make sure that it is skipped during scanning for selectors (this is what a NULL test #9 finally would do - the test alone isn't enough).
To do this properly we should allow the pin controller driver to specify the selector based on a register offset or similar and get rid of the numbered indexing.
Andy already pointed to a location where the cleanup should take place:
I think there is a simple way to clean up pinctrl stuff on failed probe. See https://elixir.bootlin.com/linux/v4.18-rc1/source/drivers/base/dd.c#L416
We only bind pins, and do not perform any actions when failure happens later on.
Or have we missed this patch?
Hmm that seems like a separate yet another issue though.
Regards,
Tony
Hi Tony,
Am 20.06.2018 um 07:40 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180620 04:58]:
Problem seems to be:
- before driver is probed pinmux does a group = devm_kzalloc
- this is added to radix tree
- driver probe fails for some reason
- devres_release_all(driver) ==> does a kfree(group)
This should not happen as the devm alloc is done for the pin controller instance, not for a consumer driver instance.
Ah, yes. I missed that.
So we either free it in pinctrl-single.c somehow, or do you have maybe deferred probing happending for some additional pinctrl instance we don't have in the mainline kernel?
Not that we are aware of. The bug does not seem to depend on out-of-tree drivers.
To try to figure out where we free something, do you see pcs_dt_free_map() get called for example?
Good idea.
- someone reuses the memory area defined by kzalloc
- other driver is probed and wants to check if selector exists
- scans through radix tree (in pinctrl_generic_group_name_to_selector)
- finds NULLified memory area [or maybe other stale data!]
- strcmp(NULL)
This happens despite our checking for duplicates.
So we should not fix #9 but #4 to properly remove groups from radix tree and make sure that it is skipped during scanning for selectors (this is what a NULL test #9 finally would do - the test alone isn't enough).
To do this properly we should allow the pin controller driver to specify the selector based on a register offset or similar and get rid of the numbered indexing.
Yes, the indexing is probably not the best approach.
Andy already pointed to a location where the cleanup should take place:
I think there is a simple way to clean up pinctrl stuff on failed probe. See https://elixir.bootlin.com/linux/v4.18-rc1/source/drivers/base/dd.c#L416
We only bind pins, and do not perform any actions when failure happens later on.
Or have we missed this patch?
Hmm that seems like a separate yet another issue though.
Regards,
Tony
BR and thanks, Nikolaus
* H. Nikolaus Schaller hns@goldelico.com [180620 06:16]:
Am 20.06.2018 um 07:40 schrieb Tony Lindgren tony@atomide.com: So we either free it in pinctrl-single.c somehow, or do you have maybe deferred probing happending for some additional pinctrl instance we don't have in the mainline kernel?
Not that we are aware of. The bug does not seem to depend on out-of-tree drivers.
OK so no deferred probe for the pin controller driver itself, so it should be something we free in pinctrl-single.c on consumer deferred probe. Maybe add some printk to kfree parts there to see what's going on.
Regards,
Tony
Hi Tony,
Am 20.06.2018 um 08:22 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180620 06:16]:
Am 20.06.2018 um 07:40 schrieb Tony Lindgren tony@atomide.com: So we either free it in pinctrl-single.c somehow, or do you have maybe deferred probing happending for some additional pinctrl instance we don't have in the mainline kernel?
Not that we are aware of. The bug does not seem to depend on out-of-tree drivers.
OK so no deferred probe for the pin controller driver itself, so it should be something we free in pinctrl-single.c on consumer deferred probe. Maybe add some printk to kfree parts there to see what's going on.
Seems to depend on weekday. Today I have not yet seen many strcmp(NULL)...
Here is some more logging to show relationship between adding, freeing and retrying:
root@letux:~# dmesg|grep "dt_free|generic_add|deferred" [ 0.749267] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_hsusb2_pins selector=0 [ 0.751251] pinctrl_generic_add_group: pctldev=ee487f80 name=pinmux_hsusb2_2_pins selector=0 [ 0.752166] pinctrl_generic_add_group: pctldev=ee487e00 name=pinmux_mcbsp1_devconf0_pins selector=0 [ 0.752929] pinctrl_generic_add_group: pctldev=ee487d00 name=pinmux_tv_acbias_devconf1_pins selector=0 [ 0.770294] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_uart1_pins selector=1 [ 0.772003] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_uart2_pins selector=2 [ 0.773162] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_uart3_pins selector=3 [ 1.800964] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_twl4030_pins selector=4 [ 1.810302] pinctrl_generic_add_group: pctldev=ee3bb000 name=pinmux_twl4030_vpins selector=0 [ 1.972869] pinctrl_generic_add_group: pctldev=ee487f80 name=spi_gpio_pinmux selector=1 [ 2.168395] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_mmc1_pins selector=5 [ 2.205108] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_wlan_irq_pin selector=6 [ 2.224792] pcs_dt_free_map [ 2.376678] platform 6e000000.gpmc: Retrying from deferred list [ 2.383361] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_gpmc_pins selector=7 [ 2.771697] platform wlan_en_regulator: Retrying from deferred list [ 2.779144] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_wlan_pins selector=8 [ 2.788574] platform bt_en_regulator: Retrying from deferred list [ 2.795043] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_bt_pins selector=9 [ 2.804443] platform 480b4000.mmc: Retrying from deferred list [ 5.258331] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_dss_dpi_pins selector=10 [ 5.879425] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_mcbsp1_pins selector=11 [ 5.916534] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 5.994262] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_mcbsp2_pins selector=12 [ 6.072937] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_penirq_pins selector=13 [ 6.125610] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_mcbsp3_pins selector=14 [ 6.164184] pinctrl_generic_add_group: pctldev=ee3bb180 name=hdq_pins selector=15 [ 6.360595] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_camera_pins selector=16 [ 6.418457] pcs_dt_free_map [ 6.602600] i2c 1-0030: Retrying from deferred list [ 6.614440] pcs_dt_free_map [ 6.702392] i2c 1-0030: Retrying from deferred list [ 6.712951] pcs_dt_free_map [ 6.715942] i2c 1-0030: Retrying from deferred list [ 6.728424] pcs_dt_free_map [ 6.732513] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_mcbsp4_pins selector=17 [ 6.741424] i2c 1-0030: Retrying from deferred list [ 6.792175] pcs_dt_free_map [ 6.796844] i2c 1-0030: Retrying from deferred list [ 6.807220] pcs_dt_free_map [ 6.954742] pinctrl_generic_add_group: pctldev=ee3bb180 name=backlight_pins_pinmux selector=18 [ 7.118408] pcs_dt_free_map [ 7.158782] i2c 1-0030: Retrying from deferred list [ 7.164337] pcs_dt_free_map [ 7.167297] platform backlight: Retrying from deferred list [ 7.180816] pinctrl_generic_add_group: pctldev=ee3bb180 name=modem_pins selector=19 [ 7.234771] i2c 1-0030: Retrying from deferred list [ 7.253265] pcs_dt_free_map [ 7.275238] i2c 1-0030: Retrying from deferred list [ 7.284332] pcs_dt_free_map [ 7.553283] i2c 1-0030: Retrying from deferred list [ 7.568389] pcs_dt_free_map [ 7.858245] i2c 1-0030: Retrying from deferred list [ 7.863800] pcs_dt_free_map [ 7.877532] i2c 1-0030: Retrying from deferred list [ 7.884552] pcs_dt_free_map [ 7.981140] i2c 1-0030: Retrying from deferred list [ 7.986663] pcs_dt_free_map [ 7.996063] pinctrl_generic_add_group: pctldev=ee3bb180 name=pinmux_pps_pins selector=20 [ 8.076934] i2c 1-0030: Retrying from deferred list [ 8.086578] pcs_dt_free_map [ 9.129943] platform sound_bluetooth: Retrying from deferred list [ 9.137176] platform sound_fmradio: Retrying from deferred list [ 9.156463] i2c 1-0030: Retrying from deferred list [ 9.167480] pcs_dt_free_map [ 9.259460] platform sound_bluetooth: Retrying from deferred list [ 9.287811] platform sound_fmradio: Retrying from deferred list [ 9.297210] i2c 1-0030: Retrying from deferred list [ 9.321350] pcs_dt_free_map root@letux:~#
So there are calls - but not matching the retry or adding groups.
Then I added another printk to report if the selector was found (and not added) and got a strcmp(NULL) event. Here the full boot log (maybe you spot something):
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.17.0-letux+ (hns@iMac.fritz.box) (gcc version 4.9.2 (GCC)) #2481 SMP PREEMPT Wed Jun 20 16:52:04 CEST 2018 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Goldelico GTA04A5/Letux 2804 [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] Memory policy: Data cache writeback [ 0.000000] cma: Reserved 16 MiB at 0xbe800000 [ 0.000000] On node 0 totalpages: 261632 [ 0.000000] Normal zone: 1536 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:31 [ 0.000000] HighMem zone: 65024 pages, LIFO batch:15 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] OMAP3630/DM3730 ES1.2 (l2cache iva sgx neon isp 192mhz_clk) [ 0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40000 r8192 d21440 u69632 [ 0.000000] pcpu-alloc: s40000 r8192 d21440 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096 [ 0.000000] Kernel command line: console=ttyO2,115200n8 mtdoops.mtddev=omap2.nand ubi.mtd=4 root=/dev/mmcblk0p1 rw rootfstype=ext4,ext3 rootwait console=ttyO2,115200n8 vram=12M omapfb.vram=0:8M,1:4M omapfb.rotate_type=0 omapdss.def_disp=lcd rootwait twl4030_charger.allow_usb=1 log_buf_len=8M ignore_loglevel earlyprintk [ 0.000000] log_buf_len: 8388608 bytes [ 0.000000] early log buf free: 63960(97%) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 1001476K/1046528K available (6547K kernel code, 650K rwdata, 1820K rodata, 1024K init, 220K bss, 28668K reserved, 16384K cma-reserved, 243712K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (7540 kB) [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 651 kB) [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 221 kB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 4.0) with 96 interrupts [ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz [ 0.000000] OMAP clockevent source: timer1 at 32768 Hz [ 0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns [ 0.000030] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns [ 0.000030] OMAP clocksource: 32k_counter at 32768 Hz [ 0.002136] Console: colour dummy device 80x30 [ 0.002197] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032) [ 0.115203] pid_max: default: 32768 minimum: 301 [ 0.115386] Security Framework initialized [ 0.115509] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.115539] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.116455] CPU: Testing write buffer coherency: ok [ 0.116943] CPU0: thread -1, cpu 0, socket -1, mpidr 0 [ 0.165161] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.175079] Hierarchical SRCU implementation. [ 0.195098] smp: Bringing up secondary CPUs ... [ 0.195129] smp: Brought up 1 node, 1 CPU [ 0.195129] SMP: Total of 1 processors activated (597.60 BogoMIPS). [ 0.195159] CPU: All CPU(s) started in SVC mode. [ 0.197204] devtmpfs: initialized [ 0.224761] random: get_random_u32 called from bucket_table_alloc+0x15c/0x1ac with crng_init=0 [ 0.235504] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3 [ 0.236236] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.236267] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.237731] pinctrl core: initialized pinctrl subsystem [ 0.239044] NET: Registered protocol family 16 [ 0.242218] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.273895] omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp [ 0.274749] omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp [ 0.352935] audit: initializing netlink subsys (disabled) [ 0.356048] audit: type=2000 audit(0.350:1): state=initialized audit_enabled=0 res=1 [ 0.364807] cpuidle: using governor menu [ 0.365753] Reprogramming SDRC clock to 400000000 Hz [ 0.375701] OMAP GPIO hardware version 2.5 [ 0.383270] GPIO line 143 (irda_en) hogged as output/high [ 0.412078] omap-gpmc 6e000000.gpmc: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_gpmc_pins, deferring probe [ 0.432342] No ATAGs? [ 0.432373] hw-breakpoint: debug architecture 0x4 unsupported. [ 0.433654] omap4_sram_init:Unable to allocate sram needed to handle errata I688 [ 0.433654] omap4_sram_init:Unable to get sram pool needed to handle errata I688 [ 0.434020] OMAP DMA hardware revision 5.0 [ 0.542968] omap-dma-engine 48056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported) [ 0.548065] reg-fixed-voltage wlan_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_wlan_pins, deferring probe [ 0.548156] reg-fixed-voltage bt_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_bt_pins, deferring probe [ 0.558593] omap-iommu 480bd400.mmu: 480bd400.mmu registered [ 0.559570] iommu: Adding device 480bc000.isp to group 0 [ 0.562408] vgaarb: loaded [ 0.563598] SCSI subsystem initialized [ 0.565399] libata version 3.00 loaded. [ 0.566375] usbcore: registered new interface driver usbfs [ 0.566558] usbcore: registered new interface driver hub [ 0.566802] usbcore: registered new device driver usb [ 0.567504] usb_phy_generic hsusb2_phy: hsusb2_phy supply vcc not found, using dummy regulator [ 0.573150] omap_i2c 48070000.i2c: bus 0 rev4.4 at 2600 kHz [ 0.577941] omap_i2c 48072000.i2c: bus 1 rev4.4 at 400 kHz [ 0.580322] omap_i2c 48060000.i2c: bus 2 rev4.4 at 100 kHz [ 0.582489] Advanced Linux Sound Architecture Driver Initialized. [ 0.587554] clocksource: Switched to clocksource 32k_counter [ 0.684417] VFS: Disk quotas dquot_6.6.0 [ 0.684539] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.719543] NET: Registered protocol family 2 [ 0.721130] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) [ 0.721191] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.721282] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.721466] TCP: Hash tables configured (established 8192 bind 8192) [ 0.721618] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.721679] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.722015] NET: Registered protocol family 1 [ 0.722076] PCI: CLS 0 bytes, default 64 [ 0.726562] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available [ 0.732116] Initialise system trusted keyrings [ 0.733886] workingset: timestamp_bits=30 max_order=18 bucket_order=0 [ 0.734527] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.739288] Key type asymmetric registered [ 0.739318] Asymmetric key parser 'x509' registered [ 0.739410] bounce: pool size: 64 pages [ 0.739532] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [ 0.739562] io scheduler noop registered [ 0.739562] io scheduler deadline registered [ 0.739654] io scheduler cfq registered (default) [ 0.739685] io scheduler mq-deadline registered [ 0.739685] io scheduler kyber registered [ 0.748565] pinctrl-single 48002030.pinmux: 284 pins, size 568 [ 0.748626] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_hsusb2_pins selector=0 [ 0.749542] pinctrl-single 48002a00.pinmux: 46 pins, size 92 [ 0.750518] pinctrl-single 480025a0.pinmux: 46 pins, size 92 [ 0.750579] pinctrl_generic_add_group: pctldev=ee3bc000 name=pinmux_hsusb2_2_pins selector=0 [ 0.751403] pinctrl-single 48002274.pinmux_mcbsp1: initialized with no interrupts [ 0.751434] pinctrl-single 48002274.pinmux_mcbsp1: 10 pins, size 4 [ 0.751495] pinctrl_generic_add_group: pctldev=ee48fe80 name=pinmux_mcbsp1_devconf0_pins selector=0 [ 0.752197] pinctrl-single 480022d8.pinmux_tv_out: initialized with no interrupts [ 0.752227] pinctrl-single 480022d8.pinmux_tv_out: 4 pins, size 4 [ 0.752258] pinctrl_generic_add_group: pctldev=ee48fd80 name=pinmux_tv_acbias_devconf1_pins selector=0 [ 0.769714] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_uart1_pins selector=1 [ 0.769897] omap_uart 4806a000.serial: no wakeirq for uart0 [ 0.770416] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 88, base_baud = 3000000) is a OMAP UART0 [ 0.771148] serial serial0: tty port ttyO0 registered [ 0.771545] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_uart2_pins selector=2 [ 0.771728] omap_uart 4806c000.serial: no wakeirq for uart1 [ 0.771911] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 89, base_baud = 3000000) is a OMAP UART1 [ 0.772583] serial serial1: tty port ttyO1 registered [ 0.772888] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_uart3_pins selector=3 [ 0.773040] omap_uart 49020000.serial: no wakeirq for uart2 [ 0.773437] 49020000.serial: ttyO2 at MMIO 0x49020000 (irq = 90, base_baud = 3000000) is a OMAP UART2 [ 1.731750] console [ttyO2] enabled [ 1.736968] omap_uart 49042000.serial: no wakeirq for uart3 [ 1.743560] 49042000.serial: ttyO3 at MMIO 0x49042000 (irq = 96, base_baud = 3000000) is a OMAP UART3 [ 1.779815] brd: module loaded [ 1.795471] loop: module loaded [ 1.800292] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_twl4030_pins selector=4 [ 1.809631] pinctrl_generic_add_group: pctldev=ee3bc080 name=pinmux_twl4030_vpins selector=0 [ 1.851440] twl 0-0048: PIH (irq 23) chaining IRQs 144..152 [ 1.857421] twl 0-0048: power (irq 149) chaining IRQs 152..159 [ 1.867736] random: fast init done [ 1.876159] VAUX3: Bringing 2800000uV into 2500000-2500000uV [ 1.901367] VMMC2: Bringing 2600000uV into 1800000-1800000uV [ 1.908813] VMMC2: failed to apply 1800000-1800000uV constraint(-22) [ 1.915496] twl4030_reg 48070000.i2c:twl@48:regulator-vmmc2: can't register VMMC2, -22 [ 1.924041] twl4030_reg: probe of 48070000.i2c:twl@48:regulator-vmmc2 failed with error -22 [ 1.971923] pinctrl_generic_add_group: pctldev=ee3bc000 name=spi_gpio_pinmux selector=1 [ 1.990936] libphy: Fixed MDIO Bus: probed [ 2.005371] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.013153] ehci-pci: EHCI PCI platform driver [ 2.018615] usbcore: registered new interface driver usb-storage [ 2.025878] mousedev: PS/2 mouse device common for all mice [ 2.034698] twl_rtc 48070000.i2c:twl@48:rtc: Enabling TWL-RTC [ 2.043823] twl_rtc 48070000.i2c:twl@48:rtc: rtc core: registered 48070000.i2c:twl@48:rtc as rtc0 [ 2.054412] i2c /dev entries driver [ 2.059753] IR NEC protocol handler initialized [ 2.064514] IR RC5(x/sz) protocol handler initialized [ 2.070373] IR RC6 protocol handler initialized [ 2.075103] IR JVC protocol handler initialized [ 2.080169] IR Sony protocol handler initialized [ 2.084991] IR SANYO protocol handler initialized [ 2.090148] IR Sharp protocol handler initialized [ 2.095092] IR MCE Keyboard/mouse protocol handler initialized [ 2.101257] IR XMP protocol handler initialized [ 2.106018] Driver for 1-wire Dallas network protocol. [ 2.113769] ti-soc-thermal 48002524.bandgap: This OMAP thermal sensor is unreliable. You've been warned [ 2.124298] ti-soc-thermal 48002524.bandgap: Non-trimmed BGAP, Temp not accurate [ 2.134826] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec [ 2.152862] sdhci: Secure Digital Host Controller Interface driver [ 2.161437] sdhci: Copyright(c) Pierre Ossman [ 2.166839] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_mmc1_pins selector=5 [ 2.200988] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_wlan_irq_pin selector=6 [ 2.220611] pcs_dt_free_map [ 2.224365] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.231964] ledtrig-cpu: registered to indicate activity on CPUs [ 2.243927] usbcore: registered new interface driver usbhid [ 2.250946] usbhid: USB HID core driver [ 2.255004] mmc0: host does not support reading read-only switch, assuming write-enable [ 2.263946] ashmem: initialized [ 2.272521] mmc0: new high speed SDHC card at address b368 [ 2.279296] oprofile: using arm/armv7 [ 2.284149] Initializing XFRM netlink socket [ 2.289947] mmcblk0: mmc0:b368 USD 7.47 GiB [ 2.295104] NET: Registered protocol family 17 [ 2.300842] NET: Registered protocol family 15 [ 2.305511] Key type dns_resolver registered [ 2.311584] omap2_set_init_voltage: unable to find boot up OPP for vdd_core [ 2.319152] mmcblk0: p1 [ 2.322540] omap2_set_init_voltage: unable to set vdd_core [ 2.329315] omap3_pm_off_mode_enable(1) [ 2.333740] ThumbEE CPU extension supported. [ 2.338348] Registering SWP/SWPB emulation handler [ 2.343383] SmartReflex Class3 initialized [ 2.348937] Loading compiled-in X.509 certificates [ 2.373138] platform 6e000000.gpmc: Retrying from deferred list [ 2.379760] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_gpmc_pins selector=7 [ 2.388671] omap-gpmc 6e000000.gpmc: GPMC revision 5.0 [ 2.394042] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000 [ 2.402252] omap2-onenand 4000000.onenand: initializing on CS0 (0x04000000), va (ptrval), DMA mode [ 2.412078] OneNAND Manufacturer: Samsung (0xec) [ 2.416931] Muxed OneNAND 512MB 1.8V 16-bit (0x50) [ 2.422027] OneNAND version = 0x0232 [ 2.425750] Chip support all block unlock [ 2.429992] Chip has 4KiB pagesize [ 2.433563] Chip has cache program feature [ 2.439392] Scanning device for bad blocks [ 2.547454] onenand_bbt_wait: ecc 0xaaaa ctrl 0x0400 intr 0x8080 addr1 0x34b addr8 0x0 [ 2.555755] OneNAND eraseblock 843 is an initial bad block [ 2.709594] omap2-onenand 4000000.onenand: optimized timings for 83 MHz [ 2.716522] 5 fixed-partitions partitions found on MTD device 4000000.onenand [ 2.724029] Creating 5 MTD partitions on "4000000.onenand": [ 2.729858] 0x000000000000-0x000000080000 : "X-Loader" [ 2.736846] 0x000000080000-0x000000240000 : "U-Boot" [ 2.743957] 0x000000240000-0x000000280000 : "U-Boot Env" [ 2.751403] 0x000000280000-0x000000880000 : "Kernel" [ 2.758575] 0x000000880000-0x000020000000 : "File System" [ 2.768371] platform wlan_en_regulator: Retrying from deferred list [ 2.775085] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_wlan_pins selector=8 [ 2.785095] platform bt_en_regulator: Retrying from deferred list [ 2.791900] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_bt_pins selector=9 [ 2.801086] platform 480b4000.mmc: Retrying from deferred list [ 2.807617] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_wlan_irq_pin found selector=10 [ 2.935638] ubi0: default fastmap pool size: 100 [ 2.942718] ubi0: default fastmap WL pool size: 50 [ 2.947875] ubi0: attaching mtd4 [ 2.952301] onenand_wait: correctable ECC error = 0x5555 [ 2.958862] ubi0: fixable bit-flip detected at PEB 6 [ 2.964752] omap_hsmmc 480b4000.mmc: card claims to support voltages below defined range [ 2.985534] onenand_wait: correctable ECC error = 0x5555 [ 2.991180] ubi0: fixable bit-flip detected at PEB 187 [ 3.008605] mmc1: new high speed SDIO card at address 0001 [ 3.025451] onenand_wait: correctable ECC error = 0x5555 [ 3.031890] ubi0: fixable bit-flip detected at PEB 465 [ 3.068450] onenand_wait: correctable ECC error = 0x5555 [ 3.074005] ubi0: fixable bit-flip detected at PEB 903 [ 3.086364] onenand_wait: correctable ECC error = 0x5555 [ 3.091979] ubi0: fixable bit-flip detected at PEB 1001 [ 3.120422] onenand_wait: correctable ECC error = 0x5555 [ 3.126007] ubi0: fixable bit-flip detected at PEB 1326 [ 3.137817] onenand_wait: correctable ECC error = 0x5555 [ 3.143402] ubi0: fixable bit-flip detected at PEB 1415 [ 3.158691] onenand_wait: correctable ECC error = 0x5555 [ 3.164245] ubi0: fixable bit-flip detected at PEB 1554 [ 3.198455] onenand_wait: correctable ECC error = 0x5555 [ 3.204010] ubi0: fixable bit-flip detected at PEB 1960 [ 3.213226] ubi0: scanning is finished [ 3.224151] ubi0: attached mtd4 (name "File System", size 503 MiB) [ 3.230987] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes [ 3.238311] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024 [ 3.245422] ubi0: VID header offset: 1024 (aligned 1024), data offset: 4096 [ 3.252777] ubi0: good PEBs: 2013, bad PEBs: 1, corrupted PEBs: 0 [ 3.259307] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 3.266876] ubi0: max/mean erase counter: 59/35, WL threshold: 4096, image sequence number: 163025748 [ 3.276611] ubi0: available PEBs: 0, total reserved PEBs: 2013, PEBs reserved for bad PEB handling: 39 [ 3.286437] ubi0: background thread "ubi_bgt0d" started, PID 1038 [ 3.293884] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 3.302520] input: gpio-keys-wwan-wakeup as /devices/platform/gpio-keys-wwan-wakeup/input/input1 [ 3.312957] omap_gpio 49056000.gpio: Could not set line 16 debounce to 10000 microseconds (-22) [ 3.322784] input: antenna-detect as /devices/platform/antenna-detect/input/input2 [ 3.332397] twl_rtc 48070000.i2c:twl@48:rtc: setting system clock to 2018-06-20 15:07:15 UTC (1529507235) [ 3.342773] sr_init: No PMIC hook to init smartreflex [ 3.348968] smartreflex 480cb000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.358398] smartreflex 480c9000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.369476] VAUX3: disabling [ 3.373291] VDAC: disabling [ 3.376739] VUSB1V5: disabling [ 3.380493] VUSB1V8: disabling [ 3.384124] VUSB3V1: disabling [ 3.387878] wlan-en-regulator: disabling [ 3.391998] bt-en-regulator: disabling [ 3.395904] ALSA device list: [ 3.399139] No soundcards found. [ 3.433776] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null) [ 3.443328] VFS: Mounted root (ext4 filesystem) on device 179:1. [ 3.462615] devtmpfs: mounted [ 3.468292] Freeing unused kernel memory: 1024K Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory INIT: version 2.88 booting [info] Using makefile-style concurrent boot in runlevel S. [....] Starting the hotplug events dispatcher: udevd[ 4.885345] systemd-udevd[1171]: starting version 215 [ 4.970611] random: udevd: uninitialized urandom read (16 bytes read) [ 4.989929] random: udevd: uninitialized urandom read (16 bytes read) . [ 5.394439] omapdss: unknown parameter 'def_disp' ignored [ ok done. [....] Waiting for /dev to be fully populated...^[[c[ 5.476501] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_dss_dpi_pins selector=10 [ 5.514526] omapdss_dss 48050000.dss: 48050000.dss supply vdda_video not found, using dummy regulator [ 5.557128] DSS: OMAP DSS rev 2.0 [ 5.587249] omapdss_dss 48050000.dss: bound 48050400.dispc (ops dispc_component_ops [omapdss]) [ 5.650482] ehci-omap: OMAP-EHCI Host Controller driver [ 5.664672] gnss: GNSS driver registered with major 244 [ 5.695953] omapdss_dss 48050000.dss: bound 48050c00.encoder (ops venc_component_ops [omapdss]) [ 5.754333] input: twl4030:vibrator as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:audio/twl4030-vibra/input/input3 [ 5.770050] twl4030_madc 48070000.i2c:twl@48:madc: 48070000.i2c:twl@48:madc supply vusb3v1 not found, using dummy regulator [ 5.787902] ehci-omap 48064800.ehci: EHCI Host Controller [ 5.816314] ehci-omap 48064800.ehci: new USB bus registered, assigned bus number 1 [ 5.825592] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 5.880859] ehci-omap 48064800.ehci: irq 93, io mem 0x48064800 [ 5.892059] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 5.900787] input: twl4030_pwrbutton as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:pwrbutton/input/input4 [ 5.924621] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 5.997833] ehci-omap 48064800.ehci: USB 2.0 started, EHCI 1.00 [ 6.013641] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.037597] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 6.067291] twl4030_gpio twl4030-gpio: can't dispatch IRQs from modules [ 6.112792] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 6.143859] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.181030] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_mcbsp1_pins selector=11 [ 6.212585] media: Linux media interface: v0.10 [ 6.230682] usb usb1: Product: EHCI Host Controller [ 6.248474] usb usb1: Manufacturer: Linux 4.17.0-letux+ ehci_hcd [ 6.255645] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.263275] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_mcbsp2_pins selector=12 [ 6.298156] input: accelerometer-iio-input-bridge as /devices/virtual/input/input5 [ 6.308380] twl4030_usb 48070000.i2c:twl@48:twl4030-usb: Initialized TWL4030 USB module [ 6.323516] usb usb1: SerialNumber: 48064800.ehci [ 6.335327] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_penirq_pins selector=13 [ 6.348266] Linux video capture interface: v2.00 [ 6.358489] hub 1-0:1.0: USB hub found [ 6.385986] hub 1-0:1.0: 3 ports detected [ 6.390533] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_mcbsp3_pins selector=14 [ 6.403686] input: TSC2007 Touchscreen as /devices/platform/68000000.ocp/48072000.i2c/i2c-1/1-0048/input/input6 [ 6.428436] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_mcbsp4_pins selector=15 [ 6.484527] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver [ 6.492248] bmp280 1-0076: 1-0076 supply vddd not found, using dummy regulator [ 6.529144] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2 [ 6.542999] bmp280 1-0076: 1-0076 supply vdda not found, using dummy regulator [ 6.580078] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 6.615844] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins selector=16 [ 6.661895] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 6.682159] pcs_dt_free_map [ 6.706329] usb usb2: Product: MUSB HDRC host driver [ 6.753509] usb usb2: Manufacturer: Linux 4.17.0-letux+ musb-hcd [ 6.800994] usb usb2: SerialNumber: musb-hdrc.0.auto [ 6.845550] hub 2-0:1.0: USB hub found [ 6.877929] hub 2-0:1.0: 1 port detected [ 6.903656] i2c 1-0030: Retrying from deferred list [ 6.912048] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=17 [ 6.932739] pcs_dt_free_map [ 6.935760] i2c 1-0030: Retrying from deferred list [ 6.951995] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=17 [ 6.968994] pcs_dt_free_map [ 6.973632] pinctrl_generic_add_group: pctldev=ee3bc200 name=hdq_pins selector=17 [ 6.981781] i2c 1-0030: Retrying from deferred list [ 7.030334] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=18 [ 7.048126] pcs_dt_free_map [ 7.051208] pinctrl_generic_add_group: pctldev=ee3bc200 name=backlight_pins_pinmux selector=18 [ 7.060394] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode [ 7.130554] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.154541] i2c 1-0030: Retrying from deferred list [ 7.164642] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.174285] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 7.196868] pcs_dt_free_map [ 7.205200] i2c 1-0030: Retrying from deferred list [ 7.217590] bq27xxx_battery_setup [ 7.225982] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.235565] bq27xxx_battery_setup: dm_regs= (null) [ 7.248168] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix [ 7.257446] bq27xxx_battery_settings [ 7.261535] pcs_dt_free_map [ 7.274200] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088290796 [ 7.322113] pcs_dt_free_map [ 7.356658] i2c 1-0030: Retrying from deferred list [ 7.363830] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.373260] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.386840] pcs_dt_free_map [ 7.394378] platform backlight: Retrying from deferred list [ 7.406372] pinctrl_generic_get_group_name: group>name is NULL [ 7.415954] wwan_on_off_init: wwan_on_off_init [ 7.420867] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 7.435180] pgd = (ptrval) [ 7.438140] [00000000] *pgd=00000000 [ 7.441894] Internal error: Oops: 17 [#1] PREEMPT SMP ARM [ 7.447540] Modules linked in: wwan_on_off(+) snd_soc_gtm601(+) connector_analog_tv(+) pwm_omap_dmtimer(+) generic_adc_battery(+) bq27xxx_battery_hdq bq27xxx_battery pwm_bl wlcore_sdio bmp280_spi omap_hdq omap2430 ov9655 v4l2_fwnode v4l2_common bmp280_i2c bmp280 videodev at24 leds_tca6507 tsc2007 bmc150_accel_i2c bmc150_magn_i2c bmc150_accel_core media bmc150_magn industrialio_triggered_buffer snd_soc_omap_mcbsp kfifo_buf snd_soc_omap snd_pcm_dmaengine phy_twl4030_usb musb_hdrc gpio_twl4030 snd_soc_twl4030 twl4030_pwrbutton twl4030_vibra twl4030_charger twl4030_madc gnss_w2sg0004 industrialio w2cbw003_bluetooth gnss ehci_omap omapdss omapdss_base cec [ 7.507934] CPU: 0 PID: 957 Comm: kworker/0:2 Not tainted 4.17.0-letux+ #2481 [ 7.515411] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 7.521942] Workqueue: events deferred_probe_work_func [ 7.527343] PC is at strcmp+0x4/0x34 [ 7.531097] LR is at pinctrl_generic_add_group+0x50/0x110 [ 7.536743] pc : [<c0758f84>] lr : [<c042bbf4>] psr: 600d0013 [ 7.543273] sp : ee65dd48 ip : 00000000 fp : 00000001 [ 7.548736] r10: 00000013 r9 : ed237dd0 r8 : 00000001 [ 7.554199] r7 : ef7c4958 r6 : c0799fd8 r5 : ee3bc200 r4 : 00000012 [ 7.561035] r3 : 00000062 r2 : 00000002 r1 : 00000000 r0 : ef7c4959 [ 7.567871] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 7.575317] Control: 10c5387d Table: ad028019 DAC: 00000051 [ 7.581298] Process kworker/0:2 (pid: 957, stack limit = 0x(ptrval)) [ 7.587951] Stack: (0xee65dd48 to 0xee65e000) [ 7.592498] dd40: ee3bc200 ef7c4958 ee445c10 00000012 ef7c4858 00000001 [ 7.601074] dd60: ee65de30 ed237dd0 00000001 c04320e0 ee445c10 ed237e50 ee65de34 ed237e50 [ 7.609619] dd80: ed237e10 ed237e10 ee445c48 ffff0a01 0000016f c089ae6d ffffff10 ed237d90 [ 7.618164] dda0: ef7c4858 00000002 0000008a 00000003 00000000 00000000 00000000 00000000 [ 7.626708] ddc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 7.635284] dde0: 00000000 00000000 ef7c4884 ed237e80 ee3bc200 00000000 ef7f61d0 00000000 [ 7.643859] de00: ef7f6354 ef7c4858 ef7c402c c043005c 00000000 014080c0 014080c0 c1c1001c [ 7.652404] de20: c1c10008 00000000 c1c10008 00000001 ed20de10 00000000 ee000000 ed237e80 [ 7.660980] de40: ee231010 c08e9fbc c0bd1df0 00000000 bf20f014 0000002e c0b98f70 c042d0a8 [ 7.669555] de60: 00000014 014080c0 00000000 c08e9fbc ee231010 00000000 ed237ed0 ee231010 [ 7.678100] de80: c0bd1df0 fffffdfb bf20f014 0000002e c0b98f70 c042d408 00000000 ee231010 [ 7.686676] dea0: ed234f10 c04f2f40 ee231010 00000000 c0bd1df4 c04d3f5c 00000000 ee65def0 [ 7.695251] dec0: c04d4268 ee231044 c0b664c4 c0b02d00 00000000 c04d27ac ee01be6c ed123238 [ 7.703826] dee0: ee231010 c0b666c8 00000001 c04d3ddc ee231010 00000001 00000002 ee231010 [ 7.712371] df00: c0b666c8 ee231010 00000000 c04d3388 ee231010 c0b664a8 ef7b7c80 c04d38a4 [ 7.720947] df20: ee653780 c0b664dc ef7b7c80 00000000 ef7baf00 c014874c ee653780 c0b664dc [ 7.729492] df40: ffff8daf ee653780 ef7b7c80 ef7b7c80 ee65c000 ef7b7c98 c0b02d00 ee653798 [ 7.738067] df60: 00000008 c0148f20 00000000 ee652680 ee652440 00000000 ee653780 c0148c60 [ 7.746612] df80: ee0b5ef0 ee65269c 00000000 c014cef4 ee652440 c014cdc0 00000000 00000000 [ 7.755187] dfa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 7.763732] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 7.772277] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 7.780853] [<c0758f84>] (strcmp) from [<c042bbf4>] (pinctrl_generic_add_group+0x50/0x110) [ 7.789520] [<c042bbf4>] (pinctrl_generic_add_group) from [<c04320e0>] (pcs_dt_node_to_map+0x4b0/0x81c) [ 7.799346] [<c04320e0>] (pcs_dt_node_to_map) from [<c043005c>] (pinctrl_dt_to_map+0x1ec/0x2b8) [ 7.808471] [<c043005c>] (pinctrl_dt_to_map) from [<c042d0a8>] (create_pinctrl+0x58/0x2f8) [ 7.817108] [<c042d0a8>] (create_pinctrl) from [<c042d408>] (devm_pinctrl_get+0x2c/0x6c) [ 7.825592] [<c042d408>] (devm_pinctrl_get) from [<c04f2f40>] (pinctrl_bind_pins+0x3c/0x138) [ 7.834411] [<c04f2f40>] (pinctrl_bind_pins) from [<c04d3f5c>] (driver_probe_device+0xe8/0x318) [ 7.843536] [<c04d3f5c>] (driver_probe_device) from [<c04d27ac>] (bus_for_each_drv+0x84/0x94) [ 7.852447] [<c04d27ac>] (bus_for_each_drv) from [<c04d3ddc>] (__device_attach+0x88/0xfc) [ 7.860992] [<c04d3ddc>] (__device_attach) from [<c04d3388>] (bus_probe_device+0x28/0x80) [ 7.869567] [<c04d3388>] (bus_probe_device) from [<c04d38a4>] (deferred_probe_work_func+0xf8/0x130) [ 7.879028] [<c04d38a4>] (deferred_probe_work_func) from [<c014874c>] (process_one_work+0x244/0x464) [ 7.888610] [<c014874c>] (process_one_work) from [<c0148f20>] (worker_thread+0x2c0/0x3ec) [ 7.897155] [<c0148f20>] (worker_thread) from [<c014cef4>] (kthread+0x134/0x150) [ 7.904907] [<c014cef4>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 7.912445] Exception stack(0xee65dfb0 to 0xee65dff8) [ 7.917724] dfa0: 00000000 00000000 00000000 00000000 [ 7.926300] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 7.934844] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 7.941772] Code: e5e32001 1afffffb e12fff1e e4d03001 (e4d12001) [ 7.990631] pps_core: LinuxPPS API ver. 1 registered [ 7.995849] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 8.474365] ---[ end trace 801f9668406bf662 ]--- [ 8.499908] iio_charge:-745 [ 9.380584] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 9.421264] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 9.449859] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 9.466430] cfg80211: failed to load regulatory.db [ 9.754394] wlcore: ERROR ti-connectivity/wl18xx-conf.bin configuration binary size is wrong, expected 1229 got 1221 [ 9.778045] wlcore: WARNING falling back to default config [ 10.190948] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11) [ 10.202667] wlcore: WARNING Detected unconfigured mac address in nvs, derive from fuse instead. [ 10.202667] [ 10.213531] wlcore: WARNING This default nvs file can be removed from the file system [ 10.213531] [ 10.254119] wlcore: loaded [ 10.281890] wl18xx_driver wl18xx.1.auto wlan1: renamed from wlan0 [ 10.320526] systemd-udevd[1197]: renamed network interface wlan0 to wlan1 [ 23.298736] random: crng init done
Next boot was ok:
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.17.0-letux+ (hns@iMac.fritz.box) (gcc version 4.9.2 (GCC)) #2481 SMP PREEMPT Wed Jun 20 16:52:04 CEST 2018 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Goldelico GTA04A5/Letux 2804 [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] Memory policy: Data cache writeback [ 0.000000] cma: Reserved 16 MiB at 0xbe800000 [ 0.000000] On node 0 totalpages: 261632 [ 0.000000] Normal zone: 1536 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:31 [ 0.000000] HighMem zone: 65024 pages, LIFO batch:15 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] OMAP3630/DM3730 ES1.2 (l2cache iva sgx neon isp 192mhz_clk) [ 0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40000 r8192 d21440 u69632 [ 0.000000] pcpu-alloc: s40000 r8192 d21440 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096 [ 0.000000] Kernel command line: console=ttyO2,115200n8 mtdoops.mtddev=omap2.nand ubi.mtd=4 root=/dev/mmcblk0p1 rw rootfstype=ext4,ext3 rootwait console=ttyO2,115200n8 vram=12M omapfb.vram=0:8M,1:4M omapfb.rotate_type=0 omapdss.def_disp=lcd rootwait twl4030_charger.allow_usb=1 log_buf_len=8M ignore_loglevel earlyprintk [ 0.000000] log_buf_len: 8388608 bytes [ 0.000000] early log buf free: 63960(97%) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 1001476K/1046528K available (6547K kernel code, 650K rwdata, 1820K rodata, 1024K init, 220K bss, 28668K reserved, 16384K cma-reserved, 243712K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (7540 kB) [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 651 kB) [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 221 kB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 4.0) with 96 interrupts [ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz [ 0.000000] OMAP clockevent source: timer1 at 32768 Hz [ 0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns [ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns [ 0.000030] OMAP clocksource: 32k_counter at 32768 Hz [ 0.002136] Console: colour dummy device 80x30 [ 0.002197] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032) [ 0.115203] pid_max: default: 32768 minimum: 301 [ 0.115386] Security Framework initialized [ 0.115509] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.115539] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.116455] CPU: Testing write buffer coherency: ok [ 0.116943] CPU0: thread -1, cpu 0, socket -1, mpidr 0 [ 0.165161] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.175079] Hierarchical SRCU implementation. [ 0.195098] smp: Bringing up secondary CPUs ... [ 0.195129] smp: Brought up 1 node, 1 CPU [ 0.195129] SMP: Total of 1 processors activated (597.60 BogoMIPS). [ 0.195159] CPU: All CPU(s) started in SVC mode. [ 0.197204] devtmpfs: initialized [ 0.224761] random: get_random_u32 called from bucket_table_alloc+0x15c/0x1ac with crng_init=0 [ 0.235504] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3 [ 0.236236] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.236267] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.237701] pinctrl core: initialized pinctrl subsystem [ 0.239044] NET: Registered protocol family 16 [ 0.242156] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.273864] omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp [ 0.274688] omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp [ 0.353881] audit: initializing netlink subsys (disabled) [ 0.356903] audit: type=2000 audit(0.350:1): state=initialized audit_enabled=0 res=1 [ 0.364807] cpuidle: using governor menu [ 0.365753] Reprogramming SDRC clock to 400000000 Hz [ 0.375671] OMAP GPIO hardware version 2.5 [ 0.383270] GPIO line 143 (irda_en) hogged as output/high [ 0.412048] omap-gpmc 6e000000.gpmc: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_gpmc_pins, deferring probe [ 0.432281] No ATAGs? [ 0.432312] hw-breakpoint: debug architecture 0x4 unsupported. [ 0.433593] omap4_sram_init:Unable to allocate sram needed to handle errata I688 [ 0.433624] omap4_sram_init:Unable to get sram pool needed to handle errata I688 [ 0.433990] OMAP DMA hardware revision 5.0 [ 0.542724] omap-dma-engine 48056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported) [ 0.548095] reg-fixed-voltage wlan_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_wlan_pins, deferring probe [ 0.548156] reg-fixed-voltage bt_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_bt_pins, deferring probe [ 0.558624] omap-iommu 480bd400.mmu: 480bd400.mmu registered [ 0.559600] iommu: Adding device 480bc000.isp to group 0 [ 0.562408] vgaarb: loaded [ 0.563598] SCSI subsystem initialized [ 0.565460] libata version 3.00 loaded. [ 0.566436] usbcore: registered new interface driver usbfs [ 0.566619] usbcore: registered new interface driver hub [ 0.566864] usbcore: registered new device driver usb [ 0.567535] usb_phy_generic hsusb2_phy: hsusb2_phy supply vcc not found, using dummy regulator [ 0.573150] omap_i2c 48070000.i2c: bus 0 rev4.4 at 2600 kHz [ 0.577941] omap_i2c 48072000.i2c: bus 1 rev4.4 at 400 kHz [ 0.580322] omap_i2c 48060000.i2c: bus 2 rev4.4 at 100 kHz [ 0.582489] Advanced Linux Sound Architecture Driver Initialized. [ 0.587554] clocksource: Switched to clocksource 32k_counter [ 0.684326] VFS: Disk quotas dquot_6.6.0 [ 0.684478] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.718872] NET: Registered protocol family 2 [ 0.720367] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) [ 0.720428] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.720550] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.720733] TCP: Hash tables configured (established 8192 bind 8192) [ 0.720886] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.720916] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.721801] NET: Registered protocol family 1 [ 0.721862] PCI: CLS 0 bytes, default 64 [ 0.726348] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available [ 0.731903] Initialise system trusted keyrings [ 0.733673] workingset: timestamp_bits=30 max_order=18 bucket_order=0 [ 0.734313] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.739074] Key type asymmetric registered [ 0.739074] Asymmetric key parser 'x509' registered [ 0.739196] bounce: pool size: 64 pages [ 0.739318] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [ 0.739349] io scheduler noop registered [ 0.739349] io scheduler deadline registered [ 0.739440] io scheduler cfq registered (default) [ 0.739471] io scheduler mq-deadline registered [ 0.739471] io scheduler kyber registered [ 0.748809] pinctrl-single 48002030.pinmux: 284 pins, size 568 [ 0.748870] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_hsusb2_pins selector=0 [ 0.749816] pinctrl-single 48002a00.pinmux: 46 pins, size 92 [ 0.750823] pinctrl-single 480025a0.pinmux: 46 pins, size 92 [ 0.750885] pinctrl_generic_add_group: pctldev=ee3b6000 name=pinmux_hsusb2_2_pins selector=0 [ 0.751739] pinctrl-single 48002274.pinmux_mcbsp1: initialized with no interrupts [ 0.751739] pinctrl-single 48002274.pinmux_mcbsp1: 10 pins, size 4 [ 0.751800] pinctrl_generic_add_group: pctldev=ee47fe80 name=pinmux_mcbsp1_devconf0_pins selector=0 [ 0.752502] pinctrl-single 480022d8.pinmux_tv_out: initialized with no interrupts [ 0.752532] pinctrl-single 480022d8.pinmux_tv_out: 4 pins, size 4 [ 0.752563] pinctrl_generic_add_group: pctldev=ee47fd80 name=pinmux_tv_acbias_devconf1_pins selector=0 [ 0.769714] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_uart1_pins selector=1 [ 0.769897] omap_uart 4806a000.serial: no wakeirq for uart0 [ 0.770416] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 88, base_baud = 3000000) is a OMAP UART0 [ 0.771118] serial serial0: tty port ttyO0 registered [ 0.771545] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_uart2_pins selector=2 [ 0.771697] omap_uart 4806c000.serial: no wakeirq for uart1 [ 0.771911] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 89, base_baud = 3000000) is a OMAP UART1 [ 0.772399] serial serial1: tty port ttyO1 registered [ 0.772827] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_uart3_pins selector=3 [ 0.772979] omap_uart 49020000.serial: no wakeirq for uart2 [ 0.773376] 49020000.serial: ttyO2 at MMIO 0x49020000 (irq = 90, base_baud = 3000000) is a OMAP UART2 [ 1.731384] console [ttyO2] enabled [ 1.736602] omap_uart 49042000.serial: no wakeirq for uart3 [ 1.743225] 49042000.serial: ttyO3 at MMIO 0x49042000 (irq = 96, base_baud = 3000000) is a OMAP UART3 [ 1.779266] brd: module loaded [ 1.795043] loop: module loaded [ 1.799835] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_twl4030_pins selector=4 [ 1.809112] pinctrl_generic_add_group: pctldev=ee3b6080 name=pinmux_twl4030_vpins selector=0 [ 1.851409] twl 0-0048: PIH (irq 23) chaining IRQs 144..152 [ 1.857391] twl 0-0048: power (irq 149) chaining IRQs 152..159 [ 1.867736] random: fast init done [ 1.876251] VAUX3: Bringing 2800000uV into 2500000-2500000uV [ 1.901184] VMMC2: Bringing 2600000uV into 1800000-1800000uV [ 1.908782] VMMC2: failed to apply 1800000-1800000uV constraint(-22) [ 1.915466] twl4030_reg 48070000.i2c:twl@48:regulator-vmmc2: can't register VMMC2, -22 [ 1.924011] twl4030_reg: probe of 48070000.i2c:twl@48:regulator-vmmc2 failed with error -22 [ 1.972015] pinctrl_generic_add_group: pctldev=ee3b6000 name=spi_gpio_pinmux selector=1 [ 1.990966] libphy: Fixed MDIO Bus: probed [ 2.005462] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.013122] ehci-pci: EHCI PCI platform driver [ 2.018585] usbcore: registered new interface driver usb-storage [ 2.025848] mousedev: PS/2 mouse device common for all mice [ 2.034790] twl_rtc 48070000.i2c:twl@48:rtc: Enabling TWL-RTC [ 2.043792] twl_rtc 48070000.i2c:twl@48:rtc: rtc core: registered 48070000.i2c:twl@48:rtc as rtc0 [ 2.054382] i2c /dev entries driver [ 2.059722] IR NEC protocol handler initialized [ 2.064483] IR RC5(x/sz) protocol handler initialized [ 2.070343] IR RC6 protocol handler initialized [ 2.075073] IR JVC protocol handler initialized [ 2.080139] IR Sony protocol handler initialized [ 2.084960] IR SANYO protocol handler initialized [ 2.090118] IR Sharp protocol handler initialized [ 2.095031] IR MCE Keyboard/mouse protocol handler initialized [ 2.101226] IR XMP protocol handler initialized [ 2.105957] Driver for 1-wire Dallas network protocol. [ 2.113739] ti-soc-thermal 48002524.bandgap: This OMAP thermal sensor is unreliable. You've been warned [ 2.124237] ti-soc-thermal 48002524.bandgap: Non-trimmed BGAP, Temp not accurate [ 2.134796] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec [ 2.152832] sdhci: Secure Digital Host Controller Interface driver [ 2.161407] sdhci: Copyright(c) Pierre Ossman [ 2.166839] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mmc1_pins selector=5 [ 2.200958] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_wlan_irq_pin selector=6 [ 2.220550] pcs_dt_free_map [ 2.224334] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.231903] ledtrig-cpu: registered to indicate activity on CPUs [ 2.243591] usbcore: registered new interface driver usbhid [ 2.250793] usbhid: USB HID core driver [ 2.254852] mmc0: host does not support reading read-only switch, assuming write-enable [ 2.263824] ashmem: initialized [ 2.272094] mmc0: new high speed SDHC card at address b368 [ 2.278778] oprofile: using arm/armv7 [ 2.283813] Initializing XFRM netlink socket [ 2.289550] mmcblk0: mmc0:b368 USD 7.47 GiB [ 2.294677] NET: Registered protocol family 17 [ 2.300292] NET: Registered protocol family 15 [ 2.304962] Key type dns_resolver registered [ 2.311126] omap2_set_init_voltage: unable to find boot up OPP for vdd_core [ 2.318695] mmcblk0: p1 [ 2.322448] omap2_set_init_voltage: unable to set vdd_core [ 2.328918] omap3_pm_off_mode_enable(1) [ 2.333374] ThumbEE CPU extension supported. [ 2.337982] Registering SWP/SWPB emulation handler [ 2.343017] SmartReflex Class3 initialized [ 2.348602] Loading compiled-in X.509 certificates [ 2.372772] platform 6e000000.gpmc: Retrying from deferred list [ 2.379302] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_gpmc_pins selector=7 [ 2.388366] omap-gpmc 6e000000.gpmc: GPMC revision 5.0 [ 2.393737] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000 [ 2.401916] omap2-onenand 4000000.onenand: initializing on CS0 (0x04000000), va (ptrval), DMA mode [ 2.411804] OneNAND Manufacturer: Samsung (0xec) [ 2.416656] Muxed OneNAND 512MB 1.8V 16-bit (0x50) [ 2.421752] OneNAND version = 0x0232 [ 2.425476] Chip support all block unlock [ 2.429748] Chip has 4KiB pagesize [ 2.433288] Chip has cache program feature [ 2.439147] Scanning device for bad blocks [ 2.546783] onenand_bbt_wait: ecc 0xaaaa ctrl 0x0400 intr 0x8080 addr1 0x34b addr8 0x0 [ 2.555114] OneNAND eraseblock 843 is an initial bad block [ 2.708435] omap2-onenand 4000000.onenand: optimized timings for 83 MHz [ 2.715423] 5 fixed-partitions partitions found on MTD device 4000000.onenand [ 2.722930] Creating 5 MTD partitions on "4000000.onenand": [ 2.728790] 0x000000000000-0x000000080000 : "X-Loader" [ 2.735748] 0x000000080000-0x000000240000 : "U-Boot" [ 2.742858] 0x000000240000-0x000000280000 : "U-Boot Env" [ 2.750335] 0x000000280000-0x000000880000 : "Kernel" [ 2.757324] 0x000000880000-0x000020000000 : "File System" [ 2.767120] platform wlan_en_regulator: Retrying from deferred list [ 2.774658] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_wlan_pins selector=8 [ 2.784088] platform bt_en_regulator: Retrying from deferred list [ 2.791046] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_bt_pins selector=9 [ 2.800079] platform 480b4000.mmc: Retrying from deferred list [ 2.806610] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_wlan_irq_pin found selector=10 [ 2.925628] ubi0: default fastmap pool size: 100 [ 2.932708] ubi0: default fastmap WL pool size: 50 [ 2.937835] ubi0: attaching mtd4 [ 2.942260] onenand_wait: correctable ECC error = 0x5555 [ 2.948791] ubi0: fixable bit-flip detected at PEB 6 [ 2.954711] omap_hsmmc 480b4000.mmc: card claims to support voltages below defined range [ 2.975524] onenand_wait: correctable ECC error = 0x5555 [ 2.981170] ubi0: fixable bit-flip detected at PEB 187 [ 2.998565] mmc1: new high speed SDIO card at address 0001 [ 3.015594] onenand_wait: correctable ECC error = 0x5555 [ 3.021789] ubi0: fixable bit-flip detected at PEB 465 [ 3.088165] onenand_wait: correctable ECC error = 0x5555 [ 3.093749] ubi0: fixable bit-flip detected at PEB 1326 [ 3.115264] onenand_wait: correctable ECC error = 0x5555 [ 3.120941] ubi0: fixable bit-flip detected at PEB 1554 [ 3.155120] onenand_wait: correctable ECC error = 0x5555 [ 3.160766] ubi0: fixable bit-flip detected at PEB 1960 [ 3.169982] ubi0: scanning is finished [ 3.180938] ubi0: attached mtd4 (name "File System", size 503 MiB) [ 3.187408] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes [ 3.195007] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024 [ 3.202239] ubi0: VID header offset: 1024 (aligned 1024), data offset: 4096 [ 3.209625] ubi0: good PEBs: 2013, bad PEBs: 1, corrupted PEBs: 0 [ 3.216003] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 3.223693] ubi0: max/mean erase counter: 59/35, WL threshold: 4096, image sequence number: 163025748 [ 3.233428] ubi0: available PEBs: 0, total reserved PEBs: 2013, PEBs reserved for bad PEB handling: 39 [ 3.243255] ubi0: background thread "ubi_bgt0d" started, PID 1038 [ 3.250701] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 3.259368] input: gpio-keys-wwan-wakeup as /devices/platform/gpio-keys-wwan-wakeup/input/input1 [ 3.269775] omap_gpio 49056000.gpio: Could not set line 16 debounce to 10000 microseconds (-22) [ 3.279602] input: antenna-detect as /devices/platform/antenna-detect/input/input2 [ 3.289245] twl_rtc 48070000.i2c:twl@48:rtc: setting system clock to 2018-06-20 15:27:03 UTC (1529508423) [ 3.299621] sr_init: No PMIC hook to init smartreflex [ 3.305633] smartreflex 480cb000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.315155] smartreflex 480c9000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.326202] VAUX3: disabling [ 3.330200] VDAC: disabling [ 3.333648] VUSB1V5: disabling [ 3.337310] VUSB1V8: disabling [ 3.341033] VUSB3V1: disabling [ 3.344635] wlan-en-regulator: disabling [ 3.348876] bt-en-regulator: disabling [ 3.352813] ALSA device list: [ 3.355895] No soundcards found. [ 3.390380] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null) [ 3.399322] VFS: Mounted root (ext4 filesystem) on device 179:1. [ 3.419891] devtmpfs: mounted [ 3.424865] Freeing unused kernel memory: 1024K Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory INIT: version 2.88 booting [info] Using makefile-style concurrent boot in runlevel S. [....] Starting the hotplug events dispatcher: udevd[ 4.826904] systemd-udevd[1171]: starting version 215 [ 4.909637] random: udevd: uninitialized urandom read (16 bytes read) [ 4.928771] random: udevd: uninitialized urandom read (16 bytes read) . [ ok ....] Synthesizing the initial hotplug events...[ 5.354217] omapdss: unknown parameter 'def_disp' ignored done. [....] Waiting for /dev to be fully populated...[ 5.423675] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_dss_dpi_pins selector=10 ^[[c[ 5.465637] omapdss_dss 48050000.dss: 48050000.dss supply vdda_video not found, using dummy regulator [ 5.506561] DSS: OMAP DSS rev 2.0 [ 5.546752] omapdss_dss 48050000.dss: bound 48050400.dispc (ops dispc_component_ops [omapdss]) [ 5.579254] ehci-omap: OMAP-EHCI Host Controller driver [ 5.603240] omapdss_dss 48050000.dss: bound 48050c00.encoder (ops venc_component_ops [omapdss]) [ 5.620239] gnss: GNSS driver registered with major 243 [ 5.667999] ehci-omap 48064800.ehci: EHCI Host Controller [ 5.694305] twl4030_madc 48070000.i2c:twl@48:madc: 48070000.i2c:twl@48:madc supply vusb3v1 not found, using dummy regulator [ 5.721466] ehci-omap 48064800.ehci: new USB bus registered, assigned bus number 1 [ 5.741333] input: twl4030:vibrator as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:audio/twl4030-vibra/input/input3 [ 5.797332] ehci-omap 48064800.ehci: irq 93, io mem 0x48064800 [ 5.822723] input: twl4030_pwrbutton as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:pwrbutton/input/input4 [ 5.868011] ehci-omap 48064800.ehci: USB 2.0 started, EHCI 1.00 [ 5.894683] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 5.955078] twl4030_gpio twl4030-gpio: can't dispatch IRQs from modules [ 5.987854] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 5.995422] usb usb1: Product: EHCI Host Controller [ 6.039337] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp1_pins selector=11 [ 6.073547] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.118804] media: Linux media interface: v0.10 [ 6.130340] usb usb1: Manufacturer: Linux 4.17.0-letux+ ehci_hcd [ 6.145111] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp2_pins selector=12 [ 6.158233] twl4030_usb 48070000.i2c:twl@48:twl4030-usb: Initialized TWL4030 USB module [ 6.188323] input: accelerometer-iio-input-bridge as /devices/virtual/input/input5 [ 6.222167] usb usb1: SerialNumber: 48064800.ehci [ 6.239501] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_penirq_pins selector=13 [ 6.250793] hub 1-0:1.0: USB hub found [ 6.257385] Linux video capture interface: v2.00 [ 6.270050] hub 1-0:1.0: 3 ports detected [ 6.277862] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp3_pins selector=14 [ 6.293823] input: TSC2007 Touchscreen as /devices/platform/68000000.ocp/48072000.i2c/i2c-1/1-0048/input/input6 [ 6.327362] pinctrl_generic_add_group: pctldev=ee3b6200 name=hdq_pins selector=15 [ 6.367858] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode [ 6.380981] bmp280 1-0076: 1-0076 supply vddd not found, using dummy regulator [ 6.407989] bmp280 1-0076: 1-0076 supply vdda not found, using dummy regulator [ 6.416442] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 6.426696] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver [ 6.460388] bq27xxx_battery_setup [ 6.463867] bq27xxx_battery_setup: dm_regs= (null) [ 6.477020] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix [ 6.487304] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2 [ 6.497406] bq27xxx_battery_settings [ 6.506469] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088450540 [ 6.548034] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins selector=16 [ 6.556976] pcs_dt_free_map [ 6.568084] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 6.576721] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 6.665863] usb usb2: Product: MUSB HDRC host driver [ 6.718078] usb usb2: Manufacturer: Linux 4.17.0-letux+ musb-hcd [ 6.747894] usb usb2: SerialNumber: musb-hdrc.0.auto [ 6.767547] hub 2-0:1.0: USB hub found [ 6.779754] i2c 1-0030: Retrying from deferred list [ 6.785064] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=17 [ 6.808044] pcs_dt_free_map [ 6.825256] hub 2-0:1.0: 1 port detected [ 6.840759] i2c 1-0030: Retrying from deferred list [ 6.846069] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=17 [ 6.868041] pcs_dt_free_map [ 6.871032] i2c 1-0030: Retrying from deferred list [ 6.876312] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=17 [ 6.905578] pcs_dt_free_map [ 6.913360] i2c 1-0030: Retrying from deferred list [ 6.919830] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp4_pins selector=17 [ 6.972503] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=18 [ 6.989471] pcs_dt_free_map [ 6.992462] i2c 1-0030: Retrying from deferred list [ 7.008026] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=18 [ 7.017547] pcs_dt_free_map [ 7.152526] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.260528] iio_charge:-745 [ 7.264404] pinctrl_generic_add_group: pctldev=ee3b6200 name=backlight_pins_pinmux selector=18 [ 7.273986] i2c 1-0030: Retrying from deferred list [ 7.294219] wwan_on_off_init: wwan_on_off_init [ 7.315032] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=19 [ 7.325683] pps_core: LinuxPPS API ver. 1 registered [ 7.331237] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.340301] pcs_dt_free_map [ 7.378021] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.389007] pcs_dt_free_map [ 7.407989] i2c 1-0030: Retrying from deferred list [ 7.413299] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=19 [ 7.436614] pcs_dt_free_map [ 7.443389] platform backlight: Retrying from deferred list [ 7.449554] pinctrl_generic_add_group: pctldev=ee3b6200 name=modem_pins selector=19 [ 7.458282] pinctrl_generic_add_group: pctldev=ee3b6200 name=backlight_pins_pinmux found selector=20 [ 7.476287] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.500762] i2c 1-0030: Retrying from deferred list [ 7.506072] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 7.519012] wwan_on_off_probe: wwan_on_off_probe() [ 7.524108] wwan_on_off_probe: onoff = 186 indicator = 496 act low: 0 usb_phy = -298843632 [ 7.534515] pcs_dt_free_map [ 7.537506] i2c 1-0030: Retrying from deferred list [ 7.552062] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 7.571563] pcs_dt_free_map [ 7.599273] wwan_on_off_probe: wwan_on_off_probe() wwan=(ptrval) [ 7.658325] wwan_on_off_is_powered_on: gpio value = 0, inverted=0 [ 7.683746] wwan_on_off_is_powered_on: return 'false' [ 7.728637] wwan_on_off_rfkill_set_block: blocked: 1 [ 7.733825] wwan_on_off_set_power:on = 0 [ 7.777282] wwan_on_off_is_powered_on: gpio value = 0, inverted=0 [ 7.838043] wwan_on_off_is_powered_on: return 'false' [ 7.857971] wwan_on_off_set_power: state 0 [ 7.862274] wwan_on_off_set_power: done [ 7.886474] wwan_on_off_probe: successfully probed [ 7.928039] i2c 1-0030: Retrying from deferred list [ 7.933410] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 7.956970] pcs_dt_free_map [ 8.027526] twl4030_voice_set_tristate codec=(ptrval) 1 [ 8.076599] TPS Voice IF is tristated [ 8.098602] omap-mcbsp 49022000.mcbsp: ASoC: Failed to create component debugfs directory [ 8.138763] omap-twl4030 sound: twl4030-hifi <-> 49022000.mcbsp mapping ok [ 8.205352] i2c 1-0030: Retrying from deferred list [ 8.211120] omap-mcbsp 49026000.mcbsp: ASoC: Failed to create component debugfs directory [ 8.220001] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 8.234161] pcs_dt_free_map [ 8.260253] asoc-simple-card sound_telephony: gtm601 <-> 49026000.mcbsp mapping ok [ 8.309265] i2c 1-0030: Retrying from deferred list [ 8.314666] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_pps_pins selector=20 [ 8.347900] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 8.357421] pcs_dt_free_map [ 8.373474] pps pps0: new PPS source pps.-1 [ 8.388671] pps pps0: Registered IRQ 165 as PPS source [ 8.394134] i2c 1-0030: Retrying from deferred list [ 8.403167] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 8.422973] pcs_dt_free_map [ 8.803588] omapdrm omapdrm.0: DMM not available, disable DMM support [ 8.866058] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 8.914916] [drm] No driver support for vblank timestamp query. [ 8.948181] omapdrm omapdrm.0: Tiled buffers require DMM [ 9.069122] Console: switching to colour frame buffer device 60x40 [ 9.092712] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 9.128784] omapdrm omapdrm.0: fb0: omapdrm frame buffer device [ 9.153717] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 9.161987] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0 [ 9.206054] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 9.224609] cfg80211: failed to load regulatory.db [ 9.237426] i2c 1-0030: Retrying from deferred list [ 9.245788] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 9.268066] pcs_dt_free_map [ 9.271087] platform sound_bluetooth: Retrying from deferred list [ 9.286132] platform sound_fmradio: Retrying from deferred list [ 9.444854] voice ctl route: 0 [ 9.625823] i2c 1-0030: Retrying from deferred list [ 9.635070] wlcore: ERROR ti-connectivity/wl18xx-conf.bin configuration binary size is wrong, expected 1229 got 1221 [ 9.649627] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 9.668121] wlcore: WARNING falling back to default config [ 9.678619] pcs_dt_free_map [ 9.681701] platform sound_bluetooth: Retrying from deferred list [ 9.691955] platform sound_fmradio: Retrying from deferred list [ 10.070709] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11) [ 10.082916] wlcore: WARNING Detected unconfigured mac address in nvs, derive from fuse instead. [ 10.082916] [ 10.093841] wlcore: WARNING This default nvs file can be removed from the file system [ 10.093841] [ 10.135223] wlcore: loaded [ 10.163452] wl18xx_driver wl18xx.1.auto wlan1: renamed from wlan0 [ 10.200256] systemd-udevd[1192]: renamed network interface wlan0 to wlan1 done.
...
And checking dmesg:
root@letux:~# dmesg|grep "dt_free|generic_add|deferred" [ 0.748870] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_hsusb2_pins selector=0 [ 0.750885] pinctrl_generic_add_group: pctldev=ee3b6000 name=pinmux_hsusb2_2_pins selector=0 [ 0.751800] pinctrl_generic_add_group: pctldev=ee47fe80 name=pinmux_mcbsp1_devconf0_pins selector=0 [ 0.752563] pinctrl_generic_add_group: pctldev=ee47fd80 name=pinmux_tv_acbias_devconf1_pins selector=0 [ 0.769714] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_uart1_pins selector=1 [ 0.771545] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_uart2_pins selector=2 [ 0.772827] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_uart3_pins selector=3 [ 1.799835] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_twl4030_pins selector=4 [ 1.809112] pinctrl_generic_add_group: pctldev=ee3b6080 name=pinmux_twl4030_vpins selector=0 [ 1.972015] pinctrl_generic_add_group: pctldev=ee3b6000 name=spi_gpio_pinmux selector=1 [ 2.166839] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mmc1_pins selector=5 [ 2.200958] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_wlan_irq_pin selector=6 [ 2.220550] pcs_dt_free_map [ 2.372772] platform 6e000000.gpmc: Retrying from deferred list [ 2.379302] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_gpmc_pins selector=7 [ 2.767120] platform wlan_en_regulator: Retrying from deferred list [ 2.774658] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_wlan_pins selector=8 [ 2.784088] platform bt_en_regulator: Retrying from deferred list [ 2.791046] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_bt_pins selector=9 [ 2.800079] platform 480b4000.mmc: Retrying from deferred list [ 2.806610] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_wlan_irq_pin found selector=10 [ 5.423675] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_dss_dpi_pins selector=10 [ 6.039337] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp1_pins selector=11 [ 6.073547] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.145111] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp2_pins selector=12 [ 6.239501] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_penirq_pins selector=13 [ 6.277862] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp3_pins selector=14 [ 6.327362] pinctrl_generic_add_group: pctldev=ee3b6200 name=hdq_pins selector=15 [ 6.548034] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins selector=16 [ 6.556976] pcs_dt_free_map [ 6.779754] i2c 1-0030: Retrying from deferred list [ 6.785064] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=17 [ 6.808044] pcs_dt_free_map [ 6.840759] i2c 1-0030: Retrying from deferred list [ 6.846069] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=17 [ 6.868041] pcs_dt_free_map [ 6.871032] i2c 1-0030: Retrying from deferred list [ 6.876312] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=17 [ 6.905578] pcs_dt_free_map [ 6.913360] i2c 1-0030: Retrying from deferred list [ 6.919830] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_mcbsp4_pins selector=17 [ 6.972503] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=18 [ 6.989471] pcs_dt_free_map [ 6.992462] i2c 1-0030: Retrying from deferred list [ 7.008026] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=18 [ 7.017547] pcs_dt_free_map [ 7.264404] pinctrl_generic_add_group: pctldev=ee3b6200 name=backlight_pins_pinmux selector=18 [ 7.273986] i2c 1-0030: Retrying from deferred list [ 7.315032] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=19 [ 7.340301] pcs_dt_free_map [ 7.389007] pcs_dt_free_map [ 7.407989] i2c 1-0030: Retrying from deferred list [ 7.413299] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=19 [ 7.436614] pcs_dt_free_map [ 7.443389] platform backlight: Retrying from deferred list [ 7.449554] pinctrl_generic_add_group: pctldev=ee3b6200 name=modem_pins selector=19 [ 7.458282] pinctrl_generic_add_group: pctldev=ee3b6200 name=backlight_pins_pinmux found selector=20 [ 7.500762] i2c 1-0030: Retrying from deferred list [ 7.506072] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 7.534515] pcs_dt_free_map [ 7.537506] i2c 1-0030: Retrying from deferred list [ 7.552062] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 7.571563] pcs_dt_free_map [ 7.928039] i2c 1-0030: Retrying from deferred list [ 7.933410] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 7.956970] pcs_dt_free_map [ 8.205352] i2c 1-0030: Retrying from deferred list [ 8.220001] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=20 [ 8.234161] pcs_dt_free_map [ 8.309265] i2c 1-0030: Retrying from deferred list [ 8.314666] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_pps_pins selector=20 [ 8.347900] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 8.357421] pcs_dt_free_map [ 8.394134] i2c 1-0030: Retrying from deferred list [ 8.403167] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 8.422973] pcs_dt_free_map [ 9.237426] i2c 1-0030: Retrying from deferred list [ 9.245788] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 9.268066] pcs_dt_free_map [ 9.271087] platform sound_bluetooth: Retrying from deferred list [ 9.286132] platform sound_fmradio: Retrying from deferred list [ 9.625823] i2c 1-0030: Retrying from deferred list [ 9.649627] pinctrl_generic_add_group: pctldev=ee3b6200 name=pinmux_camera_pins found selector=21 [ 9.678619] pcs_dt_free_map [ 9.681701] platform sound_bluetooth: Retrying from deferred list [ 9.691955] platform sound_fmradio: Retrying from deferred list root@letux:~#
Unfortunately I have not found a way to printk the name of the pinctrl in calls to pcs_dt_free_map so it is not clear what is freed.
BR, Nikolaus
* H. Nikolaus Schaller hns@goldelico.com [180620 15:36]:
[ 7.154541] i2c 1-0030: Retrying from deferred list [ 7.164642] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.174285] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 7.196868] pcs_dt_free_map [ 7.205200] i2c 1-0030: Retrying from deferred list [ 7.217590] bq27xxx_battery_setup [ 7.225982] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.235565] bq27xxx_battery_setup: dm_regs= (null) [ 7.248168] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix
Hmm what's up with this warning above? Is that NULL related to pinctrl issue?
[ 7.257446] bq27xxx_battery_settings [ 7.261535] pcs_dt_free_map [ 7.274200] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088290796 [ 7.322113] pcs_dt_free_map [ 7.356658] i2c 1-0030: Retrying from deferred list
[ 7.363830] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.373260] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.386840] pcs_dt_free_map [ 7.394378] platform backlight: Retrying from deferred list [ 7.406372] pinctrl_generic_get_group_name: group>name is NULL
So what's the selector number here when group->name == NULL? Still 19 (or again 19 for a new entry) or something else?
Regards,
Tony
Hi Tony,
Am 21.06.2018 um 08:42 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180620 15:36]:
[ 7.154541] i2c 1-0030: Retrying from deferred list [ 7.164642] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.174285] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 7.196868] pcs_dt_free_map [ 7.205200] i2c 1-0030: Retrying from deferred list [ 7.217590] bq27xxx_battery_setup [ 7.225982] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.235565] bq27xxx_battery_setup: dm_regs= (null) [ 7.248168] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix
Hmm what's up with this warning above? Is that NULL related to pinctrl issue?
No. It is just that the dev->name is a NULL:
https://elixir.bootlin.com/linux/v4.18-rc1/source/drivers/hwmon/hwmon.c#L556
There are some historic rules for hwmon devices and a "-" is not allowed.
On successful boot we have the same message.
[ 7.257446] bq27xxx_battery_settings [ 7.261535] pcs_dt_free_map [ 7.274200] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088290796 [ 7.322113] pcs_dt_free_map [ 7.356658] i2c 1-0030: Retrying from deferred list
[ 7.363830] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.373260] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.386840] pcs_dt_free_map [ 7.394378] platform backlight: Retrying from deferred list [ 7.406372] pinctrl_generic_get_group_name: group>name is NULL
So what's the selector number here when group->name == NULL? Still 19 (or again 19 for a new entry) or something else?
Ok, I'll try to printk for this.
BR and thanks, Nikolaus
Hi Tony,
Am 21.06.2018 um 08:42 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180620 15:36]:
[ 7.154541] i2c 1-0030: Retrying from deferred list [ 7.164642] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.174285] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 7.196868] pcs_dt_free_map [ 7.205200] i2c 1-0030: Retrying from deferred list [ 7.217590] bq27xxx_battery_setup [ 7.225982] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.235565] bq27xxx_battery_setup: dm_regs= (null) [ 7.248168] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix
Hmm what's up with this warning above? Is that NULL related to pinctrl issue?
[ 7.257446] bq27xxx_battery_settings [ 7.261535] pcs_dt_free_map [ 7.274200] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088290796 [ 7.322113] pcs_dt_free_map [ 7.356658] i2c 1-0030: Retrying from deferred list
[ 7.363830] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.373260] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.386840] pcs_dt_free_map [ 7.394378] platform backlight: Retrying from deferred list [ 7.406372] pinctrl_generic_get_group_name: group>name is NULL
So what's the selector number here when group->name == NULL? Still 19 (or again 19 for a new entry) or something else?
I tried to answer this - but today is a bad day to see strcmp(NULL)...
But adding more printk did show something strange:
root@letux:~# dmesg|fgrep generic_add [ 0.759002] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_hsusb2_pins selector=0 [ 0.760894] pinctrl_generic_add_group: pctldev=ee487f80 name=pinmux_hsusb2_2_pins selector=0 [ 0.761627] pinctrl_generic_add_group: pctldev=ee487e00 name=pinmux_mcbsp1_devconf0_pins selector=0 [ 0.762451] pinctrl_generic_add_group: pctldev=ee487d00 name=pinmux_tv_acbias_devconf1_pins selector=0 [ 0.779693] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_uart1_pins selector=1 [ 0.781463] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_uart2_pins selector=2 [ 0.782592] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_uart3_pins selector=3 [ 1.809814] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_twl4030_pins selector=4 [ 1.819122] pinctrl_generic_add_group: pctldev=ee37b000 name=pinmux_twl4030_vpins selector=0 [ 1.982299] pinctrl_generic_add_group: pctldev=ee487f80 name=spi_gpio_pinmux selector=1 [ 2.178070] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mmc1_pins selector=5 [ 2.214752] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_wlan_irq_pin selector=6 [ 2.392944] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_gpmc_pins selector=7 [ 2.787231] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_wlan_pins selector=8 [ 2.804107] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_bt_pins selector=9 [ 2.820159] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_wlan_irq_pin found selector=10 [ 5.488616] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_dss_dpi_pins selector=10 [ 6.313049] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp1_pins selector=11 [ 6.363708] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_penirq_pins selector=12 [ 6.417938] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp2_pins selector=13 [ 6.597686] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins selector=14 [ 6.766235] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=15 [ 6.792480] pinctrl_generic_add_group: pctldev=ee37b180 name=hdq_pins selector=15 [ 6.853607] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=16 [ 6.892120] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=16 [ 6.973480] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=16 [ 7.012908] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp3_pins selector=16 [ 7.092163] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=17 [ 7.122650] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp4_pins selector=17 [ 7.197998] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=18 [ 7.238037] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=18 [ 7.331420] pinctrl_generic_add_group: pctldev=ee37b180 name=backlight_pins_pinmux selector=18 [ 7.541961] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=19 [ 7.570434] pinctrl_generic_add_group: pctldev=ee37b180 name=modem_pins selector=19 [ 7.617340] pinctrl_generic_add_group: pctldev=ee37b180 name=backlight_pins_pinmux found selector=20 [ 7.675689] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.013305] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.046417] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.338043] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.435729] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.461212] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_pps_pins selector=20 [ 8.554809] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=21 [ 9.554016] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=21 [ 9.781677] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=21 root@letux:~#
The code is:
static int pinctrl_generic_group_name_to_selector(struct pinctrl_dev *pctldev, const char *function) { const struct pinctrl_ops *ops = pctldev->desc->pctlops; unsigned ngroups = ops->get_groups_count(pctldev); unsigned selector = 0;
// printk("%s: function=%s%d", __func__, name);
/* See if this pctldev has this group */ while (selector < ngroups) { const char *gname = ops->get_group_name(pctldev, selector);
if (!gname || !function) { printk("%s: pctldev = %px function = %s\n", __func__, pctldev, function); printk(" strcmp(%s, %s)\n", __func__, function, gname); printk(" get_group_name() = %pF\n", ops->get_group_name); printk(" ngroups = %u\n", ngroups); printk(" selector = %u\n", selector); // if (pctldev->dev) // printk(" pctldev->dev.name = %ps\n", pctldev->dev->name); dump_stack(); }
if (!strcmp(function, gname)) return selector;
selector++; }
return -EINVAL; }
/** * pinctrl_generic_add_group() - adds a new pin group * @pctldev: pin controller device * @name: name of the pin group * @pins: pins in the pin group * @num_pins: number of pins in the pin group * @data: pin controller driver specific data * * Note that the caller must take care of locking. */ int pinctrl_generic_add_group(struct pinctrl_dev *pctldev, const char *name, int *pins, int num_pins, void *data) { struct group_desc *group; int selector; // int err;
selector = pinctrl_generic_group_name_to_selector(pctldev, name); if (selector >= 0) { printk("%s: pctldev=%px name=%s found selector=%d\n", __func__, pctldev, name, pctldev->num_groups); return selector; }
selector = pctldev->num_groups;
group = devm_kzalloc(pctldev->dev, sizeof(*group), GFP_KERNEL); if (!group) return -ENOMEM;
printk("%s: pctldev=%px name=%s selector=%d\n", __func__, pctldev, name, pctldev->num_groups);
// if(strcmp(name, "pinmux_camera_pins") == 0) dump_stack(); // who calls me?
group->name = name; group->pins = pins; group->num_pins = num_pins; group->data = data;
// err = radix_tree_insert(&pctldev->pin_group_tree, selector, group);
// if (err) // printk("%s: radix tree error %d\n", __func__, err);
pctldev->num_groups++;
return selector; } EXPORT_SYMBOL_GPL(pinctrl_generic_add_group);
The strange thing is that "pinmux_camera_pins found" increases every now and then which means that the slot index (aka selector) in the radix tree is renumbered.
So this means this happens:
* a driver probes * it gets an entry in the radix tree * deferred probing fails * the entry stays in the radix tree * the next driver being probed does insert at the same index * but the existing entry stays and is shifted to an index one higher * if code is running concurrently there may be a mismatch of selector numbers
An idea to fix it: always append to the real and of the tree and ignore pctldev->num_groups when assigning a new entry.
That could mean replacing
selector = pctldev->num_groups; ... pctldev->num_groups++;
by
selector = ops->get_groups_count(pctldev);
This means we always assign a selector one higher than the last one that exists.
Unfortunately I can't test this idea if it solves the strcmp(NULL) issue on my current setup.
What do you think?
BR, Nikolaus
Am 21.06.2018 um 19:16 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi Tony,
Am 21.06.2018 um 08:42 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180620 15:36]:
[ 7.154541] i2c 1-0030: Retrying from deferred list [ 7.164642] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.174285] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 7.196868] pcs_dt_free_map [ 7.205200] i2c 1-0030: Retrying from deferred list [ 7.217590] bq27xxx_battery_setup [ 7.225982] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.235565] bq27xxx_battery_setup: dm_regs= (null) [ 7.248168] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix
Hmm what's up with this warning above? Is that NULL related to pinctrl issue?
[ 7.257446] bq27xxx_battery_settings [ 7.261535] pcs_dt_free_map [ 7.274200] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088290796 [ 7.322113] pcs_dt_free_map [ 7.356658] i2c 1-0030: Retrying from deferred list
[ 7.363830] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.373260] pinctrl_generic_add_group: pctldev=ee3bc200 name=pinmux_camera_pins found selector=19 [ 7.386840] pcs_dt_free_map [ 7.394378] platform backlight: Retrying from deferred list [ 7.406372] pinctrl_generic_get_group_name: group>name is NULL
So what's the selector number here when group->name == NULL? Still 19 (or again 19 for a new entry) or something else?
I tried to answer this - but today is a bad day to see strcmp(NULL)...
But adding more printk did show something strange:
root@letux:~# dmesg|fgrep generic_add [ 0.759002] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_hsusb2_pins selector=0 [ 0.760894] pinctrl_generic_add_group: pctldev=ee487f80 name=pinmux_hsusb2_2_pins selector=0 [ 0.761627] pinctrl_generic_add_group: pctldev=ee487e00 name=pinmux_mcbsp1_devconf0_pins selector=0 [ 0.762451] pinctrl_generic_add_group: pctldev=ee487d00 name=pinmux_tv_acbias_devconf1_pins selector=0 [ 0.779693] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_uart1_pins selector=1 [ 0.781463] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_uart2_pins selector=2 [ 0.782592] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_uart3_pins selector=3 [ 1.809814] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_twl4030_pins selector=4 [ 1.819122] pinctrl_generic_add_group: pctldev=ee37b000 name=pinmux_twl4030_vpins selector=0 [ 1.982299] pinctrl_generic_add_group: pctldev=ee487f80 name=spi_gpio_pinmux selector=1 [ 2.178070] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mmc1_pins selector=5 [ 2.214752] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_wlan_irq_pin selector=6 [ 2.392944] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_gpmc_pins selector=7 [ 2.787231] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_wlan_pins selector=8 [ 2.804107] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_bt_pins selector=9 [ 2.820159] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_wlan_irq_pin found selector=10 [ 5.488616] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_dss_dpi_pins selector=10 [ 6.313049] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp1_pins selector=11 [ 6.363708] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_penirq_pins selector=12 [ 6.417938] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp2_pins selector=13 [ 6.597686] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins selector=14 [ 6.766235] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=15 [ 6.792480] pinctrl_generic_add_group: pctldev=ee37b180 name=hdq_pins selector=15 [ 6.853607] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=16 [ 6.892120] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=16 [ 6.973480] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=16 [ 7.012908] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp3_pins selector=16 [ 7.092163] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=17 [ 7.122650] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_mcbsp4_pins selector=17 [ 7.197998] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=18 [ 7.238037] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=18 [ 7.331420] pinctrl_generic_add_group: pctldev=ee37b180 name=backlight_pins_pinmux selector=18 [ 7.541961] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=19 [ 7.570434] pinctrl_generic_add_group: pctldev=ee37b180 name=modem_pins selector=19 [ 7.617340] pinctrl_generic_add_group: pctldev=ee37b180 name=backlight_pins_pinmux found selector=20 [ 7.675689] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.013305] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.046417] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.338043] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.435729] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=20 [ 8.461212] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_pps_pins selector=20 [ 8.554809] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=21 [ 9.554016] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=21 [ 9.781677] pinctrl_generic_add_group: pctldev=ee37b180 name=pinmux_camera_pins found selector=21 root@letux:~#
The code is:
static int pinctrl_generic_group_name_to_selector(struct pinctrl_dev *pctldev, const char *function) { const struct pinctrl_ops *ops = pctldev->desc->pctlops; unsigned ngroups = ops->get_groups_count(pctldev); unsigned selector = 0;
// printk("%s: function=%s%d", __func__, name);
/* See if this pctldev has this group */ while (selector < ngroups) { const char *gname = ops->get_group_name(pctldev, selector);
if (!gname || !function) { printk("%s: pctldev = %px function = %s\n", __func__, pctldev, function); printk(" strcmp(%s, %s)\n", __func__, function, gname); printk(" get_group_name() = %pF\n", ops->get_group_name); printk(" ngroups = %u\n", ngroups); printk(" selector = %u\n", selector); // if (pctldev->dev) // printk(" pctldev->dev.name = %ps\n", pctldev->dev->name); dump_stack(); }
if (!strcmp(function, gname)) return selector; selector++;
}
return -EINVAL; }
/**
- pinctrl_generic_add_group() - adds a new pin group
- @pctldev: pin controller device
- @name: name of the pin group
- @pins: pins in the pin group
- @num_pins: number of pins in the pin group
- @data: pin controller driver specific data
- Note that the caller must take care of locking.
*/ int pinctrl_generic_add_group(struct pinctrl_dev *pctldev, const char *name, int *pins, int num_pins, void *data) { struct group_desc *group; int selector; // int err;
selector = pinctrl_generic_group_name_to_selector(pctldev, name); if (selector >= 0) { printk("%s: pctldev=%px name=%s found selector=%d\n", __func__, pctldev, name, pctldev->num_groups);
well, my printk isn't correct! I'll check if the result is just an effect of the wrong printk.
return selector;
}
selector = pctldev->num_groups;
group = devm_kzalloc(pctldev->dev, sizeof(*group), GFP_KERNEL); if (!group) return -ENOMEM;
printk("%s: pctldev=%px name=%s selector=%d\n", __func__, pctldev, name, pctldev->num_groups);
// if(strcmp(name, "pinmux_camera_pins") == 0) dump_stack(); // who calls me?
group->name = name; group->pins = pins; group->num_pins = num_pins; group->data = data;
// err = radix_tree_insert(&pctldev->pin_group_tree, selector, group);
// if (err) // printk("%s: radix tree error %d\n", __func__, err);
pctldev->num_groups++;
return selector; } EXPORT_SYMBOL_GPL(pinctrl_generic_add_group);
The strange thing is that "pinmux_camera_pins found" increases every now and then which means that the slot index (aka selector) in the radix tree is renumbered.
So this means this happens:
- a driver probes
- it gets an entry in the radix tree
- deferred probing fails
- the entry stays in the radix tree
- the next driver being probed does insert at the same index
- but the existing entry stays and is shifted to an index one higher
- if code is running concurrently there may be a mismatch of selector numbers
An idea to fix it: always append to the real and of the tree and ignore pctldev->num_groups when assigning a new entry.
That could mean replacing
selector = pctldev->num_groups; ... pctldev->num_groups++;
by
selector = ops->get_groups_count(pctldev);
This means we always assign a selector one higher than the last one that exists.
Unfortunately I can't test this idea if it solves the strcmp(NULL) issue on my current setup.
What do you think?
BR, Nikolaus
http://projects.goldelico.com/p/gta04-kernel/ Letux-kernel mailing list Letux-kernel@openphoenux.org http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
* H. Nikolaus Schaller hns@goldelico.com [180621 17:48]:
selector = pinctrl_generic_group_name_to_selector(pctldev, name); if (selector >= 0) { printk("%s: pctldev=%px name=%s found selector=%d\n", __func__, pctldev, name, pctldev->num_groups);
well, my printk isn't correct! I'll check if the result is just an effect of the wrong printk.
Oh OK :)
Tony
Am 22.06.2018 um 09:16 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180621 17:48]:
selector = pinctrl_generic_group_name_to_selector(pctldev, name); if (selector >= 0) { printk("%s: pctldev=%px name=%s found selector=%d\n", __func__, pctldev, name, pctldev->num_groups);
well, my printk isn't correct! I'll check if the result is just an effect of the wrong printk.
Oh OK :)
Yes, they were wrong. Now here a log with correct printk. Looks sane on first impression:
root@letux:~# dmesg|grep "dt_free|generic_add|deferred" [ 0.759490] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_hsusb2_pins new selector=0 [ 0.761657] pinctrl_generic_add_group: pctldev=ee35ff80 name=pinmux_hsusb2_2_pins new selector=0 [ 0.762420] pinctrl_generic_add_group: pctldev=ee35fe00 name=pinmux_mcbsp1_devconf0_pins new selector=0 [ 0.763092] pinctrl_generic_add_group: pctldev=ee35fd00 name=pinmux_tv_acbias_devconf1_pins new selector=0 [ 0.780242] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart1_pins new selector=1 [ 0.781921] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart2_pins new selector=2 [ 0.783050] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart3_pins new selector=3 [ 1.812499] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_twl4030_pins new selector=4 [ 1.822235] pinctrl_generic_add_group: pctldev=ee445000 name=pinmux_twl4030_vpins new selector=0 [ 1.989715] pinctrl_generic_add_group: pctldev=ee35ff80 name=spi_gpio_pinmux new selector=1 [ 2.184509] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mmc1_pins new selector=5 [ 2.221252] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_irq_pin new selector=6 [ 2.241210] pcs_dt_free_map: pctldev=ee445180 [ 2.394989] platform 6e000000.gpmc: Retrying from deferred list [ 2.401672] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_gpmc_pins new selector=7 [ 2.789489] platform wlan_en_regulator: Retrying from deferred list [ 2.796203] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_pins new selector=8 [ 2.806518] platform bt_en_regulator: Retrying from deferred list [ 2.813354] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_bt_pins new selector=9 [ 2.822723] platform 480b4000.mmc: Retrying from deferred list [ 2.829711] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_irq_pin found selector=6 [ 5.385803] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_dss_dpi_pins new selector=10 [ 6.019317] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.066497] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.080902] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.143432] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_penirq_pins new selector=11 [ 6.218383] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp1_pins new selector=12 [ 6.282104] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp2_pins new selector=13 [ 6.424468] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins new selector=14 [ 6.473358] pcs_dt_free_map: pctldev=ee445180 [ 6.713745] i2c 1-0030: Retrying from deferred list [ 6.724761] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.742156] pcs_dt_free_map: pctldev=ee445180 [ 6.748229] pinctrl_generic_add_group: pctldev=ee445180 name=hdq_pins new selector=15 [ 6.756622] i2c 1-0030: Retrying from deferred list [ 6.762542] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.782073] pcs_dt_free_map: pctldev=ee445180 [ 6.795288] i2c 1-0030: Retrying from deferred list [ 6.804748] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.822540] pcs_dt_free_map: pctldev=ee445180 [ 6.890319] i2c 1-0030: Retrying from deferred list [ 6.895629] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.935729] pcs_dt_free_map: pctldev=ee445180 [ 6.951324] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp3_pins new selector=16 [ 6.960571] i2c 1-0030: Retrying from deferred list [ 7.028198] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.037719] pcs_dt_free_map: pctldev=ee445180 [ 7.057189] i2c 1-0030: Retrying from deferred list [ 7.062652] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp4_pins new selector=17 [ 7.136230] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.153869] pcs_dt_free_map: pctldev=ee445180 [ 7.164825] i2c 1-0030: Retrying from deferred list [ 7.174407] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.196655] pcs_dt_free_map: pctldev=ee445180 [ 7.216339] pinctrl_generic_add_group: pctldev=ee445180 name=backlight_pins_pinmux new selector=18 [ 7.405364] pcs_dt_free_map: pctldev=ee445180 [ 7.460327] i2c 1-0030: Retrying from deferred list [ 7.470367] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.491027] pcs_dt_free_map: pctldev=ee445180 [ 7.501129] platform backlight: Retrying from deferred list [ 7.513153] pinctrl_generic_add_group: pctldev=ee445180 name=backlight_pins_pinmux found selector=18 [ 7.563171] i2c 1-0030: Retrying from deferred list [ 7.574401] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.606201] pcs_dt_free_map: pctldev=ee445180 [ 7.729339] i2c 1-0030: Retrying from deferred list [ 7.734680] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.758361] pcs_dt_free_map: pctldev=ee445180 [ 7.763092] pinctrl_generic_add_group: pctldev=ee445180 name=modem_pins new selector=19 [ 8.287200] i2c 1-0030: Retrying from deferred list [ 8.301971] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.314514] pcs_dt_free_map: pctldev=ee445180 [ 8.392425] i2c 1-0030: Retrying from deferred list [ 8.397766] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.421295] pcs_dt_free_map: pctldev=ee445180 [ 8.425994] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_pps_pins new selector=20 [ 8.518798] i2c 1-0030: Retrying from deferred list [ 8.524169] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.548370] pcs_dt_free_map: pctldev=ee445180 [ 9.366851] platform sound_bluetooth: Retrying from deferred list [ 9.381958] platform sound_fmradio: Retrying from deferred list [ 9.396972] i2c 1-0030: Retrying from deferred list [ 9.407379] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 9.427551] pcs_dt_free_map: pctldev=ee445180 [ 9.583404] platform sound_bluetooth: Retrying from deferred list [ 9.616180] platform sound_fmradio: Retrying from deferred list [ 9.637329] i2c 1-0030: Retrying from deferred list [ 9.644073] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 9.654144] pcs_dt_free_map: pctldev=ee445180 root@letux:~#
And I didn't see the strcmp(NULL) any more. I already was suspecting that it is a Heisenbug: the more you study it, the less likely it appears.
Maybe the printk have some (positive) side-effect (internal locking)?
To test that I have reverted all patches with printk which produce the log from above. Only after removing the printk in pcs_dt_free_map(), the strcmp(NULL) came back.
Next I'll try to find out if I can add the other patches to see something...
BR, Nikolaus
Hi all,
Am 22.06.2018 um 13:34 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 22.06.2018 um 09:16 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180621 17:48]:
selector = pinctrl_generic_group_name_to_selector(pctldev, name); if (selector >= 0) { printk("%s: pctldev=%px name=%s found selector=%d\n", __func__, pctldev, name, pctldev->num_groups);
well, my printk isn't correct! I'll check if the result is just an effect of the wrong printk.
Oh OK :)
Yes, they were wrong. Now here a log with correct printk. Looks sane on first impression:
root@letux:~# dmesg|grep "dt_free|generic_add|deferred" [ 0.759490] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_hsusb2_pins new selector=0 [ 0.761657] pinctrl_generic_add_group: pctldev=ee35ff80 name=pinmux_hsusb2_2_pins new selector=0 [ 0.762420] pinctrl_generic_add_group: pctldev=ee35fe00 name=pinmux_mcbsp1_devconf0_pins new selector=0 [ 0.763092] pinctrl_generic_add_group: pctldev=ee35fd00 name=pinmux_tv_acbias_devconf1_pins new selector=0 [ 0.780242] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart1_pins new selector=1 [ 0.781921] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart2_pins new selector=2 [ 0.783050] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart3_pins new selector=3 [ 1.812499] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_twl4030_pins new selector=4 [ 1.822235] pinctrl_generic_add_group: pctldev=ee445000 name=pinmux_twl4030_vpins new selector=0 [ 1.989715] pinctrl_generic_add_group: pctldev=ee35ff80 name=spi_gpio_pinmux new selector=1 [ 2.184509] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mmc1_pins new selector=5 [ 2.221252] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_irq_pin new selector=6 [ 2.241210] pcs_dt_free_map: pctldev=ee445180 [ 2.394989] platform 6e000000.gpmc: Retrying from deferred list [ 2.401672] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_gpmc_pins new selector=7 [ 2.789489] platform wlan_en_regulator: Retrying from deferred list [ 2.796203] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_pins new selector=8 [ 2.806518] platform bt_en_regulator: Retrying from deferred list [ 2.813354] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_bt_pins new selector=9 [ 2.822723] platform 480b4000.mmc: Retrying from deferred list [ 2.829711] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_irq_pin found selector=6 [ 5.385803] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_dss_dpi_pins new selector=10 [ 6.019317] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.066497] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.080902] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.143432] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_penirq_pins new selector=11 [ 6.218383] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp1_pins new selector=12 [ 6.282104] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp2_pins new selector=13 [ 6.424468] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins new selector=14 [ 6.473358] pcs_dt_free_map: pctldev=ee445180 [ 6.713745] i2c 1-0030: Retrying from deferred list [ 6.724761] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.742156] pcs_dt_free_map: pctldev=ee445180 [ 6.748229] pinctrl_generic_add_group: pctldev=ee445180 name=hdq_pins new selector=15 [ 6.756622] i2c 1-0030: Retrying from deferred list [ 6.762542] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.782073] pcs_dt_free_map: pctldev=ee445180 [ 6.795288] i2c 1-0030: Retrying from deferred list [ 6.804748] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.822540] pcs_dt_free_map: pctldev=ee445180 [ 6.890319] i2c 1-0030: Retrying from deferred list [ 6.895629] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.935729] pcs_dt_free_map: pctldev=ee445180 [ 6.951324] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp3_pins new selector=16 [ 6.960571] i2c 1-0030: Retrying from deferred list [ 7.028198] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.037719] pcs_dt_free_map: pctldev=ee445180 [ 7.057189] i2c 1-0030: Retrying from deferred list [ 7.062652] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp4_pins new selector=17 [ 7.136230] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.153869] pcs_dt_free_map: pctldev=ee445180 [ 7.164825] i2c 1-0030: Retrying from deferred list [ 7.174407] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.196655] pcs_dt_free_map: pctldev=ee445180 [ 7.216339] pinctrl_generic_add_group: pctldev=ee445180 name=backlight_pins_pinmux new selector=18 [ 7.405364] pcs_dt_free_map: pctldev=ee445180 [ 7.460327] i2c 1-0030: Retrying from deferred list [ 7.470367] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.491027] pcs_dt_free_map: pctldev=ee445180 [ 7.501129] platform backlight: Retrying from deferred list [ 7.513153] pinctrl_generic_add_group: pctldev=ee445180 name=backlight_pins_pinmux found selector=18 [ 7.563171] i2c 1-0030: Retrying from deferred list [ 7.574401] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.606201] pcs_dt_free_map: pctldev=ee445180 [ 7.729339] i2c 1-0030: Retrying from deferred list [ 7.734680] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.758361] pcs_dt_free_map: pctldev=ee445180 [ 7.763092] pinctrl_generic_add_group: pctldev=ee445180 name=modem_pins new selector=19 [ 8.287200] i2c 1-0030: Retrying from deferred list [ 8.301971] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.314514] pcs_dt_free_map: pctldev=ee445180 [ 8.392425] i2c 1-0030: Retrying from deferred list [ 8.397766] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.421295] pcs_dt_free_map: pctldev=ee445180 [ 8.425994] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_pps_pins new selector=20 [ 8.518798] i2c 1-0030: Retrying from deferred list [ 8.524169] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.548370] pcs_dt_free_map: pctldev=ee445180 [ 9.366851] platform sound_bluetooth: Retrying from deferred list [ 9.381958] platform sound_fmradio: Retrying from deferred list [ 9.396972] i2c 1-0030: Retrying from deferred list [ 9.407379] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 9.427551] pcs_dt_free_map: pctldev=ee445180 [ 9.583404] platform sound_bluetooth: Retrying from deferred list [ 9.616180] platform sound_fmradio: Retrying from deferred list [ 9.637329] i2c 1-0030: Retrying from deferred list [ 9.644073] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 9.654144] pcs_dt_free_map: pctldev=ee445180 root@letux:~#
And I didn't see the strcmp(NULL) any more. I already was suspecting that it is a Heisenbug: the more you study it, the less likely it appears.
Maybe the printk have some (positive) side-effect (internal locking)?
To test that I have reverted all patches with printk which produce the log from above. Only after removing the printk in pcs_dt_free_map(), the strcmp(NULL) came back.
Next I'll try to find out if I can add the other patches to see something...
I think I now have a scenario with additional information. I removed the printk in pcs_dt_free_map() and I get the strcmp(NULL) again.
So far there are several workarounds to get rid of the problem: a) add printk to pcs_dt_free_map() b) add printk to pinctrl_generic_add_group() c) blacklist some drivers which are loaded around the critical point
So I had to keep them all, but still get useful debugging information. Therefore I added a test for gname == NULL to print a stack dump and the whole list of selectors in that case:
static int pinctrl_generic_group_name_to_selector(struct pinctrl_dev *pctldev, const char *function) { const struct pinctrl_ops *ops = pctldev->desc->pctlops; unsigned ngroups = ops->get_groups_count(pctldev); unsigned selector = 0;
/* See if this pctldev has this group */ while (selector < ngroups) { const char *gname = ops->get_group_name(pctldev, selector);
if (!gname || !function) { printk("%s: pctldev = %px function = %s\n", __func__, pctldev, function); printk(" strcmp(%s, %s)\n", function, gname); printk(" get_group_name() = %pF\n", ops->get_group_name); printk(" ngroups = %u\n", ngroups); printk(" selector = %u\n", selector); dump_stack(); selector = 0; while (selector < ngroups) { const char *gname = ops->get_group_name(pctldev, selector); printk(" gname[%u] = %s\n", selector, gname); selector++; } return -EINVAL; }
if (!strcmp(function, gname)) return selector;
selector++; }
return -EINVAL; }
and
int pinctrl_get_group_selector(struct pinctrl_dev *pctldev, const char *pin_group) { const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; unsigned ngroups = pctlops->get_groups_count(pctldev); unsigned group_selector = 0;
while (group_selector < ngroups) { const char *gname = pctlops->get_group_name(pctldev, group_selector); if (!gname || !pin_group) { printk("%s: strcmp: %s %s\n", __func__, gname, pin_group); printk(" group_selector = %u\n", group_selector); printk(" get_group_name = %pF\n", pctlops->get_group_name); printk(" pctldev = %pF\n", pctldev); } if (!strcmp(gname, pin_group)) { dev_dbg(pctldev->dev, "found group selector %u for %s\n", group_selector, pin_group); return group_selector; }
group_selector++; }
dev_err(pctldev->dev, "does not have pin group %s\n", pin_group);
return -EINVAL; }
This time it is quite reproducible and here is the log:
## Booting kernel from Legacy Image at 82000000 ... Image Name: Linux-4.17.0-letux+ Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4760144 Bytes = 4.5 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 81c00000 Booting using the fdt blob at 0x81c00000 Loading Kernel Image ... OK Using Device Tree in place at 81c00000, end 81c14a70
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.17.0-letux+ (hns@iMac.fritz.box) (gcc version 4.9.2 (GCC)) #2494 SMP PREEMPT Sat Jun 23 09:48:15 CEST 2018 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Goldelico GTA04A5/Letux 2804 [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] Memory policy: Data cache writeback [ 0.000000] cma: Reserved 16 MiB at 0xbe800000 [ 0.000000] On node 0 totalpages: 261632 [ 0.000000] Normal zone: 1536 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:31 [ 0.000000] HighMem zone: 65024 pages, LIFO batch:15 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] OMAP3630/DM3730 ES1.2 (l2cache iva sgx neon isp 192mhz_clk) [ 0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40000 r8192 d21440 u69632 [ 0.000000] pcpu-alloc: s40000 r8192 d21440 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096 [ 0.000000] Kernel command line: console=ttyO2,115200n8 mtdoops.mtddev=omap2.nand ubi.mtd=4 root=/dev/mmcblk0p1 rw rootfstype=ext4,ext3 rootwait console=ttyO2,115200n8 vram=12M omapfb.vram=0:8M,1:4M omapfb.rotate_type=0 omapdss.def_disp=lcd rootwait twl4030_charger.allow_usb=1 log_buf_len=8M ignore_loglevel earlyprintk [ 0.000000] log_buf_len: 8388608 bytes [ 0.000000] early log buf free: 63960(97%) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 1001476K/1046528K available (6547K kernel code, 650K rwdata, 1820K rodata, 1024K init, 220K bss, 28668K reserved, 16384K cma-reserved, 243712K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (7540 kB) [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 651 kB) [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 221 kB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 4.0) with 96 interrupts [ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz [ 0.000000] OMAP clockevent source: timer1 at 32768 Hz [ 0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns [ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns [ 0.000030] OMAP clocksource: 32k_counter at 32768 Hz [ 0.002136] Console: colour dummy device 80x30 [ 0.002197] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032) [ 0.115203] pid_max: default: 32768 minimum: 301 [ 0.115386] Security Framework initialized [ 0.115509] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.115539] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.116455] CPU: Testing write buffer coherency: ok [ 0.116943] CPU0: thread -1, cpu 0, socket -1, mpidr 0 [ 0.165161] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.175079] Hierarchical SRCU implementation. [ 0.195098] smp: Bringing up secondary CPUs ... [ 0.195129] smp: Brought up 1 node, 1 CPU [ 0.195129] SMP: Total of 1 processors activated (597.60 BogoMIPS). [ 0.195159] CPU: All CPU(s) started in SVC mode. [ 0.197204] devtmpfs: initialized [ 0.225524] random: get_random_u32 called from bucket_table_alloc+0x15c/0x1ac with crng_init=0 [ 0.235504] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3 [ 0.236236] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.236267] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.237731] pinctrl core: initialized pinctrl subsystem [ 0.239074] NET: Registered protocol family 16 [ 0.242218] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.273742] omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp [ 0.274566] omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp [ 0.357635] audit: initializing netlink subsys (disabled) [ 0.363189] audit: type=2000 audit(0.360:1): state=initialized audit_enabled=0 res=1 [ 0.364807] cpuidle: using governor menu [ 0.366088] Reprogramming SDRC clock to 400000000 Hz [ 0.377929] OMAP GPIO hardware version 2.5 [ 0.386535] GPIO line 143 (irda_en) hogged as output/high [ 0.414459] omap-gpmc 6e000000.gpmc: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_gpmc_pins, deferring probe [ 0.434875] No ATAGs? [ 0.434906] hw-breakpoint: debug architecture 0x4 unsupported. [ 0.436126] omap4_sram_init:Unable to allocate sram needed to handle errata I688 [ 0.436157] omap4_sram_init:Unable to get sram pool needed to handle errata I688 [ 0.436523] OMAP DMA hardware revision 5.0 [ 0.543273] omap-dma-engine 48056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported) [ 0.548492] reg-fixed-voltage wlan_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_wlan_pins, deferring probe [ 0.548553] reg-fixed-voltage bt_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_bt_pins, deferring probe [ 0.558776] omap-iommu 480bd400.mmu: 480bd400.mmu registered [ 0.559783] iommu: Adding device 480bc000.isp to group 0 [ 0.562622] vgaarb: loaded [ 0.563812] SCSI subsystem initialized [ 0.565612] libata version 3.00 loaded. [ 0.566589] usbcore: registered new interface driver usbfs [ 0.566802] usbcore: registered new interface driver hub [ 0.567016] usbcore: registered new device driver usb [ 0.567718] usb_phy_generic hsusb2_phy: hsusb2_phy supply vcc not found, using dummy regulator [ 0.573394] omap_i2c 48070000.i2c: bus 0 rev4.4 at 2600 kHz [ 0.578063] omap_i2c 48072000.i2c: bus 1 rev4.4 at 400 kHz [ 0.580566] omap_i2c 48060000.i2c: bus 2 rev4.4 at 100 kHz [ 0.582733] Advanced Linux Sound Architecture Driver Initialized. [ 0.587829] clocksource: Switched to clocksource 32k_counter [ 0.684509] VFS: Disk quotas dquot_6.6.0 [ 0.684631] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.719573] NET: Registered protocol family 2 [ 0.720947] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) [ 0.721008] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.721130] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.721282] TCP: Hash tables configured (established 8192 bind 8192) [ 0.721435] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.721496] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.722381] NET: Registered protocol family 1 [ 0.722442] PCI: CLS 0 bytes, default 64 [ 0.726928] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available [ 0.732513] Initialise system trusted keyrings [ 0.734283] workingset: timestamp_bits=30 max_order=18 bucket_order=0 [ 0.734924] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.739746] Key type asymmetric registered [ 0.739776] Asymmetric key parser 'x509' registered [ 0.739898] bounce: pool size: 64 pages [ 0.740020] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [ 0.740051] io scheduler noop registered [ 0.740051] io scheduler deadline registered [ 0.740142] io scheduler cfq registered (default) [ 0.740173] io scheduler mq-deadline registered [ 0.740173] io scheduler kyber registered [ 0.749450] pinctrl-single 48002030.pinmux: 284 pins, size 568 [ 0.750427] pinctrl-single 48002a00.pinmux: 46 pins, size 92 [ 0.751434] pinctrl-single 480025a0.pinmux: 46 pins, size 92 [ 0.752319] pinctrl-single 48002274.pinmux_mcbsp1: initialized with no interrupts [ 0.752319] pinctrl-single 48002274.pinmux_mcbsp1: 10 pins, size 4 [ 0.753082] pinctrl-single 480022d8.pinmux_tv_out: initialized with no interrupts [ 0.753082] pinctrl-single 480022d8.pinmux_tv_out: 4 pins, size 4 [ 0.770263] omap_uart 4806a000.serial: no wakeirq for uart0 [ 0.770782] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 88, base_baud = 3000000) is a OMAP UART0 [ 0.771514] serial serial0: tty port ttyO0 registered [ 0.772064] omap_uart 4806c000.serial: no wakeirq for uart1 [ 0.772277] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 89, base_baud = 3000000) is a OMAP UART1 [ 0.772796] serial serial1: tty port ttyO1 registered [ 0.773315] omap_uart 49020000.serial: no wakeirq for uart2 [ 0.773742] 49020000.serial: ttyO2 at MMIO 0x49020000 (irq = 90, base_baud = 3000000) is a OMAP UART2 [ 1.669250] console [ttyO2] enabled [ 1.674468] omap_uart 49042000.serial: no wakeirq for uart3 [ 1.681060] 49042000.serial: ttyO3 at MMIO 0x49042000 (irq = 96, base_baud = 3000000) is a OMAP UART3 [ 1.715942] brd: module loaded [ 1.732696] loop: module loaded [ 1.771636] twl 0-0048: PIH (irq 23) chaining IRQs 144..152 [ 1.777618] twl 0-0048: power (irq 149) chaining IRQs 152..159 [ 1.789855] random: fast init done [ 1.796966] VAUX3: Bringing 2800000uV into 2500000-2500000uV [ 1.822326] VMMC2: Bringing 2600000uV into 1800000-1800000uV [ 1.829650] VMMC2: failed to apply 1800000-1800000uV constraint(-22) [ 1.836334] twl4030_reg 48070000.i2c:twl@48:regulator-vmmc2: can't register VMMC2, -22 [ 1.844879] twl4030_reg: probe of 48070000.i2c:twl@48:regulator-vmmc2 failed with error -22 [ 1.863830] VSIM: Bringing 1800000uV into 2800000-2800000uV [ 1.909942] libphy: Fixed MDIO Bus: probed [ 1.924407] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.932098] ehci-pci: EHCI PCI platform driver [ 1.937194] usbcore: registered new interface driver usb-storage [ 1.944854] mousedev: PS/2 mouse device common for all mice [ 1.953552] twl_rtc 48070000.i2c:twl@48:rtc: Power up reset detected. [ 1.961181] twl_rtc 48070000.i2c:twl@48:rtc: Enabling TWL-RTC [ 1.969757] twl_rtc 48070000.i2c:twl@48:rtc: rtc core: registered 48070000.i2c:twl@48:rtc as rtc0 [ 1.980316] i2c /dev entries driver [ 1.985534] IR NEC protocol handler initialized [ 1.990753] IR RC5(x/sz) protocol handler initialized [ 1.996063] IR RC6 protocol handler initialized [ 2.000915] IR JVC protocol handler initialized [ 2.005645] IR Sony protocol handler initialized [ 2.010681] IR SANYO protocol handler initialized [ 2.015624] IR Sharp protocol handler initialized [ 2.020629] IR MCE Keyboard/mouse protocol handler initialized [ 2.026733] IR XMP protocol handler initialized [ 2.031524] Driver for 1-wire Dallas network protocol. [ 2.039276] ti-soc-thermal 48002524.bandgap: This OMAP thermal sensor is unreliable. You've been warned [ 2.049774] ti-soc-thermal 48002524.bandgap: Non-trimmed BGAP, Temp not accurate [ 2.060546] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec [ 2.079956] sdhci: Secure Digital Host Controller Interface driver [ 2.086395] sdhci: Copyright(c) Pierre Ossman [ 2.119934] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.127655] ledtrig-cpu: registered to indicate activity on CPUs [ 2.142974] usbcore: registered new interface driver usbhid [ 2.150115] usbhid: USB HID core driver [ 2.154602] ashmem: initialized [ 2.164764] oprofile: using arm/armv7 [ 2.168762] mmc0: host does not support reading read-only switch, assuming write-enable [ 2.178344] Initializing XFRM netlink socket [ 2.182983] mmc0: new high speed SDHC card at address b368 [ 2.188934] NET: Registered protocol family 17 [ 2.193634] NET: Registered protocol family 15 [ 2.199462] mmcblk0: mmc0:b368 USD 7.47 GiB [ 2.205291] Key type dns_resolver registered [ 2.211181] omap2_set_init_voltage: unable to find boot up OPP for vdd_core [ 2.218627] omap2_set_init_voltage: unable to set vdd_core [ 2.224731] omap3_pm_off_mode_enable(1) [ 2.229064] mmcblk0: p1 [ 2.232788] ThumbEE CPU extension supported. [ 2.237274] Registering SWP/SWPB emulation handler [ 2.243316] SmartReflex Class3 initialized [ 2.248870] Loading compiled-in X.509 certificates [ 2.272949] platform 6e000000.gpmc: Retrying from deferred list [ 2.279907] omap-gpmc 6e000000.gpmc: GPMC revision 5.0 [ 2.285308] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000 [ 2.293548] omap2-onenand 4000000.onenand: initializing on CS0 (0x04000000), va (ptrval), DMA mode [ 2.303405] OneNAND Manufacturer: Samsung (0xec) [ 2.308349] Muxed OneNAND 512MB 1.8V 16-bit (0x50) [ 2.313323] OneNAND version = 0x0232 [ 2.317077] Chip support all block unlock [ 2.321319] Chip has 4KiB pagesize [ 2.324859] Chip has cache program feature [ 2.330688] Scanning device for bad blocks [ 2.438171] onenand_bbt_wait: ecc 0xaaaa ctrl 0x0400 intr 0x8080 addr1 0x34b addr8 0x0 [ 2.446441] OneNAND eraseblock 843 is an initial bad block [ 2.599395] omap2-onenand 4000000.onenand: optimized timings for 83 MHz [ 2.606353] 5 fixed-partitions partitions found on MTD device 4000000.onenand [ 2.613861] Creating 5 MTD partitions on "4000000.onenand": [ 2.619720] 0x000000000000-0x000000080000 : "X-Loader" [ 2.626708] 0x000000080000-0x000000240000 : "U-Boot" [ 2.633850] 0x000000240000-0x000000280000 : "U-Boot Env" [ 2.641326] 0x000000280000-0x000000880000 : "Kernel" [ 2.648498] 0x000000880000-0x000020000000 : "File System" [ 2.658264] platform wlan_en_regulator: Retrying from deferred list [ 2.666290] platform bt_en_regulator: Retrying from deferred list [ 2.673919] platform 480b4000.mmc: Retrying from deferred list [ 2.795898] ubi0: default fastmap pool size: 100 [ 2.802978] ubi0: default fastmap WL pool size: 50 [ 2.808135] ubi0: attaching mtd4 [ 2.815002] omap_hsmmc 480b4000.mmc: card claims to support voltages below defined range [ 2.834747] onenand_wait: correctable ECC error = 0x5555 [ 2.841308] ubi0: fixable bit-flip detected at PEB 187 [ 2.858123] mmc1: new high speed SDIO card at address 0001 [ 2.876342] onenand_wait: correctable ECC error = 0x5555 [ 2.882049] ubi0: fixable bit-flip detected at PEB 465 [ 2.948211] onenand_wait: correctable ECC error = 0x5555 [ 2.953765] ubi0: fixable bit-flip detected at PEB 1326 [ 2.975341] onenand_wait: correctable ECC error = 0x5555 [ 2.980987] ubi0: fixable bit-flip detected at PEB 1554 [ 3.015136] onenand_wait: correctable ECC error = 0x5555 [ 3.020751] ubi0: fixable bit-flip detected at PEB 1960 [ 3.029998] ubi0: scanning is finished [ 3.040924] ubi0: attached mtd4 (name "File System", size 503 MiB) [ 3.047393] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes [ 3.054962] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024 [ 3.062164] ubi0: VID header offset: 1024 (aligned 1024), data offset: 4096 [ 3.069519] ubi0: good PEBs: 2013, bad PEBs: 1, corrupted PEBs: 0 [ 3.075897] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 3.083587] ubi0: max/mean erase counter: 59/35, WL threshold: 4096, image sequence number: 163025748 [ 3.093353] ubi0: available PEBs: 0, total reserved PEBs: 2013, PEBs reserved for bad PEB handling: 39 [ 3.103149] ubi0: background thread "ubi_bgt0d" started, PID 1039 [ 3.110595] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 3.119354] input: gpio-keys-wwan-wakeup as /devices/platform/gpio-keys-wwan-wakeup/input/input1 [ 3.129791] omap_gpio 49056000.gpio: Could not set line 16 debounce to 10000 microseconds (-22) [ 3.139648] input: antenna-detect as /devices/platform/antenna-detect/input/input2 [ 3.149291] twl_rtc 48070000.i2c:twl@48:rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801) [ 3.159606] sr_init: No PMIC hook to init smartreflex [ 3.165618] smartreflex 480cb000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.175109] smartreflex 480c9000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.186187] VAUX3: disabling [ 3.190185] VDAC: disabling [ 3.193664] VUSB1V5: disabling [ 3.197296] VUSB1V8: disabling [ 3.201049] VUSB3V1: disabling [ 3.204681] wlan-en-regulator: disabling [ 3.208923] bt-en-regulator: disabling [ 3.212860] ALSA device list: [ 3.215942] No soundcards found. [ 3.250671] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null) [ 3.259613] VFS: Mounted root (ext4 filesystem) on device 179:1. [ 3.280364] devtmpfs: mounted [ 3.285339] Freeing unused kernel memory: 1024K Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory INIT: version 2.88 booting [info] Using makefile-style concurrent boot in runlevel S. [....] Starting the hotplug events dispatcher: udevd[ 4.705017] systemd-udevd[1172]: starting version 215 [ 4.800628] random: udevd: uninitialized urandom read (16 bytes read) [ 4.821441] random: udevd: uninitialized urandom read (16 bytes read) . [ ok ] Synthesizing the initial hotplug events...^[[c[ 5.236297] omapdss: unknown parameter 'def_disp' ignored done. [....] Waiting for /dev to be fully populated...[ 5.303161] omapdss_dss 48050000.dss: 48050000.dss supply vdda_video not found, using dummy regulator ^[[c[ 5.342681] DSS: OMAP DSS rev 2.0 [ 5.365570] omapdss_dss 48050000.dss: bound 48050400.dispc (ops dispc_component_ops [omapdss]) [ 5.425079] omapdss_dss 48050000.dss: bound 48050c00.encoder (ops venc_component_ops [omapdss]) [ 5.469055] gnss: GNSS driver registered with major 243 [ 5.517791] ehci-omap: OMAP-EHCI Host Controller driver [ 5.550659] input: twl4030_pwrbutton as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:pwrbutton/input/input3 [ 5.583160] input: twl4030:vibrator as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:audio/twl4030-vibra/input/input4 [ 5.658874] twl4030_madc 48070000.i2c:twl@48:madc: 48070000.i2c:twl@48:madc supply vusb3v1 not found, using dummy regulator [ 5.670684] ehci-omap 48064800.ehci: EHCI Host Controller [ 5.699920] ehci-omap 48064800.ehci: new USB bus registered, assigned bus number 1 [ 5.779174] ehci-omap 48064800.ehci: irq 93, io mem 0x48064800 [ 5.791900] twl4030_gpio twl4030-gpio: can't dispatch IRQs from modules [ 5.836730] ehci-omap 48064800.ehci: USB 2.0 started, EHCI 1.00 [ 5.882385] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 5.893646] media: Linux media interface: v0.10 [ 5.932739] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 5.948638] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.018402] input: accelerometer-iio-input-bridge as /devices/virtual/input/input5 [ 6.028686] twl4030_usb 48070000.i2c:twl@48:twl4030-usb: Initialized TWL4030 USB module [ 6.044372] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 6.062072] Linux video capture interface: v2.00 [ 6.072601] input: TSC2007 Touchscreen as /devices/platform/68000000.ocp/48072000.i2c/i2c-1/1-0048/input/input6 [ 6.108154] usb usb1: Product: EHCI Host Controller [ 6.113250] usb usb1: Manufacturer: Linux 4.17.0-letux+ ehci_hcd [ 6.125518] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver [ 6.172119] usb usb1: SerialNumber: 48064800.ehci [ 6.180450] bmp280 1-0076: 1-0076 supply vddd not found, using dummy regulator [ 6.207427] hub 1-0:1.0: USB hub found [ 6.212493] bmp280 1-0076: 1-0076 supply vdda not found, using dummy regulator [ 6.220794] hub 1-0:1.0: 3 ports detected [ 6.245635] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2 [ 6.298309] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 6.363555] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 6.394958] usb usb2: Product: MUSB HDRC host driver [ 6.442871] usb usb2: Manufacturer: Linux 4.17.0-letux+ musb-hcd [ 6.505920] usb usb2: SerialNumber: musb-hdrc.0.auto [ 6.535705] hub 2-0:1.0: USB hub found [ 6.550048] i2c 1-0030: Retrying from deferred list [ 6.576538] hub 2-0:1.0: 1 port detected [ 6.612670] i2c 1-0030: Retrying from deferred list [ 6.626068] i2c 1-0030: Retrying from deferred list [ 6.648223] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode [ 6.728515] i2c 1-0030: Retrying from deferred list [ 6.738250] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 6.747406] i2c 1-0030: Retrying from deferred list [ 6.790191] bq27xxx_battery_setup [ 6.793701] bq27xxx_battery_setup: dm_regs= (null) [ 6.798980] i2c 1-0030: Retrying from deferred list [ 6.812499] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix [ 6.835296] bq27xxx_battery_settings [ 6.840545] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088380908 [ 6.882781] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 6.966156] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 6.994628] wwan_on_off_init: wwan_on_off_init [ 7.014556] pps_core: LinuxPPS API ver. 1 registered [ 7.037109] i2c 1-0030: Retrying from deferred list [ 7.042602] iio_charge:-747 [ 7.048522] platform backlight: Retrying from deferred list [ 7.054901] pinctrl_generic_get_group_name: group>name is NULL [ 7.077026] pinctrl_generic_group_name_to_selector: pctldev = ee33b180 function = backlight_pins_pinmux [ 7.096343] strcmp(backlight_pins_pinmux, (null)) [ 7.108062] get_group_name() = pinctrl_generic_get_group_name+0x0/0x5c [ 7.115081] ngroups = 19 [ 7.119476] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.129150] selector = 18 [ 7.132080] CPU: 0 PID: 952 Comm: kworker/0:2 Not tainted 4.17.0-letux+ #2494 [ 7.139526] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 7.146087] Workqueue: events deferred_probe_work_func [ 7.151489] [<c01106ec>] (unwind_backtrace) from [<c010c058>] (show_stack+0x10/0x14) [ 7.159606] [<c010c058>] (show_stack) from [<c074bd08>] (dump_stack+0x7c/0x9c) [ 7.167144] [<c074bd08>] (dump_stack) from [<c042ce78>] (pinctrl_generic_add_group+0xa4/0x174) [ 7.176147] [<c042ce78>] (pinctrl_generic_add_group) from [<c0432128>] (pcs_dt_node_to_map+0x4b0/0x81c) [ 7.185943] [<c0432128>] (pcs_dt_node_to_map) from [<c04300c0>] (pinctrl_dt_to_map+0x1ec/0x2b8) [ 7.195037] [<c04300c0>] (pinctrl_dt_to_map) from [<c042d10c>] (create_pinctrl+0x58/0x2f8) [ 7.203674] [<c042d10c>] (create_pinctrl) from [<c042d46c>] (devm_pinctrl_get+0x2c/0x6c) [ 7.212127] [<c042d46c>] (devm_pinctrl_get) from [<c04f2f88>] (pinctrl_bind_pins+0x3c/0x138) [ 7.220947] [<c04f2f88>] (pinctrl_bind_pins) from [<c04d3fa4>] (driver_probe_device+0xe8/0x318) [ 7.230041] [<c04d3fa4>] (driver_probe_device) from [<c04d27f4>] (bus_for_each_drv+0x84/0x94) [ 7.238952] [<c04d27f4>] (bus_for_each_drv) from [<c04d3e24>] (__device_attach+0x88/0xfc) [ 7.247497] [<c04d3e24>] (__device_attach) from [<c04d33d0>] (bus_probe_device+0x28/0x80) [ 7.256011] [<c04d33d0>] (bus_probe_device) from [<c04d38ec>] (deferred_probe_work_func+0xf8/0x130) [ 7.265472] [<c04d38ec>] (deferred_probe_work_func) from [<c014874c>] (process_one_work+0x244/0x464) [ 7.275054] [<c014874c>] (process_one_work) from [<c0148f20>] (worker_thread+0x2c0/0x3ec) [ 7.283599] [<c0148f20>] (worker_thread) from [<c014cef4>] (kthread+0x134/0x150) [ 7.291320] [<c014cef4>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 7.298858] Exception stack(0xee69dfb0 to 0xee69dff8) [ 7.304138] dfa0: 00000000 00000000 00000000 00000000 [ 7.312683] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 7.321197] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 7.528137] gname[0] = pinmux_hsusb2_pins [ 7.532531] gname[1] = pinmux_uart1_pins [ 7.536804] gname[2] = pinmux_uart2_pins [ 7.558166] gname[3] = pinmux_uart3_pins [ 7.562469] gname[4] = pinmux_twl4030_pins [ 7.566925] gname[5] = pinmux_mmc1_pins [ 7.588165] gname[6] = pinmux_wlan_irq_pin [ 7.592651] gname[7] = pinmux_gpmc_pins [ 7.596832] gname[8] = pinmux_wlan_pins [ 7.608184] gname[9] = pinmux_bt_pins [ 7.612213] gname[10] = pinmux_dss_dpi_pins [ 7.616760] gname[11] = pinmux_mcbsp1_pins [ 7.636383] gname[12] = pinmux_mcbsp2_pins [ 7.648162] gname[13] = pinmux_mcbsp3_pins [ 7.652648] gname[14] = pinmux_mcbsp4_pins [ 7.657104] gname[15] = pinmux_penirq_pins [ 7.671142] gname[16] = pinmux_camera_pins [ 7.675598] gname[17] = hdq_pins [ 7.688140] pinctrl_generic_get_group_name: group>name is NULL [ 7.694244] gname[18] = (null) [ 7.697692] pinctrl_generic_get_group_name: group>name is NULL [ 7.708221] pinctrl_generic_get_group_name: group>name is NULL [ 7.714324] pinctrl_get_group_selector: strcmp: (null) backlight_pins_pinmux [ 7.733917] group_selector = 18 [ 7.737426] get_group_name = pinctrl_generic_get_group_name+0x0/0x5c [ 7.758148] pctldev = 0xee33b180 [ 7.761749] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 7.786560] pgd = (ptrval) [ 7.789642] [00000000] *pgd=00000000 [ 7.793395] Internal error: Oops: 17 [#1] PREEMPT SMP ARM [ 7.799041] Modules linked in: pps_gpio(+) panel_tpo_td028ttec1 snd_soc_simple_card(+) snd_soc_simple_card_utils snd_soc_omap_twl4030(+) encoder_opa362 pps_core wwan_on_off(+) snd_soc_gtm601 connector_analog_tv pwm_omap_dmtimer generic_adc_battery pwm_bl bq27xxx_battery_hdq bq27xxx_battery bmp280_spi wlcore_sdio ov9655 v4l2_fwnode v4l2_common omap_hdq omap2430 bmp280_i2c bmp280 videodev at24 bmc150_accel_i2c bmc150_magn_i2c tsc2007 bmc150_magn leds_tca6507 bmc150_accel_core industrialio_triggered_buffer phy_twl4030_usb kfifo_buf media snd_soc_omap_mcbsp snd_soc_omap snd_pcm_dmaengine musb_hdrc gpio_twl4030 snd_soc_twl4030 twl4030_charger twl4030_vibra gnss_w2sg0004 twl4030_madc twl4030_pwrbutton industrialio ehci_omap gnss w2cbw003_bluetooth omapdss omapdss_base cec [ 7.870178] CPU: 0 PID: 952 Comm: kworker/0:2 Not tainted 4.17.0-letux+ #2494 [ 7.877655] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 7.884216] Workqueue: events deferred_probe_work_func [ 7.889617] PC is at strcmp+0x0/0x34 [ 7.893341] LR is at pinctrl_get_group_selector+0x90/0xd8 [ 7.898986] pc : [<c0758fc0>] lr : [<c042dac8>] psr: 60000113 [ 7.905548] sp : ee69de20 ip : 00000000 fp : 00000000 [ 7.911010] r10: ed22f6c0 r9 : 00000014 r8 : 00000000 [ 7.916442] r7 : c0799fd4 r6 : ee33b180 r5 : ef7c4958 r4 : 00000012 [ 7.923248] r3 : 00000000 r2 : 00000000 r1 : ef7c4958 r0 : 00000000 [ 7.930053] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 7.937499] Control: 10c5387d Table: ad3a8019 DAC: 00000051 [ 7.943511] Process kworker/0:2 (pid: 952, stack limit = 0x(ptrval)) [ 7.950134] Stack: (0xee69de20 to 0xee69e000) [ 7.954681] de20: ee69de44 00000000 ee33b180 ed12c210 ef7c4958 ed22f6c0 00000000 c042eaac [ 7.963226] de40: ed20b910 00000001 ed2267c0 ed22f700 ed22f740 ed12c210 00000000 c042d2a4 [ 7.971771] de60: 00000014 ee28f780 c0b59e30 c08e9fec ee230010 00000000 ed226890 ee230010 [ 7.980316] de80: c0bd1df0 fffffdfb bf212014 0000002e c0b98f70 c042d46c 00000000 ee230010 [ 7.988830] dea0: ed2265d0 c04f2f88 ee230010 00000000 c0bd1df4 c04d3fa4 00000000 ee69def0 [ 7.997375] dec0: c04d42b0 ee230044 c0b664c4 c0b02d00 00000000 c04d27f4 ee01be6c ed204b38 [ 8.005889] dee0: ee230010 c0b666c8 00000001 c04d3e24 ee230010 00000001 00000000 ee230010 [ 8.014434] df00: c0b666c8 ee230010 00000000 c04d33d0 ee230010 c0b664a8 ef7b7c80 c04d38ec [ 8.022979] df20: ee4eef00 c0b664dc ef7b7c80 00000000 ef7baf00 c014874c ee4eef00 c0b664dc [ 8.031524] df40: ffff8d8f ee4eef00 ef7b7c80 ef7b7c80 ee69c000 ef7b7c98 c0b02d00 ee4eef18 [ 8.040039] df60: 00000008 c0148f20 00000000 ee680b00 ee4ebdc0 00000000 ee4eef00 c0148c60 [ 8.048583] df80: ee0b5ef0 ee680b1c 00000000 c014cef4 ee4ebdc0 c014cdc0 00000000 00000000 [ 8.057128] dfa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 8.065673] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 8.074218] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 8.082763] [<c0758fc0>] (strcmp) from [<c042dac8>] (pinctrl_get_group_selector+0x90/0xd8) [ 8.091400] [<c042dac8>] (pinctrl_get_group_selector) from [<c042eaac>] (pinmux_map_to_setting+0xf0/0x134) [ 8.101501] [<c042eaac>] (pinmux_map_to_setting) from [<c042d2a4>] (create_pinctrl+0x1f0/0x2f8) [ 8.110565] [<c042d2a4>] (create_pinctrl) from [<c042d46c>] (devm_pinctrl_get+0x2c/0x6c) [ 8.119018] [<c042d46c>] (devm_pinctrl_get) from [<c04f2f88>] (pinctrl_bind_pins+0x3c/0x138) [ 8.127838] [<c04f2f88>] (pinctrl_bind_pins) from [<c04d3fa4>] (driver_probe_device+0xe8/0x318) [ 8.136962] [<c04d3fa4>] (driver_probe_device) from [<c04d27f4>] (bus_for_each_drv+0x84/0x94) [ 8.145843] [<c04d27f4>] (bus_for_each_drv) from [<c04d3e24>] (__device_attach+0x88/0xfc) [ 8.154418] [<c04d3e24>] (__device_attach) from [<c04d33d0>] (bus_probe_device+0x28/0x80) [ 8.162963] [<c04d33d0>] (bus_probe_device) from [<c04d38ec>] (deferred_probe_work_func+0xf8/0x130) [ 8.172424] [<c04d38ec>] (deferred_probe_work_func) from [<c014874c>] (process_one_work+0x244/0x464) [ 8.181976] [<c014874c>] (process_one_work) from [<c0148f20>] (worker_thread+0x2c0/0x3ec) [ 8.190551] [<c0148f20>] (worker_thread) from [<c014cef4>] (kthread+0x134/0x150) [ 8.198272] [<c014cef4>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 8.205841] Exception stack(0xee69dfb0 to 0xee69dff8) [ 8.211120] dfa0: 00000000 00000000 00000000 00000000 [ 8.219665] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 8.228210] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 8.235137] Code: e3520000 e5e32001 1afffffb e12fff1e (e4d03001) [ 8.248138] pinctrl_generic_group_name_to_selector: pctldev = ee33b180 function = modem_pins [ 8.256988] strcmp(modem_pins, (null)) [ 8.345520] get_group_name() = pinctrl_generic_get_group_name+0x0/0x5c [ 8.376617] ngroups = 20 [ 8.379638] selector = 18 [ 8.382568] CPU: 0 PID: 1207 Comm: udevd Tainted: G D 4.17.0-letux+ #2494 [ 8.391021] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 8.397613] [<c01106ec>] (unwind_backtrace) from [<c010c058>] (show_stack+0x10/0x14) [ 8.405700] [<c010c058>] (show_stack) from [<c074bd08>] (dump_stack+0x7c/0x9c) [ 8.413269] [<c074bd08>] (dump_stack) from [<c042ce78>] (pinctrl_generic_add_group+0xa4/0x174) [ 8.422271] [<c042ce78>] (pinctrl_generic_add_group) from [<c0432128>] (pcs_dt_node_to_map+0x4b0/0x81c) [ 8.432128] [<c0432128>] (pcs_dt_node_to_map) from [<c04300c0>] (pinctrl_dt_to_map+0x1ec/0x2b8) [ 8.441223] [<c04300c0>] (pinctrl_dt_to_map) from [<c042d10c>] (create_pinctrl+0x58/0x2f8) [ 8.449890] [<c042d10c>] (create_pinctrl) from [<c042d46c>] (devm_pinctrl_get+0x2c/0x6c) [ 8.458343] [<c042d46c>] (devm_pinctrl_get) from [<c04f2f88>] (pinctrl_bind_pins+0x3c/0x138) [ 8.467193] [<c04f2f88>] (pinctrl_bind_pins) from [<c04d3fa4>] (driver_probe_device+0xe8/0x318) [ 8.476287] [<c04d3fa4>] (driver_probe_device) from [<c04d4254>] (__driver_attach+0x80/0xa4) [ 8.485107] [<c04d4254>] (__driver_attach) from [<c04d2738>] (bus_for_each_dev+0x58/0x7c) [ 8.493682] [<c04d2738>] (bus_for_each_dev) from [<c04d35d0>] (bus_add_driver+0xcc/0x1e0) [ 8.502227] [<c04d35d0>] (bus_add_driver) from [<c04d4df8>] (driver_register+0x9c/0xe0) [ 8.510620] [<c04d4df8>] (driver_register) from [<c0102d74>] (do_one_initcall+0xb4/0x248) [ 8.519165] [<c0102d74>] (do_one_initcall) from [<c01a7174>] (do_init_module+0x58/0x1d0) [ 8.527648] [<c01a7174>] (do_init_module) from [<c01a5fa4>] (load_module+0xe04/0xfb0) [ 8.535858] [<c01a5fa4>] (load_module) from [<c01a6328>] (sys_finit_module+0x88/0x90) [ 8.544036] [<c01a6328>] (sys_finit_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54) [ 8.552612] Exception stack(0xed09bfa8 to 0xed09bff0) [ 8.557891] bfa0: b6d6a7d4 00051f70 00000006 b6d699f8 00000000 b6d6a31c [ 8.566436] bfc0: b6d6a7d4 00051f70 d5a16800 0000017b 00020000 00037f78 00050048 000593e8 [ 8.575012] bfe0: bede5ee0 bede5ed0 b6d63c4b b6e6ea42 [ 8.694702] ---[ end trace e23961e39ad1e53b ]--- [ 9.145721] gname[0] = pinmux_hsusb2_pins [ 9.152832] gname[1] = pinmux_uart1_pins [ 9.157623] gname[2] = pinmux_uart2_pins [ 9.162536] gname[3] = pinmux_uart3_pins [ 9.167541] gname[4] = pinmux_twl4030_pins [ 9.188140] gname[5] = pinmux_mmc1_pins [ 9.192352] gname[6] = pinmux_wlan_irq_pin [ 9.196807] gname[7] = pinmux_gpmc_pins [ 9.238220] gname[8] = pinmux_wlan_pins [ 9.255950] gname[9] = pinmux_bt_pins [ 9.268737] gname[10] = pinmux_dss_dpi_pins [ 9.300689] gname[11] = pinmux_mcbsp1_pins [ 9.324005] gname[12] = pinmux_mcbsp2_pins [ 9.343505] gname[13] = pinmux_mcbsp3_pins [ 9.365600] gname[14] = pinmux_mcbsp4_pins [ 9.389404] gname[15] = pinmux_penirq_pins [ 9.393859] gname[16] = pinmux_camera_pins [ 9.438110] gname[17] = hdq_pins [ 9.455657] pinctrl_generic_get_group_name: group>name is NULL [ 9.492248] gname[18] = (null) [ 9.495666] gname[19] = backlight_pins_pinmux [ 9.571685] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 9.626831] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 9.665374] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 9.682403] cfg80211: failed to load regulatory.db [ 24.218994] random: crng init done
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
BR and thanks, Nikolaus
Am 23.06.2018 um 12:13 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi all,
Am 22.06.2018 um 13:34 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 22.06.2018 um 09:16 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180621 17:48]:
selector = pinctrl_generic_group_name_to_selector(pctldev, name); if (selector >= 0) { printk("%s: pctldev=%px name=%s found selector=%d\n", __func__, pctldev, name, pctldev->num_groups);
well, my printk isn't correct! I'll check if the result is just an effect of the wrong printk.
Oh OK :)
Yes, they were wrong. Now here a log with correct printk. Looks sane on first impression:
root@letux:~# dmesg|grep "dt_free|generic_add|deferred" [ 0.759490] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_hsusb2_pins new selector=0 [ 0.761657] pinctrl_generic_add_group: pctldev=ee35ff80 name=pinmux_hsusb2_2_pins new selector=0 [ 0.762420] pinctrl_generic_add_group: pctldev=ee35fe00 name=pinmux_mcbsp1_devconf0_pins new selector=0 [ 0.763092] pinctrl_generic_add_group: pctldev=ee35fd00 name=pinmux_tv_acbias_devconf1_pins new selector=0 [ 0.780242] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart1_pins new selector=1 [ 0.781921] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart2_pins new selector=2 [ 0.783050] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_uart3_pins new selector=3 [ 1.812499] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_twl4030_pins new selector=4 [ 1.822235] pinctrl_generic_add_group: pctldev=ee445000 name=pinmux_twl4030_vpins new selector=0 [ 1.989715] pinctrl_generic_add_group: pctldev=ee35ff80 name=spi_gpio_pinmux new selector=1 [ 2.184509] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mmc1_pins new selector=5 [ 2.221252] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_irq_pin new selector=6 [ 2.241210] pcs_dt_free_map: pctldev=ee445180 [ 2.394989] platform 6e000000.gpmc: Retrying from deferred list [ 2.401672] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_gpmc_pins new selector=7 [ 2.789489] platform wlan_en_regulator: Retrying from deferred list [ 2.796203] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_pins new selector=8 [ 2.806518] platform bt_en_regulator: Retrying from deferred list [ 2.813354] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_bt_pins new selector=9 [ 2.822723] platform 480b4000.mmc: Retrying from deferred list [ 2.829711] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_wlan_irq_pin found selector=6 [ 5.385803] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_dss_dpi_pins new selector=10 [ 6.019317] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.066497] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.080902] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.143432] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_penirq_pins new selector=11 [ 6.218383] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp1_pins new selector=12 [ 6.282104] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp2_pins new selector=13 [ 6.424468] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins new selector=14 [ 6.473358] pcs_dt_free_map: pctldev=ee445180 [ 6.713745] i2c 1-0030: Retrying from deferred list [ 6.724761] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.742156] pcs_dt_free_map: pctldev=ee445180 [ 6.748229] pinctrl_generic_add_group: pctldev=ee445180 name=hdq_pins new selector=15 [ 6.756622] i2c 1-0030: Retrying from deferred list [ 6.762542] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.782073] pcs_dt_free_map: pctldev=ee445180 [ 6.795288] i2c 1-0030: Retrying from deferred list [ 6.804748] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.822540] pcs_dt_free_map: pctldev=ee445180 [ 6.890319] i2c 1-0030: Retrying from deferred list [ 6.895629] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 6.935729] pcs_dt_free_map: pctldev=ee445180 [ 6.951324] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp3_pins new selector=16 [ 6.960571] i2c 1-0030: Retrying from deferred list [ 7.028198] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.037719] pcs_dt_free_map: pctldev=ee445180 [ 7.057189] i2c 1-0030: Retrying from deferred list [ 7.062652] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_mcbsp4_pins new selector=17 [ 7.136230] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.153869] pcs_dt_free_map: pctldev=ee445180 [ 7.164825] i2c 1-0030: Retrying from deferred list [ 7.174407] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.196655] pcs_dt_free_map: pctldev=ee445180 [ 7.216339] pinctrl_generic_add_group: pctldev=ee445180 name=backlight_pins_pinmux new selector=18 [ 7.405364] pcs_dt_free_map: pctldev=ee445180 [ 7.460327] i2c 1-0030: Retrying from deferred list [ 7.470367] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.491027] pcs_dt_free_map: pctldev=ee445180 [ 7.501129] platform backlight: Retrying from deferred list [ 7.513153] pinctrl_generic_add_group: pctldev=ee445180 name=backlight_pins_pinmux found selector=18 [ 7.563171] i2c 1-0030: Retrying from deferred list [ 7.574401] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.606201] pcs_dt_free_map: pctldev=ee445180 [ 7.729339] i2c 1-0030: Retrying from deferred list [ 7.734680] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 7.758361] pcs_dt_free_map: pctldev=ee445180 [ 7.763092] pinctrl_generic_add_group: pctldev=ee445180 name=modem_pins new selector=19 [ 8.287200] i2c 1-0030: Retrying from deferred list [ 8.301971] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.314514] pcs_dt_free_map: pctldev=ee445180 [ 8.392425] i2c 1-0030: Retrying from deferred list [ 8.397766] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.421295] pcs_dt_free_map: pctldev=ee445180 [ 8.425994] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_pps_pins new selector=20 [ 8.518798] i2c 1-0030: Retrying from deferred list [ 8.524169] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 8.548370] pcs_dt_free_map: pctldev=ee445180 [ 9.366851] platform sound_bluetooth: Retrying from deferred list [ 9.381958] platform sound_fmradio: Retrying from deferred list [ 9.396972] i2c 1-0030: Retrying from deferred list [ 9.407379] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 9.427551] pcs_dt_free_map: pctldev=ee445180 [ 9.583404] platform sound_bluetooth: Retrying from deferred list [ 9.616180] platform sound_fmradio: Retrying from deferred list [ 9.637329] i2c 1-0030: Retrying from deferred list [ 9.644073] pinctrl_generic_add_group: pctldev=ee445180 name=pinmux_camera_pins found selector=14 [ 9.654144] pcs_dt_free_map: pctldev=ee445180 root@letux:~#
And I didn't see the strcmp(NULL) any more. I already was suspecting that it is a Heisenbug: the more you study it, the less likely it appears.
Maybe the printk have some (positive) side-effect (internal locking)?
To test that I have reverted all patches with printk which produce the log from above. Only after removing the printk in pcs_dt_free_map(), the strcmp(NULL) came back.
Next I'll try to find out if I can add the other patches to see something...
I think I now have a scenario with additional information. I removed the printk in pcs_dt_free_map() and I get the strcmp(NULL) again.
So far there are several workarounds to get rid of the problem: a) add printk to pcs_dt_free_map() b) add printk to pinctrl_generic_add_group() c) blacklist some drivers which are loaded around the critical point
So I had to keep them all, but still get useful debugging information. Therefore I added a test for gname == NULL to print a stack dump and the whole list of selectors in that case:
static int pinctrl_generic_group_name_to_selector(struct pinctrl_dev *pctldev, const char *function) { const struct pinctrl_ops *ops = pctldev->desc->pctlops; unsigned ngroups = ops->get_groups_count(pctldev); unsigned selector = 0;
/* See if this pctldev has this group */ while (selector < ngroups) { const char *gname = ops->get_group_name(pctldev, selector);
if (!gname || !function) { printk("%s: pctldev = %px function = %s\n", __func__, pctldev, function); printk(" strcmp(%s, %s)\n", function, gname); printk(" get_group_name() = %pF\n", ops->get_group_name); printk(" ngroups = %u\n", ngroups); printk(" selector = %u\n", selector); dump_stack(); selector = 0; while (selector < ngroups) { const char *gname = ops->get_group_name(pctldev, selector); printk(" gname[%u] = %s\n", selector, gname); selector++; } return -EINVAL; }
if (!strcmp(function, gname)) return selector; selector++;
}
return -EINVAL; }
and
int pinctrl_get_group_selector(struct pinctrl_dev *pctldev, const char *pin_group) { const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; unsigned ngroups = pctlops->get_groups_count(pctldev); unsigned group_selector = 0;
while (group_selector < ngroups) { const char *gname = pctlops->get_group_name(pctldev, group_selector); if (!gname || !pin_group) { printk("%s: strcmp: %s %s\n", __func__, gname, pin_group); printk(" group_selector = %u\n", group_selector); printk(" get_group_name = %pF\n", pctlops->get_group_name); printk(" pctldev = %pF\n", pctldev); } if (!strcmp(gname, pin_group)) { dev_dbg(pctldev->dev, "found group selector %u for %s\n", group_selector, pin_group); return group_selector; }
group_selector++;
}
dev_err(pctldev->dev, "does not have pin group %s\n", pin_group);
return -EINVAL; }
This time it is quite reproducible and here is the log:
## Booting kernel from Legacy Image at 82000000 ... Image Name: Linux-4.17.0-letux+ Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4760144 Bytes = 4.5 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 81c00000 Booting using the fdt blob at 0x81c00000 Loading Kernel Image ... OK Using Device Tree in place at 81c00000, end 81c14a70
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.17.0-letux+ (hns@iMac.fritz.box) (gcc version 4.9.2 (GCC)) #2494 SMP PREEMPT Sat Jun 23 09:48:15 CEST 2018 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Goldelico GTA04A5/Letux 2804 [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] Memory policy: Data cache writeback [ 0.000000] cma: Reserved 16 MiB at 0xbe800000 [ 0.000000] On node 0 totalpages: 261632 [ 0.000000] Normal zone: 1536 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:31 [ 0.000000] HighMem zone: 65024 pages, LIFO batch:15 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] OMAP3630/DM3730 ES1.2 (l2cache iva sgx neon isp 192mhz_clk) [ 0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40000 r8192 d21440 u69632 [ 0.000000] pcpu-alloc: s40000 r8192 d21440 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096 [ 0.000000] Kernel command line: console=ttyO2,115200n8 mtdoops.mtddev=omap2.nand ubi.mtd=4 root=/dev/mmcblk0p1 rw rootfstype=ext4,ext3 rootwait console=ttyO2,115200n8 vram=12M omapfb.vram=0:8M,1:4M omapfb.rotate_type=0 omapdss.def_disp=lcd rootwait twl4030_charger.allow_usb=1 log_buf_len=8M ignore_loglevel earlyprintk [ 0.000000] log_buf_len: 8388608 bytes [ 0.000000] early log buf free: 63960(97%) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 1001476K/1046528K available (6547K kernel code, 650K rwdata, 1820K rodata, 1024K init, 220K bss, 28668K reserved, 16384K cma-reserved, 243712K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (7540 kB) [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 651 kB) [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 221 kB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 4.0) with 96 interrupts [ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz [ 0.000000] OMAP clockevent source: timer1 at 32768 Hz [ 0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns [ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns [ 0.000030] OMAP clocksource: 32k_counter at 32768 Hz [ 0.002136] Console: colour dummy device 80x30 [ 0.002197] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032) [ 0.115203] pid_max: default: 32768 minimum: 301 [ 0.115386] Security Framework initialized [ 0.115509] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.115539] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.116455] CPU: Testing write buffer coherency: ok [ 0.116943] CPU0: thread -1, cpu 0, socket -1, mpidr 0 [ 0.165161] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.175079] Hierarchical SRCU implementation. [ 0.195098] smp: Bringing up secondary CPUs ... [ 0.195129] smp: Brought up 1 node, 1 CPU [ 0.195129] SMP: Total of 1 processors activated (597.60 BogoMIPS). [ 0.195159] CPU: All CPU(s) started in SVC mode. [ 0.197204] devtmpfs: initialized [ 0.225524] random: get_random_u32 called from bucket_table_alloc+0x15c/0x1ac with crng_init=0 [ 0.235504] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3 [ 0.236236] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.236267] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.237731] pinctrl core: initialized pinctrl subsystem [ 0.239074] NET: Registered protocol family 16 [ 0.242218] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.273742] omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp [ 0.274566] omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp [ 0.357635] audit: initializing netlink subsys (disabled) [ 0.363189] audit: type=2000 audit(0.360:1): state=initialized audit_enabled=0 res=1 [ 0.364807] cpuidle: using governor menu [ 0.366088] Reprogramming SDRC clock to 400000000 Hz [ 0.377929] OMAP GPIO hardware version 2.5 [ 0.386535] GPIO line 143 (irda_en) hogged as output/high [ 0.414459] omap-gpmc 6e000000.gpmc: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_gpmc_pins, deferring probe [ 0.434875] No ATAGs? [ 0.434906] hw-breakpoint: debug architecture 0x4 unsupported. [ 0.436126] omap4_sram_init:Unable to allocate sram needed to handle errata I688 [ 0.436157] omap4_sram_init:Unable to get sram pool needed to handle errata I688 [ 0.436523] OMAP DMA hardware revision 5.0 [ 0.543273] omap-dma-engine 48056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported) [ 0.548492] reg-fixed-voltage wlan_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_wlan_pins, deferring probe [ 0.548553] reg-fixed-voltage bt_en_regulator: could not find pctldev for node /ocp@68000000/l4@48000000/scm@2000/pinmux@30/pinmux_bt_pins, deferring probe [ 0.558776] omap-iommu 480bd400.mmu: 480bd400.mmu registered [ 0.559783] iommu: Adding device 480bc000.isp to group 0 [ 0.562622] vgaarb: loaded [ 0.563812] SCSI subsystem initialized [ 0.565612] libata version 3.00 loaded. [ 0.566589] usbcore: registered new interface driver usbfs [ 0.566802] usbcore: registered new interface driver hub [ 0.567016] usbcore: registered new device driver usb [ 0.567718] usb_phy_generic hsusb2_phy: hsusb2_phy supply vcc not found, using dummy regulator [ 0.573394] omap_i2c 48070000.i2c: bus 0 rev4.4 at 2600 kHz [ 0.578063] omap_i2c 48072000.i2c: bus 1 rev4.4 at 400 kHz [ 0.580566] omap_i2c 48060000.i2c: bus 2 rev4.4 at 100 kHz [ 0.582733] Advanced Linux Sound Architecture Driver Initialized. [ 0.587829] clocksource: Switched to clocksource 32k_counter [ 0.684509] VFS: Disk quotas dquot_6.6.0 [ 0.684631] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.719573] NET: Registered protocol family 2 [ 0.720947] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) [ 0.721008] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.721130] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.721282] TCP: Hash tables configured (established 8192 bind 8192) [ 0.721435] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.721496] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.722381] NET: Registered protocol family 1 [ 0.722442] PCI: CLS 0 bytes, default 64 [ 0.726928] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available [ 0.732513] Initialise system trusted keyrings [ 0.734283] workingset: timestamp_bits=30 max_order=18 bucket_order=0 [ 0.734924] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.739746] Key type asymmetric registered [ 0.739776] Asymmetric key parser 'x509' registered [ 0.739898] bounce: pool size: 64 pages [ 0.740020] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [ 0.740051] io scheduler noop registered [ 0.740051] io scheduler deadline registered [ 0.740142] io scheduler cfq registered (default) [ 0.740173] io scheduler mq-deadline registered [ 0.740173] io scheduler kyber registered [ 0.749450] pinctrl-single 48002030.pinmux: 284 pins, size 568 [ 0.750427] pinctrl-single 48002a00.pinmux: 46 pins, size 92 [ 0.751434] pinctrl-single 480025a0.pinmux: 46 pins, size 92 [ 0.752319] pinctrl-single 48002274.pinmux_mcbsp1: initialized with no interrupts [ 0.752319] pinctrl-single 48002274.pinmux_mcbsp1: 10 pins, size 4 [ 0.753082] pinctrl-single 480022d8.pinmux_tv_out: initialized with no interrupts [ 0.753082] pinctrl-single 480022d8.pinmux_tv_out: 4 pins, size 4 [ 0.770263] omap_uart 4806a000.serial: no wakeirq for uart0 [ 0.770782] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 88, base_baud = 3000000) is a OMAP UART0 [ 0.771514] serial serial0: tty port ttyO0 registered [ 0.772064] omap_uart 4806c000.serial: no wakeirq for uart1 [ 0.772277] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 89, base_baud = 3000000) is a OMAP UART1 [ 0.772796] serial serial1: tty port ttyO1 registered [ 0.773315] omap_uart 49020000.serial: no wakeirq for uart2 [ 0.773742] 49020000.serial: ttyO2 at MMIO 0x49020000 (irq = 90, base_baud = 3000000) is a OMAP UART2 [ 1.669250] console [ttyO2] enabled [ 1.674468] omap_uart 49042000.serial: no wakeirq for uart3 [ 1.681060] 49042000.serial: ttyO3 at MMIO 0x49042000 (irq = 96, base_baud = 3000000) is a OMAP UART3 [ 1.715942] brd: module loaded [ 1.732696] loop: module loaded [ 1.771636] twl 0-0048: PIH (irq 23) chaining IRQs 144..152 [ 1.777618] twl 0-0048: power (irq 149) chaining IRQs 152..159 [ 1.789855] random: fast init done [ 1.796966] VAUX3: Bringing 2800000uV into 2500000-2500000uV [ 1.822326] VMMC2: Bringing 2600000uV into 1800000-1800000uV [ 1.829650] VMMC2: failed to apply 1800000-1800000uV constraint(-22) [ 1.836334] twl4030_reg 48070000.i2c:twl@48:regulator-vmmc2: can't register VMMC2, -22 [ 1.844879] twl4030_reg: probe of 48070000.i2c:twl@48:regulator-vmmc2 failed with error -22 [ 1.863830] VSIM: Bringing 1800000uV into 2800000-2800000uV [ 1.909942] libphy: Fixed MDIO Bus: probed [ 1.924407] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.932098] ehci-pci: EHCI PCI platform driver [ 1.937194] usbcore: registered new interface driver usb-storage [ 1.944854] mousedev: PS/2 mouse device common for all mice [ 1.953552] twl_rtc 48070000.i2c:twl@48:rtc: Power up reset detected. [ 1.961181] twl_rtc 48070000.i2c:twl@48:rtc: Enabling TWL-RTC [ 1.969757] twl_rtc 48070000.i2c:twl@48:rtc: rtc core: registered 48070000.i2c:twl@48:rtc as rtc0 [ 1.980316] i2c /dev entries driver [ 1.985534] IR NEC protocol handler initialized [ 1.990753] IR RC5(x/sz) protocol handler initialized [ 1.996063] IR RC6 protocol handler initialized [ 2.000915] IR JVC protocol handler initialized [ 2.005645] IR Sony protocol handler initialized [ 2.010681] IR SANYO protocol handler initialized [ 2.015624] IR Sharp protocol handler initialized [ 2.020629] IR MCE Keyboard/mouse protocol handler initialized [ 2.026733] IR XMP protocol handler initialized [ 2.031524] Driver for 1-wire Dallas network protocol. [ 2.039276] ti-soc-thermal 48002524.bandgap: This OMAP thermal sensor is unreliable. You've been warned [ 2.049774] ti-soc-thermal 48002524.bandgap: Non-trimmed BGAP, Temp not accurate [ 2.060546] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec [ 2.079956] sdhci: Secure Digital Host Controller Interface driver [ 2.086395] sdhci: Copyright(c) Pierre Ossman [ 2.119934] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.127655] ledtrig-cpu: registered to indicate activity on CPUs [ 2.142974] usbcore: registered new interface driver usbhid [ 2.150115] usbhid: USB HID core driver [ 2.154602] ashmem: initialized [ 2.164764] oprofile: using arm/armv7 [ 2.168762] mmc0: host does not support reading read-only switch, assuming write-enable [ 2.178344] Initializing XFRM netlink socket [ 2.182983] mmc0: new high speed SDHC card at address b368 [ 2.188934] NET: Registered protocol family 17 [ 2.193634] NET: Registered protocol family 15 [ 2.199462] mmcblk0: mmc0:b368 USD 7.47 GiB [ 2.205291] Key type dns_resolver registered [ 2.211181] omap2_set_init_voltage: unable to find boot up OPP for vdd_core [ 2.218627] omap2_set_init_voltage: unable to set vdd_core [ 2.224731] omap3_pm_off_mode_enable(1) [ 2.229064] mmcblk0: p1 [ 2.232788] ThumbEE CPU extension supported. [ 2.237274] Registering SWP/SWPB emulation handler [ 2.243316] SmartReflex Class3 initialized [ 2.248870] Loading compiled-in X.509 certificates [ 2.272949] platform 6e000000.gpmc: Retrying from deferred list [ 2.279907] omap-gpmc 6e000000.gpmc: GPMC revision 5.0 [ 2.285308] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000 [ 2.293548] omap2-onenand 4000000.onenand: initializing on CS0 (0x04000000), va (ptrval), DMA mode [ 2.303405] OneNAND Manufacturer: Samsung (0xec) [ 2.308349] Muxed OneNAND 512MB 1.8V 16-bit (0x50) [ 2.313323] OneNAND version = 0x0232 [ 2.317077] Chip support all block unlock [ 2.321319] Chip has 4KiB pagesize [ 2.324859] Chip has cache program feature [ 2.330688] Scanning device for bad blocks [ 2.438171] onenand_bbt_wait: ecc 0xaaaa ctrl 0x0400 intr 0x8080 addr1 0x34b addr8 0x0 [ 2.446441] OneNAND eraseblock 843 is an initial bad block [ 2.599395] omap2-onenand 4000000.onenand: optimized timings for 83 MHz [ 2.606353] 5 fixed-partitions partitions found on MTD device 4000000.onenand [ 2.613861] Creating 5 MTD partitions on "4000000.onenand": [ 2.619720] 0x000000000000-0x000000080000 : "X-Loader" [ 2.626708] 0x000000080000-0x000000240000 : "U-Boot" [ 2.633850] 0x000000240000-0x000000280000 : "U-Boot Env" [ 2.641326] 0x000000280000-0x000000880000 : "Kernel" [ 2.648498] 0x000000880000-0x000020000000 : "File System" [ 2.658264] platform wlan_en_regulator: Retrying from deferred list [ 2.666290] platform bt_en_regulator: Retrying from deferred list [ 2.673919] platform 480b4000.mmc: Retrying from deferred list [ 2.795898] ubi0: default fastmap pool size: 100 [ 2.802978] ubi0: default fastmap WL pool size: 50 [ 2.808135] ubi0: attaching mtd4 [ 2.815002] omap_hsmmc 480b4000.mmc: card claims to support voltages below defined range [ 2.834747] onenand_wait: correctable ECC error = 0x5555 [ 2.841308] ubi0: fixable bit-flip detected at PEB 187 [ 2.858123] mmc1: new high speed SDIO card at address 0001 [ 2.876342] onenand_wait: correctable ECC error = 0x5555 [ 2.882049] ubi0: fixable bit-flip detected at PEB 465 [ 2.948211] onenand_wait: correctable ECC error = 0x5555 [ 2.953765] ubi0: fixable bit-flip detected at PEB 1326 [ 2.975341] onenand_wait: correctable ECC error = 0x5555 [ 2.980987] ubi0: fixable bit-flip detected at PEB 1554 [ 3.015136] onenand_wait: correctable ECC error = 0x5555 [ 3.020751] ubi0: fixable bit-flip detected at PEB 1960 [ 3.029998] ubi0: scanning is finished [ 3.040924] ubi0: attached mtd4 (name "File System", size 503 MiB) [ 3.047393] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes [ 3.054962] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024 [ 3.062164] ubi0: VID header offset: 1024 (aligned 1024), data offset: 4096 [ 3.069519] ubi0: good PEBs: 2013, bad PEBs: 1, corrupted PEBs: 0 [ 3.075897] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 3.083587] ubi0: max/mean erase counter: 59/35, WL threshold: 4096, image sequence number: 163025748 [ 3.093353] ubi0: available PEBs: 0, total reserved PEBs: 2013, PEBs reserved for bad PEB handling: 39 [ 3.103149] ubi0: background thread "ubi_bgt0d" started, PID 1039 [ 3.110595] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 3.119354] input: gpio-keys-wwan-wakeup as /devices/platform/gpio-keys-wwan-wakeup/input/input1 [ 3.129791] omap_gpio 49056000.gpio: Could not set line 16 debounce to 10000 microseconds (-22) [ 3.139648] input: antenna-detect as /devices/platform/antenna-detect/input/input2 [ 3.149291] twl_rtc 48070000.i2c:twl@48:rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801) [ 3.159606] sr_init: No PMIC hook to init smartreflex [ 3.165618] smartreflex 480cb000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.175109] smartreflex 480c9000.smartreflex: omap_sr_probe: SmartReflex driver initialized [ 3.186187] VAUX3: disabling [ 3.190185] VDAC: disabling [ 3.193664] VUSB1V5: disabling [ 3.197296] VUSB1V8: disabling [ 3.201049] VUSB3V1: disabling [ 3.204681] wlan-en-regulator: disabling [ 3.208923] bt-en-regulator: disabling [ 3.212860] ALSA device list: [ 3.215942] No soundcards found. [ 3.250671] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null) [ 3.259613] VFS: Mounted root (ext4 filesystem) on device 179:1. [ 3.280364] devtmpfs: mounted [ 3.285339] Freeing unused kernel memory: 1024K Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory INIT: version 2.88 booting [info] Using makefile-style concurrent boot in runlevel S. [....] Starting the hotplug events dispatcher: udevd[ 4.705017] systemd-udevd[1172]: starting version 215 [ 4.800628] random: udevd: uninitialized urandom read (16 bytes read) [ 4.821441] random: udevd: uninitialized urandom read (16 bytes read) . [ ok ] Synthesizing the initial hotplug events...^[[c[ 5.236297] omapdss: unknown parameter 'def_disp' ignored done. [....] Waiting for /dev to be fully populated...[ 5.303161] omapdss_dss 48050000.dss: 48050000.dss supply vdda_video not found, using dummy regulator ^[[c[ 5.342681] DSS: OMAP DSS rev 2.0 [ 5.365570] omapdss_dss 48050000.dss: bound 48050400.dispc (ops dispc_component_ops [omapdss]) [ 5.425079] omapdss_dss 48050000.dss: bound 48050c00.encoder (ops venc_component_ops [omapdss]) [ 5.469055] gnss: GNSS driver registered with major 243 [ 5.517791] ehci-omap: OMAP-EHCI Host Controller driver [ 5.550659] input: twl4030_pwrbutton as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:pwrbutton/input/input3 [ 5.583160] input: twl4030:vibrator as /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:audio/twl4030-vibra/input/input4 [ 5.658874] twl4030_madc 48070000.i2c:twl@48:madc: 48070000.i2c:twl@48:madc supply vusb3v1 not found, using dummy regulator [ 5.670684] ehci-omap 48064800.ehci: EHCI Host Controller [ 5.699920] ehci-omap 48064800.ehci: new USB bus registered, assigned bus number 1 [ 5.779174] ehci-omap 48064800.ehci: irq 93, io mem 0x48064800 [ 5.791900] twl4030_gpio twl4030-gpio: can't dispatch IRQs from modules [ 5.836730] ehci-omap 48064800.ehci: USB 2.0 started, EHCI 1.00 [ 5.882385] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 5.893646] media: Linux media interface: v0.10 [ 5.932739] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 5.948638] platform 48070000.i2c:twl@48:bci: Retrying from deferred list [ 6.018402] input: accelerometer-iio-input-bridge as /devices/virtual/input/input5 [ 6.028686] twl4030_usb 48070000.i2c:twl@48:twl4030-usb: Initialized TWL4030 USB module [ 6.044372] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 6.062072] Linux video capture interface: v2.00 [ 6.072601] input: TSC2007 Touchscreen as /devices/platform/68000000.ocp/48072000.i2c/i2c-1/1-0048/input/input6 [ 6.108154] usb usb1: Product: EHCI Host Controller [ 6.113250] usb usb1: Manufacturer: Linux 4.17.0-letux+ ehci_hcd [ 6.125518] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver [ 6.172119] usb usb1: SerialNumber: 48064800.ehci [ 6.180450] bmp280 1-0076: 1-0076 supply vddd not found, using dummy regulator [ 6.207427] hub 1-0:1.0: USB hub found [ 6.212493] bmp280 1-0076: 1-0076 supply vdda not found, using dummy regulator [ 6.220794] hub 1-0:1.0: 3 ports detected [ 6.245635] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2 [ 6.298309] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 6.363555] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 6.394958] usb usb2: Product: MUSB HDRC host driver [ 6.442871] usb usb2: Manufacturer: Linux 4.17.0-letux+ musb-hcd [ 6.505920] usb usb2: SerialNumber: musb-hdrc.0.auto [ 6.535705] hub 2-0:1.0: USB hub found [ 6.550048] i2c 1-0030: Retrying from deferred list [ 6.576538] hub 2-0:1.0: 1 port detected [ 6.612670] i2c 1-0030: Retrying from deferred list [ 6.626068] i2c 1-0030: Retrying from deferred list [ 6.648223] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode [ 6.728515] i2c 1-0030: Retrying from deferred list [ 6.738250] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 6.747406] i2c 1-0030: Retrying from deferred list [ 6.790191] bq27xxx_battery_setup [ 6.793701] bq27xxx_battery_setup: dm_regs= (null) [ 6.798980] i2c 1-0030: Retrying from deferred list [ 6.812499] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix [ 6.835296] bq27xxx_battery_settings [ 6.840545] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088380908 [ 6.882781] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 6.966156] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 6.994628] wwan_on_off_init: wwan_on_off_init [ 7.014556] pps_core: LinuxPPS API ver. 1 registered [ 7.037109] i2c 1-0030: Retrying from deferred list [ 7.042602] iio_charge:-747 [ 7.048522] platform backlight: Retrying from deferred list [ 7.054901] pinctrl_generic_get_group_name: group>name is NULL [ 7.077026] pinctrl_generic_group_name_to_selector: pctldev = ee33b180 function = backlight_pins_pinmux [ 7.096343] strcmp(backlight_pins_pinmux, (null)) [ 7.108062] get_group_name() = pinctrl_generic_get_group_name+0x0/0x5c [ 7.115081] ngroups = 19 [ 7.119476] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.129150] selector = 18 [ 7.132080] CPU: 0 PID: 952 Comm: kworker/0:2 Not tainted 4.17.0-letux+ #2494 [ 7.139526] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 7.146087] Workqueue: events deferred_probe_work_func [ 7.151489] [<c01106ec>] (unwind_backtrace) from [<c010c058>] (show_stack+0x10/0x14) [ 7.159606] [<c010c058>] (show_stack) from [<c074bd08>] (dump_stack+0x7c/0x9c) [ 7.167144] [<c074bd08>] (dump_stack) from [<c042ce78>] (pinctrl_generic_add_group+0xa4/0x174) [ 7.176147] [<c042ce78>] (pinctrl_generic_add_group) from [<c0432128>] (pcs_dt_node_to_map+0x4b0/0x81c) [ 7.185943] [<c0432128>] (pcs_dt_node_to_map) from [<c04300c0>] (pinctrl_dt_to_map+0x1ec/0x2b8) [ 7.195037] [<c04300c0>] (pinctrl_dt_to_map) from [<c042d10c>] (create_pinctrl+0x58/0x2f8) [ 7.203674] [<c042d10c>] (create_pinctrl) from [<c042d46c>] (devm_pinctrl_get+0x2c/0x6c) [ 7.212127] [<c042d46c>] (devm_pinctrl_get) from [<c04f2f88>] (pinctrl_bind_pins+0x3c/0x138) [ 7.220947] [<c04f2f88>] (pinctrl_bind_pins) from [<c04d3fa4>] (driver_probe_device+0xe8/0x318) [ 7.230041] [<c04d3fa4>] (driver_probe_device) from [<c04d27f4>] (bus_for_each_drv+0x84/0x94) [ 7.238952] [<c04d27f4>] (bus_for_each_drv) from [<c04d3e24>] (__device_attach+0x88/0xfc) [ 7.247497] [<c04d3e24>] (__device_attach) from [<c04d33d0>] (bus_probe_device+0x28/0x80) [ 7.256011] [<c04d33d0>] (bus_probe_device) from [<c04d38ec>] (deferred_probe_work_func+0xf8/0x130) [ 7.265472] [<c04d38ec>] (deferred_probe_work_func) from [<c014874c>] (process_one_work+0x244/0x464) [ 7.275054] [<c014874c>] (process_one_work) from [<c0148f20>] (worker_thread+0x2c0/0x3ec) [ 7.283599] [<c0148f20>] (worker_thread) from [<c014cef4>] (kthread+0x134/0x150) [ 7.291320] [<c014cef4>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 7.298858] Exception stack(0xee69dfb0 to 0xee69dff8) [ 7.304138] dfa0: 00000000 00000000 00000000 00000000 [ 7.312683] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 7.321197] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 7.528137] gname[0] = pinmux_hsusb2_pins [ 7.532531] gname[1] = pinmux_uart1_pins [ 7.536804] gname[2] = pinmux_uart2_pins [ 7.558166] gname[3] = pinmux_uart3_pins [ 7.562469] gname[4] = pinmux_twl4030_pins [ 7.566925] gname[5] = pinmux_mmc1_pins [ 7.588165] gname[6] = pinmux_wlan_irq_pin [ 7.592651] gname[7] = pinmux_gpmc_pins [ 7.596832] gname[8] = pinmux_wlan_pins [ 7.608184] gname[9] = pinmux_bt_pins [ 7.612213] gname[10] = pinmux_dss_dpi_pins [ 7.616760] gname[11] = pinmux_mcbsp1_pins [ 7.636383] gname[12] = pinmux_mcbsp2_pins [ 7.648162] gname[13] = pinmux_mcbsp3_pins [ 7.652648] gname[14] = pinmux_mcbsp4_pins [ 7.657104] gname[15] = pinmux_penirq_pins [ 7.671142] gname[16] = pinmux_camera_pins [ 7.675598] gname[17] = hdq_pins [ 7.688140] pinctrl_generic_get_group_name: group>name is NULL [ 7.694244] gname[18] = (null)
^^^ this is interesting!
The printk code behind pinctrl_generic_get_group_name is:
const char *pinctrl_generic_get_group_name(struct pinctrl_dev *pctldev, unsigned int selector) { struct group_desc *group;
group = radix_tree_lookup(&pctldev->pin_group_tree, selector); if (!group) { printk("%s: selector %d not found\n", __func__, selector); } if (!group) return NULL;
if (!group->name) { printk("%s: group>name is NULL\n", __func__); } return group->name; }
Which means that the struct group_desc exists but the group->name is NULL. So there is no NULL magically added to the radix tree, but the group->name pointer becomes NULL. Which means that the memory region was overwritten.
Next I tried to printk all entries of the struct group_desc
if (!group->name) { printk("%s: group =%px\n", __func__, group); printk(" group>name = %s\n", group->name); printk(" group>pins = %px\n", group->pins); printk(" group>num_pins = %d\n", group->num_pins); printk(" group>data = %px\n", group->data); }
Result (first lines where something goes wrong):
[ 6.798248] i2c 1-0030: Retrying from deferred list [ 6.813171] platform backlight: Retrying from deferred list [ 6.823303] pinctrl_generic_get_group_name: group =ed1eec90 [ 6.836791] group>name = (null) [ 6.846557] group>pins = ed1eed50 [ 6.852874] group>num_pins = 1 [ 6.856262] group>data = ee441c10
Here another run:
[ 6.923797] i2c 1-0030: Retrying from deferred list [ 6.935577] platform backlight: Retrying from deferred list [ 6.948547] pinctrl_generic_get_group_name: group =ed213b50 [ 6.962036] group>name = (null) [ 6.965515] group>pins = ed213c10 [ 6.978088] group>num_pins = 1 [ 6.983520] group>data = ee444c10
Hm.
Looks sane, especially group->pins (allocated in pcs_parse_one_pinctrl_entry just before pinctrl_generic_add_group is called), and group->num_pins.
group>name must have been != NULL in pinctrl_generic_add_group() or we would have seen an error before the first one.
So only group->name became NULL, most likely AFTER calling pinctrl_generic_add_group - since otherwise we could not even find the entry in the radix tree.
But how can that happen?
The interesting thing is that it is repeatable even with randomly changing base addresses. So it must be someone who knows the address of the (struct) group_desc. But there aren't many places:
https://elixir.bootlin.com/linux/v4.18-rc1/ident/group_desc
Some of these just use a group_desc variable and in most cases the struct group_desc pointer is hidden local to the function.
The only exception is pinctrl_generic_get_group(). But it seems not to be used explicitly on OMAP systems except for iodelay but there it is also a local variable and not shared with anyone else.
So it remains a miracle where the code sits that does the group->name = NULL; and only for the "backlight" driver.
BR, Nikolaus
[ 7.697692] pinctrl_generic_get_group_name: group>name is NULL [ 7.708221] pinctrl_generic_get_group_name: group>name is NULL [ 7.714324] pinctrl_get_group_selector: strcmp: (null) backlight_pins_pinmux [ 7.733917] group_selector = 18 [ 7.737426] get_group_name = pinctrl_generic_get_group_name+0x0/0x5c [ 7.758148] pctldev = 0xee33b180 [ 7.761749] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 7.786560] pgd = (ptrval) [ 7.789642] [00000000] *pgd=00000000 [ 7.793395] Internal error: Oops: 17 [#1] PREEMPT SMP ARM [ 7.799041] Modules linked in: pps_gpio(+) panel_tpo_td028ttec1 snd_soc_simple_card(+) snd_soc_simple_card_utils snd_soc_omap_twl4030(+) encoder_opa362 pps_core wwan_on_off(+) snd_soc_gtm601 connector_analog_tv pwm_omap_dmtimer generic_adc_battery pwm_bl bq27xxx_battery_hdq bq27xxx_battery bmp280_spi wlcore_sdio ov9655 v4l2_fwnode v4l2_common omap_hdq omap2430 bmp280_i2c bmp280 videodev at24 bmc150_accel_i2c bmc150_magn_i2c tsc2007 bmc150_magn leds_tca6507 bmc150_accel_core industrialio_triggered_buffer phy_twl4030_usb kfifo_buf media snd_soc_omap_mcbsp snd_soc_omap snd_pcm_dmaengine musb_hdrc gpio_twl4030 snd_soc_twl4030 twl4030_charger twl4030_vibra gnss_w2sg0004 twl4030_madc twl4030_pwrbutton industrialio ehci_omap gnss w2cbw003_bluetooth omapdss omapdss_base cec [ 7.870178] CPU: 0 PID: 952 Comm: kworker/0:2 Not tainted 4.17.0-letux+ #2494 [ 7.877655] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 7.884216] Workqueue: events deferred_probe_work_func [ 7.889617] PC is at strcmp+0x0/0x34 [ 7.893341] LR is at pinctrl_get_group_selector+0x90/0xd8 [ 7.898986] pc : [<c0758fc0>] lr : [<c042dac8>] psr: 60000113 [ 7.905548] sp : ee69de20 ip : 00000000 fp : 00000000 [ 7.911010] r10: ed22f6c0 r9 : 00000014 r8 : 00000000 [ 7.916442] r7 : c0799fd4 r6 : ee33b180 r5 : ef7c4958 r4 : 00000012 [ 7.923248] r3 : 00000000 r2 : 00000000 r1 : ef7c4958 r0 : 00000000 [ 7.930053] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 7.937499] Control: 10c5387d Table: ad3a8019 DAC: 00000051 [ 7.943511] Process kworker/0:2 (pid: 952, stack limit = 0x(ptrval)) [ 7.950134] Stack: (0xee69de20 to 0xee69e000) [ 7.954681] de20: ee69de44 00000000 ee33b180 ed12c210 ef7c4958 ed22f6c0 00000000 c042eaac [ 7.963226] de40: ed20b910 00000001 ed2267c0 ed22f700 ed22f740 ed12c210 00000000 c042d2a4 [ 7.971771] de60: 00000014 ee28f780 c0b59e30 c08e9fec ee230010 00000000 ed226890 ee230010 [ 7.980316] de80: c0bd1df0 fffffdfb bf212014 0000002e c0b98f70 c042d46c 00000000 ee230010 [ 7.988830] dea0: ed2265d0 c04f2f88 ee230010 00000000 c0bd1df4 c04d3fa4 00000000 ee69def0 [ 7.997375] dec0: c04d42b0 ee230044 c0b664c4 c0b02d00 00000000 c04d27f4 ee01be6c ed204b38 [ 8.005889] dee0: ee230010 c0b666c8 00000001 c04d3e24 ee230010 00000001 00000000 ee230010 [ 8.014434] df00: c0b666c8 ee230010 00000000 c04d33d0 ee230010 c0b664a8 ef7b7c80 c04d38ec [ 8.022979] df20: ee4eef00 c0b664dc ef7b7c80 00000000 ef7baf00 c014874c ee4eef00 c0b664dc [ 8.031524] df40: ffff8d8f ee4eef00 ef7b7c80 ef7b7c80 ee69c000 ef7b7c98 c0b02d00 ee4eef18 [ 8.040039] df60: 00000008 c0148f20 00000000 ee680b00 ee4ebdc0 00000000 ee4eef00 c0148c60 [ 8.048583] df80: ee0b5ef0 ee680b1c 00000000 c014cef4 ee4ebdc0 c014cdc0 00000000 00000000 [ 8.057128] dfa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 8.065673] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 8.074218] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 8.082763] [<c0758fc0>] (strcmp) from [<c042dac8>] (pinctrl_get_group_selector+0x90/0xd8) [ 8.091400] [<c042dac8>] (pinctrl_get_group_selector) from [<c042eaac>] (pinmux_map_to_setting+0xf0/0x134) [ 8.101501] [<c042eaac>] (pinmux_map_to_setting) from [<c042d2a4>] (create_pinctrl+0x1f0/0x2f8) [ 8.110565] [<c042d2a4>] (create_pinctrl) from [<c042d46c>] (devm_pinctrl_get+0x2c/0x6c) [ 8.119018] [<c042d46c>] (devm_pinctrl_get) from [<c04f2f88>] (pinctrl_bind_pins+0x3c/0x138) [ 8.127838] [<c04f2f88>] (pinctrl_bind_pins) from [<c04d3fa4>] (driver_probe_device+0xe8/0x318) [ 8.136962] [<c04d3fa4>] (driver_probe_device) from [<c04d27f4>] (bus_for_each_drv+0x84/0x94) [ 8.145843] [<c04d27f4>] (bus_for_each_drv) from [<c04d3e24>] (__device_attach+0x88/0xfc) [ 8.154418] [<c04d3e24>] (__device_attach) from [<c04d33d0>] (bus_probe_device+0x28/0x80) [ 8.162963] [<c04d33d0>] (bus_probe_device) from [<c04d38ec>] (deferred_probe_work_func+0xf8/0x130) [ 8.172424] [<c04d38ec>] (deferred_probe_work_func) from [<c014874c>] (process_one_work+0x244/0x464) [ 8.181976] [<c014874c>] (process_one_work) from [<c0148f20>] (worker_thread+0x2c0/0x3ec) [ 8.190551] [<c0148f20>] (worker_thread) from [<c014cef4>] (kthread+0x134/0x150) [ 8.198272] [<c014cef4>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 8.205841] Exception stack(0xee69dfb0 to 0xee69dff8) [ 8.211120] dfa0: 00000000 00000000 00000000 00000000 [ 8.219665] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 8.228210] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 8.235137] Code: e3520000 e5e32001 1afffffb e12fff1e (e4d03001) [ 8.248138] pinctrl_generic_group_name_to_selector: pctldev = ee33b180 function = modem_pins [ 8.256988] strcmp(modem_pins, (null)) [ 8.345520] get_group_name() = pinctrl_generic_get_group_name+0x0/0x5c [ 8.376617] ngroups = 20 [ 8.379638] selector = 18 [ 8.382568] CPU: 0 PID: 1207 Comm: udevd Tainted: G D 4.17.0-letux+ #2494 [ 8.391021] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 8.397613] [<c01106ec>] (unwind_backtrace) from [<c010c058>] (show_stack+0x10/0x14) [ 8.405700] [<c010c058>] (show_stack) from [<c074bd08>] (dump_stack+0x7c/0x9c) [ 8.413269] [<c074bd08>] (dump_stack) from [<c042ce78>] (pinctrl_generic_add_group+0xa4/0x174) [ 8.422271] [<c042ce78>] (pinctrl_generic_add_group) from [<c0432128>] (pcs_dt_node_to_map+0x4b0/0x81c) [ 8.432128] [<c0432128>] (pcs_dt_node_to_map) from [<c04300c0>] (pinctrl_dt_to_map+0x1ec/0x2b8) [ 8.441223] [<c04300c0>] (pinctrl_dt_to_map) from [<c042d10c>] (create_pinctrl+0x58/0x2f8) [ 8.449890] [<c042d10c>] (create_pinctrl) from [<c042d46c>] (devm_pinctrl_get+0x2c/0x6c) [ 8.458343] [<c042d46c>] (devm_pinctrl_get) from [<c04f2f88>] (pinctrl_bind_pins+0x3c/0x138) [ 8.467193] [<c04f2f88>] (pinctrl_bind_pins) from [<c04d3fa4>] (driver_probe_device+0xe8/0x318) [ 8.476287] [<c04d3fa4>] (driver_probe_device) from [<c04d4254>] (__driver_attach+0x80/0xa4) [ 8.485107] [<c04d4254>] (__driver_attach) from [<c04d2738>] (bus_for_each_dev+0x58/0x7c) [ 8.493682] [<c04d2738>] (bus_for_each_dev) from [<c04d35d0>] (bus_add_driver+0xcc/0x1e0) [ 8.502227] [<c04d35d0>] (bus_add_driver) from [<c04d4df8>] (driver_register+0x9c/0xe0) [ 8.510620] [<c04d4df8>] (driver_register) from [<c0102d74>] (do_one_initcall+0xb4/0x248) [ 8.519165] [<c0102d74>] (do_one_initcall) from [<c01a7174>] (do_init_module+0x58/0x1d0) [ 8.527648] [<c01a7174>] (do_init_module) from [<c01a5fa4>] (load_module+0xe04/0xfb0) [ 8.535858] [<c01a5fa4>] (load_module) from [<c01a6328>] (sys_finit_module+0x88/0x90) [ 8.544036] [<c01a6328>] (sys_finit_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54) [ 8.552612] Exception stack(0xed09bfa8 to 0xed09bff0) [ 8.557891] bfa0: b6d6a7d4 00051f70 00000006 b6d699f8 00000000 b6d6a31c [ 8.566436] bfc0: b6d6a7d4 00051f70 d5a16800 0000017b 00020000 00037f78 00050048 000593e8 [ 8.575012] bfe0: bede5ee0 bede5ed0 b6d63c4b b6e6ea42 [ 8.694702] ---[ end trace e23961e39ad1e53b ]--- [ 9.145721] gname[0] = pinmux_hsusb2_pins [ 9.152832] gname[1] = pinmux_uart1_pins [ 9.157623] gname[2] = pinmux_uart2_pins [ 9.162536] gname[3] = pinmux_uart3_pins [ 9.167541] gname[4] = pinmux_twl4030_pins [ 9.188140] gname[5] = pinmux_mmc1_pins [ 9.192352] gname[6] = pinmux_wlan_irq_pin [ 9.196807] gname[7] = pinmux_gpmc_pins [ 9.238220] gname[8] = pinmux_wlan_pins [ 9.255950] gname[9] = pinmux_bt_pins [ 9.268737] gname[10] = pinmux_dss_dpi_pins [ 9.300689] gname[11] = pinmux_mcbsp1_pins [ 9.324005] gname[12] = pinmux_mcbsp2_pins [ 9.343505] gname[13] = pinmux_mcbsp3_pins [ 9.365600] gname[14] = pinmux_mcbsp4_pins [ 9.389404] gname[15] = pinmux_penirq_pins [ 9.393859] gname[16] = pinmux_camera_pins [ 9.438110] gname[17] = hdq_pins [ 9.455657] pinctrl_generic_get_group_name: group>name is NULL [ 9.492248] gname[18] = (null) [ 9.495666] gname[19] = backlight_pins_pinmux [ 9.571685] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 9.626831] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 9.665374] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 9.682403] cfg80211: failed to load regulatory.db [ 24.218994] random: crng init done
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
BR and thanks, Nikolaus
Kernel mailing list Kernel@pyra-handheld.com http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel
At 17:21 +0200 on Saturday 2018-06-23, H. Nikolaus Schaller wrote:
Am 23.06.2018 um 12:13 schrieb H. Nikolaus Schaller hns@goldelico.com:
[ 7.657104] gname[15] = pinmux_penirq_pins [ 7.671142] gname[16] = pinmux_camera_pins [ 7.675598] gname[17] = hdq_pins [ 7.688140] pinctrl_generic_get_group_name: group>name is NULL [ 7.694244] gname[18] = (null)
^^^ this is interesting!
The printk code behind pinctrl_generic_get_group_name is:
const char *pinctrl_generic_get_group_name(struct pinctrl_dev *pctldev, unsigned int selector) { struct group_desc *group;
group = radix_tree_lookup(&pctldev->pin_group_tree, selector); if (!group) { printk("%s: selector %d not found\n", __func__, selector); } if (!group) return NULL;
if (!group->name) { printk("%s: group>name is NULL\n", __func__); } return group->name; }
Which means that the struct group_desc exists but the group->name is NULL. So there is no NULL magically added to the radix tree, but the group->name pointer becomes NULL. Which means that the memory region was overwritten.
Can you rule out the possibility that the group->name was not set to NULL when the group was created in pinctrl_generic_add_group?
N.
Hi,
Am 23.06.2018 um 18:39 schrieb N. Jackson nljlistbox2@gmail.com:
At 17:21 +0200 on Saturday 2018-06-23, H. Nikolaus Schaller wrote:
Am 23.06.2018 um 12:13 schrieb H. Nikolaus Schaller hns@goldelico.com:
[ 7.657104] gname[15] = pinmux_penirq_pins [ 7.671142] gname[16] = pinmux_camera_pins [ 7.675598] gname[17] = hdq_pins [ 7.688140] pinctrl_generic_get_group_name: group>name is NULL [ 7.694244] gname[18] = (null)
^^^ this is interesting!
The printk code behind pinctrl_generic_get_group_name is:
const char *pinctrl_generic_get_group_name(struct pinctrl_dev *pctldev, unsigned int selector) { struct group_desc *group;
group = radix_tree_lookup(&pctldev->pin_group_tree, selector); if (!group) { printk("%s: selector %d not found\n", __func__, selector); } if (!group) return NULL;
if (!group->name) { printk("%s: group>name is NULL\n", __func__); } return group->name; }
Which means that the struct group_desc exists but the group->name is NULL. So there is no NULL magically added to the radix tree, but the group->name pointer becomes NULL. Which means that the memory region was overwritten.
Can you rule out the possibility that the group->name was not set to NULL when the group was created in pinctrl_generic_add_group?
Yes. There is a test for it - and the patch set from Tony tries to locate the name in the radix tree before allocating a new one and that would also segfault for a NULL name.
What I am currently thinking is that there is some index-out-of-bounds access involved. Not necessarily related to the pinmux framework but I can't decide that yet.
BR and thanks, Nikolaus
On Sat, 23 Jun 2018 12:13:11 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
hmm, the next question is whether the NULL is *always* there, so even in the successful boots. Is that still with mainline sources + minimal set of things?
Can we infer any bad order of module loading from that output? Probably the thing that inserts the NULL should be loaded last for successful boots or first for failed boots
Or should we remove stuff from dtb piece by piece to see if that helps?
Regards, Andreas
Hi,
Am 24.06.2018 um 09:11 schrieb Andreas Kemnade andreas@kemnade.info:
On Sat, 23 Jun 2018 12:13:11 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
hmm, the next question is whether the NULL is *always* there, so even in the successful boots. Is that still with mainline sources + minimal set of things?
Can we infer any bad order of module loading from that output? Probably the thing that inserts the NULL should be loaded last for successful boots or first for failed boots
Or should we remove stuff from dtb piece by piece to see if that helps?
The problem is that you can remove almost anything and "it helps". So it is very fragile to have a system that runs into this bug. If you change a little piece, the problem disappears but you don't know if it is really the reason or just a factor that enables/disables the real problem to appear/disappear.
For example you can blackist some modules and it is gone. You can blacklist others and it is also gone. You can add a printk to some pinctrl core code and it is gone. How should this be interpreted? A driver problem or a pinmux core problem?
And it maybe completely invisible in mainline because the trigger is missing.
So it may well be that if you play with changing DTB or sequence of module loads (which is also changed by deferred probing), that you never see the bug but only in the full Letux OS setup.
Another hint that DTB has no significant influence is that I can see the bug on GTA04 and on Pyra. With almost the same symptom but quite different DTBs. And OMAP3 vs. OMAP5.
At the moment my theory is:
* pinmux allocates memory for group->pins * some other driver allocates memory * pinmux does the devm_kzalloc for the struct group_desc and stores it in the radix tree, sets group->name and group->pins * some other driver does an out-of-bounds write with NULL * and exactly hits the group->name
So the repeatable randomness and fragile dependency on modules and drivers and probing order comes from the nesting of memory allocations and which memory addresses are assigned.
If this "some other driver" does run in a slightly different timing, the sequence would be:
* pinmux allocates memory for group->pins * pinmux does the devm_kzalloc for the struct group_desc and stores in the radix tree, sets group->name and group->pins * some other driver allocates memory * other driver does an out-of-bounds write with NULL * does not hit the group->name (but maybe something else which isn't noticed that easily but leads to other spurious problems)
I have started to interrogate some suspects for doing this out-of-bounds access:
[ 6.648223] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode [ 6.728515] i2c 1-0030: Retrying from deferred list [ 6.738250] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d [ 6.747406] i2c 1-0030: Retrying from deferred list [ 6.798980] i2c 1-0030: Retrying from deferred list [ 6.812499] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix [ 6.840545] bq27xxx_battery_settings: power_supply_get_battery_info failed ret=-1088380908 [ 6.882781] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 6.966156] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 6.994628] wwan_on_off_init: wwan_on_off_init [ 7.014556] pps_core: LinuxPPS API ver. 1 registered [ 7.037109] i2c 1-0030: Retrying from deferred list [ 7.042602] iio_charge:-747 [ 7.048522] platform backlight: Retrying from deferred list [ 7.054901] pinctrl_generic_get_group_name: group>name is NULL
I.e. all drivers being probed around the same time.
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
And not to forget: they may still be innocent (if my latest theory is wrong)...
So I'd suggest to play around with the generic-adc-battery module/driver/dtb.
BR, Nikolaus
On Sun, 24 Jun 2018 09:52:53 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi,
Am 24.06.2018 um 09:11 schrieb Andreas Kemnade andreas@kemnade.info:
On Sat, 23 Jun 2018 12:13:11 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
hmm, the next question is whether the NULL is *always* there, so even in the successful boots. Is that still with mainline sources + minimal set of things?
Can we infer any bad order of module loading from that output? Probably the thing that inserts the NULL should be loaded last for successful boots or first for failed boots
Or should we remove stuff from dtb piece by piece to see if that helps?
The problem is that you can remove almost anything and "it helps". So it is very fragile to have a system that runs into this bug. If you change a little piece, the problem disappears but you don't know if it is really the reason or just a factor that enables/disables the real problem to appear/disappear.
I think we can do it the other way round. Removing drivers stuff which does not disable the problem and consider them not guilty.
For example you can blackist some modules and it is gone. You
What do you mean: it is gone? How many times do you test to consider it gone?
The next question is whether we need really that much concurrency here. Can we do:
create_random_list_of_modules log that list while(not_everything_loaded) { insmod first_module_in_list.ko && remove_module_from_list sleep ? }
will we get some pattern? Or maybe just get a full list of drivers which needs not to be loaded to enable the problem.
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
And not to forget: they may still be innocent (if my latest theory is wrong)...
So I'd suggest to play around with the generic-adc-battery module/driver/dtb.
ok, module blacklisted. Will boot that setup the whole afternoon.
Regards, Andreas
Am 24.06.2018 um 11:38 schrieb Andreas Kemnade andreas@kemnade.info:
On Sun, 24 Jun 2018 09:52:53 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi,
Am 24.06.2018 um 09:11 schrieb Andreas Kemnade andreas@kemnade.info:
On Sat, 23 Jun 2018 12:13:11 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
hmm, the next question is whether the NULL is *always* there, so even in the successful boots. Is that still with mainline sources + minimal set of things?
Can we infer any bad order of module loading from that output? Probably the thing that inserts the NULL should be loaded last for successful boots or first for failed boots
Or should we remove stuff from dtb piece by piece to see if that helps?
The problem is that you can remove almost anything and "it helps". So it is very fragile to have a system that runs into this bug. If you change a little piece, the problem disappears but you don't know if it is really the reason or just a factor that enables/disables the real problem to appear/disappear.
I think we can do it the other way round. Removing drivers stuff which does not disable the problem and consider them not guilty.
Indeed, there are some.
I have identified these: omap3isp omapdss
For example you can blackist some modules and it is gone. You
What do you mean: it is gone? How many times do you test to consider it gone?
Well, I have a scenario where I have it in 4 to 5 out of 5 tests. And if I do do a change and it is 0 of 3 I can consider it as "gone".
Well, this is not statistically valid but a good guess only.
I have found another printk that makes it go away:
@@ -390,6 +390,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
+ printk("%s: driver %s\n", __func__, drv->name);
Then, I can see the probe order (there are some more drivers which are probed without notice in the log), but I have no strcmp(NULL).
The next question is whether we need really that much concurrency here. Can we do:
create_random_list_of_modules log that list while(not_everything_loaded) { insmod first_module_in_list.ko && remove_module_from_list sleep ? }
will we get some pattern? Or maybe just get a full list of drivers which needs not to be loaded to enable the problem.
Hm. It is difficult to predict the outcome. Especially since deferred driver probing makes it a little independent of the list order.
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
And not to forget: they may still be innocent (if my latest theory is wrong)...
So I'd suggest to play around with the generic-adc-battery module/driver/dtb.
ok, module blacklisted. Will boot that setup the whole afternoon.
Ok. Let's see. Although the interpretation is difficult. blacklisting it may simple change memory allocation and timing. It won't prove that the bug is in the blacklisted driver :(
BR, Nikolaus
On Sun, 24 Jun 2018 12:54:38 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Am 24.06.2018 um 11:38 schrieb Andreas Kemnade andreas@kemnade.info:
On Sun, 24 Jun 2018 09:52:53 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi,
Am 24.06.2018 um 09:11 schrieb Andreas Kemnade andreas@kemnade.info:
On Sat, 23 Jun 2018 12:13:11 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
hmm, the next question is whether the NULL is *always* there, so even in the successful boots. Is that still with mainline sources + minimal set of things?
Can we infer any bad order of module loading from that output? Probably the thing that inserts the NULL should be loaded last for successful boots or first for failed boots
Or should we remove stuff from dtb piece by piece to see if that helps?
The problem is that you can remove almost anything and "it helps". So it is very fragile to have a system that runs into this bug. If you change a little piece, the problem disappears but you don't know if it is really the reason or just a factor that enables/disables the real problem to appear/disappear.
I think we can do it the other way round. Removing drivers stuff which does not disable the problem and consider them not guilty.
Indeed, there are some.
I have identified these: omap3isp omapdss
For example you can blackist some modules and it is gone. You
What do you mean: it is gone? How many times do you test to consider it gone?
Well, I have a scenario where I have it in 4 to 5 out of 5 tests. And if I do do a change and it is 0 of 3 I can consider it as "gone".
Well, this is not statistically valid but a good guess only.
I have found another printk that makes it go away:
@@ -390,6 +390,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
printk("%s: driver %s\n", __func__, drv->name);
Then, I can see the probe order (there are some more drivers which are probed without notice in the log), but I have no strcmp(NULL).
The next question is whether we need really that much concurrency here. Can we do:
create_random_list_of_modules log that list while(not_everything_loaded) { insmod first_module_in_list.ko && remove_module_from_list sleep ? }
will we get some pattern? Or maybe just get a full list of drivers which needs not to be loaded to enable the problem.
Hm. It is difficult to predict the outcome. Especially since deferred driver probing makes it a little independent of the list order.
but at least we can rule out problems in the drivers which are not loaded (if we insert a sleep there) before the Oops.
Regards, Andreas
On Sun, 24 Jun 2018 11:38:30 +0200 Andreas Kemnade andreas@kemnade.info wrote:
On Sun, 24 Jun 2018 09:52:53 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi,
Am 24.06.2018 um 09:11 schrieb Andreas Kemnade andreas@kemnade.info:
On Sat, 23 Jun 2018 12:13:11 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
So the issue is that "backlight_pins_pinmux" are searched for a NULL record before they are properly stored. Or someone punches a NULL into the radix_tree.
Hope this sheds some new light on the problem.
hmm, the next question is whether the NULL is *always* there, so even in the successful boots. Is that still with mainline sources + minimal set of things?
Can we infer any bad order of module loading from that output? Probably the thing that inserts the NULL should be loaded last for successful boots or first for failed boots
Or should we remove stuff from dtb piece by piece to see if that helps?
The problem is that you can remove almost anything and "it helps". So it is very fragile to have a system that runs into this bug. If you change a little piece, the problem disappears but you don't know if it is really the reason or just a factor that enables/disables the real problem to appear/disappear.
I think we can do it the other way round. Removing drivers stuff which does not disable the problem and consider them not guilty.
Hmm, so the list of probably not guilty list is initially the stuff not common to all the failing platforms.
And not to forget: they may still be innocent (if my latest theory is wrong)...
So I'd suggest to play around with the generic-adc-battery module/driver/dtb.
ok, module blacklisted. Will boot that setup the whole afternoon.
while having/preparing lunch, I had 54 boots without Oopses:
andi@aktux:~/kerneltest$ ls *.log | wc -l 54 andi@aktux:~/kerneltest$ grep 'Oops' *.log andi@aktux:~/kerneltest$
so if the problem is triggered by gab, we have all its dependencies also on the verdict list (iio, twl4030-madc, something else for pyra?, what are the common things here). But as you said, I cannot rule out that there is just a printk which needs to be disabled to reenable the problem.
But what I remember: if you disable pwm_bl, the problem moves into the sound system. Maybe we should check that log again.
BTW: with my setup I am almost ready for linux-next nightly testing.
Regards, Andreas
Hi,
Am 24.06.2018 um 09:52 schrieb H. Nikolaus Schaller hns@goldelico.com:
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
well, there is new evidence:
[ 7.479400] really_probe: driver generic-adc-battery [ 7.484710] gab_probe: properties = ed1fde00
^^^ this is a printk for memory block address allocated by
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
[ 7.490631] i2c 1-0030: Retrying from deferred list [ 7.495849] really_probe: driver ov9655 [ 7.508209] platform backlight: Retrying from deferred list [ 7.514526] really_probe: driver pwm-backlight [ 7.524291] pps_core: LinuxPPS API ver. 1 registered [ 7.532531] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.545471] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.554840] i2c 1-0030: Retrying from deferred list [ 7.560089] really_probe: driver ov9655 [ 7.570648] platform backlight: Retrying from deferred list [ 7.583770] really_probe: driver pwm-backlight [ 7.598083] pinctrl_generic_get_group_name: group ed1fde50 has NULL name
^^^ here is the struct group_desc where the group->name magically became NULL
[ 7.605102] group>name = (null) [ 7.613464] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.623229] group>pins = ed1faf10 [ 7.626861] group>num_pins = 1 [ 7.630340] group>data = ee444e10 [ 7.633972] pinctrl_generic_group_name_to_selector: pctldev = ee3bb200 function = backlight_pins_pinmux [ 7.653869] really_probe: driver omap-dmtimer-pwm [ 7.658966] strcmp(backlight_pins_pinmux, (null)) [ 7.664062] get_group_name() = pinctrl_generic_get_group_name+0x0/0xa0 [ 7.682098] ngroups = 19 [ 7.684936] selector = 18 [ 7.689056] really_probe: driver connector-analog-tv
So we have these addresses:
ed1fde00 ed1fde50
This is just 0x50 bytes apart.
A write to psy_desc->properties[0x14] = NULL would overwrite ed1fde50->name in this example.
Next I'll add some more printk to study where it is exactly writing to. Maybe one of the memcpy address calculations is wrong.
And I think we should do a code review for the gab driver and the gab_probe() function...
BR, Nikolaus
Am 24.06.2018 um 18:08 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 24.06.2018 um 09:52 schrieb H. Nikolaus Schaller hns@goldelico.com:
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
well, there is new evidence:
[ 7.479400] really_probe: driver generic-adc-battery [ 7.484710] gab_probe: properties = ed1fde00
^^^ this is a printk for memory block address allocated by
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
[ 7.490631] i2c 1-0030: Retrying from deferred list [ 7.495849] really_probe: driver ov9655 [ 7.508209] platform backlight: Retrying from deferred list [ 7.514526] really_probe: driver pwm-backlight [ 7.524291] pps_core: LinuxPPS API ver. 1 registered [ 7.532531] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.545471] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.554840] i2c 1-0030: Retrying from deferred list [ 7.560089] really_probe: driver ov9655 [ 7.570648] platform backlight: Retrying from deferred list [ 7.583770] really_probe: driver pwm-backlight [ 7.598083] pinctrl_generic_get_group_name: group ed1fde50 has NULL name
^^^ here is the struct group_desc where the group->name magically became NULL
[ 7.605102] group>name = (null) [ 7.613464] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.623229] group>pins = ed1faf10 [ 7.626861] group>num_pins = 1 [ 7.630340] group>data = ee444e10 [ 7.633972] pinctrl_generic_group_name_to_selector: pctldev = ee3bb200 function = backlight_pins_pinmux [ 7.653869] really_probe: driver omap-dmtimer-pwm [ 7.658966] strcmp(backlight_pins_pinmux, (null)) [ 7.664062] get_group_name() = pinctrl_generic_get_group_name+0x0/0xa0 [ 7.682098] ngroups = 19 [ 7.684936] selector = 18 [ 7.689056] really_probe: driver connector-analog-tv
So we have these addresses:
ed1fde00 ed1fde50
This is just 0x50 bytes apart.
A write to psy_desc->properties[0x14] = NULL would overwrite ed1fde50->name in this example.
I may have found the final evidence of an out-of-bounds write access (unfortunately not a NULL) in line
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
the + of 'properties' and some integer already multiplies the index by sizeof(*properties).
Hence it should IMHO be
memcpy(properties + index,
or to better describe that memcpy takes an address
memcpy(&properties[index],
What do you think?
BR, Nikolaus
Next I'll add some more printk to study where it is exactly writing to. Maybe one of the memcpy address calculations is wrong.
And I think we should do a code review for the gab driver and the gab_probe() function...
BR, Nikolaus
http://projects.goldelico.com/p/gta04-kernel/ Letux-kernel mailing list Letux-kernel@openphoenux.org http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
On Sun, 24 Jun 2018 20:17:38 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Am 24.06.2018 um 18:08 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 24.06.2018 um 09:52 schrieb H. Nikolaus Schaller hns@goldelico.com:
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
well, there is new evidence:
[ 7.479400] really_probe: driver generic-adc-battery [ 7.484710] gab_probe: properties = ed1fde00
^^^ this is a printk for memory block address allocated by
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
[ 7.490631] i2c 1-0030: Retrying from deferred list [ 7.495849] really_probe: driver ov9655 [ 7.508209] platform backlight: Retrying from deferred list [ 7.514526] really_probe: driver pwm-backlight [ 7.524291] pps_core: LinuxPPS API ver. 1 registered [ 7.532531] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.545471] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.554840] i2c 1-0030: Retrying from deferred list [ 7.560089] really_probe: driver ov9655 [ 7.570648] platform backlight: Retrying from deferred list [ 7.583770] really_probe: driver pwm-backlight [ 7.598083] pinctrl_generic_get_group_name: group ed1fde50 has NULL name
^^^ here is the struct group_desc where the group->name magically became NULL
[ 7.605102] group>name = (null) [ 7.613464] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.623229] group>pins = ed1faf10 [ 7.626861] group>num_pins = 1 [ 7.630340] group>data = ee444e10 [ 7.633972] pinctrl_generic_group_name_to_selector: pctldev = ee3bb200 function = backlight_pins_pinmux [ 7.653869] really_probe: driver omap-dmtimer-pwm [ 7.658966] strcmp(backlight_pins_pinmux, (null)) [ 7.664062] get_group_name() = pinctrl_generic_get_group_name+0x0/0xa0 [ 7.682098] ngroups = 19 [ 7.684936] selector = 18 [ 7.689056] really_probe: driver connector-analog-tv
So we have these addresses:
ed1fde00 ed1fde50
This is just 0x50 bytes apart.
A write to psy_desc->properties[0x14] = NULL would overwrite ed1fde50->name in this example.
I may have found the final evidence of an out-of-bounds write access (unfortunately not a NULL) in line
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
the + of 'properties' and some integer already multiplies the index by sizeof(*properties).
Hence it should IMHO be
memcpy(properties + index,
or to better describe that memcpy takes an address
memcpy(&properties[index],
What do you think?
that code looks more weird the longer I am looking at it. Hmm, we are using memcpy for simply copying over a single enum or what? If sizeof(gab_dyn_props[chan] would be bigger, then we need to increase index by more than one.
Regards, Andreas PS: 275 boots without Oopses with gab blacklisted... I was testing my raingear at the time, so no time wasted
Am 24.06.2018 um 20:53 schrieb Andreas Kemnade andreas@kemnade.info:
On Sun, 24 Jun 2018 20:17:38 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Am 24.06.2018 um 18:08 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 24.06.2018 um 09:52 schrieb H. Nikolaus Schaller hns@goldelico.com:
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
well, there is new evidence:
[ 7.479400] really_probe: driver generic-adc-battery [ 7.484710] gab_probe: properties = ed1fde00
^^^ this is a printk for memory block address allocated by
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
[ 7.490631] i2c 1-0030: Retrying from deferred list [ 7.495849] really_probe: driver ov9655 [ 7.508209] platform backlight: Retrying from deferred list [ 7.514526] really_probe: driver pwm-backlight [ 7.524291] pps_core: LinuxPPS API ver. 1 registered [ 7.532531] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.545471] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.554840] i2c 1-0030: Retrying from deferred list [ 7.560089] really_probe: driver ov9655 [ 7.570648] platform backlight: Retrying from deferred list [ 7.583770] really_probe: driver pwm-backlight [ 7.598083] pinctrl_generic_get_group_name: group ed1fde50 has NULL name
^^^ here is the struct group_desc where the group->name magically became NULL
[ 7.605102] group>name = (null) [ 7.613464] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.623229] group>pins = ed1faf10 [ 7.626861] group>num_pins = 1 [ 7.630340] group>data = ee444e10 [ 7.633972] pinctrl_generic_group_name_to_selector: pctldev = ee3bb200 function = backlight_pins_pinmux [ 7.653869] really_probe: driver omap-dmtimer-pwm [ 7.658966] strcmp(backlight_pins_pinmux, (null)) [ 7.664062] get_group_name() = pinctrl_generic_get_group_name+0x0/0xa0 [ 7.682098] ngroups = 19 [ 7.684936] selector = 18 [ 7.689056] really_probe: driver connector-analog-tv
So we have these addresses:
ed1fde00 ed1fde50
This is just 0x50 bytes apart.
A write to psy_desc->properties[0x14] = NULL would overwrite ed1fde50->name in this example.
I may have found the final evidence of an out-of-bounds write access (unfortunately not a NULL) in line
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
the + of 'properties' and some integer already multiplies the index by sizeof(*properties).
Hence it should IMHO be
memcpy(properties + index,
or to better describe that memcpy takes an address
memcpy(&properties[index],
What do you think?
that code looks more weird the longer I am looking at it.
Yes, it needs readability improvements.
Hmm, we are using memcpy for simply copying over a single enum or what?
well, gab_dyn_props[chan] and * properties are both of type enum power_supply_property, i.e. int. And indeed, a simply assignment should suffice.
If sizeof(gab_dyn_props[chan] would be bigger, then we need to increase index by more than one.
I am currently testing both variants. If one works and the other doesn't we have found it. Because run time is identical, it can't change timing of concurrent threads and operations.
On first glance the weird memcpy() seems to have been introduced by
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff...
but using a memcpy() is older. A first check it seems to be wrongly introduced in 3.7-rc1:
https://elixir.bootlin.com/linux/v3.7-rc1/source/drivers/power/generic-adc-b...
So we may have a fix for some quite old stable kernels... If it is the reason for our problem.
Regards, Andreas PS: 275 boots without Oopses with gab blacklisted...
Well, absence of Oopses doesn't say too much. Blacklisting pwm_bl would likely give the same result according to my tests.
How many did you see with not blacklisting anything? 100% or something significantly high?
And then please replace the strange
memcpy(properties + sizeof(*(psy_desc->properties)) * index, &gab_dyn_props[chan], sizeof(gab_dyn_props[chan]));
by
properties[index] = gab_dyn_props[chan];
and run your auto-repeated tests. If it goes down (to 0%) we have found it.
If we really have found it, I'll prepare a patch for 4.18-rc2 and 4.17.2 for further evaluation and tests (also on Pyra). And then we can upstream it.
I was testing my raingear at the time, so no time wasted
Ok!
BR, Nikolaus
Well, absence of Oopses doesn't say too much. Blacklisting pwm_bl would likely give the same result according to my tests.
well, the problem was moved into the sound system by blacklisting bl
How many did you see with not blacklisting anything? 100% or something significantly high?
3% kernel BUG at ../drivers/base/devres.c:104!
29% (strcmp) from [<c04266bc>] (pinctrl_generic_add_group+0x50/0xc4)
68% no Oopses
the devres backtrace is a more than 500ms before iio_charge output!
[ 12.860412] omap3isp 480bc000.isp: 480bc000.isp supply vdd-csiphy1 not found, using dummy regulator [ 12.926818] omap3isp 480bc000.isp: 480bc000.isp supply vdd-csiphy2 not found, using dummy regulator [ 12.955352] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 12.964996] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 12.974243] ------------[ cut here ]------------ [ 12.979064] kernel BUG at ../drivers/base/devres.c:104! [ 12.984527] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM [ 12.990631] Modules linked in: panel_dpi(+) snd_soc_gtm601(+) pwm_omap_dmtimer(+) connector_analog_tv(+) generic_adc_battery(+) pwm_bl(+) b mp280_spi omap3_isp(+) videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common bq27xxx_battery_hdq bq27xxx_battery omap2430 omap _hdq ov9655 v4l2_fwnode v4l2_common itg3200 bmp280_i2c bmp280 at24 videodev bma180 hmc5843_i2c hmc5843_core industrialio_triggered_buffer tsc2 007 kfifo_buf leds_tca6507 media snd_soc_omap_mcbsp snd_soc_omap snd_pcm_dmaengine gpio_twl4030 phy_twl4030_usb musb_hdrc twl4030_vibra snd_so c_twl4030 twl4030_pwrbutton twl4030_charger twl4030_madc industrialio gnss_w2sg0004 gnss w2cbw003_bluetooth ehci_omap omapdss omapdss_base cec overlay [ 13.056152] CPU: 0 PID: 1224 Comm: kworker/0:3 Not tainted 4.17.2-letux+ #2 [ 13.063446] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 13.070007] Workqueue: events deferred_probe_work_func [ 13.075378] PC is at add_dr+0xc/0x28 [ 13.079132] LR is at devres_add+0x28/0x38 [ 13.083312] pc : [<c04cf04c>] lr : [<c04cf140>] psr: a00d0093 [ 13.089874] sp : dbee1e00 ip : 00000000 fp : c0b98df0 [ 13.095336] r10: 0000002a r9 : df9ee208 r8 : ddac4c00 [ 13.100799] r7 : 00000000 r6 : cf895b50 r5 : ddac4c10 r4 : ddac4d7c [ 13.107635] r3 : 00000011 r2 : 800d0013 r1 : cf895b40 r0 : ddac4c10 [ 13.114440] Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none [ 13.122009] Control: 10c5387d Table: 9bdec019 DAC: 00000051 [ 13.128021] Process kworker/0:3 (pid: 1224, stack limit = 0x(ptrval)) [ 13.134765] Stack: (0xdbee1e00 to 0xdbee2000) [ 13.139312] 1e00: cf913780 cf895b50 ddac4c10 c048ec44 00000001 cf913b90 dbee1e50 ddac4c10 [ 13.147888] 1e20: ddac4c00 bf248264 00000000 00000001 cf8946e0 0000002c 00000009 00000000 [ 13.156402] 1e40: 00000000 cf8f54d0 00000001 c02b02f4 00000000 0000000a 00000009 00000000 [ 13.164978] 1e60: 00000000 cf895b90 ffffffea 00000000 00000000 00000000 00000000 00000000 [ 13.173522] 1e80: ddac4c10 bf248074 ddac4c10 bf24a014 00000000 00000000 bf24a014 c04cdb88 [ 13.182098] 1ea0: ddac4c10 c0bd1bc8 c0bd1bc4 c04cc19c 00000000 dbee1ee8 c04cc344 ddac4c44 [ 13.190643] 1ec0: dbee0000 c0b02d00 00000000 c04ca9f0 dd81be6c dbfa40b8 ddac4c10 c0b66540 [ 13.199188] 1ee0: 00000001 c04cbed0 ddac4c10 00000001 00000000 ddac4c10 c0b66540 ddac4c10 [ 13.207702] 1f00: 00000000 c04cb498 ddac4c10 c0b66320 df9b0c80 c04cb9bc dbe61880 c0b66354 [ 13.216278] 1f20: df9b0c80 00000000 df9b3f00 c014716c dbe61880 c0b66354 ffff8fdf dbe61880 [ 13.224822] 1f40: df9b0c80 df9b0c80 dbee0000 df9b0c98 c0b02d00 dbe61898 00000008 c0148104 [ 13.233367] 1f60: 00000000 dbeca880 dbeca900 dbee0000 dbe61880 c0147e60 00000000 dd8b1ee8 [ 13.241912] 1f80: dbeca89c c014c250 dbee0000 dbeca900 c014c120 00000000 00000000 00000000 [ 13.250457] 1fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 13.259002] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 13.267578] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 13.276123] [<c04cf04c>] (add_dr) from [<c04cf140>] (devres_add+0x28/0x38) [ 13.283294] [<c04cf140>] (devres_add) from [<c048ec44>] (_devm_regulator_get+0x5c/0x78) [ 13.291687] [<c048ec44>] (_devm_regulator_get) from [<bf248264>] (pwm_backlight_probe+0x1f0/0x4dc [pwm_bl]) [ 13.301879] [<bf248264>] (pwm_backlight_probe [pwm_bl]) from [<c04cdb88>] (platform_drv_probe+0x50/0x9c) [ 13.311798] [<c04cdb88>] (platform_drv_probe) from [<c04cc19c>] (driver_probe_device+0x240/0x308) [ 13.321105] [<c04cc19c>] (driver_probe_device) from [<c04ca9f0>] (bus_for_each_drv+0x84/0x8c) [ 13.330017] [<c04ca9f0>] (bus_for_each_drv) from [<c04cbed0>] (__device_attach+0x98/0x100) [ 13.338684] [<c04cbed0>] (__device_attach) from [<c04cb498>] (bus_probe_device+0x28/0x80) [ 13.347229] [<c04cb498>] (bus_probe_device) from [<c04cb9bc>] (deferred_probe_work_func+0x108/0x120) [ 13.356811] [<c04cb9bc>] (deferred_probe_work_func) from [<c014716c>] (process_one_work+0x220/0x464) [ 13.366363] [<c014716c>] (process_one_work) from [<c0148104>] (worker_thread+0x2a4/0x3e8) [ 13.374938] [<c0148104>] (worker_thread) from [<c014c250>] (kthread+0x130/0x148) [ 13.382690] [<c014c250>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 13.390228] Exception stack(0xdbee1fb0 to 0xdbee1ff8) [ 13.395507] 1fa0: 00000000 00000000 00000000 00000000 [ 13.404052] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 13.412628] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 13.419555] Code: eaf52d64 e5913000 e1510003 0a000000 (e7f001f2) [ 13.425903] ---[ end trace 0e2922f6280d4840 ]--- [ 13.430938] note: kworker/0:3[1224] exited with preempt_count 1 [ 13.454772] wwan_on_off_init: wwan_on_off_init [ 13.472869] panel-dpi lcd: lcd supply vcc not found, using dummy regulator [ 13.480712] omap3isp 480bc000.isp: Revision 15.0 found
So that might be something else... but also bl
And then please replace the strange
memcpy(properties + sizeof(*(psy_desc->properties)) * index, &gab_dyn_props[chan], sizeof(gab_dyn_props[chan]));
by
properties[index] = gab_dyn_props[chan];
and run your auto-repeated tests. If it goes down (to 0%) we have found it.
will do.
Regards, Andreas
On Sun, 24 Jun 2018 22:14:54 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Am 24.06.2018 um 20:53 schrieb Andreas Kemnade andreas@kemnade.info:
On Sun, 24 Jun 2018 20:17:38 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Am 24.06.2018 um 18:08 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 24.06.2018 um 09:52 schrieb H. Nikolaus Schaller hns@goldelico.com:
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
well, there is new evidence:
[ 7.479400] really_probe: driver generic-adc-battery [ 7.484710] gab_probe: properties = ed1fde00
^^^ this is a printk for memory block address allocated by
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
[ 7.490631] i2c 1-0030: Retrying from deferred list [ 7.495849] really_probe: driver ov9655 [ 7.508209] platform backlight: Retrying from deferred list [ 7.514526] really_probe: driver pwm-backlight [ 7.524291] pps_core: LinuxPPS API ver. 1 registered [ 7.532531] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.545471] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.554840] i2c 1-0030: Retrying from deferred list [ 7.560089] really_probe: driver ov9655 [ 7.570648] platform backlight: Retrying from deferred list [ 7.583770] really_probe: driver pwm-backlight [ 7.598083] pinctrl_generic_get_group_name: group ed1fde50 has NULL name
^^^ here is the struct group_desc where the group->name magically became NULL
[ 7.605102] group>name = (null) [ 7.613464] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.623229] group>pins = ed1faf10 [ 7.626861] group>num_pins = 1 [ 7.630340] group>data = ee444e10 [ 7.633972] pinctrl_generic_group_name_to_selector: pctldev = ee3bb200 function = backlight_pins_pinmux [ 7.653869] really_probe: driver omap-dmtimer-pwm [ 7.658966] strcmp(backlight_pins_pinmux, (null)) [ 7.664062] get_group_name() = pinctrl_generic_get_group_name+0x0/0xa0 [ 7.682098] ngroups = 19 [ 7.684936] selector = 18 [ 7.689056] really_probe: driver connector-analog-tv
So we have these addresses:
ed1fde00 ed1fde50
This is just 0x50 bytes apart.
A write to psy_desc->properties[0x14] = NULL would overwrite ed1fde50->name in this example.
I may have found the final evidence of an out-of-bounds write access (unfortunately not a NULL) in line
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
the + of 'properties' and some integer already multiplies the index by sizeof(*properties).
Hence it should IMHO be
memcpy(properties + index,
or to better describe that memcpy takes an address
memcpy(&properties[index],
What do you think?
that code looks more weird the longer I am looking at it.
Yes, it needs readability improvements.
Hmm, we are using memcpy for simply copying over a single enum or what?
well, gab_dyn_props[chan] and * properties are both of type enum power_supply_property, i.e. int. And indeed, a simply assignment should suffice.
If sizeof(gab_dyn_props[chan] would be bigger, then we need to increase index by more than one.
I am currently testing both variants. If one works and the other doesn't we have found it. Because run time is identical, it can't change timing of concurrent threads and operations.
On first glance the weird memcpy() seems to have been introduced by
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff...
but using a memcpy() is older. A first check it seems to be wrongly introduced in 3.7-rc1:
https://elixir.bootlin.com/linux/v3.7-rc1/source/drivers/power/generic-adc-b...
So we may have a fix for some quite old stable kernels... If it is the reason for our problem.
Regards, Andreas PS: 275 boots without Oopses with gab blacklisted...
Well, absence of Oopses doesn't say too much. Blacklisting pwm_bl would likely give the same result according to my tests.
How many did you see with not blacklisting anything? 100% or something significantly high?
And then please replace the strange
memcpy(properties + sizeof(*(psy_desc->properties)) * index, &gab_dyn_props[chan], sizeof(gab_dyn_props[chan]));
by
properties[index] = gab_dyn_props[chan];
and run your auto-repeated tests. If it goes down (to 0%) we have found it.
268 boots. 1% empty log (have to evaluate what that means, had the same in the other tests as well but was only grepping for Oopses). 0% Oopses
But even if that would not fix the error it should be worth patching it. that old line of code really causes a segfault while using /dev/brain
I tried this one:
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c index 359cc8dac245..7c5a8dbcb463 100644 --- a/drivers/power/supply/generic-adc-battery.c +++ b/drivers/power/supply/generic-adc-battery.c @@ -375,7 +375,6 @@ static int gab_probe(struct platform_device *pdev) int ret = 0; int chan; int index = 0; - adc_bat = devm_kzalloc(&pdev->dev, sizeof(*adc_bat), GFP_KERNEL); if (!adc_bat) { dev_err(&pdev->dev, "failed to allocate memory\n"); @@ -426,9 +425,7 @@ static int gab_probe(struct platform_device *pdev) adc_bat->channel[chan] = NULL; } else { /* copying properties for supported channels only */ - memcpy(properties + sizeof(*(psy_desc->properties)) * index, - &gab_dyn_props[chan], - sizeof(gab_dyn_props[chan])); + properties[index] = gab_dyn_props[chan]; index++; } }
Regards, Andreas
Am 25.06.2018 um 07:14 schrieb Andreas Kemnade andreas@kemnade.info:
On Sun, 24 Jun 2018 22:14:54 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Am 24.06.2018 um 20:53 schrieb Andreas Kemnade andreas@kemnade.info:
On Sun, 24 Jun 2018 20:17:38 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Am 24.06.2018 um 18:08 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi,
Am 24.06.2018 um 09:52 schrieb H. Nikolaus Schaller hns@goldelico.com:
Main suspect is the generic-adc-battery driver (although I remember to have seen the strcmp(NULL) once even when blackisting it).
The reason why it is the my main suspect is that the message iio_charge:-747 seems to almost always come before platform backlight: Retrying from deferred list (AFAIR in failing and non-failing cases).
But they did not yet confess :)
well, there is new evidence:
[ 7.479400] really_probe: driver generic-adc-battery [ 7.484710] gab_probe: properties = ed1fde00
^^^ this is a printk for memory block address allocated by
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
[ 7.490631] i2c 1-0030: Retrying from deferred list [ 7.495849] really_probe: driver ov9655 [ 7.508209] platform backlight: Retrying from deferred list [ 7.514526] really_probe: driver pwm-backlight [ 7.524291] pps_core: LinuxPPS API ver. 1 registered [ 7.532531] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 7.545471] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix [ 7.554840] i2c 1-0030: Retrying from deferred list [ 7.560089] really_probe: driver ov9655 [ 7.570648] platform backlight: Retrying from deferred list [ 7.583770] really_probe: driver pwm-backlight [ 7.598083] pinctrl_generic_get_group_name: group ed1fde50 has NULL name
^^^ here is the struct group_desc where the group->name magically became NULL
[ 7.605102] group>name = (null) [ 7.613464] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 7.623229] group>pins = ed1faf10 [ 7.626861] group>num_pins = 1 [ 7.630340] group>data = ee444e10 [ 7.633972] pinctrl_generic_group_name_to_selector: pctldev = ee3bb200 function = backlight_pins_pinmux [ 7.653869] really_probe: driver omap-dmtimer-pwm [ 7.658966] strcmp(backlight_pins_pinmux, (null)) [ 7.664062] get_group_name() = pinctrl_generic_get_group_name+0x0/0xa0 [ 7.682098] ngroups = 19 [ 7.684936] selector = 18 [ 7.689056] really_probe: driver connector-analog-tv
So we have these addresses:
ed1fde00 ed1fde50
This is just 0x50 bytes apart.
A write to psy_desc->properties[0x14] = NULL would overwrite ed1fde50->name in this example.
I may have found the final evidence of an out-of-bounds write access (unfortunately not a NULL) in line
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
the + of 'properties' and some integer already multiplies the index by sizeof(*properties).
Hence it should IMHO be
memcpy(properties + index,
or to better describe that memcpy takes an address
memcpy(&properties[index],
What do you think?
that code looks more weird the longer I am looking at it.
Yes, it needs readability improvements.
Hmm, we are using memcpy for simply copying over a single enum or what?
well, gab_dyn_props[chan] and * properties are both of type enum power_supply_property, i.e. int. And indeed, a simply assignment should suffice.
If sizeof(gab_dyn_props[chan] would be bigger, then we need to increase index by more than one.
I am currently testing both variants. If one works and the other doesn't we have found it. Because run time is identical, it can't change timing of concurrent threads and operations.
On first glance the weird memcpy() seems to have been introduced by
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff...
but using a memcpy() is older. A first check it seems to be wrongly introduced in 3.7-rc1:
https://elixir.bootlin.com/linux/v3.7-rc1/source/drivers/power/generic-adc-b...
So we may have a fix for some quite old stable kernels... If it is the reason for our problem.
Regards, Andreas PS: 275 boots without Oopses with gab blacklisted...
Well, absence of Oopses doesn't say too much. Blacklisting pwm_bl would likely give the same result according to my tests.
How many did you see with not blacklisting anything? 100% or something significantly high?
And then please replace the strange
memcpy(properties + sizeof(*(psy_desc->properties)) * index, &gab_dyn_props[chan], sizeof(gab_dyn_props[chan]));
by
properties[index] = gab_dyn_props[chan];
and run your auto-repeated tests. If it goes down (to 0%) we have found it.
268 boots. 1% empty log (have to evaluate what that means, had the same in the other tests as well but was only grepping for Oopses). 0% Oopses
But even if that would not fix the error it should be worth patching it. that old line of code really causes a segfault while using /dev/brain
Indeed. I will prepare and submit a patch now.
I tried this one:
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c index 359cc8dac245..7c5a8dbcb463 100644 --- a/drivers/power/supply/generic-adc-battery.c +++ b/drivers/power/supply/generic-adc-battery.c @@ -375,7 +375,6 @@ static int gab_probe(struct platform_device *pdev) int ret = 0; int chan; int index = 0;
adc_bat = devm_kzalloc(&pdev->dev, sizeof(*adc_bat), GFP_KERNEL); if (!adc_bat) { dev_err(&pdev->dev, "failed to allocate memory\n");
@@ -426,9 +425,7 @@ static int gab_probe(struct platform_device *pdev) adc_bat->channel[chan] = NULL; } else { /* copying properties for supported channels only */
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
&gab_dyn_props[chan],
sizeof(gab_dyn_props[chan]));
properties[index] = gab_dyn_props[chan]; index++; } }
Yes, I tried this change as well. And there is even a difference visible in user-space.
without patch:
root@letux:~# cat /sys/class/power_supply/gta04-battery/uevent POWER_SUPPLY_NAME=gta04-battery POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_CHARGE_FULL_DESIGN=1250000 POWER_SUPPLY_CHARGE_EMPTY_DESIGN=0 POWER_SUPPLY_CHARGE_NOW=37500 POWER_SUPPLY_VOLTAGE_NOW=3653000 POWER_SUPPLY_CURRENT_NOW=-750000 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3200000 POWER_SUPPLY_VOLTAGE_MAX_DESIGN=0 POWER_SUPPLY_MODEL_NAME=gta04-battery POWER_SUPPLY_TEMP=1 POWER_SUPPLY_CAPACITY=3 POWER_SUPPLY_VOLTAGE_NOW=3665000 POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_STATUS=Discharging root@letux:~#
with patch:
root@letux:~# cat /sys/class/power_supply/gta04-battery/uevent POWER_SUPPLY_NAME=gta04-battery POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_CHARGE_FULL_DESIGN=1250000 POWER_SUPPLY_CHARGE_EMPTY_DESIGN=0 POWER_SUPPLY_CHARGE_NOW=25000 POWER_SUPPLY_VOLTAGE_NOW=3560000 POWER_SUPPLY_CURRENT_NOW=-747000 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3200000 POWER_SUPPLY_VOLTAGE_MAX_DESIGN=0 POWER_SUPPLY_MODEL_NAME=gta04-battery POWER_SUPPLY_TEMP=4 POWER_SUPPLY_CAPACITY=2 POWER_SUPPLY_VOLTAGE_NOW=3636000 POWER_SUPPLY_CURRENT_NOW=-750000 POWER_SUPPLY_STATUS=Discharging root@letux:~#
Without patch there are three POWER_SUPPLY_STATUS entries. This is because the enum value is copied to the wrong location.
Well, there is also duplication, but this is correct if we accept what the gab_probe function is doing: append raw iio channels to list of predefined properties without checking for duplicates. Maybe we should also add a patch that checks for duplicates.
So I am quite confident that we finally have identified the offender.
Let me thank everybody who helped to identify it!
BR, Nikolaus
Am 25.06.2018 um 07:47 schrieb H. Nikolaus Schaller hns@goldelico.com:
Without patch there are three POWER_SUPPLY_STATUS entries. This is because the enum value is copied to the wrong location.
Well, there is also duplication, but this is correct if we accept what the gab_probe function is doing: append raw iio channels to list of predefined properties without checking for duplicates. Maybe we should also add a patch that checks for duplicates.
Here they are well formatted:
http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/work/le...
I am currently merging & building letux-4.18-rc2 and want to test it a little more (first tests were ok!) and then submit to LKML.
BR, Nikolaus
On Sun, 24 Jun 2018 20:17:38 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
the + of 'properties' and some integer already multiplies the index by sizeof(*properties).
Well, the enum might or might not be 8bit size, so that multiply might be a nop, or it will not be a not at some time.
Lets cite the standard: 6.7.2.2 Enumeration specifiers [...] Constraints The expression that defines the value of an enumeration constant shall be an integer constant expression that has a value representable as an int. [...] Each enumerated type shall be compatible with char, a signed integer type, or an unsigned integer type. The choice of type is implementation-defined, but shall be capable of representing the values of all the members of the enumeration.
Hence it should IMHO be
memcpy(properties + index,
or to better describe that memcpy takes an address
memcpy(&properties[index],
What do you think?
Why not simply
properties[index] = gab_dyn_props[chan];
Regards, Andreas
Am 24.06.2018 um 22:12 schrieb Andreas Kemnade andreas@kemnade.info:
On Sun, 24 Jun 2018 20:17:38 +0200 "H. Nikolaus Schaller" hns@goldelico.com wrote:
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/power/supply/g...
memcpy(properties + sizeof(*(psy_desc->properties)) * index,
the + of 'properties' and some integer already multiplies the index by sizeof(*properties).
Well, the enum might or might not be 8bit size, so that multiply might be a nop, or it will not be a not at some time.
Lets cite the standard: 6.7.2.2 Enumeration specifiers [...] Constraints The expression that defines the value of an enumeration constant shall be an integer constant expression that has a value representable as an int. [...] Each enumerated type shall be compatible with char, a signed integer type, or an unsigned integer type. The choice of type is implementation-defined, but shall be capable of representing the values of all the members of the enumeration.
Hence it should IMHO be
memcpy(properties + index,
or to better describe that memcpy takes an address
memcpy(&properties[index],
What do you think?
Why not simply
properties[index] = gab_dyn_props[chan];
Because that is far too simple :)
What I assume is that someone developed that before the variable was an enum. Maybe a struct with multiple fields. But even then struct assignments are possible...
But see my overlapping mail - it was originally introduced that way long ago in 3.7-rc1.
Now I am curious what your statistical test shows. It is of course a much better validation than mine (with 0/5 failures vs. 1/3 failures).
BR, Nikolaus
* H. Nikolaus Schaller hns@goldelico.com [180624 20:23]:
Am 24.06.2018 um 22:12 schrieb Andreas Kemnade andreas@kemnade.info: Why not simply
properties[index] = gab_dyn_props[chan];
Because that is far too simple :)
Sounds like pinctrl and I are off the hook on this one then :)
Regards,
Tony
Am 25.06.2018 um 07:03 schrieb Tony Lindgren tony@atomide.com:
- H. Nikolaus Schaller hns@goldelico.com [180624 20:23]:
Am 24.06.2018 um 22:12 schrieb Andreas Kemnade andreas@kemnade.info: Why not simply
properties[index] = gab_dyn_props[chan];
Because that is far too simple :)
Sounds like pinctrl and I are off the hook on this one then :)
Yes, looks as if pinctrl is the victim of a bug elsewhere.
BR and thanks for all the help, Nikolaus