[PATCH 4/4] cpufreq: intel_pstate: Use the acpi_pm_profile_server() symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avoid duplication of functionality by using the generic symbol.
This does have a functional change that intel-pstate will now
match "SOHO server" as well.

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx>
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
 drivers/cpufreq/intel_pstate.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 2548ec92faa2..3a36c0169d82 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -313,18 +313,9 @@ static DEFINE_MUTEX(intel_pstate_limits_lock);
 
 #ifdef CONFIG_ACPI
 
-static bool intel_pstate_acpi_pm_profile_server(void)
-{
-	if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
-	    acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
-		return true;
-
-	return false;
-}
-
 static bool intel_pstate_get_ppc_enable_status(void)
 {
-	if (intel_pstate_acpi_pm_profile_server())
+	if (acpi_pm_profile_server())
 		return true;
 
 	return acpi_ppc;
@@ -481,10 +472,6 @@ static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
 {
 }
 
-static inline bool intel_pstate_acpi_pm_profile_server(void)
-{
-	return false;
-}
 #endif /* CONFIG_ACPI */
 
 #ifndef CONFIG_ACPI_CPPC_LIB
@@ -2407,7 +2394,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
 		if (hwp_active) {
 			intel_pstate_hwp_enable(cpu);
 
-			if (intel_pstate_acpi_pm_profile_server())
+			if (acpi_pm_profile_server())
 				hwp_boost = true;
 		}
 	} else if (hwp_active) {
-- 
2.34.1




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux