[PATCH] ARM: imx: disable cpu in .cpu_kill hook

Shawn Guo shawn.guo at linaro.org
Mon Jan 14 08:48:54 EST 2013


On Mon, Jan 14, 2013 at 01:32:08PM +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 14, 2013 at 09:09:37PM +0800, Shawn Guo wrote:
> >  void imx_cpu_die(unsigned int cpu)
> >  {
> > +	static int spurious;
> > +
> >  	cpu_enter_lowpower();
> > -	imx_enable_cpu(cpu, false);
> > +	cpu_do_idle();
> > +	cpu_leave_lowpower();
> >  
> > -	/* spin here until hardware takes it down */
> > -	while (1)
> > -		;
> > +	pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, ++spurious);
> 
> Returning from the platform cpu die implementation should only be done
> in extreme situations, particularly where there's no possibility for the
> CPU to actually be taken offline (in other words, the ARM development
> platforms where there is _no_ possibility of powering down or resetting
> the secondary CPUs individually.)
> 
Indeed.  I have to admit that I have copied the code from Vexpress but
never seen it actually runs on my platform.  Will remove the recovery
completely.

Shawn




More information about the linux-arm-kernel mailing list