]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
remove dead code in pgtable_cache_init
authorJeremy Fitzhardinge <jeremy@xensource.com>
Tue, 16 Oct 2007 18:51:29 +0000 (11:51 -0700)
committerJeremy Fitzhardinge <jeremy@goop.org>
Tue, 16 Oct 2007 18:51:29 +0000 (11:51 -0700)
The conversion from using a slab cache to quicklist left some residual
dead code.

I note that in the conversion it now always allocates a whole page for
the pgd, rather than the 32 bytes needed for a PAE pgd.  Was this
intended?

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
arch/x86/mm/init_32.c

index 730a5b177b1fa2237a08d3c465a009bbef4e4734..aa4708fda3e216b30bd8a662cb3b0460b973a359 100644 (file)
@@ -746,24 +746,12 @@ struct kmem_cache *pmd_cache;
 
 void __init pgtable_cache_init(void)
 {
-       size_t pgd_size = PTRS_PER_PGD*sizeof(pgd_t);
-
-       if (PTRS_PER_PMD > 1) {
+       if (PTRS_PER_PMD > 1)
                pmd_cache = kmem_cache_create("pmd",
-                                       PTRS_PER_PMD*sizeof(pmd_t),
-                                       PTRS_PER_PMD*sizeof(pmd_t),
-                                       SLAB_PANIC,
-                                       pmd_ctor);
-               if (!SHARED_KERNEL_PMD) {
-                       /* If we're in PAE mode and have a non-shared
-                          kernel pmd, then the pgd size must be a
-                          page size.  This is because the pgd_list
-                          links through the page structure, so there
-                          can only be one pgd per page for this to
-                          work. */
-                       pgd_size = PAGE_SIZE;
-               }
-       }
+                                             PTRS_PER_PMD*sizeof(pmd_t),
+                                             PTRS_PER_PMD*sizeof(pmd_t),
+                                             SLAB_PANIC,
+                                             pmd_ctor);
 }
 
 /*