[PATCH v5 0/2] cpufreq: CPPC: add autonomous mode boot parameter support
From: Sumit Gupta
Date: Tue Jun 23 2026 - 04:07:54 EST
This series adds a kernel boot parameter 'cppc_cpufreq.auto_sel_mode'
to enable CPPC autonomous performance selection on all CPUs at system
startup, avoiding per-CPU sysfs scripting at every boot.
When autonomous mode is enabled, the hardware automatically adjusts
CPU performance based on workload demands using Energy Performance
Preference (EPP) hints.
Patch 1: Sets CPPC Enable Register for both OS-driven and autonomous
CPPC control modes. It can be applied independently of patch 2.
Patch 2: Adds the auto_sel_mode boot parameter with three modes:
- performance (or 1): override EPP to performance (0x0)
- balance_performance (or 2): override EPP to balance_performance (0x80)
- default_epp (or 3): preserve EPP value programmed by
BIOS/firmware
Patch 2 relies on commit 8c83947c5dbb ("cpufreq: Use policy->min/max
init as QoS request") so that policy->min/max set during
cppc_cpufreq_cpu_init() are not overridden by cpufreq_set_policy().
v4[4] -> v5:
- Accept "disabled/0" and treat unrecognized auto_sel_mode as disabled.
- Rebased on the merged QoS-constraints and updated commit dependency.
v3[3] -> v4:
- Add 'balance_performance' mode which sets EPP to 0x80.
- Add CPPC_EPP_BALANCE_PERFORMANCE_PREF (0x80) constant in cppc_acpi.h.
- Clean up EPP mode selection with switch + boolean flag in cpu_init.
- Use local variable for kp->arg in auto_sel_mode_set/get to avoid
repeated casts.
Sumit Gupta (2):
cpufreq: CPPC: Set CPPC Enable register in cpu_init
cpufreq: CPPC: add autonomous mode boot parameter support
.../admin-guide/kernel-parameters.txt | 22 +++
drivers/cpufreq/cppc_cpufreq.c | 159 +++++++++++++++++-
include/acpi/cppc_acpi.h | 1 +
3 files changed, 177 insertions(+), 5 deletions(-)
[1] v1: https://lore.kernel.org/lkml/20260317151053.2361475-1-sumitg@xxxxxxxxxx/
[2] v2: https://lore.kernel.org/lkml/20260424201814.230071-1-sumitg@xxxxxxxxxx/
[3] v3: https://lore.kernel.org/lkml/20260515122624.1920637-1-sumitg@xxxxxxxxxx/
[4] v4: https://lore.kernel.org/lkml/20260527202550.206828-1-sumitg@xxxxxxxxxx/
--
2.34.1