diff options
Diffstat (limited to 'drivers/irqchip/irq-bcm2836.c')
-rw-r--r-- | drivers/irqchip/irq-bcm2836.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c index df1949c0aa23..d96b2c947e74 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c | |||
@@ -202,26 +202,19 @@ static void bcm2836_arm_irqchip_send_ipi(const struct cpumask *mask, | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | 204 | ||
205 | /* Unmasks the IPI on the CPU when it's online. */ | 205 | static int bcm2836_cpu_starting(unsigned int cpu) |
206 | static int bcm2836_arm_irqchip_cpu_notify(struct notifier_block *nfb, | ||
207 | unsigned long action, void *hcpu) | ||
208 | { | 206 | { |
209 | unsigned int cpu = (unsigned long)hcpu; | 207 | bcm2836_arm_irqchip_unmask_per_cpu_irq(LOCAL_MAILBOX_INT_CONTROL0, 0, |
210 | unsigned int int_reg = LOCAL_MAILBOX_INT_CONTROL0; | 208 | cpu); |
211 | unsigned int mailbox = 0; | 209 | return 0; |
212 | |||
213 | if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) | ||
214 | bcm2836_arm_irqchip_unmask_per_cpu_irq(int_reg, mailbox, cpu); | ||
215 | else if (action == CPU_DYING) | ||
216 | bcm2836_arm_irqchip_mask_per_cpu_irq(int_reg, mailbox, cpu); | ||
217 | |||
218 | return NOTIFY_OK; | ||
219 | } | 210 | } |
220 | 211 | ||
221 | static struct notifier_block bcm2836_arm_irqchip_cpu_notifier = { | 212 | static int bcm2836_cpu_dying(unsigned int cpu) |
222 | .notifier_call = bcm2836_arm_irqchip_cpu_notify, | 213 | { |
223 | .priority = 100, | 214 | bcm2836_arm_irqchip_mask_per_cpu_irq(LOCAL_MAILBOX_INT_CONTROL0, 0, |
224 | }; | 215 | cpu); |
216 | return 0; | ||
217 | } | ||
225 | 218 | ||
226 | #ifdef CONFIG_ARM | 219 | #ifdef CONFIG_ARM |
227 | static int __init bcm2836_smp_boot_secondary(unsigned int cpu, | 220 | static int __init bcm2836_smp_boot_secondary(unsigned int cpu, |
@@ -251,10 +244,9 @@ bcm2836_arm_irqchip_smp_init(void) | |||
251 | { | 244 | { |
252 | #ifdef CONFIG_SMP | 245 | #ifdef CONFIG_SMP |
253 | /* Unmask IPIs to the boot CPU. */ | 246 | /* Unmask IPIs to the boot CPU. */ |
254 | bcm2836_arm_irqchip_cpu_notify(&bcm2836_arm_irqchip_cpu_notifier, | 247 | cpuhp_setup_state(CPUHP_AP_IRQ_BCM2836_STARTING, |
255 | CPU_STARTING, | 248 | "AP_IRQ_BCM2836_STARTING", bcm2836_cpu_starting, |
256 | (void *)(uintptr_t)smp_processor_id()); | 249 | bcm2836_cpu_dying); |
257 | register_cpu_notifier(&bcm2836_arm_irqchip_cpu_notifier); | ||
258 | 250 | ||
259 | set_smp_cross_call(bcm2836_arm_irqchip_send_ipi); | 251 | set_smp_cross_call(bcm2836_arm_irqchip_send_ipi); |
260 | 252 | ||