linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Small fix to pci_alloc_consistent()
@ 2002-03-18 17:46 Badari Pulavarty
  0 siblings, 0 replies; only message in thread
From: Badari Pulavarty @ 2002-03-18 17:46 UTC (permalink / raw)
  To: linux-kernel, marcelo, axboe; +Cc: pbadari, Janet Morgan

Hi,

pci_alloc_consistent() is returning zone DMA memory to highmem 
enabled drivers when it really should have been returning zone NORMAL.

Found this while testing qlogicfc driver for > 4GB support.

Thanks,
Badari


diff -Naur -X dontdiff linux/arch/i386/kernel/pci-dma.c linux.2417all/arch/i386/kernel/pci-dma.c
--- linux/arch/i386/kernel/pci-dma.c    Thu Mar 14 16:01:42 2002
+++ linux.2417all/arch/i386/kernel/pci-dma.c	Thu Mar 14 15:41:40 2002
@@ -19,7 +19,7 @@
 		 void *ret;
 		 int gfp = GFP_ATOMIC;
 
-		 if (hwdev == NULL || hwdev->dma_mask != 0xffffffff)
+		 if (hwdev == NULL || ((u32)hwdev->dma_mask != 0xffffffff))
 		 		 gfp |= GFP_DMA;
 		 ret = (void *)__get_free_pages(gfp, get_order(size));


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-18 17:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-18 17:46 [PATCH] Small fix to pci_alloc_consistent() Badari Pulavarty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).