Skip to contentSkip to conversation

secondary CPU kicking on 86xx

DISCUSSION Jon Loeliger 2 participants 2 messages Jun 16, 2006

lore
Share & tools
lore
#0 lore raw

Ben and folks,

I have a question regarding your comments on our proposed additions for the mpc86xx secondary CPU release code. We need a way to bounce the secondary CPUs through the reset vector at 0x100, and can either statically lay down an address like GEMINI does today:

    --- a/arch/powerpc/kernel/head_32.S
    +++ b/arch/powerpc/kernel/head_32.S
    @@ -348,6 +348,9 @@ #define EXC_XFER_EE_LITE(n, hdlr)   \
     #if defined(CONFIG_GEMINI) && defined(CONFIG_SMP)
	    . = 0x100
	    b       __secondary_start_gemini
    +#elif defined(CONFIG_PPC_86xx) && defined(CONFIG_SMP)
    +       . = 0x100
    +       b       __secondary_hold_mpc86xx
     #else
	    EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD)
     #endif

Or we can dynamically rewrite a branch instruction into the reset vector from C code during smp_kick_cpu() time like the current powermac code does.

I have working code for both; just need opinions and preferences on correct approach/style voiced!

Thanks,
jdl

#1 lore raw
Quoted 7 lines

Or we can dynamically rewrite a branch instruction into the reset vector from C code during smp_kick_cpu() time like the current powermac code does.

I have working code for both; just need opinions and preferences on correct approach/style voiced!

Second approach. #ifdef are evil and they prevent multiple board support in the same kernel.

Ben.