Re: [PATCH v5 1/2] cpufreq: CPPC: Set CPPC Enable register in cpu_init
From: Sumit Gupta
Date: Thu Nov 05 2026 - 08:44:30 EST
On 05/11/26 15:21, Jiri Benc wrote:
External email: Use caution opening links or attachments
On Tue, 23 Jun 2026 13:36:51 +0530, Sumit Gupta wrote:
As per ACPI 6.x s8.4.6.1.4 (CPPC Enable register):
"If supported by the platform, OSPM writes a one to this register
to enable CPPC on this processor. If not implemented, OSPM assumes
the platform always has CPPC enabled."
Call cppc_set_enable() at the start of cppc_cpufreq_cpu_init() so
this is done for both OS-driven and autonomous CPPC control modes.
Errors are logged but non-fatal as the register is optional.
Sumit, given this is a bug fix to the CPPC driver (e.g. NVIDIA GB10
doesn't enable CPPC without writing the register, keeping the CPUs
always at the lowest freq) and is largely unrelated to the autonomous
mode feature, could you please resubmit this as a standalone patch?
Thanks!
Jiri
Posted separately.
https://lore.kernel.org/lkml/20261105123244.3132560-1-sumitg@xxxxxxxxxx/
Thanks,
Sumit
Signed-off-by: Sumit Gupta <sumitg@xxxxxxxxxx>
---
drivers/cpufreq/cppc_cpufreq.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index f6cea0c54dd9..f7a47576717a 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -655,6 +655,14 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
caps = &cpu_data->perf_caps;
policy->driver_data = cpu_data;
+ /*
+ * Enable CPPC for both OS-driven and autonomous modes.
+ * The Enable register is optional - some platforms may not support it
+ */
+ ret = cppc_set_enable(cpu, true);
+ if (ret && ret != -EOPNOTSUPP)
+ pr_warn("Failed to enable CPPC for CPU%d (%d)\n", cpu, ret);
+
/*
* Set min to lowest nonlinear perf to avoid any efficiency penalty (see
* Section 8.4.7.1.1.5 of ACPI 6.1 spec)