The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: jic23@kernel.org, nuno.sa@analog.com, lars@metafoo.de,
	Michael.Hennerich@analog.com, dlechner@baylibre.com,
	andy@kernel.org, benato.denis96@gmail.com,
	martin@martingkelly.com, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, jianhao.xu@seu.edu.cn,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ
Date: Wed, 3 Jun 2026 04:05:48 +0300	[thread overview]
Message-ID: <ah997ABzoOb0cFq3@ashevche-desk.local> (raw)
In-Reply-To: <20260602091727.2406720-2-runyu.xiao@seu.edu.cn>

On Tue, Jun 02, 2026 at 05:17:26PM +0800, Runyu Xiao wrote:
> devm_adis_probe_trigger() registers iio_trigger_generic_data_rdy_poll()
> through devm_request_irq() on the non-FIFO path, but it does not add
> IRQF_NO_THREAD to the IRQ flags.
> 
> 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 then dispatched from irq/... thread context instead of
> hardirq context. Because iio_trigger_generic_data_rdy_poll()
> immediately drives iio_trigger_poll(), this violates the hardirq-only
> IIO trigger helper contract and can push downstream trigger consumers
> through the wrong execution context.
> 
> Add IRQF_NO_THREAD on top of the existing adis->irq_flag value for the
> non-FIFO request_irq() path, while preserving the current trigger
> polarity and IRQF_NO_AUTOEN behavior.

> Build-tested by compiling adis_trigger.o.
> 
> No ADIS hardware was available for end-to-end runtime testing on this
> submission branch.

These two paragraphs are unneeded details and can go to the cover letter.

...

Code wise IIRC another approach was discussed. But Jonathan may know better.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-06-03  1:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02  9:17 [PATCH 0/2] iio: add IRQF_NO_THREAD to hardirq-only trigger helpers Runyu Xiao
2026-06-02  9:17 ` [PATCH 1/2] iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ Runyu Xiao
2026-06-03  1:05   ` Andy Shevchenko [this message]
2026-06-03 13:46     ` Jonathan Cameron
2026-06-02  9:17 ` [PATCH 2/2] iio: imu: bmi160: add IRQF_NO_THREAD to data-ready " Runyu Xiao
2026-06-03  1:06   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ah997ABzoOb0cFq3@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=benato.denis96@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@martingkelly.com \
    --cc=nuno.sa@analog.com \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox