Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477652
| From | Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/21] ARM: OMAP: wakeupgen: Convert to hotplug state machine |
| Date | 2016-09-06 19:10 +0200 |
| Message-ID | <ses2K-4Ps-23@gated-at.bofh.it> (permalink) |
| References | <ses2J-4Ps-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cpu hotplug: convert more drivers (batch #3) Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 20/21] blk: mq: cpu-notif: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 11/21] ACPI: processor: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
Re: [PATCH 11/21] ACPI: processor: Convert to hotplug state machine "Rafael J. Wysocki" <rafael@kernel.org> - 2016-09-06 23:10 +0200
Re: [PATCH 11/21] ACPI: processor: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-07 16:10 +0200
Re: [PATCH 11/21] ACPI: processor: Convert to hotplug state machine "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-09-07 18:00 +0200
[PATCH 21/21] blk: mq: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 03/21] ARM: OMAP: wakeupgen: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 15/21] mips: octeon: smp: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
Re: [PATCH 15/21] mips: octeon: smp: Convert to hotplug state machine Matt Redfearn <matt.redfearn@imgtec.com> - 2016-09-07 10:30 +0200
Re: [PATCH 15/21] mips: octeon: smp: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-07 16:30 +0200
Re: [PATCH 15/21] mips: octeon: smp: Convert to hotplug state machine Matt Redfearn <matt.redfearn@imgtec.com> - 2016-09-08 10:40 +0200
[PATCH 04/21] ia64: mca: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 08/21] block: softirq: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 06/21] x86: microcode: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
Re: [PATCH 06/21] x86: microcode: Convert to hotplug state machine Borislav Petkov <bp@alien8.de> - 2016-09-07 13:40 +0200
Re: [PATCH 06/21] x86: microcode: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-07 17:00 +0200
Re: [PATCH 06/21] x86: microcode: Convert to hotplug state machine Borislav Petkov <bp@alien8.de> - 2016-09-07 18:10 +0200
[PATCH 06/21 v2] x86: microcode: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-07 18:50 +0200
[PATCH 14/21] fault-injection: cpu: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 19/21] blk: mq: reserve hotplug ID states for block Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 13/21] padata: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 17/21] s390: mm: pfault: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 02/21] ARM: shmobile: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
Re: [PATCH 02/21] ARM: shmobile: Convert to hotplug state machine Geert Uytterhoeven <geert@linux-m68k.org> - 2016-09-06 20:10 +0200
Re: [PATCH 02/21] ARM: shmobile: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-07 16:00 +0200
[PATCH 16/21] mips: loongson: smp: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 12/21] cpufreq: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
Re: [PATCH 12/21] cpufreq: Convert to hotplug state machine "Rafael J. Wysocki" <rafael@kernel.org> - 2016-09-06 23:30 +0200
Re: [PATCH 12/21] cpufreq: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-07 16:20 +0200
Re: [PATCH 12/21] cpufreq: Convert to hotplug state machine "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-09-07 18:00 +0200
[PATCH 07/21] lib: irq_poll: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 01/21] arm64: FP/SIMD: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
Re: [PATCH 01/21] arm64: FP/SIMD: Convert to hotplug state machine Will Deacon <will.deacon@arm.com> - 2016-09-06 20:20 +0200
[PATCH 05/21] sh: SH-X3 SMP: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 10/21] virtio scsi: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:10 +0200
[PATCH 09/21] oprofile: timer: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-09-06 19:20 +0200
csiph-web