public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/21] IRQF_ONESHOT clean up
@ 2026-01-23 11:36 Sebastian Andrzej Siewior
  2026-01-23 11:36 ` [PATCH 01/21] genirq: Set IRQF_COND_ONESHOT in devm_request_irq() Sebastian Andrzej Siewior
                   ` (22 more replies)
  0 siblings, 23 replies; 75+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-01-23 11:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-rt-devel, Thomas Gleixner, Sebastian Andrzej Siewior,
	Alexandre Belloni, Amit Kucheria, Andi Shyti, Andy Shevchenko,
	Andy Shevchenko, Borislav Petkov, Daniel Lezcano, David Lechner,
	Dinh Nguyen, Greg Kroah-Hartman, Gustavo Silva, Hans de Goede,
	Heikki Krogerus, Ilpo Järvinen, Ioana Ciornei,
	James E.J. Bottomley, Jarkko Sakkinen, Jaroslav Kysela,
	Jason Gunthorpe, Jassi Brar, Joerg Roedel, Jonathan Cameron,
	Jonathan Cameron, Kent Gustavsson, Lars-Peter Clausen, Lee Jones,
	Liam Girdwood, Linus Walleij, Liviu Dudau, Lorenzo Pieralisi,
	Luiz Augusto von Dentz, Lukasz Luba, Marcel Holtmann,
	Marcelo Schmitt, Marcus Folkesson, Mark Brown, Mark Rutland,
	Martin K. Petersen, Martin Tuma, Mauro Carvalho Chehab,
	Michael Hennerich, Nishant Malpani, Nuno Sá, Oder Chiou,
	Peter Huewe, Puranjay Mohan, Rafael J. Wysocki, Ram Vegesna,
	Sudeep Holla, Suravee Suthikulpanit, Takashi Iwai, Thara Gopinath,
	Tony Luck, Troy Mitchell, Will Deacon, Xianwei Zhao, Yiting Deng,
	Yixun Lan, Zhang Rui

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).

Sebastian Andrzej Siewior (21):
  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
  i2c: spacemit: Remove IRQF_ONESHOT
  ASoC: codecs: rt56*: 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: Replace IRQF_ONESHOT with IRQF_NO_THREAD
  iio: Use IRQF_NO_THREAD
  iio: magnetometer: Remove IRQF_ONESHOT
  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/i2c/busses/i2c-k1.c                |  2 +-
 drivers/iio/accel/adxl355_core.c           |  3 ++-
 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          |  2 +-
 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             |  6 +++---
 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 +-
 sound/soc/codecs/rt5640.c                  |  4 ++--
 sound/soc/codecs/rt5651.c                  |  2 +-
 sound/soc/codecs/rt5663.c                  |  4 ++--
 44 files changed, 83 insertions(+), 152 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2026-02-08  2:03 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 11:36 [PATCH 00/21] IRQF_ONESHOT clean up Sebastian Andrzej Siewior
2026-01-23 11:36 ` [PATCH 01/21] genirq: Set IRQF_COND_ONESHOT in devm_request_irq() Sebastian Andrzej Siewior
2026-01-23 11:36 ` [PATCH 02/21] platform/x86: int0002: Remove IRQF_ONESHOT from request_irq() Sebastian Andrzej Siewior
2026-01-23 11:49   ` Sebastian Andrzej Siewior
2026-01-26 14:05     ` Ilpo Järvinen
2026-01-24 10:21   ` Hans de Goede
2026-01-23 11:36 ` [PATCH 03/21] iommu/amd: Use core's primary handler and set IRQF_ONESHOT Sebastian Andrzej Siewior
2026-01-23 11:36 ` [PATCH 04/21] mailbox: bcm-ferxrm-mailbox: Use default primary handler Sebastian Andrzej Siewior
2026-01-23 11:36 ` [PATCH 05/21] bus: fsl-mc: " Sebastian Andrzej Siewior
2026-01-23 14:28   ` Ioana Ciornei
2026-01-23 11:36 ` [PATCH 06/21] Bluetooth: btintel_pcie: Use IRQF_ONESHOT and " Sebastian Andrzej Siewior
2026-01-23 11:36 ` [PATCH 07/21] scsi: efct: " Sebastian Andrzej Siewior
2026-02-04  3:02   ` Martin K. Petersen
2026-01-23 11:36 ` [PATCH 08/21] ARM: versatile: Remove IRQF_ONESHOT Sebastian Andrzej Siewior
2026-01-23 15:26   ` Sudeep Holla
2026-01-27  9:42   ` Linus Walleij
2026-01-23 11:36 ` [PATCH 09/21] char: tpm: cr50: " Sebastian Andrzej Siewior
2026-01-25 16:50   ` Jarkko Sakkinen
2026-01-27 15:45     ` Sebastian Andrzej Siewior
2026-01-28 23:17       ` Jarkko Sakkinen
2026-01-23 11:36 ` [PATCH 10/21] EDAC/altera: " Sebastian Andrzej Siewior
2026-01-23 11:36 ` [PATCH 11/21] i2c: spacemit: " Sebastian Andrzej Siewior
2026-01-23 20:53   ` Yixun Lan
2026-01-26  4:21   ` patchwork-bot+linux-riscv
2026-01-23 11:36 ` [PATCH 12/21] ASoC: codecs: rt56*: " Sebastian Andrzej Siewior
2026-01-23 11:36 ` [PATCH 13/21] usb: typec: fusb302: " Sebastian Andrzej Siewior
2026-01-23 16:07   ` Greg Kroah-Hartman
2026-01-26 14:21   ` Heikki Krogerus
2026-01-23 11:37 ` [PATCH 14/21] rtc: amlogic-a4: " Sebastian Andrzej Siewior
2026-01-26  6:05   ` Xianwei Zhao
2026-01-23 11:37 ` [PATCH 15/21] thermal/qcom/lmh: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior
2026-01-23 11:37 ` [PATCH 16/21] perf/cxlpmu: " Sebastian Andrzej Siewior
2026-01-23 12:05   ` Jonathan Cameron
2026-01-23 11:37 ` [PATCH 17/21] mfd: wm8350-core: Use IRQF_ONESHOT Sebastian Andrzej Siewior
2026-01-23 14:52   ` Andy Shevchenko
2026-01-26  8:01     ` Sebastian Andrzej Siewior
2026-01-26  9:46       ` Andy Shevchenko
2026-01-26  9:56         ` Sebastian Andrzej Siewior
2026-01-26 10:05           ` Andy Shevchenko
2026-01-26 10:13             ` Sebastian Andrzej Siewior
2026-01-26 11:22               ` Andy Shevchenko
2026-01-26 11:28                 ` Andy Shevchenko
2026-01-26  9:32   ` Charles Keepax
2026-01-23 11:37 ` [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior
2026-01-23 14:48   ` Andy Shevchenko
2026-01-23 16:47     ` Jonathan Cameron
2026-01-23 21:00       ` David Lechner
2026-01-26  8:15     ` Sebastian Andrzej Siewior
2026-01-26  9:51       ` Andy Shevchenko
2026-01-26 10:10         ` Sebastian Andrzej Siewior
2026-01-26 11:01           ` Andy Shevchenko
2026-01-26 14:29             ` Konstantin Ryabitsev
2026-01-26 14:57               ` Andy Shevchenko
2026-01-26 15:09                 ` Konstantin Ryabitsev
2026-01-26 15:16                   ` Andy Shevchenko
2026-01-28 10:45               ` Nuno Sá
2026-01-28 13:53                 ` Konstantin Ryabitsev
2026-01-28 10:07             ` Sebastian Andrzej Siewior
2026-01-28 10:15               ` Andy Shevchenko
2026-01-26 10:53   ` Marcus Folkesson
2026-01-28 11:39   ` Nuno Sá
2026-01-23 11:37 ` [PATCH 19/21] iio: Use IRQF_NO_THREAD Sebastian Andrzej Siewior
2026-01-23 14:50   ` Andy Shevchenko
2026-01-26  9:25     ` Sebastian Andrzej Siewior
2026-01-23 20:56   ` David Lechner
2026-01-26  8:09     ` Sebastian Andrzej Siewior
2026-01-26 16:34       ` David Lechner
2026-01-23 11:37 ` [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT Sebastian Andrzej Siewior
2026-01-23 14:51   ` Andy Shevchenko
2026-01-27 19:37   ` Geert Uytterhoeven
2026-01-28 11:40   ` Nuno Sá
2026-01-28 12:34     ` Andy Shevchenko
2026-01-23 11:37 ` [PATCH 21/21] media: pci: mg4b: Use IRQF_NO_THREAD Sebastian Andrzej Siewior
2026-01-26 18:45 ` (subset) [PATCH 00/21] IRQF_ONESHOT clean up Mark Brown
2026-02-08  2:01 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox