]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
x86/acpi/cstate: Remove open coded check for cpu_feature_enabled()
authorMario Limonciello (AMD) <superm1@kernel.org>
Mon, 15 Sep 2025 20:43:16 +0000 (15:43 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Sep 2025 17:16:51 +0000 (19:16 +0200)
acpi_processor_power_init_bm_check() has an open coded implementation
of cpu_feature_enabled() to detect X86_FEATURE_ZEN.

Switch to using cpu_feature_enabled().

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/x86/kernel/acpi/cstate.c

index 8698d66563ed64c47c04a3c9adfbdc7c74a15da4..0281703da5e2626d1cea596b6ba2c5781e6467a3 100644 (file)
@@ -89,7 +89,7 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
                 */
                flags->bm_control = 0;
        }
-       if (c->x86_vendor == X86_VENDOR_AMD && c->x86 >= 0x17) {
+       if (cpu_feature_enabled(X86_FEATURE_ZEN)) {
                /*
                 * For all AMD Zen or newer CPUs that support C3, caches
                 * should not be flushed by software while entering C3