cpufreq: intel_pstate: Use the acpi_pm_profile_server() symbol
Subsystems (2)
PATCH v2 4/4 cpufreq: intel_pstate: Use the acpi_pm_profile_server() symbol
From: Mario Limonciello <[email protected]>
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.
--- drivers/cpufreq/intel_pstate.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
drivers/cpufreq/intel_pstate.c +4 -15
@@ -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,8 +2394,10 @@ static int intel_pstate_init_cpu(unsigned int cpunum)if (hwp_active) {intel_pstate_hwp_enable (cpu); -if (intel_pstate_acpi_pm_profile_server ()) +#ifdef CONFIG_ACPI +if (acpi_pm_profile_server ()) hwp_boost = true; +#endif } }else if (hwp_active) {/*
Signature · 1 line
2.34.1
Rafael J. Wysocki
maintainerQuoted 6 lines · Perry Yuan
From: Mario Limonciello <[email protected]>
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.
And why do you think that it is a good idea to change this behavior?
Quoted 57 lines
Reviewed-by Gautham R. Shenoy <[email protected]>Signed-off-by Mario Limonciello <[email protected]>Signed-off-by Perry Yuan <[email protected]>--- drivers/cpufreq/intel_pstate.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)drivers/cpufreq/intel_pstate.c +4
-16@@ -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,8 +2394,10 @@ static int intel_pstate_init_cpu(unsigned int cpunum)if (hwp_active) {intel_pstate_hwp_enable (cpu); -if (intel_pstate_acpi_pm_profile_server ()) +#ifdef CONFIG_ACPI +if (acpi_pm_profile_server ()) hwp_boost = true; +#endif } }else if (hwp_active) {/* -- 2.34.1
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · Perry Yuan
From: Mario Limonciello <[email protected]>
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.
And why do you think that it is a good idea to change this behavior?
The idea was to cover all possible server types. It seemed that it could be an oversight that it wasn't included initially.
Is that not the case and it is "intentionally" not including "SOHO server"?
Quoted 58 lines
Quoted 58 lines
Reviewed-by Gautham R. Shenoy <[email protected]>Signed-off-by Mario Limonciello <[email protected]>Signed-off-by Perry Yuan <[email protected]>--- drivers/cpufreq/intel_pstate.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)drivers/cpufreq/intel_pstate.c +4
-16@@ -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,8 +2394,10 @@ static int intel_pstate_init_cpu(unsigned int cpunum)if (hwp_active) {intel_pstate_hwp_enable (cpu); -if (intel_pstate_acpi_pm_profile_server ()) +#ifdef CONFIG_ACPI +if (acpi_pm_profile_server ()) hwp_boost = true; +#endif } }else if (hwp_active) {/* -- 2.34.1
Rafael J. Wysocki
maintainerQuoted 10 lines · Mario Limonciello
Quoted 8 lines · Rafael J. Wysocki
Quoted 6 lines · Perry Yuan
From: Mario Limonciello <[email protected]>
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.
Quoted 6 lines
Quoted 1 line
And why do you think that it is a good idea to change this behavior?
The idea was to cover all possible server types. It seemed that it could be an oversight that it wasn't included initially.
Is that not the case and it is "intentionally" not including "SOHO server"?
Yes, it is.