cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI
Subsystems (2)
PATCH 1/1 cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI
drivers/cpufreq/intel_pstate.c +5 -5
@@ -390,11 +390,6 @@ static int intel_pstate_get_cppc_guranteed(int cpu)static void intel_pstate_set_itmt_prio (int cpu) { } - -static int intel_pstate_get_cppc_guranteed (int cpu) -{ -return -ENOTSUPP ; -}#endif static void intel_pstate_init_acpi_perf_limits (struct cpufreq_policy *policy)
@@ -490,6 +485,11 @@ static inline bool intel_pstate_acpi_pm_profile_server(void) {return false; } + +static int intel_pstate_get_cppc_guranteed (int cpu) +{ +return -ENOTSUPP ; +}#endif static inline void update_turbo_state (void )
Srinivas Pandruvada
maintainerQuoted 2 lines · Dominik Brodowski
Fixes 86d333a8cc7f ("cpufreq: intel_pstate: Add base_frequencyattribute")
Thanks for the fix.
Quoted 11 lines
Cc Srinivas Pandruvada <[email protected]>Cc Rafael J. Wysocki <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Dominik Brodowski <[email protected]>drivers/cpufreq/intel_pstate.c +0
-0
drivers/cpufreq/intel_pstate.c static int intel_pstate_get_cppc_guranteed(int · line 398
Quoted 9 lines
drivers/cpufreq/intel_pstate.c +0
-5@@ -390,11 +390,6 @@ static int intel_pstate_get_cppc_guranteed(int cpu) static void intel_pstate_set_itmt_prio(int cpu) { } - -static int intel_pstate_get_cppc_guranteed (int cpu) -{ -return -ENOTSUPP ; -}
What is ACPI is defined but SCHED_MC_PRIO is not defined? Based on
"select ACPI_CPPC_LIB if X86_64 && ACPI && SCHED_MC_PRIO"
So the above is still required. correct?
Quoted 17 lines
drivers/cpufreq/intel_pstate.c +0
-0#endif static void intel_pstate_init_acpi_perf_limits(struct
cpufreq_policy
*policy)drivers/cpufreq/intel_pstate.c +5
-0@@ -490,6 +485,11 @@ static inline boolintel_pstate_acpi_pm_profile_server (void) {return false; } + +static int intel_pstate_get_cppc_guranteed (int cpu) +{ +return -ENOTSUPP ; +}#endif static inline void
update_turbo_state(void)
Quoted 29 lines · Srinivas Pandruvada
Quoted 2 lines · Dominik Brodowski
Fixes 86d333a8cc7f ("cpufreq: intel_pstate: Add base_frequencyattribute")
Thanks for the fix.
Quoted 11 lines
Cc Srinivas Pandruvada <[email protected]>Cc Rafael J. Wysocki <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Dominik Brodowski <[email protected]>drivers/cpufreq/intel_pstate.c +0
-0drivers/cpufreq/intel_pstate.c static int intel_pstate_get_cppc_guranteed(int · line 398
Quoted 9 lines
drivers/cpufreq/intel_pstate.c +0
-5@@ -390,11 +390,6 @@ static int intel_pstate_get_cppc_guranteed(int cpu) static void intel_pstate_set_itmt_prio(int cpu) { } - -static int intel_pstate_get_cppc_guranteed (int cpu) -{ -return -ENOTSUPP ; -}What is ACPI is defined but
SCHED_MC_PRIOis not defined? Based on
"selectACPI_CPPC_LIBifX86_64&& ACPI &&SCHED_MC_PRIO"
Quoted 1 line
So the above is still required. correct?
Seems so, yes. Though that leads to either complicated #ifdefs or code duplications.
In any case, I'd suggest marking at least nested #else and #endif lines with comments denoting which #ifdef they relate to, e.g.
#else /* CONFIG_ACPI */ #endif /* CONFIG_ACPI */
Thanks,
Dominik
Srinivas Pandruvada
maintainerQuoted 39 lines · Dominik Brodowski
Quoted 32 lines · Srinivas Pandruvada
Quoted 2 lines · Dominik Brodowski
Fixes 86d333a8cc7f ("cpufreq: intel_pstate: Add base_frequencyattribute")
Thanks for the fix.
Quoted 16 lines
Cc Srinivas Pandruvada <[email protected]>Cc Rafael J. Wysocki <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Dominik Brodowski <[email protected]>drivers/cpufreq/intel_pstate.c +0
-0@@ -390,11 +390,6 @@ static intintel_pstate_get_cppc_guranteed(int
cpu)
static voidintel_pstate_set_itmt_prio(int cpu)
{
}drivers/cpufreq/intel_pstate.c static int intel_pstate_get_cppc_guranteed(int cpu) · line 397
Quoted 5 lines
drivers/cpufreq/intel_pstate.c +0
-5- -static int intel_pstate_get_cppc_guranteed (int cpu) -{ -return -ENOTSUPP ; -}What is ACPI is defined but
SCHED_MC_PRIOis not defined? Based on
"selectACPI_CPPC_LIBifX86_64&& ACPI &&SCHED_MC_PRIO"Quoted 1 line
So the above is still required. correct?
Seems so, yes. Though that leads to either complicated #ifdefs or code
duplications.
Quoted 6 lines
In any case, I'd suggest marking at least nested #else and #endif lines
with comments denoting which #ifdef they relate to, e.g.#else /* CONFIG_ACPI */ #endif /* CONFIG_ACPI */
Will you submit a change?
Thanks,
Srinivas
Quoted 3 lines
Thanks,
Dominik
PATCH v2 1/1 cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI
While at it, add a few comments which config options #ifdef and #else statements refer to.
drivers/cpufreq/intel_pstate.c +11 -9
@@ -386,16 +386,11 @@ static int intel_pstate_get_cppc_guranteed(int cpu) return cppc_perf.guaranteed_perf; } -#else +#else /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_set_itmt_prio (int cpu) { } - -static int intel_pstate_get_cppc_guranteed (int cpu) -{ -return -ENOTSUPP ; -} -#endif +#endif /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_init_acpi_perf_limits (struct cpufreq_policy *policy) {
@@ -477,7 +472,7 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy) acpi_processor_unregister_performance(policy->cpu); } -#else +#else /* CONFIG_ACPI */ static inline void intel_pstate_init_acpi_perf_limits (struct cpufreq_policy *policy) { }
@@ -490,7 +485,14 @@ static inline bool intel_pstate_acpi_pm_profile_server(void) {return false; } -#endif +#endif /* CONFIG_ACPI */ + +#ifndef CONFIG_ACPI_CPPC_LIB +static int intel_pstate_get_cppc_guranteed (int cpu) +{ +return -ENOTSUPP ; +} +#endif /* CONFIG_ACPI_CPPC_LIB */ static inline void update_turbo_state (void ) {
Quoted 8 lines · Dominik Brodowski
While at it, add a few comments which config options #ifdef and #else statements refer to.
Fixes 86d333a8cc7f ("cpufreq: intel_pstate: Add base_frequencyattribute")
Cc Srinivas Pandruvada <[email protected]>Cc Rafael J. Wysocki <[email protected]>Signed-off-by Dominik Brodowski <[email protected]>
Quoted 55 lines
drivers/cpufreq/intel_pstate.c +2
-7@@ -386,16 +386,11 @@ static int intel_pstate_get_cppc_guranteed(int cpu)return cppc_perf.guaranteed_perf; } -#else +#else /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_set_itmt_prio (int cpu) { } - -static int intel_pstate_get_cppc_guranteed (int cpu) -{ -return -ENOTSUPP ; -} -#endif +#endif /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy*policy)
{drivers/cpufreq/intel_pstate.c +1
-1@@ -477,7 +472,7 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy) acpi_processor_unregister_performance(policy->cpu); } -#else +#else /* CONFIG_ACPI */ static inline void intel_pstate_init_acpi_perf_limits (struct cpufreq_policy *policy){
}drivers/cpufreq/intel_pstate.c +8
-1@@ -490,7 +485,14 @@ static inline boolintel_pstate_acpi_pm_profile_server (void) {return false; } -#endif +#endif /* CONFIG_ACPI */ + +#ifndef CONFIG_ACPI_CPPC_LIB +static int intel_pstate_get_cppc_guranteed (int cpu) +{ +return -ENOTSUPP ; +} +#endif /* CONFIG_ACPI_CPPC_LIB */ static inline void update_turbo_state (void ){
Quoted 64 lines · CEST Srinivas Pandruvada
Quoted 8 lines · Dominik Brodowski
While at it, add a few comments which config options #ifdef and #else statements refer to.
Fixes 86d333a8cc7f ("cpufreq: intel_pstate: Add base_frequencyattribute")
Cc Srinivas Pandruvada <[email protected]>Cc Rafael J. Wysocki <[email protected]>Signed-off-by Dominik Brodowski <[email protected]>Quoted 53 lines
drivers/cpufreq/intel_pstate.c +2
-7@@ -386,16 +386,11 @@ static int intel_pstate_get_cppc_guranteed(int cpu)return cppc_perf.guaranteed_perf; } -#else +#else /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_set_itmt_prio (int cpu) { } - -static int intel_pstate_get_cppc_guranteed (int cpu) -{ -return -ENOTSUPP ; -} -#endif +#endif /* CONFIG_ACPI_CPPC_LIB */ static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy*policy)
{drivers/cpufreq/intel_pstate.c +1
-1@@ -477,7 +472,7 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy) acpi_processor_unregister_performance(policy->cpu); } -#else +#else /* CONFIG_ACPI */ static inline void intel_pstate_init_acpi_perf_limits (struct cpufreq_policy *policy){
}drivers/cpufreq/intel_pstate.c +8
-1@@ -490,7 +485,14 @@ static inline boolintel_pstate_acpi_pm_profile_server (void) {return false; } -#endif +#endif /* CONFIG_ACPI */ + +#ifndef CONFIG_ACPI_CPPC_LIB +static int intel_pstate_get_cppc_guranteed (int cpu) +{ +return -ENOTSUPP ; +} +#endif /* CONFIG_ACPI_CPPC_LIB */
Quoted 4 lines
Quoted 2 lines
drivers/cpufreq/intel_pstate.c +0
-0static inline void update_turbo_state (void ){
Patch applied, thanks!