Re: çå: çå: [PATCH] Delete some unusefull operations for centaur CPU/platform
From: Rafael J. Wysocki
Date: Thu Mar 29 2018 - 07:03:22 EST
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@xxxxxxxxx> äè Ingo Molnar <mingo@xxxxxxxxxx>
> åéæé: 2018å3æ12æ 17:46:09
> æää: Rafael J. Wysocki
> æé: David Wang; len.brown@xxxxxxxxx; pavel@xxxxxx; tglx@xxxxxxxxxxxxx; mingo@xxxxxxxxxx; hpa@xxxxxxxxx; x86@xxxxxxxxxx; linux-pm@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; 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@xxxxxxxxxxxxx> wrote:
>
> > On Monday, March 12, 2018 9:40:33 AM CET Ingo Molnar wrote:
> > >
> > > * David Wang <DavidWang@xxxxxxxxxxx> 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
>