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 C4C82C531DC for ; Fri, 23 Aug 2024 15:41:50 +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=1qmg/AA4slRcViD2R29WxVHJwXIH8HwU8pxGWSgkLcg=; b=4tK2zB7C2Absx+Wyc4ffeRtPhZ OraQwopndHUM613NHg4kosGuBAxpKrf2SQKgDyuiFXwyG4SD1ntMc6zS3Dz2mBd4gR571N/KvfseV ZfGbSRALv0yUKomH8HSXvxralOh/QhdOrByRJtCMLWzZl4DgGJ2yLN5TpglQDoZDhjMnAA1ijg6wO N6XtZwIQZwAiPb6BjKZ1whCPb2EC35BknxIzqRUjutINFghguLGwXfgUECCYIVb1p9E6wsfHBgxhN PhJLChLJjH96IbuTdV8+7mfUxHxZ0V6TCEVqnZ/00I2EnnR2DoVaaTwlXUGdJwG8aoMzN7+9r10QJ cNIRUU3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shWQ0-0000000HLtn-1feD; Fri, 23 Aug 2024 15:41:40 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shWMq-0000000HKtB-0E8M for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 15:38:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 5E1C3A42785; Fri, 23 Aug 2024 15:38:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBB05C32786; Fri, 23 Aug 2024 15:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724427502; bh=TUhLtJM5z1zGvHrEysAkReld+ihxjVhW/piAzl9hP7U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SC+4p7ONKFvnTuz12BMk94KSdU7cYNnfoqaCeyWHLZY/jHZOpjGk3QGzVeQRnWpco 9Reii7bU69+NfLqcChbcl/I+eIwP/rLGAmZ9X3yyxhxsYrHD9aAqzyCyZPk6+OfXHP eevtpkJI+36DcOrI+tL8Rrq5csc0J6eAW3mOiuWw/WrZSplCsV3e2aut78jDNVxljX gPLphAnlKV3bauia7WyTILHCkyz5JzJXGtYp2ZN4jwwYEzt7HO2g4EsNiEzJQNkEfA wrZHk82+C3pOg4jMPei5fim0Q7HkRu6PruXeRl8vgYe6Q3fqZoOqklAE7oHze3rpzr Vh4JP603X/IRw== Date: Fri, 23 Aug 2024 16:38:17 +0100 From: Will Deacon To: Nicolin Chen Cc: robin.murphy@arm.com, joro@8bytes.org, jgg@nvidia.com, thierry.reding@gmail.com, vdumpa@nvidia.com, jonathanh@nvidia.com, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v11 8/9] iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV Message-ID: <20240823153817.GA525@willie-the-truck> References: <849c17b97ae0a38db1cee949db2488e4045666df.1722993435.git.nicolinc@nvidia.com> <20240816141926.GA24676@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-20240823_083824_179958_1F611D7E X-CRM114-Status: GOOD ( 17.56 ) 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 Fri, Aug 16, 2024 at 10:41:06AM -0700, Nicolin Chen wrote: > On Fri, Aug 16, 2024 at 03:19:26PM +0100, Will Deacon wrote: > > > [...] > > > > > +struct arm_smmu_device * > > > +tegra241_cmdqv_acpi_dsdt_probe(struct arm_smmu_device *smmu, > > > + struct acpi_iort_node *node) > > > +{ > > > + struct resource *res; > > > + int irq; > > > + > > > + /* Keep the pointer smmu intact if !res */ > > > + res = tegra241_cmdqv_find_acpi_resource(smmu, node, &irq); > > > + if (!res) > > > + return smmu; > > > > Given that this probing code will end up running on non-tegra hardware > > when CONFIG_TEGRA241_CMDQV is enabled, please can you move the common > > part into the main driver? > > You mean moving the tegra241_cmdqv_acpi_dsdt_probe() into the main > driver? I think this v11 puts a function call int he header already. Right. I basically want it so that !tegra folks don't have to open the tegra-specific file to look at the code running on their SoC. We should also running that code at all on implementations which _do_ advertise a distinct model number in IORT. Will