Andy Shevchenko
2a428481c8
mfd: dln2: Run event handler loop under spinlock
...
[ Upstream commit 3d85894225 ]
The event handler loop must be run with interrupts disabled.
Otherwise we will have a warning:
[ 1970.785649] irq 31 handler lineevent_irq_handler+0x0/0x20 enabled interrupts
[ 1970.792739] WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x162/0x170
[ 1970.860732] RIP: 0010:__handle_irq_event_percpu+0x162/0x170
...
[ 1970.946994] Call Trace:
[ 1970.949446] <IRQ>
[ 1970.951471] handle_irq_event_percpu+0x2c/0x80
[ 1970.955921] handle_irq_event+0x23/0x43
[ 1970.959766] handle_simple_irq+0x57/0x70
[ 1970.963695] generic_handle_irq+0x42/0x50
[ 1970.967717] dln2_rx+0xc1/0x210 [dln2]
[ 1970.971479] ? usb_hcd_unmap_urb_for_dma+0xa6/0x1c0
[ 1970.976362] __usb_hcd_giveback_urb+0x77/0xe0
[ 1970.980727] usb_giveback_urb_bh+0x8e/0xe0
[ 1970.984837] tasklet_action_common.isra.0+0x4a/0xe0
...
Recently xHCI driver switched to tasklets in the commit 36dc01657b
("usb: host: xhci: Support running urb giveback in tasklet context").
The handle_irq_event_* functions are expected to be called with interrupts
disabled and they rightfully complain here because we run in tasklet context
with interrupts enabled.
Use a event spinlock to protect event handler from being interrupted.
Note, that there are only two users of this GPIO and ADC drivers and both of
them are using generic_handle_irq() which makes above happen.
Fixes: 338a128142 ("mfd: Add support for Diolan DLN-2 devices")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2020-08-21 11:02:11 +02: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
2018-09-26 08:36:39 +02: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
2019-02-27 10:06:58 +01:00
2016-10-04 15:48:05 +01:00
2016-01-14 08:43:56 +00:00
2017-11-08 10:08:33 +01:00
2014-06-03 08:11:51 +01:00
2016-08-08 12:53:26 +01:00
2016-10-04 15:48:03 +01:00
2016-01-14 08:43:57 +00:00
2016-10-04 15:48:03 +01:00
2020-08-21 11:02:09 +02:00
2016-01-14 08:43:58 +00:00
2016-06-29 10:14:40 +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-10-04 15:48:04 +01:00
2016-02-12 08:53:03 +00:00
2016-09-13 14:10:04 +01:00
2017-11-08 10:08:33 +01:00
2016-04-19 07:55:05 +01:00
2016-01-14 08:44:01 +00:00
2017-12-29 17:42:58 +01:00
2018-08-03 07:55:16 +02: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
2016-10-04 15:48:02 +01: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
2020-02-14 16:31:06 -05:00
2016-10-04 15:48:01 +01:00
2016-10-04 15:48:01 +01:00
2016-10-04 15:48:01 +01:00
2015-10-13 11:28:36 +01:00
2016-01-14 08:44:05 +00:00
2019-02-27 10:06:58 +01:00
2020-08-21 11:02:11 +02:00
2016-10-04 15:48:02 +01:00
2016-10-04 15:48:04 +01:00
2015-11-04 11:02:12 +00:00
2017-12-20 10:07:15 +01:00
2019-08-04 09:33:39 +02:00
2016-04-19 07:55:15 +01:00
2016-04-19 07:58:30 +01:00
2014-01-06 09:13:29 +00:00
2016-10-04 15:48:03 +01:00
2016-05-20 11:10:24 -07:00
2016-11-16 09:50:29 +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-10-04 15:48:04 +01:00
2019-10-07 18:53:16 +02:00
2020-01-29 10:24:27 +01:00
2016-04-09 03:10:50 +02: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-10-07 08:35:35 -07:00
2016-06-29 10:16:36 +01:00
2015-10-30 17:19:52 +00:00
2016-10-04 15:48:04 +01: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
2016-09-28 23:07:20 +02:00
2015-01-22 15:55:56 +00:00
2016-10-07 08:35:35 -07:00
2015-08-11 15:08:48 +01:00
2015-08-11 15:09:01 +01:00
2016-06-29 10:14:30 +01:00
2016-10-04 15:48:05 +01:00
2019-11-28 18:28:38 +01:00
2015-08-11 15:09:08 +01:00
2016-06-29 10:14:29 +01:00
2016-10-04 15:48:02 +01:00
2016-08-01 07:28:14 -04:00
2016-05-09 13:27:20 +01:00
2016-04-19 07:59:14 +01:00
2016-06-29 10:14:28 +01:00
2019-11-28 18:28:37 +01: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
2019-08-04 09:33:39 +02:00
2019-02-27 10:06:58 +01:00
2018-10-18 09:13:20 +02:00
2019-07-10 09:55:44 +02:00
2018-03-24 11:00:16 +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
2016-08-31 09:33:11 +01:00
2019-02-27 10:06:58 +01: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-08-31 13:48:25 +01:00
2020-02-14 16:31:06 -05: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
2020-04-24 07:58:49 +02: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
2016-10-04 15:48:02 +01: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
2016-06-29 10:14:31 +01:00
2016-04-19 07:56:28 +01:00
2018-09-15 09:42:58 +02:00
2016-10-04 15:48:04 +01:00
2014-10-20 16:20:53 +02:00
2016-01-11 06:23:38 +00:00
2016-08-10 09:25:18 +01:00
2015-10-28 10:30:17 +09:00
2016-11-16 09:50:33 +00:00
2016-08-10 09:25:18 +01:00
2016-04-19 07:56:35 +01:00
2016-10-04 15:48:04 +01:00
2016-11-25 10:04:31 +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
2019-11-25 09:53:45 +01:00
2015-11-17 06:58:42 -02:00
2016-05-09 08:21:11 +01:00
2016-06-29 10:14:35 +01:00
2019-01-23 08:10:55 +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
2017-01-12 11:39:23 +01:00
2016-08-10 18:21:55 +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
2019-06-22 08:17:13 +02:00
2015-08-11 15:08:48 +01:00
2017-12-29 17:42:58 +01:00
2016-05-27 15:26:11 -07:00
2017-12-05 11:24:32 +01:00
2015-08-11 15:09:06 +01:00
2019-06-22 08:17:13 +02:00
2019-02-27 10:06:58 +01:00
2016-10-04 15:48:03 +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
2019-02-27 10:06:59 +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
2020-06-30 15:38:22 -04: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