Skip to content

Commit b3e45fb

Browse files
Sumit Guptarafaeljw
authored andcommitted
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@arm.com> Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com> Link: https://patch.msgid.link/20260206142658.72583-3-sumitg@nvidia.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 658fa7b commit b3e45fb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/acpi/cppc_acpi.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,16 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
853853
}
854854
per_cpu(cpu_pcc_subspace_idx, pr->id) = pcc_subspace_id;
855855

856+
/*
857+
* In CPPC v1, DESIRED_PERF is mandatory. In CPPC v2, it is optional
858+
* only when AUTO_SEL_ENABLE is supported.
859+
*/
860+
if (!CPC_SUPPORTED(&cpc_ptr->cpc_regs[DESIRED_PERF]) &&
861+
(!osc_sb_cppc2_support_acked ||
862+
!CPC_SUPPORTED(&cpc_ptr->cpc_regs[AUTO_SEL_ENABLE])))
863+
pr_warn("Desired perf. register is mandatory if CPPC v2 is not supported "
864+
"or autonomous selection is disabled\n");
865+
856866
/*
857867
* Initialize the remaining cpc_regs as unsupported.
858868
* Example: In case FW exposes CPPC v2, the below loop will initialize

0 commit comments

Comments
 (0)