]> www.infradead.org Git - linux.git/commit
cpufreq: amd-pstate: optimize the initial frequency values verification
authorPerry Yuan <perry.yuan@amd.com>
Wed, 19 Jun 2024 15:40:12 +0000 (23:40 +0800)
committerMario Limonciello <mario.limonciello@amd.com>
Fri, 21 Jun 2024 02:52:05 +0000 (21:52 -0500)
commit8f8b42c1fcc939a73b547b172a9ffcb65ef4bf47
tree13cd430264c3f4abce6bdf91b5adfe1f1d5b5472
parentfc6e0837264a8b2504b6160e63ec92eb012540f3
cpufreq: amd-pstate: optimize the initial frequency values verification

To enhance the debugging capability of the driver loading failure for
broken CPPC ACPI tables, it can optimize the expression by moving the
verification of `min_freq`, `nominal_freq`, and other dependency values
to the `amd_pstate_init_freq()` function where they are initialized.
If any of these values are incorrect, the `amd-pstate` driver will not be registered.

By ensuring that these values are correct before they are used, it will facilitate
the debugging process when encountering driver loading failures due to faulty CPPC
ACPI tables from BIOS

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Acked-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/f9793f8451c1832e34cc9dc35f89c653b39cfe38.1718811234.git.perry.yuan@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c