diff options
author | Richard Cochran <rcochran@linutronix.de> | 2016-07-13 13:16:05 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-07-14 03:34:28 -0400 |
commit | 6670a6d864653859229d2e921ea193a4a677dfea (patch) | |
tree | 6d84ff6b5eb63ef7b60150901760ac9ab0f21f52 | |
parent | 93131f7a9b5c261f9995b4a6cbd7dbbec1351d2f (diff) |
irqchip/gicv3: Convert to hotplug state machine
Install the callbacks via the state machine.
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20160713153333.163186301@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | drivers/irqchip/irq-gic-v3.c | 22 | ||||
-rw-r--r-- | include/linux/cpuhotplug.h | 1 |
2 files changed, 8 insertions, 15 deletions
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 2c5ba0e704bf..6fc56c3466b0 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c | |||
@@ -538,23 +538,13 @@ static void gic_cpu_init(void) | |||
538 | } | 538 | } |
539 | 539 | ||
540 | #ifdef CONFIG_SMP | 540 | #ifdef CONFIG_SMP |
541 | static int gic_secondary_init(struct notifier_block *nfb, | 541 | |
542 | unsigned long action, void *hcpu) | 542 | static int gic_starting_cpu(unsigned int cpu) |
543 | { | 543 | { |
544 | if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) | 544 | gic_cpu_init(); |
545 | gic_cpu_init(); | 545 | return 0; |
546 | return NOTIFY_OK; | ||
547 | } | 546 | } |
548 | 547 | ||
549 | /* | ||
550 | * Notifier for enabling the GIC CPU interface. Set an arbitrarily high | ||
551 | * priority because the GIC needs to be up before the ARM generic timers. | ||
552 | */ | ||
553 | static struct notifier_block gic_cpu_notifier = { | ||
554 | .notifier_call = gic_secondary_init, | ||
555 | .priority = 100, | ||
556 | }; | ||
557 | |||
558 | static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask, | 548 | static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask, |
559 | unsigned long cluster_id) | 549 | unsigned long cluster_id) |
560 | { | 550 | { |
@@ -634,7 +624,9 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) | |||
634 | static void gic_smp_init(void) | 624 | static void gic_smp_init(void) |
635 | { | 625 | { |
636 | set_smp_cross_call(gic_raise_softirq); | 626 | set_smp_cross_call(gic_raise_softirq); |
637 | register_cpu_notifier(&gic_cpu_notifier); | 627 | cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_GICV3_STARTING, |
628 | "AP_IRQ_GICV3_STARTING", gic_starting_cpu, | ||
629 | NULL); | ||
638 | } | 630 | } |
639 | 631 | ||
640 | static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, | 632 | static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, |
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index edc8adf26410..d6e4a06d5020 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h | |||
@@ -10,6 +10,7 @@ enum cpuhp_state { | |||
10 | CPUHP_AP_OFFLINE, | 10 | CPUHP_AP_OFFLINE, |
11 | CPUHP_AP_SCHED_STARTING, | 11 | CPUHP_AP_SCHED_STARTING, |
12 | CPUHP_AP_IRQ_GIC_STARTING, | 12 | CPUHP_AP_IRQ_GIC_STARTING, |
13 | CPUHP_AP_IRQ_GICV3_STARTING, | ||
13 | CPUHP_AP_NOTIFY_STARTING, | 14 | CPUHP_AP_NOTIFY_STARTING, |
14 | CPUHP_AP_ONLINE, | 15 | CPUHP_AP_ONLINE, |
15 | CPUHP_TEARDOWN_CPU, | 16 | CPUHP_TEARDOWN_CPU, |