[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <158711740513.28353.15906333414276185307.tip-bot2@tip-bot2>
Date: Fri, 17 Apr 2020 09:56:45 -0000
From: "tip-bot2 for Zenghui Yu" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Zenghui Yu <yuzenghui@...wei.com>, Marc Zyngier <maz@...nel.org>,
x86 <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [tip: irq/urgent] irqchip/mbigen: Free msi_desc on device teardown
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: edfc23f6f9fdbd7825d50ac1f380243cde19b679
Gitweb: https://git.kernel.org/tip/edfc23f6f9fdbd7825d50ac1f380243cde19b679
Author: Zenghui Yu <yuzenghui@...wei.com>
AuthorDate: Wed, 08 Apr 2020 19:43:52 +08:00
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Fri, 17 Apr 2020 08:59:27 +01:00
irqchip/mbigen: Free msi_desc on device teardown
Using irq_domain_free_irqs_common() on the irqdomain free path will
leave the MSI descriptor unfreed when platform devices get removed.
Properly free it by MSI domain free function.
Fixes: 9650c60ebfec0 ("irqchip/mbigen: Create irq domain for each mbigen device")
Signed-off-by: Zenghui Yu <yuzenghui@...wei.com>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20200408114352.1604-1-yuzenghui@huawei.com
---
drivers/irqchip/irq-mbigen.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 6b566bb..ff7627b 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -220,10 +220,16 @@ static int mbigen_irq_domain_alloc(struct irq_domain *domain,
return 0;
}
+static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq,
+ unsigned int nr_irqs)
+{
+ platform_msi_domain_free(domain, virq, nr_irqs);
+}
+
static const struct irq_domain_ops mbigen_domain_ops = {
.translate = mbigen_domain_translate,
.alloc = mbigen_irq_domain_alloc,
- .free = irq_domain_free_irqs_common,
+ .free = mbigen_irq_domain_free,
};
static int mbigen_of_create_domain(struct platform_device *pdev,
Powered by blists - more mailing lists