public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mario Limonciello (AMD)" <superm1@kernel.org>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>, linux-acpi@vger.kernel.org
Cc: "Mario Limonciello (AMD)" <superm1@kernel.org>
Subject: [PATCH 1/2] x86/acpi/cstate: Remove open coded check for cpu_feature_enabled()
Date: Mon, 15 Sep 2025 15:43:16 -0500	[thread overview]
Message-ID: <20250915204318.696058-2-superm1@kernel.org> (raw)
In-Reply-To: <20250915204318.696058-1-superm1@kernel.org>

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>
---
 arch/x86/kernel/acpi/cstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.43.0


  reply	other threads:[~2025-09-15 20:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15 20:43 [PATCH 0/2] Add ACPI C4 support Mario Limonciello (AMD)
2025-09-15 20:43 ` Mario Limonciello (AMD) [this message]
2025-09-22 17:17   ` [PATCH 1/2] x86/acpi/cstate: Remove open coded check for cpu_feature_enabled() Rafael J. Wysocki
2025-09-15 20:43 ` [PATCH 2/2] ACPI: processor: Add support for ACPI C4 state Mario Limonciello (AMD)
2025-09-16 11:24   ` Rafael J. Wysocki
2025-09-16 18:55     ` Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250915204318.696058-2-superm1@kernel.org \
    --to=superm1@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox