From: Mario Limonciello <mario.limonciello@amd.com>
To: Huang Rui <ray.huang@amd.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Robert Moore <robert.moore@intel.com>,
<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-pm@vger.kernel.org>, <devel@acpica.org>,
Gautham Ranjal Shenoy <gautham.shenoy@amd.com>,
"Wyes Karny" <Wyes.Karny@amd.com>,
Perry Yuan <perry.yuan@amd.com>,
"Mario Limonciello" <mario.limonciello@amd.com>
Subject: [PATCH 4/4] cpufreq: intel_pstate: Use the acpi_pm_profile_server() symbol
Date: Mon, 5 Jun 2023 10:11:33 -0500 [thread overview]
Message-ID: <20230605151133.2615-5-mario.limonciello@amd.com> (raw)
In-Reply-To: <20230605151133.2615-1-mario.limonciello@amd.com>
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@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
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
next prev parent reply other threads:[~2023-06-05 15:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 15:11 [PATCH 0/4] Enable amd-pstate active mode by default Mario Limonciello
2023-06-05 15:11 ` [PATCH 1/4] ACPI: CPPC: Add a symbol to check if the preferred profile is a server Mario Limonciello
2023-06-05 15:11 ` [PATCH 2/4] cpufreq: amd-pstate: Set a fallback policy based on preferred_profile Mario Limonciello
2023-06-05 15:11 ` [PATCH 3/4] cpufreq: amd-pstate: Add a kernel config option to set default mode Mario Limonciello
2023-06-05 15:11 ` Mario Limonciello [this message]
2023-06-13 10:09 ` [PATCH 4/4] cpufreq: intel_pstate: Use the acpi_pm_profile_server() symbol kernel test robot
2023-06-05 16:07 ` [PATCH 0/4] Enable amd-pstate active mode by default Yuan, Perry
2023-06-05 16:10 ` Yuan, Perry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230605151133.2615-5-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=Wyes.Karny@amd.com \
--cc=devel@acpica.org \
--cc=gautham.shenoy@amd.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=robert.moore@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®