All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Pu Wen <puwen@hygon.cn>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"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@suse.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems
Date: Wed, 9 Jun 2021 19:39:53 +0200	[thread overview]
Message-ID: <CAJZ5v0gF47KEAsC4fQzsBMLM=p70K5dWvb2dvjQMkZkZ-jtdSw@mail.gmail.com> (raw)
In-Reply-To: <CAJZ5v0j-9zZvuSyKtRYePHE6aSr824SZz=E6VS_Ysv3cByGZyQ@mail.gmail.com>

On Wed, Jun 9, 2021 at 7:30 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Fri, May 28, 2021 at 10:44 AM Pu Wen <puwen@hygon.cn> wrote:
> >
> > Hygon systems support the Monitor/Mwait instructions and these can be used
> > for ACPI C1 in the same way as on AMD and Intel systems.
> >
> > The BIOS declares a C1 state in _CST to use FFH and CPUID_Fn00000005_EDX
> > is non-zero on Hygon systems.
> >
> > Allow ffh_cstate_init() to succeed on Hygon systems to default using FFH
> > MWAIT instead of HALT for ACPI C1.
> >
> > Tested successfully on Hygon Fam18h systems.
> >
> > Signed-off-by: Pu Wen <puwen@hygon.cn>
> > ---
> >  arch/x86/kernel/acpi/cstate.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
> > index 49ae4e1ac9cd..7de599eba7f0 100644
> > --- a/arch/x86/kernel/acpi/cstate.c
> > +++ b/arch/x86/kernel/acpi/cstate.c
> > @@ -197,7 +197,8 @@ static int __init ffh_cstate_init(void)
> >         struct cpuinfo_x86 *c = &boot_cpu_data;
> >
> >         if (c->x86_vendor != X86_VENDOR_INTEL &&
> > -           c->x86_vendor != X86_VENDOR_AMD)
> > +           c->x86_vendor != X86_VENDOR_AMD &&
> > +           c->x86_vendor != X86_VENDOR_HYGON)
> >                 return -1;
> >
> >         cpu_cstate_entry = alloc_percpu(struct cstate_entry);
> > --
>
> Applied as 5.14 material, thanks!

And dropped, because it has been applied already by Boris:
https://git.kernel.org/tip/280b68a3b3b96b027fcdeb5a3916a8e2aaf84d03

      reply	other threads:[~2021-06-09 17:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28  8:14 [PATCH] x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems Pu Wen
2021-05-31  8:55 ` [tip: x86/cpu] " tip-bot2 for Pu Wen
2021-06-09 17:30 ` [PATCH] " Rafael J. Wysocki
2021-06-09 17:39   ` Rafael J. Wysocki [this message]

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='CAJZ5v0gF47KEAsC4fQzsBMLM=p70K5dWvb2dvjQMkZkZ-jtdSw@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=puwen@hygon.cn \
    --cc=rjw@rjwysocki.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.