From: Mario Limonciello (AMD) Date: Mon, 15 Sep 2025 20:43:16 +0000 (-0500) Subject: x86/acpi/cstate: Remove open coded check for cpu_feature_enabled() X-Git-Tag: v6.18-rc1~48^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b87014e999903b63c6416183446bcc18aabe5ef;p=thirdparty%2Fkernel%2Fstable.git x86/acpi/cstate: Remove open coded check for cpu_feature_enabled() 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) Signed-off-by: Rafael J. Wysocki --- diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 8698d66563ed6..0281703da5e26 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c @@ -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