ACPI / CPPC: optimized cpc_read and cpc_write
authorPrakash, Prashanth <pprakash@codeaurora.org>
Wed, 17 Feb 2016 20:21:00 +0000 (13:21 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 22:35:29 +0000 (23:35 +0100)
commit77e3d86f2f8c533c9c72fb5585b623b447d9bd57
tree48f2f638b65d7cdd25406d07b981c07ec1f7633d
parentad62e1e67751d21a3e15bca9d3ededc73de2cfa0
ACPI / CPPC: optimized cpc_read and cpc_write

cpc_read and cpc_write are used while holding the pcc_lock spin_lock,
so they need to be as fast as possible. acpi_os_read/write_memory
APIs linearly search through a list for cached mapping which is
quite expensive. Since the PCC subspace is already mapped into
virtual address space during initialization, we can just add the
offset and access the necessary CPPC registers.

This patch + similar changes to PCC driver reduce the time per freq.
transition from around 200us to about 20us for the CPPC cpufreq
driver.

Signed-off-by: Prashanth Prakash <pprakash@codeaurora.org>
Acked-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/cppc_acpi.c
This page took 0.02486 seconds and 5 git commands to generate.