From nobody Sun Feb 8 05:23:49 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CADC311979 for ; Tue, 6 Jan 2026 19:27:59 +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=1767727682; cv=none; b=YXF3cVbAF7joA3UvuipYYiCsI/RPzWjP6tVRxu2gjJmq5qpnQ6C1Exq2Sl5keZdrHJKl6EttJ2M4vDXpxmzi4AqEaMCLVL9ocMZiuuMqZvTyPP/eAukh7tOtJ02N+Lp/ZZSBXvP4NDmndA22VcB90IYoXSoo+30mJCAllJjexPM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767727682; c=relaxed/simple; bh=CGabMn8Ds8L+s1s6+2N77irc9QAX0qrYtZl7xO9fmEg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tvN131L46YOZXvQLpAFEP3oARnUbWrALXWERZ/PFVZi9CWl9V12Cg90HhkaoyDfkas11K0bwFEb+vgtIZM/UkPPt3jTnWh6UWpUh3AkR7iHgKyNZltEp30mewc+1Kj909rWeznwYjPDFWepgJkqnXb+aYRtkxerhUmZ7rB8ZtdY= 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 0846C497; Tue, 6 Jan 2026 11:27:52 -0800 (PST) Received: from 010265703453.arm.com (unknown [10.57.46.241]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F17BC3F5A1; Tue, 6 Jan 2026 11:27:57 -0800 (PST) From: Robin Murphy To: m.szyprowski@samsung.com Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, 21cnbao@gmail.com Subject: [PATCH] dma-mapping: Remove dma_mark_clean (again) Date: Tue, 6 Jan 2026 19:27:53 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With IA-64 now gone, there are no users of the dma_mark_clean hook, so we can retire it for good. Signed-off-by: Robin Murphy --- include/linux/dma-map-ops.h | 8 -------- kernel/dma/Kconfig | 6 ------ kernel/dma/direct.c | 3 --- kernel/dma/direct.h | 3 --- 4 files changed, 20 deletions(-) diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h index 4809204c674c..64349e1b6535 100644 --- a/include/linux/dma-map-ops.h +++ b/include/linux/dma-map-ops.h @@ -377,14 +377,6 @@ static inline void arch_dma_prep_coherent(struct page = *page, size_t size) } #endif /* CONFIG_ARCH_HAS_DMA_PREP_COHERENT */ =20 -#ifdef CONFIG_ARCH_HAS_DMA_MARK_CLEAN -void arch_dma_mark_clean(phys_addr_t paddr, size_t size); -#else -static inline void arch_dma_mark_clean(phys_addr_t paddr, size_t size) -{ -} -#endif /* ARCH_HAS_DMA_MARK_CLEAN */ - void *arch_dma_set_uncached(void *addr, size_t size); void arch_dma_clear_uncached(void *addr, size_t size); =20 diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 31cfdb6b4bc3..159900736f25 100644 --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -47,12 +47,6 @@ config ARCH_HAS_DMA_SET_MASK config ARCH_HAS_DMA_WRITE_COMBINE bool =20 -# -# Select if the architectures provides the arch_dma_mark_clean hook -# -config ARCH_HAS_DMA_MARK_CLEAN - bool - config DMA_DECLARE_COHERENT bool =20 diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 50c3fe2a1d55..c9fa983990cd 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -425,9 +425,6 @@ void dma_direct_sync_sg_for_cpu(struct device *dev, arch_sync_dma_for_cpu(paddr, sg->length, dir); =20 swiotlb_sync_single_for_cpu(dev, paddr, sg->length, dir); - - if (dir =3D=3D DMA_FROM_DEVICE) - arch_dma_mark_clean(paddr, sg->length); } =20 if (!dev_is_dma_coherent(dev)) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index da2fadf45bcd..f476c63b668c 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -75,9 +75,6 @@ static inline void dma_direct_sync_single_for_cpu(struct = device *dev, } =20 swiotlb_sync_single_for_cpu(dev, paddr, size, dir); - - if (dir =3D=3D DMA_FROM_DEVICE) - arch_dma_mark_clean(paddr, size); } =20 static inline dma_addr_t dma_direct_map_phys(struct device *dev, --=20 2.34.1