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....@gmail.com> 代表 Ingo Molnar 
> <mi...@kernel.org>
> 发送时间: 2018年3月12日 17:46:09
> 收件人: Rafael J. Wysocki
> 抄送: David Wang; len.br...@intel.com; pa...@ucw.cz; t...@linutronix.de; 
> mi...@redhat.com; h...@zytor.com; x...@kernel.org; linux...@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 <r...@rjwysocki.net> wrote:
> 
> > On Monday, March 12, 2018 9:40:33 AM CET Ingo Molnar wrote:
> > >
> > > * David Wang <davidw...@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
> 


Reply via email to