diff options
author | Konrad Eisele <konrad@gaisler.com> | 2009-09-01 00:08:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-02 13:19:42 +0100 |
commit | 8401707ff645521e9f21cbb8fe3b138f60e85680 (patch) | |
tree | 114287cf273b57f96d0e132cd2274c7afe60b120 /arch/sparc/kernel/head_32.S | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 (diff) | |
download | linux-8401707ff645521e9f21cbb8fe3b138f60e85680.tar.xz linux-8401707ff645521e9f21cbb8fe3b138f60e85680.zip |
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 |