提交 1617971c 编写于 作者: D Doug Smythies 提交者: Rafael J. Wysocki

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: 800fb34a ("cpuidle: poll_state: Disregard disable idle states")
Signed-off-by: NDoug Smythies <dsmythies@telus.net>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 f17b5f06
...@@ -21,7 +21,7 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev, ...@@ -21,7 +21,7 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev,
local_irq_enable(); local_irq_enable();
if (!current_set_polling_and_test()) { if (!current_set_polling_and_test()) {
unsigned int loop_count = 0; unsigned int loop_count = 0;
u64 limit = TICK_USEC; u64 limit = TICK_NSEC;
int i; int i;
for (i = 1; i < drv->state_count; i++) { for (i = 1; i < drv->state_count; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册