From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031355AbbKDW6t (ORCPT ); Wed, 4 Nov 2015 17:58:49 -0500 Received: from www.linutronix.de ([62.245.132.108]:52112 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031630AbbKDW5s (ORCPT ); Wed, 4 Nov 2015 17:57:48 -0500 Message-Id: <20151104220849.631111846@linutronix.de> User-Agent: quilt/0.63-1 Date: Wed, 04 Nov 2015 22:57:07 -0000 From: Thomas Gleixner To: LKML Cc: Linus Torvalds , Ingo Molnar , Peter Anvin , Borislav Petkov , Peter Zijlstra , Mike Travis , Daniel J Blueman Subject: [patch 12/14] x86/apic: Provide default send single IPI wrapper References: <20151104215716.810356093@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=x86-apic--Provide-default-send-single-IPI-wrapper 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 Instead of doing the wrapping in the smp code we can provide a default wrapper for those APICs which insist on cpumasks. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/ipi.h | 1 + arch/x86/kernel/apic/ipi.c | 8 ++++++++ 2 files changed, 9 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(int cpu, int vector); 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); Index: linux/arch/x86/kernel/apic/ipi.c =================================================================== --- linux.orig/arch/x86/kernel/apic/ipi.c +++ linux/arch/x86/kernel/apic/ipi.c @@ -65,6 +65,14 @@ void default_send_IPI_mask_allbutself_ph local_irq_restore(flags); } +/* + * Helper function for APICs which insist on cpumasks + */ +void default_send_IPI_single(int cpu, int vector) +{ + apic->send_IPI_mask(cpumask_of(cpu), vector); +} + #ifdef CONFIG_X86_32 void default_send_IPI_mask_sequence_logical(const struct cpumask *mask,