Skip to content

Commit 42c33fd

Browse files
paulburtongregkh
authored andcommitted
irqchip/mips-gic: Map to VPs using HW VPNum
commit 99ec8a3 upstream. 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. Commit d46812b ("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR") corrected this for the cases that existed at the time it was written, but commit 2af70a9 ("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: d46812b ("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR") Fixes: 2af70a9 ("irqchip/mips-gic: Add a IPI hierarchy domain") Signed-off-by: Paul Burton <[email protected]> Cc: [email protected] Cc: Jason Cooper <[email protected]> Cc: Qais Yousef <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Marc Zyngier <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d71872a commit 42c33fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/irqchip/irq-mips-gic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq,
706706

707707
spin_lock_irqsave(&gic_lock, flags);
708708
gic_map_to_pin(intr, gic_cpu_pin);
709-
gic_map_to_vpe(intr, vpe);
709+
gic_map_to_vpe(intr, mips_cm_vp_id(vpe));
710710
for (i = 0; i < min(gic_vpes, NR_CPUS); i++)
711711
clear_bit(intr, pcpu_masks[i].pcpu_mask);
712712
set_bit(intr, pcpu_masks[vpe].pcpu_mask);

0 commit comments

Comments
 (0)