All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: Chris Zankel <chris-YvXeqwSYzG2sTnJN9+BGXg@public.gmane.org>,
	Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>,
	linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw@public.gmane.org,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Max Filippov <jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Guan Xuetao <gxt-TG0Ac1+ktVePQbnJrJN+5g@public.gmane.org>
Subject: [PATCH 02/12] mips: don't use dma_cache_sync to implement fd_cacheflush
Date: Sun, 27 Aug 2017 16:10:22 +0000	[thread overview]
Message-ID: <20170827161032.22772-3-hch@lst.de> (raw)
In-Reply-To: <20170827161032.22772-1-hch-jcswGhMUV9g@public.gmane.org>

The floppy drivers doesn't otherwise use the DMA API, so indirecting
through it just for cache flushing in MIPS-specific code just call
dma_cache_wback_inv directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/mips/include/asm/floppy.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/floppy.h b/arch/mips/include/asm/floppy.h
index d75aed36480a..021d09ae5670 100644
--- a/arch/mips/include/asm/floppy.h
+++ b/arch/mips/include/asm/floppy.h
@@ -10,11 +10,11 @@
 #ifndef _ASM_FLOPPY_H
 #define _ASM_FLOPPY_H
 
-#include <linux/dma-mapping.h>
+#include <asm/io.h>
 
 static inline void fd_cacheflush(char * addr, long size)
 {
-	dma_cache_sync(NULL, addr, size, DMA_BIDIRECTIONAL);
+	dma_cache_wback_inv((unsigned long)addr, size);
 }
 
 #define MAX_BUFFER_SECTORS 24
-- 
2.11.0


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: iommu@lists.linux-foundation.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Michal Simek <monstr@monstr.eu>,
	David Howells <dhowells@redhat.com>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Chris Zankel <chris@zankel.net>,
	Max Filippov <jcmvbkbc@gmail.com>,
	x86@kernel.org, linux-mips@linux-mips.org,
	linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 02/12] mips: don't use dma_cache_sync to implement fd_cacheflush
Date: Sun, 27 Aug 2017 18:10:22 +0200	[thread overview]
Message-ID: <20170827161032.22772-3-hch@lst.de> (raw)
In-Reply-To: <20170827161032.22772-1-hch@lst.de>

The floppy drivers doesn't otherwise use the DMA API, so indirecting
through it just for cache flushing in MIPS-specific code just call
dma_cache_wback_inv directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/mips/include/asm/floppy.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/floppy.h b/arch/mips/include/asm/floppy.h
index d75aed36480a..021d09ae5670 100644
--- a/arch/mips/include/asm/floppy.h
+++ b/arch/mips/include/asm/floppy.h
@@ -10,11 +10,11 @@
 #ifndef _ASM_FLOPPY_H
 #define _ASM_FLOPPY_H
 
-#include <linux/dma-mapping.h>
+#include <asm/io.h>
 
 static inline void fd_cacheflush(char * addr, long size)
 {
-	dma_cache_sync(NULL, addr, size, DMA_BIDIRECTIONAL);
+	dma_cache_wback_inv((unsigned long)addr, size);
 }
 
 #define MAX_BUFFER_SECTORS 24
-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: Chris Zankel <chris-YvXeqwSYzG2sTnJN9+BGXg@public.gmane.org>,
	Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>,
	linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw@public.gmane.org,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Max Filippov <jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Guan Xuetao <gxt-TG0Ac1+ktVePQbnJrJN+5g@public.gmane.org>
Subject: [PATCH 02/12] mips: don't use dma_cache_sync to implement fd_cacheflush
Date: Sun, 27 Aug 2017 18:10:22 +0200	[thread overview]
Message-ID: <20170827161032.22772-3-hch@lst.de> (raw)
In-Reply-To: <20170827161032.22772-1-hch-jcswGhMUV9g@public.gmane.org>

The floppy drivers doesn't otherwise use the DMA API, so indirecting
through it just for cache flushing in MIPS-specific code just call
dma_cache_wback_inv directly.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 arch/mips/include/asm/floppy.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/floppy.h b/arch/mips/include/asm/floppy.h
index d75aed36480a..021d09ae5670 100644
--- a/arch/mips/include/asm/floppy.h
+++ b/arch/mips/include/asm/floppy.h
@@ -10,11 +10,11 @@
 #ifndef _ASM_FLOPPY_H
 #define _ASM_FLOPPY_H
 
-#include <linux/dma-mapping.h>
+#include <asm/io.h>
 
 static inline void fd_cacheflush(char * addr, long size)
 {
-	dma_cache_sync(NULL, addr, size, DMA_BIDIRECTIONAL);
+	dma_cache_wback_inv((unsigned long)addr, size);
 }
 
 #define MAX_BUFFER_SECTORS 24
-- 
2.11.0

  parent reply	other threads:[~2017-08-27 16:10 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 16:10 refactor dma_cache_sync Christoph Hellwig
2017-08-27 16:10 ` Christoph Hellwig
2017-08-27 16:10 ` Christoph Hellwig
2017-08-27 16:10 ` [PATCH 03/12] frv: make dma_cache_sync a no-op Christoph Hellwig
2017-08-27 16:10   ` Christoph Hellwig
     [not found] ` <20170827161032.22772-1-hch-jcswGhMUV9g@public.gmane.org>
2017-08-27 16:10   ` [PATCH 01/12] floppy: consolidate the dummy fd_cacheflush definition Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10   ` Christoph Hellwig [this message]
2017-08-27 16:10     ` [PATCH 02/12] mips: don't use dma_cache_sync to implement fd_cacheflush Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10   ` [PATCH 04/12] x86: make dma_cache_sync a no-op Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
     [not found]     ` <20170827161032.22772-5-hch-jcswGhMUV9g@public.gmane.org>
2017-08-31 14:06       ` Thomas Gleixner
2017-08-31 14:06         ` Thomas Gleixner
2017-08-31 14:06         ` Thomas Gleixner
2017-08-27 16:10   ` [PATCH 05/12] ia64: " Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10   ` [PATCH 06/12] microblaze: " Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10   ` [PATCH 08/12] powerpc: " Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10   ` [PATCH 10/12] xtensa: " Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10     ` Christoph Hellwig
2017-08-27 16:10 ` [PATCH 07/12] mn10300: " Christoph Hellwig
2017-08-27 16:10   ` Christoph Hellwig
2017-08-27 16:10 ` [PATCH 09/12] unicore32: " Christoph Hellwig
2017-08-27 16:10   ` Christoph Hellwig
2017-08-27 16:10 ` [PATCH 11/12] sh: " Christoph Hellwig
2017-08-27 16:10   ` Christoph Hellwig
2017-08-27 16:10 ` [PATCH 12/12] dma-mapping: turn dma_cache_sync into a dma_map_ops method Christoph Hellwig
2017-08-27 16:10   ` Christoph Hellwig
2017-08-28  6:26   ` Geert Uytterhoeven
2017-08-28  6:26     ` Geert Uytterhoeven

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=20170827161032.22772-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=chris-YvXeqwSYzG2sTnJN9+BGXg@public.gmane.org \
    --cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=gxt-TG0Ac1+ktVePQbnJrJN+5g@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw@public.gmane.org \
    --cc=linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.