Commit 0f42ae28 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

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: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170828064957.144301907@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent daabb8eb
...@@ -48,12 +48,12 @@ extern asmlinkage void call_function_single_interrupt(void); ...@@ -48,12 +48,12 @@ extern asmlinkage void call_function_single_interrupt(void);
#ifdef CONFIG_TRACING #ifdef CONFIG_TRACING
/* Interrupt handlers registered during init_IRQ */ /* Interrupt handlers registered during init_IRQ */
extern void trace_thermal_interrupt(void);
extern void trace_reschedule_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_interrupt(void);
extern void trace_call_function_single_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_irq_work_interrupt irq_work_interrupt
#define trace_error_interrupt error_interrupt #define trace_error_interrupt error_interrupt
#define trace_spurious_interrupt spurious_interrupt #define trace_spurious_interrupt spurious_interrupt
......
...@@ -776,24 +776,12 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc) ...@@ -776,24 +776,12 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc)
mce_log(&m); 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) 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(); entering_irq();
trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR); 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); trace_deferred_error_apic_exit(DEFERRED_ERROR_VECTOR);
exiting_ack_irq(); exiting_ack_irq();
} }
......
...@@ -390,26 +390,12 @@ static void unexpected_thermal_interrupt(void) ...@@ -390,26 +390,12 @@ static void unexpected_thermal_interrupt(void)
static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt; static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt;
static inline void __smp_thermal_interrupt(void) asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r)
{
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)
{ {
entering_irq(); entering_irq();
trace_thermal_apic_entry(THERMAL_APIC_VECTOR); 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); trace_thermal_apic_exit(THERMAL_APIC_VECTOR);
exiting_ack_irq(); exiting_ack_irq();
} }
......
...@@ -17,24 +17,12 @@ static void default_threshold_interrupt(void) ...@@ -17,24 +17,12 @@ static void default_threshold_interrupt(void)
void (*mce_threshold_vector)(void) = default_threshold_interrupt; 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) 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(); entering_irq();
trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR); 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); trace_threshold_apic_exit(THRESHOLD_APIC_VECTOR);
exiting_ack_irq(); exiting_ack_irq();
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment