]> git.baikalelectronics.ru Git - kernel.git/commit
intel_idle: Simplify LAPIC timer reliability checks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 6 Feb 2020 17:40:54 +0000 (18:40 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 11 Feb 2020 22:34:57 +0000 (23:34 +0100)
commitafce152739e7e1c12bf5d7c86cb940f243952d2d
treed1324c99fe2e2b139b175ea57ad8393c53dbe25b
parent900abd43b6d837ba70928a9ee9599ba3be1d2fb6
intel_idle: Simplify LAPIC timer reliability checks

The lapic_timer_always_reliable variable really takes only two values
and some arithmetic in intel_idle() related to comparing it with the
target C-state's MWAIT hint value is unnecessary.

Simplify the code by replacing lapic_timer_always_reliable with
a bool variable lapic_timer_always_reliable and dropping the
LAPIC_TIMER_ALWAYS_RELIABLE symbol along with the excess
computations in intel_idle().

While at it, add a comment explaining the branch taken in intel_idle()
if the LAPIC timer is only reliable in C1 and modify the related debug
message in intel_idle_init() accordingly (the modification of this
message in the only expected functional impact of the change made
here).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/idle/intel_idle.c