Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp771978lqt; Fri, 19 Apr 2024 09:55:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXx3O+VDmErjlfYo6Ghefz0Oc2kv2DNY41RRmPUudLedUZldoTbl/SVma4G2LlgpWHFfbMeVGsFPDJ2VViGmynUm6YvCtWfRIu4lSB7yQ== X-Google-Smtp-Source: AGHT+IFHuW/qRLucMu8NI6K6dlclMRfAt1UNDXyuCk8NMQhNB19nkQ3uiobQqyYXkouOk2sraEyW X-Received: by 2002:a05:6214:92:b0:69b:3572:b214 with SMTP id n18-20020a056214009200b0069b3572b214mr2818524qvr.20.1713545712461; Fri, 19 Apr 2024 09:55:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713545712; cv=pass; d=google.com; s=arc-20160816; b=VtQ0Ts8TEaUATuaabHmuYUFg9ZV1awjgCs1WiEycv4kdkGA3T5AA+UAMyobz8YviKA zuLFvTpEX+7votlVBGzomjDTuyzaBCyoOEngFnPcflOEvftBXka/pJDrVUyd0G6wY+wF qWWqw8Xifpri77EMhPUEBbWtPeGSnLlBKL8+Ad2oxtv/P5w2aGaYaWY4/8HYMDR9o258 CqbPdeK9T9/U5c3eqp+cwcgj7yowztD0zb0fHwIPQpSWjyVe+ssEpuYOj0e27yFOxXXr 2GSuo7Yes5co+NWR4Igo1VhGMAURhvJ+Ye0L14KSvqFoOR6XWPtNpXmoZ6ZITphu6l3U lkug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=Sq4mM05+wu93GavlfJPRHt2G60ZmE7+fmHLjSr/Ibr4=; fh=GNBXEYaBv/m3jVEMpTGTRjnFoUB0WOii+EMJk4vaWPQ=; b=p1PIcHBNmzjm0yXEhMg3i1ntPnR+Jl/xZTgzuvVDsr3eST+QiJKJwNgEVW17q9UALK udDY7pSjZjKYPvxT3/k1w9lYIRnHA5xS0suxNznk/Y8VbfGTAFO5itYu8wiD0VNFxCQE fg4hZKG05+pcTGotCPGbcVRvsezZs34K86m9ZiEA9UJ/PqxwFkAk4OtzCdyLzFaswD+f KZo4GQBH3fnsN9GkUUKOnFkVukG0ogtd1uqKxMIa3pCc1LF9NytH+vqrZcX4yWIR6j2V QYhXEBIaGfvRdxkQsLPBZMCtFe1yw48WRijbp1yVnNYyISkhmk2vr6brbBHwwnHRpul5 LB7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-151784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k10-20020ad45bea000000b0069d8209bf25si4307005qvc.557.2024.04.19.09.55.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 09:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-151784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3242F1C21294 for ; Fri, 19 Apr 2024 16:55:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03897137930; Fri, 19 Apr 2024 16:55:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2611C13440D; Fri, 19 Apr 2024 16:55:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713545705; cv=none; b=j/2sgkTewy06PPhWljVrf2uuGcIKL3UU7bq8sE2/oXeSqzZ3MF6PUkdIdFMVaySTZ72WHCZ3uIE3/nQ5NXpyjWYwRcGMQdls9THAGT1rdtce20aw3owvSjlHy6k3WU/TEIAuy+wd3A1fLNPVEuKvmuiVecRxVyvGkZQDLHPWNvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713545705; c=relaxed/simple; bh=/Sgalow7R8qrgIOMiewpK7cg75Gx/+KiRjQFIynuSmM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=cplDpYQxiTs5njmAzI6zH8ZhI1UjuCzMuAIJGpdKzUAzq7LWLy/4T64hM6YDqskMFadE8BaXIYEOLekaSdlIA8fDXpUHSc2kQB0cesVevBqyHnmTOjyl15ojIZNwjhdZpuwyxPBRTJV6Mki0A7t5hlxBU0FW8ZNhpy3baJ0UP+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 8C5AC2F; Fri, 19 Apr 2024 09:55:30 -0700 (PDT) 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 931823F792; Fri, 19 Apr 2024 09:54:57 -0700 (PDT) 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 v4 0/7] iommu, dma-mapping: Simplify arch_setup_dma_ops() Date: Fri, 19 Apr 2024 17:54:39 +0100 Message-Id: X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit v3: https://lore.kernel.org/linux-iommu/cover.1707493264.git.robin.murphy@arm.com/ Hi all, Since this ended up missing the boat for 6.9, here's a rebase and resend with the additional tags from v3 collected. Cheers, 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 | 16 +++++++------ 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 | 7 +----- 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 | 20 ++++++---------- 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, 89 insertions(+), 184 deletions(-) -- 2.39.2.101.g768bb238c484.dirty