From patchwork Wed Dec 13 17:17:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Murphy X-Patchwork-Id: 13491676 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 250E6C4332F for ; Wed, 13 Dec 2023 17:18:56 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CoGSyvVmPOOV5RJSwORrmotpwLWknyxgI/bRREvIrmc=; b=CMiw5F9MvuMarT rPbP1i+UN2VtRi+r0tvyyfhL3ZZGuYW5sxYEs7zhOQmtjhpPnSctisXP0jkv7ENwWb/Dy5tBIgso1 jKcixYuU6r05CQ2wBhQAL+ZN3QlmKAFY9P6+otqKDt/My+au9RETyBU67o/x17//+hBf3OfszrXvB r7M1Ut88EFFm6/C1G6N9g0sDnqaRlR8nX8BA2Mmwwk6F1+edFx/OmLvyaQd6h21pqdffc/xuO3d2l YvYFhl5PFlL3176p7pY5xHCfCv1KPQczv1LSoIVX1OPzL/1ChaoWmmnmKVUBrBKJHltdNjwRbflpe /GYRyl3xuUFEjcF+9Gig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDSsN-00FZFE-0b; Wed, 13 Dec 2023 17:18:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDSsK-00FZEU-0N for linux-arm-kernel@lists.infradead.org; Wed, 13 Dec 2023 17:18:25 +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 94D6AC15; Wed, 13 Dec 2023 09:19:07 -0800 (PST) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A331C3F762; Wed, 13 Dec 2023 09:18:17 -0800 (PST) From: Robin Murphy To: Joerg Roedel , Christoph Hellwig Cc: Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Paul Walmsley , Palmer Dabbelt , Albert Ou , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Niklas Schnelle , Matthew Rosato , Gerald Schaefer , Jean-Philippe Brucker , Rob Herring , Frank Rowand , Marek Szyprowski , Jason Gunthorpe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org Subject: [PATCH v2 0/7] dma-mapping: Simplify arch_setup_dma_ops() Date: Wed, 13 Dec 2023 17:17:53 +0000 Message-Id: X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_091824_253155_4DFA9057 X-CRM114-Status: GOOD ( 11.59 ) 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 v1: https://lore.kernel.org/linux-iommu/cover.1701268753.git.robin.murphy@arm.com/ Hi all, Here's v2 with a few tweaks and fixes to address review comments, a couple of major issues fixed in the last two patches that I really should have spotted initially, plus a bit more code deletion that I realised could fit in this step. I've left it tagged as a dma-mapping series since spiritually it still is, but it looks like it will want to go via the IOMMU tree. Thanks, Robin. Robin Murphy (7): OF: Retire dma-ranges mask workaround OF: Simplify DMA range calculations ACPI/IORT: Handle memory address size limits as limits dma-mapping: Add helpers for dma_range_map bounds iommu/dma: Make limit checks self-contained iommu/dma: Centralise iommu_setup_dma_ops() dma-mapping: Simplify arch_setup_dma_ops() arch/arc/mm/dma.c | 3 +-- arch/arm/mm/dma-mapping-nommu.c | 3 +-- arch/arm/mm/dma-mapping.c | 18 +++++++------- arch/arm64/mm/dma-mapping.c | 5 +--- arch/loongarch/kernel/dma.c | 9 ++----- arch/mips/mm/dma-noncoherent.c | 3 +-- arch/riscv/mm/dma-noncoherent.c | 3 +-- drivers/acpi/arm64/dma.c | 17 ++++--------- drivers/acpi/arm64/iort.c | 20 ++++++++-------- drivers/acpi/scan.c | 3 +-- drivers/hv/hv_common.c | 6 +---- drivers/iommu/amd/iommu.c | 8 ------- drivers/iommu/dma-iommu.c | 39 ++++++++++++------------------ drivers/iommu/dma-iommu.h | 14 +++++------ drivers/iommu/intel/iommu.c | 7 ------ drivers/iommu/iommu.c | 6 ++--- drivers/iommu/s390-iommu.c | 6 ----- drivers/iommu/virtio-iommu.c | 10 -------- drivers/of/device.c | 42 ++++++--------------------------- include/linux/acpi_iort.h | 4 ++-- include/linux/dma-direct.h | 18 ++++++++++++++ include/linux/dma-map-ops.h | 6 ++--- include/linux/iommu.h | 7 ------ 23 files changed, 86 insertions(+), 171 deletions(-)