Skip to content

Commit

Permalink
ARC: [SMP] Fix IPI IRQ registration
Browse files Browse the repository at this point in the history
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: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Noam Camus authored and Vineet Gupta committed Jun 26, 2014
1 parent a4b6cb7 commit 7e51221
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions arch/arc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
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 *dev_id = &per_cpu(ipi_dev, smp_processor_id());
return request_percpu_irq(irq, do_IPI, "IPI Interrupt", dev_id);
if (!cpu)
return setup_irq(irq, &arc_ipi_irq);
else
arch_unmask_irq(irq);

return 0;
}

0 comments on commit 7e51221

Please sign in to comment.