diff options
author | Jayachandran C <jchandra@broadcom.com> | 2012-10-31 08:01:35 -0400 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-11-09 05:37:19 -0500 |
commit | feddaf7d89d554b705e7eb14a9202c4946e57c8e (patch) | |
tree | 8f0ac095229b404f7503f5b916f922a1fe21be3c | |
parent | 862e509b7e31198578449ce356e14a37bd8a6ac7 (diff) |
MIPS: Netlogic: Pass cpuid to early_init_secondary
The cpuid was not passed into early_init_secondary even though the
comment indicated that it will be. Fix this.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Patchwork: http://patchwork.linux-mips.org/patch/4458
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r-- | arch/mips/netlogic/common/smp.c | 2 | ||||
-rw-r--r-- | arch/mips/netlogic/common/smpboot.S | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c index fab316de57e..cd39f5429e8 100644 --- a/arch/mips/netlogic/common/smp.c +++ b/arch/mips/netlogic/common/smp.c | |||
@@ -98,7 +98,7 @@ void nlm_early_init_secondary(int cpu) | |||
98 | change_c0_config(CONF_CM_CMASK, 0x3); | 98 | change_c0_config(CONF_CM_CMASK, 0x3); |
99 | write_c0_ebase((uint32_t)nlm_common_ebase); | 99 | write_c0_ebase((uint32_t)nlm_common_ebase); |
100 | #ifdef CONFIG_CPU_XLP | 100 | #ifdef CONFIG_CPU_XLP |
101 | if (hard_smp_processor_id() % 4 == 0) | 101 | if (cpu % 4 == 0) |
102 | xlp_mmu_init(); | 102 | xlp_mmu_init(); |
103 | #endif | 103 | #endif |
104 | } | 104 | } |
diff --git a/arch/mips/netlogic/common/smpboot.S b/arch/mips/netlogic/common/smpboot.S index 25c1825873c..a0b74874beb 100644 --- a/arch/mips/netlogic/common/smpboot.S +++ b/arch/mips/netlogic/common/smpboot.S | |||
@@ -186,7 +186,7 @@ EXPORT(nlm_boot_siblings) | |||
186 | * jump to the secondary wait function. | 186 | * jump to the secondary wait function. |
187 | */ | 187 | */ |
188 | mfc0 v0, CP0_EBASE, 1 | 188 | mfc0 v0, CP0_EBASE, 1 |
189 | andi v0, 0x7f /* v0 <- node/core */ | 189 | andi v0, 0x3ff /* v0 <- node/core */ |
190 | 190 | ||
191 | /* Init MMU in the first thread after changing THREAD_MODE | 191 | /* Init MMU in the first thread after changing THREAD_MODE |
192 | * register (Ax Errata?) | 192 | * register (Ax Errata?) |
@@ -263,6 +263,8 @@ NESTED(nlm_boot_secondary_cpus, 16, sp) | |||
263 | PTR_L gp, 0(t1) | 263 | PTR_L gp, 0(t1) |
264 | 264 | ||
265 | /* a0 has the processor id */ | 265 | /* a0 has the processor id */ |
266 | mfc0 a0, CP0_EBASE, 1 | ||
267 | andi a0, 0x3ff /* a0 <- node/core */ | ||
266 | PTR_LA t0, nlm_early_init_secondary | 268 | PTR_LA t0, nlm_early_init_secondary |
267 | jalr t0 | 269 | jalr t0 |
268 | nop | 270 | nop |