From 8401707ff645521e9f21cbb8fe3b138f60e85680 Mon Sep 17 00:00:00 2001 From: Konrad Eisele Date: Mon, 31 Aug 2009 22:08:13 +0000 Subject: sparc,leon: Sparc-Leon SMP support Support SMP for a Sparc-Leon multiprocessor system. Add Leon specific SMP code to arch/sparc/kernel/leon_smp.c. Signed-off-by: Konrad Eisele Signed-off-by: David S. Miller --- arch/sparc/kernel/head_32.S | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'arch/sparc/kernel/head_32.S') diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S index 439d82a95ac9..21bb2590d4ae 100644 --- a/arch/sparc/kernel/head_32.S +++ b/arch/sparc/kernel/head_32.S @@ -811,8 +811,30 @@ found_version: got_prop: #ifdef CONFIG_SPARC_LEON /* no cpu-type check is needed, it is a SPARC-LEON */ +#ifdef CONFIG_SMP + ba leon_smp_init + nop + + .global leon_smp_init +leon_smp_init: + sethi %hi(boot_cpu_id), %g1 ! master always 0 + stb %g0, [%g1 + %lo(boot_cpu_id)] + sethi %hi(boot_cpu_id4), %g1 ! master always 0 + stb %g0, [%g1 + %lo(boot_cpu_id4)] + + rd %asr17,%g1 + srl %g1,28,%g1 + + cmp %g0,%g1 + beq sun4c_continue_boot !continue with master + nop + + ba leon_smp_cpu_startup + nop +#else ba sun4c_continue_boot nop +#endif #endif set cputypval, %o2 ldub [%o2 + 0x4], %l1 -- cgit