Lines Matching refs:pgd
96 static inline void pgd_list_add(pgd_t *pgd) in pgd_list_add() argument
98 struct ptdesc *ptdesc = virt_to_ptdesc(pgd); in pgd_list_add()
103 static inline void pgd_list_del(pgd_t *pgd) in pgd_list_del() argument
105 struct ptdesc *ptdesc = virt_to_ptdesc(pgd); in pgd_list_del()
116 static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm) in pgd_set_mm() argument
118 virt_to_ptdesc(pgd)->pt_mm = mm; in pgd_set_mm()
126 static void pgd_ctor(struct mm_struct *mm, pgd_t *pgd) in pgd_ctor() argument
134 clone_pgd_range(pgd + KERNEL_PGD_BOUNDARY, in pgd_ctor()
141 pgd_set_mm(pgd, mm); in pgd_ctor()
142 pgd_list_add(pgd); in pgd_ctor()
146 static void pgd_dtor(pgd_t *pgd) in pgd_dtor() argument
152 pgd_list_del(pgd); in pgd_dtor()
276 pgd_t pgd = *pgdp; in mop_up_one_pmd() local
278 if (pgd_val(pgd) != 0) { in mop_up_one_pmd()
279 pmd_t *pmd = (pmd_t *)pgd_page_vaddr(pgd); in mop_up_one_pmd()
283 paravirt_release_pmd(pgd_val(pgd) >> PAGE_SHIFT); in mop_up_one_pmd()
308 static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[]) in pgd_prepopulate_pmd() argument
314 p4d = p4d_offset(pgd, 0); in pgd_prepopulate_pmd()
412 static inline void _pgd_free(pgd_t *pgd) in _pgd_free() argument
415 free_pages((unsigned long)pgd, PGD_ALLOCATION_ORDER); in _pgd_free()
417 kmem_cache_free(pgd_cache, pgd); in _pgd_free()
427 static inline void _pgd_free(pgd_t *pgd) in _pgd_free() argument
429 free_pages((unsigned long)pgd, PGD_ALLOCATION_ORDER); in _pgd_free()
435 pgd_t *pgd; in pgd_alloc() local
439 pgd = _pgd_alloc(); in pgd_alloc()
441 if (pgd == NULL) in pgd_alloc()
444 mm->pgd = pgd; in pgd_alloc()
464 pgd_ctor(mm, pgd); in pgd_alloc()
466 pgd_prepopulate_pmd(mm, pgd, pmds); in pgd_alloc()
469 pgd_prepopulate_user_pmd(mm, pgd, u_pmds); in pgd_alloc()
473 return pgd; in pgd_alloc()
482 _pgd_free(pgd); in pgd_alloc()
487 void pgd_free(struct mm_struct *mm, pgd_t *pgd) in pgd_free() argument
489 pgd_mop_up_pmds(mm, pgd); in pgd_free()
490 pgd_dtor(pgd); in pgd_free()
491 paravirt_pgd_free(mm, pgd); in pgd_free()
492 _pgd_free(pgd); in pgd_free()