patch-2.4.23 linux-2.4.23/include/asm-ppc/pgalloc.h
Next file: linux-2.4.23/include/asm-ppc/pgtable.h
Previous file: linux-2.4.23/include/asm-ppc/pci.h
Back to the patch index
Back to the overall index
-  Lines: 23
-  Date:
2003-11-28 10:26:21.000000000 -0800
-  Orig file: 
linux-2.4.22/include/asm-ppc/pgalloc.h
-  Orig date: 
2003-06-13 07:51:38.000000000 -0700
diff -urN linux-2.4.22/include/asm-ppc/pgalloc.h linux-2.4.23/include/asm-ppc/pgalloc.h
@@ -6,6 +6,13 @@
 #include <linux/threads.h>
 #include <asm/processor.h>
 
+#ifdef CONFIG_PTE_64BIT
+/* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */
+#define PGDIR_ORDER	1
+#else
+#define PGDIR_ORDER	0
+#endif
+
 /*
  * This is handled very differently on the PPC since out page tables
  * are all 0's and I want to be able to use these zero'd pages elsewhere
@@ -56,7 +63,7 @@
 {
 	pgd_t *ret;
 
-	if ((ret = (pgd_t *)__get_free_page(GFP_KERNEL)) != NULL)
+	if ((ret = (pgd_t *)__get_free_pages(GFP_KERNEL, PGDIR_ORDER)) != NULL)
 		clear_page(ret);
 	return ret;
 }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)