]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/include/asm/dma-mapping.h
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-omap-h63xx.git] / arch / x86 / include / asm / dma-mapping.h
index 219c33d6361cdfa640878431cd6e6523dc2a475a..7f225a4b2a26aedd2995d8c68c75df6962f19778 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ASM_X86__DMA_MAPPING_H
-#define ASM_X86__DMA_MAPPING_H
+#ifndef _ASM_X86_DMA_MAPPING_H
+#define _ASM_X86_DMA_MAPPING_H
 
 /*
  * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for
@@ -65,7 +65,7 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
                return dma_ops;
        else
                return dev->archdata.dma_ops;
-#endif /* ASM_X86__DMA_MAPPING_H */
+#endif /* _ASM_X86_DMA_MAPPING_H */
 }
 
 /* Make sure we keep the same behaviour */
@@ -255,9 +255,11 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
 
 static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
 {
-#ifdef CONFIG_X86_64
        unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
 
+       if (dma_mask <= DMA_24BIT_MASK)
+               gfp |= GFP_DMA;
+#ifdef CONFIG_X86_64
        if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
                gfp |= GFP_DMA32;
 #endif