diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-08 12:12:48 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-08 12:47:32 -0500 |
commit | efac2b202701c6b24c7566f2e8b34e94cb408751 (patch) | |
tree | ba657df23df0b9f63ee51bd4f6067b30415c5b00 | |
parent | 3cf82fa74c1bb2f3778286b15fd9f7feb5af3aae (diff) |
add arch-specific trace points and resched hook to x86
-rw-r--r-- | arch/x86/kernel/smp_32.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c index fcaa026eb807..8ce9cac79728 100644 --- a/arch/x86/kernel/smp_32.c +++ b/arch/x86/kernel/smp_32.c | |||
@@ -25,6 +25,9 @@ | |||
25 | #include <asm/mmu_context.h> | 25 | #include <asm/mmu_context.h> |
26 | #include <mach_apic.h> | 26 | #include <mach_apic.h> |
27 | 27 | ||
28 | #include <litmus/litmus.h> | ||
29 | #include <litmus/trace.h> | ||
30 | |||
28 | /* | 31 | /* |
29 | * Some notes on x86 processor bugs affecting SMP operation: | 32 | * Some notes on x86 processor bugs affecting SMP operation: |
30 | * | 33 | * |
@@ -472,6 +475,7 @@ void flush_tlb_all(void) | |||
472 | static void native_smp_send_reschedule(int cpu) | 475 | static void native_smp_send_reschedule(int cpu) |
473 | { | 476 | { |
474 | WARN_ON(cpu_is_offline(cpu)); | 477 | WARN_ON(cpu_is_offline(cpu)); |
478 | TS_SEND_RESCHED_START(cpu); | ||
475 | send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR); | 479 | send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR); |
476 | } | 480 | } |
477 | 481 | ||
@@ -641,7 +645,9 @@ static void native_smp_send_stop(void) | |||
641 | fastcall void smp_reschedule_interrupt(struct pt_regs *regs) | 645 | fastcall void smp_reschedule_interrupt(struct pt_regs *regs) |
642 | { | 646 | { |
643 | ack_APIC_irq(); | 647 | ack_APIC_irq(); |
648 | set_tsk_need_resched(current); | ||
644 | __get_cpu_var(irq_stat).irq_resched_count++; | 649 | __get_cpu_var(irq_stat).irq_resched_count++; |
650 | TS_SEND_RESCHED_END; | ||
645 | } | 651 | } |
646 | 652 | ||
647 | fastcall void smp_call_function_interrupt(struct pt_regs *regs) | 653 | fastcall void smp_call_function_interrupt(struct pt_regs *regs) |