[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1444731382-19313-14-git-send-email-qais.yousef@imgtec.com>
Date: Tue, 13 Oct 2015 11:16:21 +0100
From: Qais Yousef <qais.yousef@...tec.com>
To: <linux-kernel@...r.kernel.org>
CC: <tglx@...utronix.de>, <jason@...edaemon.net>,
<marc.zyngier@....com>, <jiang.liu@...ux.intel.com>,
<ralf@...ux-mips.org>, <linux-mips@...ux-mips.org>,
Qais Yousef <qais.yousef@...tec.com>
Subject: [RFC v2 PATCH 13/14] irqchip: mips-gic: implement the new irq_send_ipi
Now irqchip has a irq_send_ipi() function, implement gic_send_ipi()
to make use of it
Signed-off-by: Qais Yousef <qais.yousef@...tec.com>
---
drivers/irqchip/irq-mips-gic.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 9c8ece1d90f2..764470375cd0 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -266,9 +266,24 @@ static void gic_bind_eic_interrupt(int irq, int set)
GIC_VPE_EIC_SS(irq), set);
}
-void gic_send_ipi(unsigned int intr)
+static void gic_send_ipi(struct irq_data *d, const struct ipi_mask *cpumask)
{
- gic_write(GIC_REG(SHARED, GIC_SH_WEDGE), GIC_SH_WEDGE_SET(intr));
+ struct ipi_mapping *map = irq_data_get_irq_chip_data(d);
+ irq_hw_number_t intr;
+ int vpe;
+
+ if (!map)
+ return;
+
+ vpe = find_first_bit(cpumask->cpumask, cpumask->nbits);
+ while (vpe != cpumask->nbits) {
+ intr = map->cpumap[vpe];
+ if (intr == INVALID_HWIRQ)
+ continue;
+ gic_write(GIC_REG(SHARED, GIC_SH_WEDGE), GIC_SH_WEDGE_SET(intr));
+
+ vpe = find_next_bit(cpumask->cpumask, cpumask->nbits, vpe + 1);
+ }
}
int gic_get_c0_compare_int(void)
@@ -476,6 +491,7 @@ static struct irq_chip gic_edge_irq_controller = {
#ifdef CONFIG_SMP
.irq_set_affinity = gic_set_affinity,
#endif
+ .irq_send_ipi = gic_send_ipi,
};
static void gic_handle_local_int(bool chained)
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists