summaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2019-12-06 13:07:41 -0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-12-09 10:37:16 +0100
commit36fcb4292473cb9c9ce7706d038bcf0eda5cabeb (patch)
treea7ef4aa9d5753e0abf72be184666790e424cf905 /drivers/cpuidle
parente42617b825f8073569da76dc4510bfa019b1c35a (diff)
downloadlinux-36fcb4292473cb9c9ce7706d038bcf0eda5cabeb.tar.gz
linux-36fcb4292473cb9c9ce7706d038bcf0eda5cabeb.tar.bz2
linux-36fcb4292473cb9c9ce7706d038bcf0eda5cabeb.zip
cpuidle: use first valid target residency as poll time
Commit 259231a04561 ("cpuidle: add poll_limit_ns to cpuidle_device structure") changed, by mistake, the target residency from the first available sleep state to the last available sleep state (which should be longer). This might cause excessive polling. Fixes: 259231a04561 ("cpuidle: add poll_limit_ns to cpuidle_device structure") Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Cc: 5.4+ <stable@vger.kernel.org> # 5.4+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 0005be5ea2b4..15877b431143 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -382,6 +382,7 @@ u64 cpuidle_poll_time(struct cpuidle_driver *drv,
continue;
limit_ns = (u64)drv->states[i].target_residency_ns;
+ break;
}
dev->poll_limit_ns = limit_ns;