All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@suse.de>,
	discuss@x86-64.org
Subject: [PATCH] Move valid_dma_direction() from x86_64 to generic code
Date: Wed, 2 Aug 2006 17:20:40 +0200	[thread overview]
Message-ID: <200608021720.40815.eike-kernel@sf-tec.de> (raw)
In-Reply-To: <20060728174449.GA11046@rhun.ibm.com>

As suggested by Muli Ben-Yehuda this function is moved to generic code as
may be useful for all archs.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>

---
commit 9f990495512e3f106ce56f885a675636b47ff421
tree ad2864a5204c57d9836ff2360d6bf80c0d2246e3
parent 3ac898b16fb75cd996ec98fa578ea06b6ffb2760
author Rolf Eike Beer <eike-kernel@sf-tec.de> Wed, 02 Aug 2006 17:07:56 +0200
committer Rolf Eike Beer <beer@siso-eb-i34d.silicon-software.de> Wed, 02 Aug 2006 17:07:56 +0200

 include/asm-x86_64/dma-mapping.h |    7 -------
 include/linux/dma-mapping.h      |    7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h
index b6da83d..10174b1 100644
--- a/include/asm-x86_64/dma-mapping.h
+++ b/include/asm-x86_64/dma-mapping.h
@@ -55,13 +55,6 @@ extern dma_addr_t bad_dma_address;
 extern struct dma_mapping_ops* dma_ops;
 extern int iommu_merge;
 
-static inline int valid_dma_direction(int dma_direction)
-{
-	return ((dma_direction == DMA_BIDIRECTIONAL) ||
-		(dma_direction == DMA_TO_DEVICE) ||
-		(dma_direction == DMA_FROM_DEVICE));
-}
-
 static inline int dma_mapping_error(dma_addr_t dma_addr)
 {
 	if (dma_ops->mapping_error)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 635690c..ff203c4 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -24,6 +24,13 @@ #define DMA_29BIT_MASK	0x000000001ffffff
 #define DMA_28BIT_MASK	0x000000000fffffffULL
 #define DMA_24BIT_MASK	0x0000000000ffffffULL
 
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
 #include <asm/dma-mapping.h>
 
 /* Backwards compat, remove in 2.7.x */

  reply	other threads:[~2006-08-02 15:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28  7:28 [PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h Rolf Eike Beer
2006-07-28  7:47 ` Andrew Morton
2006-08-05 11:37   ` Pavel Machek
2006-08-07  1:20     ` Adrian Bunk
2006-07-28 17:44 ` Muli Ben-Yehuda
2006-08-02 15:20   ` Rolf Eike Beer [this message]
2006-08-02 18:55     ` [PATCH] Move valid_dma_direction() from x86_64 to generic code Muli Ben-Yehuda
2006-08-03  6:25       ` Rolf Eike Beer
2006-08-03  7:23         ` Muli Ben-Yehuda
2006-08-03 21:10           ` IOMMU (Calgary) patches Duran, Leo
2006-08-03 21:25             ` Jon Mason
2006-08-03 21:35               ` Duran, Leo
2006-08-03 22:46             ` [discuss] " Andi Kleen
2006-08-02 15:22   ` [PATCH] Use valid_dma_direction() in include/asm-i386/dma-mapping.h Rolf Eike Beer
2006-08-02 18:56     ` Muli Ben-Yehuda

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=200608021720.40815.eike-kernel@sf-tec.de \
    --to=eike-kernel@sf-tec.de \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muli@il.ibm.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 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.