]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq/amd-pstate: Rework CPPC enabling
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 16 Dec 2024 16:41:23 +0000 (10:41 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Mar 2025 19:01:25 +0000 (13:01 -0600)
commit2064543f5ba0d2929e3e9b3a616c3262a57c7925
tree239462289561b1fcc7a0ce17ecae357eefa83670
parent93039a60fb28f72196769869aa4b502f1849a373
cpufreq/amd-pstate: Rework CPPC enabling

The CPPC enable register is configured as "write once".  That is
any future writes don't actually do anything.

Because of this, all the cleanup paths that currently exist for
CPPC disable are non-effective.

Rework CPPC enable to only enable after all the CAP registers have
been read to avoid enabling CPPC on CPUs with invalid _CPC or
unpopulated MSRs.

As the register is write once, remove all cleanup paths as well.

Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c