linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Russell King <linux@armlinux.org.uk>
Cc: "Robin Murphy" <robin.murphy@arm.com>,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	"Marek Behún" <kabel@kernel.org>
Subject: [PATCH 2/2] ARM/dma-mapping: remove the dma_coherent member of struct dev_archdata
Date: Thu,  6 Oct 2022 09:48:24 +0200	[thread overview]
Message-ID: <20221006074824.521457-3-hch@lst.de> (raw)
In-Reply-To: <20221006074824.521457-1-hch@lst.de>

Since commit ae626eb97376 ("ARM/dma-mapping: use dma-direct
unconditionally") only the dma_coherent flag in struct device is used,
so remove the now write only flag in struct dev_archdata.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arm/include/asm/device.h | 1 -
 arch/arm/mm/dma-mapping.c     | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h
index 8754c0f5fc904..c6beb1708c64b 100644
--- a/arch/arm/include/asm/device.h
+++ b/arch/arm/include/asm/device.h
@@ -9,7 +9,6 @@ struct dev_archdata {
 #ifdef CONFIG_ARM_DMA_USE_IOMMU
 	struct dma_iommu_mapping	*mapping;
 #endif
-	unsigned int dma_coherent:1;
 	unsigned int dma_ops_setup:1;
 };
 
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index bfc7476f14114..f60d6b4afe5df 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1775,10 +1775,8 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 	 * here, but instead have to make sure we only set but never clear it
 	 * for now.
 	 */
-	if (coherent) {
-		dev->archdata.dma_coherent = true;
+	if (coherent)
 		dev->dma_coherent = true;
-	}
 
 	/*
 	 * Don't override the dma_ops if they have already been set. Ideally
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-10-06  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06  7:48 mvebu DMA fix Christoph Hellwig
2022-10-06  7:48 ` [PATCH 1/2] ARM/dma-mappіng: don't override ->dma_coherent when set from a bus notifier Christoph Hellwig
2022-10-06  7:48 ` Christoph Hellwig [this message]
2022-10-06 11:52 ` mvebu DMA fix Russell King (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221006074824.521457-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=kabel@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).