From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07C33C3064D for ; Tue, 25 Jun 2024 14:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=l+3IK1BKwSVCNHB2ie/Flxfk+KGt2TTpoej2X/HKMw4=; b=qfHf4WTd/ZuEzQFZiOoNE7ajY6 GggZIBNUgGrKx1/Pf5Uv6QuQ2cef6swxA9tl3iBFhha8OTbPWdwn2q+SQggmpHNNvS3jNp8hQH175 SqIb1T9QNlwqWDvwM8J5TirAp5iVo8U0JWT2Yl17VchwOW0UwgNaSRJsI/YrVdWKRiXkuN0kQIjea jYli1PmokoFW4WfxF5qQ2captzfykwfluRm2sl1DophOdScSXJUz5N4laLYvRSFHoRa3oU3zC5ZrW E/tb9FRS33JE2QWOB9E9D79cGmAPoibCeiarB9tDhPEXvXV0q/l55G5uwvolmIXXTKcHK4pydW6ZC NQmubE7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sM7NU-00000003EMx-0vlP; Tue, 25 Jun 2024 14:42:36 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sM7NO-00000003EK2-2xR3 for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2024 14:42:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id F3BB9CE1B6B; Tue, 25 Jun 2024 14:42:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE622C32781; Tue, 25 Jun 2024 14:42:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719326547; bh=oFhoRb8dHMqtN4BhADZtElPNMzCP/jvSv6/NFTI8rNc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ioz9bs71qsaqECa12AgJiUinorz/UT/ACN8div31KGmR3f66EL5OeA4OataeJmcE9 Rlw28Isv9Uu7TYneAfGaFIIOwGMlX5nFVF7jNhVMxCjHSzYBsWzG65/ZQJdHDFCwvP dxSoZBi3FM4FQNVOejphBz894XtTw5lvXmvN55q5AsSc4Sl4vxHN5adwwQPrvZXo3I 7Q+sPsxdNjgOPovuE0z5f5nNc4yoQfmkH3eFtP63eHoVZoXh2I8R03OoYV87G4UZE5 gvzeQcTt0XdJGmGOz2JFCamVjwcgOniky7gUrgVe1k5RvHGB8/ad4jJLKs1XYndPYX jK2KqckLIrvHw== Date: Tue, 25 Jun 2024 16:42:12 +0200 From: Lorenzo Pieralisi To: Thomas Gleixner , guohanjun@huawei.com Cc: LKML , linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, maz@kernel.org, anna-maria@linutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, bhelgaas@google.com, rdunlap@infradead.org, vidyas@nvidia.com, ilpo.jarvinen@linux.intel.com, apatel@ventanamicro.com, kevin.tian@intel.com, nipun.gupta@amd.com, den@valinux.co.jp, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, gregkh@linuxfoundation.org, rafael@kernel.org, alex.williamson@redhat.com, will@kernel.org, lorenzo.pieralisi@arm.com, jgg@mellanox.com, ammarfaizi2@gnuweeb.org, robin.murphy@arm.com, nm@ti.com, kristo@kernel.org, vkoul@kernel.org, okaya@kernel.org, agross@kernel.org, andersson@kernel.org, mark.rutland@arm.com, shameerali.kolothum.thodi@huawei.com, yuzenghui@huawei.com, shivamurthy.shastri@linutronix.de Subject: Re: [patch V4 10/21] irqchip/mbigen: Remove platform_msi_create_device_domain() fallback Message-ID: References: <20240623142137.448898081@linutronix.de> <20240623142235.333333826@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240623142235.333333826@linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240625_074231_132822_7D7A414E X-CRM114-Status: GOOD ( 23.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jun 23, 2024 at 05:18:48PM +0200, Thomas Gleixner wrote: [+Hanjun] Hanjun, are you able to test this series (or find someone who can) and in particular mbigen changes on affected HW and report back here please ? Thanks, Lorenzo > From: Thomas Gleixner > > Now that ITS provides the MSI parent domain, remove the unused fallback > code. > > Signed-off-by: Thomas Gleixner > Signed-off-by: Anna-Maria Behnsen > Signed-off-by: Shivamurthy Shastri > Signed-off-by: Thomas Gleixner > > > --- > drivers/irqchip/irq-mbigen.c | 74 ++---------------------------------- > 1 file changed, 4 insertions(+), 70 deletions(-) > > diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c > index db0fa80330d9..093fd42893a7 100644 > --- a/drivers/irqchip/irq-mbigen.c > +++ b/drivers/irqchip/irq-mbigen.c > @@ -180,64 +180,6 @@ static int mbigen_domain_translate(struct irq_domain *d, struct irq_fwspec *fwsp > return -EINVAL; > } > > -/* The following section will go away once ITS provides a MSI parent */ > - > -static struct irq_chip mbigen_irq_chip = { > - .name = "mbigen-v2", > - .irq_mask = irq_chip_mask_parent, > - .irq_unmask = irq_chip_unmask_parent, > - .irq_eoi = mbigen_eoi_irq, > - .irq_set_type = mbigen_set_type, > - .irq_set_affinity = irq_chip_set_affinity_parent, > -}; > - > -static int mbigen_irq_domain_alloc(struct irq_domain *domain, > - unsigned int virq, > - unsigned int nr_irqs, > - void *args) > -{ > - struct irq_fwspec *fwspec = args; > - irq_hw_number_t hwirq; > - unsigned int type; > - struct mbigen_device *mgn_chip; > - int i, err; > - > - err = mbigen_domain_translate(domain, fwspec, &hwirq, &type); > - if (err) > - return err; > - > - err = platform_msi_device_domain_alloc(domain, virq, nr_irqs); > - if (err) > - return err; > - > - mgn_chip = platform_msi_get_host_data(domain); > - > - for (i = 0; i < nr_irqs; i++) > - irq_domain_set_hwirq_and_chip(domain, virq + i, hwirq + i, > - &mbigen_irq_chip, mgn_chip->base); > - > - return 0; > -} > - > -static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq, > - unsigned int nr_irqs) > -{ > - platform_msi_device_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 = mbigen_irq_domain_free, > -}; > - > -static void mbigen_write_msg(struct msi_desc *desc, struct msi_msg *msg) > -{ > - mbigen_write_msi_msg(irq_get_irq_data(desc->irq), msg); > -} > - > -/* End of to be removed section */ > - > static void mbigen_domain_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc) > { > arg->desc = desc; > @@ -268,20 +210,12 @@ static const struct msi_domain_template mbigen_msi_template = { > static bool mbigen_create_device_domain(struct device *dev, unsigned int size, > struct mbigen_device *mgn_chip) > { > - struct irq_domain *domain = dev->msi.domain; > - > - if (WARN_ON_ONCE(!domain)) > + if (WARN_ON_ONCE(!dev->msi.domain)) > return false; > > - if (irq_domain_is_msi_parent(domain)) { > - return msi_create_device_irq_domain(dev, MSI_DEFAULT_DOMAIN, > - &mbigen_msi_template, size, > - NULL, mgn_chip->base); > - } > - > - /* Remove once ITS provides MSI parent */ > - return !!platform_msi_create_device_domain(dev, size, mbigen_write_msg, > - &mbigen_domain_ops, mgn_chip); > + return msi_create_device_irq_domain(dev, MSI_DEFAULT_DOMAIN, > + &mbigen_msi_template, size, > + NULL, mgn_chip->base); > } > > static int mbigen_of_create_domain(struct platform_device *pdev, > -- > 2.34.1 > >