From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031608AbbKDXAv (ORCPT ); Wed, 4 Nov 2015 18:00:51 -0500 Received: from www.linutronix.de ([62.245.132.108]:52075 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031681AbbKDW5q (ORCPT ); Wed, 4 Nov 2015 17:57:46 -0500 Message-Id: <20151104220849.296438009@linutronix.de> User-Agent: quilt/0.63-1 Date: Wed, 04 Nov 2015 22:57:04 -0000 From: Thomas Gleixner To: LKML Cc: Linus Torvalds , Ingo Molnar , Peter Anvin , Borislav Petkov , Peter Zijlstra , Mike Travis , Daniel J Blueman Subject: [patch 08/14] x86/apic: Implement single IPI for x2apic_phys References: <20151104215716.810356093@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=x86-apic--Implement-single-IPI-for-x2apic_phys X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/x2apic_phys.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) Index: linux/arch/x86/kernel/apic/x2apic_phys.c =================================================================== --- linux.orig/arch/x86/kernel/apic/x2apic_phys.c +++ linux/arch/x86/kernel/apic/x2apic_phys.c @@ -36,6 +36,17 @@ static int x2apic_acpi_madt_oem_check(ch return x2apic_enabled() && (x2apic_phys || x2apic_fadt_phys()); } +static void x2apic_send_IPI(int cpu, int vector) +{ + u32 dest = per_cpu(x86_cpu_to_apicid, cpu); + unsigned long flags; + + x2apic_wrmsr_fence(); + local_irq_save(flags); + __x2apic_send_IPI_dest(dest, vector, APIC_DEST_PHYSICAL); + local_irq_restore(flags); +} + static void __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest) { @@ -122,6 +133,7 @@ static struct apic apic_x2apic_phys = { .cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and, + .send_IPI = x2apic_send_IPI, .send_IPI_mask = x2apic_send_IPI_mask, .send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself, .send_IPI_allbutself = x2apic_send_IPI_allbutself,