diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-06-20 01:37:46 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-22 18:21:23 +0200 |
commit | c7d6c9dd871f42c4e0ce5563d2f684e78ea673cf (patch) | |
tree | 19382350bc48f7f886b691b7408d1658e3105300 /arch/x86/kernel/apic/x2apic_cluster.c | |
parent | ef1c2cc88531a967fa97d1ac1f3f8a64ee6910b4 (diff) |
x86/apic: Implement effective irq mask update
Add the effective irq mask update to the apic implementations and enable
effective irq masks for x86.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/20170619235446.878370703@linutronix.de
Diffstat (limited to 'arch/x86/kernel/apic/x2apic_cluster.c')
-rw-r--r-- | arch/x86/kernel/apic/x2apic_cluster.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c index 305031e0a228..481237cb1544 100644 --- a/arch/x86/kernel/apic/x2apic_cluster.c +++ b/arch/x86/kernel/apic/x2apic_cluster.c @@ -4,6 +4,7 @@ #include <linux/kernel.h> #include <linux/ctype.h> #include <linux/dmar.h> +#include <linux/irq.h> #include <linux/cpu.h> #include <asm/smp.h> @@ -107,6 +108,7 @@ static int x2apic_cpu_mask_to_apicid(const struct cpumask *mask, struct irq_data *irqdata, unsigned int *apicid) { + struct cpumask *effmsk = irq_data_get_effective_affinity_mask(irqdata); unsigned int cpu; u32 dest = 0; u16 cluster; @@ -118,10 +120,12 @@ x2apic_cpu_mask_to_apicid(const struct cpumask *mask, struct irq_data *irqdata, dest = per_cpu(x86_cpu_to_logical_apicid, cpu); cluster = x2apic_cluster(cpu); + cpumask_clear(effmsk); for_each_cpu(cpu, mask) { if (cluster != x2apic_cluster(cpu)) continue; dest |= per_cpu(x86_cpu_to_logical_apicid, cpu); + cpumask_set_cpu(cpu, effmsk); } *apicid = dest; |