Re: [PATCH 2/2] iio: imu: bmi160: add IRQF_NO_THREAD to data-ready trigger IRQ
From: Andy Shevchenko
Date: Tue Jun 02 2026 - 21:07:52 EST
On Tue, Jun 02, 2026 at 05:17:27PM +0800, Runyu Xiao wrote:
> bmi160_probe_trigger() registers iio_trigger_generic_data_rdy_poll()
> through devm_request_irq(), but it passes only irq_type and does not add
> IRQF_NO_THREAD.
>
> When the kernel is booted with forced IRQ threading, the parent IRQ can
> otherwise be threaded by the IRQ core and the subsequent IIO trigger
> child IRQ is dispatched from irq/... thread context instead of hardirq
> context. Because the handler immediately pushes the event into
> iio_trigger_poll(), this violates the hardirq-only IIO trigger helper
> contract and can drive downstream trigger consumers through the wrong
> execution context.
>
> Add IRQF_NO_THREAD on top of irq_type when registering the BMI160 data-
> ready trigger handler.
>
> Build-tested by compiling bmi160_core.o.
>
> No BMI160 hardware was available for end-to-end runtime testing on this
> submission branch.
Same comments as per previous patch.
--
With Best Regards,
Andy Shevchenko