Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1504170ybb; Thu, 9 Apr 2020 03:32:11 -0700 (PDT) X-Google-Smtp-Source: APiQypL2WsEvbgB1kMQoQbgsb0+IAkxKiLrp3IKYPaunmxErwFax6+XEv7wirEMyyXt76MQeNBS7 X-Received: by 2002:aca:f02:: with SMTP id 2mr5587043oip.4.1586428331391; Thu, 09 Apr 2020 03:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586428331; cv=none; d=google.com; s=arc-20160816; b=k50IK0pKffpf7yxjCy1GbB5Z3PJugcCwu6X0MWEsqkvQflO0QkTO0HMtKulgFeo6JN 1ZtapqpI8QSykRKvsB6TF7mnlr5qn11MWEzI5Cc+77vOeSSpP6AKGj+YngM5j/lJK/Rk 1E+71jvgQH4U5l1QMl+dE/g9LS3JS5e/MYJ2Ti1OmLewv+zvCBCCzUuPnMRKtiuHURqA jgytcaoegoToqawAB+j3844U4YW/BLgu6BmUE3V1yv7QFJukifowWIAwE5btizT9rtdD BDfVQCHWvqQ2CQcZlzVL+ixv6mH24swTki6kX1zMXAlqgjCqADdU+gfKchazZYTxJRKD NO/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=RHRcHJqtZGvkUJP7gmwHsr4VlSLBsrBUwb6gO3bg1U4=; b=tLSNqUvct1kOOF8WZwpgUEJnrpYNuWR9njaN6BbHs7AvQQVXstQ88uOy0ZALDHjz8V aWw9UogE77agcyqTZcjJPg7niJprEeUVAO8zYys39RzckTbRiES3MerwcLmJ82VwlWKv rvzwlo2/Zv09+iPkLscZkpMC51yDJ+//m+lAR5Uu2SVw0O4QU3ZTpVl03bhfQe/xgIhy bjDqiJhOzJIfT5dkTa2hSN1ZLCWUdCas770ecvC9LZwFFCU5xEyjqH+4JO+doFOKR37K xSSfxkIYeK2nkNNkKr51u3oyKo35VAmd1zxYx4u+zEHdHjFcrO5z6H8L9nFbr/sbsovg GYeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d27si3627263ote.88.2020.04.09.03.31.56; Thu, 09 Apr 2020 03:32:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbgDIKao (ORCPT + 99 others); Thu, 9 Apr 2020 06:30:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:12705 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725783AbgDIKao (ORCPT ); Thu, 9 Apr 2020 06:30:44 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0DB98905BA12401A2919; Thu, 9 Apr 2020 18:30:41 +0800 (CST) Received: from [127.0.0.1] (10.173.222.27) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Thu, 9 Apr 2020 18:30:34 +0800 Subject: Re: [PATCH] irqchip/mbigen: Free msi_desc on device teardown To: Marc Zyngier CC: , , , , References: <20200408114352.1604-1-yuzenghui@huawei.com> <20200409102718.73875cd9@why> From: Zenghui Yu Message-ID: Date: Thu, 9 Apr 2020 18:30:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20200409102718.73875cd9@why> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.222.27] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 2020/4/9 17:27, Marc Zyngier wrote: > On Wed, 8 Apr 2020 19:43:52 +0800 > Zenghui Yu 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 >> --- >> 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") Yes, please help to add it. > > Otherwise queued for post -rc1. Thanks! Zenghui