Re: DMA mapping (was Re: [PATCH] cciss 2.6; replaces DMA masks with kernel defines)

Lee Revell
2005-06-15T18:16:37Z

On Sat, 2005-06-11 at 14:54 +0100, Matthew Wilcox wrote:
> On Fri, Jun 10, 2005 at 07:08:11PM -0400, Lee Revell wrote:
> > Should I just add everything from 24 to 63?
>
> Actually, it'd be useful to have a central list of what DMA masks devices
> really take. It might provide some arguments for changing the zone allocater.
>

OK, patch attached. I don't have time to cover every case, maybe
someone else can run with this.

Lee

Summary: Add DMA mask constants other than 32 and 64 bit

Signed-Off-By: Lee Revell <rlrevell@joe-job.com>

--- linux-2.6.12-rc5-k7/include/linux/dma-mapping.h-orig 2005-06-15 14:14:04.000000000 -0400
+++ linux-2.6.12-rc5-k7/include/linux/dma-mapping.h 2005-06-15 14:17:13.000000000 -0400
@@ -14,7 +14,12 @@
};

#define DMA_64BIT_MASK 0xffffffffffffffffULL
+#define DMA_40BIT_MASK 0x000000ffffffffffULL
+#define DMA_39BIT_MASK 0x0000007fffffffffULL
#define DMA_32BIT_MASK 0x00000000ffffffffULL
+#define DMA_31BIT_MASK 0x000000007fffffffULL
+#define DMA_30BIT_MASK 0x000000003fffffffULL
+#define DMA_29BIT_MASK 0x000000001fffffffULL

#include <asm/dma-mapping.h>