cpuidle / ux500 : use CPUIDLE_FLAG_TIMER_STOP flag

Use the CPUIDLE_FLAG_TIMER_STOP and let the cpuidle framework
to handle the CLOCK_EVT_NOTIFY_BROADCAST_ENTER/EXIT when entering
this state.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Daniel Lezcano 2013-03-21 12:21:34 +00:00 committed by Rafael J. Wysocki
parent 8de46eff65
commit d2b578e5fc

View file

@ -30,8 +30,6 @@ static inline int ux500_enter_idle(struct cpuidle_device *dev,
int this_cpu = smp_processor_id(); int this_cpu = smp_processor_id();
bool recouple = false; bool recouple = false;
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &this_cpu);
if (atomic_inc_return(&master) == num_online_cpus()) { if (atomic_inc_return(&master) == num_online_cpus()) {
/* With this lock, we prevent the other cpu to exit and enter /* With this lock, we prevent the other cpu to exit and enter
@ -91,8 +89,6 @@ out:
spin_unlock(&master_lock); spin_unlock(&master_lock);
} }
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &this_cpu);
return index; return index;
} }
@ -106,7 +102,8 @@ static struct cpuidle_driver ux500_idle_driver = {
.enter = ux500_enter_idle, .enter = ux500_enter_idle,
.exit_latency = 70, .exit_latency = 70,
.target_residency = 260, .target_residency = 260,
.flags = CPUIDLE_FLAG_TIME_VALID, .flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_TIMER_STOP,
.name = "ApIdle", .name = "ApIdle",
.desc = "ARM Retention", .desc = "ARM Retention",
}, },