From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946244AbbHGSHm (ORCPT ); Fri, 7 Aug 2015 14:07:42 -0400 Received: from mail.kernel.org ([198.145.29.136]:46350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946114AbbHGSH1 (ORCPT ); Fri, 7 Aug 2015 14:07:27 -0400 Message-Id: <20150807180723.872153457@goodmis.org> User-Agent: quilt/0.61-1 Date: Fri, 07 Aug 2015 14:07:12 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , "Peter Zijlstra (Intel)" , Ingo Molnar , "Paul E. McKenney" , Frederic Weisbecker Subject: [PATCH RT 3/6] x86-Tell-irq-work-about-self-IPI-support-3.14 References: <20150807180709.744130098@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=0003-x86-Tell-irq-work-about-self-IPI-support-3.14.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.10.84-rt92-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Frederic Weisbecker commit 3010279f0fc36f0388872203e63ca49912f648fd From: Frederic Weisbecker Date: Sat Aug 16 18:47:15 2014 +0200 x86: Tell irq work about self IPI support x86 supports irq work self-IPIs when local apic is available. This is partly known on runtime so lets implement arch_irq_work_has_interrupt() accordingly. This should be safely called after setup_arch(). Acked-by: Peter Zijlstra (Intel) Cc: Ingo Molnar Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Frederic Weisbecker Signed-off-by: Steven Rostedt --- arch/x86/include/asm/Kbuild | 1 - arch/x86/include/asm/irq_work.h | 11 +++++++++++ arch/x86/kernel/irq_work.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/asm/irq_work.h diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index 1eb77ac0613c..7f669853317a 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild @@ -5,4 +5,3 @@ genhdr-y += unistd_64.h genhdr-y += unistd_x32.h generic-y += clkdev.h -generic-y += irq_work.h diff --git a/arch/x86/include/asm/irq_work.h b/arch/x86/include/asm/irq_work.h new file mode 100644 index 000000000000..78162f8e248b --- /dev/null +++ b/arch/x86/include/asm/irq_work.h @@ -0,0 +1,11 @@ +#ifndef _ASM_IRQ_WORK_H +#define _ASM_IRQ_WORK_H + +#include + +static inline bool arch_irq_work_has_interrupt(void) +{ + return cpu_has_apic; +} + +#endif /* _ASM_IRQ_WORK_H */ diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c index ca8f703a1e70..b4325a6c67c3 100644 --- a/arch/x86/kernel/irq_work.c +++ b/arch/x86/kernel/irq_work.c @@ -21,7 +21,7 @@ void smp_irq_work_interrupt(struct pt_regs *regs) void arch_irq_work_raise(void) { #ifdef CONFIG_X86_LOCAL_APIC - if (!cpu_has_apic) + if (!arch_irq_work_has_interrupt()) return; apic->send_IPI_self(IRQ_WORK_VECTOR); -- 2.4.6