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.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -141,6 +141,7 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); · 140 unmodified lines | |||
| 141 | extern int cppc_set_enable(int cpu, bool enable); | 141 | extern int cppc_set_enable(int cpu, bool enable); |
| 142 | extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps); | 142 | extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps); |
| 143 | extern bool acpi_cpc_valid(void); | 143 | extern bool acpi_cpc_valid(void); |
| 144 | extern bool cppc_allow_fast_switch(void); | ||
| 144 | extern int acpi_get_psd_map(unsigned int cpu, struct cppc_cpudata *cpu_data); | 145 | extern int acpi_get_psd_map(unsigned int cpu, struct cppc_cpudata *cpu_data); |
| 145 | extern unsigned int cppc_get_transition_latency(int cpu); | 146 | extern unsigned int cppc_get_transition_latency(int cpu); |
| 146 | extern bool cpc_ffh_supported(void); | 147 | extern bool cpc_ffh_supported(void); |
| @@ -175,6 +176,10 @@ static inline bool acpi_cpc_valid(void) · 28 unmodified lines | |||
| 175 | { | 176 | { |
| 176 | return false; | 177 | return false; |
| 177 | } | 178 | } |
| 179 | static inline bool cppc_allow_fast_switch(void) | ||
| 180 | { | ||
| 181 | return false; | ||
| 182 | } | ||
| 178 | static inline unsigned int cppc_get_transition_latency(int cpu) | 183 | static inline unsigned int cppc_get_transition_latency(int cpu) |
| 179 | { | 184 | { |
| 180 | return CPUFREQ_ETERNAL; | 185 | return CPUFREQ_ETERNAL; |