Skip to content

Commit e260cfe

Browse files
chenhuacaiMarc Zyngier
authored andcommitted
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
1 parent b0a4ab7 commit e260cfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/irqchip/irq-loongson-eiointc.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,15 @@ static int eiointc_set_irq_affinity(struct irq_data *d, const struct cpumask *af
111111
regaddr = EIOINTC_REG_ENABLE + ((vector >> 5) << 2);
112112

113113
/* Mask target vector */
114-
csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)), 0x0, 0);
114+
csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)),
115+
0x0, priv->node * CORES_PER_EIO_NODE);
116+
115117
/* Set route for target vector */
116118
eiointc_set_irq_route(vector, cpu, priv->node, &priv->node_map);
119+
117120
/* Unmask target vector */
118-
csr_any_send(regaddr, EIOINTC_ALL_ENABLE, 0x0, 0);
121+
csr_any_send(regaddr, EIOINTC_ALL_ENABLE,
122+
0x0, priv->node * CORES_PER_EIO_NODE);
119123

120124
irq_data_update_effective_affinity(d, cpumask_of(cpu));
121125

0 commit comments

Comments
 (0)