Skip to contentSkip to conversation

IRQF_ONESHOT clean up

PATCH Applied Sebastian Andrzej Siewior 9 participants 53 messages Jan 28 – Feb 3

Subsystems (41)
Arm (32-bit) Media (V4L/DVB) SCSI USB +37 more subsystems
lore
Share & tools
lore

Sebastian Andrzej Siewior

author maintainer
#0 lore raw

v2 cover IRQF_ONESHOT clean up

There was a bug report about setting IRQF_ONESHOT where it should have not been set. I looked around for other mistakes in that area. There are the following categories:

- Using custom primary irq handler doing exactly what irq_default_primary_handler() does

- Not using IRQF_ONESHOT but it looks like it is needed

- Using IRQF_ONESHOT but it looks like it should not have been used

- Using IRQF_ONESHOT but IRQF_NO_THREAD should be used

The outcome varies from harmless to problematic. Some examples:
- Missing IRQF_ONESHOT for a threaded interrupt.
For level-typed interrupts it is essential to disable the interrupt while the thread is running in order to make progress. Missing it means the interrupt remains active and the thread has little chance to make progress.
The irq-core will reject such request_irq() invocations but only if the primary handler is NULL, not if it is a copy of the default handler.

- Using IRQF_ONESHOT for a non-threaded interrupt.
This makes no sense since the threaded handler is missing. It can lead to errors in forced-threaded environments such as PREEMPT_RT especially if the handler uses functions which can sleep only on PREEMPT_RT.

This series is touching multiple subsystems. Instead of sending many single patches I decided to make one series. It would be nice if the individual subsystems could apply the changes individually, there are no dependencies as far as I can tell (except for int0002 but this is a different story).

v1…v2: https://lore.kernel.org/all/[email protected]/
- iio
- Splitted replacement of ad7766_irq() in its own patch (David Lechner)
- Swapped the ordering of some flags, missing re-idents and a few other things to make it look nicer (Andy Shevchenko)
- picked up tags and dropped applied patches

Sebastian Andrzej Siewior (20):
genirq: Set IRQF_COND_ONESHOT in devm_request_irq(). platform/x86: int0002: Remove IRQF_ONESHOT from request_irq() iommu/amd: Use core's primary handler and set IRQF_ONESHOT
mailbox: bcm-ferxrm-mailbox: Use default primary handler
bus: fsl-mc: Use default primary handler
Bluetooth: btintel_pcie: Use IRQF_ONESHOT and default primary handler
scsi: efct: Use IRQF_ONESHOT and default primary handler
ARM: versatile: Remove IRQF_ONESHOT
char: tpm: cr50: Remove IRQF_ONESHOT
EDAC/altera: Remove IRQF_ONESHOT
usb: typec: fusb302: Remove IRQF_ONESHOT
rtc: amlogic-a4: Remove IRQF_ONESHOT
thermal/qcom/lmh: Replace IRQF_ONESHOT with IRQF_NO_THREAD perf/cxlpmu: Replace IRQF_ONESHOT with IRQF_NO_THREAD
mfd: wm8350-core: Use IRQF_ONESHOT
iio: Use IRQF_NO_THREAD
iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD
iio: magnetometer: Remove IRQF_ONESHOT
iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()
media: pci: mg4b: Use IRQF_NO_THREAD

 arch/arm/mach-versatile/spc.c              |  4 ++--
 drivers/bluetooth/btintel_pcie.c           |  9 ++-------
 drivers/bus/fsl-mc/dprc-driver.c           | 13 +------------
 drivers/char/tpm/tpm_tis_i2c_cr50.c        |  3 +--
 drivers/char/tpm/tpm_tis_spi_cr50.c        |  2 +-
 drivers/edac/altera_edac.c                 | 11 ++++-------
 drivers/iio/accel/adxl355_core.c           |  5 ++---
 drivers/iio/accel/adxl372.c                |  9 ++++-----
 drivers/iio/accel/bma180.c                 |  5 +++--
 drivers/iio/accel/mxc4005.c                | 11 ++++-------
 drivers/iio/accel/stk8ba50.c               | 11 ++++-------
 drivers/iio/adc/ad4170-4.c                 |  2 +-
 drivers/iio/adc/ad7766.c                   | 10 ++--------
 drivers/iio/adc/ad7768-1.c                 |  5 ++---
 drivers/iio/adc/ad7779.c                   |  2 +-
 drivers/iio/adc/mcp3911.c                  |  2 +-
 drivers/iio/adc/ti-ads131e08.c             |  2 +-
 drivers/iio/chemical/ens160_core.c         |  9 +++------
 drivers/iio/gyro/adxrs290.c                |  2 +-
 drivers/iio/gyro/itg3200_buffer.c          |  8 +++-----
 drivers/iio/health/afe4403.c               |  9 ++++-----
 drivers/iio/health/afe4404.c               |  9 ++++-----
 drivers/iio/light/si1145.c                 |  2 +-
 drivers/iio/magnetometer/ak8975.c          |  2 +-
 drivers/iio/magnetometer/bmc150_magn.c     |  9 +++------
 drivers/iio/pressure/dlhl60d.c             |  7 +++----
 drivers/iio/temperature/tmp006.c           | 10 ++++------
 drivers/iommu/amd/amd_iommu.h              |  1 -
 drivers/iommu/amd/init.c                   | 12 ++++--------
 drivers/iommu/amd/iommu.c                  |  5 -----
 drivers/mailbox/bcm-flexrm-mailbox.c       | 14 ++------------
 drivers/media/pci/mgb4/mgb4_trigger.c      |  2 +-
 drivers/perf/cxl_pmu.c                     |  2 +-
 drivers/platform/x86/intel/int0002_vgpio.c |  4 ++--
 drivers/rtc/rtc-amlogic-a4.c               |  2 +-
 drivers/scsi/elx/efct/efct_driver.c        |  8 +-------
 drivers/thermal/qcom/lmh.c                 |  2 +-
 drivers/usb/typec/tcpm/fusb302.c           |  3 +--
 include/linux/interrupt.h                  |  2 +-
 include/linux/mfd/wm8350/core.h            |  2 +-
 40 files changed, 79 insertions(+), 153 deletions(-)
Signature · 1 line
2.51.0
author maintainer
#1 lore raw

PATCH v2 1/20 genirq: Set IRQF_COND_ONESHOT in devm_request_irq().

The flag IRQF_COND_ONESHOT was already force-added to request_irq() because the ACPI SCI interrupt handler is using the ONESHOT and it breaks all shared handler.
devm_request_irq() needs the same change since some users, such as int0002_vgpio, are using this function instead.

Add IRQF_COND_ONESHOT to flags passed to devm_request_irq().

Fixes c37927a203fa2 ("genirq: Set IRQF_COND_ONESHOT in request_irq()")
---
 include/linux/interrupt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/interrupt.h +1 -1
index 266f2b39213a0..b2bb878abd113 100644
@@ -228,7 +228,7 @@ static inline int __must_check
 devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler,
 		 unsigned long irqflags, const char *devname, void *dev_id)
 {
-	return devm_request_threaded_irq(dev, irq, handler, NULL, irqflags,
+	return devm_request_threaded_irq(dev, irq, handler, NULL, irqflags | IRQF_COND_ONESHOT,
 					 devname, dev_id);
 }
 
Signature · 1 line
2.51.0
#2 lore raw

[tip: irq/cleanups] genirq: Set IRQF_COND_ONESHOT in devm_request_irq().

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     943b052ded21feb84f293d40b06af3181cd0d0d7
Gitweb:        https://git.kernel.org/tip/943b052ded21feb84f293d40b06af3181cd0d0d7
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:21 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:13 +01:00

genirq: Set IRQF_COND_ONESHOT in devm_request_irq().

The flag IRQF_COND_ONESHOT was already force-added to request_irq() because the ACPI SCI interrupt handler is using the IRQF_ONESHOT flag which breaks all shared handlers.

devm_request_irq() needs the same change since some users, such as int0002_vgpio, are using this function instead.

Add IRQF_COND_ONESHOT to the flags passed to devm_request_irq().

Fixes c37927a203fa2 ("genirq: Set IRQF_COND_ONESHOT in request_irq()")
---
 include/linux/interrupt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/interrupt.h +1 -1
index 266f2b3..b2bb878 100644
@@ -228,7 +228,7 @@ static inline int __must_check
 devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler,
 		 unsigned long irqflags, const char *devname, void *dev_id)
 {
-	return devm_request_threaded_irq(dev, irq, handler, NULL, irqflags,
+	return devm_request_threaded_irq(dev, irq, handler, NULL, irqflags | IRQF_COND_ONESHOT,
 					 devname, dev_id);
 }
 
author maintainer
#3 lore raw

PATCH v2 2/20 platform/x86: int0002: Remove IRQF_ONESHOT from request_irq()

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

The flag was added to match the flag on the shared handler which uses a threaded handler and therefore IRQF_ONESHOT. This is no longer needed because devm_request_irq() now passes IRQF_COND_ONESHOT for this case.

Revert adding IRQF_ONESHOT to irqflags.

Fixes 8f812373d1958 ("platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq()")

---
Cc: Hans de Goede <[email protected]>
Cc: Ilpo Järvinen <[email protected]>
Cc: [email protected]

---
 drivers/platform/x86/intel/int0002_vgpio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/intel/int0002_vgpio.c +2 -2
index 6f5629dc3f8db..562e880256436 100644
@@ -206,8 +206,8 @@ static int int0002_probe(struct platform_device *pdev)
 	 * FIXME: augment this if we managed to pull handling of shared
 	 * IRQs into gpiolib.
 	 */
-	ret = devm_request_irq(dev, irq, int0002_irq,
-			       IRQF_ONESHOT | IRQF_SHARED, "INT0002", chip);
+	ret = devm_request_irq(dev, irq, int0002_irq, IRQF_SHARED, "INT0002",
+			       chip);
 	if (ret) {
 		dev_err(dev, "Error requesting IRQ %d: %d\n", irq, ret);
 		return ret;
Signature · 1 line
2.51.0
#4 lore raw

[tip: irq/cleanups] platform/x86: int0002: Remove IRQF_ONESHOT from request_irq()

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     f6bc712877f24dc89bdfd7bdbf1a32f3b9960b34
Gitweb:        https://git.kernel.org/tip/f6bc712877f24dc89bdfd7bdbf1a32f3b9960b34
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:22 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:13 +01:00

platform/x86: int0002: Remove IRQF_ONESHOT from request_irq()

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt cannot fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

The flag was added to match the flag on the shared handler which uses a threaded handler and therefore IRQF_ONESHOT. This is no longer needed because devm_request_irq() now passes IRQF_COND_ONESHOT for this case.

Revert adding IRQF_ONESHOT to irqflags.

---
 drivers/platform/x86/intel/int0002_vgpio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/intel/int0002_vgpio.c +2 -2
index 6f5629d..562e880 100644
@@ -206,8 +206,8 @@ static int int0002_probe(struct platform_device *pdev)
 	 * FIXME: augment this if we managed to pull handling of shared
 	 * IRQs into gpiolib.
 	 */
-	ret = devm_request_irq(dev, irq, int0002_irq,
-			       IRQF_ONESHOT | IRQF_SHARED, "INT0002", chip);
+	ret = devm_request_irq(dev, irq, int0002_irq, IRQF_SHARED, "INT0002",
+			       chip);
 	if (ret) {
 		dev_err(dev, "Error requesting IRQ %d: %d\n", irq, ret);
 		return ret;
author maintainer
#5 lore raw

PATCH v2 3/20 iommu/amd: Use core's primary handler and set IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

request_threaded_irq() is invoked with a primary and a secondary handler and no flags are passed. The primary handler is the same as irq_default_primary_handler() so there is no need to have an identical copy.
The lack of the IRQF_ONESHOT can be dangerous because the interrupt source is not masked while the threaded handler is active. This means, especially on LEVEL typed interrupt lines, the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Fixes 72fe00f01f9a3 ("x86/amd-iommu: Use threaded interupt handler")

---
Cc: Joerg Roedel <[email protected]>
Cc: Suravee Suthikulpanit <[email protected]>
Cc: [email protected]

---
 drivers/iommu/amd/amd_iommu.h |  1 -
 drivers/iommu/amd/init.c      | 12 ++++--------
 drivers/iommu/amd/iommu.c     |  5 -----
 3 files changed, 4 insertions(+), 14 deletions(-)
drivers/iommu/amd/amd_iommu.h +0 -1
index b742ef1adb352..df1c238dc8885 100644
@@ -15,7 +15,6 @@ irqreturn_t amd_iommu_int_thread(int irq, void *data);
 irqreturn_t amd_iommu_int_thread_evtlog(int irq, void *data);
 irqreturn_t amd_iommu_int_thread_pprlog(int irq, void *data);
 irqreturn_t amd_iommu_int_thread_galog(int irq, void *data);
-irqreturn_t amd_iommu_int_handler(int irq, void *data);
 void amd_iommu_restart_log(struct amd_iommu *iommu, const char *evt_type,
 			   u8 cntrl_intr, u8 cntrl_log,
 			   u32 status_run_mask, u32 status_overflow_mask);
drivers/iommu/amd/init.c +4 -8
index 384c90b4f90a0..62a7a718acf8f 100644
@@ -2356,12 +2356,8 @@ static int iommu_setup_msi(struct amd_iommu *iommu)
 	if (r)
 		return r;
 
-	r = request_threaded_irq(iommu->dev->irq,
-				 amd_iommu_int_handler,
-				 amd_iommu_int_thread,
-				 0, "AMD-Vi",
-				 iommu);
-
+	r = request_threaded_irq(iommu->dev->irq, NULL, amd_iommu_int_thread,
+				 IRQF_ONESHOT, "AMD-Vi", iommu);
 	if (r) {
 		pci_disable_msi(iommu->dev);
 		return r;
@@ -2535,8 +2531,8 @@ static int __iommu_setup_intcapxt(struct amd_iommu *iommu, const char *devname,
 		return irq;
 	}
 
-	ret = request_threaded_irq(irq, amd_iommu_int_handler,
-				   thread_fn, 0, devname, iommu);
+	ret = request_threaded_irq(irq, NULL, thread_fn, IRQF_ONESHOT, devname,
+				   iommu);
 	if (ret) {
 		irq_domain_free_irqs(irq, 1);
 		irq_domain_remove(domain);
drivers/iommu/amd/iommu.c +0 -5
index 7c12be1b247f4..0f9045ce93af1 100644
@@ -1151,11 +1151,6 @@ irqreturn_t amd_iommu_int_thread(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-irqreturn_t amd_iommu_int_handler(int irq, void *data)
-{
-	return IRQ_WAKE_THREAD;
-}
-
 /****************************************************************************
  *
  * IOMMU command queuing functions
Signature · 1 line
2.51.0
#6 lore raw

[tip: irq/cleanups] iommu/amd: Use core's primary handler and set IRQF_ONESHOT

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     5bfcdccb4d18d3909b7f87942be67fd6bdc00c1d
Gitweb:        https://git.kernel.org/tip/5bfcdccb4d18d3909b7f87942be67fd6bdc00c1d
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:23 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:13 +01:00

iommu/amd: Use core's primary handler and set IRQF_ONESHOT

request_threaded_irq() is invoked with a primary and a secondary handler and no flags are passed. The primary handler is the same as irq_default_primary_handler() so there is no need to have an identical copy.

The lack of the IRQF_ONESHOT can be dangerous because the interrupt source is not masked while the threaded handler is active. This means, especially on LEVEL typed interrupt lines, the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Fixes 72fe00f01f9a3 ("x86/amd-iommu: Use threaded interupt handler")
---
 drivers/iommu/amd/amd_iommu.h |  1 -
 drivers/iommu/amd/init.c      | 12 ++++--------
 drivers/iommu/amd/iommu.c     |  5 -----
 3 files changed, 4 insertions(+), 14 deletions(-)
drivers/iommu/amd/amd_iommu.h +0 -1
index b742ef1..df1c238 100644
@@ -15,7 +15,6 @@ irqreturn_t amd_iommu_int_thread(int irq, void *data);
 irqreturn_t amd_iommu_int_thread_evtlog(int irq, void *data);
 irqreturn_t amd_iommu_int_thread_pprlog(int irq, void *data);
 irqreturn_t amd_iommu_int_thread_galog(int irq, void *data);
-irqreturn_t amd_iommu_int_handler(int irq, void *data);
 void amd_iommu_restart_log(struct amd_iommu *iommu, const char *evt_type,
 			   u8 cntrl_intr, u8 cntrl_log,
 			   u32 status_run_mask, u32 status_overflow_mask);
drivers/iommu/amd/init.c +4 -8
index 384c90b..62a7a71 100644
@@ -2356,12 +2356,8 @@ static int iommu_setup_msi(struct amd_iommu *iommu)
 	if (r)
 		return r;
 
-	r = request_threaded_irq(iommu->dev->irq,
-				 amd_iommu_int_handler,
-				 amd_iommu_int_thread,
-				 0, "AMD-Vi",
-				 iommu);
-
+	r = request_threaded_irq(iommu->dev->irq, NULL, amd_iommu_int_thread,
+				 IRQF_ONESHOT, "AMD-Vi", iommu);
 	if (r) {
 		pci_disable_msi(iommu->dev);
 		return r;
@@ -2535,8 +2531,8 @@ static int __iommu_setup_intcapxt(struct amd_iommu *iommu, const char *devname,
 		return irq;
 	}
 
-	ret = request_threaded_irq(irq, amd_iommu_int_handler,
-				   thread_fn, 0, devname, iommu);
+	ret = request_threaded_irq(irq, NULL, thread_fn, IRQF_ONESHOT, devname,
+				   iommu);
 	if (ret) {
 		irq_domain_free_irqs(irq, 1);
 		irq_domain_remove(domain);
drivers/iommu/amd/iommu.c +0 -5
index 5d45795..bd57785 100644
@@ -1151,11 +1151,6 @@ irqreturn_t amd_iommu_int_thread(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-irqreturn_t amd_iommu_int_handler(int irq, void *data)
-{
-	return IRQ_WAKE_THREAD;
-}
-
 /****************************************************************************
  *
  * IOMMU command queuing functions
author maintainer
#7 lore raw

PATCH v2 4/20 mailbox: bcm-ferxrm-mailbox: Use default primary handler

In reply to Sebastian Andrzej Siewior

request_threaded_irq() is invoked with a primary and a secondary handler and no flags are passed. The primary handler is the same as irq_default_primary_handler() so there is no need to have an identical copy.
The lack of the IRQF_ONESHOT can be dangerous because the interrupt source is not masked while the threaded handler is active. This means, especially on LEVEL typed interrupt lines, the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

---
Cc: Jassi Brar <[email protected]>

---
 drivers/mailbox/bcm-flexrm-mailbox.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/mailbox/bcm-flexrm-mailbox.c +2 -12
index 41f79e51d9e5a..4255fefc3a5a0 100644
@@ -1173,14 +1173,6 @@ static int flexrm_debugfs_stats_show(struct seq_file *file, void *offset)
 
 /* ====== FlexRM interrupt handler ===== */
 
-static irqreturn_t flexrm_irq_event(int irq, void *dev_id)
-{
-	/* We only have MSI for completions so just wakeup IRQ thread */
-	/* Ring related errors will be informed via completion descriptors */
-
-	return IRQ_WAKE_THREAD;
-}
-
 static irqreturn_t flexrm_irq_thread(int irq, void *dev_id)
 {
 	flexrm_process_completions(dev_id);
@@ -1271,10 +1263,8 @@ static int flexrm_startup(struct mbox_chan *chan)
 		ret = -ENODEV;
 		goto fail_free_cmpl_memory;
 	}
-	ret = request_threaded_irq(ring->irq,
-				   flexrm_irq_event,
-				   flexrm_irq_thread,
-				   0, dev_name(ring->mbox->dev), ring);
+	ret = request_threaded_irq(ring->irq, NULL, flexrm_irq_thread,
+				   IRQF_ONESHOT, dev_name(ring->mbox->dev), ring);
 	if (ret) {
 		dev_err(ring->mbox->dev,
 			"failed to request ring%d IRQ\n", ring->num);
Signature · 1 line
2.51.0
#8 lore raw

[tip: irq/cleanups] mailbox: bcm-ferxrm-mailbox: Use default primary handler

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     03843d95a4a4e0ba22ad4fcda65ccf21822b104c
Gitweb:        https://git.kernel.org/tip/03843d95a4a4e0ba22ad4fcda65ccf21822b104c
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:24 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:14 +01:00

mailbox: bcm-ferxrm-mailbox: Use default primary handler

request_threaded_irq() is invoked with a primary and a secondary handler and no flags are passed. The primary handler is the same as irq_default_primary_handler() so there is no need to have an identical copy.

The lack of the IRQF_ONESHOT flag can be dangerous because the interrupt source is not masked while the threaded handler is active. This means, especially on LEVEL typed interrupt lines, the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

---
 drivers/mailbox/bcm-flexrm-mailbox.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/mailbox/bcm-flexrm-mailbox.c +2 -12
index 41f79e5..4255fef 100644
@@ -1173,14 +1173,6 @@ static int flexrm_debugfs_stats_show(struct seq_file *file, void *offset)
 
 /* ====== FlexRM interrupt handler ===== */
 
-static irqreturn_t flexrm_irq_event(int irq, void *dev_id)
-{
-	/* We only have MSI for completions so just wakeup IRQ thread */
-	/* Ring related errors will be informed via completion descriptors */
-
-	return IRQ_WAKE_THREAD;
-}
-
 static irqreturn_t flexrm_irq_thread(int irq, void *dev_id)
 {
 	flexrm_process_completions(dev_id);
@@ -1271,10 +1263,8 @@ static int flexrm_startup(struct mbox_chan *chan)
 		ret = -ENODEV;
 		goto fail_free_cmpl_memory;
 	}
-	ret = request_threaded_irq(ring->irq,
-				   flexrm_irq_event,
-				   flexrm_irq_thread,
-				   0, dev_name(ring->mbox->dev), ring);
+	ret = request_threaded_irq(ring->irq, NULL, flexrm_irq_thread,
+				   IRQF_ONESHOT, dev_name(ring->mbox->dev), ring);
 	if (ret) {
 		dev_err(ring->mbox->dev,
 			"failed to request ring%d IRQ\n", ring->num);
maintainer Applied
#9 lore raw

Re: [PATCH v2 04/20] mailbox: bcm-ferxrm-mailbox: Use default primary handler

In reply to Sebastian Andrzej Siewior
Quoted 10 lines · Sebastian Andrzej Siewior

request_threaded_irq() is invoked with a primary and a secondary handler and no flags are passed. The primary handler is the same as irq_default_primary_handler() so there is no need to have an identical copy.
The lack of the IRQF_ONESHOT can be dangerous because the interrupt source is not masked while the threaded handler is active. This means, especially on LEVEL typed interrupt lines, the interrupt can fire again before the threaded handler had a chance to run.

Quoted 5 lines

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Applied to mailbox/for-next
Thanks
Jassi

author maintainer
#10 lore raw

PATCH v2 5/20 bus: fsl-mc: Use default primary handler

In reply to Sebastian Andrzej Siewior

There is no added value in dprc_irq0_handler() compared to irq_default_primary_handler().

Use the default primary interrupt handler by specifying NULL.

---
Cc: Ioana Ciornei <[email protected]>
Cc: [email protected]

---
 drivers/bus/fsl-mc/dprc-driver.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/bus/fsl-mc/dprc-driver.c +1 -12
index c63a7e688db6a..db67442addad2 100644
@@ -380,17 +380,6 @@ int dprc_scan_container(struct fsl_mc_device *mc_bus_dev,
 }
 EXPORT_SYMBOL_GPL(dprc_scan_container);
 
-/**
- * dprc_irq0_handler - Regular ISR for DPRC interrupt 0
- *
- * @irq_num: IRQ number of the interrupt being handled
- * @arg: Pointer to device structure
- */
-static irqreturn_t dprc_irq0_handler(int irq_num, void *arg)
-{
-	return IRQ_WAKE_THREAD;
-}
-
 /**
  * dprc_irq0_handler_thread - Handler thread function for DPRC interrupt 0
  *
@@ -527,7 +516,7 @@ static int register_dprc_irq_handler(struct fsl_mc_device *mc_dev)
 	 */
 	error = devm_request_threaded_irq(&mc_dev->dev,
 					  irq->virq,
-					  dprc_irq0_handler,
+					  NULL,
 					  dprc_irq0_handler_thread,
 					  IRQF_NO_SUSPEND | IRQF_ONESHOT,
 					  dev_name(&mc_dev->dev),
Signature · 1 line
2.51.0
#11 lore raw

[tip: irq/cleanups] bus: fsl-mc: Use default primary handler

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     29d4ff55fe9866be7afa3669ff54da0e4bfd5fb8
Gitweb:        https://git.kernel.org/tip/29d4ff55fe9866be7afa3669ff54da0e4bfd5fb8
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:25 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:14 +01:00

bus: fsl-mc: Use default primary handler

There is no added value in dprc_irq0_handler() compared to irq_default_primary_handler().

Use the default primary interrupt handler by specifying NULL.

---
 drivers/bus/fsl-mc/dprc-driver.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/bus/fsl-mc/dprc-driver.c +1 -12
index c63a7e6..db67442 100644
@@ -381,17 +381,6 @@ int dprc_scan_container(struct fsl_mc_device *mc_bus_dev,
 EXPORT_SYMBOL_GPL(dprc_scan_container);
 
 /**
- * dprc_irq0_handler - Regular ISR for DPRC interrupt 0
- *
- * @irq_num: IRQ number of the interrupt being handled
- * @arg: Pointer to device structure
- */
-static irqreturn_t dprc_irq0_handler(int irq_num, void *arg)
-{
-	return IRQ_WAKE_THREAD;
-}
-
-/**
  * dprc_irq0_handler_thread - Handler thread function for DPRC interrupt 0
  *
  * @irq_num: IRQ number of the interrupt being handled
@@ -527,7 +516,7 @@ static int register_dprc_irq_handler(struct fsl_mc_device *mc_dev)
 	 */
 	error = devm_request_threaded_irq(&mc_dev->dev,
 					  irq->virq,
-					  dprc_irq0_handler,
+					  NULL,
 					  dprc_irq0_handler_thread,
 					  IRQF_NO_SUSPEND | IRQF_ONESHOT,
 					  dev_name(&mc_dev->dev),
author maintainer
#12 lore raw

PATCH v2 6/20 Bluetooth: btintel_pcie: Use IRQF_ONESHOT and default primary handler

In reply to Sebastian Andrzej Siewior

There is no added value in btintel_pcie_msix_isr() compared to irq_default_primary_handler().
Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Fixes c2b636b3f788d ("Bluetooth: btintel_pcie: Add support for PCIe transport")

---
Cc: Marcel Holtmann <[email protected]>
Cc: Luiz Augusto von Dentz <[email protected]>
Cc: [email protected]

---
 drivers/bluetooth/btintel_pcie.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/bluetooth/btintel_pcie.c +2 -7
index 2936b535479f2..704767b334b98 100644
@@ -1431,11 +1431,6 @@ static void btintel_pcie_msix_rx_handle(struct btintel_pcie_data *data)
 	}
 }
 
-static irqreturn_t btintel_pcie_msix_isr(int irq, void *data)
-{
-	return IRQ_WAKE_THREAD;
-}
-
 static inline bool btintel_pcie_is_rxq_empty(struct btintel_pcie_data *data)
 {
 	return data->ia.cr_hia[BTINTEL_PCIE_RXQ_NUM] == data->ia.cr_tia[BTINTEL_PCIE_RXQ_NUM];
@@ -1537,9 +1532,9 @@ static int btintel_pcie_setup_irq(struct btintel_pcie_data *data)
 
 		err = devm_request_threaded_irq(&data->pdev->dev,
 						msix_entry->vector,
-						btintel_pcie_msix_isr,
+						NULL,
 						btintel_pcie_irq_msix_handler,
-						IRQF_SHARED,
+						IRQF_ONESHOT | IRQF_SHARED,
 						KBUILD_MODNAME,
 						msix_entry);
 		if (err) {
Signature · 1 line
2.51.0
#13 lore raw

[tip: irq/cleanups] Bluetooth: btintel_pcie: Use IRQF_ONESHOT and default primary handler

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     28abed6569c87eab9071ab56c64433c2f0d9ce51
Gitweb:        https://git.kernel.org/tip/28abed6569c87eab9071ab56c64433c2f0d9ce51
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:26 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:14 +01:00

Bluetooth: btintel_pcie: Use IRQF_ONESHOT and default primary handler

There is no added value in btintel_pcie_msix_isr() compared to irq_default_primary_handler().

Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Fixes c2b636b3f788d ("Bluetooth: btintel_pcie: Add support for PCIe transport")
---
 drivers/bluetooth/btintel_pcie.c |  9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/bluetooth/btintel_pcie.c +2 -7
index 2936b53..704767b 100644
@@ -1431,11 +1431,6 @@ static void btintel_pcie_msix_rx_handle(struct btintel_pcie_data *data)
 	}
 }
 
-static irqreturn_t btintel_pcie_msix_isr(int irq, void *data)
-{
-	return IRQ_WAKE_THREAD;
-}
-
 static inline bool btintel_pcie_is_rxq_empty(struct btintel_pcie_data *data)
 {
 	return data->ia.cr_hia[BTINTEL_PCIE_RXQ_NUM] == data->ia.cr_tia[BTINTEL_PCIE_RXQ_NUM];
@@ -1537,9 +1532,9 @@ static int btintel_pcie_setup_irq(struct btintel_pcie_data *data)
 
 		err = devm_request_threaded_irq(&data->pdev->dev,
 						msix_entry->vector,
-						btintel_pcie_msix_isr,
+						NULL,
 						btintel_pcie_irq_msix_handler,
-						IRQF_SHARED,
+						IRQF_ONESHOT | IRQF_SHARED,
 						KBUILD_MODNAME,
 						msix_entry);
 		if (err) {
author maintainer
#14 lore raw

PATCH v2 7/20 scsi: efct: Use IRQF_ONESHOT and default primary handler

In reply to Sebastian Andrzej Siewior

There is no added value in efct_intr_msix() compared to irq_default_primary_handler().

Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Fixes 4df84e8466242 ("scsi: elx: efct: Driver initialization routines")

---
Cc: Ram Vegesna <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Martin K. Petersen <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/scsi/elx/efct/efct_driver.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/scsi/elx/efct/efct_driver.c +1 -7
index 1bd42f7db1773..528399f725d42 100644
@@ -415,12 +415,6 @@ efct_intr_thread(int irq, void *handle)
 	return IRQ_HANDLED;
 }
 
-static irqreturn_t
-efct_intr_msix(int irq, void *handle)
-{
-	return IRQ_WAKE_THREAD;
-}
-
 static int
 efct_setup_msix(struct efct *efct, u32 num_intrs)
 {
@@ -450,7 +444,7 @@ efct_setup_msix(struct efct *efct, u32 num_intrs)
 		intr_ctx->index = i;
 
 		rc = request_threaded_irq(pci_irq_vector(efct->pci, i),
-					  efct_intr_msix, efct_intr_thread, 0,
+					  NULL, efct_intr_thread, IRQF_ONESHOT,
 					  EFCT_DRIVER_NAME, intr_ctx);
 		if (rc) {
 			dev_err(&efct->pci->dev,
Signature · 1 line
2.51.0
#15 lore raw

[tip: irq/cleanups] scsi: efct: Use IRQF_ONESHOT and default primary handler

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     bd81f07e9a27c341cd7e72be95eb0b7cf3910926
Gitweb:        https://git.kernel.org/tip/bd81f07e9a27c341cd7e72be95eb0b7cf3910926
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:27 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:14 +01:00

scsi: efct: Use IRQF_ONESHOT and default primary handler

There is no added value in efct_intr_msix() compared to irq_default_primary_handler().

Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Fixes 4df84e8466242 ("scsi: elx: efct: Driver initialization routines")
---
 drivers/scsi/elx/efct/efct_driver.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/scsi/elx/efct/efct_driver.c +1 -7
index 1bd42f7..528399f 100644
@@ -415,12 +415,6 @@ efct_intr_thread(int irq, void *handle)
 	return IRQ_HANDLED;
 }
 
-static irqreturn_t
-efct_intr_msix(int irq, void *handle)
-{
-	return IRQ_WAKE_THREAD;
-}
-
 static int
 efct_setup_msix(struct efct *efct, u32 num_intrs)
 {
@@ -450,7 +444,7 @@ efct_setup_msix(struct efct *efct, u32 num_intrs)
 		intr_ctx->index = i;
 
 		rc = request_threaded_irq(pci_irq_vector(efct->pci, i),
-					  efct_intr_msix, efct_intr_thread, 0,
+					  NULL, efct_intr_thread, IRQF_ONESHOT,
 					  EFCT_DRIVER_NAME, intr_ctx);
 		if (rc) {
 			dev_err(&efct->pci->dev,
author maintainer
#16 lore raw

PATCH v2 8/20 ARM: versatile: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

Revert adding IRQF_ONESHOT to irqflags.

---
Cc: Linus Walleij <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Sudeep Holla <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Cc: [email protected]

---
 arch/arm/mach-versatile/spc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-versatile/spc.c +2 -2
index 812db32448fcd..2d27777a00d33 100644
@@ -459,8 +459,8 @@ int __init ve_spc_init(void __iomem *baseaddr, u32 a15_clusid, int irq)
 
 	readl_relaxed(info->baseaddr + PWC_STATUS);
 
-	ret = request_irq(irq, ve_spc_irq_handler, IRQF_TRIGGER_HIGH
-				| IRQF_ONESHOT, "vexpress-spc", info);
+	ret = request_irq(irq, ve_spc_irq_handler, IRQF_TRIGGER_HIGH,
+			  "vexpress-spc", info);
 	if (ret) {
 		pr_err(SPCLOG "IRQ %d request failed\n", irq);
 		kfree(info);
Signature · 1 line
2.51.0
#17 lore raw

[tip: irq/cleanups] ARM: versatile: Remove IRQF_ONESHOT

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     a82bf786500a011c0ecc63ce1511b7fc471137cd
Gitweb:        https://git.kernel.org/tip/a82bf786500a011c0ecc63ce1511b7fc471137cd
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:28 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:15 +01:00

ARM: versatile: Remove IRQF_ONESHOT

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

Revert adding IRQF_ONESHOT to irqflags.

---
 arch/arm/mach-versatile/spc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-versatile/spc.c +2 -2
index 812db32..2d27777 100644
@@ -459,8 +459,8 @@ int __init ve_spc_init(void __iomem *baseaddr, u32 a15_clusid, int irq)
 
 	readl_relaxed(info->baseaddr + PWC_STATUS);
 
-	ret = request_irq(irq, ve_spc_irq_handler, IRQF_TRIGGER_HIGH
-				| IRQF_ONESHOT, "vexpress-spc", info);
+	ret = request_irq(irq, ve_spc_irq_handler, IRQF_TRIGGER_HIGH,
+			  "vexpress-spc", info);
 	if (ret) {
 		pr_err(SPCLOG "IRQ %d request failed\n", irq);
 		kfree(info);
author maintainer
#18 lore raw

PATCH v2 9/20 char: tpm: cr50: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

---
Cc: Peter Huewe <[email protected]>
Cc: Jarkko Sakkinen <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: [email protected]

---
 drivers/char/tpm/tpm_tis_i2c_cr50.c | 3 +--
 drivers/char/tpm/tpm_tis_spi_cr50.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/char/tpm/tpm_tis_i2c_cr50.c +1 -2
index fc6891a0b6936..b48cacacc0664 100644
@@ -749,8 +749,7 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
 
 	if (client->irq > 0) {
 		rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
-				      IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
-				      IRQF_NO_AUTOEN,
+				      IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
 				      dev->driver->name, chip);
 		if (rc < 0) {
 			dev_err(dev, "Failed to probe IRQ %d\n", client->irq);
drivers/char/tpm/tpm_tis_spi_cr50.c +1 -1
index f4937280e9406..32920b4cecfb4 100644
@@ -287,7 +287,7 @@ int cr50_spi_probe(struct spi_device *spi)
 	if (spi->irq > 0) {
 		ret = devm_request_irq(&spi->dev, spi->irq,
 				       cr50_spi_irq_handler,
-				       IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+				       IRQF_TRIGGER_RISING,
 				       "cr50_spi", cr50_phy);
 		if (ret < 0) {
 			if (ret == -EPROBE_DEFER)
Signature · 1 line
2.51.0
#19 lore raw

[tip: irq/cleanups] char: tpm: cr50: Remove IRQF_ONESHOT

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     1affd29ffbd50125a5492c6be1dbb1f04be18d4f
Gitweb:        https://git.kernel.org/tip/1affd29ffbd50125a5492c6be1dbb1f04be18d4f
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:29 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:15 +01:00

char: tpm: cr50: Remove IRQF_ONESHOT

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

---
 drivers/char/tpm/tpm_tis_i2c_cr50.c | 3 +--
 drivers/char/tpm/tpm_tis_spi_cr50.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/char/tpm/tpm_tis_i2c_cr50.c +1 -2
index fc6891a..b48caca 100644
@@ -749,8 +749,7 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
 
 	if (client->irq > 0) {
 		rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
-				      IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
-				      IRQF_NO_AUTOEN,
+				      IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
 				      dev->driver->name, chip);
 		if (rc < 0) {
 			dev_err(dev, "Failed to probe IRQ %d\n", client->irq);
drivers/char/tpm/tpm_tis_spi_cr50.c +1 -1
index f493728..32920b4 100644
@@ -287,7 +287,7 @@ int cr50_spi_probe(struct spi_device *spi)
 	if (spi->irq > 0) {
 		ret = devm_request_irq(&spi->dev, spi->irq,
 				       cr50_spi_irq_handler,
-				       IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+				       IRQF_TRIGGER_RISING,
 				       "cr50_spi", cr50_phy);
 		if (ret < 0) {
 			if (ret == -EPROBE_DEFER)
author maintainer
#20 lore raw

PATCH v2 10/20 EDAC/altera: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

Fixes a29d64a45eed1 ("EDAC, altera: Add IRQ Flags to disable IRQ while handling")

---
Cc: Dinh Nguyen <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: [email protected]

---
 drivers/edac/altera_edac.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/edac/altera_edac.c +4 -7
index 0c5b94e64ea15..4edd2088c2db6 100644
@@ -1563,8 +1563,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
 		goto err_release_group_1;
 	}
 	rc = devm_request_irq(&altdev->ddev, altdev->sb_irq,
-			      prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
+			      prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
 			      ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "PortB SBERR IRQ error\n");
@@ -1587,8 +1586,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
 		goto err_release_group_1;
 	}
 	rc = devm_request_irq(&altdev->ddev, altdev->db_irq,
-			      prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
+			      prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
 			      ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "PortB DBERR IRQ error\n");
@@ -1970,8 +1968,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
 		goto err_release_group1;
 	}
 	rc = devm_request_irq(edac->dev, altdev->sb_irq, prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
-			      ecc_name, altdev);
+			      IRQF_TRIGGER_HIGH, ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "No SBERR IRQ resource\n");
 		goto err_release_group1;
@@ -1993,7 +1990,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
 		goto err_release_group1;
 	}
 	rc = devm_request_irq(edac->dev, altdev->db_irq, prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
+			      IRQF_TRIGGER_HIGH,
 			      ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "No DBERR IRQ resource\n");
Signature · 1 line
2.51.0
#21 lore raw

[tip: irq/cleanups] EDAC/altera: Remove IRQF_ONESHOT

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     5c858d6c66304b4c7579582ec5235f02d43578ea
Gitweb:        https://git.kernel.org/tip/5c858d6c66304b4c7579582ec5235f02d43578ea
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:30 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:15 +01:00

EDAC/altera: Remove IRQF_ONESHOT

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

Fixes a29d64a45eed1 ("EDAC, altera: Add IRQ Flags to disable IRQ while handling")
---
 drivers/edac/altera_edac.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/edac/altera_edac.c +4 -7
index 0c5b94e..4edd208 100644
@@ -1563,8 +1563,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
 		goto err_release_group_1;
 	}
 	rc = devm_request_irq(&altdev->ddev, altdev->sb_irq,
-			      prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
+			      prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
 			      ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "PortB SBERR IRQ error\n");
@@ -1587,8 +1586,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
 		goto err_release_group_1;
 	}
 	rc = devm_request_irq(&altdev->ddev, altdev->db_irq,
-			      prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
+			      prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
 			      ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "PortB DBERR IRQ error\n");
@@ -1970,8 +1968,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
 		goto err_release_group1;
 	}
 	rc = devm_request_irq(edac->dev, altdev->sb_irq, prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
-			      ecc_name, altdev);
+			      IRQF_TRIGGER_HIGH, ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "No SBERR IRQ resource\n");
 		goto err_release_group1;
@@ -1993,7 +1990,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
 		goto err_release_group1;
 	}
 	rc = devm_request_irq(edac->dev, altdev->db_irq, prv->ecc_irq_handler,
-			      IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
+			      IRQF_TRIGGER_HIGH,
 			      ecc_name, altdev);
 	if (rc) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "No DBERR IRQ resource\n");
author maintainer
#22 lore raw

PATCH v2 11/20 usb: typec: fusb302: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

Fixes 309b6341d5570 ("usb: typec: fusb302: Revert incorrect threaded irq fix")

---
Cc: Heikki Krogerus <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]

---
 drivers/usb/typec/tcpm/fusb302.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/typec/tcpm/fusb302.c +1 -2
index 870a71f953f6c..19ff8217818e7 100644
@@ -1756,8 +1756,7 @@ static int fusb302_probe(struct i2c_client *client)
 	}
 
 	ret = request_irq(chip->gpio_int_n_irq, fusb302_irq_intn,
-			  IRQF_ONESHOT | IRQF_TRIGGER_LOW,
-			  "fsc_interrupt_int_n", chip);
+			  IRQF_TRIGGER_LOW, "fsc_interrupt_int_n", chip);
 	if (ret < 0) {
 		dev_err(dev, "cannot request IRQ for GPIO Int_N, ret=%d", ret);
 		goto tcpm_unregister_port;
Signature · 1 line
2.51.0
#23 lore raw

[tip: irq/cleanups] usb: typec: fusb302: Remove IRQF_ONESHOT

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     a7fb84ea70aae9a92a842932206e70ed1b3c7007
Gitweb:        https://git.kernel.org/tip/a7fb84ea70aae9a92a842932206e70ed1b3c7007
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:31 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:16 +01:00

usb: typec: fusb302: Remove IRQF_ONESHOT

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

---
 drivers/usb/typec/tcpm/fusb302.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/typec/tcpm/fusb302.c +1 -2
index 870a71f..19ff821 100644
@@ -1756,8 +1756,7 @@ static int fusb302_probe(struct i2c_client *client)
 	}
 
 	ret = request_irq(chip->gpio_int_n_irq, fusb302_irq_intn,
-			  IRQF_ONESHOT | IRQF_TRIGGER_LOW,
-			  "fsc_interrupt_int_n", chip);
+			  IRQF_TRIGGER_LOW, "fsc_interrupt_int_n", chip);
 	if (ret < 0) {
 		dev_err(dev, "cannot request IRQ for GPIO Int_N, ret=%d", ret);
 		goto tcpm_unregister_port;
author maintainer
#24 lore raw

PATCH v2 12/20 rtc: amlogic-a4: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

Fixes c89ac9182ee29 ("rtc: support for the Amlogic on-chip RTC")

---
Cc: Yiting Deng <[email protected]>
Cc: Xianwei Zhao <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/rtc/rtc-amlogic-a4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-amlogic-a4.c +1 -1
index 123fb372fc9fe..50938c35af36a 100644
@@ -369,7 +369,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
 		return PTR_ERR(rtc->rtc_dev);
 
 	ret = devm_request_irq(dev, rtc->irq, aml_rtc_handler,
-			       IRQF_ONESHOT, "aml-rtc alarm", rtc);
+			       0, "aml-rtc alarm", rtc);
 	if (ret) {
 		dev_err_probe(dev, ret, "IRQ%d request failed, ret = %d\n",
 			      rtc->irq, ret);
Signature · 1 line
2.51.0
maintainer Applied
#25 lore raw

Re: (subset) [PATCH v2 12/20] rtc: amlogic-a4: Remove IRQF_ONESHOT

Quoted 8 lines · Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

[...]

Applied, thanks!

[12/20] rtc: amlogic-a4: Remove IRQF_ONESHOT

        https://git.kernel.org/abelloni/c/1932db202c93

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#26 lore raw

[tip: irq/cleanups] rtc: amlogic-a4: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     18d28446231390e4ea3634fb16200865df2c6506
Gitweb:        https://git.kernel.org/tip/18d28446231390e4ea3634fb16200865df2c6506
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:32 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:16 +01:00

rtc: amlogic-a4: Remove IRQF_ONESHOT

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

Remove IRQF_ONESHOT from irqflags.

---
 drivers/rtc/rtc-amlogic-a4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-amlogic-a4.c +1 -1
index 123fb37..50938c3 100644
@@ -369,7 +369,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
 		return PTR_ERR(rtc->rtc_dev);
 
 	ret = devm_request_irq(dev, rtc->irq, aml_rtc_handler,
-			       IRQF_ONESHOT, "aml-rtc alarm", rtc);
+			       0, "aml-rtc alarm", rtc);
 	if (ret) {
 		dev_err_probe(dev, ret, "IRQ%d request failed, ret = %d\n",
 			      rtc->irq, ret);
author maintainer
#27 lore raw

PATCH v2 13/20 thermal/qcom/lmh: Replace IRQF_ONESHOT with IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

The intention here was probably not allowing forced-threading.

Replace IRQF_ONESHOT with IRQF_NO_THREAD.

---
Cc: Amit Kucheria <[email protected]>
Cc: Thara Gopinath <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Lukasz Luba <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/thermal/qcom/lmh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/qcom/lmh.c +1 -1
index ddadcfada5136..3d072b7a4a6dd 100644
@@ -220,7 +220,7 @@ static int lmh_probe(struct platform_device *pdev)
 	/* Disable the irq and let cpufreq enable it when ready to handle the interrupt */
 	irq_set_status_flags(lmh_data->irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(dev, lmh_data->irq, lmh_handle_irq,
-			       IRQF_ONESHOT | IRQF_NO_SUSPEND,
+			       IRQF_NO_THREAD | IRQF_NO_SUSPEND,
 			       "lmh-irq", lmh_data);
 	if (ret) {
 		dev_err(dev, "Error %d registering irq %x\n", ret, lmh_data->irq);
Signature · 1 line
2.51.0
#28 lore raw

[tip: irq/cleanups] thermal/qcom/lmh: Replace IRQF_ONESHOT with IRQF_NO_THREAD

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     781b391557a74f6630d46a0813b389a8ca30b6c8
Gitweb:        https://git.kernel.org/tip/781b391557a74f6630d46a0813b389a8ca30b6c8
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:33 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:16 +01:00

thermal/qcom/lmh: Replace IRQF_ONESHOT with IRQF_NO_THREAD

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

The intention here was probably to not allow forced-threading.

Replace IRQF_ONESHOT with IRQF_NO_THREAD.

---
 drivers/thermal/qcom/lmh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/qcom/lmh.c +1 -1
index ddadcfa..3d072b7 100644
@@ -220,7 +220,7 @@ static int lmh_probe(struct platform_device *pdev)
 	/* Disable the irq and let cpufreq enable it when ready to handle the interrupt */
 	irq_set_status_flags(lmh_data->irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(dev, lmh_data->irq, lmh_handle_irq,
-			       IRQF_ONESHOT | IRQF_NO_SUSPEND,
+			       IRQF_NO_THREAD | IRQF_NO_SUSPEND,
 			       "lmh-irq", lmh_data);
 	if (ret) {
 		dev_err(dev, "Error %d registering irq %x\n", ret, lmh_data->irq);
author maintainer
#29 lore raw

PATCH v2 14/20 perf/cxlpmu: Replace IRQF_ONESHOT with IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

The intention here was probably not allowing forced-threading.

Replace IRQF_ONESHOT with IRQF_NO_THREAD.

---
Cc: Jonathan Cameron <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/perf/cxl_pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/cxl_pmu.c +1 -1
index d094030220bf2..68a54d97d2a8a 100644
@@ -877,7 +877,7 @@ static int cxl_pmu_probe(struct device *dev)
 	if (!irq_name)
 		return -ENOMEM;
 
-	rc = devm_request_irq(dev, irq, cxl_pmu_irq, IRQF_SHARED | IRQF_ONESHOT,
+	rc = devm_request_irq(dev, irq, cxl_pmu_irq, IRQF_SHARED | IRQF_NO_THREAD,
 			      irq_name, info);
 	if (rc)
 		return rc;
Signature · 1 line
2.51.0
author maintainer
#30 lore raw

PATCH v2 15/20 mfd: wm8350-core: Use IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run.

Mark explained that this should not happen with this hardware since it is a slow irqchip which is behind an I2C/ SPI bus but the IRQ-core will refuse to accept such a handler.

Set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Fixes 1c6c69525b40e ("genirq: Reject bogus threaded irq requests")

---
Cc: Lee Jones <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: [email protected]
Cc: Mark Brown <[email protected]>

---
 include/linux/mfd/wm8350/core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mfd/wm8350/core.h +1 -1
index 5f70d3b5d1b1a..097ef4dfcdac8 100644
@@ -667,7 +667,7 @@ static inline int wm8350_register_irq(struct wm8350 *wm8350, int irq,
 		return -ENODEV;
 
 	return request_threaded_irq(irq + wm8350->irq_base, NULL,
-				    handler, flags, name, data);
+				    handler, flags | IRQF_ONESHOT, name, data);
 }
 
 static inline void wm8350_free_irq(struct wm8350 *wm8350, int irq, void *data)
Signature · 1 line
2.51.0
Reviewed-by on v2 15/20
#31 lore raw

Re: [PATCH v2 15/20] mfd: wm8350-core: Use IRQF_ONESHOT

Quoted 11 lines · Sebastian Andrzej Siewior

Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run.

Mark explained that this should not happen with this hardware since it is a slow irqchip which is behind an I2C/ SPI bus but the IRQ-core will refuse to accept such a handler.

Set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#32 lore raw

[tip: irq/cleanups] mfd: wm8350-core: Use IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     553b4999cbe231b5011cb8db05a3092dec168aca
Gitweb:        https://git.kernel.org/tip/553b4999cbe231b5011cb8db05a3092dec168aca
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:35 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:16 +01:00

mfd: wm8350-core: Use IRQF_ONESHOT

Using a threaded interrupt without a dedicated primary handler mandates the IRQF_ONESHOT flag to mask the interrupt source while the threaded handler is active. Otherwise the interrupt can fire again before the threaded handler had a chance to run.

Mark explained that this should not happen with this hardware since it is a slow irqchip which is behind an I2C/ SPI bus but the IRQ-core will refuse to accept such a handler.

Set IRQF_ONESHOT so the interrupt source is masked until the secondary handler is done.

---
 include/linux/mfd/wm8350/core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mfd/wm8350/core.h +1 -1
index 5f70d3b..097ef4d 100644
@@ -667,7 +667,7 @@ static inline int wm8350_register_irq(struct wm8350 *wm8350, int irq,
 		return -ENODEV;
 
 	return request_threaded_irq(irq + wm8350->irq_base, NULL,
-				    handler, flags, name, data);
+				    handler, flags | IRQF_ONESHOT, name, data);
 }
 
 static inline void wm8350_free_irq(struct wm8350 *wm8350, int irq, void *data)
author maintainer
#33 lore raw

PATCH v2 16/20 iio: Use IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior

The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handler and this supposed to happen from within the hardirq.

Use IRQF_NO_THREAD to forbid forced-threading.

---
Cc: Jonathan Cameron <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Nuno Sá <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Michael Hennerich <[email protected]>
Cc: [email protected]

---
 drivers/iio/accel/bma180.c        | 5 +++--
 drivers/iio/adc/ad7766.c          | 2 +-
 drivers/iio/gyro/itg3200_buffer.c | 8 +++-----
 drivers/iio/light/si1145.c        | 2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)
drivers/iio/accel/bma180.c +3 -2
index 8925f5279e627..7bc6761f51354 100644
@@ -986,8 +986,9 @@ static int bma180_probe(struct i2c_client *client)
 		}
 
 		ret = devm_request_irq(dev, client->irq,
-			iio_trigger_generic_data_rdy_poll, IRQF_TRIGGER_RISING,
-			"bma180_event", data->trig);
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       "bma180_event", data->trig);
 		if (ret) {
 			dev_err(dev, "unable to request IRQ\n");
 			goto err_trigger_free;
drivers/iio/adc/ad7766.c +1 -1
index 4d570383ef025..1e6bfe8765ab3 100644
@@ -261,7 +261,7 @@ static int ad7766_probe(struct spi_device *spi)
 		 * don't enable the interrupt to avoid extra load on the system
 		 */
 		ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq,
-				       IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
+				       IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD,
 				       dev_name(&spi->dev),
 				       ad7766->trig);
 		if (ret < 0)
drivers/iio/gyro/itg3200_buffer.c +3 -5
index a624400a239cb..cf97adfa97274 100644
@@ -118,11 +118,9 @@ int itg3200_probe_trigger(struct iio_dev *indio_dev)
 	if (!st->trig)
 		return -ENOMEM;
 
-	ret = request_irq(st->i2c->irq,
-			  &iio_trigger_generic_data_rdy_poll,
-			  IRQF_TRIGGER_RISING,
-			  "itg3200_data_rdy",
-			  st->trig);
+	ret = request_irq(st->i2c->irq, &iio_trigger_generic_data_rdy_poll,
+			  IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+			  "itg3200_data_rdy", st->trig);
 	if (ret)
 		goto error_free_trig;
 
drivers/iio/light/si1145.c +1 -1
index f8eb251eca8dc..ef0abc4499b74 100644
@@ -1248,7 +1248,7 @@ static int si1145_probe_trigger(struct iio_dev *indio_dev)
 
 	ret = devm_request_irq(&client->dev, client->irq,
 			  iio_trigger_generic_data_rdy_poll,
-			  IRQF_TRIGGER_FALLING,
+			  IRQF_TRIGGER_FALLING | IRQF_NO_THREAD,
 			  "si1145_irq",
 			  trig);
 	if (ret < 0) {
Signature · 1 line
2.51.0
Reviewed-by on v2 16/20
#34 lore raw

Re: [PATCH v2 16/20] iio: Use IRQF_NO_THREAD

Quoted 5 lines · Sebastian Andrzej Siewior

The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handler and this supposed to happen from within the hardirq.

Use IRQF_NO_THREAD to forbid forced-threading.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Applied
#35 lore raw

Re: [PATCH v2 16/20] iio: Use IRQF_NO_THREAD

Quoted 9 lines · On Wed, 28 Jan 2026 15:03:06 +0200 Andy Shevchenko…
Quoted 5 lines · Sebastian Andrzej Siewior

The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handler and this supposed to happen from within the hardirq.

Use IRQF_NO_THREAD to forbid forced-threading.

Applied.

Thanks for fixing these up.

Jonathan

#36 lore raw

[tip: irq/cleanups] iio: Use IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     ff8fd3753999718f1305b16c438f50f10cbd375a
Gitweb:        https://git.kernel.org/tip/ff8fd3753999718f1305b16c438f50f10cbd375a
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:36 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:17 +01:00

iio: Use IRQF_NO_THREAD

The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handlers and this os supposed to happen from within the hard interrupt.

Use IRQF_NO_THREAD to forbid forced-threading.

---
 drivers/iio/accel/bma180.c        | 5 +++--
 drivers/iio/adc/ad7766.c          | 2 +-
 drivers/iio/gyro/itg3200_buffer.c | 8 +++-----
 drivers/iio/light/si1145.c        | 2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)
drivers/iio/accel/bma180.c +3 -2
index 8925f52..7bc6761 100644
@@ -986,8 +986,9 @@ static int bma180_probe(struct i2c_client *client)
 		}
 
 		ret = devm_request_irq(dev, client->irq,
-			iio_trigger_generic_data_rdy_poll, IRQF_TRIGGER_RISING,
-			"bma180_event", data->trig);
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       "bma180_event", data->trig);
 		if (ret) {
 			dev_err(dev, "unable to request IRQ\n");
 			goto err_trigger_free;
drivers/iio/adc/ad7766.c +1 -1
index 4d57038..1e6bfe8 100644
@@ -261,7 +261,7 @@ static int ad7766_probe(struct spi_device *spi)
 		 * don't enable the interrupt to avoid extra load on the system
 		 */
 		ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq,
-				       IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
+				       IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD,
 				       dev_name(&spi->dev),
 				       ad7766->trig);
 		if (ret < 0)
drivers/iio/gyro/itg3200_buffer.c +3 -5
index a624400..cf97adf 100644
@@ -118,11 +118,9 @@ int itg3200_probe_trigger(struct iio_dev *indio_dev)
 	if (!st->trig)
 		return -ENOMEM;
 
-	ret = request_irq(st->i2c->irq,
-			  &iio_trigger_generic_data_rdy_poll,
-			  IRQF_TRIGGER_RISING,
-			  "itg3200_data_rdy",
-			  st->trig);
+	ret = request_irq(st->i2c->irq, &iio_trigger_generic_data_rdy_poll,
+			  IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+			  "itg3200_data_rdy", st->trig);
 	if (ret)
 		goto error_free_trig;
 
drivers/iio/light/si1145.c +1 -1
index f8eb251..ef0abc4 100644
@@ -1248,7 +1248,7 @@ static int si1145_probe_trigger(struct iio_dev *indio_dev)
 
 	ret = devm_request_irq(&client->dev, client->irq,
 			  iio_trigger_generic_data_rdy_poll,
-			  IRQF_TRIGGER_FALLING,
+			  IRQF_TRIGGER_FALLING | IRQF_NO_THREAD,
 			  "si1145_irq",
 			  trig);
 	if (ret < 0) {
author maintainer
#37 lore raw

PATCH v2 17/20 iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

The intention here was probably not allowing forced-threading for handlers such as iio_trigger_generic_data_rdy_poll() will intends to invoke hard-interrupt handlers.

Replace IRQF_ONESHOT with IRQF_NO_THREAD.

---
Cc: Lars-Peter Clausen <[email protected]>
Cc: Michael Hennerich <[email protected]>
Cc: Puranjay Mohan <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Nuno Sá <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Marcelo Schmitt <[email protected]>
Cc: Marcus Folkesson <[email protected]>
Cc: Kent Gustavsson <[email protected]>
Cc: Gustavo Silva <[email protected]>
Cc: Nishant Malpani <[email protected]>
Cc: [email protected]

---
 drivers/iio/accel/adxl355_core.c       |  5 ++---
 drivers/iio/accel/adxl372.c            |  9 ++++-----
 drivers/iio/accel/mxc4005.c            | 11 ++++-------
 drivers/iio/accel/stk8ba50.c           | 11 ++++-------
 drivers/iio/adc/ad4170-4.c             |  2 +-
 drivers/iio/adc/ad7768-1.c             |  5 ++---
 drivers/iio/adc/ad7779.c               |  2 +-
 drivers/iio/adc/mcp3911.c              |  2 +-
 drivers/iio/adc/ti-ads131e08.c         |  2 +-
 drivers/iio/chemical/ens160_core.c     |  9 +++------
 drivers/iio/gyro/adxrs290.c            |  2 +-
 drivers/iio/health/afe4403.c           |  9 ++++-----
 drivers/iio/health/afe4404.c           |  9 ++++-----
 drivers/iio/magnetometer/bmc150_magn.c |  9 +++------
 drivers/iio/pressure/dlhl60d.c         |  7 +++----
 drivers/iio/temperature/tmp006.c       | 10 ++++------
 16 files changed, 42 insertions(+), 62 deletions(-)
drivers/iio/accel/adxl355_core.c +2 -3
index 5fc7f814b9077..1c1d64d5cbcb2 100644
@@ -768,9 +768,8 @@ static int adxl355_probe_trigger(struct iio_dev *indio_dev, int irq)
 	data->dready_trig->ops = &adxl355_trigger_ops;
 	iio_trigger_set_drvdata(data->dready_trig, indio_dev);
 
-	ret = devm_request_irq(data->dev, irq,
-			       &iio_trigger_generic_data_rdy_poll,
-			       IRQF_ONESHOT, "adxl355_irq", data->dready_trig);
+	ret = devm_request_irq(data->dev, irq, &iio_trigger_generic_data_rdy_poll,
+			       IRQF_NO_THREAD, "adxl355_irq", data->dready_trig);
 	if (ret)
 		return dev_err_probe(data->dev, ret, "request irq %d failed\n",
 				     irq);
drivers/iio/accel/adxl372.c +4 -5
index 46d518a2a0291..2f6aa52aeba51 100644
@@ -1247,11 +1247,10 @@ int adxl372_probe(struct device *dev, struct regmap *regmap,
 
 		indio_dev->trig = iio_trigger_get(st->dready_trig);
 
-		ret = devm_request_threaded_irq(dev, st->irq,
-					iio_trigger_generic_data_rdy_poll,
-					NULL,
-					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
-					indio_dev->name, st->dready_trig);
+		ret = devm_request_irq(dev, st->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       indio_dev->name, st->dready_trig);
 		if (ret < 0)
 			return ret;
 	}
drivers/iio/accel/mxc4005.c +4 -7
index ac973d871c8bb..a2c3cf13d0981 100644
@@ -486,13 +486,10 @@ static int mxc4005_probe(struct i2c_client *client)
 		if (!data->dready_trig)
 			return -ENOMEM;
 
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL,
-						IRQF_TRIGGER_FALLING |
-						IRQF_ONESHOT,
-						"mxc4005_event",
-						data->dready_trig);
+		ret = devm_request_irq(&client->dev, client->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_TRIGGER_FALLING | IRQF_NO_THREAD,
+				       "mxc4005_event", data->dready_trig);
 		if (ret) {
 			dev_err(&client->dev,
 				"failed to init threaded irq\n");
drivers/iio/accel/stk8ba50.c +4 -7
index 384f1fbcbcb37..a9ff2a273fe1c 100644
@@ -428,13 +428,10 @@ static int stk8ba50_probe(struct i2c_client *client)
 	}
 
 	if (client->irq > 0) {
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-						stk8ba50_data_rdy_trig_poll,
-						NULL,
-						IRQF_TRIGGER_RISING |
-						IRQF_ONESHOT,
-						"stk8ba50_event",
-						indio_dev);
+		ret = devm_request_irq(&client->dev, client->irq,
+				       stk8ba50_data_rdy_trig_poll,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       "stk8ba50_event", indio_dev);
 		if (ret < 0) {
 			dev_err(&client->dev, "request irq %d failed\n",
 				client->irq);
drivers/iio/adc/ad4170-4.c +1 -1
index efaed92191f1b..82205bfae531e 100644
@@ -2973,7 +2973,7 @@ static int ad4170_probe(struct spi_device *spi)
 
 	if (spi->irq) {
 		ret = devm_request_irq(dev, spi->irq, &ad4170_irq_handler,
-				       IRQF_ONESHOT, indio_dev->name, indio_dev);
+				       IRQF_NO_THREAD, indio_dev->name, indio_dev);
 		if (ret)
 			return ret;
 
drivers/iio/adc/ad7768-1.c +2 -3
index d96802b7847a6..84ce23c8e5782 100644
@@ -1394,9 +1394,8 @@ static int ad7768_probe(struct spi_device *spi)
 	if (ret)
 		return ret;
 
-	ret = devm_request_irq(&spi->dev, spi->irq,
-			       &ad7768_interrupt,
-			       IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+	ret = devm_request_irq(&spi->dev, spi->irq, &ad7768_interrupt,
+			       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
 			       indio_dev->name, indio_dev);
 	if (ret)
 		return ret;
drivers/iio/adc/ad7779.c +1 -1
index aac5049c9a07b..695cc79e78da5 100644
@@ -840,7 +840,7 @@ static int ad7779_setup_without_backend(struct ad7779_state *st, struct iio_dev
 	iio_trigger_set_drvdata(st->trig, st);
 
 	ret = devm_request_irq(dev, st->spi->irq, iio_trigger_generic_data_rdy_poll,
-			       IRQF_ONESHOT | IRQF_NO_AUTOEN, indio_dev->name,
+			       IRQF_NO_THREAD | IRQF_NO_AUTOEN, indio_dev->name,
 			       st->trig);
 	if (ret)
 		return dev_err_probe(dev, ret, "request IRQ %d failed\n",
drivers/iio/adc/mcp3911.c +1 -1
index a6f21791c6859..ddc3721f3f688 100644
@@ -815,7 +815,7 @@ static int mcp3911_probe(struct spi_device *spi)
 		 * don't enable the interrupt to avoid extra load on the system.
 		 */
 		ret = devm_request_irq(dev, spi->irq, &iio_trigger_generic_data_rdy_poll,
-				       IRQF_NO_AUTOEN | IRQF_ONESHOT,
+				       IRQF_NO_AUTOEN | IRQF_NO_THREAD,
 				       indio_dev->name, adc->trig);
 		if (ret)
 			return ret;
drivers/iio/adc/ti-ads131e08.c +1 -1
index c9a20024d6b11..a585621b0bc30 100644
@@ -827,7 +827,7 @@ static int ads131e08_probe(struct spi_device *spi)
 	if (spi->irq) {
 		ret = devm_request_irq(&spi->dev, spi->irq,
 			ads131e08_interrupt,
-			IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+			IRQF_TRIGGER_FALLING | IRQF_NO_THREAD,
 			spi->dev.driver->name, indio_dev);
 		if (ret)
 			return dev_err_probe(&spi->dev, ret,
drivers/iio/chemical/ens160_core.c +3 -6
index 86bde4a91bf7e..bbc96c4c62838 100644
@@ -316,12 +316,9 @@ static int ens160_setup_trigger(struct iio_dev *indio_dev, int irq)
 
 	indio_dev->trig = iio_trigger_get(trig);
 
-	ret = devm_request_threaded_irq(dev, irq,
-					iio_trigger_generic_data_rdy_poll,
-					NULL,
-					IRQF_ONESHOT,
-					indio_dev->name,
-					indio_dev->trig);
+	ret = devm_request_irq(dev, irq, iio_trigger_generic_data_rdy_poll,
+			       IRQF_NO_THREAD, indio_dev->name,
+			       indio_dev->trig);
 	if (ret)
 		return dev_err_probe(dev, ret, "failed to request irq\n");
 
drivers/iio/gyro/adxrs290.c +1 -1
index 8fcb41f45baac..3efe385ebedc4 100644
@@ -597,7 +597,7 @@ static int adxrs290_probe_trigger(struct iio_dev *indio_dev)
 
 	ret = devm_request_irq(&st->spi->dev, st->spi->irq,
 			       &iio_trigger_generic_data_rdy_poll,
-			       IRQF_ONESHOT, "adxrs290_irq", st->dready_trig);
+			       IRQF_NO_THREAD, "adxrs290_irq", st->dready_trig);
 	if (ret < 0)
 		return dev_err_probe(&st->spi->dev, ret,
 				     "request irq %d failed\n", st->spi->irq);
drivers/iio/health/afe4403.c +4 -5
index 0e5a512e3bb8f..d358f4d5e5da8 100644
@@ -540,11 +540,10 @@ static int afe4403_probe(struct spi_device *spi)
 			return ret;
 		}
 
-		ret = devm_request_threaded_irq(dev, afe->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL, IRQF_ONESHOT,
-						AFE4403_DRIVER_NAME,
-						afe->trig);
+		ret = devm_request_irq(dev, afe->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_NO_THREAD, AFE4403_DRIVER_NAME,
+				       afe->trig);
 		if (ret) {
 			dev_err(dev, "Unable to request IRQ\n");
 			return ret;
drivers/iio/health/afe4404.c +4 -5
index 768d794e574b9..032da52a96d0e 100644
@@ -547,11 +547,10 @@ static int afe4404_probe(struct i2c_client *client)
 			return ret;
 		}
 
-		ret = devm_request_threaded_irq(dev, afe->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL, IRQF_ONESHOT,
-						AFE4404_DRIVER_NAME,
-						afe->trig);
+		ret = devm_request_irq(dev, afe->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_NO_THREAD, AFE4404_DRIVER_NAME,
+				       afe->trig);
 		if (ret) {
 			dev_err(dev, "Unable to request IRQ\n");
 			return ret;
drivers/iio/magnetometer/bmc150_magn.c +3 -6
index 6a73f6e2f1f06..a022e1805dff7 100644
@@ -906,12 +906,9 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap,
 			goto err_poweroff;
 		}
 
-		ret = request_threaded_irq(irq,
-					   iio_trigger_generic_data_rdy_poll,
-					   NULL,
-					   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
-					   "bmc150_magn_event",
-					   data->dready_trig);
+		ret = request_irq(irq, iio_trigger_generic_data_rdy_poll,
+				  IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				  "bmc150_magn_event", data->dready_trig);
 		if (ret < 0) {
 			dev_err(dev, "request irq %d failed\n", irq);
 			goto err_trigger_unregister;
drivers/iio/pressure/dlhl60d.c +3 -4
index 8bad7162fec64..46feb27fe632f 100644
@@ -306,10 +306,9 @@ static int dlh_probe(struct i2c_client *client)
 	indio_dev->num_channels = ARRAY_SIZE(dlh_channels);
 
 	if (client->irq > 0) {
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-			dlh_interrupt, NULL,
-			IRQF_TRIGGER_RISING | IRQF_ONESHOT,
-			st->info->name, indio_dev);
+		ret = devm_request_irq(&client->dev, client->irq, dlh_interrupt,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       st->info->name, indio_dev);
 		if (ret) {
 			dev_err(&client->dev, "failed to allocate threaded irq");
 			return ret;
drivers/iio/temperature/tmp006.c +4 -6
index 10bd3f221929d..d8d8c8936d177 100644
@@ -356,12 +356,10 @@ static int tmp006_probe(struct i2c_client *client)
 
 		indio_dev->trig = iio_trigger_get(data->drdy_trig);
 
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL,
-						IRQF_ONESHOT,
-						"tmp006_irq",
-						data->drdy_trig);
+		ret = devm_request_irq(&client->dev, client->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_NO_THREAD, "tmp006_irq",
+				       data->drdy_trig);
 		if (ret < 0)
 			return ret;
 	}
Signature · 1 line
2.51.0
maintainer Applied
#38 lore raw

Re: [PATCH v2 17/20] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD

Quoted 11 lines · On Wed, 28 Jan 2026 10:55:37 +0100 Sebastian Andrzej Siewior…

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.

The intention here was probably not allowing forced-threading for handlers such as iio_trigger_generic_data_rdy_poll() will intends to invoke hard-interrupt handlers.

Quoted 5 lines

Replace IRQF_ONESHOT with IRQF_NO_THREAD.

Applied

Thanks.

#39 lore raw

[tip: irq/cleanups] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     c04731b5f1502e619dec24a8005fbbcbb8cd0e50
Gitweb:        https://git.kernel.org/tip/c04731b5f1502e619dec24a8005fbbcbb8cd0e50
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:37 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:17 +01:00

iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

The intention here was probably not allowing forced-threading for handlers such as iio_trigger_generic_data_rdy_poll().

Replace IRQF_ONESHOT with IRQF_NO_THREAD.

---
 drivers/iio/accel/adxl355_core.c       |  5 ++---
 drivers/iio/accel/adxl372.c            |  9 ++++-----
 drivers/iio/accel/mxc4005.c            | 11 ++++-------
 drivers/iio/accel/stk8ba50.c           | 11 ++++-------
 drivers/iio/adc/ad4170-4.c             |  2 +-
 drivers/iio/adc/ad7768-1.c             |  5 ++---
 drivers/iio/adc/ad7779.c               |  2 +-
 drivers/iio/adc/mcp3911.c              |  2 +-
 drivers/iio/adc/ti-ads131e08.c         |  2 +-
 drivers/iio/chemical/ens160_core.c     |  9 +++------
 drivers/iio/gyro/adxrs290.c            |  2 +-
 drivers/iio/health/afe4403.c           |  9 ++++-----
 drivers/iio/health/afe4404.c           |  9 ++++-----
 drivers/iio/magnetometer/bmc150_magn.c |  9 +++------
 drivers/iio/pressure/dlhl60d.c         |  7 +++----
 drivers/iio/temperature/tmp006.c       | 10 ++++------
 16 files changed, 42 insertions(+), 62 deletions(-)
drivers/iio/accel/adxl355_core.c +2 -3
index 5fc7f81..1c1d64d 100644
@@ -768,9 +768,8 @@ static int adxl355_probe_trigger(struct iio_dev *indio_dev, int irq)
 	data->dready_trig->ops = &adxl355_trigger_ops;
 	iio_trigger_set_drvdata(data->dready_trig, indio_dev);
 
-	ret = devm_request_irq(data->dev, irq,
-			       &iio_trigger_generic_data_rdy_poll,
-			       IRQF_ONESHOT, "adxl355_irq", data->dready_trig);
+	ret = devm_request_irq(data->dev, irq, &iio_trigger_generic_data_rdy_poll,
+			       IRQF_NO_THREAD, "adxl355_irq", data->dready_trig);
 	if (ret)
 		return dev_err_probe(data->dev, ret, "request irq %d failed\n",
 				     irq);
drivers/iio/accel/adxl372.c +4 -5
index 46d518a..2f6aa52 100644
@@ -1247,11 +1247,10 @@ int adxl372_probe(struct device *dev, struct regmap *regmap,
 
 		indio_dev->trig = iio_trigger_get(st->dready_trig);
 
-		ret = devm_request_threaded_irq(dev, st->irq,
-					iio_trigger_generic_data_rdy_poll,
-					NULL,
-					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
-					indio_dev->name, st->dready_trig);
+		ret = devm_request_irq(dev, st->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       indio_dev->name, st->dready_trig);
 		if (ret < 0)
 			return ret;
 	}
drivers/iio/accel/mxc4005.c +4 -7
index ac973d8..a2c3cf1 100644
@@ -486,13 +486,10 @@ static int mxc4005_probe(struct i2c_client *client)
 		if (!data->dready_trig)
 			return -ENOMEM;
 
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL,
-						IRQF_TRIGGER_FALLING |
-						IRQF_ONESHOT,
-						"mxc4005_event",
-						data->dready_trig);
+		ret = devm_request_irq(&client->dev, client->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_TRIGGER_FALLING | IRQF_NO_THREAD,
+				       "mxc4005_event", data->dready_trig);
 		if (ret) {
 			dev_err(&client->dev,
 				"failed to init threaded irq\n");
drivers/iio/accel/stk8ba50.c +4 -7
index 384f1fb..a9ff2a2 100644
@@ -428,13 +428,10 @@ static int stk8ba50_probe(struct i2c_client *client)
 	}
 
 	if (client->irq > 0) {
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-						stk8ba50_data_rdy_trig_poll,
-						NULL,
-						IRQF_TRIGGER_RISING |
-						IRQF_ONESHOT,
-						"stk8ba50_event",
-						indio_dev);
+		ret = devm_request_irq(&client->dev, client->irq,
+				       stk8ba50_data_rdy_trig_poll,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       "stk8ba50_event", indio_dev);
 		if (ret < 0) {
 			dev_err(&client->dev, "request irq %d failed\n",
 				client->irq);
drivers/iio/adc/ad4170-4.c +1 -1
index efaed92..82205bf 100644
@@ -2973,7 +2973,7 @@ static int ad4170_probe(struct spi_device *spi)
 
 	if (spi->irq) {
 		ret = devm_request_irq(dev, spi->irq, &ad4170_irq_handler,
-				       IRQF_ONESHOT, indio_dev->name, indio_dev);
+				       IRQF_NO_THREAD, indio_dev->name, indio_dev);
 		if (ret)
 			return ret;
 
drivers/iio/adc/ad7768-1.c +2 -3
index d96802b..84ce23c 100644
@@ -1394,9 +1394,8 @@ static int ad7768_probe(struct spi_device *spi)
 	if (ret)
 		return ret;
 
-	ret = devm_request_irq(&spi->dev, spi->irq,
-			       &ad7768_interrupt,
-			       IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+	ret = devm_request_irq(&spi->dev, spi->irq, &ad7768_interrupt,
+			       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
 			       indio_dev->name, indio_dev);
 	if (ret)
 		return ret;
drivers/iio/adc/ad7779.c +1 -1
index aac5049..695cc79 100644
@@ -840,7 +840,7 @@ static int ad7779_setup_without_backend(struct ad7779_state *st, struct iio_dev 
 	iio_trigger_set_drvdata(st->trig, st);
 
 	ret = devm_request_irq(dev, st->spi->irq, iio_trigger_generic_data_rdy_poll,
-			       IRQF_ONESHOT | IRQF_NO_AUTOEN, indio_dev->name,
+			       IRQF_NO_THREAD | IRQF_NO_AUTOEN, indio_dev->name,
 			       st->trig);
 	if (ret)
 		return dev_err_probe(dev, ret, "request IRQ %d failed\n",
drivers/iio/adc/mcp3911.c +1 -1
index a6f2179..ddc3721 100644
@@ -815,7 +815,7 @@ static int mcp3911_probe(struct spi_device *spi)
 		 * don't enable the interrupt to avoid extra load on the system.
 		 */
 		ret = devm_request_irq(dev, spi->irq, &iio_trigger_generic_data_rdy_poll,
-				       IRQF_NO_AUTOEN | IRQF_ONESHOT,
+				       IRQF_NO_AUTOEN | IRQF_NO_THREAD,
 				       indio_dev->name, adc->trig);
 		if (ret)
 			return ret;
drivers/iio/adc/ti-ads131e08.c +1 -1
index c9a2002..a585621 100644
@@ -827,7 +827,7 @@ static int ads131e08_probe(struct spi_device *spi)
 	if (spi->irq) {
 		ret = devm_request_irq(&spi->dev, spi->irq,
 			ads131e08_interrupt,
-			IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+			IRQF_TRIGGER_FALLING | IRQF_NO_THREAD,
 			spi->dev.driver->name, indio_dev);
 		if (ret)
 			return dev_err_probe(&spi->dev, ret,
drivers/iio/chemical/ens160_core.c +3 -6
index 86bde4a..bbc96c4 100644
@@ -316,12 +316,9 @@ static int ens160_setup_trigger(struct iio_dev *indio_dev, int irq)
 
 	indio_dev->trig = iio_trigger_get(trig);
 
-	ret = devm_request_threaded_irq(dev, irq,
-					iio_trigger_generic_data_rdy_poll,
-					NULL,
-					IRQF_ONESHOT,
-					indio_dev->name,
-					indio_dev->trig);
+	ret = devm_request_irq(dev, irq, iio_trigger_generic_data_rdy_poll,
+			       IRQF_NO_THREAD, indio_dev->name,
+			       indio_dev->trig);
 	if (ret)
 		return dev_err_probe(dev, ret, "failed to request irq\n");
 
drivers/iio/gyro/adxrs290.c +1 -1
index 8fcb41f..3efe385 100644
@@ -597,7 +597,7 @@ static int adxrs290_probe_trigger(struct iio_dev *indio_dev)
 
 	ret = devm_request_irq(&st->spi->dev, st->spi->irq,
 			       &iio_trigger_generic_data_rdy_poll,
-			       IRQF_ONESHOT, "adxrs290_irq", st->dready_trig);
+			       IRQF_NO_THREAD, "adxrs290_irq", st->dready_trig);
 	if (ret < 0)
 		return dev_err_probe(&st->spi->dev, ret,
 				     "request irq %d failed\n", st->spi->irq);
drivers/iio/health/afe4403.c +4 -5
index 0e5a512..d358f4d 100644
@@ -540,11 +540,10 @@ static int afe4403_probe(struct spi_device *spi)
 			return ret;
 		}
 
-		ret = devm_request_threaded_irq(dev, afe->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL, IRQF_ONESHOT,
-						AFE4403_DRIVER_NAME,
-						afe->trig);
+		ret = devm_request_irq(dev, afe->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_NO_THREAD, AFE4403_DRIVER_NAME,
+				       afe->trig);
 		if (ret) {
 			dev_err(dev, "Unable to request IRQ\n");
 			return ret;
drivers/iio/health/afe4404.c +4 -5
index 768d794..032da52 100644
@@ -547,11 +547,10 @@ static int afe4404_probe(struct i2c_client *client)
 			return ret;
 		}
 
-		ret = devm_request_threaded_irq(dev, afe->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL, IRQF_ONESHOT,
-						AFE4404_DRIVER_NAME,
-						afe->trig);
+		ret = devm_request_irq(dev, afe->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_NO_THREAD, AFE4404_DRIVER_NAME,
+				       afe->trig);
 		if (ret) {
 			dev_err(dev, "Unable to request IRQ\n");
 			return ret;
drivers/iio/magnetometer/bmc150_magn.c +3 -6
index 6a73f6e..a022e18 100644
@@ -906,12 +906,9 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap,
 			goto err_poweroff;
 		}
 
-		ret = request_threaded_irq(irq,
-					   iio_trigger_generic_data_rdy_poll,
-					   NULL,
-					   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
-					   "bmc150_magn_event",
-					   data->dready_trig);
+		ret = request_irq(irq, iio_trigger_generic_data_rdy_poll,
+				  IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				  "bmc150_magn_event", data->dready_trig);
 		if (ret < 0) {
 			dev_err(dev, "request irq %d failed\n", irq);
 			goto err_trigger_unregister;
drivers/iio/pressure/dlhl60d.c +3 -4
index 8bad716..46feb27 100644
@@ -306,10 +306,9 @@ static int dlh_probe(struct i2c_client *client)
 	indio_dev->num_channels = ARRAY_SIZE(dlh_channels);
 
 	if (client->irq > 0) {
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-			dlh_interrupt, NULL,
-			IRQF_TRIGGER_RISING | IRQF_ONESHOT,
-			st->info->name, indio_dev);
+		ret = devm_request_irq(&client->dev, client->irq, dlh_interrupt,
+				       IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
+				       st->info->name, indio_dev);
 		if (ret) {
 			dev_err(&client->dev, "failed to allocate threaded irq");
 			return ret;
drivers/iio/temperature/tmp006.c +4 -6
index 10bd3f2..d8d8c89 100644
@@ -356,12 +356,10 @@ static int tmp006_probe(struct i2c_client *client)
 
 		indio_dev->trig = iio_trigger_get(data->drdy_trig);
 
-		ret = devm_request_threaded_irq(&client->dev, client->irq,
-						iio_trigger_generic_data_rdy_poll,
-						NULL,
-						IRQF_ONESHOT,
-						"tmp006_irq",
-						data->drdy_trig);
+		ret = devm_request_irq(&client->dev, client->irq,
+				       iio_trigger_generic_data_rdy_poll,
+				       IRQF_NO_THREAD, "tmp006_irq",
+				       data->drdy_trig);
 		if (ret < 0)
 			return ret;
 	}
author maintainer
#40 lore raw

PATCH v2 18/20 iio: magnetometer: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.
The force-threading functionality is required on PREEMPT_RT because the handler is using locks with can sleep on PREEMPT_RT.

Remove IRQF_ONESHOT from irqflags.

---
Cc: Jonathan Cameron <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Nuno Sá <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: [email protected]

---
 drivers/iio/magnetometer/ak8975.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/magnetometer/ak8975.c +1 -1
index 3fd0171e5d69b..d30315ad85ded 100644
@@ -581,7 +581,7 @@ static int ak8975_setup_irq(struct ak8975_data *data)
 		irq = gpiod_to_irq(data->eoc_gpiod);
 
 	rc = devm_request_irq(&client->dev, irq, ak8975_irq_handler,
-			      IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+			      IRQF_TRIGGER_RISING,
 			      dev_name(&client->dev), data);
 	if (rc < 0) {
 		dev_err(&client->dev, "irq %d request failed: %d\n", irq, rc);
Signature · 1 line
2.51.0
Reviewed-by on v2 18/20
#41 lore raw

Re: [PATCH v2 18/20] iio: magnetometer: Remove IRQF_ONESHOT

Quoted 10 lines · Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.
The force-threading functionality is required on PREEMPT_RT because the handler is using locks with can sleep on PREEMPT_RT.

Remove IRQF_ONESHOT from irqflags.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Applied
#42 lore raw

Re: [PATCH v2 18/20] iio: magnetometer: Remove IRQF_ONESHOT

Quoted 10 lines · On Wed, 28 Jan 2026 15:04:30 +0200 Andy Shevchenko…
Quoted 9 lines · Sebastian Andrzej Siewior

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.
The flag also disallows force-threading of the primary handler and the irq-core will warn about this.
The force-threading functionality is required on PREEMPT_RT because the handler is using locks with can sleep on PREEMPT_RT.

Quoted 4 lines
Quoted 1 line

Remove IRQF_ONESHOT from irqflags.

Applied.
Thanks

#43 lore raw

[tip: irq/cleanups] iio: magnetometer: Remove IRQF_ONESHOT

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     25974af8028aa638f33ef46cb9ae6a9b4206aa49
Gitweb:        https://git.kernel.org/tip/25974af8028aa638f33ef46cb9ae6a9b4206aa49
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:38 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:17 +01:00

iio: magnetometer: Remove IRQF_ONESHOT

Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running.

The flag also prevents force-threading of the primary handler and the irq-core will warn about this.

The force-threading functionality is required on PREEMPT_RT because the handler is using locks with can sleep on PREEMPT_RT.

Remove IRQF_ONESHOT from irqflags.

---
 drivers/iio/magnetometer/ak8975.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/magnetometer/ak8975.c +1 -1
index 3fd0171..d30315a 100644
@@ -581,7 +581,7 @@ static int ak8975_setup_irq(struct ak8975_data *data)
 		irq = gpiod_to_irq(data->eoc_gpiod);
 
 	rc = devm_request_irq(&client->dev, irq, ak8975_irq_handler,
-			      IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+			      IRQF_TRIGGER_RISING,
 			      dev_name(&client->dev), data);
 	if (rc < 0) {
 		dev_err(&client->dev, "irq %d request failed: %d\n", irq, rc);
author maintainer
#44 lore raw

PATCH v2 19/20 iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()

In reply to Sebastian Andrzej Siewior

ad7766_irq() is identical to iio_trigger_generic_data_rdy_poll().

Use iio_trigger_generic_data_rdy_poll() instead of ad7766_irq().

---
Cc: Lars-Peter Clausen <[email protected]>
Cc: Michael Hennerich <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: David Lechner <[email protected]>
Cc: "Nuno Sá" <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: [email protected]

---
 drivers/iio/adc/ad7766.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/iio/adc/ad7766.c +1 -7
index 1e6bfe8765ab3..9e4a66477d2d0 100644
@@ -184,12 +184,6 @@ static const struct iio_info ad7766_info = {
 	.read_raw = &ad7766_read_raw,
 };
 
-static irqreturn_t ad7766_irq(int irq, void *private)
-{
-	iio_trigger_poll(private);
-	return IRQ_HANDLED;
-}
-
 static int ad7766_set_trigger_state(struct iio_trigger *trig, bool enable)
 {
 	struct ad7766 *ad7766 = iio_trigger_get_drvdata(trig);
@@ -260,7 +254,7 @@ static int ad7766_probe(struct spi_device *spi)
 		 * Some platforms might not allow the option to power it down so
 		 * don't enable the interrupt to avoid extra load on the system
 		 */
-		ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq,
+		ret = devm_request_irq(&spi->dev, spi->irq, iio_trigger_generic_data_rdy_poll,
 				       IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD,
 				       dev_name(&spi->dev),
 				       ad7766->trig);
Signature · 1 line
2.51.0
Reviewed-by on v2 19/20
#45 lore raw

Re: [PATCH v2 19/20] iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()

Quoted 3 lines · Sebastian Andrzej Siewior

ad7766_irq() is identical to iio_trigger_generic_data_rdy_poll().

Use iio_trigger_generic_data_rdy_poll() instead of ad7766_irq().

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Applied
#46 lore raw

Re: [PATCH v2 19/20] iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()

Quoted 7 lines · On Wed, 28 Jan 2026 15:05:37 +0200 Andy Shevchenko…
Quoted 3 lines · Sebastian Andrzej Siewior

ad7766_irq() is identical to iio_trigger_generic_data_rdy_poll().

Use iio_trigger_generic_data_rdy_poll() instead of ad7766_irq().

Applied.

Thanks,

Jonathan

#47 lore raw

[tip: irq/cleanups] iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     44c9ec4096cdfd18a84f30d011482914ff73c66b
Gitweb:        https://git.kernel.org/tip/44c9ec4096cdfd18a84f30d011482914ff73c66b
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:39 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:17 +01:00

iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()

ad7766_irq() is identical to iio_trigger_generic_data_rdy_poll().

Use iio_trigger_generic_data_rdy_poll() instead of ad7766_irq().

---
 drivers/iio/adc/ad7766.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/iio/adc/ad7766.c +1 -7
index 1e6bfe8..9e4a664 100644
@@ -184,12 +184,6 @@ static const struct iio_info ad7766_info = {
 	.read_raw = &ad7766_read_raw,
 };
 
-static irqreturn_t ad7766_irq(int irq, void *private)
-{
-	iio_trigger_poll(private);
-	return IRQ_HANDLED;
-}
-
 static int ad7766_set_trigger_state(struct iio_trigger *trig, bool enable)
 {
 	struct ad7766 *ad7766 = iio_trigger_get_drvdata(trig);
@@ -260,7 +254,7 @@ static int ad7766_probe(struct spi_device *spi)
 		 * Some platforms might not allow the option to power it down so
 		 * don't enable the interrupt to avoid extra load on the system
 		 */
-		ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq,
+		ret = devm_request_irq(&spi->dev, spi->irq, iio_trigger_generic_data_rdy_poll,
 				       IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD,
 				       dev_name(&spi->dev),
 				       ad7766->trig);
author maintainer
#48 lore raw

PATCH v2 20/20 media: pci: mg4b: Use IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior

The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handler and this supposed to happen from within the hardirq.

Use IRQF_NO_THREAD to forbid forced-threading.

Fixes 0ab13674a9bd1 ("media: pci: mgb4: Added Digiteq Automotive MGB4 driver")

---
Cc: Martin Tuma <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]

---
 drivers/media/pci/mgb4/mgb4_trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/mgb4/mgb4_trigger.c +1 -1
index 4f9a35904b418..70cad324df608 100644
@@ -115,7 +115,7 @@ static int probe_trigger(struct iio_dev *indio_dev, int irq)
 	if (!st->trig)
 		return -ENOMEM;
 
-	ret = request_irq(irq, &iio_trigger_generic_data_rdy_poll, 0,
+	ret = request_irq(irq, &iio_trigger_generic_data_rdy_poll, IRQF_NO_THREAD,
 			  "mgb4-trigger", st->trig);
 	if (ret)
 		goto error_free_trig;
Signature · 1 line
2.51.0
#49 lore raw

[tip: irq/cleanups] media: pci: mg4b: Use IRQF_NO_THREAD

The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     8b8a7a56a9a2eb7c8995df7073b1a19852edea97
Gitweb:        https://git.kernel.org/tip/8b8a7a56a9a2eb7c8995df7073b1a19852edea97
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:40 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sun, 01 Feb 2026 17:37:18 +01:00

media: pci: mg4b: Use IRQF_NO_THREAD

The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handlers and this supposed to happen from hard interrupt context.

Use IRQF_NO_THREAD to forbid forced-threading.

Fixes 0ab13674a9bd1 ("media: pci: mgb4: Added Digiteq Automotive MGB4 driver")
---
 drivers/media/pci/mgb4/mgb4_trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/mgb4/mgb4_trigger.c +1 -1
index 4f9a359..70cad32 100644
@@ -115,7 +115,7 @@ static int probe_trigger(struct iio_dev *indio_dev, int irq)
 	if (!st->trig)
 		return -ENOMEM;
 
-	ret = request_irq(irq, &iio_trigger_generic_data_rdy_poll, 0,
+	ret = request_irq(irq, &iio_trigger_generic_data_rdy_poll, IRQF_NO_THREAD,
 			  "mgb4-trigger", st->trig);
 	if (ret)
 		goto error_free_trig;
#50 lore raw

[tip: irq/cleanups] media: pci: mg4b: Use IRQF_NO_THREAD

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the irq/cleanups branch of tip:

The following commit has been merged into the irq/cleanups branch of tip:

Commit-ID:     ef92b98f5f6758a049898b53aa30476010db04fa
Gitweb:        https://git.kernel.org/tip/ef92b98f5f6758a049898b53aa30476010db04fa
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 28 Jan 2026 10:55:40 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Tue, 03 Feb 2026 09:20:55 +01:00

media: pci: mg4b: Use IRQF_NO_THREAD

The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handlers and this supposed to happen from hard interrupt context.

Use IRQF_NO_THREAD to forbid forced-threading.

Fixes 0ab13674a9bd1 ("media: pci: mgb4: Added Digiteq Automotive MGB4 driver")
---
 drivers/media/pci/mgb4/mgb4_trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/mgb4/mgb4_trigger.c +1 -1
index 4f9a359..70cad32 100644
@@ -115,7 +115,7 @@ static int probe_trigger(struct iio_dev *indio_dev, int irq)
 	if (!st->trig)
 		return -ENOMEM;
 
-	ret = request_irq(irq, &iio_trigger_generic_data_rdy_poll, 0,
+	ret = request_irq(irq, &iio_trigger_generic_data_rdy_poll, IRQF_NO_THREAD,
 			  "mgb4-trigger", st->trig);
 	if (ret)
 		goto error_free_trig;
maintainer
#52 lore raw
In reply to Sebastian Andrzej Siewior
Quoted 8 lines · Sebastian Andrzej Siewior

There was a bug report about setting IRQF_ONESHOT where it should have not been set. I looked around for other mistakes in that area. There are the following categories:

- Using custom primary irq handler doing exactly what irq_default_primary_handler() does

[...]

Applied the CXL PMU patch to will (for-next/perf), thanks!

[14/20] perf/cxlpmu: Replace IRQF_ONESHOT with IRQF_NO_THREAD

        https://git.kernel.org/will/c/ab26d9c85554

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev