Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 5dad262

Browse files
committed
Merge tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov: - Fix an unused function warning on irqchip/irq-armada-370-xp - Fix the IRQ sharing with pinctrl-amd and ACPI OSL * tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/armada-370-xp: Suppress unused-function warning genirq: Introduce IRQF_COND_ONESHOT and use it in pinctrl-amd
2 parents 448f828 + 9e81e32 commit 5dad262

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

drivers/irqchip/irq-armada-370-xp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static int armada_370_xp_msi_init(struct device_node *node,
316316
return 0;
317317
}
318318
#else
319-
static void armada_370_xp_msi_reenable_percpu(void) {}
319+
static __maybe_unused void armada_370_xp_msi_reenable_percpu(void) {}
320320

321321
static inline int armada_370_xp_msi_init(struct device_node *node,
322322
phys_addr_t main_int_phys_base)

drivers/pinctrl/pinctrl-amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
11591159
}
11601160

11611161
ret = devm_request_irq(&pdev->dev, gpio_dev->irq, amd_gpio_irq_handler,
1162-
IRQF_SHARED | IRQF_ONESHOT, KBUILD_MODNAME, gpio_dev);
1162+
IRQF_SHARED | IRQF_COND_ONESHOT, KBUILD_MODNAME, gpio_dev);
11631163
if (ret)
11641164
goto out2;
11651165

include/linux/interrupt.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
* later.
6868
* IRQF_NO_DEBUG - Exclude from runnaway detection for IPI and similar handlers,
6969
* depends on IRQF_PERCPU.
70+
* IRQF_COND_ONESHOT - Agree to do IRQF_ONESHOT if already set for a shared
71+
* interrupt.
7072
*/
7173
#define IRQF_SHARED 0x00000080
7274
#define IRQF_PROBE_SHARED 0x00000100
@@ -82,6 +84,7 @@
8284
#define IRQF_COND_SUSPEND 0x00040000
8385
#define IRQF_NO_AUTOEN 0x00080000
8486
#define IRQF_NO_DEBUG 0x00100000
87+
#define IRQF_COND_ONESHOT 0x00200000
8588

8689
#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
8790

kernel/irq/manage.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,8 +1643,13 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
16431643
}
16441644

16451645
if (!((old->flags & new->flags) & IRQF_SHARED) ||
1646-
(oldtype != (new->flags & IRQF_TRIGGER_MASK)) ||
1647-
((old->flags ^ new->flags) & IRQF_ONESHOT))
1646+
(oldtype != (new->flags & IRQF_TRIGGER_MASK)))
1647+
goto mismatch;
1648+
1649+
if ((old->flags & IRQF_ONESHOT) &&
1650+
(new->flags & IRQF_COND_ONESHOT))
1651+
new->flags |= IRQF_ONESHOT;
1652+
else if ((old->flags ^ new->flags) & IRQF_ONESHOT)
16481653
goto mismatch;
16491654

16501655
/* All handlers must agree on per-cpuness */

0 commit comments

Comments
 (0)