Lines Matching refs:pgd
74 DEFINE_POPULATE(pgd_populate, pgd, p4d, init) in DEFINE_POPULATE()
150 pgd_t *pgd; in sync_global_pgds_l5() local
153 pgd = (pgd_t *)page_address(page) + pgd_index(addr); in sync_global_pgds_l5()
158 if (!pgd_none(*pgd_ref) && !pgd_none(*pgd)) in sync_global_pgds_l5()
159 BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); in sync_global_pgds_l5()
161 if (pgd_none(*pgd)) in sync_global_pgds_l5()
162 set_pgd(pgd, *pgd_ref); in sync_global_pgds_l5()
191 pgd_t *pgd; in sync_global_pgds_l4() local
195 pgd = (pgd_t *)page_address(page) + pgd_index(addr); in sync_global_pgds_l4()
196 p4d = p4d_offset(pgd, addr); in sync_global_pgds_l4()
249 static p4d_t *fill_p4d(pgd_t *pgd, unsigned long vaddr) in fill_p4d() argument
251 if (pgd_none(*pgd)) { in fill_p4d()
253 pgd_populate(&init_mm, pgd, p4d); in fill_p4d()
254 if (p4d != p4d_offset(pgd, 0)) in fill_p4d()
256 p4d, p4d_offset(pgd, 0)); in fill_p4d()
258 return p4d_offset(pgd, vaddr); in fill_p4d()
327 pgd_t *pgd; in set_pte_vaddr() local
332 pgd = pgd_offset_k(vaddr); in set_pte_vaddr()
333 if (pgd_none(*pgd)) { in set_pte_vaddr()
339 p4d_page = p4d_offset(pgd, 0); in set_pte_vaddr()
345 pgd_t *pgd; in populate_extra_pmd() local
349 pgd = pgd_offset_k(vaddr); in populate_extra_pmd()
350 p4d = fill_p4d(pgd, vaddr); in populate_extra_pmd()
369 pgd_t *pgd; in __init_extra_mapping() local
379 pgd = pgd_offset_k((unsigned long)__va(phys)); in __init_extra_mapping()
380 if (pgd_none(*pgd)) { in __init_extra_mapping()
382 set_pgd(pgd, __pgd(__pa(p4d) | _KERNPG_TABLE | in __init_extra_mapping()
385 p4d = p4d_offset(pgd, (unsigned long)__va(phys)); in __init_extra_mapping()
748 pgd_t *pgd = pgd_offset_k(vaddr); in __kernel_physical_mapping_init() local
753 if (pgd_val(*pgd)) { in __kernel_physical_mapping_init()
754 p4d = (p4d_t *)pgd_page_vaddr(*pgd); in __kernel_physical_mapping_init()
768 pgd_populate_init(&init_mm, pgd, p4d, init); in __kernel_physical_mapping_init()
770 p4d_populate_init(&init_mm, p4d_offset(pgd, vaddr), in __kernel_physical_mapping_init()
1234 pgd_t *pgd; in remove_pagetable() local
1240 pgd = pgd_offset_k(addr); in remove_pagetable()
1241 if (!pgd_present(*pgd)) in remove_pagetable()
1244 p4d = p4d_offset(pgd, 0); in remove_pagetable()
1302 pgd_t *pgd = pgd_offset_k(addr); in preallocate_vmalloc_pages() local
1307 p4d = p4d_alloc(&init_mm, pgd, addr); in preallocate_vmalloc_pages()
1561 pgd_t *pgd; in register_page_bootmem_memmap() local
1571 pgd = pgd_offset_k(addr); in register_page_bootmem_memmap()
1572 if (pgd_none(*pgd)) { in register_page_bootmem_memmap()
1576 get_page_bootmem(section_nr, pgd_page(*pgd), MIX_SECTION_INFO); in register_page_bootmem_memmap()
1578 p4d = p4d_offset(pgd, addr); in register_page_bootmem_memmap()