forked from Minki/linux
cpuidle: Remove time measurement in poll state
The time measurement is already done in the cpuidle framework in the 'cpuidle_enter_state' function. 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:
parent
3a4a267ee3
commit
dd38c9d35b
|
@ -182,10 +182,6 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv)
|
||||||
static int poll_idle(struct cpuidle_device *dev,
|
static int poll_idle(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv, int index)
|
struct cpuidle_driver *drv, int index)
|
||||||
{
|
{
|
||||||
ktime_t t1, t2;
|
|
||||||
s64 diff;
|
|
||||||
|
|
||||||
t1 = ktime_get();
|
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
if (!current_set_polling_and_test()) {
|
if (!current_set_polling_and_test()) {
|
||||||
while (!need_resched())
|
while (!need_resched())
|
||||||
|
@ -193,13 +189,6 @@ static int poll_idle(struct cpuidle_device *dev,
|
||||||
}
|
}
|
||||||
current_clr_polling();
|
current_clr_polling();
|
||||||
|
|
||||||
t2 = ktime_get();
|
|
||||||
diff = ktime_to_us(ktime_sub(t2, t1));
|
|
||||||
if (diff > INT_MAX)
|
|
||||||
diff = INT_MAX;
|
|
||||||
|
|
||||||
dev->last_residency = (int) diff;
|
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user