diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-08 15:24:46 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-08 15:24:46 -0400 |
commit | d15a88fc21ef225768ce31be16edfc9c6e2e02e3 (patch) | |
tree | d4cb0a1bc97973bb947e2667ae56bc4bc2256e9d /arch/sparc64/kernel/head.S | |
parent | b53471711f21ba0e151075f0e1d6d531eb50f1b1 (diff) | |
parent | 1def630a6a49dda5bc89dfbd86656293640456f0 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'arch/sparc64/kernel/head.S')
-rw-r--r-- | arch/sparc64/kernel/head.S | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index 3eadac5e171..31c5892f5ac 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S @@ -10,6 +10,7 @@ #include <linux/config.h> #include <linux/version.h> #include <linux/errno.h> +#include <linux/threads.h> #include <asm/thread_info.h> #include <asm/asi.h> #include <asm/pstate.h> @@ -493,6 +494,35 @@ tlb_fixup_done: call prom_init mov %l7, %o0 ! OpenPROM cif handler + /* Initialize current_thread_info()->cpu as early as possible. + * In order to do that accurately we have to patch up the get_cpuid() + * assembler sequences. And that, in turn, requires that we know + * if we are on a Starfire box or not. While we're here, patch up + * the sun4v sequences as well. + */ + call check_if_starfire + nop + call per_cpu_patch + nop + call sun4v_patch + nop + +#ifdef CONFIG_SMP + call hard_smp_processor_id + nop + cmp %o0, NR_CPUS + blu,pt %xcc, 1f + nop + call boot_cpu_id_too_large + nop + /* Not reached... */ + +1: +#else + mov 0, %o0 +#endif + stb %o0, [%g6 + TI_CPU] + /* Off we go.... */ call start_kernel nop |