aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2016-09-06 13:04:37 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-09-19 15:44:25 -0400
commitc23a7266e6599e74305cc5b790f93398bb212380 (patch)
tree1868f8927df18e8ffa404b393a03e1d2e45a0cda /arch/arm64/kernel
parentda3ed6519b19a9def0fcb966c6274946ad18d9a6 (diff)
arm64/FP/SIMD: Convert to hotplug state machine
Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Will Deacon <will.deacon@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: rt@linutronix.de Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20160906170457.32393-2-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r--arch/arm64/kernel/fpsimd.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 975b274ee7b5..394c61db5566 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -299,28 +299,16 @@ static inline void fpsimd_pm_init(void) { }
299#endif /* CONFIG_CPU_PM */ 299#endif /* CONFIG_CPU_PM */
300 300
301#ifdef CONFIG_HOTPLUG_CPU 301#ifdef CONFIG_HOTPLUG_CPU
302static int fpsimd_cpu_hotplug_notifier(struct notifier_block *nfb, 302static int fpsimd_cpu_dead(unsigned int cpu)
303 unsigned long action,
304 void *hcpu)
305{ 303{
306 unsigned int cpu = (long)hcpu; 304 per_cpu(fpsimd_last_state, cpu) = NULL;
307 305 return 0;
308 switch (action) {
309 case CPU_DEAD:
310 case CPU_DEAD_FROZEN:
311 per_cpu(fpsimd_last_state, cpu) = NULL;
312 break;
313 }
314 return NOTIFY_OK;
315} 306}
316 307
317static struct notifier_block fpsimd_cpu_hotplug_notifier_block = {
318 .notifier_call = fpsimd_cpu_hotplug_notifier,
319};
320
321static inline void fpsimd_hotplug_init(void) 308static inline void fpsimd_hotplug_init(void)
322{ 309{
323 register_cpu_notifier(&fpsimd_cpu_hotplug_notifier_block); 310 cpuhp_setup_state_nocalls(CPUHP_ARM64_FPSIMD_DEAD, "arm64/fpsimd:dead",
311 NULL, fpsimd_cpu_dead);
324} 312}
325 313
326#else 314#else