aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pgtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pgtable.c')
-rw-r--r--arch/x86/mm/pgtable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index 47b5951e592b..db6fb7740bf7 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -343,7 +343,8 @@ static inline pgd_t *_pgd_alloc(void)
343 * We allocate one page for pgd. 343 * We allocate one page for pgd.
344 */ 344 */
345 if (!SHARED_KERNEL_PMD) 345 if (!SHARED_KERNEL_PMD)
346 return (pgd_t *)__get_free_page(PGALLOC_GFP); 346 return (pgd_t *)__get_free_pages(PGALLOC_GFP,
347 PGD_ALLOCATION_ORDER);
347 348
348 /* 349 /*
349 * Now PAE kernel is not running as a Xen domain. We can allocate 350 * Now PAE kernel is not running as a Xen domain. We can allocate
@@ -355,7 +356,7 @@ static inline pgd_t *_pgd_alloc(void)
355static inline void _pgd_free(pgd_t *pgd) 356static inline void _pgd_free(pgd_t *pgd)
356{ 357{
357 if (!SHARED_KERNEL_PMD) 358 if (!SHARED_KERNEL_PMD)
358 free_page((unsigned long)pgd); 359 free_pages((unsigned long)pgd, PGD_ALLOCATION_ORDER);
359 else 360 else
360 kmem_cache_free(pgd_cache, pgd); 361 kmem_cache_free(pgd_cache, pgd);
361} 362}