Message ID | 20160906170457.32393-2-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Sep 06, 2016 at 07:04:37PM +0200, Sebastian Andrzej Siewior wrote: > Install the callbacks via the state machine. > > Cc: Catalin Marinas <catalin.marinas@arm.com> > Cc: Will Deacon <will.deacon@arm.com> > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- > arch/arm64/kernel/fpsimd.c | 22 +++++----------------- > include/linux/cpuhotplug.h | 1 + > 2 files changed, 6 insertions(+), 17 deletions(-) Looks fine to me: Acked-by: Will Deacon <will.deacon@arm.com> > diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h > index afd59e2ca4b3..0da071ff36d2 100644 > --- a/include/linux/cpuhotplug.h > +++ b/include/linux/cpuhotplug.h > @@ -20,6 +20,7 @@ enum cpuhp_state { > CPUHP_SOFTIRQ_DEAD, > CPUHP_NET_MVNETA_DEAD, > CPUHP_CPUIDLE_DEAD, > + CPUHP_ARM64_FPSIMD_DEAD, > CPUHP_WORKQUEUE_PREP, > CPUHP_POWER_NUMA_PREPARE, > CPUHP_HRTIMERS_PREPARE, Are you planning to take this via your tree? The arm64 queue already touches cpuhotplug.h for the hw-breakpoint and debugmon changes, so there's a simple conflict to address here. Will
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) { } #endif /* CONFIG_CPU_PM */ #ifdef CONFIG_HOTPLUG_CPU -static int fpsimd_cpu_hotplug_notifier(struct notifier_block *nfb, - unsigned long action, - void *hcpu) +static int fpsimd_cpu_dead(unsigned int cpu) { - unsigned int cpu = (long)hcpu; - - switch (action) { - case CPU_DEAD: - case CPU_DEAD_FROZEN: - per_cpu(fpsimd_last_state, cpu) = NULL; - break; - } - return NOTIFY_OK; + per_cpu(fpsimd_last_state, cpu) = NULL; + return 0; } -static struct notifier_block fpsimd_cpu_hotplug_notifier_block = { - .notifier_call = fpsimd_cpu_hotplug_notifier, -}; - static inline void fpsimd_hotplug_init(void) { - register_cpu_notifier(&fpsimd_cpu_hotplug_notifier_block); + cpuhp_setup_state_nocalls(CPUHP_ARM64_FPSIMD_DEAD, "arm64/fpsimd:dead", + NULL, fpsimd_cpu_dead); } #else diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index afd59e2ca4b3..0da071ff36d2 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -20,6 +20,7 @@ enum cpuhp_state { CPUHP_SOFTIRQ_DEAD, CPUHP_NET_MVNETA_DEAD, CPUHP_CPUIDLE_DEAD, + CPUHP_ARM64_FPSIMD_DEAD, CPUHP_WORKQUEUE_PREP, CPUHP_POWER_NUMA_PREPARE, CPUHP_HRTIMERS_PREPARE,
Install the callbacks via the state machine. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- arch/arm64/kernel/fpsimd.c | 22 +++++----------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 6 insertions(+), 17 deletions(-)