]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ACPI / CPPC: Fix invalid PCC channel status errors
authorPrakash, Prashanth <pprakash@codeaurora.org>
Tue, 16 Oct 2018 18:52:37 +0000 (13:52 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 23 Oct 2018 07:20:41 +0000 (09:20 +0200)
commit06a07cec11ed02f5db87f2318698e525cb33a4e7
tree492ea19b31b7f13c269a3c79030d3a5f6df0efa3
parente3d012a021054d2ac2161c1430954ac250dc265b
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.

BugLink: https://bugs.launchpad.net/bugs/1796949
Signed-off-by: Prashanth Prakash <pprakash@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 58e1c03536c959e0d45fde8261cb9c15da893fe6)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/acpi/cppc_acpi.c