]> git.baikalelectronics.ru Git - kernel.git/commit
sched / idle: Call idle_set_state() from cpuidle_enter_state()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 9 May 2015 23:18:03 +0000 (01:18 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 14 May 2015 19:35:10 +0000 (21:35 +0200)
commit6e42356411c1f96293d2eb366b37994f88f449fd
tree36f4bf459d2dfdda68a891228af94aebbf951c95
parenta3397900d227ef8d9503008634cb86d3dba12995
sched / idle: Call idle_set_state() from cpuidle_enter_state()

Introduce a wrapper function around idle_set_state() called
sched_idle_set_state() that will pass this_rq() to it as the
first argument and make cpuidle_enter_state() call the new
function before and after entering the target state.

At the same time, remove direct invocations of idle_set_state()
from call_cpuidle().

This will allow the invocation of default_idle_call() to be
moved from call_cpuidle() to cpuidle_enter_state() safely
and call_cpuidle() to be simplified a bit as a result.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Tested-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
drivers/cpuidle/cpuidle.c
include/linux/cpuidle.h
kernel/sched/idle.c