Skip to contentSkip to conversation

Fix up dma_alloc_coherent with 64bit DMA masks on i386.

PATCH [email protected] 1 participant 1 message Jan 8, 2003

lore
Share & tools
lore
#0 lore raw

Cset 1.808 in 2.4 never got propagated forward to 2.5
It's pretty much the same fix as below (s/!=/</), but with the following changes
- This was a patch to pci_alloc_consistant(), which now seems to be dma_alloc_coherent()
- Removal of the u32 cast

arch/i386/kernel/pci-dma.c +1 -1
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/kernel/pci-dma.c linux-2.5/arch/i386/kernel/pci-dma.c
@@ -19,7 +19,7 @@ void *dma_alloc_coherent(struct device *
 	void *ret;
 	int gfp = GFP_ATOMIC;
 
-	if (dev == NULL || ((u32)*dev->dma_mask != 0xffffffff))
+	if (dev == NULL || (*dev->dma_mask < 0xffffffff))
 		gfp |= GFP_DMA;
 	ret = (void *)__get_free_pages(gfp, get_order(size));