From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752739AbcGSHCO (ORCPT ); Tue, 19 Jul 2016 03:02:14 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44776 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752388AbcGSHCL (ORCPT ); Tue, 19 Jul 2016 03:02:11 -0400 Date: Tue, 19 Jul 2016 00:01:02 -0700 From: tip-bot for Sebastian Andrzej Siewior Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, peterz@infradead.org, mingo@kernel.org, tglx@linutronix.de, andrew@lunn.ch, linux@armlinux.org.uk, bigeasy@linutronix.de, gregory.clement@free-electrons.com, anna-maria@linutronix.de, jason@lakedaemon.net, torvalds@linux-foundation.org, sebastian.hesselbarth@gmail.com Reply-To: andrew@lunn.ch, tglx@linutronix.de, hpa@zytor.com, peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, anna-maria@linutronix.de, gregory.clement@free-electrons.com, bigeasy@linutronix.de, linux@armlinux.org.uk, sebastian.hesselbarth@gmail.com, torvalds@linux-foundation.org, jason@lakedaemon.net In-Reply-To: <20160713153333.503198935@linutronix.de> References: <20160713153333.503198935@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] ARM/mvebu: Convert to hotplug state machine Git-Commit-ID: 7fbbaebf8cd18cca58e84837fd80c07ea8d8bd56 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: 7fbbaebf8cd18cca58e84837fd80c07ea8d8bd56 Gitweb: http://git.kernel.org/tip/7fbbaebf8cd18cca58e84837fd80c07ea8d8bd56 Author: Sebastian Andrzej Siewior AuthorDate: Wed, 13 Jul 2016 17:16:08 +0000 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 09:34:30 +0200 ARM/mvebu: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Anna-Maria Gleixner Cc: Andrew Lunn Cc: Gregory Clement Cc: Jason Cooper Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russell King Cc: Sebastian Hesselbarth Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160713153333.503198935@linutronix.de Signed-off-by: Ingo Molnar --- arch/arm/mach-mvebu/coherency.c | 19 ++++++------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 7e989d6..77aaa52 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c @@ -111,20 +111,12 @@ static struct notifier_block mvebu_hwcc_pci_nb __maybe_unused = { .notifier_call = mvebu_hwcc_notifier, }; -static int armada_xp_clear_shared_l2_notifier_func(struct notifier_block *nfb, - unsigned long action, void *hcpu) +static int armada_xp_clear_l2_starting(unsigned int cpu) { - if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) - armada_xp_clear_shared_l2(); - - return NOTIFY_OK; + armada_xp_clear_shared_l2(); + return 0; } -static struct notifier_block armada_xp_clear_shared_l2_notifier = { - .notifier_call = armada_xp_clear_shared_l2_notifier_func, - .priority = 100, -}; - static void __init armada_370_coherency_init(struct device_node *np) { struct resource res; @@ -155,8 +147,9 @@ static void __init armada_370_coherency_init(struct device_node *np) of_node_put(cpu_config_np); - register_cpu_notifier(&armada_xp_clear_shared_l2_notifier); - + cpuhp_setup_state_nocalls(CPUHP_AP_ARM_MVEBU_COHERENCY, + "AP_ARM_MVEBU_COHERENCY", + armada_xp_clear_l2_starting, NULL); exit: set_cpu_coherent(); } diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index 420cfcf..d769ec9 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -15,6 +15,7 @@ enum cpuhp_state { CPUHP_AP_IRQ_ARMADA_XP_STARTING, CPUHP_AP_IRQ_ARMADA_CASC_STARTING, CPUHP_AP_IRQ_BCM2836_STARTING, + CPUHP_AP_ARM_MVEBU_COHERENCY, CPUHP_AP_NOTIFY_STARTING, CPUHP_AP_ONLINE, CPUHP_TEARDOWN_CPU,