iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Richard Kuo <rkuo@codeaurora.org>
Cc: linux-hexagon@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] hexagon: remove the sync_single_for_cpu DMA operation
Date: Thu, 19 Jul 2018 05:56:33 -0700	[thread overview]
Message-ID: <20180719125635.824-2-hch@lst.de> (raw)
In-Reply-To: <20180719125635.824-1-hch@lst.de>

hexagon does all the required cache maintainance at dma map time, and none
at unmap time.  It thus has to implement sync_single_for_device to match
the map cace for buffer reuse, but there is no point in doing another
invalidation in the sync_single_cpu_case, which in terms of cache
maintainance is equivalent to the unmap case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/hexagon/kernel/dma.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/hexagon/kernel/dma.c b/arch/hexagon/kernel/dma.c
index 77459df34e2e..d2b717f352f4 100644
--- a/arch/hexagon/kernel/dma.c
+++ b/arch/hexagon/kernel/dma.c
@@ -181,13 +181,6 @@ static dma_addr_t hexagon_map_page(struct device *dev, struct page *page,
 	return bus;
 }
 
-static void hexagon_sync_single_for_cpu(struct device *dev,
-					dma_addr_t dma_handle, size_t size,
-					enum dma_data_direction dir)
-{
-	dma_sync(dma_addr_to_virt(dma_handle), size, dir);
-}
-
 static void hexagon_sync_single_for_device(struct device *dev,
 					dma_addr_t dma_handle, size_t size,
 					enum dma_data_direction dir)
@@ -205,7 +198,6 @@ const struct dma_map_ops hexagon_dma_ops = {
 	.free		= hexagon_free_coherent,
 	.map_sg		= hexagon_map_sg,
 	.map_page	= hexagon_map_page,
-	.sync_single_for_cpu = hexagon_sync_single_for_cpu,
 	.sync_single_for_device = hexagon_sync_single_for_device,
 	.mapping_error	= hexagon_mapping_error,
 };
-- 
2.18.0

  reply	other threads:[~2018-07-19 12:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 12:56 use the generic dma-noncoherent code for hexagon Christoph Hellwig
2018-07-19 12:56 ` Christoph Hellwig [this message]
     [not found]   ` <20180719125635.824-2-hch-jcswGhMUV9g@public.gmane.org>
2018-07-25  3:29     ` [PATCH 1/3] hexagon: remove the sync_single_for_cpu DMA operation Richard Kuo
     [not found]       ` <20180725032948.GG12771-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-07-25  4:39         ` Christoph Hellwig
2018-07-31 15:22           ` Christoph Hellwig
     [not found]             ` <20180731152229.GA956-jcswGhMUV9g@public.gmane.org>
2018-08-07  7:01               ` Christoph Hellwig
     [not found]                 ` <20180807070136.GA32634-jcswGhMUV9g@public.gmane.org>
2018-08-08  0:19                   ` Richard Kuo
2018-08-08  6:19                     ` Christoph Hellwig
2018-08-27  8:41                     ` Christoph Hellwig
2018-07-19 12:56 ` [PATCH 2/3] hexagon: implement the sync_sg_for_device " Christoph Hellwig
2018-07-19 12:56 ` [PATCH 3/3] hexagon: use generic dma_noncoherent_ops Christoph Hellwig

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=20180719125635.824-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkuo@codeaurora.org \
    /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).