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:43:10 +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>,
	Richard Kuo <rkuo@...eaurora.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Rusty Russell <rusty@...tcorp.com.au>,
	David Howells <dhowells@...hat.com>,
	Chris Metcalf <cmetcalf@...era.com>,
	linux-hexagon@...r.kernel.org
Subject: [PATCH 13/27] hexagon, smpboot: Use generic SMP booting infrastructure

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

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

Signed-off-by: Nikunj A. Dadhania <nikunj@...ux.vnet.ibm.com>
Cc: Richard Kuo <rkuo@...eaurora.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: David Howells <dhowells@...hat.com>
Cc: Chris Metcalf <cmetcalf@...era.com>
Cc: linux-hexagon@...r.kernel.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
---

 arch/hexagon/kernel/smp.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c
index 149fbef..0a679a4 100644
--- a/arch/hexagon/kernel/smp.c
+++ b/arch/hexagon/kernel/smp.c
@@ -29,6 +29,7 @@
 #include <linux/smp.h>
 #include <linux/spinlock.h>
 #include <linux/cpu.h>
+#include <linux/smpboot.h>
 
 #include <asm/time.h>    /*  timer_interrupt  */
 #include <asm/hexagon_vm.h>
@@ -148,7 +149,6 @@ void __init smp_prepare_boot_cpu(void)
 
 void __cpuinit start_secondary(void)
 {
-	unsigned int cpu;
 	unsigned long thread_ptr;
 
 	/*  Calculate thread_info pointer from stack pointer  */
@@ -165,6 +165,13 @@ void __cpuinit start_secondary(void)
 		: "r" (thread_ptr)
 	);
 
+	smpboot_start_secondary(NULL);
+}
+
+void __cpuinit __cpu_pre_starting(void *arg)
+{
+	unsigned int cpu;
+
 	/*  Set the memory struct  */
 	atomic_inc(&init_mm.mm_count);
 	current->active_mm = &init_mm;
@@ -177,17 +184,8 @@ void __cpuinit start_secondary(void)
 	setup_percpu_clockdev();
 
 	printk(KERN_INFO "%s cpu %d\n", __func__, current_thread_info()->cpu);
-
-	notify_cpu_starting(cpu);
-
-	set_cpu_online(cpu, true);
-
-	local_irq_enable();
-
-	cpu_idle();
 }
 
-
 /*
  * called once for each present cpu
  * apparently starts up the CPU and then

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