From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752770AbdH2LNm (ORCPT ); Tue, 29 Aug 2017 07:13:42 -0400 Received: from terminus.zytor.com ([65.50.211.136]:47759 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751944AbdH2LNk (ORCPT ); Tue, 29 Aug 2017 07:13:40 -0400 Date: Tue, 29 Aug 2017 04:08:55 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: luto@kernel.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, bp@alien8.de, torvalds@linux-foundation.org, mingo@kernel.org, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, rostedt@goodmis.org, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, bp@alien8.de In-Reply-To: <20170828064957.144301907@linutronix.de> References: <20170828064957.144301907@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/apic] x86/mce: Remove duplicated tracing interrupt code Git-Commit-ID: 0f42ae283c9b3ebfa34cac6d86c335aa1ebe8ac1 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0f42ae283c9b3ebfa34cac6d86c335aa1ebe8ac1 Gitweb: http://git.kernel.org/tip/0f42ae283c9b3ebfa34cac6d86c335aa1ebe8ac1 Author: Thomas Gleixner AuthorDate: Mon, 28 Aug 2017 08:47:28 +0200 Committer: Ingo Molnar CommitDate: Tue, 29 Aug 2017 11:42:26 +0200 x86/mce: Remove duplicated tracing interrupt code Machine checks are not really high frequency events. The extra two NOP5s for the disabled tracepoints are noise vs. the heavy lifting which needs to be done in the MCE handler. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.144301907@linutronix.de Signed-off-by: Ingo Molnar --- arch/x86/include/asm/hw_irq.h | 6 +++--- arch/x86/kernel/cpu/mcheck/mce_amd.c | 16 ++-------------- arch/x86/kernel/cpu/mcheck/therm_throt.c | 20 +++----------------- arch/x86/kernel/cpu/mcheck/threshold.c | 16 ++-------------- 4 files changed, 10 insertions(+), 48 deletions(-) diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index fd7e7e6..5f042ec 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h @@ -48,12 +48,12 @@ extern asmlinkage void call_function_single_interrupt(void); #ifdef CONFIG_TRACING /* Interrupt handlers registered during init_IRQ */ -extern void trace_thermal_interrupt(void); extern void trace_reschedule_interrupt(void); -extern void trace_threshold_interrupt(void); -extern void trace_deferred_error_interrupt(void); extern void trace_call_function_interrupt(void); extern void trace_call_function_single_interrupt(void); +#define trace_thermal_interrupt thermal_interrupt +#define trace_threshold_interrupt threshold_interrupt +#define trace_deferred_error_interrupt deferred_error_interrupt #define trace_irq_work_interrupt irq_work_interrupt #define trace_error_interrupt error_interrupt #define trace_spurious_interrupt spurious_interrupt diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 9e314bc..172924d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c @@ -776,24 +776,12 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc) mce_log(&m); } -static inline void __smp_deferred_error_interrupt(void) -{ - inc_irq_stat(irq_deferred_error_count); - deferred_error_int_vector(); -} - asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(void) { entering_irq(); - __smp_deferred_error_interrupt(); - exiting_ack_irq(); -} - -asmlinkage __visible void __irq_entry smp_trace_deferred_error_interrupt(void) -{ - entering_irq(); trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR); - __smp_deferred_error_interrupt(); + inc_irq_stat(irq_deferred_error_count); + deferred_error_int_vector(); trace_deferred_error_apic_exit(DEFERRED_ERROR_VECTOR); exiting_ack_irq(); } diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index f7370ab..2da67b7 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -390,26 +390,12 @@ static void unexpected_thermal_interrupt(void) static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt; -static inline void __smp_thermal_interrupt(void) -{ - inc_irq_stat(irq_thermal_count); - smp_thermal_vector(); -} - -asmlinkage __visible void __irq_entry -smp_thermal_interrupt(struct pt_regs *regs) -{ - entering_irq(); - __smp_thermal_interrupt(); - exiting_ack_irq(); -} - -asmlinkage __visible void __irq_entry -smp_trace_thermal_interrupt(struct pt_regs *regs) +asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r) { entering_irq(); trace_thermal_apic_entry(THERMAL_APIC_VECTOR); - __smp_thermal_interrupt(); + inc_irq_stat(irq_thermal_count); + smp_thermal_vector(); trace_thermal_apic_exit(THERMAL_APIC_VECTOR); exiting_ack_irq(); } diff --git a/arch/x86/kernel/cpu/mcheck/threshold.c b/arch/x86/kernel/cpu/mcheck/threshold.c index bb0e75ee..5e7249e 100644 --- a/arch/x86/kernel/cpu/mcheck/threshold.c +++ b/arch/x86/kernel/cpu/mcheck/threshold.c @@ -17,24 +17,12 @@ static void default_threshold_interrupt(void) void (*mce_threshold_vector)(void) = default_threshold_interrupt; -static inline void __smp_threshold_interrupt(void) -{ - inc_irq_stat(irq_threshold_count); - mce_threshold_vector(); -} - asmlinkage __visible void __irq_entry smp_threshold_interrupt(void) { entering_irq(); - __smp_threshold_interrupt(); - exiting_ack_irq(); -} - -asmlinkage __visible void __irq_entry smp_trace_threshold_interrupt(void) -{ - entering_irq(); trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR); - __smp_threshold_interrupt(); + inc_irq_stat(irq_threshold_count); + mce_threshold_vector(); trace_threshold_apic_exit(THRESHOLD_APIC_VECTOR); exiting_ack_irq(); }