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:   Mon, 19 Sep 2016 12:52:20 -0700
From:   tip-bot for Sebastian Andrzej Siewior <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     bigeasy@...utronix.de, mingo@...nel.org, hpa@...or.com,
        magnus.damm@...il.com, horms@...ge.net.au, peterz@...radead.org,
        tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [tip:smp/hotplug] ARM/shmobile: Convert to hotplug state machine

Commit-ID:  657ebf7a2354f39cc7d3f4e64ee49dbf1c3cae4f
Gitweb:     http://git.kernel.org/tip/657ebf7a2354f39cc7d3f4e64ee49dbf1c3cae4f
Author:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Tue, 6 Sep 2016 19:04:38 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 19 Sep 2016 21:44:26 +0200

ARM/shmobile: Convert to hotplug state machine

Install the callbacks via the state machine so the old notifier based
cpuhotplug infrastructure can be removed.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-sh@...r.kernel.org
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Magnus Damm <magnus.damm@...il.com>
Cc: Simon Horman <horms@...ge.net.au>
Cc: rt@...utronix.de
Cc: linux-arm-kernel@...ts.infradead.org
Link: http://lkml.kernel.org/r/20160906170457.32393-3-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 arch/arm/mach-shmobile/platsmp-scu.c | 26 ++++++++------------------
 include/linux/cpuhotplug.h           |  1 +
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-shmobile/platsmp-scu.c b/arch/arm/mach-shmobile/platsmp-scu.c
index 8d478f1..d1ecaf3 100644
--- a/arch/arm/mach-shmobile/platsmp-scu.c
+++ b/arch/arm/mach-shmobile/platsmp-scu.c
@@ -21,26 +21,14 @@
 static phys_addr_t shmobile_scu_base_phys;
 static void __iomem *shmobile_scu_base;
 
-static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb,
-					  unsigned long action, void *hcpu)
+static int shmobile_scu_cpu_prepare(unsigned int cpu)
 {
-	unsigned int cpu = (long)hcpu;
-
-	switch (action) {
-	case CPU_UP_PREPARE:
-		/* For this particular CPU register SCU SMP boot vector */
-		shmobile_smp_hook(cpu, virt_to_phys(shmobile_boot_scu),
-				  shmobile_scu_base_phys);
-		break;
-	};
-
-	return NOTIFY_OK;
+	/* For this particular CPU register SCU SMP boot vector */
+	shmobile_smp_hook(cpu, virt_to_phys(shmobile_boot_scu),
+			  shmobile_scu_base_phys);
+	return 0;
 }
 
-static struct notifier_block shmobile_smp_scu_notifier = {
-	.notifier_call = shmobile_smp_scu_notifier_call,
-};
-
 void __init shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
 					  unsigned int max_cpus)
 {
@@ -54,7 +42,9 @@ void __init shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
 	scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
 
 	/* Use CPU notifier for reset vector control */
-	register_cpu_notifier(&shmobile_smp_scu_notifier);
+	cpuhp_setup_state_nocalls(CPUHP_ARM_SHMOBILE_SCU_PREPARE,
+				  "arm/shmobile-scu:prepare",
+				  shmobile_scu_cpu_prepare, NULL);
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 0da071f..008eed0 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -35,6 +35,7 @@ enum cpuhp_state {
 	CPUHP_POWERPC_PMAC_PREPARE,
 	CPUHP_POWERPC_MMU_CTX_PREPARE,
 	CPUHP_NOTIFY_PREPARE,
+	CPUHP_ARM_SHMOBILE_SCU_PREPARE,
 	CPUHP_TIMERS_DEAD,
 	CPUHP_BRINGUP_CPU,
 	CPUHP_AP_IDLE_DEAD,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ