From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: David Wang <DavidWang@zhaoxin.com>
Cc: Ingo Molnar <mingo@kernel.org>,
"len.brown@intel.com" <len.brown@intel.com>,
"pavel@ucw.cz" <pavel@ucw.cz>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-pm@kernel.org" <linux-pm@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Bruce Chang (VAS)" <BruceChang@via-alliance.com>,
"Cooper Yan(BJ-RD)" <CooperYan@zhaoxin.com>,
"Qiyuan Wang(BJ-RD)" <QiyuanWang@zhaoxin.com>,
Benjamin Pan <BenjaminPan@viatech.com>,
Luke Lin <LukeLin@viacpu.com>,
"Tim Guo(BJ-RD)" <TimGuo@zhaoxin.com>,
"Cobe Chen(BJ-RD)" <CobeChen@zhaoxin.com>,
"Jiangbo Wang(BJ-RD)" <JiangboWang@zhaoxin.com>
Subject: Re: 答复: 答复: [PATCH] Delete some unusefull operations for centaur CPU/platform
Date: Thu, 29 Mar 2018 13:03:35 +0200 [thread overview]
Message-ID: <7112264.IUdZzFR1Qm@aspire.rjw.lan> (raw)
In-Reply-To: <0230c32412474e97bf7d2ef45cc64c4d@zhaoxin.com>
On Wednesday, March 28, 2018 11:21:15 AM CEST David Wang wrote:
> Dear Rafael,
>
> After disscusion with engineer from Centaur, the orginal patch maybe not safe for some older Centaur CPU/platform. So, I want to use another patch like the following:
OK
I will drop the previous one, no problem.
Please resumbit the new one on top of the Linus' tree.
Thanks!
> diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
> index 6c74dec..d92a7f3 100644
> --- a/arch/x86/kernel/acpi/cstate.c
> +++ b/arch/x86/kernel/acpi/cstate.c
> @@ -52,17 +52,15 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
> (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 0x0f)))
> flags->bm_control = 0;
>
> - if (c->x86_vendor == X86_VENDOR_CENTAUR) {
> - /*
> - * On all Centaur CPUs, software need not flush the CPU caches
> - * when entering C3-type C-states.
> - *
> - * On all Centaur platforms, software need not disable bus
> - * master arbitration when entering C3-type C-states.
> - */
> - flags->bm_check = 1;
> - flags->bm_control = 0;
> - }
> + /*
> + * For all recent Centaur CPUs, the ucode will make sure that each core can keep
> + * cache coherence with each other while entering C3 type state.
> + * So, set bm_check to 1 to indicate that the kernel need not execute a cache
> + * flush operation (WBINVD) when entering C3 type state.
> + */
> + if (c->x86_vendor == X86_VENDOR_CENTAUR &&
> + (c->x86 > 6 || (c->x86 == 6 && c->x86_model == 0x0f && c->x86_mask>=0x0e)))
> + flags->bm_check = 1;
> }
> EXPORT_SYMBOL(acpi_processor_power_init_bm_check);
>
> Can you help to drop the orignal patch you queued up to the linux-next?
> Thank you.
>
>
> David
>
> ________________________________
> 发件人: Ingo Molnar <mingo.kernel.org@gmail.com> 代表 Ingo Molnar <mingo@kernel.org>
> 发送时间: 2018年3月12日 17:46:09
> 收件人: Rafael J. Wysocki
> 抄送: David Wang; len.brown@intel.com; pavel@ucw.cz; tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; x86@kernel.org; linux-pm@kernel.org; linux-kernel@vger.kernel.org; Bruce Chang (VAS); Cooper Yan(BJ-RD); Qiyuan Wang(BJ-RD); Benjamin Pan; Luke Lin; Tim Guo(BJ-RD); Cobe Chen(BJ-RD); Jiangbo Wang(BJ-RD)
> 主题: Re: 答复: [PATCH] Delete some unusefull operations for centaur CPU/platform
>
>
> * Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>
> > On Monday, March 12, 2018 9:40:33 AM CET Ingo Molnar wrote:
> > >
> > > * David Wang <DavidWang@zhaoxin.com> wrote:
> > >
> > > > [David] pr->flags.has_cst means BIOS define valid C state table. And at lease
> > > > define 2 entries. On all centaur platform which support C3, this condition is
> > > > always true.
> > >
> > > > [David] Just as the following comment said, we need not execute WBINVD and
> > > > ARB_DISABLE/ARB_ENABLE when entering C3 if bm_check=1 and bm_control=0. This
> > > > logic is valid for all platform not only for Centaur, I think.
> > >
> > > Ok, fair enough!
> >
> > Well, I still have this one queued up as cpuidle material.
> >
> > I can drop it if you want to take it instead.
>
> No need to drop it, it looks good to me!
>
> Thanks,
>
> Ingo
>
prev parent reply other threads:[~2018-03-29 11:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 4:11 [PATCH] Delete some unusefull operations for centaur CPU/platform David Wang
2018-03-02 11:31 ` Rafael J. Wysocki
2018-03-04 9:31 ` Ingo Molnar
[not found] ` <efc93496e4ba46958b7b09eff54c2ce2@zhaoxin.com>
2018-03-12 8:40 ` 答复: " Ingo Molnar
2018-03-12 9:27 ` Rafael J. Wysocki
2018-03-12 9:46 ` Ingo Molnar
[not found] ` <0230c32412474e97bf7d2ef45cc64c4d@zhaoxin.com>
2018-03-29 11:03 ` 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=7112264.IUdZzFR1Qm@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=BenjaminPan@viatech.com \
--cc=BruceChang@via-alliance.com \
--cc=CobeChen@zhaoxin.com \
--cc=CooperYan@zhaoxin.com \
--cc=DavidWang@zhaoxin.com \
--cc=JiangboWang@zhaoxin.com \
--cc=LukeLin@viacpu.com \
--cc=QiyuanWang@zhaoxin.com \
--cc=TimGuo@zhaoxin.com \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--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;
as well as URLs for NNTP newsgroup(s).