Linux Power Management development
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: CobeChen@zhaoxin.com, TimGuo@zhaoxin.com, LindaChai@zhaoxin.com,
	LeoLiu@zhaoxin.com,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH V1] x86/cstate: Add Zhaoxin/Centaur ACPI Cx FFH MWAIT support
Date: Thu, 23 Jun 2022 08:55:42 -0700	[thread overview]
Message-ID: <ec121630-1ee5-1336-1ed4-04506f0c4129@intel.com> (raw)
In-Reply-To: <0b583b7e-dcd3-be51-f367-1c12ac841d3f@zhaoxin.com>

On 6/22/22 18:26, Tony W Wang-oc wrote:
> Recent Zhaoxin/Centaur CPUs support X86_FEATURE_MWAIT that implies
> the MONITOR/MWAIT instructions can be used for ACPI Cx state.
> The BIOS declares Cx state in _CST object to use FFH on Zhaoxin/Centaur
> systems. So let function ffh_cstate_init() support These CPUs too.
> 
> Signed-off-by: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
> ---
>  arch/x86/kernel/acpi/cstate.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
> index 7945eae..d4185e1 100644
> --- a/arch/x86/kernel/acpi/cstate.c
> +++ b/arch/x86/kernel/acpi/cstate.c
> @@ -213,7 +213,9 @@ static int __init ffh_cstate_init(void)
> 
>      if (c->x86_vendor != X86_VENDOR_INTEL &&
>          c->x86_vendor != X86_VENDOR_AMD &&
> -        c->x86_vendor != X86_VENDOR_HYGON)
> +        c->x86_vendor != X86_VENDOR_HYGON &&
> +        c->x86_vendor != X86_VENDOR_CENTAUR &&
> +        c->x86_vendor != X86_VENDOR_ZHAOXIN)
>          return -1;

Many of the changelogs that add new vendors here go on about particular
C states declared in the _CST object and contents of CPUID leaf 5.

Why do we even _have_ a vendor check here?  Shouldn't the code just be
going and doing the validation of the _CST object and CPUID that the
changelogs blather on about?

Intel certainly made the original sin on this one (see 991528d7348), but
I hope _something_ changed in the 16 years since that patch went in.

  reply	other threads:[~2022-06-23 15:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  1:26 [PATCH V1] x86/cstate: Add Zhaoxin/Centaur ACPI Cx FFH MWAIT support Tony W Wang-oc
2022-06-23 15:55 ` Dave Hansen [this message]
2022-06-24  3:05   ` Tony W Wang-oc

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=ec121630-1ee5-1336-1ed4-04506f0c4129@intel.com \
    --to=dave.hansen@intel.com \
    --cc=CobeChen@zhaoxin.com \
    --cc=LeoLiu@zhaoxin.com \
    --cc=LindaChai@zhaoxin.com \
    --cc=TimGuo@zhaoxin.com \
    --cc=TonyWWang-oc@zhaoxin.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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