diff options
Diffstat (limited to 'arch/x86/mm/pgtable_32.c')
| -rw-r--r-- | arch/x86/mm/pgtable_32.c | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index 73aba7125203..2f9e9afcb9f4 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
| @@ -342,12 +342,16 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp) | |||
| 342 | 342 | ||
| 343 | pgd_t *pgd_alloc(struct mm_struct *mm) | 343 | pgd_t *pgd_alloc(struct mm_struct *mm) | 
| 344 | { | 344 | { | 
| 345 | pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor); | 345 | pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); | 
| 346 | 346 | ||
| 347 | mm->pgd = pgd; /* so that alloc_pd can use it */ | 347 | /* so that alloc_pd can use it */ | 
| 348 | mm->pgd = pgd; | ||
| 349 | if (pgd) | ||
| 350 | pgd_ctor(pgd); | ||
| 348 | 351 | ||
| 349 | if (pgd && !pgd_prepopulate_pmd(mm, pgd)) { | 352 | if (pgd && !pgd_prepopulate_pmd(mm, pgd)) { | 
| 350 | quicklist_free(0, pgd_dtor, pgd); | 353 | pgd_dtor(pgd); | 
| 354 | free_page((unsigned long)pgd); | ||
| 351 | pgd = NULL; | 355 | pgd = NULL; | 
| 352 | } | 356 | } | 
| 353 | 357 | ||
| @@ -357,12 +361,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
| 357 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) | 361 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) | 
| 358 | { | 362 | { | 
| 359 | pgd_mop_up_pmds(mm, pgd); | 363 | pgd_mop_up_pmds(mm, pgd); | 
| 360 | quicklist_free(0, pgd_dtor, pgd); | 364 | pgd_dtor(pgd); | 
| 361 | } | 365 | free_page((unsigned long)pgd); | 
| 362 | |||
| 363 | void check_pgt_cache(void) | ||
| 364 | { | ||
| 365 | quicklist_trim(0, pgd_dtor, 25, 16); | ||
| 366 | } | 366 | } | 
| 367 | 367 | ||
| 368 | void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) | 368 | void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) | 
