Skip to content

Commit 5b87014

Browse files
superm1rafaeljw
authored andcommitted
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) <superm1@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 07e27ad commit 5b87014

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kernel/acpi/cstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
8989
*/
9090
flags->bm_control = 0;
9191
}
92-
if (c->x86_vendor == X86_VENDOR_AMD && c->x86 >= 0x17) {
92+
if (cpu_feature_enabled(X86_FEATURE_ZEN)) {
9393
/*
9494
* For all AMD Zen or newer CPUs that support C3, caches
9595
* should not be flushed by software while entering C3

0 commit comments

Comments
 (0)