From: "Gautham R. Shenoy" <gautham.shenoy@amd.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Mario Limonciello" <mario.limonciello@amd.com>,
Huang Rui <ray.huang@amd.com>, "Perry Yuan" <perry.yuan@amd.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>,
David Wang <00107082@163.com>,
"Gautham R . Shenoy" <gautham.shenoy@amd.com>,
<stable@vger.kernel.org>
Subject: [PATCH 2/3] cpufreq/amd-pstate: Use topology_logical_package_id() instead of logical_die_id()
Date: Tue, 13 Aug 2024 15:21:14 +0530 [thread overview]
Message-ID: <20240813095115.2078-3-gautham.shenoy@amd.com> (raw)
In-Reply-To: <20240813095115.2078-1-gautham.shenoy@amd.com>
After the commit 63edbaa48a57 ("x86/cpu/topology: Add support for the
AMD 0x80000026 leaf"), the topolgy_logical_die_id() function returns
the logical Core Chiplet Die (CCD) ID instead of the logical socket
ID.
Since this is currently used to set MSR_AMD_CPPC_ENABLE, which needs
to be set on any one of the threads of the socket, it is prudent to
use topology_logical_package_id() in place of
topology_logical_die_id().
Fixes: 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf")
cc: stable@vger.kernel.org # 6.10
Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Tested-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
Link: https://lore.kernel.org/lkml/20240801124509.3650-1-Dhananjay.Ugwekar@amd.com/
Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
---
drivers/cpufreq/amd-pstate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 358bd88cd0c5..89bda7a2bb8d 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -321,7 +321,7 @@ static inline int pstate_enable(bool enable)
return 0;
for_each_present_cpu(cpu) {
- unsigned long logical_id = topology_logical_die_id(cpu);
+ unsigned long logical_id = topology_logical_package_id(cpu);
if (test_bit(logical_id, &logical_proc_id_mask))
continue;
--
2.34.1
next prev parent reply other threads:[~2024-08-13 9:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 9:51 [PATCH 0/3] cpufreq/amd-pstate: A set of fixes Gautham R. Shenoy
2024-08-13 9:51 ` [PATCH 1/3] cpufreq: amd-pstate: Fix uninitialized variable in amd_pstate_cpu_boost_update() Gautham R. Shenoy
2024-08-13 9:51 ` Gautham R. Shenoy [this message]
2024-08-13 9:54 ` [PATCH 3/3] cpufreq/amd-pstate: Remove warning for X86_FEATURE_CPPC on Zen1 and Zen2 Gautham R. Shenoy
2024-08-14 9:29 ` Xiaojian Du
2024-08-21 5:41 ` Gautham R. Shenoy
2024-08-22 20:41 ` [PATCH 0/3] cpufreq/amd-pstate: A set of fixes Mario Limonciello
2024-08-23 4:13 ` Gautham R. Shenoy
2024-08-23 15:42 ` Mario Limonciello
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=20240813095115.2078-3-gautham.shenoy@amd.com \
--to=gautham.shenoy@amd.com \
--cc=00107082@163.com \
--cc=Dhananjay.Ugwekar@amd.com \
--cc=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=stable@vger.kernel.org \
--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®