Skip to contentSkip to conversation

iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll()

PATCH In review Christian Eggers 2 participants 3 messages Jul 27, 2020 – Aug 3, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll()

iio_trigger_poll() calls generic_handle_irq(). This function expects to be run with local IRQs disabled.

---
 drivers/iio/trigger/iio-trig-hrtimer.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/iio/trigger/iio-trig-hrtimer.c +2 -0
index f59bf8d58586..2fe8a5c1484e 100644
@@ -89,7 +89,9 @@ static enum hrtimer_restart iio_hrtimer_trig_handler(struct hrtimer *timer)
 	info = container_of(timer, struct iio_hrtimer_info, timer);
 
 	hrtimer_forward_now(timer, info->period);
+	local_irq_disable();
 	iio_trigger_poll(info->swt.trigger);
+	local_irq_enable();
 
 	return HRTIMER_RESTART;
 }
Signature · 8 lines
Christian Eggers
Embedded software developer

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918
Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477
Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler
maintainer
#1 lore raw

Hi

[This is an automated email]

This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v5.7.11, v5.4.54, v4.19.135, v4.14.190, v4.9.231, v4.4.231.

v5.7.11: Build OK!
v5.4.54: Build OK!
v4.19.135: Build OK!
v4.14.190: Build OK!
v4.9.231: Build OK!
v4.4.231: Failed to apply! Possible dependencies:
ac5006a2a558 ("iio: trigger: Introduce IIO hrtimer based trigger")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha
#2 lore raw
Quoted 12 lines · Sasha Levin

The bot has tested the following trees: v5.7.11, v5.4.54, v4.19.135, v4.14.190, v4.9.231, v4.4.231.

v5.7.11: Build OK!
v5.4.54: Build OK!
v4.19.135: Build OK!
v4.14.190: Build OK!
v4.9.231: Build OK!
v4.4.231: Failed to apply! Possible dependencies:
ac5006a2a558 ("iio: trigger: Introduce IIO hrtimer based trigger")

Quoted 3 lines

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Please apply for v4.9 and later.

regards
Christian