<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/cpufreq/amd-pstate.h, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://www.git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://www.git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/'/>
<updated>2026-04-02T16:30:19Z</updated>
<entry>
<title>cpufreq/amd-pstate-ut: Add a unit test for raw EPP</title>
<updated>2026-04-02T16:30:19Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
<email>superm1@kernel.org</email>
</author>
<published>2026-03-29T20:38:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=7e173bc310d2b1df018edc66334a5304305889a2'/>
<id>urn:sha1:7e173bc310d2b1df018edc66334a5304305889a2</id>
<content type='text'>
Ensure that all supported raw EPP values work properly.

Export the driver helpers used by the test module so the test can drive
raw EPP writes and temporarily disable dynamic EPP while it runs.

Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>cpufreq/amd-pstate: Add support for raw EPP writes</title>
<updated>2026-04-02T16:29:25Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
<email>superm1@kernel.org</email>
</author>
<published>2026-03-29T20:38:10Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=6927f21852f38db2975b5d5539cbe5241c25a99b'/>
<id>urn:sha1:6927f21852f38db2975b5d5539cbe5241c25a99b</id>
<content type='text'>
The energy performance preference field of the CPPC request MSR
supports values from 0 to 255, but the strings only offer 4 values.

The other values are useful for tuning the performance of some
workloads.

Add support for writing the raw energy performance preference value
to the sysfs file.  If the last value written was an integer then
an integer will be returned.  If the last value written was a string
then a string will be returned.

Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>cpufreq/amd-pstate: Add support for platform profile class</title>
<updated>2026-04-02T16:29:15Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
<email>superm1@kernel.org</email>
</author>
<published>2026-03-29T20:38:09Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=798c47593ccae7dd36c033e557f3f364a2056b9e'/>
<id>urn:sha1:798c47593ccae7dd36c033e557f3f364a2056b9e</id>
<content type='text'>
The platform profile core allows multiple drivers and devices to
register platform profile support.

When the legacy platform profile interface is used all drivers will
adjust the platform profile as well.

Add support for registering every CPU with the platform profile handler
when dynamic EPP is enabled.

The end result will be that changing the platform profile will modify
EPP accordingly.

Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>cpufreq/amd-pstate: Add dynamic energy performance preference</title>
<updated>2026-04-02T16:29:02Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
<email>superm1@kernel.org</email>
</author>
<published>2026-03-29T20:38:07Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=e30ca6dd5345c5b8ba05f346a8e81105352fe571'/>
<id>urn:sha1:e30ca6dd5345c5b8ba05f346a8e81105352fe571</id>
<content type='text'>
Dynamic energy performance preference changes the EPP profile based on
whether the machine is running on AC or DC power.

A notification chain from the power supply core is used to adjust EPP
values on plug in or plug out events.

When enabled, the driver exposes a sysfs toggle for dynamic EPP, blocks
manual writes to energy_performance_preference while it "owns" the EPP
updates.

For non-server systems:
    * the default EPP for AC mode is `performance`.
    * the default EPP for DC mode is `balance_performance`.

For server systems dynamic EPP is mostly a no-op.

Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>cpufreq/amd-pstate: Cache the max frequency in cpudata</title>
<updated>2026-04-02T16:28:54Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
<email>superm1@kernel.org</email>
</author>
<published>2026-03-26T19:36:20Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=8cdc494013dfcd48f31eafe19b18fd67c224dd8a'/>
<id>urn:sha1:8cdc494013dfcd48f31eafe19b18fd67c224dd8a</id>
<content type='text'>
The value of maximum frequency is fixed and never changes. Doing
calculations every time based off of perf is unnecessary.

Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Link: https://lore.kernel.org/r/20260326193620.649441-1-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>amd-pstate-ut: Add a testcase to validate the visibility of driver attributes</title>
<updated>2026-04-02T16:28:40Z</updated>
<author>
<name>Gautham R. Shenoy</name>
<email>gautham.shenoy@amd.com</email>
</author>
<published>2026-03-26T11:47:53Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=3b90e5a4176acacc6781b9ac84cdc5ac53671eee'/>
<id>urn:sha1:3b90e5a4176acacc6781b9ac84cdc5ac53671eee</id>
<content type='text'>
amd-pstate driver has per-attribute visibility functions to
dynamically control which sysfs freq_attrs are exposed based on the
platform capabilities and the current amd_pstate mode. However, there
is no test coverage to validate that the driver's live attribute list
matches the expected visibility for each mode.

Add amd_pstate_ut_check_freq_attrs() to the amd-pstate unit test
module. For each enabled mode (passive, active, guided), the test
independently derives the expected visibility of each attribute:
  - Core attributes (max_freq, lowest_nonlinear_freq, highest_perf)
    are always expected.
  - Prefcore attributes (prefcore_ranking, hw_prefcore) are expected
    only when cpudata-&gt;hw_prefcore indicates platform support.
  - EPP attributes (energy_performance_preference,
    energy_performance_available_preferences) are expected only in
    active mode.
  - Floor frequency attributes (floor_freq, floor_count) are expected
    only when X86_FEATURE_CPPC_PERF_PRIO is present.

Compare these independent expectations against the live driver's attr
array, catching bugs such as attributes leaking into wrong modes or
visibility functions checking incorrect conditions.

Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>amd-pstate: Add sysfs support for floor_freq and floor_count</title>
<updated>2026-04-02T16:28:28Z</updated>
<author>
<name>Gautham R. Shenoy</name>
<email>gautham.shenoy@amd.com</email>
</author>
<published>2026-03-26T11:47:50Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=b9f103d0968bc5b33bff1b1eb11c756b2ac07c6c'/>
<id>urn:sha1:b9f103d0968bc5b33bff1b1eb11c756b2ac07c6c</id>
<content type='text'>
When Floor Performance feature is supported by the platform, expose
two sysfs files:

   * amd_pstate_floor_freq to allow userspace to request the floor
     frequency for each CPU.

   * amd_pstate_floor_count which advertises the number of distinct
     levels of floor frequencies supported on this platform.

Reset the floor_perf to bios_floor_perf in the suspend, offline, and
exit paths, and restore the value to the cached user-request
floor_freq on the resume and online paths mirroring how bios_min_perf
is handled for MSR_AMD_CPPC_REQ.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>amd-pstate: Add support for CPPC_REQ2 and FLOOR_PERF</title>
<updated>2026-04-02T16:28:24Z</updated>
<author>
<name>Gautham R. Shenoy</name>
<email>gautham.shenoy@amd.com</email>
</author>
<published>2026-03-26T11:47:49Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=97838281f587a9e98e74b913201f7408214b5999'/>
<id>urn:sha1:97838281f587a9e98e74b913201f7408214b5999</id>
<content type='text'>
Some future AMD processors have feature named "CPPC Performance
Priority" which lets userspace specify different floor performance
levels for different CPUs. The platform firmware takes these different
floor performance levels into consideration while throttling the CPUs
under power/thermal constraints. The presence of this feature is
indicated by bit 16 of the EDX register for CPUID leaf
0x80000007. More details can be found in AMD Publication titled "AMD64
Collaborative Processor Performance Control (CPPC) Performance
Priority" Revision 1.10.

The number of distinct floor performance levels supported on the
platform will be advertised through the bits 32:39 of the
MSR_AMD_CPPC_CAP1. Bits 0:7 of a new MSR MSR_AMD_CPPC_REQ2
(0xc00102b5) will be used to specify the desired floor performance
level for that CPU.

Add support for the aforementioned MSR_AMD_CPPC_REQ2, and macros for
parsing and updating the relevant bits from MSR_AMD_CPPC_CAP1 and
MSR_AMD_CPPC_REQ2.

On boot if the default value of the MSR_AMD_CPPC_REQ2[7:0] (Floor
Perf) is lower than CPPC.lowest_perf, and thus invalid, initialize it
to MSR_AMD_CPPC_CAP1.nominal_perf which is a sane default value.

Save the boot-time floor_perf during amd_pstate_init_floor_perf(). In
a subsequent patch it will be restored in the suspend, offline, and
exit paths, mirroring how bios_min_perf is handled for
MSR_AMD_CPPC_REQ.

Link: https://docs.amd.com/v/u/en-US/69206_1.10_AMD64_CPPC_PUB
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
</content>
</entry>
<entry>
<title>amd-pstate-ut: Reset amd-pstate driver mode after running selftests</title>
<updated>2025-05-05T17:07:42Z</updated>
<author>
<name>Swapnil Sapkal</name>
<email>swapnil.sapkal@amd.com</email>
</author>
<published>2025-04-30T06:42:06Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=d26d16438bc5fd5524121244cc133f9872a63210'/>
<id>urn:sha1:d26d16438bc5fd5524121244cc133f9872a63210</id>
<content type='text'>
In amd-pstate-ut, one of the basic test is to switch between all
possible mode combinations. After running this test the mode of the
amd-pstate driver is active mode. Store and reset the mode to its original
state.

Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Signed-off-by: Swapnil Sapkal &lt;swapnil.sapkal@amd.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://lore.kernel.org/r/20250430064206.7402-1-swapnil.sapkal@amd.com
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
</content>
</entry>
<entry>
<title>cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option</title>
<updated>2025-04-28T21:09:35Z</updated>
<author>
<name>Dhananjay Ugwekar</name>
<email>dhananjay.ugwekar@amd.com</email>
</author>
<published>2025-04-28T07:16:24Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/linux/commit/?id=608a76b65288698677843d2f22418e03391ef95f'/>
<id>urn:sha1:608a76b65288698677843d2f22418e03391ef95f</id>
<content type='text'>
Initialize lower frequency limit to the "Requested CPU Min frequency"
BIOS option (if it is set) value as part of the driver-&gt;init()
callback. The BIOS specified value is passed by the PMFW as min_perf in
CPPC_REQ MSR. To ensure that we don't mistake a stale min_perf value in
CPPC_REQ value as the "Requested CPU Min frequency" during a kexec wakeup,
reset the CPPC_REQ.min_perf value back to the BIOS specified one in the
offline, exit and suspend callbacks.

amd_pstate_target() and amd_pstate_epp_update_limit() which are invoked
as part of the resume() and online() callbacks will take care of restoring
the CPPC_REQ back to the correct values.

Signed-off-by: Dhananjay Ugwekar &lt;dhananjay.ugwekar@amd.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://lore.kernel.org/r/20250428071623.4309-1-dhananjay.ugwekar@amd.com
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
</content>
</entry>
</feed>
