diff options
author | Konrad Eisele <konrad@gaisler.com> | 2009-09-01 02:08:13 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-02 15:19:42 +0300 |
commit | 8401707ff645521e9f21cbb8fe3b138f60e85680 (patch) | |
tree | 114287cf273b57f96d0e132cd2274c7afe60b120 /arch/sparc/kernel/head_32.S | |
parent | b6727b12dd2ffb4a890eb5b13a298230c29ba45d (diff) | |
download | linux-8401707ff645521e9f21cbb8fe3b138f60e85680.tar.xz |
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 <konrad@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/head_32.S')
-rw-r--r-- | arch/sparc/kernel/head_32.S | 22 |
1 files changed, 22 insertions, 0 deletions
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,9 +811,31 @@ 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 |