genirq: Add and use an irq_data_update_affinity helper
authorSamuel Holland <samuel@sholland.org>
Fri, 1 Jul 2022 20:00:54 +0000 (15:00 -0500)
committerMarc Zyngier <maz@kernel.org>
Thu, 7 Jul 2022 08:38:04 +0000 (09:38 +0100)
commit073352e951f60946452da358d64841066c3142ff
tree3cecbf9913ae1ccb5aa3593bd00f599a467b4a4b
parent961343d7822624d0e329ab4167c7e1d02bb53112
genirq: Add and use an irq_data_update_affinity helper

Some architectures and irqchip drivers modify the cpumask returned by
irq_data_get_affinity_mask, usually by copying in to it. This is
problematic for uniprocessor configurations, where the affinity mask
should be constant, as it is known at compile time.

Add and use a setter for the affinity mask, following the pattern of
irq_data_update_effective_affinity. This allows the getter function to
return a const cpumask pointer.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> # Xen bits
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220701200056.46555-7-samuel@sholland.org
arch/alpha/kernel/irq.c
arch/ia64/kernel/iosapic.c
arch/ia64/kernel/irq.c
arch/ia64/kernel/msi_ia64.c
arch/parisc/kernel/irq.c
drivers/irqchip/irq-bcm6345-l1.c
drivers/parisc/iosapic.c
drivers/sh/intc/chip.c
drivers/xen/events/events_base.c
include/linux/irq.h