|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XenPPC] [PATCH/RFC] Handshake with secondary processors
Good, lets take it a little further.I know you are are building on my original "good enuff loop" but lets go all the way here. On Aug 9, 2006, at 11:12 PM, Amos Waterland wrote: There really is no need for this to be a long, the ID is an int so we could make it an int. This would also make your assembler 32/64 neutral, tho I'm not too worried about that, and the barrier (too come) may not be neutral-able. #undef OF_DEBUG @@ -956,7 +957,37 @@ static int __init boot_of_cpus(void)/* FIXME: should not depend on the boot CPU bring the first child */
That is correct.
so you need something like the following (psuedo code, bad style):
of_getprop(bof_chosen, "cpu", &boot_cpu, sizeof (boot_cpu));
if (cpu == boot_cpu)
continue;
Set this to ~0, cpuid 0 will cause you problems later.
The space at the beginning of text is precious, please but this back to the end of this file. Extra credit: As you add more code here for the barrier I would not discourage a unique file here that is not 64bit specific and may end up in the __init section so it can be released. +/* Begin secondary processor spin and ack logic. */ + .globl __spin_ack +__spin_ack: + .llong 0x0 '.long' here is plenty.BTW: I can think of no reason this cannot be allocated in "C" rather than assembler, it would be easier to find with cscope. :) I almost tricked myself here, so a comment about how we do _not_ use _GLOBAL() because we desire a function entry point rather than a "function descriptor", would be nice.+ + .globl spin_start +spin_start: + /* Our physical cpu number is passed in r3. */ + mr r24, r3 + lis r25, __spin_ack@highest + ori r25, r25, __spin_ack@higher + rldicr r25, r25, 32, 31 + oris r25, r25, __spin_ack@h + ori r25, r25, __spin_ack@l + stdu r24, 0(r25)
The above assembler can be replaced by:
LOADADDR(r4, __spin_ack)
stw r3, 0(r4)
I use r4 because it really doesn't matter what register you use, so
you have 31 to chose from :)
_______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |