From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031748AbbKDW5s (ORCPT ); Wed, 4 Nov 2015 17:57:48 -0500 Received: from www.linutronix.de ([62.245.132.108]:52048 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031630AbbKDW5n (ORCPT ); Wed, 4 Nov 2015 17:57:43 -0500 Message-Id: <20151104220848.898543767@linutronix.de> User-Agent: quilt/0.63-1 Date: Wed, 04 Nov 2015 22:57:01 -0000 From: Thomas Gleixner To: LKML Cc: Linus Torvalds , Ingo Molnar , Peter Anvin , Borislav Petkov , Peter Zijlstra , Mike Travis , Daniel J Blueman Subject: [patch 03/14] x86/apic: Implement default single target IPI function References: <20151104215716.810356093@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=x86-apic--Implement-default-single-target-IPI-function 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 apic_physflat and bigsmp_apic can share that implementation. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/ipi.h | 1 + arch/x86/kernel/apic/ipi.c | 10 ++++++++++ 2 files changed, 11 insertions(+) Index: linux/arch/x86/include/asm/ipi.h =================================================================== --- linux.orig/arch/x86/include/asm/ipi.h +++ linux/arch/x86/include/asm/ipi.h @@ -119,6 +119,7 @@ static inline void native_apic_mem_write(APIC_ICR, cfg); } +extern void default_send_IPI_single_phys(int cpu, int vector); extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask, int vector); extern void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask, Index: linux/arch/x86/kernel/apic/ipi.c =================================================================== --- linux.orig/arch/x86/kernel/apic/ipi.c +++ linux/arch/x86/kernel/apic/ipi.c @@ -18,6 +18,16 @@ #include #include +void default_send_IPI_single_phys(int cpu, int vector) +{ + unsigned long flags; + + local_irq_save(flags); + __default_send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, cpu), + vector, APIC_DEST_PHYSICAL); + local_irq_restore(flags); +} + void default_send_IPI_mask_sequence_phys(const struct cpumask *mask, int vector) { unsigned long query_cpu;