From: Wu Zhangjin <wuzhangjin@xxxxxxxxx> 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 the idle time and eventually make the irqsoff tracer out of action. Signed-off-by: Wu Zhangjin <wuzhangjin@xxxxxxxxx> --- arch/mips/kernel/process.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index f3d73e1..87d19dd 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -64,8 +64,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) && -- 1.7.0.1