[PATCH] powermac: support G5 CPU hotplug
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu May 3 10:18:09 EST 2007
On Thu, 2007-05-03 at 02:05 +0200, Segher Boessenkool wrote:
> >>> They have, but the cache flush is not trivial to do (and might imply
> >>> access to non documented bits).
> >>
> >> It is (publicly) documented just fine :-)
> >
> > Ah good... you happen to have a pointer ? Last I looked, it wasn't ...
>
> It's in the UM, search for "L2 cache flush".
Ah yes, it's there for recent UM.
So, to summarize:
- 970 only does NAP, not SLEEP
- We should probably still flush the cache when bringing a CPU down
because we might implement STR in which case the machine will go
down and we won't get a chance to flush that CPU cache then.
Also, I always wondered what happened if you entered NAP without MSR:EE,
and so I checked the 970 UM and it's clearly undefined behaviour. Thus
we must make sure we always set EE, and we can "use" the trick of having
soft-disable to just return where we came from and re-enter NAP if we
got woken up by the DEC. I agree with Paulus, Johannes, we should just
do a separate routine for the CPU going down vs. Idle. Among others,
we'll also add the cache flush there.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list