]> err.no Git - linux-2.6/blobdiff - arch/x86/mm/init_64.c
x86: debug: double-check the empty zero page
[linux-2.6] / arch / x86 / mm / init_64.c
index 5cadbb40da3ef7ee6fe205c96bccb0522e698fdc..05f12c527b0257cf55719124ed9cfa769468cffa 100644 (file)
@@ -495,8 +495,15 @@ void __init mem_init(void)
 
        pci_iommu_alloc();
 
-       /* clear the zero-page */
-       memset(empty_zero_page, 0, PAGE_SIZE);
+       /* clear_bss() already clear the empty_zero_page */
+
+       /* temporary debugging - double check it's true: */
+       {
+               int i;
+
+               for (i = 0; i < 1024; i++)
+                       WARN_ON_ONCE(empty_zero_page[i]);
+       }
 
        reservedpages = 0;
 
@@ -742,8 +749,7 @@ int __meminit vmemmap_populate(struct page *start_page,
                        if (!p)
                                return -ENOMEM;
 
-                       entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
-                       mk_pte_huge(entry);
+                       entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL_LARGE);
                        set_pmd(pmd, __pmd(pte_val(entry)));
 
                        printk(KERN_DEBUG " [%lx-%lx] PMD ->%p on node %d\n",