[RFC] Fixing CPU Hotplug for RealView Platforms

Will Deacon will.deacon at arm.com
Wed Dec 8 08:20:41 EST 2010


Hi Santosh,

> > > We can only do this for CPUs other than the original boot CPU, because
> > > the boot loader should be checking which are the secondary CPUs and
> > > putting those into this simple WFI loop with the GIC appropriately
> > > programmed.
> > >
> > > This means when we re-activate the CPU, we'll be waking it up in
> > > exactly the same way as we do when the kernel boots - and we have all
> > > that code around just waiting to be used.
> >
> One more simpler thing which could work is disable "C' bit before flushing
> the L1 cache. That way prefetch would be avoided and cache also will
> be in clean state while restarting the core.

I like this idea because it's easy to implement! It does, however, rely
on caches not containing any random dirty lines when leaving the low-power
state. This behaviour is IMPLEMENTATION DEFINED out of reset, so its
something that platform code will need to handle anyway.

On RealView, we only do a WFI to enter lowpower so your approach sounds
feasible. I'll put in a comment describing the potential problems with
random D-cache data out of reset so that if other platforms blindly copy
the code, at least they've been warned.

Will






More information about the linux-arm-kernel mailing list