diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 19:31:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 19:31:49 -0400 |
commit | 96a3d998fb92c28b9862297fcf93a24d8a0eac1d (patch) | |
tree | 7fe1a799a3a84d276e7dcf8b0afa5b4ceb56659f /arch/x86/kernel/cpu/common.c | |
parent | 3045f94a20cc54e3e5b20a843701eeab86f57163 (diff) | |
parent | 5236eb968ec21c693d463d0494e39b00c1bc174d (diff) |
Merge branch 'x86-tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 tracing updates from Ingo Molnar:
"This tree adds IRQ vector tracepoints that are named after the handler
and which output the vector #, based on a zero-overhead approach that
relies on changing the IDT entries, by Seiji Aguchi.
The new tracepoints look like this:
# perf list | grep -i irq_vector
irq_vectors:local_timer_entry [Tracepoint event]
irq_vectors:local_timer_exit [Tracepoint event]
irq_vectors:reschedule_entry [Tracepoint event]
irq_vectors:reschedule_exit [Tracepoint event]
irq_vectors:spurious_apic_entry [Tracepoint event]
irq_vectors:spurious_apic_exit [Tracepoint event]
irq_vectors:error_apic_entry [Tracepoint event]
irq_vectors:error_apic_exit [Tracepoint event]
[...]"
* 'x86-tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/tracing: Add config option checking to the definitions of mce handlers
trace,x86: Do not call local_irq_save() in load_current_idt()
trace,x86: Move creation of irq tracepoints from apic.c to irq.c
x86, trace: Add irq vector tracepoints
x86: Rename variables for debugging
x86, trace: Introduce entering/exiting_irq()
tracing: Add DEFINE_EVENT_FN() macro
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index a4a07c0acb1f..548bd039784e 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1072,8 +1072,8 @@ __setup("clearcpuid=", setup_disablecpuid); | |||
1072 | 1072 | ||
1073 | #ifdef CONFIG_X86_64 | 1073 | #ifdef CONFIG_X86_64 |
1074 | struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table }; | 1074 | struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table }; |
1075 | struct desc_ptr nmi_idt_descr = { NR_VECTORS * 16 - 1, | 1075 | struct desc_ptr debug_idt_descr = { NR_VECTORS * 16 - 1, |
1076 | (unsigned long) nmi_idt_table }; | 1076 | (unsigned long) debug_idt_table }; |
1077 | 1077 | ||
1078 | DEFINE_PER_CPU_FIRST(union irq_stack_union, | 1078 | DEFINE_PER_CPU_FIRST(union irq_stack_union, |
1079 | irq_stack_union) __aligned(PAGE_SIZE); | 1079 | irq_stack_union) __aligned(PAGE_SIZE); |
@@ -1149,20 +1149,20 @@ int is_debug_stack(unsigned long addr) | |||
1149 | addr > (__get_cpu_var(debug_stack_addr) - DEBUG_STKSZ)); | 1149 | addr > (__get_cpu_var(debug_stack_addr) - DEBUG_STKSZ)); |
1150 | } | 1150 | } |
1151 | 1151 | ||
1152 | static DEFINE_PER_CPU(u32, debug_stack_use_ctr); | 1152 | DEFINE_PER_CPU(u32, debug_idt_ctr); |
1153 | 1153 | ||
1154 | void debug_stack_set_zero(void) | 1154 | void debug_stack_set_zero(void) |
1155 | { | 1155 | { |
1156 | this_cpu_inc(debug_stack_use_ctr); | 1156 | this_cpu_inc(debug_idt_ctr); |
1157 | load_idt((const struct desc_ptr *)&nmi_idt_descr); | 1157 | load_current_idt(); |
1158 | } | 1158 | } |
1159 | 1159 | ||
1160 | void debug_stack_reset(void) | 1160 | void debug_stack_reset(void) |
1161 | { | 1161 | { |
1162 | if (WARN_ON(!this_cpu_read(debug_stack_use_ctr))) | 1162 | if (WARN_ON(!this_cpu_read(debug_idt_ctr))) |
1163 | return; | 1163 | return; |
1164 | if (this_cpu_dec_return(debug_stack_use_ctr) == 0) | 1164 | if (this_cpu_dec_return(debug_idt_ctr) == 0) |
1165 | load_idt((const struct desc_ptr *)&idt_descr); | 1165 | load_current_idt(); |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | #else /* CONFIG_X86_64 */ | 1168 | #else /* CONFIG_X86_64 */ |
@@ -1258,7 +1258,7 @@ void __cpuinit cpu_init(void) | |||
1258 | switch_to_new_gdt(cpu); | 1258 | switch_to_new_gdt(cpu); |
1259 | loadsegment(fs, 0); | 1259 | loadsegment(fs, 0); |
1260 | 1260 | ||
1261 | load_idt((const struct desc_ptr *)&idt_descr); | 1261 | load_current_idt(); |
1262 | 1262 | ||
1263 | memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8); | 1263 | memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8); |
1264 | syscall_init(); | 1264 | syscall_init(); |
@@ -1335,7 +1335,7 @@ void __cpuinit cpu_init(void) | |||
1335 | if (cpu_has_vme || cpu_has_tsc || cpu_has_de) | 1335 | if (cpu_has_vme || cpu_has_tsc || cpu_has_de) |
1336 | clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE); | 1336 | clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE); |
1337 | 1337 | ||
1338 | load_idt(&idt_descr); | 1338 | load_current_idt(); |
1339 | switch_to_new_gdt(cpu); | 1339 | switch_to_new_gdt(cpu); |
1340 | 1340 | ||
1341 | /* | 1341 | /* |