[PATCH] genirq: Honor user provided affinity

From: Shay Drory
Date: Tue Aug 06 2024 - 03:21:21 EST


Currently, whenever user is providing affinity for an IRQ, genirq layer
is ignoring it and assigning the default affinity for the IRQ.
Fix it by honor the user input.

Fixes: 45ddcecbfa94 ("genirq: Use affinity hint in irqdesc allocation")
Signed-off-by: Shay Drory <shayd@xxxxxxxxxx>
---
kernel/irq/irqdesc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 07e99c936ba5..1dee88ba0ae4 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -530,6 +530,7 @@ static int alloc_descs(unsigned int start, unsigned int cnt, int node,
flags = IRQD_AFFINITY_MANAGED |
IRQD_MANAGED_SHUTDOWN;
}
+ flags |= IRQD_AFFINITY_SET;
mask = &affinity->mask;
node = cpu_to_node(cpumask_first(mask));
affinity++;
--
2.38.1