Skip to content
Snippets Groups Projects
Commit e32fe41e authored by Marcelo Tosatti's avatar Marcelo Tosatti Committed by Yang Yingliang
Browse files

cpuidle: use first valid target residency as poll time

mainline inclusion
from mainline-5.5
commit 36fcb429
category: feature
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34


CVE: NA

Commit 259231a0 ("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: 259231a0 ("cpuidle: add poll_limit_ns to cpuidle_device structure")
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarXiangyou Xie <xiexiangyou@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarJiajun Chen <chenjiajun8@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 35ee25c7
No related branches found
No related tags found
No related merge requests found
......@@ -343,6 +343,7 @@ u64 cpuidle_poll_time(struct cpuidle_driver *drv,
limit_ns = (u64)drv->states[i].target_residency
* NSEC_PER_USEC;
break;
}
dev->poll_limit_ns = limit_ns;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment