sched / idle: Call default_idle_call() from cpuidle_enter_state()

The check of the cpuidle_enter() return value against -EBUSY
made in call_cpuidle() will not be necessary any more if
cpuidle_enter_state() calls default_idle_call() directly when it
is about to return -EBUSY, so make that happen and eliminate the
check.

Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Preeti U Murthy <[email protected]>
Tested-by: Preeti U Murthy <[email protected]>
Tested-by: Sudeep Holla <[email protected]>
Acked-by: Kevin Hilman <[email protected]>
This commit is contained in:
Rafael J. Wysocki 2015-05-10 01:18:46 +02:00
commit 827a5aefc5
3 changed files with 11 additions and 14 deletions

View file

@ -167,8 +167,10 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
* local timer will be shut down. If a local timer is used from another
* CPU as a broadcast timer, this call may fail if it is not available.
*/
if (broadcast && tick_broadcast_enter())
if (broadcast && tick_broadcast_enter()) {
default_idle_call();
return -EBUSY;
}
/* Take note of the planned idle state. */
sched_idle_set_state(target_state);