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 2CAF2C433F5 for ; Thu, 28 Apr 2022 11:14:51 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t2Ru1kYitbDEhZPfPTUVx34sOSXPg5pxTod2W6ZGCDc=; b=P6VF2/0IeKLAWC 2dPlB0d2HanNszWy7KpHkdTo1cQMBUafIx52ZPKbBEm4gYcXe2m+oisZLBmMMpGU5HhB/COnuzHgz 08fxNbV1Fp8DlT5jO/REKGg+B1GuIDVFAcusUwh6u7GPf6tnXeGEkWKwuN+fsuShKnwdM9tERgi+8 2B6afn5ywKLHiTnFsTExohTCWMgRsN+8pI7C8Lxp1o8semgRbZNJZ7LwRChYRQVH7F+u0iR+RrKhZ Gu6eV8jnZ1B30NN8lGPfdshc1+3mtzMgnXhjhyJatOhGiWfl8rylcXprl04CxOJX2tpOaPL2vg4Sz HBGu8WJvG560oOPQwECg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk25p-006SSH-Hi; Thu, 28 Apr 2022 11:13:53 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk24o-006RvE-DH; Thu, 28 Apr 2022 11:12:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1EB2B1474; Thu, 28 Apr 2022 04:12:49 -0700 (PDT) Received: from [10.57.80.98] (unknown [10.57.80.98]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8DF4F3F774; Thu, 28 Apr 2022 04:12:45 -0700 (PDT) Message-ID: <7b09e989-0aa1-a557-485e-572f69caf881@arm.com> Date: Thu, 28 Apr 2022 12:12:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 5/5] iommu/sun50i: Ensure the IOMMU can be used for DMA Content-Language: en-GB To: Samuel Holland , Joerg Roedel , Will Deacon , iommu@lists.linux-foundation.org Cc: devicetree@vger.kernel.org, Heiko Stuebner , linux-kernel@vger.kernel.org, Jernej Skrabec , Chen-Yu Tsai , Rob Herring , Palmer Dabbelt , Maxime Ripard , Krzysztof Kozlowski , Philipp Zabel , linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org References: <20220428010401.11323-1-samuel@sholland.org> <20220428010401.11323-6-samuel@sholland.org> From: Robin Murphy In-Reply-To: <20220428010401.11323-6-samuel@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_041250_632893_2CBB232A X-CRM114-Status: GOOD ( 16.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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-04-28 02:04, Samuel Holland wrote: > So far, the driver has relied on arch/arm64/Kconfig to select IOMMU_DMA. > Unsurprisingly, this does not work on RISC-V, so the driver must select > IOMMU_DMA itself. No, IOMMU_DMA should only be selected by the architecture code that's also responsible for calling iommu_setup_dma_ops(). Without that, this select will do nothing other than add some unused code to the kernel image. I appreciate that the current state of the x86 IOMMU drivers being tightly-coupled to the x86 arch code might be confusing (which reminds me I'd totally forgotten about [1]). I'm about to start reworking the whole area anyway, but for now please just follow the existing intent. Thanks, Robin. [1] https://lore.kernel.org/linux-iommu/9ba6f2e8568a3ff6a94fade66668d99705433c44.1631536879.git.robin.murphy@arm.com/ > Signed-off-by: Samuel Holland > --- > > drivers/iommu/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > index c79a0df090c0..70a0bfa6d907 100644 > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -223,6 +223,7 @@ config SUN50I_IOMMU > depends on ARCH_SUNXI || COMPILE_TEST > select ARM_DMA_USE_IOMMU > select IOMMU_API > + select IOMMU_DMA > help > Support for the IOMMU introduced in the Allwinner H6 SoCs. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel