From: tip-bot for Thomas Gleixner <tipbot@zytor.com> To: linux-tip-commits@vger.kernel.org Cc: mingo@kernel.org, hpa@zytor.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, bp@alien8.de, luto@kernel.org, torvalds@linux-foundation.org Subject: [tip:x86/apic] x86/apic: Remove the duplicated tracing versions of interrupts Date: Tue, 29 Aug 2017 04:08:10 -0700 [thread overview] Message-ID: <tip-61069de7a3252be0b1f567fe9e0b4723f1d2814f@git.kernel.org> (raw) In-Reply-To: <20170828064956.986009402@linutronix.de> Commit-ID: 61069de7a3252be0b1f567fe9e0b4723f1d2814f Gitweb: http://git.kernel.org/tip/61069de7a3252be0b1f567fe9e0b4723f1d2814f Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Mon, 28 Aug 2017 08:47:26 +0200 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Tue, 29 Aug 2017 11:42:25 +0200 x86/apic: Remove the duplicated tracing versions of interrupts The error and the spurious interrupt are really rare events and not at all performance sensitive: two NOP5s can be tolerated when tracing is disabled. Remove the complication. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> 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> Link: http://lkml.kernel.org/r/20170828064956.986009402@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/x86/include/asm/hw_irq.h | 4 ++-- arch/x86/kernel/apic/apic.c | 43 ++++++++++--------------------------------- 2 files changed, 12 insertions(+), 35 deletions(-) diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index a7e45d1..b094b87 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h @@ -48,15 +48,15 @@ extern asmlinkage void call_function_single_interrupt(void); #ifdef CONFIG_TRACING /* Interrupt handlers registered during init_IRQ */ -extern void trace_error_interrupt(void); extern void trace_irq_work_interrupt(void); -extern void trace_spurious_interrupt(void); 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_error_interrupt error_interrupt +#define trace_spurious_interrupt spurious_interrupt #define trace_x86_platform_ipi x86_platform_ipi #define trace_apic_timer_interrupt apic_timer_interrupt #define trace_irq_move_cleanup_interrupt irq_move_cleanup_interrupt diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index a33fa44..eebee4c 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -1899,10 +1899,14 @@ void __init register_lapic_address(unsigned long address) /* * This interrupt should _never_ happen with our APIC/SMP architecture */ -static void __smp_spurious_interrupt(u8 vector) +__visible void __irq_entry smp_spurious_interrupt(struct pt_regs *regs) { + u8 vector = ~regs->orig_ax; u32 v; + entering_irq(); + trace_spurious_apic_entry(vector); + /* * Check if this really is a spurious interrupt and ACK it * if it is a vectored one. Just in case... @@ -1917,22 +1921,7 @@ static void __smp_spurious_interrupt(u8 vector) /* see sw-dev-man vol 3, chapter 7.4.13.5 */ pr_info("spurious APIC interrupt through vector %02x on CPU#%d, " "should never happen.\n", vector, smp_processor_id()); -} -__visible void __irq_entry smp_spurious_interrupt(struct pt_regs *regs) -{ - entering_irq(); - __smp_spurious_interrupt(~regs->orig_ax); - exiting_irq(); -} - -__visible void __irq_entry smp_trace_spurious_interrupt(struct pt_regs *regs) -{ - u8 vector = ~regs->orig_ax; - - entering_irq(); - trace_spurious_apic_entry(vector); - __smp_spurious_interrupt(vector); trace_spurious_apic_exit(vector); exiting_irq(); } @@ -1940,10 +1929,8 @@ __visible void __irq_entry smp_trace_spurious_interrupt(struct pt_regs *regs) /* * This interrupt should never happen with our APIC/SMP architecture */ -static void __smp_error_interrupt(struct pt_regs *regs) +__visible void __irq_entry smp_error_interrupt(struct pt_regs *regs) { - u32 v; - u32 i = 0; static const char * const error_interrupt_reason[] = { "Send CS error", /* APIC Error Bit 0 */ "Receive CS error", /* APIC Error Bit 1 */ @@ -1954,6 +1941,10 @@ static void __smp_error_interrupt(struct pt_regs *regs) "Received illegal vector", /* APIC Error Bit 6 */ "Illegal register address", /* APIC Error Bit 7 */ }; + u32 v, i = 0; + + entering_irq(); + trace_error_apic_entry(ERROR_APIC_VECTOR); /* First tickle the hardware, only then report what went on. -- REW */ if (lapic_get_maxlvt() > 3) /* Due to the Pentium erratum 3AP. */ @@ -1975,20 +1966,6 @@ static void __smp_error_interrupt(struct pt_regs *regs) apic_printk(APIC_DEBUG, KERN_CONT "\n"); -} - -__visible void __irq_entry smp_error_interrupt(struct pt_regs *regs) -{ - entering_irq(); - __smp_error_interrupt(regs); - exiting_irq(); -} - -__visible void __irq_entry smp_trace_error_interrupt(struct pt_regs *regs) -{ - entering_irq(); - trace_error_apic_entry(ERROR_APIC_VECTOR); - __smp_error_interrupt(regs); trace_error_apic_exit(ERROR_APIC_VECTOR); exiting_irq(); }
next prev parent reply other threads:[~2017-08-29 11:12 UTC|newest] Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-08-28 6:47 [patch V3 00/44] x86: Cleanup IDT code Thomas Gleixner 2017-08-28 6:47 ` [patch V3 01/44] x86/irq: Remove vector_used_by_percpu_irq() Thomas Gleixner 2017-08-29 11:04 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 02/44] x86/irq: Unexport used_vectors Thomas Gleixner 2017-08-29 11:04 ` [tip:x86/apic] x86/irq: Unexport used_vectors[] tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 03/44] x86/irq: Get rid of the first_system_vector bogisity Thomas Gleixner 2017-08-29 11:04 ` [tip:x86/apic] x86/irq: Get rid of the 'first_system_vector' indirection bogosity tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 04/44] x86/irq: Remove duplicated used_vectors definition Thomas Gleixner 2017-08-29 11:05 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 05/44] x86/boot: Move EISA setup to a proper place Thomas Gleixner 2017-08-29 11:05 ` [tip:x86/apic] x86/boot: Move EISA setup to a separate file tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 06/44] x86/tracing: Introduce a static key for exception tracing Thomas Gleixner 2017-08-29 11:06 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 07/44] x86/traps: Simplify pagefault tracing logic Thomas Gleixner 2017-08-29 11:06 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 08/44] x86/apic: Remove the duplicated tracing version of local_timer_interrupt Thomas Gleixner 2017-08-29 11:07 ` [tip:x86/apic] x86/apic: Remove the duplicated tracing version of local_timer_interrupt() tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 09/44] x86/apic: Use this_cpu_ptr in local_timer_interrupt Thomas Gleixner 2017-08-29 11:07 ` [tip:x86/apic] x86/apic: Use this_cpu_ptr() in local_timer_interrupt() tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 10/44] x86/irq: Get rid of duplicated trace_x86_platform_ipi() code Thomas Gleixner 2017-08-29 11:07 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 11/44] x86/apic: Remove the duplicated tracing versions of interrupts Thomas Gleixner 2017-08-29 11:08 ` tip-bot for Thomas Gleixner [this message] 2017-08-28 6:47 ` [patch V3 12/44] x86/irqwork: Get rid of duplicated tracing interrupt code Thomas Gleixner 2017-08-29 11:08 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 13/44] x86/mce: Remove " Thomas Gleixner 2017-08-29 11:08 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 14/44] x86/smp: Remove pointless duplicated " Thomas Gleixner 2017-08-29 11:09 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 15/44] x86/smp: Use static key for reschedule interrupt tracing Thomas Gleixner 2017-08-29 11:09 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 16/44] x86/idt: Remove tracing idt completely Thomas Gleixner 2017-08-29 11:10 ` [tip:x86/apic] x86/idt: Remove the tracing IDT completely tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 17/44] x86/idt: Cleanup the i386 low level entry macros Thomas Gleixner 2017-08-29 11:10 ` [tip:x86/apic] x86/idt: Clean up " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 18/44] x86/tracing: Disentangle pagefault and resched IPI tracing key Thomas Gleixner 2017-08-29 11:10 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 19/44] x86/ipi: Make platform IPI depend on APIC Thomas Gleixner 2017-08-29 11:11 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 20/44] x86/irq_work: Make it " Thomas Gleixner 2017-08-29 11:11 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 21/44] x86/tracing: Build tracepoints only when they are used Thomas Gleixner 2017-08-29 11:12 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 22/44] x86/idt: Unify gate_struct handling for 32/64bit Thomas Gleixner 2017-08-29 11:12 ` [tip:x86/apic] x86/idt: Unify gate_struct handling for 32/64-bit kernels tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 23/44] x86/percpu: Use static initializer for GDT entry Thomas Gleixner 2017-08-29 11:13 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 24/44] x86/fpu: Use bitfield accessors for desc_struct Thomas Gleixner 2017-08-29 11:13 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 25/44] x86: Replace access to desc_struct:a/b fields Thomas Gleixner 2017-08-29 11:13 ` [tip:x86/apic] x86/asm: " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 26/44] x86/gdt: Use bitfields for initialization Thomas Gleixner 2017-08-29 11:14 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 27/44] x86/ldttss: Cleanup 32bit descriptors Thomas Gleixner 2017-08-29 11:14 ` [tip:x86/apic] x86/ldttss: Clean up 32-bit descriptors tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 28/44] x86/idt: Create file for IDT related code Thomas Gleixner 2017-08-29 11:15 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 29/44] x86/idt: Move 32bit idt_descr to C code Thomas Gleixner 2017-08-29 11:15 ` [tip:x86/apic] x86/idt: Move 32-bit " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 30/44] x86/idt: Remove unused set_trap_gate() Thomas Gleixner 2017-08-29 11:16 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 31/44] x86/idt: Consolidate IDT invalidation Thomas Gleixner 2017-08-29 11:16 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 32/44] x86/idt: Move early IDT handler setup to IDT code Thomas Gleixner 2017-08-29 11:16 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 33/44] x86/idt: Move early IDT setup out of 32bit asm Thomas Gleixner 2017-08-29 11:17 ` [tip:x86/apic] x86/idt: Move early IDT setup out of 32-bit asm tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 34/44] x86/idt: Prepare for table based init Thomas Gleixner 2017-08-29 11:17 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 35/44] x86/idt: Switch early trap init to IDT tables Thomas Gleixner 2017-08-29 11:18 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 36/44] x86/idt: Move debug stack init to table based Thomas Gleixner 2017-08-29 11:18 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 37/44] x86/idt: Move ist stack based traps to table init Thomas Gleixner 2017-08-29 11:18 ` [tip:x86/apic] x86/idt: Move IST " tip-bot for Thomas Gleixner 2017-09-01 6:28 ` Andrei Vagin 2017-09-01 8:26 ` [PATCH] x86/idt: Fix the X86_TRAP_BP gate Ingo Molnar 2017-09-01 8:59 ` Thomas Gleixner 2017-09-01 9:09 ` [tip:x86/apic] " tip-bot for Ingo Molnar 2017-09-01 14:39 ` [PATCH] " Andrei Vagin 2017-08-28 6:47 ` [patch V3 38/44] x86/idt: Move regular trap init to tables Thomas Gleixner 2017-08-29 11:19 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 39/44] x86/idt: Move APIC gate initialization " Thomas Gleixner 2017-08-29 11:19 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 40/44] x86/idt: Move interrupt gate initialization to IDT code Thomas Gleixner 2017-08-29 11:20 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 41/44] x86/idt: Remove unused functions/inlines Thomas Gleixner 2017-08-29 11:20 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 42/44] x86/idt: Deinline setup functions Thomas Gleixner 2017-08-29 11:20 ` [tip:x86/apic] " tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 43/44] x86/idt: Simplify alloc_intr_gate Thomas Gleixner 2017-08-28 14:35 ` KY Srinivasan 2017-08-29 11:21 ` [tip:x86/apic] x86/idt: Simplify alloc_intr_gate() tip-bot for Thomas Gleixner 2017-08-28 6:47 ` [patch V3 44/44] x86/idt: Hide set_intr_gate() Thomas Gleixner 2017-08-29 11:21 ` [tip:x86/apic] " tip-bot for Thomas Gleixner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=tip-61069de7a3252be0b1f567fe9e0b4723f1d2814f@git.kernel.org \ --to=tipbot@zytor.com \ --cc=bp@alien8.de \ --cc=hpa@zytor.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tip-commits@vger.kernel.org \ --cc=luto@kernel.org \ --cc=mingo@kernel.org \ --cc=peterz@infradead.org \ --cc=rostedt@goodmis.org \ --cc=tglx@linutronix.de \ --cc=torvalds@linux-foundation.org \ --subject='Re: [tip:x86/apic] x86/apic: Remove the duplicated tracing versions of interrupts' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.