[PATCH] powerpc/85xx: Add back condition for smp

Kumar Gala galak at kernel.crashing.org
Thu Apr 19 00:15:48 EST 2012


On Apr 17, 2012, at 5:17 PM, Scott Wood wrote:

> On 04/17/2012 04:39 PM, York Sun wrote:
>> The timebase synchronization is only necessary if we need to reset a
>> separate core.  Currently only KEXEC and CPU hotplug require resetting
>> a single core. The following code should be in the condition of
>> CONFIG_KEXEC or CONFIG_HOTPLUG_CPU
>> 
>>        .give_timebase  = smp_generic_give_timebase,
>>        .take_timebase  = smp_generic_take_timebase,
>> 
>> Signed-off-by: York Sun <yorksun at freescale.com>
>> Acked-by: Li Yang <leoli at freescale.com>
>> ---
>> arch/powerpc/platforms/85xx/smp.c |    2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>> 
>> diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
>> index 56942af..868c6d7 100644
>> --- a/arch/powerpc/platforms/85xx/smp.c
>> +++ b/arch/powerpc/platforms/85xx/smp.c
>> @@ -192,8 +192,10 @@ struct smp_ops_t smp_85xx_ops = {
>> 	.cpu_disable	= generic_cpu_disable,
>> 	.cpu_die	= generic_cpu_die,
>> #endif
>> +#if defined(CONFIG_KEXEC) || defined(CONFIG_HOTPLUG_CPU)
>> 	.give_timebase	= smp_generic_give_timebase,
>> 	.take_timebase	= smp_generic_take_timebase,
>> +#endif
>> };
>> 
>> #ifdef CONFIG_KEXEC
> 
> Note that this is only a temporary fix, that assumes the environments
> where tbsync is problematic[1] (virtualization and simulation) do not
> enable CONFIG_KEXEC or CONFIG_HOTPLUG_CPU.  Eventually the sync should
> be done via CCSR like in U-Boot, and the decision on whether to do it
> should be runtime.

Is the thinking with the CCSR like u-boot sync after boot would resync to some non-zero TB value?

I'm guessing the idea is doing such a rsync w/TB stopped in the system is quick enough that the freezing of it will not be noticed.  One should measure this and see what it looks like in core cycles and how it scales based on # of cores.  (could use alternate TB as a counter to measure).

- k


More information about the Linuxppc-dev mailing list