summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAshwin Chaugule <ashwin.chaugule@linaro.org>2016-02-17 20:20:59 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-09 22:35:28 (GMT)
commitad62e1e67751d21a3e15bca9d3ededc73de2cfa0 (patch)
treedbf997513a538ec05b57bf3b73468ebd5ae8b92b /lib
parent2db8f9a1d86aa32a9cbf1a975882b4fa162f040f (diff)
downloadlinux-ad62e1e67751d21a3e15bca9d3ededc73de2cfa0.tar.xz
ACPI / CPPC: Optimize PCC Read Write operations
Previously the send_pcc_cmd() code checked if the PCC operation had completed before returning from the function. This check was performed regardless of the PCC op type (i.e. Read/Write). Knowing the type of cmd can be used to optimize the check and avoid needless waiting. e.g. with Write ops, the actual Writing is done before calling send_pcc_cmd(). And the subsequent Writes will check if the channel is free at the entry of send_pcc_cmd() anyway. However, for Read cmds, we need to wait for the cmd completion bit to be flipped, since the actual Read ops follow after returning from the send_pcc_cmd(). So, only do the looping check at the end for Read ops. Also, instead of using udelay() calls, use ktime as a means to check for deadlines. The current deadline in which the Remote should flip the cmd completion bit is defined as N * Nominal latency. Where N is arbitrary and large enough to work on slow emulators and Nominal latency comes from the ACPI table (PCCT). This helps in working around the CONFIG_HZ effects on udelay() and also avoids needing different ACPI tables for Silicon and Emulation platforms. Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org> Signed-off-by: Prashanth Prakash <pprakash@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions