]> err.no Git - linux-2.6/commitdiff
[PATCH] Move valid_dma_direction() from x86_64 to generic code
authorRolf Eike Beer <eike-kernel@sf-tec.de>
Fri, 29 Sep 2006 08:59:48 +0000 (01:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:10 +0000 (09:18 -0700)
As suggested by Muli Ben-Yehuda this function is moved to generic code as
may be useful for all archs.

[akpm@osdl.org: fix]
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/pci-swiotlb.c
drivers/net/fec_8xx/fec_main.c
drivers/net/fs_enet/fs_enet.h
include/asm-x86_64/dma-mapping.h
include/linux/dma-mapping.h

index 6a55f87ba97f917ed2814bc3c11c3f21a3ad096b..697f0aa794b960a663b15ee09e161f86890119ab 100644 (file)
@@ -3,7 +3,8 @@
 #include <linux/pci.h>
 #include <linux/cache.h>
 #include <linux/module.h>
-#include <asm/dma-mapping.h>
+#include <linux/dma-mapping.h>
+
 #include <asm/proto.h>
 #include <asm/swiotlb.h>
 #include <asm/dma.h>
index 22ac2df1aeb0c513e0d4822cafe5e938d56826c6..e17a1449ee105366dcb0caccc703216edd7ee537 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/mii.h>
 #include <linux/ethtool.h>
 #include <linux/bitops.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/8xx_immap.h>
 #include <asm/pgtable.h>
@@ -37,7 +38,6 @@
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/commproc.h>
-#include <asm/dma-mapping.h>
 
 #include "fec_8xx.h"
 
index 95022c005f75cb3497f269476b00657e87b4c493..92590d8fc24b4ee39b9e7bf7175132d5fa5a9002 100644 (file)
@@ -6,11 +6,10 @@
 #include <linux/types.h>
 #include <linux/list.h>
 #include <linux/phy.h>
+#include <linux/dma-mapping.h>
 
 #include <linux/fs_enet_pd.h>
 
-#include <asm/dma-mapping.h>
-
 #ifdef CONFIG_CPM1
 #include <asm/commproc.h>
 
index b6da83dcc7a6690e81bde6956cd16acf6ef12a15..10174b110a5cf9bb332b531c24f2cedef3b35c0a 100644 (file)
@@ -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)
index 635690cf3e3dc77ff54f8d07555da2ffc4dff165..ff203c465fed260f75de3c0d80a71e7d90f101d2 100644 (file)
@@ -24,6 +24,13 @@ enum dma_data_direction {
 #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 */