Roger Quadros
b49b927f16
mfd: omap-usb-tll: Fix scheduling while atomic BUG
We shouldn't be calling clk_prepare_enable()/clk_prepare_disable()
in an atomic context.
Fixes the following issue:
[ 5.830970] ehci-omap: OMAP-EHCI Host Controller driver
[ 5.830974] driver_register 'ehci-omap'
[ 5.895849] driver_register 'wl1271_sdio'
[ 5.896870] BUG: scheduling while atomic: udevd/994/0x00000002
[ 5.896876] 4 locks held by udevd/994:
[ 5.896904] #0: (&dev->mutex){......}, at: [<c049597c>] __driver_attach+0x60/0xac
[ 5.896923] #1: (&dev->mutex){......}, at: [<c049598c>] __driver_attach+0x70/0xac
[ 5.896946] #2: (tll_lock){+.+...}, at: [<c04c2630>] omap_tll_enable+0x2c/0xd0
[ 5.896966] #3: (prepare_lock){+.+...}, at: [<c05ce9c8>] clk_prepare_lock+0x48/0xe0
[ 5.897042] Modules linked in: wlcore_sdio(+) ehci_omap(+) dwc3_omap snd_soc_ts3a225e leds_is31fl319x bq27xxx_battery_i2c tsc2007 bq27xxx_battery bq2429x_charger ina2xx tca8418_keypad as5013 leds_tca6507 twl6040_vibra gpio_twl6040 bmp085_i2c(+) palmas_gpadc usb3503 palmas_pwrbutton bmg160_i2c(+) bmp085 bma150(+) bmg160_core bmp280 input_polldev snd_soc_omap_mcbsp snd_soc_omap_mcpdm snd_soc_omap snd_pcm_dmaengine
[ 5.897048] Preemption disabled at:[< (null)>] (null)
[ 5.897051]
[ 5.897059] CPU: 0 PID: 994 Comm: udevd Not tainted 4.6.0-rc5-letux+ #233
[ 5.897062] Hardware name: Generic OMAP5 (Flattened Device Tree)
[ 5.897076] [<c010e714>] (unwind_backtrace) from [<c010af34>] (show_stack+0x10/0x14)
[ 5.897087] [<c010af34>] (show_stack) from [<c040aa7c>] (dump_stack+0x88/0xc0)
[ 5.897099] [<c040aa7c>] (dump_stack) from [<c020c558>] (__schedule_bug+0xac/0xd0)
[ 5.897111] [<c020c558>] (__schedule_bug) from [<c06f3d44>] (__schedule+0x88/0x7e4)
[ 5.897120] [<c06f3d44>] (__schedule) from [<c06f46d8>] (schedule+0x9c/0xc0)
[ 5.897129] [<c06f46d8>] (schedule) from [<c06f4904>] (schedule_preempt_disabled+0x14/0x20)
[ 5.897140] [<c06f4904>] (schedule_preempt_disabled) from [<c06f64e4>] (mutex_lock_nested+0x258/0x43c)
[ 5.897150] [<c06f64e4>] (mutex_lock_nested) from [<c05ce9c8>] (clk_prepare_lock+0x48/0xe0)
[ 5.897160] [<c05ce9c8>] (clk_prepare_lock) from [<c05d0e7c>] (clk_prepare+0x10/0x28)
[ 5.897169] [<c05d0e7c>] (clk_prepare) from [<c04c2668>] (omap_tll_enable+0x64/0xd0)
[ 5.897180] [<c04c2668>] (omap_tll_enable) from [<c04c1728>] (usbhs_runtime_resume+0x18/0x17c)
[ 5.897192] [<c04c1728>] (usbhs_runtime_resume) from [<c049d404>] (pm_generic_runtime_resume+0x2c/0x40)
[ 5.897202] [<c049d404>] (pm_generic_runtime_resume) from [<c049f180>] (__rpm_callback+0x38/0x68)
[ 5.897210] [<c049f180>] (__rpm_callback) from [<c049f220>] (rpm_callback+0x70/0x88)
[ 5.897218] [<c049f220>] (rpm_callback) from [<c04a0a00>] (rpm_resume+0x4ec/0x7ec)
[ 5.897227] [<c04a0a00>] (rpm_resume) from [<c04a0f48>] (__pm_runtime_resume+0x4c/0x64)
[ 5.897236] [<c04a0f48>] (__pm_runtime_resume) from [<c04958dc>] (driver_probe_device+0x30/0x70)
[ 5.897246] [<c04958dc>] (driver_probe_device) from [<c04959a4>] (__driver_attach+0x88/0xac)
[ 5.897256] [<c04959a4>] (__driver_attach) from [<c04940f8>] (bus_for_each_dev+0x50/0x84)
[ 5.897267] [<c04940f8>] (bus_for_each_dev) from [<c0494e40>] (bus_add_driver+0xcc/0x1e4)
[ 5.897276] [<c0494e40>] (bus_add_driver) from [<c0496914>] (driver_register+0xac/0xf4)
[ 5.897286] [<c0496914>] (driver_register) from [<c01018e0>] (do_one_initcall+0x100/0x1b8)
[ 5.897296] [<c01018e0>] (do_one_initcall) from [<c01c7a54>] (do_init_module+0x58/0x1c0)
[ 5.897304] [<c01c7a54>] (do_init_module) from [<c01c8a3c>] (SyS_finit_module+0x88/0x90)
[ 5.897313] [<c01c8a3c>] (SyS_finit_module) from [<c0107120>] (ret_fast_syscall+0x0/0x1c)
[ 5.912697] ------------[ cut here ]------------
[ 5.912711] WARNING: CPU: 0 PID: 994 at kernel/sched/core.c:2996 _raw_spin_unlock+0x28/0x58
[ 5.912717] DEBUG_LOCKS_WARN_ON(val > preempt_count())
Cc: <stable@vger.kernel.org>
Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-05-09 15:41:48 +01:00
..
2016-01-14 08:43:50 +00:00
2015-08-11 15:08:48 +01:00
2015-08-11 15:08:48 +01:00
2016-01-14 08:43:51 +00:00
2014-09-26 08:15:45 +01:00
2016-01-14 08:43:52 +00:00
2016-01-14 08:43:53 +00:00
2016-01-14 08:43:53 +00:00
2016-01-14 08:43:54 +00:00
2016-01-14 08:43:55 +00:00
2016-01-14 08:43:56 +00:00
2016-01-14 08:43:56 +00:00
2014-06-03 08:11:51 +01:00
2016-04-19 07:54:40 +01:00
2016-01-14 08:43:57 +00:00
2016-05-09 08:20:37 +01:00
2016-01-14 08:43:58 +00:00
2016-04-19 07:54:00 +01:00
2015-12-04 08:46:39 +00:00
2015-12-04 08:46:39 +00:00
2016-04-19 07:54:50 +01:00
2016-05-09 08:24:46 +01:00
2016-04-19 07:58:06 +01:00
2015-10-30 17:19:49 +00:00
2016-04-19 07:54:58 +01:00
2016-02-12 08:53:03 +00:00
2016-04-19 07:54:08 +01:00
2016-05-09 15:41:14 +01:00
2016-04-19 07:55:05 +01:00
2016-01-14 08:44:01 +00:00
2016-01-14 08:44:01 +00:00
2015-06-22 12:23:02 +01:00
2016-03-16 08:50:22 +00:00
2016-01-14 08:44:02 +00:00
2016-01-14 08:44:03 +00:00
2015-10-30 17:19:49 +00:00
2016-01-14 08:44:03 +00:00
2016-01-14 08:44:04 +00:00
2015-11-06 10:23:50 -08:00
2015-06-22 12:25:01 +01:00
2015-08-11 15:08:48 +01:00
2016-03-16 08:50:27 +00:00
2015-06-22 12:25:20 +01:00
2016-03-16 08:50:31 +00:00
2016-04-19 07:53:42 +01:00
2015-10-13 11:28:36 +01:00
2016-01-14 08:44:05 +00:00
2016-03-18 10:15:11 -07:00
2013-09-26 11:04:16 +02:00
2015-03-26 14:20:18 +00:00
2016-05-09 08:23:56 +01:00
2015-11-04 11:02:12 +00:00
2016-02-11 15:40:41 +00:00
2016-04-19 07:55:15 +01:00
2016-04-19 07:58:23 +01:00
2016-04-19 07:58:30 +01:00
2014-01-06 09:13:29 +00:00
2014-10-20 16:20:53 +02:00
2016-05-09 08:21:06 +01:00
2015-10-30 17:19:47 +00:00
2016-05-09 13:27:40 +01:00
2015-06-22 12:25:01 +01:00
2015-07-21 09:22:08 +02:00
2016-03-16 08:50:42 +00:00
2016-03-16 08:50:42 +00:00
2016-05-09 08:21:02 +01:00
2015-12-07 02:29:23 +01:00
2016-03-16 08:50:41 +00:00
2015-05-06 08:03:20 +02:00
2015-09-16 15:47:51 +02:00
2016-04-19 07:59:59 +01:00
2015-10-30 17:19:43 +00:00
2015-10-30 17:19:52 +00:00
2016-04-19 07:55:23 +01:00
2016-04-11 13:31:40 +01:00
2015-08-11 15:08:48 +01:00
2015-11-24 11:10:46 +00:00
2015-01-22 15:55:56 +00:00
2016-03-16 08:50:25 +00:00
2015-08-11 15:08:48 +01:00
2015-08-11 15:09:01 +01:00
2016-01-14 08:43:50 +00:00
2015-08-11 15:09:08 +01:00
2016-01-14 08:43:50 +00:00
2015-08-11 15:09:08 +01:00
2016-01-14 08:43:50 +00:00
2016-01-14 08:43:50 +00:00
2016-05-09 13:27:20 +01:00
2016-04-19 07:59:14 +01:00
2016-01-14 08:43:50 +00:00
2015-12-04 08:45:54 +00:00
2015-08-11 15:08:48 +01:00
2015-10-28 10:30:17 +09:00
2014-07-09 14:58:10 +01:00
2014-07-22 13:17:02 +01:00
2014-10-20 16:20:53 +02:00
2016-02-16 00:20:03 +01:00
2016-04-19 07:55:30 +01:00
2016-04-19 07:54:19 +01:00
2016-05-09 08:20:22 +01:00
2015-01-22 16:03:53 +00:00
2016-05-09 15:41:48 +01:00
2013-04-09 09:46:23 +02:00
2015-08-11 15:08:48 +01:00
2014-03-19 08:58:07 +00:00
2015-01-22 15:56:21 +00:00
2015-10-30 17:19:42 +00:00
2015-09-16 15:47:51 +02:00
2015-12-04 08:46:23 +00:00
2016-01-11 06:23:32 +00:00
2016-05-09 13:27:38 +01:00
2016-05-09 13:27:38 +01:00
2016-04-19 07:55:52 +01:00
2015-08-11 15:08:48 +01:00
2016-04-19 07:55:59 +01:00
2016-04-19 07:56:06 +01:00
2016-04-19 07:56:17 +01:00
2015-03-03 16:41:21 +00:00
2015-10-30 17:19:44 +00:00
2015-10-30 17:19:51 +00:00
2015-10-30 17:19:44 +00:00
2015-10-30 17:19:44 +00:00
2015-11-06 10:47:12 -08:00
2015-10-30 17:19:51 +00:00
2015-03-12 09:27:41 +00:00
2016-05-09 13:27:38 +01:00
2016-05-09 13:27:38 +01:00
2014-07-25 15:31:44 +01:00
2015-08-11 15:08:48 +01:00
2013-04-19 18:37:59 +02:00
2016-04-19 07:56:28 +01:00
2016-04-19 07:58:37 +01:00
2016-05-09 08:24:01 +01:00
2014-10-20 16:20:53 +02:00
2016-01-11 06:23:38 +00:00
2015-09-04 11:35:03 -07:00
2015-10-28 10:30:17 +09:00
2016-03-16 08:50:37 +00:00
2014-12-30 16:59:59 -08:00
2016-04-19 07:56:35 +01:00
2015-01-22 15:55:49 +00:00
2016-03-16 08:50:18 +00:00
2015-09-16 15:47:51 +02:00
2015-08-11 15:09:01 +01:00
2014-11-25 16:18:58 +00:00
2016-04-19 07:58:44 +01:00
2015-03-03 16:41:15 +00:00
2015-11-17 06:58:42 -02:00
2016-05-09 08:21:11 +01:00
2016-04-19 07:56:42 +01:00
2015-08-11 15:09:01 +01:00
2016-04-19 07:58:51 +01:00
2016-03-16 08:50:15 +00:00
2016-03-16 08:50:36 +00:00
2016-04-19 07:56:49 +01:00
2015-08-11 15:09:10 +01:00
2016-05-09 13:27:39 +01:00
2014-10-20 16:20:53 +02:00
2016-02-11 16:30:59 +00:00
2016-02-11 16:30:59 +00:00
2016-02-11 16:30:59 +00:00
2015-08-11 15:08:48 +01:00
2014-10-20 16:20:53 +02:00
2015-08-11 15:09:01 +01:00
2016-05-09 08:24:41 +01:00
2015-08-11 15:09:06 +01:00
2016-05-09 08:23:52 +01:00
2015-08-05 05:10:06 +02:00
2016-04-19 07:59:00 +01:00
2013-07-31 13:01:29 +01:00
2016-04-19 07:59:06 +01:00
2014-11-25 16:18:42 +00:00
2014-01-21 08:27:45 +00:00
2016-05-09 13:27:39 +01:00
2015-06-22 12:25:25 +01:00
2015-10-26 14:49:04 +00:00
2015-08-11 15:08:48 +01:00
2015-08-11 15:09:01 +01:00
2016-01-11 06:23:21 +00:00
2015-10-28 10:30:17 +09:00
2016-03-16 08:50:21 +00:00
2016-05-09 15:41:35 +01:00
2015-06-22 12:25:26 +01:00
2015-08-11 15:08:48 +01:00
2015-08-11 15:09:01 +01:00
2016-05-09 08:23:56 +01:00
2015-09-04 11:46:02 -07:00
2015-08-11 15:09:13 +01:00
2015-08-11 15:08:47 +01:00
2015-09-04 11:46:02 -07:00
2016-03-16 08:50:22 +00:00