[Letux-kernel] weird problem with pwm_bl on omap3
H. Nikolaus Schaller
hns at goldelico.com
Wed May 30 15:12:34 CEST 2018
Hi,
now there is something new.
I just added some printk to better understand how and when the
gab driver is probing and reading iio.
It almost always works, except in this boot attempt:
[ 6.363494] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode
[ 6.445922] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d
[ 6.481475] pwm_backlight_probe
[ 6.488739] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix
[ 6.506744] power_supply bq27000-battery: power_supply_get_battery_info currently only supports devicetree
[ 6.544158] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 6.621582] pwm_backlight_probe 4 err=-517
[ 6.627563] pps_core: LinuxPPS API ver. 1 registered
[ 6.659027] pwm_backlight_probe err=-517
[ 6.665222] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti at linux.it>
[ 6.684570] pwm_backlight_probe
[ 6.688110] gab_probe
[ 6.690612] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 6.699645] gab_probe 1
[ 6.705871] gab_probe 2
[ 6.708679] pwm_backlight_probe 4 err=-517
[ 6.723297] pwm_backlight_probe err=-517
[ 6.727783] gab_probe 3
[ 6.731079] gab_probe 4
[ 6.737182] (NULL device *): hwmon: 'gta04-battery' is not a valid name attribute, please fix
[ 6.756683] gab_probe 5
[ 6.761535] read_channel: 17
[ 6.764709] gab_probe ok
[ 6.767395] read_channel: a
[ 6.773315] read_channel: b ret=1
[ 6.779022] read_channel: c ret=1
[ 6.786560] iio_charge:-750
[ 6.793914] pwm_backlight_probe
[ 6.797271] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 6.825683] pwm_backlight_probe ok
[ 6.829345] read_channel: 17
[ 6.832366] read_channel: a
[ 6.844451] ------------[ cut here ]------------
[ 6.849304] WARNING: CPU: 0 PID: 1146 at mm/vmalloc.c:150 vmap_page_range_noflush+0x14c/0x180
[ 6.859222] read_channel: b ret=1
[ 6.862701] read_channel: c ret=1
[ 6.871490] read_channel: 17
[ 6.875701] omap-mcbsp 49022000.mcbsp: ASoC: Failed to create component debugfs directory
[ 6.884338] read_channel: a
[ 6.887908] read_channel: b ret=1
[ 6.891387] read_channel: c ret=1
[ 6.901031] read_channel: 17
[ 6.906707] read_channel: a
[ 6.913269] read_channel: b ret=1
[ 6.916717] read_channel: c ret=1
[ 6.920196] read_channel: 12
[ 6.933319] read_channel: a
[ 6.941040] read_channel: b ret=1
[ 6.946746] read_channel: c ret=1
[ 6.950225] read_channel: 12
[ 6.957977] Modules linked in: pps_gpio(+) snd_soc_simple_card(+) snd_soc_simple_card_utils snd_soc_omap_twl4030(+) pps_core encoder_opa362 snd_soc_gtm601 connector_analog_tv omapdss_base pwm_omap_dmtimer generic_adc_battery bq27xxx_battery_hdq pwm_bl bq27xxx_battery bmp280_spi wlcore_sdio omap_hdq omap2430 bmp280_i2c bmp280 bmc150_accel_i2c bmc150_magn_i2c tsc2007 at24 leds_tca6507 bmc150_magn bmc150_accel_core industrialio_triggered_buffer kfifo_buf snd_soc_omap_mcbsp snd_soc_omap snd_pcm_dmaengine phy_twl4030_usb gpio_twl4030 musb_hdrc snd_soc_twl4030 twl4030_vibra twl4030_madc twl4030_charger twl4030_pwrbutton industrialio ehci_omap
[ 7.017120] read_channel: a
[ 7.020599] read_channel: b ret=1
[ 7.024291] read_channel: c ret=1
[ 7.027770] read_channel: 17
[ 7.030761] read_channel: a
[ 7.034515] read_channel: b ret=1
[ 7.037994] read_channel: c ret=1
[ 7.041473] read_channel: 46
[ 7.044708] ------------[ cut here ]------------
[ 7.049530] WARNING: CPU: 0 PID: 1145 at mm/vmalloc.c:150 vmap_page_range_noflush+0x14c/0x180
[ 7.058502] read_channel: a
[ 7.061889] read_channel: b ret=1
[ 7.067535] read_channel: c ret=1
[ 7.071014] read_channel: 17
[ 7.079803] read_channel: a
[ 7.087951] read_channel: b ret=1
[ 7.091400] read_channel: c ret=1
[ 7.103424] read_channel: 12
[ 7.106445] read_channel: a
[ 7.116546] read_channel: b ret=1
[ 7.123382] read_channel: c ret=1
[ 7.126861] read_channel: 12
[ 7.129882] read_channel: a
[ 7.142120] read_channel: b ret=1
[ 7.153350] read_channel: c ret=1
[ 7.156860] read_channel: 17
[ 7.159851] read_channel: a
[ 7.170135] read_channel: b ret=1
[ 7.183288] read_channel: c ret=1
[ 7.186798] read_channel: 17
[ 7.189788] read_channel: a
[ 7.199310] read_channel: b ret=1
[ 7.202789] read_channel: c ret=1
[ 7.206390] Modules linked in: pps_gpio(+) snd_soc_simple_card(+) snd_soc_simple_card_utils snd_soc_omap_twl4030(+) pps_core encoder_opa362 snd_soc_gtm601 connector_analog_tv omapdss_base pwm_omap_dmtimer generic_adc_battery bq27xxx_battery_hdq pwm_bl bq27xxx_battery bmp280_spi wlcore_sdio omap_hdq omap2430 bmp280_i2c bmp280 bmc150_accel_i2c bmc150_magn_i2c tsc2007 at24 leds_tca6507 bmc150_magn bmc150_accel_core industrialio_triggered_buffer kfifo_buf snd_soc_omap_mcbsp snd_soc_omap snd_pcm_dmaengine phy_twl4030_usb gpio_twl4030 musb_hdrc snd_soc_twl4030 twl4030_vibra twl4030_madc twl4030_charger twl4030_pwrbutton industrialio ehci_omap
[ 7.554656] CPU: 0 PID: 1146 Comm: udevd Not tainted 4.17.0-rc1-letux+ #2362
[ 7.562042] Hardware name: Generic OMAP36xx (Flattened Device Tree)
[ 7.568634] [<c010fc8c>] (unwind_backtrace) from [<c010c04c>] (show_stack+0x10/0x14)
[ 7.576751] [<c010c04c>] (show_stack) from [<c06fefc8>] (dump_stack+0x7c/0x9c)
[ 7.584289] [<c06fefc8>] (dump_stack) from [<c012e190>] (__warn+0xd8/0x108)
[ 7.591552] [<c012e190>] (__warn) from [<c012e280>] (warn_slowpath_null+0x38/0x44)
[ 7.599456] [<c012e280>] (warn_slowpath_null) from [<c022fc1c>] (vmap_page_range_noflush+0x14c/0x180)
[ 7.609130] [<c022fc1c>] (vmap_page_range_noflush) from [<c022fe18>] (map_vm_area+0x34/0x60)
[ 7.617919] [<c022fe18>] (map_vm_area) from [<c0230b14>] (__vmalloc_node_range+0x154/0x1dc)
[ 7.626678] [<c0230b14>] (__vmalloc_node_range) from [<c0230bd8>] (__vmalloc_node+0x3c/0x4c)
[ 7.635467] [<c0230bd8>] (__vmalloc_node) from [<c0230c0c>] (vmalloc+0x24/0x34)
[ 7.643127] [<c0230c0c>] (vmalloc) from [<c024979c>] (kernel_read_file+0x110/0x1fc)
[ 7.651123] [<c024979c>] (kernel_read_file) from [<c0249940>] (kernel_read_file_from_fd+0x44/0x64)
[ 7.660491] [<c0249940>] (kernel_read_file_from_fd) from [<c01a31bc>] (sys_finit_module+0x60/0x90)
[ 7.669860] [<c01a31bc>] (sys_finit_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[ 7.678375] Exception stack(0xee7fbfa8 to 0xee7fbff0)
[ 7.683654] bfa0: b6de37d4 00051f98 00000006 b6de29f8 00000000 b6de331c
[ 7.692199] bfc0: b6de37d4 00051f98 3d120300 0000017b 00020000 00037f78 00050048 000511a0
[ 7.700744] bfe0: beacaee0 beacaed0 b6ddcc4b b6ee7a42
[ 7.791992] CPU: 0 PID: 1145 Comm: udevd Not tainted 4.17.0-rc1-letux+ #2362
[ 7.799377] Hardware name: Generic OMAP36xx (Flattened Device Tree)
[ 7.805938] [<c010fc8c>] (unwind_backtrace) from [<c010c04c>] (show_stack+0x10/0x14)
[ 7.814056] [<c010c04c>] (show_stack) from [<c06fefc8>] (dump_stack+0x7c/0x9c)
[ 7.821594] [<c06fefc8>] (dump_stack) from [<c012e190>] (__warn+0xd8/0x108)
[ 7.828887] [<c012e190>] (__warn) from [<c012e280>] (warn_slowpath_null+0x38/0x44)
[ 7.836791] [<c012e280>] (warn_slowpath_null) from [<c022fc1c>] (vmap_page_range_noflush+0x14c/0x180)
[ 7.846435] [<c022fc1c>] (vmap_page_range_noflush) from [<c022fe18>] (map_vm_area+0x34/0x60)
[ 7.855285] [<c022fe18>] (map_vm_area) from [<c04b0588>] (dma_common_contiguous_remap+0x9c/0xd0)
[ 7.864440] [<c04b0588>] (dma_common_contiguous_remap) from [<c0114284>] (__alloc_from_contiguous+0xb0/0xd4)
[ 7.874725] [<c0114284>] (__alloc_from_contiguous) from [<c01142e0>] (cma_allocator_alloc+0x38/0x40)
[ 7.884246] [<c01142e0>] (cma_allocator_alloc) from [<c01144c0>] (__dma_alloc+0x1d8/0x2d4)
[ 7.892883] [<c01144c0>] (__dma_alloc) from [<c011462c>] (arm_dma_alloc+0x38/0x44)
[ 7.900817] [<c011462c>] (arm_dma_alloc) from [<bf0a7348>] (omap_pcm_preallocate_dma_buffer+0xdc/0x10c [snd_soc_omap])
[ 7.911987] [<bf0a7348>] (omap_pcm_preallocate_dma_buffer [snd_soc_omap]) from [<bf0a7478>] (omap_pcm_new+0x100/0x138 [snd_soc_omap])
[ 7.924530] [<bf0a7478>] (omap_pcm_new [snd_soc_omap]) from [<c062bfac>] (soc_new_pcm+0x3f0/0x4c4)
[ 7.933898] [<c062bfac>] (soc_new_pcm) from [<c062061c>] (snd_soc_instantiate_card+0x6e0/0xaa8)
[ 7.942993] [<c062061c>] (snd_soc_instantiate_card) from [<c0620b00>] (snd_soc_register_card+0x11c/0x1b4)
[ 7.953002] [<c0620b00>] (snd_soc_register_card) from [<c062c48c>] (devm_snd_soc_register_card+0x30/0x6c)
[ 7.963012] [<c062c48c>] (devm_snd_soc_register_card) from [<bf1943a0>] (omap_twl4030_probe+0x174/0x1d0 [snd_soc_omap_twl4030])
[ 7.975036] [<bf1943a0>] (omap_twl4030_probe [snd_soc_omap_twl4030]) from [<c04a1650>] (platform_drv_probe+0x50/0xa0)
[ 7.986114] [<c04a1650>] (platform_drv_probe) from [<c049fb4c>] (driver_probe_device+0x188/0x318)
[ 7.995391] [<c049fb4c>] (driver_probe_device) from [<c049fd5c>] (__driver_attach+0x80/0xa4)
[ 8.004211] [<c049fd5c>] (__driver_attach) from [<c049e250>] (bus_for_each_dev+0x58/0x7c)
[ 8.012756] [<c049e250>] (bus_for_each_dev) from [<c049f0e8>] (bus_add_driver+0xcc/0x1e0)
[ 8.021331] [<c049f0e8>] (bus_add_driver) from [<c04a0900>] (driver_register+0x9c/0xe0)
[ 8.029693] [<c04a0900>] (driver_register) from [<c0102d74>] (do_one_initcall+0xb4/0x248)
[ 8.038238] [<c0102d74>] (do_one_initcall) from [<c01a4030>] (do_init_module+0x58/0x1d0)
[ 8.046691] [<c01a4030>] (do_init_module) from [<c01a2e60>] (load_module+0xe04/0xfb0)
[ 8.054870] [<c01a2e60>] (load_module) from [<c01a31e4>] (sys_finit_module+0x88/0x90)
[ 8.063049] [<c01a31e4>] (sys_finit_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[ 8.071594] Exception stack(0xee7d7fa8 to 0xee7d7ff0)
[ 8.076873] 7fa0: b6de37d4 00051f98 00000006 b6de29f8 00000000 b6de331c
[ 8.085388] 7fc0: b6de37d4 00051f98 3d120300 0000017b 00020000 00037f78 00050048 00057b20
[ 8.093933] 7fe0: beacaee0 beacaed0 b6ddcc4b b6ee7a42
[ 8.554046] ------------[ cut here ]------------
The pwm_bl probe seems to fail and then be ok.
The gab probe seems to be ok.
But this time the omap_twl4030_probe crashes.
So the problem drifts away from the moment where pwm_bl and gab are probed.
I just have one idea: the gab driver reads the iio adc which is part of the twl4030 chip.
So how can that succeed if the twl4030 probe wasn't done yet?
On the other hand the twl4030 stuff seems to be sound related :(
But: recently there were some twl4030 i2c accessor and regmap patches and some were reverted
because they made problems...
One idea I have to try next is to delay the scheduled-work of the gab driver by more than 0 jiffies...
BR,
Nikolaus
More information about the Letux-kernel
mailing list