Skip to content

Commit edbbaae

Browse files
shayshyiKAGA-KOKO
authored andcommitted
genirq/irqdesc: Honor caller provided affinity in alloc_desc()
Currently, whenever a caller is providing an affinity hint for an interrupt, the allocation code uses it to calculate the node and copies the cpumask into irq_desc::affinity. If the affinity for the interrupt is not marked 'managed' then the startup of the interrupt ignores irq_desc::affinity and uses the system default affinity mask. Prevent this by setting the IRQD_AFFINITY_SET flag for the interrupt in the allocator, which causes irq_setup_affinity() to use irq_desc::affinity on interrupt startup if the mask contains an online CPU. [ tglx: Massaged changelog ] Fixes: 45ddcec ("genirq: Use affinity hint in irqdesc allocation") Signed-off-by: Shay Drory <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent de9c2c6 commit edbbaae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/irq/irqdesc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ static int alloc_descs(unsigned int start, unsigned int cnt, int node,
530530
flags = IRQD_AFFINITY_MANAGED |
531531
IRQD_MANAGED_SHUTDOWN;
532532
}
533+
flags |= IRQD_AFFINITY_SET;
533534
mask = &affinity->mask;
534535
node = cpu_to_node(cpumask_first(mask));
535536
affinity++;

0 commit comments

Comments
 (0)