[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260129104817.3752340-3-sumitg@nvidia.com>
Date: Thu, 29 Jan 2026 16:18:12 +0530
From: Sumit Gupta <sumitg@...dia.com>
To: <rafael@...nel.org>, <viresh.kumar@...aro.org>, <pierre.gondois@....com>,
<zhenglifeng1@...wei.com>, <ionela.voinescu@....com>, <lenb@...nel.org>,
<robert.moore@...el.com>, <corbet@....net>, <rdunlap@...radead.org>,
<ray.huang@....com>, <gautham.shenoy@....com>, <mario.limonciello@....com>,
<perry.yuan@....com>, <zhanjie9@...ilicon.com>, <linux-pm@...r.kernel.org>,
<linux-acpi@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<acpica-devel@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
CC: <linux-tegra@...r.kernel.org>, <treding@...dia.com>,
<jonathanh@...dia.com>, <vsethi@...dia.com>, <ksitaraman@...dia.com>,
<sanjayc@...dia.com>, <nhartman@...dia.com>, <bbasu@...dia.com>,
<sumitg@...dia.com>
Subject: [PATCH v7 2/7] ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register
Add a warning during CPPC processor probe if the Desired Performance
register is not supported when it should be.
As per 8.4.6.1.2.3 section of ACPI 6.6 specification,
"The Desired Performance Register is optional only when OSPM indicates
support for CPPC2 in the platform-wide _OSC capabilities and the
Autonomous Selection Enable field is encoded as an Integer with a
value of 1."
In other words:
- In CPPC v1, DESIRED_PERF is mandatory
- In CPPC v2, it becomes optional only when AUTO_SEL_ENABLE is supported
This helps detect firmware configuration issues early during boot.
Link: https://lore.kernel.org/lkml/9fa21599-004a-4af8-acc2-190fd0404e35@nvidia.com/
Suggested-by: Pierre Gondois <pierre.gondois@....com>
Signed-off-by: Sumit Gupta <sumitg@...dia.com>
---
drivers/acpi/cppc_acpi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index de35aeb07833..0eb1a6d54e88 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -854,6 +854,16 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
}
per_cpu(cpu_pcc_subspace_idx, pr->id) = pcc_subspace_id;
+ /*
+ * In CPPC v1, DESIRED_PERF is mandatory. In CPPC v2, it is optional
+ * only when AUTO_SEL_ENABLE is supported.
+ */
+ if (!CPC_SUPPORTED(&cpc_ptr->cpc_regs[DESIRED_PERF]) &&
+ (!osc_sb_cppc2_support_acked ||
+ !CPC_SUPPORTED(&cpc_ptr->cpc_regs[AUTO_SEL_ENABLE])))
+ pr_warn("Desired perf. register is mandatory if CPPC v2 is not supported "
+ "or autonomous selection is disabled\n");
+
/*
* Initialize the remaining cpc_regs as unsupported.
* Example: In case FW exposes CPPC v2, the below loop will initialize
--
2.34.1
Powered by blists - more mailing lists