From 7a7ac952d5217b2f568e5ef91ac39b572e166f24 Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Wed, 10 Mar 2010 00:27:28 +0800 Subject: [PATCH] MIPS: Trace: Don't trace irqsoff for the idle process Like x86 did in arch/x86/kernel/{process_32.c,process_64.c}, 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 the idle process, the max duration of irqsoff will be the idle time and make the irqsoff tracer useless. Signed-off-by: Wu Zhangjin Cc: linux-mips@linux-mips.org Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Patchwork: http://patchwork.linux-mips.org/patch/1044/ Signed-off-by: Ralf Baechle --- arch/mips/kernel/process.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 463b71b90a00..99960940d4a4 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -63,8 +63,13 @@ 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) && -- 2.30.2