aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smp-cps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/smp-cps.c')
-rw-r--r--arch/mips/kernel/smp-cps.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index c7879fbe9f5b..c3661ca5f25c 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -44,7 +44,6 @@ static void __init cps_smp_setup(void)
44{ 44{
45 unsigned int ncores, nvpes, core_vpes; 45 unsigned int ncores, nvpes, core_vpes;
46 int c, v; 46 int c, v;
47 u32 *entry_code;
48 47
49 /* Detect & record VPE topology */ 48 /* Detect & record VPE topology */
50 ncores = mips_cm_numcores(); 49 ncores = mips_cm_numcores();
@@ -82,10 +81,6 @@ static void __init cps_smp_setup(void)
82 /* Initialise core 0 */ 81 /* Initialise core 0 */
83 mips_cps_core_init(); 82 mips_cps_core_init();
84 83
85 /* Patch the start of mips_cps_core_entry to provide the CM base */
86 entry_code = (u32 *)&mips_cps_core_entry;
87 UASM_i_LA(&entry_code, 3, (long)mips_cm_base);
88
89 /* Make core 0 coherent with everything */ 84 /* Make core 0 coherent with everything */
90 write_gcr_cl_coherence(0xff); 85 write_gcr_cl_coherence(0xff);
91} 86}
@@ -93,9 +88,16 @@ static void __init cps_smp_setup(void)
93static void __init cps_prepare_cpus(unsigned int max_cpus) 88static void __init cps_prepare_cpus(unsigned int max_cpus)
94{ 89{
95 unsigned ncores, core_vpes, c; 90 unsigned ncores, core_vpes, c;
91 u32 *entry_code;
96 92
97 mips_mt_set_cpuoptions(); 93 mips_mt_set_cpuoptions();
98 94
95 /* Patch the start of mips_cps_core_entry to provide the CM base */
96 entry_code = (u32 *)&mips_cps_core_entry;
97 UASM_i_LA(&entry_code, 3, (long)mips_cm_base);
98 dma_cache_wback_inv((unsigned long)&mips_cps_core_entry,
99 (void *)entry_code - (void *)&mips_cps_core_entry);
100
99 /* Allocate core boot configuration structs */ 101 /* Allocate core boot configuration structs */
100 ncores = mips_cm_numcores(); 102 ncores = mips_cm_numcores();
101 mips_cps_core_bootcfg = kcalloc(ncores, sizeof(*mips_cps_core_bootcfg), 103 mips_cps_core_bootcfg = kcalloc(ncores, sizeof(*mips_cps_core_bootcfg),