[PATCH] genirq: Allow NULL affinity for setup_percpu_irq()
From: Marc Zyngier
Date: Fri Dec 05 2025 - 04:18:19 EST
setup_percpu_irq() was forgotten when the percpu_devid infrastructure
was updated to deal with CPU affinities.
In order to keep ignoring users of this legacy API, provide sensible
defaults by setting the affinity to cpu_online_mask if none was
provided by the caller.
Reported-by: Daniel Thompson <danielt@xxxxxxxxxx>
Closes: https://lore.kernel.org/r/aTFozefMQRg7lYxh@xxxxxxxxx
Fixes: bdf4e2ac295fe ("genirq: Allow per-cpu interrupt sharing for non-overlapping affinities")
Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
---
kernel/irq/manage.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0bb29316b4362..8b1b4c8a4f54c 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -2470,6 +2470,9 @@ int setup_percpu_irq(unsigned int irq, struct irqaction *act)
if (retval < 0)
return retval;
+ if (!act->affinity)
+ act->affinity = cpu_online_mask;
+
retval = __setup_irq(irq, desc, act);
if (retval)
--
2.47.3