Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1230708

[PATCH 2/3] irqchip: mips-gic: convert CPU numbers to VP IDs

From Paul Burton <paul.burton@imgtec.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] irqchip: mips-gic: convert CPU numbers to VP IDs
Date 2015-09-22 20:40 +0200
Message-ID <qbADU-561-43@gated-at.bofh.it> (permalink)
References <qbAue-4UA-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

 drivers/irqchip/irq-mips-gic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index af2f16b..842a53d 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,
 	spin_lock_irqsave(&gic_lock, flags);
 
 	/* Re-route this IRQ */
-	gic_map_to_vpe(irq, cpumask_first(&tmp));
+	gic_map_to_vpe(irq, mips_cm_vp_id(cpumask_first(&tmp)));
 
 	/* Update the pcpu_masks */
 	for (i = 0; i < NR_CPUS; i++)
@@ -599,7 +599,7 @@ static __init void gic_ipi_init_one(unsigned int intr, int cpu,
 				      GIC_SHARED_TO_HWIRQ(intr));
 	int i;
 
-	gic_map_to_vpe(intr, cpu);
+	gic_map_to_vpe(intr, mips_cm_vp_id(cpu));
 	for (i = 0; i < NR_CPUS; i++)
 		clear_bit(intr, pcpu_masks[i].pcpu_mask);
 	set_bit(intr, pcpu_masks[cpu].pcpu_mask);
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] MIPS GIC fixes Paul Burton <paul.burton@imgtec.com> - 2015-09-22 20:30 +0200
  [PATCH 1/3] MIPS: CM: provide a function to map from CPU to VP ID Paul Burton <paul.burton@imgtec.com> - 2015-09-22 20:30 +0200
  [PATCH 2/3] irqchip: mips-gic: convert CPU numbers to VP IDs Paul Burton <paul.burton@imgtec.com> - 2015-09-22 20:40 +0200
  [PATCH 3/3] irqchip: mips-gic: fix pending & mask reads for MIPS64 with 32b GIC Paul Burton <paul.burton@imgtec.com> - 2015-09-22 20:40 +0200
  Re: [PATCH 0/3] MIPS GIC fixes Thomas Gleixner <tglx@linutronix.de> - 2015-09-22 21:10 +0200
    Re: [PATCH 0/3] MIPS GIC fixes Paul Burton <paul.burton@imgtec.com> - 2015-09-22 21:20 +0200
      Re: [PATCH 0/3] MIPS GIC fixes Thomas Gleixner <tglx@linutronix.de> - 2015-09-22 21:40 +0200

csiph-web