From ff94878d05e91a3cbd0f4c0a6a4a1479cb2fc908 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 18 Oct 2007 03:05:07 -0700 Subject: [PATCH] --- yaml --- r: 71126 b: refs/heads/master c: 8f286c33f1e838d631f4a3260b33efce4bc5973c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/dma-mapping.h | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 27515a4c1202..c94376fac9f9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 34c6538413e5648b63cb785add509f500b3a7b11 +refs/heads/master: 8f286c33f1e838d631f4a3260b33efce4bc5973c diff --git a/trunk/include/linux/dma-mapping.h b/trunk/include/linux/dma-mapping.h index 29b028597dcd..101a2d4636be 100644 --- a/trunk/include/linux/dma-mapping.h +++ b/trunk/include/linux/dma-mapping.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)