mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-26 20:44:32 +08:00
irqchip/mips-gic: Map to VPs using HW VPNum
When mapping an interrupt to a VP(E) we must use the identifier for the VP that the hardware expects, and this does not always match up with the Linux CPU number. Commitd46812bb0b
("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR") corrected this for the cases that existed at the time it was written, but commit2af70a9620
("irqchip/mips-gic: Add a IPI hierarchy domain") added another case before the former patch was merged. This leads to incorrectly using Linux CPU numbers when mapping interrupts to VPs, which breaks on certain systems such as those with multi-core I6400 CPUs. Fix by adding the appropriate call to mips_cm_vp_id() to retrieve the expected VP identifier. Fixes:d46812bb0b
("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR") Fixes:2af70a9620
("irqchip/mips-gic: Add a IPI hierarchy domain") Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Jason Cooper <jason@lakedaemon.net> Cc: Qais Yousef <qsyousef@gmail.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160705132600.27730-1-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
a99cde438d
commit
99ec8a3608
@ -718,7 +718,7 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq,
|
|||||||
|
|
||||||
spin_lock_irqsave(&gic_lock, flags);
|
spin_lock_irqsave(&gic_lock, flags);
|
||||||
gic_map_to_pin(intr, gic_cpu_pin);
|
gic_map_to_pin(intr, gic_cpu_pin);
|
||||||
gic_map_to_vpe(intr, vpe);
|
gic_map_to_vpe(intr, mips_cm_vp_id(vpe));
|
||||||
for (i = 0; i < min(gic_vpes, NR_CPUS); i++)
|
for (i = 0; i < min(gic_vpes, NR_CPUS); i++)
|
||||||
clear_bit(intr, pcpu_masks[i].pcpu_mask);
|
clear_bit(intr, pcpu_masks[i].pcpu_mask);
|
||||||
set_bit(intr, pcpu_masks[vpe].pcpu_mask);
|
set_bit(intr, pcpu_masks[vpe].pcpu_mask);
|
||||||
|
Loading…
Reference in New Issue
Block a user