public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Paul Burton <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ralf@linux-mips.org, tglx@linutronix.de, jason@lakedaemon.net,
	qsyousef@gmail.com, linux-kernel@vger.kernel.org,
	mingo@kernel.org, marc.zyngier@arm.com, hpa@zytor.com,
	paul.burton@imgtec.com
Subject: [tip:irq/urgent] irqchip/mips-gic: Map to VPs using HW VPNum
Date: Tue, 5 Jul 2016 08:01:17 -0700	[thread overview]
Message-ID: <tip-99ec8a3608330d202448085185cf28389b789b7b@git.kernel.org> (raw)
In-Reply-To: <20160705132600.27730-1-paul.burton@imgtec.com>

Commit-ID:  99ec8a3608330d202448085185cf28389b789b7b
Gitweb:     http://git.kernel.org/tip/99ec8a3608330d202448085185cf28389b789b7b
Author:     Paul Burton <paul.burton@imgtec.com>
AuthorDate: Tue, 5 Jul 2016 14:25:59 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 5 Jul 2016 16:54:21 +0200

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. 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.

Fixes: d46812bb0bef ("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR")
Fixes: 2af70a962070 ("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>

---
 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);

      parent reply	other threads:[~2016-07-05 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Paul Burton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-99ec8a3608330d202448085185cf28389b789b7b@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mingo@kernel.org \
    --cc=paul.burton@imgtec.com \
    --cc=qsyousef@gmail.com \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox