aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2015-09-22 14:29:10 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-09-27 08:11:17 -0400
commitab41f6c8620a6e65df4ee19d284c97efdd3d9b63 (patch)
tree7d5081dd54460e3a7533ec2a51da304b4f4bdbb3
parent7573b94e08aeb5b814e2f277210bdcdf21a83869 (diff)
irqchip: mips-gic: Convert CPU numbers to VP IDs.
Make use of the mips_cm_vp_id function to convert from Linux CPU numbers to the VP IDs used by hardware, which are not identical in all systems. Without doing so we map interrupts to incorrect VP(E)s. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Cc: Paul Burton <paul.burton@imgtec.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11212/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--drivers/irqchip/irq-mips-gic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index af2f16bb8a94..842a53d3f4ad 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -426,7 +426,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
426 spin_lock_irqsave(&gic_lock, flags); 426 spin_lock_irqsave(&gic_lock, flags);
427 427
428 /* Re-route this IRQ */ 428 /* Re-route this IRQ */
429 gic_map_to_vpe(irq, cpumask_first(&tmp)); 429 gic_map_to_vpe(irq, mips_cm_vp_id(cpumask_first(&tmp)));
430 430
431 /* Update the pcpu_masks */ 431 /* Update the pcpu_masks */
432 for (i = 0; i < NR_CPUS; i++) 432 for (i = 0; i < NR_CPUS; i++)
@@ -599,7 +599,7 @@ static __init void gic_ipi_init_one(unsigned int intr, int cpu,
599 GIC_SHARED_TO_HWIRQ(intr)); 599 GIC_SHARED_TO_HWIRQ(intr));
600 int i; 600 int i;
601 601
602 gic_map_to_vpe(intr, cpu); 602 gic_map_to_vpe(intr, mips_cm_vp_id(cpu));
603 for (i = 0; i < NR_CPUS; i++) 603 for (i = 0; i < NR_CPUS; i++)
604 clear_bit(intr, pcpu_masks[i].pcpu_mask); 604 clear_bit(intr, pcpu_masks[i].pcpu_mask);
605 set_bit(intr, pcpu_masks[cpu].pcpu_mask); 605 set_bit(intr, pcpu_masks[cpu].pcpu_mask);