[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <D08D06C366851D40A251D08BEEAA0F9A04367BD6@dggeml529-mbx.china.huawei.com>
Date: Sat, 16 Mar 2019 11:15:03 +0000
From: chenjianguo <chenjianguo3@...wei.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Liyou (leeyou, RTOS)" <leeyou.li@...wei.com>,
"Joey Yan(Bo)" <joey.yanbo@...wei.com>,
"Xiaowei (C)" <xiaowei774@...wei.com>,
"zhanghan (Q)" <zhanghan23@...wei.com>,
Yangyingliang <yangyingliang@...wei.com>,
yaohongbo <yaohongbo@...wei.com>, Linuxarm <linuxarm@...wei.com>
Subject: [PATCH] mbigen: don't clear eventid when free_irq
From: Jianguo Chen <chenjianguo3@...wei.com>
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@...wei.com>
---
drivers/irqchip/irq-mbigen.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 567b29c..fad7291 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);
--
1.8.5.6
.
Powered by blists - more mailing lists