r13 is non-volatile?

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Sep 9 07:53:52 EST 2005


> There's a different value in R13 depending on which cpu you're on,
> so one mustn't save R13 on one CPU and attempt to restore it on
> another.
> 
> Maybe, for ppc32, you can pretend that r13 "is like a paca"? So
> that instead of saving/restoring r13 like this, you could set it up
> at the same time/instead of setting up the paca r13?

ppc32 uses r2 for that, it contains "current".

I don't think we need to bother merging those low level CPU specific
things. We need to have a cpu32 and a cpu64 subdirs in there for things
like these, memory management, etc... imho.

Ben.





More information about the Linuxppc-dev mailing list