diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2019-12-06 13:07:41 -0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-17 19:56:23 +0100 |
commit | a101ec74bb19bea66ac57ddbe8676e32b1c1ed93 (patch) | |
tree | 3d896f9cbbef9c3cbb54d2573bd0b21054318726 /drivers/cpuidle | |
parent | 18feee7b1cadac8b3f3a1885ff1708826966fa90 (diff) |
cpuidle: use first valid target residency as poll time
commit 36fcb4292473cb9c9ce7706d038bcf0eda5cabeb upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 0895b988fa92..29d2d7a21bd7 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -384,6 +384,7 @@ u64 cpuidle_poll_time(struct cpuidle_driver *drv, continue; limit_ns = (u64)drv->states[i].target_residency * NSEC_PER_USEC; + break; } dev->poll_limit_ns = limit_ns; |