]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/smp: Use '==' instead of '<' for system_state
authorliguang <lig.fnst@cn.fujitsu.com>
Thu, 30 May 2013 06:47:53 +0000 (14:47 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 20 Jun 2013 07:04:23 +0000 (17:04 +1000)
'system_state < SYSTEM_RUNNING' will have same effect
with 'system_state == SYSTEM_BOOTING', but the later
one is more clearer.

Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/cell/smp.c
arch/powerpc/platforms/powernv/smp.c
arch/powerpc/platforms/pseries/smp.c

index d35dbbc8ec7919fe12287ad075b12c40312b4ffc..f75f6fcac7296267d44b8a28d3d2b16446878acc 100644 (file)
@@ -142,7 +142,7 @@ static int smp_cell_cpu_bootable(unsigned int nr)
         * during boot if the user requests it.  Odd-numbered
         * cpus are assumed to be secondary threads.
         */
-       if (system_state < SYSTEM_RUNNING &&
+       if (system_state == SYSTEM_BOOTING &&
            cpu_has_feature(CPU_FTR_SMT) &&
            !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
                return 0;
index 88c9459c3e07121a64765e4304bcbb4dd7a1b2a4..77784aead1c25217719b3e12616b99c23ec1539c 100644 (file)
@@ -51,7 +51,7 @@ static int pnv_smp_cpu_bootable(unsigned int nr)
        /* Special case - we inhibit secondary thread startup
         * during boot if the user requests it.
         */
-       if (system_state < SYSTEM_RUNNING && cpu_has_feature(CPU_FTR_SMT)) {
+       if (system_state == SYSTEM_BOOTING && cpu_has_feature(CPU_FTR_SMT)) {
                if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
                        return 0;
                if (smt_enabled_at_boot
index 12bc8c3663add73a4402074d2fa2919e01d3aa09..306643cc9dbcc6cf8d1a317a84fc98c2c4af0c10 100644 (file)
@@ -192,7 +192,7 @@ static int smp_pSeries_cpu_bootable(unsigned int nr)
        /* Special case - we inhibit secondary thread startup
         * during boot if the user requests it.
         */
-       if (system_state < SYSTEM_RUNNING && cpu_has_feature(CPU_FTR_SMT)) {
+       if (system_state == SYSTEM_BOOTING && cpu_has_feature(CPU_FTR_SMT)) {
                if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
                        return 0;
                if (smt_enabled_at_boot