aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJianguo Chen <chenjianguo3@huawei.com>2019-03-20 18:54:21 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-20 09:17:00 +0200
commit1512c986c5788f34939d0d1e391455ca4a3f8880 (patch)
tree78ade6a290f45aa72935eb01101415aedd6d02e6
parentdc60ac49b0403073505612ea08e07d5b08ae41a8 (diff)
downloadlinux-yocto-1512c986c5788f34939d0d1e391455ca4a3f8880.tar.gz
linux-yocto-1512c986c5788f34939d0d1e391455ca4a3f8880.tar.bz2
linux-yocto-1512c986c5788f34939d0d1e391455ca4a3f8880.zip
irqchip/mbigen: Don't clear eventid when freeing an MSI
[ Upstream commit fca269f201a8d9985c0a31fb60b15d4eb57cef80 ] mbigen_write_msg clears eventid bits of a mbigen register when free a interrupt, because msi_domain_deactivate memset struct msg to zero. Then multiple mbigen pins with zero eventid will report the same interrupt number. The eventid clear call trace: free_irq __free_irq irq_shutdown irq_domain_deactivate_irq __irq_domain_deactivate_irq __irq_domain_deactivate_irq msi_domain_deactivate platform_msi_write_msg mbigen_write_msg Signed-off-by: Jianguo Chen <chenjianguo3@huawei.com> [maz: massaged subject] Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/irqchip/irq-mbigen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 567b29c47608..98b6e1d4b1a6 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -161,6 +161,9 @@ static void mbigen_write_msg(struct msi_desc *desc, struct msi_msg *msg)
void __iomem *base = d->chip_data;
u32 val;
+ if (!msg->address_lo && !msg->address_hi)
+ return;
+
base += get_mbigen_vec_reg(d->hwirq);
val = readl_relaxed(base);