cpuidle: use first valid target residency as poll time
authorMarcelo Tosatti <mtosatti@redhat.com>
Fri, 6 Dec 2019 15:07:41 +0000 (13:07 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 18:56:23 +0000 (19:56 +0100)
commita101ec74bb19bea66ac57ddbe8676e32b1c1ed93
tree3d896f9cbbef9c3cbb54d2573bd0b21054318726
parent18feee7b1cadac8b3f3a1885ff1708826966fa90
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>
drivers/cpuidle/cpuidle.c