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:	Fri, 01 Jun 2012 14:44:40 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	tglx@...utronix.de, peterz@...radead.org,
	paulmck@...ux.vnet.ibm.com
Cc:	rusty@...tcorp.com.au, mingo@...nel.org, yong.zhang0@...il.com,
	akpm@...ux-foundation.org, vatsa@...ux.vnet.ibm.com, rjw@...k.pl,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	srivatsa.bhat@...ux.vnet.ibm.com, nikunj@...ux.vnet.ibm.com,
	"Nikunj A. Dadhania" <nikunj@...ux.vnet.ibm.com>,
	Mike Frysinger <vapier@...too.org>,
	Bob Liu <lliubbo@...il.com>, Steven Miao <realmz6@...il.com>,
	Yong Zhang <yong.zhang0@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	uclinux-dist-devel@...ckfin.uclinux.org
Subject: [PATCH 19/27] blackfin,
 smpboot: Use generic SMP booting infrastructure

From: Nikunj A. Dadhania <nikunj@...ux.vnet.ibm.com>

Convert blackfin to use the generic framework to boot secondary CPUs.

Notes:
The call to set_cpu_online() is removed from platform_secondary_init(), since
it will now be done by generic SMP booting code.

Signed-off-by: Nikunj A. Dadhania <nikunj@...ux.vnet.ibm.com>
Cc: Mike Frysinger <vapier@...too.org>
Cc: Bob Liu <lliubbo@...il.com>
Cc: Steven Miao <realmz6@...il.com>
Cc: Yong Zhang <yong.zhang0@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: uclinux-dist-devel@...ckfin.uclinux.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
---

 arch/blackfin/mach-bf561/smp.c  |    1 -
 arch/blackfin/mach-common/smp.c |   16 +++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index ab1c617..e7e2e50 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -69,7 +69,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 	SSYNC();
 
 	/* We are done with local CPU inits, unblock the boot CPU. */
-	set_cpu_online(cpu, true);
 	spin_lock(&boot_lock);
 	spin_unlock(&boot_lock);
 }
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index 00bbe67..9ee6f2f 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -25,6 +25,7 @@
 #include <linux/irq.h>
 #include <linux/slab.h>
 #include <linux/atomic.h>
+#include <linux/smpboot.h>
 #include <asm/cacheflush.h>
 #include <asm/irq_handler.h>
 #include <asm/mmu_context.h>
@@ -373,6 +374,11 @@ static void __cpuinit setup_secondary(unsigned int cpu)
 
 void __cpuinit secondary_start_kernel(void)
 {
+	smpboot_start_secondary(NULL);
+}
+
+void __cpuinit __cpu_pre_starting(void *unused)
+{
 	unsigned int cpu = smp_processor_id();
 	struct mm_struct *mm = &init_mm;
 
@@ -405,8 +411,6 @@ void __cpuinit secondary_start_kernel(void)
 	atomic_inc(&mm->mm_count);
 	current->active_mm = mm;
 
-	preempt_disable();
-
 	setup_secondary(cpu);
 
 	platform_secondary_init(cpu);
@@ -414,19 +418,17 @@ void __cpuinit secondary_start_kernel(void)
 	/* setup local core timer */
 	bfin_local_timer_setup();
 
-	local_irq_enable();
-
 	bfin_setup_caches(cpu);
+}
 
-	notify_cpu_starting(cpu);
+void __cpuinit __cpu_pre_online(void *unused)
+{
 	/*
 	 * Calibrate loops per jiffy value.
 	 * IRQs need to be enabled here - D-cache can be invalidated
 	 * in timer irq handler, so core B can read correct jiffies.
 	 */
 	calibrate_delay();
-
-	cpu_idle();
 }
 
 void __init smp_prepare_boot_cpu(void)

--
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