[PATCH] powerpc/smp: Fix Non-boot cpus cannot be bring up.

Dongsheng.Wang at freescale.com Dongsheng.Wang at freescale.com
Tue Dec 23 13:41:59 AEDT 2014



> -----Original Message-----
> From: Michael Ellerman [mailto:mpe at ellerman.id.au]
> Sent: Tuesday, December 23, 2014 9:01 AM
> To: Wang Dongsheng-B40534
> Cc: benh at kernel.crashing.org; Wood Scott-B07421; anton at samba.org; linuxppc-
> dev at lists.ozlabs.org
> Subject: Re: [PATCH] powerpc/smp: Fix Non-boot cpus cannot be bring up.
> 
> On Mon, 2014-12-22 at 14:38 +0800, Dongsheng Wang wrote:
> > From: Wang Dongsheng <dongsheng.wang at freescale.com>
> >
> > Kernel cannot bring up Non-boot cpus always get "Processor xx is stuck".
> > this issue bring by http://patchwork.ozlabs.org/patch/418912/ (powerpc:
> > Secondary CPUs must set cpu_callin_map after setting active and
> > online) We need to take timebase after bootup cpu give the timebase firstly.
> >
> > When start_secondary, non-boot cpus set cpu_callin_map for boot cpu
> > after that boot cpu will give the timebase for non-boot cpu. Otherwise
> > non-boot cpus will fall in dead loop to waiting bootup cpu to give
> > imebase.
> 
> Right.
> 
> However, doesn't this introduce the possibility that the secondary cpu is up and
> marked online but has an unsynchronised clock?
> 
Yes, right. But Freescale platform boot-cpu will freeze the TB until secondary cpu
take the time base, so the clock is synchronized.

For generic PowerPC maybe has this issue. So for safe I think we need to set cpu online
after synchronized clock.

I will update my patch if you agree this way.
+       if (smp_ops->take_timebase)
+               smp_ops->take_timebase();
+       secondary_cpu_time_init();
+
Move set_cpu_online to here.
+       set_cpu_online(cpu, true);

Regards,
-Dongsheng


More information about the Linuxppc-dev mailing list