pmd_large vs. pmd_huge

From: Pete Zaitcev (zaitcev@redhat.com)
Date: Mon Jul 28 2003 - 14:08:37 EST


I looked at the 2.6.0-test2 to find out the difference between
large and huge pages, but it seems they are one and the same.
The ia64 only implements pmd_huge, so how about just going
with that everywhere? For starters, we can do this to strike
down an evil #ifdef:

diff -urN -X dontdiff linux-2.6.0-test1-bk2/mm/slab.c linux-2.6.0-test1-bk2-nip/mm/slab.c
--- linux-2.6.0-test1-bk2/mm/slab.c 2003-07-23 18:20:17.000000000 -0700
+++ linux-2.6.0-test1-bk2-nip/mm/slab.c 2003-07-28 11:58:46.000000000 -0700
@@ -91,6 +91,7 @@
 #include <linux/cpu.h>
 #include <linux/sysctl.h>
 #include <linux/module.h>
+#include <linux/hugetlb.h>
 
 #include <asm/uaccess.h>
 #include <asm/cacheflush.h>
@@ -2728,12 +2729,10 @@
                         printk("No pmd.\n");
                         break;
                 }
-#ifdef CONFIG_X86
- if (pmd_large(*pmd)) {
- printk("Large page.\n");
+ if (pmd_huge(*pmd)) {
+ printk("Huge page.\n");
                         break;
                 }
-#endif
                 printk("normal page, pte_val 0x%llx\n",
                   (unsigned long long)pte_val(*pte_offset_kernel(pmd, addr)));
         } while(0);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:37 EST