]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
genirq/irqdesc: Honor caller provided affinity in alloc_desc()
authorShay Drory <shayd@nvidia.com>
Tue, 6 Aug 2024 07:20:44 +0000 (10:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Aug 2024 03:45:46 +0000 (05:45 +0200)
commit0ad02834c2bfc67992b7ddb97a2ce03e6cc4b66e
tree7f88fb38d07a0dd7a89098660fb9e536acecc685
parenta2ff3482269d0454ac16b9595ddb2a24c32254ee
genirq/irqdesc: Honor caller provided affinity in alloc_desc()

commit edbbaae42a56f9a2b39c52ef2504dfb3fb0a7858 upstream.

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: 45ddcecbfa94 ("genirq: Use affinity hint in irqdesc allocation")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/all/20240806072044.837827-1-shayd@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/irq/irqdesc.c