Skip to content

Commit 89acaa5

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
genirq: Allow NULL affinity for setup_percpu_irq()
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. Fixes: bdf4e2a ("genirq: Allow per-cpu interrupt sharing for non-overlapping affinities") Reported-by: Daniel Thompson <danielt@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://patch.msgid.link/20251205091814.3944205-1-maz@kernel.org Closes: https://lore.kernel.org/r/aTFozefMQRg7lYxh@aspen.lan
1 parent cb01581 commit 89acaa5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

kernel/irq/manage.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2470,6 +2470,9 @@ int setup_percpu_irq(unsigned int irq, struct irqaction *act)
24702470
if (retval < 0)
24712471
return retval;
24722472

2473+
if (!act->affinity)
2474+
act->affinity = cpu_online_mask;
2475+
24732476
retval = __setup_irq(irq, desc, act);
24742477

24752478
if (retval)

0 commit comments

Comments
 (0)