Skip to content

Commit 4e21e58

Browse files
committed
Merge tag 'irq-cleanups-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq cleanups from Thomas Gleixner: "A series of treewide cleanups to ensure interrupt request consistency. - Add the missing IRQF_COND_ONESHOT flag to devm_request_irq() This is inconsistent vs request_irq() and causes the same issues which where addressed with the introduction of this flag - Cleanup IRQF_ONESHOT and IRQF_NO_THREAD usage Quite some drivers have inconsistent interrupt request flags related to interrupt threading namely IRQF_ONESHOT and IRQF_NO_THREAD. This leads to warnings and/or malfunction when forced interrupt threading is enabled. - Remove stub primary (hard interrupt) handlers A bunch of drivers implement a stub primary (hard interrupt) handler which just returns IRQ_WAKE_THREAD. The same functionality is provided by the core code when the primary handler argument of request_thread_irq() is set to NULL" * tag 'irq-cleanups-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: media: pci: mg4b: Use IRQF_NO_THREAD mfd: wm8350-core: Use IRQF_ONESHOT thermal/qcom/lmh: Replace IRQF_ONESHOT with IRQF_NO_THREAD rtc: amlogic-a4: Remove IRQF_ONESHOT usb: typec: fusb302: Remove IRQF_ONESHOT EDAC/altera: Remove IRQF_ONESHOT char: tpm: cr50: Remove IRQF_ONESHOT ARM: versatile: Remove IRQF_ONESHOT scsi: efct: Use IRQF_ONESHOT and default primary handler Bluetooth: btintel_pcie: Use IRQF_ONESHOT and default primary handler bus: fsl-mc: Use default primary handler mailbox: bcm-ferxrm-mailbox: Use default primary handler iommu/amd: Use core's primary handler and set IRQF_ONESHOT platform/x86: int0002: Remove IRQF_ONESHOT from request_irq() genirq: Set IRQF_COND_ONESHOT in devm_request_irq().
2 parents a4d963b + ef92b98 commit 4e21e58

18 files changed

Lines changed: 26 additions & 73 deletions

File tree

arch/arm/mach-versatile/spc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ int __init ve_spc_init(void __iomem *baseaddr, u32 a15_clusid, int irq)
459459

460460
readl_relaxed(info->baseaddr + PWC_STATUS);
461461

462-
ret = request_irq(irq, ve_spc_irq_handler, IRQF_TRIGGER_HIGH
463-
| IRQF_ONESHOT, "vexpress-spc", info);
462+
ret = request_irq(irq, ve_spc_irq_handler, IRQF_TRIGGER_HIGH,
463+
"vexpress-spc", info);
464464
if (ret) {
465465
pr_err(SPCLOG "IRQ %d request failed\n", irq);
466466
kfree(info);

drivers/bluetooth/btintel_pcie.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,11 +1431,6 @@ static void btintel_pcie_msix_rx_handle(struct btintel_pcie_data *data)
14311431
}
14321432
}
14331433

1434-
static irqreturn_t btintel_pcie_msix_isr(int irq, void *data)
1435-
{
1436-
return IRQ_WAKE_THREAD;
1437-
}
1438-
14391434
static inline bool btintel_pcie_is_rxq_empty(struct btintel_pcie_data *data)
14401435
{
14411436
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)
15371532

15381533
err = devm_request_threaded_irq(&data->pdev->dev,
15391534
msix_entry->vector,
1540-
btintel_pcie_msix_isr,
1535+
NULL,
15411536
btintel_pcie_irq_msix_handler,
1542-
IRQF_SHARED,
1537+
IRQF_ONESHOT | IRQF_SHARED,
15431538
KBUILD_MODNAME,
15441539
msix_entry);
15451540
if (err) {

drivers/bus/fsl-mc/dprc-driver.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,17 +380,6 @@ int dprc_scan_container(struct fsl_mc_device *mc_bus_dev,
380380
}
381381
EXPORT_SYMBOL_GPL(dprc_scan_container);
382382

383-
/**
384-
* dprc_irq0_handler - Regular ISR for DPRC interrupt 0
385-
*
386-
* @irq_num: IRQ number of the interrupt being handled
387-
* @arg: Pointer to device structure
388-
*/
389-
static irqreturn_t dprc_irq0_handler(int irq_num, void *arg)
390-
{
391-
return IRQ_WAKE_THREAD;
392-
}
393-
394383
/**
395384
* dprc_irq0_handler_thread - Handler thread function for DPRC interrupt 0
396385
*
@@ -527,7 +516,7 @@ static int register_dprc_irq_handler(struct fsl_mc_device *mc_dev)
527516
*/
528517
error = devm_request_threaded_irq(&mc_dev->dev,
529518
irq->virq,
530-
dprc_irq0_handler,
519+
NULL,
531520
dprc_irq0_handler_thread,
532521
IRQF_NO_SUSPEND | IRQF_ONESHOT,
533522
dev_name(&mc_dev->dev),

drivers/char/tpm/tpm_tis_i2c_cr50.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,7 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
749749

750750
if (client->irq > 0) {
751751
rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
752-
IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
753-
IRQF_NO_AUTOEN,
752+
IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
754753
dev->driver->name, chip);
755754
if (rc < 0) {
756755
dev_err(dev, "Failed to probe IRQ %d\n", client->irq);

drivers/char/tpm/tpm_tis_spi_cr50.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ int cr50_spi_probe(struct spi_device *spi)
287287
if (spi->irq > 0) {
288288
ret = devm_request_irq(&spi->dev, spi->irq,
289289
cr50_spi_irq_handler,
290-
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
290+
IRQF_TRIGGER_RISING,
291291
"cr50_spi", cr50_phy);
292292
if (ret < 0) {
293293
if (ret == -EPROBE_DEFER)

drivers/edac/altera_edac.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,8 +1563,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
15631563
goto err_release_group_1;
15641564
}
15651565
rc = devm_request_irq(&altdev->ddev, altdev->sb_irq,
1566-
prv->ecc_irq_handler,
1567-
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
1566+
prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
15681567
ecc_name, altdev);
15691568
if (rc) {
15701569
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)
15871586
goto err_release_group_1;
15881587
}
15891588
rc = devm_request_irq(&altdev->ddev, altdev->db_irq,
1590-
prv->ecc_irq_handler,
1591-
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
1589+
prv->ecc_irq_handler, IRQF_TRIGGER_HIGH,
15921590
ecc_name, altdev);
15931591
if (rc) {
15941592
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,
19701968
goto err_release_group1;
19711969
}
19721970
rc = devm_request_irq(edac->dev, altdev->sb_irq, prv->ecc_irq_handler,
1973-
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
1974-
ecc_name, altdev);
1971+
IRQF_TRIGGER_HIGH, ecc_name, altdev);
19751972
if (rc) {
19761973
edac_printk(KERN_ERR, EDAC_DEVICE, "No SBERR IRQ resource\n");
19771974
goto err_release_group1;
@@ -1993,7 +1990,7 @@ static int altr_edac_a10_device_add(struct altr_arria10_edac *edac,
19931990
goto err_release_group1;
19941991
}
19951992
rc = devm_request_irq(edac->dev, altdev->db_irq, prv->ecc_irq_handler,
1996-
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
1993+
IRQF_TRIGGER_HIGH,
19971994
ecc_name, altdev);
19981995
if (rc) {
19991996
edac_printk(KERN_ERR, EDAC_DEVICE, "No DBERR IRQ resource\n");

drivers/iommu/amd/amd_iommu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ irqreturn_t amd_iommu_int_thread(int irq, void *data);
1515
irqreturn_t amd_iommu_int_thread_evtlog(int irq, void *data);
1616
irqreturn_t amd_iommu_int_thread_pprlog(int irq, void *data);
1717
irqreturn_t amd_iommu_int_thread_galog(int irq, void *data);
18-
irqreturn_t amd_iommu_int_handler(int irq, void *data);
1918
void amd_iommu_restart_log(struct amd_iommu *iommu, const char *evt_type,
2019
u8 cntrl_intr, u8 cntrl_log,
2120
u32 status_run_mask, u32 status_overflow_mask);

drivers/iommu/amd/init.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2356,12 +2356,8 @@ static int iommu_setup_msi(struct amd_iommu *iommu)
23562356
if (r)
23572357
return r;
23582358

2359-
r = request_threaded_irq(iommu->dev->irq,
2360-
amd_iommu_int_handler,
2361-
amd_iommu_int_thread,
2362-
0, "AMD-Vi",
2363-
iommu);
2364-
2359+
r = request_threaded_irq(iommu->dev->irq, NULL, amd_iommu_int_thread,
2360+
IRQF_ONESHOT, "AMD-Vi", iommu);
23652361
if (r) {
23662362
pci_disable_msi(iommu->dev);
23672363
return r;
@@ -2535,8 +2531,8 @@ static int __iommu_setup_intcapxt(struct amd_iommu *iommu, const char *devname,
25352531
return irq;
25362532
}
25372533

2538-
ret = request_threaded_irq(irq, amd_iommu_int_handler,
2539-
thread_fn, 0, devname, iommu);
2534+
ret = request_threaded_irq(irq, NULL, thread_fn, IRQF_ONESHOT, devname,
2535+
iommu);
25402536
if (ret) {
25412537
irq_domain_free_irqs(irq, 1);
25422538
irq_domain_remove(domain);

drivers/iommu/amd/iommu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,11 +1151,6 @@ irqreturn_t amd_iommu_int_thread(int irq, void *data)
11511151
return IRQ_HANDLED;
11521152
}
11531153

1154-
irqreturn_t amd_iommu_int_handler(int irq, void *data)
1155-
{
1156-
return IRQ_WAKE_THREAD;
1157-
}
1158-
11591154
/****************************************************************************
11601155
*
11611156
* IOMMU command queuing functions

drivers/mailbox/bcm-flexrm-mailbox.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,14 +1173,6 @@ static int flexrm_debugfs_stats_show(struct seq_file *file, void *offset)
11731173

11741174
/* ====== FlexRM interrupt handler ===== */
11751175

1176-
static irqreturn_t flexrm_irq_event(int irq, void *dev_id)
1177-
{
1178-
/* We only have MSI for completions so just wakeup IRQ thread */
1179-
/* Ring related errors will be informed via completion descriptors */
1180-
1181-
return IRQ_WAKE_THREAD;
1182-
}
1183-
11841176
static irqreturn_t flexrm_irq_thread(int irq, void *dev_id)
11851177
{
11861178
flexrm_process_completions(dev_id);
@@ -1271,10 +1263,8 @@ static int flexrm_startup(struct mbox_chan *chan)
12711263
ret = -ENODEV;
12721264
goto fail_free_cmpl_memory;
12731265
}
1274-
ret = request_threaded_irq(ring->irq,
1275-
flexrm_irq_event,
1276-
flexrm_irq_thread,
1277-
0, dev_name(ring->mbox->dev), ring);
1266+
ret = request_threaded_irq(ring->irq, NULL, flexrm_irq_thread,
1267+
IRQF_ONESHOT, dev_name(ring->mbox->dev), ring);
12781268
if (ret) {
12791269
dev_err(ring->mbox->dev,
12801270
"failed to request ring%d IRQ\n", ring->num);

0 commit comments

Comments
 (0)