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 <da...@gibson.dropbear.id.au>
> 
> Reviewed-by: Cédric Le Goater <c...@kaod.org>
> 
> and for the patchset :
> 
> Tested-by: Cédric Le Goater <c...@kaod.org>
> 
> 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

Attachment: signature.asc
Description: PGP signature

Reply via email to