Skip to content

Commit 2458ed3

Browse files
avpatelMarc Zyngier
authored andcommitted
irqchip/sifive-plic: Set default irq affinity in plic_irqdomain_map()
For multiple PLIC instances, each PLIC can only target a subset of CPUs which is represented by "lmask" in the "struct plic_priv". Currently, the default irq affinity for each PLIC interrupt is all online CPUs which is illegal value for default irq affinity when we have multiple PLIC instances. To fix this, we now set "lmask" as the default irq affinity in for each interrupt in plic_irqdomain_map(). Fixes: f1ad113 ("irqchip/sifive-plic: Add support for multiple PLICs") Signed-off-by: Anup Patel <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Palmer Dabbelt <[email protected]> Acked-by: Palmer Dabbelt <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent cc86432 commit 2458ed3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/irqchip/irq-sifive-plic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,12 @@ static struct irq_chip plic_chip = {
176176
static int plic_irqdomain_map(struct irq_domain *d, unsigned int irq,
177177
irq_hw_number_t hwirq)
178178
{
179+
struct plic_priv *priv = d->host_data;
180+
179181
irq_domain_set_info(d, irq, hwirq, &plic_chip, d->host_data,
180182
handle_fasteoi_irq, NULL, NULL);
181183
irq_set_noprobe(irq);
184+
irq_set_affinity(irq, &priv->lmask);
182185
return 0;
183186
}
184187

0 commit comments

Comments
 (0)