summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-03-31 11:04:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-03-31 11:04:51 -0700
commit5dad26235c4adde4199c7750c696fd729e5020ae (patch)
treebbf305ccac077b8f5156eb502cd67687b92453c8 /kernel
parent448f828feb495c93fc78f5bb15716968a64fe6f8 (diff)
parent9e81e329508576b499b5c47ab106b5fa45ce96d9 (diff)
downloadlinux-stable-5dad26235c4adde4199c7750c696fd729e5020ae.tar.gz
linux-stable-5dad26235c4adde4199c7750c696fd729e5020ae.tar.bz2
linux-stable-5dad26235c4adde4199c7750c696fd729e5020ae.zip
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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/manage.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index ad3eaf2ab959..bf9ae8a8686f 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1643,8 +1643,13 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
}
if (!((old->flags & new->flags) & IRQF_SHARED) ||
- (oldtype != (new->flags & IRQF_TRIGGER_MASK)) ||
- ((old->flags ^ new->flags) & IRQF_ONESHOT))
+ (oldtype != (new->flags & IRQF_TRIGGER_MASK)))
+ goto mismatch;
+
+ if ((old->flags & IRQF_ONESHOT) &&
+ (new->flags & IRQF_COND_ONESHOT))
+ new->flags |= IRQF_ONESHOT;
+ else if ((old->flags ^ new->flags) & IRQF_ONESHOT)
goto mismatch;
/* All handlers must agree on per-cpuness */