]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Netlogic: Fix wait for slave CPUs
authorShanghui Liu <shliu@broadcom.com>
Wed, 7 Jan 2015 11:28:22 +0000 (16:58 +0530)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 1 Apr 2015 15:21:47 +0000 (17:21 +0200)
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>
arch/mips/netlogic/xlp/wakeup.c

index e5f44d2605a83345b552ad89a8577a6e1faba939..26d82f79ef2979c729084063779b455892550927 100644 (file)
@@ -99,7 +99,7 @@ static int wait_for_cpus(int cpu, int bootcpu)
        do {
                notready = nlm_threads_per_core;
                for (i = 0; i < nlm_threads_per_core; i++)
-                       if (cpu_ready[cpu + i] || cpu == bootcpu)
+                       if (cpu_ready[cpu + i] || (cpu + i) == bootcpu)
                                --notready;
        } while (notready != 0 && --count > 0);