[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 8/8] spapr: Clean up handling of LPCR power-saving
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH 8/8] spapr: Clean up handling of LPCR power-saving exit bits |
Date: |
Thu, 3 May 2018 21:59:09 +1000 |
User-agent: |
Mutt/1.9.3 (2018-01-21) |
On Thu, May 03, 2018 at 09:47:18AM +0200, Cédric Le Goater wrote:
> On 05/03/2018 08:21 AM, David Gibson wrote:
> > To prevent spurious wakeups on cpus that are supposed to be disabled, we
> > need to clear the LPCR bits which control certain wakeup events.
> > spapr_cpu_reset() has separate cases here for boot and non-boot (initially
> > inactive) cpus. rtas_start_cpu() then turns the LPCR bits on when the
> > non-boot cpus are activated.
> >
> > But explicit checks against first_cpu are not how we usually do things:
> > instead spapr_cpu_reset() generally sets things up for non-boot (inactive)
> > cpus, then spapr_machine_reset() and/or rtas_start_cpu() override as
> > necessary.
> >
> > So, do that instead. Because the LPCR activation is identical for boot
> > cpus and non-boot cpus just activated with rtas_start_cpu() we can put the
> > code common in spapr_cpu_set_entry_state().
>
> This is much nicer.
>
> > Signed-off-by: David Gibson <address@hidden>
>
> Reviewed-by: Cédric Le Goater <address@hidden>
>
> and for the patchset :
>
> Tested-by: Cédric Le Goater <address@hidden>
>
> under KVM & TCG with cpu hotplug and unplug.
Thanks. I've folded the series into ppc-for-2.13.
> There is still a spapr_cpu_reset() call under spapr_cpu_init().
> Is that on purpose ?
Sort of. I'd still like to remove it, but figuring out how to do so
safely is going to take a bit longer. Well, probably quite a lot
longer, since I doubt I'll get it done before I go away.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature