This stack check implementation leverages the compiler's profiling (gcc -p)
[linux-2.6.git] / include / asm-i386 / dma-mapping.h
index 70f6204..79bfab5 100644 (file)
@@ -1,7 +1,12 @@
 #ifndef _ASM_I386_DMA_MAPPING_H
 #define _ASM_I386_DMA_MAPPING_H
 
+#include <linux/device.h>
+#include <linux/mm.h>
+
 #include <asm/cache.h>
+#include <asm/io.h>
+#include <asm/scatterlist.h>
 
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
@@ -51,7 +56,7 @@ dma_map_page(struct device *dev, struct page *page, unsigned long offset,
             size_t size, enum dma_data_direction direction)
 {
        BUG_ON(direction == DMA_NONE);
-       return (dma_addr_t)(page_to_pfn(page)) * PAGE_SIZE + offset;
+       return page_to_phys(page) + offset;
 }
 
 static inline void