Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477653
| From | Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 15/21] mips: octeon: smp: Convert to hotplug state machine |
| Date | 2016-09-06 19:10 +0200 |
| Message-ID | <ses2K-4Ps-25@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: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/mips/cavium-octeon/smp.c | 24 +++---------------------
include/linux/cpuhotplug.h | 1 +
2 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index 4d457d602d3b..228c1cab2912 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -380,29 +380,11 @@ static int octeon_update_boot_vector(unsigned int cpu)
return 0;
}
-static int octeon_cpu_callback(struct notifier_block *nfb,
- unsigned long action, void *hcpu)
-{
- unsigned int cpu = (unsigned long)hcpu;
-
- switch (action & ~CPU_TASKS_FROZEN) {
- case CPU_UP_PREPARE:
- octeon_update_boot_vector(cpu);
- break;
- case CPU_ONLINE:
- pr_info("Cpu %d online\n", cpu);
- break;
- case CPU_DEAD:
- break;
- }
-
- return NOTIFY_OK;
-}
-
static int register_cavium_notifier(void)
{
- hotcpu_notifier(octeon_cpu_callback, 0);
- return 0;
+ return cpuhp_setup_state_nocalls(CPUHP_MIPS_CAVIUM_PREPARE,
+ "mips/cavium:prepare",
+ octeon_update_boot_vector, NULL);
}
late_initcall(register_cavium_notifier);
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 4cbf88c955d6..058d312fdf6f 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -44,6 +44,7 @@ enum cpuhp_state {
CPUHP_SH_SH3X_PREPARE,
CPUHP_X86_MICRCODE_PREPARE,
CPUHP_NOTF_ERR_INJ_PREPARE,
+ CPUHP_MIPS_CAVIUM_PREPARE,
CPUHP_TIMERS_DEAD,
CPUHP_BRINGUP_CPU,
CPUHP_AP_IDLE_DEAD,
--
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