cpufreq: CPPC: Enable fast_switch
authorPierre Gondois <Pierre.Gondois@arm.com>
Wed, 18 May 2022 09:09:00 +0000 (11:09 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 19 May 2022 17:45:34 +0000 (19:45 +0200)
commit3cc30dd00a580ca0c9c0b01639841cfd72d10129
treeee1594495bd71716abe6d4dc3cc9091b137c2375
parent6380b7b2b29da9d9c5ab2d4a265901cd93ba3696
cpufreq: CPPC: Enable fast_switch

The communication mean of the _CPC desired performance can be
PCC, System Memory, System IO, or Functional Fixed Hardware.

commit b7898fda5bc7 ("cpufreq: Support for fast frequency switching")
fast_switching is 'for switching CPU frequencies from interrupt
context'.
Writes to SystemMemory and SystemIo are fast and suitable this.
This is not the case for PCC and might not be the case for FFH.

Enable fast_switching for the cppc_cpufreq driver in above cases.

Add cppc_allow_fast_switch() to check the desired performance
register address space and set fast_switching accordingly.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/cppc_acpi.c
drivers/cpufreq/cppc_cpufreq.c
include/acpi/cppc_acpi.h