linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: linux-mm@kvack.org, akpm@linux-foundation.org
Cc: Jonas Bonn <jonas@southpole.se>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [mm PATCH v2 16/26] arch/openrisc: Add option to skip DMA sync as a part of mapping
Date: Wed, 02 Nov 2016 07:14:55 -0400	[thread overview]
Message-ID: <20161102111452.79519.97790.stgit@ahduyck-blue-test.jf.intel.com> (raw)
In-Reply-To: <20161102111031.79519.14741.stgit@ahduyck-blue-test.jf.intel.com>

This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.

Cc: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
 arch/openrisc/kernel/dma.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/openrisc/kernel/dma.c b/arch/openrisc/kernel/dma.c
index 140c991..906998b 100644
--- a/arch/openrisc/kernel/dma.c
+++ b/arch/openrisc/kernel/dma.c
@@ -141,6 +141,9 @@
 	unsigned long cl;
 	dma_addr_t addr = page_to_phys(page) + offset;
 
+	if (attrs & DMA_ATTR_SKIP_CPU_SYNC)
+		return addr;
+
 	switch (dir) {
 	case DMA_TO_DEVICE:
 		/* Flush the dcache for the requested range */

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2016-11-02 17:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 11:12 [mm PATCH v2 00/26] Add support for DMA writable pages being writable by the network stack Alexander Duyck
2016-11-02 11:12 ` [mm PATCH v2 01/26] swiotlb: Drop unused functions swiotlb_map_sg and swiotlb_unmap_sg Alexander Duyck
2016-11-03 14:14   ` Christoph Hellwig
2016-11-03 14:29     ` Konrad Rzeszutek Wilk
2016-11-03 14:45       ` Christoph Hellwig
2016-11-03 15:02         ` Duyck, Alexander H
2016-11-02 11:12 ` [mm PATCH v2 02/26] swiotlb-xen: Enforce return of DMA_ERROR_CODE in mapping function Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 03/26] swiotlb: Add support for DMA_ATTR_SKIP_CPU_SYNC Alexander Duyck
2016-11-05 19:39   ` Konrad Rzeszutek Wilk
2016-11-05 23:13     ` Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 04/26] arch/arc: Add option to skip sync on DMA mapping Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 05/26] arch/arm: Add option to skip sync on DMA map and unmap Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 06/26] arch/avr32: Add option to skip sync on DMA map Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 07/26] arch/blackfin: " Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 08/26] arch/c6x: Add option to skip sync on DMA map and unmap Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 09/26] arch/frv: Add option to skip sync on DMA map Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 10/26] arch/hexagon: Add option to skip DMA sync as a part of mapping Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 11/26] arch/m68k: " Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 12/26] arch/metag: Add option to skip DMA sync as a part of map and unmap Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 13/26] arch/microblaze: " Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 14/26] arch/mips: " Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 15/26] arch/nios2: " Alexander Duyck
2016-11-02 11:14 ` Alexander Duyck [this message]
2016-11-02 11:15 ` [mm PATCH v2 17/26] arch/parisc: " Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 18/26] arch/powerpc: Add option to skip DMA sync as a part of mapping Alexander Duyck
2016-11-04  3:16   ` Michael Ellerman
2016-11-02 11:15 ` [mm PATCH v2 19/26] arch/sh: " Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 20/26] arch/sparc: Add option to skip DMA sync as a part of map and unmap Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 21/26] arch/tile: " Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 22/26] arch/xtensa: Add option to skip DMA sync as a part of mapping Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 23/26] dma: Add calls for dma_map_page_attrs and dma_unmap_page_attrs Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 24/26] mm: Add support for releasing multiple instances of a page Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 25/26] igb: Update driver to make use of DMA_ATTR_SKIP_CPU_SYNC Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 26/26] igb: Update code to better handle incrementing page count Alexander Duyck

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=20161102111452.79519.97790.stgit@ahduyck-blue-test.jf.intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=jonas@southpole.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.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