diff options
author | Noam Camus <noamc@ezchip.com> | 2013-02-28 04:07:06 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-06-26 02:28:25 -0400 |
commit | 7e5122190b47c2574eda26aa0bbda693b2821449 (patch) | |
tree | 1915b48d1e4738c77870222c804d48f461b627c9 /arch/arc | |
parent | a4b6cb735b25aa84a462a1985e3e43bebaf5beb4 (diff) |
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: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/kernel/smp.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index cf90b6f4d3e0..c802bb500602 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c | |||
@@ -337,8 +337,19 @@ irqreturn_t do_IPI(int irq, void *dev_id) | |||
337 | * API called by platform code to hookup arch-common ISR to their IPI IRQ | 337 | * API called by platform code to hookup arch-common ISR to their IPI IRQ |
338 | */ | 338 | */ |
339 | static DEFINE_PER_CPU(int, ipi_dev); | 339 | static DEFINE_PER_CPU(int, ipi_dev); |
340 | |||
341 | static struct irqaction arc_ipi_irq = { | ||
342 | .name = "IPI Interrupt", | ||
343 | .flags = IRQF_PERCPU, | ||
344 | .handler = do_IPI, | ||
345 | }; | ||
346 | |||
340 | int smp_ipi_irq_setup(int cpu, int irq) | 347 | int smp_ipi_irq_setup(int cpu, int irq) |
341 | { | 348 | { |
342 | int *dev_id = &per_cpu(ipi_dev, smp_processor_id()); | 349 | if (!cpu) |
343 | return request_percpu_irq(irq, do_IPI, "IPI Interrupt", dev_id); | 350 | return setup_irq(irq, &arc_ipi_irq); |
351 | else | ||
352 | arch_unmask_irq(irq); | ||
353 | |||
354 | return 0; | ||
344 | } | 355 | } |