mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] irqchip: mips-gic: Map to VPs using HW VPNum
@ 2016-07-05 13:25 Paul Burton
  2016-07-05 13:26 ` [PATCH 2/2] irqchip: mips-gic: Match IPI IRQ domain by bus token only Paul Burton
  2016-07-05 15:01 ` [tip:irq/urgent] irqchip/mips-gic: Map to VPs using HW VPNum tip-bot for Paul Burton
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Burton @ 2016-07-05 13:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Burton, Qais Yousef, Thomas Gleixner, Jason Cooper,
	Marc Zyngier, linux-mips, Ralf Baechle

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 d46812bb0bef ("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 2af70a962070 ("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.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: d46812bb0bef ("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR")
Fixes: 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain")
Cc: Qais Yousef <qsyousef@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
---
 drivers/irqchip/irq-mips-gic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 8a4adbeb..69b1b82 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -718,7 +718,7 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq,
 
 	spin_lock_irqsave(&gic_lock, flags);
 	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++)
 		clear_bit(intr, pcpu_masks[i].pcpu_mask);
 	set_bit(intr, pcpu_masks[vpe].pcpu_mask);
-- 
2.9.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-05 15:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05 13:25 [PATCH 1/2] irqchip: mips-gic: Map to VPs using HW VPNum Paul Burton
2016-07-05 13:26 ` [PATCH 2/2] irqchip: mips-gic: Match IPI IRQ domain by bus token only Paul Burton
2016-07-05 15:01   ` [tip:irq/urgent] irqchip/mips-gic: " tip-bot for Paul Burton
2016-07-05 15:01 ` [tip:irq/urgent] irqchip/mips-gic: Map to VPs using HW VPNum tip-bot for Paul Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®