diff options
author | Huacai Chen <chenhuacai@loongson.cn> | 2022-08-04 04:54:21 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-08-04 11:04:03 +0200 |
commit | e260cfe6fb503292f183a43b51177664b222435d (patch) | |
tree | 9b8ea2332f086b227ca5223590138f7e27f54697 /drivers | |
parent | iommu/hyper-v: Use helper instead of directly accessing affinity (diff) | |
download | linux-e260cfe6fb503292f183a43b51177664b222435d.tar.xz linux-e260cfe6fb503292f183a43b51177664b222435d.zip |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/irqchip/irq-loongson-eiointc.c | 8 |
1 files 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)); |