diff options
author | Thomas Gleixner <[email protected]> | 2017-06-20 01:37:41 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2017-06-22 18:21:21 +0200 |
commit | bbcf9574bc6fb85d22f2718d48da7f98830a7870 (patch) | |
tree | 453f46e2ce344f21cb14e7115adb565655305654 | |
parent | ad95212ee6e0b62f38b287b40c9ab6a1ba3e892b (diff) |
x86/uv: Use default_cpu_mask_to_apicid_and()
Same functionality except the extra bits ored on the apicid.
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Keith Busch <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index b487b3a01615..fd5bb20c8430 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -530,23 +530,12 @@ uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask, const struct cpumask *andmask, unsigned int *apicid) { - int unsigned cpu; + int ret = default_cpu_mask_to_apicid_and(cpumask, andmask, apicid); - /* - * We're using fixed IRQ delivery, can only return one phys APIC ID. - * May as well be the first. - */ - for_each_cpu_and(cpu, cpumask, andmask) { - if (cpumask_test_cpu(cpu, cpu_online_mask)) - break; - } - - if (likely(cpu < nr_cpu_ids)) { - *apicid = per_cpu(x86_cpu_to_apicid, cpu) | uv_apicid_hibits; - return 0; - } + if (!ret) + *apicid |= uv_apicid_hibits; - return -EINVAL; + return ret; } static unsigned int x2apic_get_apic_id(unsigned long x) |