[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <159082479441.17951.16412804370544282566.tip-bot2@tip-bot2>
Date: Sat, 30 May 2020 07:46:34 -0000
From: "tip-bot2 for Anup Patel" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Anup Patel <anup.patel@....com>, Marc Zyngier <maz@...nel.org>,
Palmer Dabbelt <palmerdabbelt@...gle.com>,
stable@...r.kernel.org, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: irq/core] irqchip/sifive-plic: Set default irq affinity in
plic_irqdomain_map()
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 2458ed31e9b9ab40d78a452ab2650a0857556e85
Gitweb: https://git.kernel.org/tip/2458ed31e9b9ab40d78a452ab2650a0857556e85
Author: Anup Patel <anup.patel@....com>
AuthorDate: Mon, 18 May 2020 14:44:39 +05:30
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Mon, 25 May 2020 10:36:09 +01:00
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: f1ad1133b18f ("irqchip/sifive-plic: Add support for multiple PLICs")
Signed-off-by: Anup Patel <anup.patel@....com>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@...gle.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@...gle.com>
Cc: stable@...r.kernel.org
Link: https://lore.kernel.org/r/20200518091441.94843-2-anup.patel@wdc.com
---
drivers/irqchip/irq-sifive-plic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index 822e074..9f7f8ce 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -176,9 +176,12 @@ static struct irq_chip plic_chip = {
static int plic_irqdomain_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t hwirq)
{
+ struct plic_priv *priv = d->host_data;
+
irq_domain_set_info(d, irq, hwirq, &plic_chip, d->host_data,
handle_fasteoi_irq, NULL, NULL);
irq_set_noprobe(irq);
+ irq_set_affinity(irq, &priv->lmask);
return 0;
}
Powered by blists - more mailing lists