diff options
author | Samuel Holland <samuel@sholland.org> | 2022-07-01 15:00:54 -0500 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-07-07 09:38:04 +0100 |
commit | 073352e951f60946452da358d64841066c3142ff (patch) | |
tree | 3cecbf9913ae1ccb5aa3593bd00f599a467b4a4b /arch/alpha | |
parent | 961343d7822624d0e329ab4167c7e1d02bb53112 (diff) | |
download | linux-stable-073352e951f60946452da358d64841066c3142ff.tar.gz linux-stable-073352e951f60946452da358d64841066c3142ff.tar.bz2 linux-stable-073352e951f60946452da358d64841066c3142ff.zip |
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
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/irq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index f6d2946edbd2..15f2effd6baf 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -60,7 +60,7 @@ int irq_select_affinity(unsigned int irq) cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); last_cpu = cpu; - cpumask_copy(irq_data_get_affinity_mask(data), cpumask_of(cpu)); + irq_data_update_affinity(data, cpumask_of(cpu)); chip->irq_set_affinity(data, cpumask_of(cpu), false); return 0; } |