From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbcGSHAP (ORCPT ); Tue, 19 Jul 2016 03:00:15 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44674 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752535AbcGSHAL (ORCPT ); Tue, 19 Jul 2016 03:00:11 -0400 Date: Mon, 18 Jul 2016 23:59:31 -0700 From: tip-bot for Richard Cochran Message-ID: Cc: jason@lakedaemon.net, hpa@zytor.com, tglx@linutronix.de, anna-maria@linutronix.de, mingo@kernel.org, marc.zyngier@arm.com, bigeasy@linutronix.de, rcochran@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org Reply-To: torvalds@linux-foundation.org, peterz@infradead.org, rcochran@linutronix.de, bigeasy@linutronix.de, marc.zyngier@arm.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, jason@lakedaemon.net, anna-maria@linutronix.de, tglx@linutronix.de In-Reply-To: <20160713153333.244546182@linutronix.de> References: <20160713153333.244546182@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] irqchip/hip04: Convert to hotplug state machine Git-Commit-ID: 6c034d1736384c23ea97509e36e84f35f4a9b23c 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: 6c034d1736384c23ea97509e36e84f35f4a9b23c Gitweb: http://git.kernel.org/tip/6c034d1736384c23ea97509e36e84f35f4a9b23c Author: Richard Cochran AuthorDate: Wed, 13 Jul 2016 17:16:06 +0000 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 09:34:29 +0200 irqchip/hip04: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Richard Cochran Signed-off-by: Anna-Maria Gleixner Reviewed-by: Sebastian Andrzej Siewior Acked-by: Jason Cooper Cc: Linus Torvalds Cc: Marc Zyngier Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160713153333.244546182@linutronix.de Signed-off-by: Ingo Molnar --- drivers/irqchip/irq-hip04.c | 25 +++++-------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c index 9e25d8c..021b0e0 100644 --- a/drivers/irqchip/irq-hip04.c +++ b/drivers/irqchip/irq-hip04.c @@ -342,26 +342,12 @@ static int hip04_irq_domain_xlate(struct irq_domain *d, return ret; } -#ifdef CONFIG_SMP -static int hip04_irq_secondary_init(struct notifier_block *nfb, - unsigned long action, - void *hcpu) +static int hip04_irq_starting_cpu(unsigned int cpu) { - if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) - hip04_irq_cpu_init(&hip04_data); - return NOTIFY_OK; + hip04_irq_cpu_init(&hip04_data); + return 0; } -/* - * Notifier for enabling the INTC CPU interface. Set an arbitrarily high - * priority because the GIC needs to be up before the ARM generic timers. - */ -static struct notifier_block hip04_irq_cpu_notifier = { - .notifier_call = hip04_irq_secondary_init, - .priority = 100, -}; -#endif - static const struct irq_domain_ops hip04_irq_domain_ops = { .map = hip04_irq_domain_map, .xlate = hip04_irq_domain_xlate, @@ -417,13 +403,12 @@ hip04_of_init(struct device_node *node, struct device_node *parent) #ifdef CONFIG_SMP set_smp_cross_call(hip04_raise_softirq); - register_cpu_notifier(&hip04_irq_cpu_notifier); #endif set_handle_irq(hip04_handle_irq); hip04_irq_dist_init(&hip04_data); - hip04_irq_cpu_init(&hip04_data); - + cpuhp_setup_state(CPUHP_AP_IRQ_HIP04_STARTING, "AP_IRQ_HIP04_STARTING", + hip04_irq_starting_cpu, NULL); return 0; } IRQCHIP_DECLARE(hip04_intc, "hisilicon,hip04-intc", hip04_of_init); diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index d6e4a06..62ab4ff 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -11,6 +11,7 @@ enum cpuhp_state { CPUHP_AP_SCHED_STARTING, CPUHP_AP_IRQ_GIC_STARTING, CPUHP_AP_IRQ_GICV3_STARTING, + CPUHP_AP_IRQ_HIP04_STARTING, CPUHP_AP_NOTIFY_STARTING, CPUHP_AP_ONLINE, CPUHP_TEARDOWN_CPU,