aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2014-07-23 19:02:48 +0200
committerAlex Shi <alex.shi@linaro.org>2014-12-04 09:18:34 +0800
commit5e036adf41923c9a42e0731ca07595709944558d (patch)
treeb5593f2ad31fd81cfa59791faff53a90e1f5af04
parent33f2f7daa7d07d9c9dc117e4ed7c995f5c0b7c7f (diff)
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> (cherry picked from commit dd38c9d35ba8e40011b36659cae2719aefd11904) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--drivers/cpuidle/driver.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 9634f20e392..e431d11abf8 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -182,10 +182,6 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv)
static int poll_idle(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
- ktime_t t1, t2;
- s64 diff;
-
- t1 = ktime_get();
local_irq_enable();
if (!current_set_polling_and_test()) {
while (!need_resched())
@@ -193,13 +189,6 @@ static int poll_idle(struct cpuidle_device *dev,
}
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;
}