ACPI / CPPC: Fix invalid PCC channel status errors
authorPrakash, Prashanth <pprakash@codeaurora.org>
Tue, 24 Apr 2018 23:10:02 +0000 (17:10 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 May 2018 15:16:22 +0000 (17:16 +0200)
commit58e1c03536c959e0d45fde8261cb9c15da893fe6
treeeee77e862fce70ff73394ed969b1303d8b3d21c1
parentb382bf885269bffaa8444a9310db680f2f0f4151
ACPI / CPPC: Fix invalid PCC channel status errors

Replace the faulty PCC status register polling code with a iopoll.h
macro to fix incorrect reporting of PCC check errors ("PCC check
channel failed").

There were potential codepaths where we could incorrectly return
PCC channel status as busy even without checking the PCC status
register once or not checking the status register before breaking
out of the polling loop. For example, if the thread polling PCC
status register was preempted and scheduled back after we have
crossed the deadline then we can report that the channel is busy
even without checking the status register.

Signed-off-by: Prashanth Prakash <pprakash@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/cppc_acpi.c