Skip to content

Commit da8afb1

Browse files
committed
cpufreq/amd-pstate: add kernel command line to override dynamic epp
Add `amd_dynamic_epp=enable` and `amd_dynamic_epp=disable` to override the kernel configuration option `CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP` locally. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
1 parent e30ca6d commit da8afb1

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,13 @@ Kernel parameters
493493
disable
494494
Disable amd-pstate preferred core.
495495

496+
amd_dynamic_epp=
497+
[X86]
498+
disable
499+
Disable amd-pstate dynamic EPP.
500+
enable
501+
Enable amd-pstate dynamic EPP.
502+
496503
amijoy.map= [HW,JOY] Amiga joystick support
497504
Map of devices attached to JOY0DAT and JOY1DAT
498505
Format: <a>,<b>

Documentation/admin-guide/pm/amd-pstate.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,13 @@ For systems that support ``amd-pstate`` preferred core, the core rankings will
474474
always be advertised by the platform. But OS can choose to ignore that via the
475475
kernel parameter ``amd_prefcore=disable``.
476476

477+
``amd_dynamic_epp``
478+
479+
When AMD pstate is in auto mode, dynamic EPP will control whether the kernel
480+
autonomously changes the EPP mode. The default is configured by
481+
``CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP`` but can be explicitly enabled with
482+
``amd_dynamic_epp=enable`` or disabled with ``amd_dynamic_epp=disable``.
483+
477484
User Space Interface in ``sysfs`` - General
478485
===========================================
479486

drivers/cpufreq/amd-pstate.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,8 +2227,19 @@ static int __init amd_prefcore_param(char *str)
22272227
return 0;
22282228
}
22292229

2230+
static int __init amd_dynamic_epp_param(char *str)
2231+
{
2232+
if (!strcmp(str, "disable"))
2233+
dynamic_epp = false;
2234+
if (!strcmp(str, "enable"))
2235+
dynamic_epp = true;
2236+
2237+
return 0;
2238+
}
2239+
22302240
early_param("amd_pstate", amd_pstate_param);
22312241
early_param("amd_prefcore", amd_prefcore_param);
2242+
early_param("amd_dynamic_epp", amd_dynamic_epp_param);
22322243

22332244
MODULE_AUTHOR("Huang Rui <ray.huang@amd.com>");
22342245
MODULE_DESCRIPTION("AMD Processor P-state Frequency Driver");

0 commit comments

Comments
 (0)