aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/xlp/wakeup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/netlogic/xlp/wakeup.c')
-rw-r--r--arch/mips/netlogic/xlp/wakeup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/netlogic/xlp/wakeup.c b/arch/mips/netlogic/xlp/wakeup.c
index e5f44d2605a8..87d7846af2d0 100644
--- a/arch/mips/netlogic/xlp/wakeup.c
+++ b/arch/mips/netlogic/xlp/wakeup.c
@@ -99,7 +99,7 @@ static int wait_for_cpus(int cpu, int bootcpu)
99 do { 99 do {
100 notready = nlm_threads_per_core; 100 notready = nlm_threads_per_core;
101 for (i = 0; i < nlm_threads_per_core; i++) 101 for (i = 0; i < nlm_threads_per_core; i++)
102 if (cpu_ready[cpu + i] || cpu == bootcpu) 102 if (cpu_ready[cpu + i] || (cpu + i) == bootcpu)
103 --notready; 103 --notready;
104 } while (notready != 0 && --count > 0); 104 } while (notready != 0 && --count > 0);
105 105
@@ -111,7 +111,7 @@ static void xlp_enable_secondary_cores(const cpumask_t *wakeup_mask)
111 struct nlm_soc_info *nodep; 111 struct nlm_soc_info *nodep;
112 uint64_t syspcibase, fusebase; 112 uint64_t syspcibase, fusebase;
113 uint32_t syscoremask, mask, fusemask; 113 uint32_t syscoremask, mask, fusemask;
114 int core, n, cpu; 114 int core, n, cpu, ncores;
115 115
116 for (n = 0; n < NLM_NR_NODES; n++) { 116 for (n = 0; n < NLM_NR_NODES; n++) {
117 if (n != 0) { 117 if (n != 0) {
@@ -168,7 +168,8 @@ static void xlp_enable_secondary_cores(const cpumask_t *wakeup_mask)
168 syscoremask = (1 << hweight32(~fusemask & mask)) - 1; 168 syscoremask = (1 << hweight32(~fusemask & mask)) - 1;
169 169
170 pr_info("Node %d - SYS/FUSE coremask %x\n", n, syscoremask); 170 pr_info("Node %d - SYS/FUSE coremask %x\n", n, syscoremask);
171 for (core = 0; core < nlm_cores_per_node(); core++) { 171 ncores = nlm_cores_per_node();
172 for (core = 0; core < ncores; core++) {
172 /* we will be on node 0 core 0 */ 173 /* we will be on node 0 core 0 */
173 if (n == 0 && core == 0) 174 if (n == 0 && core == 0)
174 continue; 175 continue;
@@ -178,8 +179,7 @@ static void xlp_enable_secondary_cores(const cpumask_t *wakeup_mask)
178 continue; 179 continue;
179 180
180 /* see if at least the first hw thread is enabled */ 181 /* see if at least the first hw thread is enabled */
181 cpu = (n * nlm_cores_per_node() + core) 182 cpu = (n * ncores + core) * NLM_THREADS_PER_CORE;
182 * NLM_THREADS_PER_CORE;
183 if (!cpumask_test_cpu(cpu, wakeup_mask)) 183 if (!cpumask_test_cpu(cpu, wakeup_mask))
184 continue; 184 continue;
185 185