]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/dma-mapping.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
[linux-2.6-omap-h63xx.git] / include / linux / dma-mapping.h
index 29b028597dcd441ed3534b664f8b29c8efd295d1..4470950892bed5e9b0f19c4576343baf28f3022e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _ASM_LINUX_DMA_MAPPING_H
-#define _ASM_LINUX_DMA_MAPPING_H
+#ifndef _LINUX_DMA_MAPPING_H
+#define _LINUX_DMA_MAPPING_H
 
 #include <linux/device.h>
 #include <linux/err.h>
@@ -13,9 +13,15 @@ enum dma_data_direction {
        DMA_NONE = 3,
 };
 
-#define DMA_BIT_MASK(n)        ((1ULL<<(n))-1)
+#define DMA_BIT_MASK(n)        (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
 
-#define DMA_64BIT_MASK (~0ULL)
+/*
+ * NOTE: do not use the below macros in new code and do not add new definitions
+ * here.
+ *
+ * Instead, just open-code DMA_BIT_MASK(n) within your driver
+ */
+#define DMA_64BIT_MASK DMA_BIT_MASK(64)
 #define DMA_48BIT_MASK DMA_BIT_MASK(48)
 #define DMA_47BIT_MASK DMA_BIT_MASK(47)
 #define DMA_40BIT_MASK DMA_BIT_MASK(40)