blob: daccdf50197b21f8b1089ab31c4ab012c45c4c8e [file] [log] [blame]
From 5a0f82bb6118fb1c51e6516ffc3377d7e5e1ef39 Mon Sep 17 00:00:00 2001
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Tue, 9 Mar 2010 17:22:18 +0800
Subject: [PATCH] MIPS: Don't trace irqsoff for idle
commit 5a0f82bb6118fb1c51e6516ffc3377d7e5e1ef39 in tip.
As the X86 platform did in arch/x86/kernel/{process_32.c,process_64.c},
we also don't trace irqsoff for idle.
If "There's no useful work to be done", we don't care about the irqsoff
duration. If we trace for idle, the max duration of irqsoff will be
always as the idle time and eventually make the irqsoff tracer out of
action.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index f3d73e1..87316fc 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -64,8 +64,12 @@ void __noreturn cpu_idle(void)
smtc_idle_loop_hook();
#endif
- if (cpu_wait)
+ if (cpu_wait) {
+ /* Don't trace irqs off for idle */
+ stop_critical_timings();
(*cpu_wait)();
+ start_critical_timings();
+ }
}
#ifdef CONFIG_HOTPLUG_CPU
if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map) &&
--
1.7.1.1