summaryrefslogtreecommitdiff
path: root/kernel/sched
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-08-12 12:27:10 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-08-26 12:41:54 +0200
commit9864f5b5943ab0f1f835f21dc3f9f068d06f5b52 (patch)
treea2416a792abbf0f2bf7699b2918b33c3c7874b9e /kernel/sched
parentbf9282dc26e7fe2a0736edc568762f0f05d12416 (diff)
cpuidle: Move trace_cpu_idle() into generic code
Remove trace_cpu_idle() from the arch_cpu_idle() implementations and put it in the generic code, right before disabling RCU. Gets rid of more trace_*_rcuidle() users. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Marco Elver <elver@google.com> Link: https://lkml.kernel.org/r/20200821085348.428433395@infradead.org
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/idle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index ea3a0989dc4c..f324dc36fc43 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -91,11 +91,14 @@ void __cpuidle default_idle_call(void)
if (current_clr_polling_and_test()) {
local_irq_enable();
} else {
+
+ trace_cpu_idle(1, smp_processor_id());
stop_critical_timings();
rcu_idle_enter();
arch_cpu_idle();
rcu_idle_exit();
start_critical_timings();
+ trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());
}
}