aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-10-23 15:54:04 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-10-25 12:37:06 -0400
commit5906056e52e9ee5e130d880443e83016f892b5dd (patch)
treef85acc4d14570244db7f37cbff197c6692f6ba36
parentbd6bf7c10484f026505814b690104cdef27ed460 (diff)
cpufreq: intel_pstate: Fix compilation for !CONFIG_ACPI
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: Dominik Brodowski <linux@dominikbrodowski.net> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 49c0abf2d48f..9578312e43f2 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -386,16 +386,11 @@ static int intel_pstate_get_cppc_guranteed(int cpu)
386 return cppc_perf.guaranteed_perf; 386 return cppc_perf.guaranteed_perf;
387} 387}
388 388
389#else 389#else /* CONFIG_ACPI_CPPC_LIB */
390static void intel_pstate_set_itmt_prio(int cpu) 390static void intel_pstate_set_itmt_prio(int cpu)
391{ 391{
392} 392}
393 393#endif /* CONFIG_ACPI_CPPC_LIB */
394static int intel_pstate_get_cppc_guranteed(int cpu)
395{
396 return -ENOTSUPP;
397}
398#endif
399 394
400static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy) 395static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
401{ 396{
@@ -477,7 +472,7 @@ static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
477 472
478 acpi_processor_unregister_performance(policy->cpu); 473 acpi_processor_unregister_performance(policy->cpu);
479} 474}
480#else 475#else /* CONFIG_ACPI */
481static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy) 476static inline void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
482{ 477{
483} 478}
@@ -490,7 +485,14 @@ static inline bool intel_pstate_acpi_pm_profile_server(void)
490{ 485{
491 return false; 486 return false;
492} 487}
493#endif 488#endif /* CONFIG_ACPI */
489
490#ifndef CONFIG_ACPI_CPPC_LIB
491static int intel_pstate_get_cppc_guranteed(int cpu)
492{
493 return -ENOTSUPP;
494}
495#endif /* CONFIG_ACPI_CPPC_LIB */
494 496
495static inline void update_turbo_state(void) 497static inline void update_turbo_state(void)
496{ 498{