patch-1.3.4 linux/mm/kmalloc.c

Next file: linux/mm/mmap.c
Previous file: linux/kernel/time.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.3/linux/mm/kmalloc.c linux/mm/kmalloc.c
@@ -13,8 +13,9 @@
  */
 
 #include <linux/mm.h>
-#include <asm/system.h>
 #include <linux/delay.h>
+#include <asm/system.h>
+#include <asm/dma.h>
 
 #define GFP_LEVEL_MASK 0xf
 
@@ -251,10 +252,13 @@
     sz = BLOCKSIZE(order); /* sz is the size of the blocks we're dealing with */
 
     /* This can be done with ints on: This is private to this invocation */
-    if (dma_flag)
-      page = (struct page_descriptor *) __get_dma_pages (priority & GFP_LEVEL_MASK, sizes[order].gfporder);
-    else
-      page = (struct page_descriptor *) __get_free_pages (priority & GFP_LEVEL_MASK, sizes[order].gfporder);
+    {
+    	unsigned long max_addr = ~0UL;
+    	if (dma_flag)
+    		max_addr = MAX_DMA_ADDRESS;
+	page = (struct page_descriptor *) __get_free_pages (priority & GFP_LEVEL_MASK,
+		sizes[order].gfporder, max_addr);
+    }
 
     if (!page) {
         static unsigned long last = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this