]> err.no Git - linux-2.6/commitdiff
powerpc: move device_to_mask() to dma-mapping.h
authorMark Nelson <markn@au1.ibm.com>
Fri, 4 Jul 2008 19:05:45 +0000 (05:05 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 9 Jul 2008 06:30:44 +0000 (16:30 +1000)
Move device_to_mask() to dma-mapping.h because we need to use it from
outside dma_64.c in a later patch.

Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/dma_64.c
include/asm-powerpc/dma-mapping.h

index 3ae0c35d21f95b3fd8fee14ee208d1230cf9c887..ae5708e3a3127fc9a180ae1d881d5bea5ede48bc 100644 (file)
  * Generic iommu implementation
  */
 
-static inline unsigned long device_to_mask(struct device *dev)
-{
-       if (dev->dma_mask && *dev->dma_mask)
-               return *dev->dma_mask;
-       /* Assume devices without mask can take 32 bit addresses */
-       return 0xfffffffful;
-}
-
-
 /* Allocates a contiguous real buffer and creates mappings over it.
  * Returns the virtual address of the buffer and sets dma_handle
  * to the dma address (mapping) of the first page.
index de1395023cb169702979aeb31ad0aea30e760dc2..74c549780987ba8e9feb48a299c9455c32cfce93 100644 (file)
@@ -45,6 +45,15 @@ extern void __dma_sync_page(struct page *page, unsigned long offset,
 #endif /* ! CONFIG_NOT_COHERENT_CACHE */
 
 #ifdef CONFIG_PPC64
+
+static inline unsigned long device_to_mask(struct device *dev)
+{
+       if (dev->dma_mask && *dev->dma_mask)
+               return *dev->dma_mask;
+       /* Assume devices without mask can take 32 bit addresses */
+       return 0xfffffffful;
+}
+
 /*
  * DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO
  */