lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 31 Oct 2015 15:15:13 +0200
From:	Noam Camus <noamc@...hip.com>
To:	<linux-snps-arc@...ts.infradead.org>
CC:	<linux-kernel@...r.kernel.org>, <talz@...hip.com>,
	<gilf@...hip.com>, <cmetcalf@...hip.com>,
	Noam Camus <noamc@...hip.com>
Subject: [PATCH v1 06/20] ARC: Mark cpu online only after it has executed the per cpu init hook.

From: Noam Camus <noamc@...hip.com>

In SMP setup, master loops for each_present_cpu calling cpu_up() which
for ARC returns as soon as new cpu's status becomes online,
but it could still be initializing (see start_kernel_secondary())
Thus master can start cpu up for 2nd core,
while prev is still not fully up.
This can be issue for SMT system,
where first h/w thread of a core needs to be fully up before
moving on to next threads.

Signed-off-by: Noam Camus <noamc@...hip.com>
Acked-by: Vineet Gupta <vgupta@...opsys.com>
---
 arch/arc/kernel/smp.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
index 5805878..946109f 100644
--- a/arch/arc/kernel/smp.c
+++ b/arch/arc/kernel/smp.c
@@ -126,6 +126,10 @@ void start_kernel_secondary(void)
 	current->active_mm = mm;
 	cpumask_set_cpu(cpu, mm_cpumask(mm));
 
+	/* Before we turn online */
+	if (machine_desc->init_cpu_smp)
+		machine_desc->init_cpu_smp(cpu);
+
 	notify_cpu_starting(cpu);
 	set_cpu_online(cpu, true);
 
@@ -135,9 +139,6 @@ void start_kernel_secondary(void)
 	if (plat_smp_ops.init_irq_cpu)
 		plat_smp_ops.init_irq_cpu(cpu);
 
-	if (machine_desc->init_cpu_smp)
-		machine_desc->init_cpu_smp(cpu);
-
 	arc_local_timer_setup();
 
 	local_irq_enable();
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ