History

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.

Pierre Gondois committed 4 years ago

Commit 3cc30dd1 parent 6380b7b3 files · +47 −0Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/acpi/cppc_acpi.h+5−0
@@ -141,6 +141,7 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls); · 140 unmodified lines
141extern int cppc_set_enable(int cpu, bool enable);141extern int cppc_set_enable(int cpu, bool enable);
142extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);142extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
143extern bool acpi_cpc_valid(void);143extern bool acpi_cpc_valid(void);
144extern bool cppc_allow_fast_switch(void);
144extern int acpi_get_psd_map(unsigned int cpu, struct cppc_cpudata *cpu_data);145extern int acpi_get_psd_map(unsigned int cpu, struct cppc_cpudata *cpu_data);
145extern unsigned int cppc_get_transition_latency(int cpu);146extern unsigned int cppc_get_transition_latency(int cpu);
146extern bool cpc_ffh_supported(void);147extern 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}
179static inline bool cppc_allow_fast_switch(void)
180{
181 return false;
182}
178static inline unsigned int cppc_get_transition_latency(int cpu)183static inline unsigned int cppc_get_transition_latency(int cpu)
179{184{
180 return CPUFREQ_ETERNAL;185 return CPUFREQ_ETERNAL;