* [PATCH] irqchip/loongson-eiointc: Fix irq affinity setting
@ 2022-08-04 2:54 Huacai Chen
2022-08-04 13:26 ` [irqchip: irq/irqchip-fixes] " irqchip-bot for Huacai Chen
0 siblings, 1 reply; 2+ messages in thread
From: Huacai Chen @ 2022-08-04 2:54 UTC (permalink / raw)
To: Thomas Gleixner, Marc Zyngier
Cc: loongarch, linux-kernel, Xuefeng Li, Huacai Chen, Jiaxun Yang,
Huacai Chen
In multi-node case, csr_any_send() should set EIOINTC_REG_ENABLE of
the first core of target node, not the first core of the whole.
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
drivers/irqchip/irq-loongson-eiointc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 80d8ca6f2d46..317467857478 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -111,11 +111,15 @@ static int eiointc_set_irq_affinity(struct irq_data *d, const struct cpumask *af
regaddr = EIOINTC_REG_ENABLE + ((vector >> 5) << 2);
/* Mask target vector */
- csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)), 0x0, 0);
+ csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)),
+ 0x0, priv->node * CORES_PER_EIO_NODE);
+
/* Set route for target vector */
eiointc_set_irq_route(vector, cpu, priv->node, &priv->node_map);
+
/* Unmask target vector */
- csr_any_send(regaddr, EIOINTC_ALL_ENABLE, 0x0, 0);
+ csr_any_send(regaddr, EIOINTC_ALL_ENABLE,
+ 0x0, priv->node * CORES_PER_EIO_NODE);
irq_data_update_effective_affinity(d, cpumask_of(cpu));
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [irqchip: irq/irqchip-fixes] irqchip/loongson-eiointc: Fix irq affinity setting
2022-08-04 2:54 [PATCH] irqchip/loongson-eiointc: Fix irq affinity setting Huacai Chen
@ 2022-08-04 13:26 ` irqchip-bot for Huacai Chen
0 siblings, 0 replies; 2+ messages in thread
From: irqchip-bot for Huacai Chen @ 2022-08-04 13:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Huacai Chen, Marc Zyngier, tglx
The following commit has been merged into the irq/irqchip-fixes branch of irqchip:
Commit-ID: e260cfe6fb503292f183a43b51177664b222435d
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/e260cfe6fb503292f183a43b51177664b222435d
Author: Huacai Chen <chenhuacai@loongson.cn>
AuthorDate: Thu, 04 Aug 2022 10:54:21 +08:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 04 Aug 2022 10:04:03 +01:00
irqchip/loongson-eiointc: Fix irq affinity setting
In multi-node case, csr_any_send() should set EIOINTC_REG_ENABLE of
the first core of target node, not the first core of the whole.
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220804025421.211958-1-chenhuacai@loongson.cn
---
drivers/irqchip/irq-loongson-eiointc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 80d8ca6..3174678 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -111,11 +111,15 @@ static int eiointc_set_irq_affinity(struct irq_data *d, const struct cpumask *af
regaddr = EIOINTC_REG_ENABLE + ((vector >> 5) << 2);
/* Mask target vector */
- csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)), 0x0, 0);
+ csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)),
+ 0x0, priv->node * CORES_PER_EIO_NODE);
+
/* Set route for target vector */
eiointc_set_irq_route(vector, cpu, priv->node, &priv->node_map);
+
/* Unmask target vector */
- csr_any_send(regaddr, EIOINTC_ALL_ENABLE, 0x0, 0);
+ csr_any_send(regaddr, EIOINTC_ALL_ENABLE,
+ 0x0, priv->node * CORES_PER_EIO_NODE);
irq_data_update_effective_affinity(d, cpumask_of(cpu));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-04 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 2:54 [PATCH] irqchip/loongson-eiointc: Fix irq affinity setting Huacai Chen
2022-08-04 13:26 ` [irqchip: irq/irqchip-fixes] " irqchip-bot for Huacai Chen
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®