diff options
author | Doug Smythies <doug.smythies@gmail.com> | 2019-01-30 11:28:22 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-01-30 16:57:42 -0500 |
commit | 1617971c6616c87185cbc78fa1a86dfc70dd16b6 (patch) | |
tree | 6d4193af95c5cb6703ecef6f140d7d3053983d36 /drivers/cpuidle | |
parent | f17b5f06cb92ef2250513a1e154c47b78df07d40 (diff) |
cpuidle: poll_state: Fix default time limit
The default time is declared in units of microsecnds,
but is used as nanoseconds, resulting in significant
accounting errors for idle state 0 time when all idle
states deeper than 0 are disabled.
Under these unusual conditions, we don't really care
about the poll time limit anyhow.
Fixes: 800fb34a99ce ("cpuidle: poll_state: Disregard disable idle states")
Signed-off-by: Doug Smythies <dsmythies@telus.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/poll_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c index b17d153e724f..23a1b27579a5 100644 --- a/drivers/cpuidle/poll_state.c +++ b/drivers/cpuidle/poll_state.c | |||
@@ -21,7 +21,7 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev, | |||
21 | local_irq_enable(); | 21 | local_irq_enable(); |
22 | if (!current_set_polling_and_test()) { | 22 | if (!current_set_polling_and_test()) { |
23 | unsigned int loop_count = 0; | 23 | unsigned int loop_count = 0; |
24 | u64 limit = TICK_USEC; | 24 | u64 limit = TICK_NSEC; |
25 | int i; | 25 | int i; |
26 | 26 | ||
27 | for (i = 1; i < drv->state_count; i++) { | 27 | for (i = 1; i < drv->state_count; i++) { |