diff options
-rw-r--r-- | arch/x86/mm/init_32.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 730a5b177b1f..aa4708fda3e2 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -746,24 +746,12 @@ struct kmem_cache *pmd_cache; | |||
746 | 746 | ||
747 | void __init pgtable_cache_init(void) | 747 | void __init pgtable_cache_init(void) |
748 | { | 748 | { |
749 | size_t pgd_size = PTRS_PER_PGD*sizeof(pgd_t); | 749 | if (PTRS_PER_PMD > 1) |
750 | |||
751 | if (PTRS_PER_PMD > 1) { | ||
752 | pmd_cache = kmem_cache_create("pmd", | 750 | pmd_cache = kmem_cache_create("pmd", |
753 | PTRS_PER_PMD*sizeof(pmd_t), | 751 | PTRS_PER_PMD*sizeof(pmd_t), |
754 | PTRS_PER_PMD*sizeof(pmd_t), | 752 | PTRS_PER_PMD*sizeof(pmd_t), |
755 | SLAB_PANIC, | 753 | SLAB_PANIC, |
756 | pmd_ctor); | 754 | pmd_ctor); |
757 | if (!SHARED_KERNEL_PMD) { | ||
758 | /* If we're in PAE mode and have a non-shared | ||
759 | kernel pmd, then the pgd size must be a | ||
760 | page size. This is because the pgd_list | ||
761 | links through the page structure, so there | ||
762 | can only be one pgd per page for this to | ||
763 | work. */ | ||
764 | pgd_size = PAGE_SIZE; | ||
765 | } | ||
766 | } | ||
767 | } | 755 | } |
768 | 756 | ||
769 | /* | 757 | /* |