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


Groups > linux.kernel > #1277308

[PATCH v2 15/19] irqchip/mips-gic: Clear percpu_masks correctly when mapping

From Qais Yousef <qais.yousef@imgtec.com>
Newsgroups linux.kernel
Subject [PATCH v2 15/19] irqchip/mips-gic: Clear percpu_masks correctly when mapping
Date 2015-11-25 13:20 +0100
Message-ID <qyHdf-6aD-1@gated-at.bofh.it> (permalink)
References <qyH3z-67h-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


When setting the mapping for a hwirq, make sure we clear percpu_masks for
all other cpus in case it was set previously.

Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
---
 drivers/irqchip/irq-mips-gic.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 00d197c24e16..723135dcacb3 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -760,6 +760,7 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq,
 {
 	int intr = GIC_HWIRQ_TO_SHARED(hw);
 	unsigned long flags;
+	int i;
 
 	irq_set_chip_and_handler(virq, &gic_level_irq_controller,
 				 handle_level_irq);
@@ -767,6 +768,8 @@ 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);
+	for (i = 0; i < gic_vpes; i++)
+		clear_bit(intr, pcpu_masks[i].pcpu_mask);
 	set_bit(intr, pcpu_masks[vpe].pcpu_mask);
 	spin_unlock_irqrestore(&gic_lock, flags);
 
-- 
2.1.0

--
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 v2 00/19] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
  [PATCH v2 04/19] genirq: Add new struct ipi_mask and helper functions Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
    Re: [PATCH v2 04/19] genirq: Add new struct ipi_mask and helper  functions Thomas Gleixner <tglx@linutronix.de> - 2015-11-30 12:30 +0100
      Re: [PATCH v2 04/19] genirq: Add new struct ipi_mask and helper  functions Qais Yousef <qais.yousef@imgtec.com> - 2015-11-30 12:50 +0100
        Re: [PATCH v2 04/19] genirq: Add new struct ipi_mask and helper  functions Thomas Gleixner <tglx@linutronix.de> - 2015-11-30 14:20 +0100
          Re: [PATCH v2 04/19] genirq: Add new struct ipi_mask and helper  functions Qais Yousef <qais.yousef@imgtec.com> - 2015-11-30 15:00 +0100
  [PATCH v2 16/19] MIPS: Add generic SMP IPI support Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
  [PATCH v2 01/19] genirq: Add new IRQ_DOMAIN_FLAGS_IPI Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
  [PATCH v2 03/19] genirq: Add GENERIC_IRQ_IPI Kconfig symbol Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
  [PATCH v2 19/19] irqchip/mips-gic: Add new DT property to reserve IPIs Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
    Re: [PATCH v2 19/19] irqchip/mips-gic: Add new DT property to  reserve IPIs Rob Herring <robh@kernel.org> - 2015-11-25 17:10 +0100
  [PATCH v2 14/19] irqchip/mips-gic: Use gic_vpes instead of NR_CPUS Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
  [PATCH v2 09/19] genirq: Add a new function to get IPI reverse mapping Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
    Re: [PATCH v2 09/19] genirq: Add a new function to get IPI reverse  mapping Qais Yousef <qais.yousef@imgtec.com> - 2015-11-27 12:50 +0100
      Re: [PATCH v2 09/19] genirq: Add a new function to get IPI reverse  mapping Thomas Gleixner <tglx@linutronix.de> - 2015-11-30 11:50 +0100
        Re: [PATCH v2 09/19] genirq: Add a new function to get IPI reverse  mapping Qais Yousef <qais.yousef@imgtec.com> - 2015-11-30 12:00 +0100
          Re: [PATCH v2 09/19] genirq: Add a new function to get IPI reverse  mapping Thomas Gleixner <tglx@linutronix.de> - 2015-11-30 12:30 +0100
            Re: [PATCH v2 09/19] genirq: Add a new function to get IPI reverse  mapping Qais Yousef <qais.yousef@imgtec.com> - 2015-11-30 13:00 +0100
  [PATCH v2 02/19] genirq: Add DOMAIN_BUS_IPI Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
  [PATCH v2 11/19] genirq: Implement ipi_send_{mask, single}() Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:10 +0100
  [PATCH v2 15/19] irqchip/mips-gic: Clear percpu_masks correctly when mapping Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 17/19] MIPS: Make smp CMP, CPS and MT use the new generic IPI functions Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 12/19] irqchip/mips-gic: Add a IPI hierarchy domain Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 08/19] genirq: Add a new generic IPI reservation code to irq core Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 07/19] genirq: Make irq_domain_alloc_descs() non static Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 10/19] genirq: Add a new irq_send_ipi() to irq_chip Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 06/19] genirq: Add struct ipi_mapping and its helper functions Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 05/19] genirq: Add struct ipi_mask to irq_data Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100
  [PATCH v2 13/19] irqchip/mips-gic: Add device hierarchy domain Qais Yousef <qais.yousef@imgtec.com> - 2015-11-25 13:20 +0100

csiph-web