diff options
author | Shanghui Liu <shliu@broadcom.com> | 2015-01-07 06:28:22 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-01 11:21:47 -0400 |
commit | 46ab6f24ac7b05c07e2936124b45da5f2f8fdc61 (patch) | |
tree | 8e5bccbdac919dc32039a7a08a94a2839e68d496 | |
parent | c775aa12307efecb00ea78265210535dc41cdd49 (diff) |
MIPS: Netlogic: Fix wait for slave CPUs
For core 0, the condition of "cpu == bootcpu" is always true, so it
does not wait for other three threads to become ready. Fix this by
using correct check.
Signed-off-by: Shanghui Liu <shliu@broadcom.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8881/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/netlogic/xlp/wakeup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/netlogic/xlp/wakeup.c b/arch/mips/netlogic/xlp/wakeup.c index e5f44d2605a8..26d82f79ef29 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 | ||