linux-stable/kernel/irq
Shay Drory 473d9e1d29 genirq/irqdesc: Honor caller provided affinity in alloc_desc()
commit edbbaae42a 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: 45ddcecbfa ("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>
2024-08-14 13:52:58 +02:00
..
affinity.c genirq/affinity: Move group_cpus_evenly() into lib/ 2024-01-10 17:10:33 +01:00
autoprobe.c genirq: Delay deactivation in free_irq() 2019-07-03 10:12:28 +02:00
chip.c Merge branch irq/plic-masking into irq/irqchip-next 2022-07-10 09:51:20 +01:00
cpuhotplug.c genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline 2024-06-12 11:03:01 +02:00
debug.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk 2018-02-01 13:36:15 -08:00
debugfs.c x86/apic/msi: Fix misconfigured non-maskable MSI quirk 2023-12-08 08:51:20 +01:00
devres.c genirq/devres: Use struct_size() in devm_kzalloc() 2019-04-16 21:54:03 +02:00
dummychip.c irq: Fix typos in comments 2021-03-22 04:23:14 +01:00
generic-chip.c genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware 2023-11-28 17:07:10 +00:00
handle.c irq: remove unused flags argument from __handle_irq_event_percpu() 2022-01-07 00:25:25 +01:00
internals.h genirq/irqdesc: Don't try to remove non-existing sysfs files 2022-12-31 13:31:58 +01:00
ipi.c genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask() 2023-03-11 13:55:29 +01:00
irq_sim.c genirq/irq_sim: Make the irq_work always run in hard irq context 2022-05-14 17:48:27 +02:00
irqdesc.c genirq/irqdesc: Honor caller provided affinity in alloc_desc() 2024-08-14 13:52:58 +02:00
irqdomain.c irqdomain: Fixed unbalanced fwnode get and put 2024-08-11 12:35:54 +02:00
Kconfig genirq: GENERIC_IRQ_EFFECTIVE_AFF_MASK depends on SMP 2022-07-07 09:38:04 +01:00
Makefile genirq/timings: Add selftest for circular array 2019-06-12 10:47:04 +02:00
manage.c task_work: s/task_work_cancel()/task_work_cancel_func()/ 2024-08-03 08:49:33 +02:00
matrix.c genirq/matrix: Exclude managed interrupts in irq_matrix_allocated() 2023-11-20 11:51:51 +01:00
migration.c genirq: Fix typos and misspellings in comments 2021-03-16 15:08:29 +01:00
msi.c x86/apic/msi: Fix misconfigured non-maskable MSI quirk 2023-12-08 08:51:20 +01:00
pm.c genirq/PM: Unexport {suspend,resume}_device_irqs() 2022-06-13 12:27:37 +02:00
proc.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
resend.c genirq: Fix typos and misspellings in comments 2021-03-16 15:08:29 +01:00
settings.h genirq: Add a IRQF_NO_DEBUG flag 2021-05-17 20:01:35 +02:00
spurious.c genirq: Disable irqfixup/poll on PREEMPT_RT. 2021-09-19 23:01:15 +02:00
timings.c Updates to the interrupt core and driver subsystems: 2021-08-30 14:38:37 -07:00