From: "Gautham R. Shenoy" <gautham.shenoy@amd.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Mario Limonciello <mario.limonciello@amd.com>,
Yunhui Cui <cuiyunhui@bytedance.com>,
Jeremy Linton <jeremy.linton@arm.com>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
Ionela Voinescu <ionela.voinescu@arm.com>
Cc: <linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Christopher Harris" <chris.harris79@gmail.com>,
<linux-pm@vger.kernel.org>,
"Gautham R. Shenoy" <gautham.shenoy@amd.com>,
"Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org>
Subject: [PATCH v2 4/5] ACPI: CPPC: Limit perf ctrs in PCC check only to online CPUs
Date: Fri, 7 Nov 2025 13:11:44 +0530 [thread overview]
Message-ID: <20251107074145.2340-5-gautham.shenoy@amd.com> (raw)
In-Reply-To: <20251107074145.2340-1-gautham.shenoy@amd.com>
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPU via acpi_soft_cpu_online() --> __acpi_processor_start() -->
acpi_cppc_processor_probe().
However the function cppc_perf_ctrs_in_pcc() checks if the CPPC
perf-ctrs are in a PCC region for all the present CPUs, which breaks
when the kernel is booted with "nosmt=force".
Hence, limit the check only to the online CPUs.
Fixes: ae2df912d1a5 ("ACPI: CPPC: Disable FIE if registers in PCC regions")
Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org>
Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
---
drivers/acpi/cppc_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index fb7696b27d82..f49c72d3a78b 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -1435,7 +1435,7 @@ bool cppc_perf_ctrs_in_pcc(void)
{
int cpu;
- for_each_present_cpu(cpu) {
+ for_each_online_cpu(cpu) {
struct cpc_register_resource *ref_perf_reg;
struct cpc_desc *cpc_desc;
--
2.34.1
next prev parent reply other threads:[~2025-11-07 7:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 7:41 [PATCH v2 0/5] CPPC/amd-pstate: Fixes to limit actions to online CPUs Gautham R. Shenoy
2025-11-07 7:41 ` [PATCH v2 1/5] ACPI: CPPC: Detect preferred core availability on " Gautham R. Shenoy
2025-11-07 7:41 ` [PATCH v2 2/5] ACPI: CPPC: Check _CPC validity for only the " Gautham R. Shenoy
2025-11-07 7:41 ` [PATCH v2 3/5] ACPI: CPPC: Perform fast check switch only for " Gautham R. Shenoy
2025-11-07 7:41 ` Gautham R. Shenoy [this message]
2025-11-07 7:41 ` [PATCH v2 5/5] cpufreq/amd-pstate: Call cppc_set_auto_sel() " Gautham R. Shenoy
2025-11-07 17:41 ` [PATCH v2 0/5] CPPC/amd-pstate: Fixes to limit actions to " Rafael J. Wysocki
2025-11-09 4:04 ` Chris Harris
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=20251107074145.2340-5-gautham.shenoy@amd.com \
--to=gautham.shenoy@amd.com \
--cc=chris.harris79@gmail.com \
--cc=cuiyunhui@bytedance.com \
--cc=ionela.voinescu@arm.com \
--cc=jeremy.linton@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=rafael@kernel.org \
--cc=superm1@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;
as well as URLs for NNTP newsgroup(s).