Commit 7e512219 authored by Noam Camus's avatar Noam Camus Committed by Vineet Gupta

ARC: [SMP] Fix IPI IRQ registration

Handle it just like timer. Current request_percpu_irq() would fail on
non-boot cpus and thus IRQ will remian unmasked on those cpus.

[vgupta: fix changelong]
Signed-off-by: default avatarNoam Camus <noamc@ezchip.com>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent a4b6cb73
...@@ -337,8 +337,19 @@ irqreturn_t do_IPI(int irq, void *dev_id) ...@@ -337,8 +337,19 @@ irqreturn_t do_IPI(int irq, void *dev_id)
* API called by platform code to hookup arch-common ISR to their IPI IRQ * API called by platform code to hookup arch-common ISR to their IPI IRQ
*/ */
static DEFINE_PER_CPU(int, ipi_dev); static DEFINE_PER_CPU(int, ipi_dev);
static struct irqaction arc_ipi_irq = {
.name = "IPI Interrupt",
.flags = IRQF_PERCPU,
.handler = do_IPI,
};
int smp_ipi_irq_setup(int cpu, int irq) int smp_ipi_irq_setup(int cpu, int irq)
{ {
int *dev_id = &per_cpu(ipi_dev, smp_processor_id()); if (!cpu)
return request_percpu_irq(irq, do_IPI, "IPI Interrupt", dev_id); return setup_irq(irq, &arc_ipi_irq);
else
arch_unmask_irq(irq);
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment