diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-07-23 13:02:48 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-28 19:37:57 -0400 |
commit | dd38c9d35ba8e40011b36659cae2719aefd11904 (patch) | |
tree | 0ff503933e0a8b71dd850e19b30d6395e23abeb8 /drivers/cpuidle | |
parent | 3a4a267ee3d8f3f26ca76982a1e37fd8d783c1cd (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>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/driver.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 9634f20e3926..e431d11abf8d 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c | |||
@@ -182,10 +182,6 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv) | |||
182 | static int poll_idle(struct cpuidle_device *dev, | 182 | static int poll_idle(struct cpuidle_device *dev, |
183 | struct cpuidle_driver *drv, int index) | 183 | struct cpuidle_driver *drv, int index) |
184 | { | 184 | { |
185 | ktime_t t1, t2; | ||
186 | s64 diff; | ||
187 | |||
188 | t1 = ktime_get(); | ||
189 | local_irq_enable(); | 185 | local_irq_enable(); |
190 | if (!current_set_polling_and_test()) { | 186 | if (!current_set_polling_and_test()) { |
191 | while (!need_resched()) | 187 | while (!need_resched()) |
@@ -193,13 +189,6 @@ static int poll_idle(struct cpuidle_device *dev, | |||
193 | } | 189 | } |
194 | current_clr_polling(); | 190 | current_clr_polling(); |
195 | 191 | ||
196 | t2 = ktime_get(); | ||
197 | diff = ktime_to_us(ktime_sub(t2, t1)); | ||
198 | if (diff > INT_MAX) | ||
199 | diff = INT_MAX; | ||
200 | |||
201 | dev->last_residency = (int) diff; | ||
202 | |||
203 | return index; | 192 | return index; |
204 | } | 193 | } |
205 | 194 | ||