linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/21] ARM: OMAP: wakeupgen: Convert to hotplug state machine
       [not found] <20160906170457.32393-1-bigeasy@linutronix.de>
@ 2016-09-06 17:04 ` Sebastian Andrzej Siewior
  2016-09-13 22:24   ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-09-06 17:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, rt, tglx, Sebastian Andrzej Siewior,
	Tony Lindgren, linux-omap, linux-arm-kernel

Install the callbacks via the state machine.

Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 arch/arm/mach-omap2/omap-wakeupgen.c | 35 +++++++++++++----------------------
 include/linux/cpuhotplug.h           |  1 +
 2 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 0c4754386532..369f95a703ac 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -322,34 +322,25 @@ static void irq_save_secure_context(void)
 #endif
 
 #ifdef CONFIG_HOTPLUG_CPU
-static int irq_cpu_hotplug_notify(struct notifier_block *self,
-				  unsigned long action, void *hcpu)
+static int omap_wakeupgen_cpu_online(unsigned int cpu)
 {
-	unsigned int cpu = (unsigned int)hcpu;
-
-	/*
-	 * Corresponding FROZEN transitions do not have to be handled,
-	 * they are handled by at a higher level
-	 * (drivers/cpuidle/coupled.c).
-	 */
-	switch (action) {
-	case CPU_ONLINE:
-		wakeupgen_irqmask_all(cpu, 0);
-		break;
-	case CPU_DEAD:
-		wakeupgen_irqmask_all(cpu, 1);
-		break;
-	}
-	return NOTIFY_OK;
+	wakeupgen_irqmask_all(cpu, 0);
+	return 0;
 }
 
-static struct notifier_block irq_hotplug_notifier = {
-	.notifier_call = irq_cpu_hotplug_notify,
-};
+static int omap_wakeupgen_cpu_dead(unsigned int cpu)
+{
+	wakeupgen_irqmask_all(cpu, 1);
+	return 0;
+}
 
 static void __init irq_hotplug_init(void)
 {
-	register_hotcpu_notifier(&irq_hotplug_notifier);
+	cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "arm/omap-wake:online",
+				  omap_wakeupgen_cpu_online, NULL);
+	cpuhp_setup_state_nocalls(CPUHP_ARM_OMAP_WAKE_DEAD,
+				  "arm/omap-wake:dead", NULL,
+				  omap_wakeupgen_cpu_dead);
 }
 #else
 static void __init irq_hotplug_init(void)
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 008eed0c0787..35859aafbbfc 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -21,6 +21,7 @@ enum cpuhp_state {
 	CPUHP_NET_MVNETA_DEAD,
 	CPUHP_CPUIDLE_DEAD,
 	CPUHP_ARM64_FPSIMD_DEAD,
+	CPUHP_ARM_OMAP_WAKE_DEAD,
 	CPUHP_WORKQUEUE_PREP,
 	CPUHP_POWER_NUMA_PREPARE,
 	CPUHP_HRTIMERS_PREPARE,
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 03/21] ARM: OMAP: wakeupgen: Convert to hotplug state machine
  2016-09-06 17:04 ` [PATCH 03/21] ARM: OMAP: wakeupgen: Convert to hotplug state machine Sebastian Andrzej Siewior
@ 2016-09-13 22:24   ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2016-09-13 22:24 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar, rt, tglx, linux-omap,
	linux-arm-kernel

* Sebastian Andrzej Siewior <bigeasy@linutronix.de> [160906 10:06]:
> Install the callbacks via the state machine.

Assuming this will get merged with the series:

Acked-by: Tony Lindgren <tony@atomide.com>

If you want me to pick it, please let me know.

Regards,

Tony

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-13 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20160906170457.32393-1-bigeasy@linutronix.de>
2016-09-06 17:04 ` [PATCH 03/21] ARM: OMAP: wakeupgen: Convert to hotplug state machine Sebastian Andrzej Siewior
2016-09-13 22:24   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).