[PATCH] Assume we're on cpu 0 in early boot

Paul Mackerras paulus at samba.org
Wed Jun 28 11:42:01 EST 2006


Michael Ellerman writes:

> There's a small period early in boot where we don't know which cpu we're
> running on. That's ok, except that it means we have no paca, or more
> correctly that our paca pointer points somewhere random.
> 
> So that we can safely call things like smp_processor_id(), we need a paca,
> so just assume we're on cpu 0. No code should _write_ to the paca before
> we've set the correct one up.

OK, but why not just do a setup_paca(0) at the start of early_setup(),
in C code?  You can also remove the redundant paca setting in
start_here_common() in head_64.S.

Paul.



More information about the Linuxppc-dev mailing list