From patchwork Fri Oct 4 17:23:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13822855 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 4D662CF8840 for ; Fri, 4 Oct 2024 17:33:20 +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:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=1YbPP75pGZfs6660HAPrOyUhcs0kb5K2kzLWLPdt6zM=; b=xIA+edcXN+iwWnSZgSo/v0JMFE xNP7YYP28/BqJ+HlUa5BY00lnT3QGS+hRRjbpy+JXma4iJY7DsSypw2QMmSqqdcvvjYsWlF7E6y83 fEPfiScRQ2ICFcjmWm2rnPyMvSZiJJ7uhWDTRun1ae9Hlk07IdLcMuckKKQCzsowm/FNPae+C3xlG INV+EwZ8c95SvtVh3cy1Cz035KbU9ORvCemzoaGzVCy1Drs8qM7RRS6dJexSCAsFM3rn0nQisukAF SP8JUPPnzmmL9jUsl6c42GOxHWe0HwfIepfc6amhEGM7u0Nl3K0E2WcgZE0hPjEKkmsfPpf5NDkYS q5YCUMmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swmAx-0000000DXAi-1tjR; Fri, 04 Oct 2024 17:33:11 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swm1n-0000000DVNq-3G2k for linux-arm-kernel@lists.infradead.org; Fri, 04 Oct 2024 17:23:45 +0000 Received: from rrs24-12-35.corp.microsoft.com (unknown [131.107.1.176]) by linux.microsoft.com (Postfix) with ESMTPSA id AA01720DB372; Fri, 4 Oct 2024 10:23:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AA01720DB372 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1728062622; bh=1YbPP75pGZfs6660HAPrOyUhcs0kb5K2kzLWLPdt6zM=; h=From:To:Cc:Subject:Date:From; b=fmxRHCZuzH3vOlH8LRH2P74niodZNV++3gBPU4pKo5uPmtrefCfQExxbgeuJF+EHL +Px8cKn/RNyoY5j9ymRA0W4pkrb9kzLfMd7A8I+RXQvLLyxRp8wGscNchK62UAqS/6 Yhf6xvmbUd8wFvGRO7F3BMGmAuAC0dZzPJY5o/bU= From: Easwar Hariharan To: Russell King , Jason Gunthorpe , Lu Baolu , "Russell King (Oracle)" , Vasant Hegde , Robin Murphy , Chen Haonan , Easwar Hariharan , linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT), linux-kernel@vger.kernel.org (open list) Cc: jacob.pan@linux.microsoft.com Subject: [PATCH] ARM/dma-mapping: Disambiguate ops from iommu_ops in IOMMU core Date: Fri, 4 Oct 2024 17:23:31 +0000 Message-ID: <20241004172335.386904-1-eahariha@linux.microsoft.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241004_102343_861573_3825F5AC X-CRM114-Status: GOOD ( 10.62 ) 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 The architecture dma ops collides with the struct iommu_ops {} defined in /include/linux/iommu.h. This isn't a major issue, just a nagging annoyance. Rename iommu_ops to arm_dma_iommu_ops to disambiguate and better match the other architectures. No functional changes intended. Signed-off-by: Easwar Hariharan --- arch/arm/mm/dma-mapping.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 88c2d68a69c9e..51b5319e8f519 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1510,7 +1510,7 @@ static void arm_iommu_sync_single_for_device(struct device *dev, __dma_page_cpu_to_dev(page, offset, size, dir); } -static const struct dma_map_ops iommu_ops = { +static const struct dma_map_ops arm_dma_iommu_ops = { .alloc = arm_iommu_alloc_attrs, .free = arm_iommu_free_attrs, .mmap = arm_iommu_mmap_attrs, @@ -1680,7 +1680,7 @@ int arm_iommu_attach_device(struct device *dev, if (err) return err; - set_dma_ops(dev, &iommu_ops); + set_dma_ops(dev, &arm_dma_iommu_ops); return 0; } EXPORT_SYMBOL_GPL(arm_iommu_attach_device); @@ -1734,7 +1734,7 @@ static void arm_setup_iommu_dma_ops(struct device *dev) return; } - set_dma_ops(dev, &iommu_ops); + set_dma_ops(dev, &arm_dma_iommu_ops); } static void arm_teardown_iommu_dma_ops(struct device *dev)