diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-06-24 11:01:09 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-06-24 11:01:09 -0700 |
commit | 5236eb968ec21c693d463d0494e39b00c1bc174d (patch) | |
tree | 1bb6abc27df94dad156225b7d2ec31d04fd9cdd7 | |
parent | 33e5ff634f07dec26b7ed1fd7f9e32978fe1f2b2 (diff) | |
parent | 2b4bc78956bdcc2bb4c49b3af955be776817e897 (diff) | |
download | linux-stable-5236eb968ec21c693d463d0494e39b00c1bc174d.tar.gz linux-stable-5236eb968ec21c693d463d0494e39b00c1bc174d.tar.bz2 linux-stable-5236eb968ec21c693d463d0494e39b00c1bc174d.zip |
Merge remote-tracking branch 'trace/tip/x86/trace' into x86/trace
Fix from Steven Rostedt.
-rw-r--r-- | arch/x86/include/asm/desc.h | 10 | ||||
-rw-r--r-- | arch/x86/kernel/tracepoint.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index 1377ecb29d8d..b90e5dfeee46 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h @@ -497,21 +497,19 @@ static inline void load_trace_idt(void) #endif /* - * the load_current_idt() is called with interrupt disabled by local_irq_save() + * The load_current_idt() must be called with interrupts disabled * to avoid races. That way the IDT will always be set back to the expected - * descriptor. + * descriptor. It's also called when a CPU is being initialized, and + * that doesn't need to disable interrupts, as nothing should be + * bothering the CPU then. */ static inline void load_current_idt(void) { - unsigned long flags; - - local_irq_save(flags); if (is_debug_idt_enabled()) load_debug_idt(); else if (is_trace_idt_enabled()) load_trace_idt(); else load_idt((const struct desc_ptr *)&idt_descr); - local_irq_restore(flags); } #endif /* _ASM_X86_DESC_H */ diff --git a/arch/x86/kernel/tracepoint.c b/arch/x86/kernel/tracepoint.c index 1423efe98fbc..4e584a8d6edd 100644 --- a/arch/x86/kernel/tracepoint.c +++ b/arch/x86/kernel/tracepoint.c @@ -29,7 +29,11 @@ static void set_trace_idt_ctr(int val) static void switch_idt(void *arg) { + unsigned long flags; + + local_irq_save(flags); load_current_idt(); + local_irq_restore(flags); } void trace_irq_vector_regfunc(void) |