From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932392AbcISTyC (ORCPT ); Mon, 19 Sep 2016 15:54:02 -0400 Received: from terminus.zytor.com ([198.137.202.10]:36786 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932109AbcISTyA (ORCPT ); Mon, 19 Sep 2016 15:54:00 -0400 Date: Mon, 19 Sep 2016 12:51:53 -0700 From: tip-bot for Sebastian Andrzej Siewior Message-ID: Cc: mingo@kernel.org, peterz@infradead.org, hpa@zytor.com, catalin.marinas@arm.com, bigeasy@linutronix.de, will.deacon@arm.com, tglx@linutronix.de, linux-kernel@vger.kernel.org Reply-To: mingo@kernel.org, peterz@infradead.org, hpa@zytor.com, catalin.marinas@arm.com, bigeasy@linutronix.de, tglx@linutronix.de, will.deacon@arm.com, linux-kernel@vger.kernel.org In-Reply-To: <20160906170457.32393-2-bigeasy@linutronix.de> References: <20160906170457.32393-2-bigeasy@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] arm64/FP/SIMD: Convert to hotplug state machine Git-Commit-ID: c23a7266e6599e74305cc5b790f93398bb212380 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c23a7266e6599e74305cc5b790f93398bb212380 Gitweb: http://git.kernel.org/tip/c23a7266e6599e74305cc5b790f93398bb212380 Author: Sebastian Andrzej Siewior AuthorDate: Tue, 6 Sep 2016 19:04:37 +0200 Committer: Thomas Gleixner CommitDate: Mon, 19 Sep 2016 21:44:25 +0200 arm64/FP/SIMD: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Will Deacon Cc: Peter Zijlstra Cc: Catalin Marinas 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 --- arch/arm64/kernel/fpsimd.c | 22 +++++----------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 975b274..394c61d 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 afd59e2..0da071f 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,