irqchip/bcm2836: Convert to hotplug state machine
Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Anna-Maria Gleixner <anna-maria@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.416260485@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
cb5ff2d245
commit
7ca04bc277
|
@ -202,26 +202,19 @@ static void bcm2836_arm_irqchip_send_ipi(const struct cpumask *mask,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unmasks the IPI on the CPU when it's online. */
|
static int bcm2836_cpu_starting(unsigned int cpu)
|
||||||
static int bcm2836_arm_irqchip_cpu_notify(struct notifier_block *nfb,
|
|
||||||
unsigned long action, void *hcpu)
|
|
||||||
{
|
{
|
||||||
unsigned int cpu = (unsigned long)hcpu;
|
bcm2836_arm_irqchip_unmask_per_cpu_irq(LOCAL_MAILBOX_INT_CONTROL0, 0,
|
||||||
unsigned int int_reg = LOCAL_MAILBOX_INT_CONTROL0;
|
cpu);
|
||||||
unsigned int mailbox = 0;
|
return 0;
|
||||||
|
|
||||||
if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
|
|
||||||
bcm2836_arm_irqchip_unmask_per_cpu_irq(int_reg, mailbox, cpu);
|
|
||||||
else if (action == CPU_DYING)
|
|
||||||
bcm2836_arm_irqchip_mask_per_cpu_irq(int_reg, mailbox, cpu);
|
|
||||||
|
|
||||||
return NOTIFY_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct notifier_block bcm2836_arm_irqchip_cpu_notifier = {
|
static int bcm2836_cpu_dying(unsigned int cpu)
|
||||||
.notifier_call = bcm2836_arm_irqchip_cpu_notify,
|
{
|
||||||
.priority = 100,
|
bcm2836_arm_irqchip_mask_per_cpu_irq(LOCAL_MAILBOX_INT_CONTROL0, 0,
|
||||||
};
|
cpu);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ARM
|
#ifdef CONFIG_ARM
|
||||||
int __init bcm2836_smp_boot_secondary(unsigned int cpu,
|
int __init bcm2836_smp_boot_secondary(unsigned int cpu,
|
||||||
|
@ -251,10 +244,9 @@ bcm2836_arm_irqchip_smp_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
/* Unmask IPIs to the boot CPU. */
|
/* Unmask IPIs to the boot CPU. */
|
||||||
bcm2836_arm_irqchip_cpu_notify(&bcm2836_arm_irqchip_cpu_notifier,
|
cpuhp_setup_state(CPUHP_AP_IRQ_BCM2836_STARTING,
|
||||||
CPU_STARTING,
|
"AP_IRQ_BCM2836_STARTING", bcm2836_cpu_starting,
|
||||||
(void *)(uintptr_t)smp_processor_id());
|
bcm2836_cpu_dying);
|
||||||
register_cpu_notifier(&bcm2836_arm_irqchip_cpu_notifier);
|
|
||||||
|
|
||||||
set_smp_cross_call(bcm2836_arm_irqchip_send_ipi);
|
set_smp_cross_call(bcm2836_arm_irqchip_send_ipi);
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ enum cpuhp_state {
|
||||||
CPUHP_AP_IRQ_HIP04_STARTING,
|
CPUHP_AP_IRQ_HIP04_STARTING,
|
||||||
CPUHP_AP_IRQ_ARMADA_XP_STARTING,
|
CPUHP_AP_IRQ_ARMADA_XP_STARTING,
|
||||||
CPUHP_AP_IRQ_ARMADA_CASC_STARTING,
|
CPUHP_AP_IRQ_ARMADA_CASC_STARTING,
|
||||||
|
CPUHP_AP_IRQ_BCM2836_STARTING,
|
||||||
CPUHP_AP_NOTIFY_STARTING,
|
CPUHP_AP_NOTIFY_STARTING,
|
||||||
CPUHP_AP_ONLINE,
|
CPUHP_AP_ONLINE,
|
||||||
CPUHP_TEARDOWN_CPU,
|
CPUHP_TEARDOWN_CPU,
|
||||||
|
|
Loading…
Reference in New Issue