Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5b45ded authored by liguang's avatar liguang Committed by Benjamin Herrenschmidt
Browse files

powerpc/smp: Use '==' instead of '<' for system_state



'system_state < SYSTEM_RUNNING' will have same effect
with 'system_state == SYSTEM_BOOTING', but the later
one is more clearer.

Signed-off-by: default avatarliguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 13d543cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -142,7 +142,7 @@ static int smp_cell_cpu_bootable(unsigned int nr)
	 * during boot if the user requests it.  Odd-numbered
	 * during boot if the user requests it.  Odd-numbered
	 * cpus are assumed to be secondary threads.
	 * cpus are assumed to be secondary threads.
	 */
	 */
	if (system_state < SYSTEM_RUNNING &&
	if (system_state == SYSTEM_BOOTING &&
	    cpu_has_feature(CPU_FTR_SMT) &&
	    cpu_has_feature(CPU_FTR_SMT) &&
	    !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
	    !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
		return 0;
		return 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -51,7 +51,7 @@ static int pnv_smp_cpu_bootable(unsigned int nr)
	/* Special case - we inhibit secondary thread startup
	/* Special case - we inhibit secondary thread startup
	 * during boot if the user requests it.
	 * 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)
		if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
			return 0;
			return 0;
		if (smt_enabled_at_boot
		if (smt_enabled_at_boot
+1 −1
Original line number Original line Diff line number Diff line
@@ -192,7 +192,7 @@ static int smp_pSeries_cpu_bootable(unsigned int nr)
	/* Special case - we inhibit secondary thread startup
	/* Special case - we inhibit secondary thread startup
	 * during boot if the user requests it.
	 * 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)
		if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
			return 0;
			return 0;
		if (smt_enabled_at_boot
		if (smt_enabled_at_boot