[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200409102718.73875cd9@why>
Date: Thu, 9 Apr 2020 10:27:18 +0100
From: Marc Zyngier <maz@...nel.org>
To: Zenghui Yu <yuzenghui@...wei.com>
Cc: <linux-kernel@...r.kernel.org>, <tglx@...utronix.de>,
<jason@...edaemon.net>, <wuyun.wu@...wei.com>,
<wanghaibin.wang@...wei.com>
Subject: Re: [PATCH] irqchip/mbigen: Free msi_desc on device teardown
On Wed, 8 Apr 2020 19:43:52 +0800
Zenghui Yu <yuzenghui@...wei.com> wrote:
Hi Zenghui,
> 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.
>
> Signed-off-by: Zenghui Yu <yuzenghui@...wei.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 6b566bba263b..ff7627b57772 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,
Should this deserve a:
Fixes: 9650c60ebfec0 ("irqchip/mbigen: Create irq domain for each
mbigen device")
Otherwise queued for post -rc1.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists