[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 10 Oct 2008 09:46:33 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Matthew Wilcox <matthew@....cx>,
Andrew Morton <akpm@...ux-foundation.org>
CC: Jesse Barnes <jbarnes@...tuousgeek.org>,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
grundler@...isc-linux.org, mingo@...e.hu, tglx@...utronix.de,
hpa@...or.com, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org
Subject: Re: [PATCH] pci: print out DMA mask info
Matthew Wilcox wrote:
>
> By the way, commit 8f286c33f1e838d631f4a3260b33efce4bc5973c is a really
> bad idea. It is very helpful to see which bitmasks are used by real
> devices, and which ones aren't. It should be reverted, IMO.
>
why? did you point to wrong commit?
commit 8f286c33f1e838d631f4a3260b33efce4bc5973c
Author: Andrew Morton <akpm@...ux-foundation.org>
Date: Thu Oct 18 03:05:07 2007 -0700
stop using DMA_xxBIT_MASK
Now that we have DMA_BIT_MASK(), these macros are pointless.
Cc: Jeremy Fitzhardinge <jeremy@...p.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 29b0285..101a2d4 100644
--- a/include/linux/dma-mapping.h
+++ b/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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists