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 8C9ACC433F5 for ; Tue, 30 Nov 2021 09:37:36 +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=BDWbePE55PE1zaYLfVbGZMlYcJFHA/5Jc3OpreMns5I=; b=vfAEpRMhnp276K VQX0Nlsatg0rFkrK1Cq6Ifd2yKhp/OQw67aZhqxSN02EHlJaLNxsgj7JiE8Jro1zSUh7p4xOO4n7u dj3q/jE2pKwfHgvrg5uwqpp3ss2RWQhIGLXTwRVqEE+TL1y7Dv5py1V3v8cOTLbYGUhO7hxF6E+ty UwExPvNOAG7W3V2AKcuQYjw6jA8gKG2bWiuAR98sEilPY8FUe9/ML1X4akjawa9xxCtCPjRUJSdZM 89iIYxh5KCnb3isijTpmytZMKaW0EgiNKD+2x3U+fpFjipJDeFkgFJzA3p67iIFe5wZF7q7ZXlQQU 2v/JfdX84SEM/8oQQw9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrzYl-004MYF-09; Tue, 30 Nov 2021 09:36:23 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrzYh-004MWp-4Q for linux-arm-kernel@lists.infradead.org; Tue, 30 Nov 2021 09:36:20 +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 sin.source.kernel.org (Postfix) with ESMTPS id 84BE0CE16B4; Tue, 30 Nov 2021 09:36:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B953BC53FC1; Tue, 30 Nov 2021 09:36:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638264975; bh=W1GU/Y+dYM9mor9VhMfyacGdkrH60iHzxrMl5d0x7r8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I0r5AYfW3e1qmmKXMhnPGFNda+jCz4x32KqmgoGbi/4llhlf6BrLG4Dh11TrqOIeu 6t7GoYuyjI9rTSprKBeCATI3H8ZBljyKTSGOSCnipoGRBXubK/230YXB3/xb4gFMhK cetZdMeS2NJYt7HNccWctY4u4f1mgnZpNgCtZJRGxDgqEEEw7kR57CR0PfP0Ionr1G xPTqMjy/MGJ4yEDXMUL6xcvp5DKu/6CmLLEBvKhEmLc8LWxQafHEWBJGhbDleY8T/g YOwIzg7OkJlOKz2t3lQsamPaqomT2NSf9Bp1mKf8Gg28o2SHvwcvRn0rzb0pd0NzYi nyH+dmToW47RQ== Date: Tue, 30 Nov 2021 09:36:07 +0000 From: Will Deacon To: Robin Murphy Cc: Thomas Gleixner , Nishanth Menon , Mark Rutland , Stuart Yoder , linux-pci@vger.kernel.org, Ashok Raj , Marc Zygnier , x86@kernel.org, Sinan Kaya , iommu@lists.linux-foundation.org, Bjorn Helgaas , Megha Dey , Jason Gunthorpe , Kevin Tian , Alex Williamson , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Tero Kristo , Greg Kroah-Hartman , LKML , Vinod Koul , dmaengine@vger.kernel.org Subject: Re: [patch 33/37] iommu/arm-smmu-v3: Use msi_get_virq() Message-ID: <20211130093607.GA23941@willie-the-truck> References: <20211126224100.303046749@linutronix.de> <20211126230525.885757679@linutronix.de> <20211129105506.GA22761@willie-the-truck> <76a1b5c1-01c8-bb30-6105-b4073dc23065@arm.com> <87czmjdnw9.ffs@tglx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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-20211130_013619_547783_0EA1E70D X-CRM114-Status: GOOD ( 25.19 ) 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 On Mon, Nov 29, 2021 at 02:54:18PM +0000, Robin Murphy wrote: > On 2021-11-29 14:42, Thomas Gleixner wrote: > > On Mon, Nov 29 2021 at 13:13, Robin Murphy wrote: > > > On 2021-11-29 10:55, Will Deacon wrote: > > > > > - } > > > > > + 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? > > > > > > I was just looking at that too, but reached the conclusion that it's > > > probably OK, since consumption of this value later is gated on > > > ARM_SMMU_FEAT_PRI, so the fact that it changes from 0 to an error value > > > in the absence of PRI should make no practical difference. > > > > It's actually 0 when the vector cannot be found. > > Oh, -1 for my reading comprehension but +1 for my confidence in the patch > then :) > > I'll let Will have the final say over how cautious we really want to be > here, but as far as I'm concerned it's a welcome cleanup as-is. Ditto for > patch #32 based on the same reasoning, although I don't have a suitable test > platform on-hand to sanity-check that one. If, as it appears, msi_get_virq() isn't going to fail meaningfully after we've successfully called platform_msi_domain_alloc_irqs() then it sounds like the patch is fine. Just wanted to check though, as Spring cleaning at the end of November raised an eyebrow over here :) Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel