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 32C9EC433F5 for ; Mon, 29 Nov 2021 10:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u9nHezKP75p1hM5KzLF+tb3hYbIwj8K+CZoaibqMvv8=; b=lEDbj6I0FxvJOa vsvTeGebVgiDWG4Ujc2lHkDuMmot/CrYU7mf3FH1LNd+iQqkxaVic050Z5kzWjBcw8JSsYXaQY/GX pjDLn1XKyjueMkfeRs++ScPgR8u/6s540WSSw95SzM6uWjpzMV1O7UdCbZ0FnHOIrjh0dElHEjWk5 +ndcSw7/UAmg/CJB7hPXLDjg7ItOwM4YfnbzC8DDqZF7dAYZfiqjqDsQxvoyIVOktAbUjBHE6rfKZ crBe2KuBFLFUngbffbFv5WaJnpMEefVOTXmeIzB/deVqNP9Bcizg7hAnd4r91uu/WihK6Tk95locM rZ9/nKXfD89u0MzmCR6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mreJd-000TCD-Fu; Mon, 29 Nov 2021 10:55:21 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mreJa-000TBC-46 for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 10:55:19 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EAAFF612D9; Mon, 29 Nov 2021 10:55:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A396C53FAD; Mon, 29 Nov 2021 10:55:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638183315; bh=QhZNG7zEJdkQvS0LEX52li9AXzufJrQFobG0M6duX3k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=In+AkzkxuwyvtyrVSnDdHfnln0ej7MVCOlSJ0dRt2ZWpilriGh6TuxtTbIvPZpGRc 3raF7kENSA7Iqg9d3lIFa1Tycva8OdSns9kjZGzFU/i0aJcBpVAWsw03om+s4qnUOM fw8I9XrPtQ3Rho8qt5voFvB4S6aarTonmWrXmIFAJNjWosRUJn049/OYsViwr62iQF gEyUDXXP/57E3hImuxQespEfMMrhMyK1bU1TI2fcChiOBzoxZ2prSilIA/X8hL/HV2 gt/PtTjrEAm0TvcLCwOpO2++IoNJLFndUJeT7h1TLYmVmW3HVey3dfUX8+sE/bT/k6 GGQZi90ZDL7Yg== Date: Mon, 29 Nov 2021 10:55:07 +0000 From: Will Deacon To: Thomas Gleixner Cc: LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Greg Kroah-Hartman , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, x86@kernel.org, Vinod Koul , Mark Rutland , Sinan Kaya Subject: Re: [patch 33/37] iommu/arm-smmu-v3: Use msi_get_virq() Message-ID: <20211129105506.GA22761@willie-the-truck> References: <20211126224100.303046749@linutronix.de> <20211126230525.885757679@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211126230525.885757679@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_025518_232572_1F5BA9B0 X-CRM114-Status: GOOD ( 17.94 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Thomas, On Sat, Nov 27, 2021 at 02:20:59AM +0100, Thomas Gleixner wrote: > Let the core code fiddle with the MSI descriptor retrieval. > > Signed-off-by: Thomas Gleixner > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 19 +++---------------- > 1 file changed, 3 insertions(+), 16 deletions(-) > > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > @@ -3154,7 +3154,6 @@ static void arm_smmu_write_msi_msg(struc > > static void arm_smmu_setup_msis(struct arm_smmu_device *smmu) > { > - struct msi_desc *desc; > int ret, nvec = ARM_SMMU_MAX_MSIS; > struct device *dev = smmu->dev; > > @@ -3182,21 +3181,9 @@ static void arm_smmu_setup_msis(struct a > return; > } > > - for_each_msi_entry(desc, dev) { > - switch (desc->msi_index) { > - case EVTQ_MSI_INDEX: > - smmu->evtq.q.irq = desc->irq; > - break; > - case GERROR_MSI_INDEX: > - smmu->gerr_irq = desc->irq; > - break; > - case PRIQ_MSI_INDEX: > - smmu->priq.q.irq = desc->irq; > - break; > - default: /* Unknown */ > - continue; > - } > - } > + smmu->evtq.q.irq = msi_get_virq(dev, EVTQ_MSI_INDEX); > + smmu->gerr_irq = msi_get_virq(dev, GERROR_MSI_INDEX); > + smmu->priq.q.irq = msi_get_virq(dev, PRIQ_MSI_INDEX); Prviously, if retrieval of the MSI failed then we'd fall back to wired interrupts. Now, I think we'll clobber the interrupt with 0 instead. Can we make the assignments to smmu->*irq here conditional on the MSI being valid, please? Cheers, Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel