提交 55952de7 编写于 作者: D Dominik Brodowski 提交者: Caspar Zhang

cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI

fix #29051137

commit 5906056e52e9ee5e130d880443e83016f892b5dd upstream

While at it, add a few comments which config options #ifdef
and #else statements refer to.

Fixes: 86d333a8cc7f (cpufreq: intel_pstate: Add base_frequency attribute)
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Acked-by: NCaspar Zhang <caspar@linux.alibaba.com>
上级 b2607733
...@@ -386,16 +386,11 @@ static int intel_pstate_get_cppc_guranteed(int cpu) ...@@ -386,16 +386,11 @@ static int intel_pstate_get_cppc_guranteed(int cpu)
return cppc_perf.guaranteed_perf; return cppc_perf.guaranteed_perf;
} }
#else #else /* CONFIG_ACPI_CPPC_LIB */
static void intel_pstate_set_itmt_prio(int cpu) static void intel_pstate_set_itmt_prio(int cpu)
{ {
} }
#endif /* CONFIG_ACPI_CPPC_LIB */
static int intel_pstate_get_cppc_guranteed(int cpu)
{
return -ENOTSUPP;
}
#endif
static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy) 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) ...@@ -477,7 +472,7 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
acpi_processor_unregister_performance(policy->cpu); acpi_processor_unregister_performance(policy->cpu);
} }
#else #else /* CONFIG_ACPI */
static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy) 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) ...@@ -490,7 +485,14 @@ static inline bool intel_pstate_acpi_pm_profile_server(void)
{ {
return false; 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) static inline void update_turbo_state(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册