Lines Matching refs:pgd

74 DEFINE_POPULATE(pgd_populate, pgd, p4d, init)
145 pgd_t *pgd; in sync_global_pgds_l5() local
148 pgd = (pgd_t *)page_address(page) + pgd_index(addr); in sync_global_pgds_l5()
153 if (!pgd_none(*pgd_ref) && !pgd_none(*pgd)) in sync_global_pgds_l5()
154 BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); in sync_global_pgds_l5()
156 if (pgd_none(*pgd)) in sync_global_pgds_l5()
157 set_pgd(pgd, *pgd_ref); in sync_global_pgds_l5()
186 pgd_t *pgd; in sync_global_pgds_l4() local
190 pgd = (pgd_t *)page_address(page) + pgd_index(addr); in sync_global_pgds_l4()
191 p4d = p4d_offset(pgd, addr); in sync_global_pgds_l4()
244 static p4d_t *fill_p4d(pgd_t *pgd, unsigned long vaddr) in fill_p4d() argument
246 if (pgd_none(*pgd)) { in fill_p4d()
248 pgd_populate(&init_mm, pgd, p4d); in fill_p4d()
249 if (p4d != p4d_offset(pgd, 0)) in fill_p4d()
251 p4d, p4d_offset(pgd, 0)); in fill_p4d()
253 return p4d_offset(pgd, vaddr); in fill_p4d()
322 pgd_t *pgd; in set_pte_vaddr() local
327 pgd = pgd_offset_k(vaddr); in set_pte_vaddr()
328 if (pgd_none(*pgd)) { in set_pte_vaddr()
334 p4d_page = p4d_offset(pgd, 0); in set_pte_vaddr()
340 pgd_t *pgd; in populate_extra_pmd() local
344 pgd = pgd_offset_k(vaddr); in populate_extra_pmd()
345 p4d = fill_p4d(pgd, vaddr); in populate_extra_pmd()
364 pgd_t *pgd; in __init_extra_mapping() local
374 pgd = pgd_offset_k((unsigned long)__va(phys)); in __init_extra_mapping()
375 if (pgd_none(*pgd)) { in __init_extra_mapping()
377 set_pgd(pgd, __pgd(__pa(p4d) | _KERNPG_TABLE | in __init_extra_mapping()
380 p4d = p4d_offset(pgd, (unsigned long)__va(phys)); in __init_extra_mapping()
740 pgd_t *pgd = pgd_offset_k(vaddr); in __kernel_physical_mapping_init() local
745 if (pgd_val(*pgd)) { in __kernel_physical_mapping_init()
746 p4d = (p4d_t *)pgd_page_vaddr(*pgd); in __kernel_physical_mapping_init()
760 pgd_populate_init(&init_mm, pgd, p4d, init); in __kernel_physical_mapping_init()
762 p4d_populate_init(&init_mm, p4d_offset(pgd, vaddr), in __kernel_physical_mapping_init()
1223 pgd_t *pgd; in remove_pagetable() local
1229 pgd = pgd_offset_k(addr); in remove_pagetable()
1230 if (!pgd_present(*pgd)) in remove_pagetable()
1233 p4d = p4d_offset(pgd, 0); in remove_pagetable()
1291 pgd_t *pgd = pgd_offset_k(addr); in preallocate_vmalloc_pages() local
1296 p4d = p4d_alloc(&init_mm, pgd, addr); in preallocate_vmalloc_pages()
1421 pgd_t *pgd; in kern_addr_valid() local
1430 pgd = pgd_offset_k(addr); in kern_addr_valid()
1431 if (pgd_none(*pgd)) in kern_addr_valid()
1434 p4d = p4d_offset(pgd, addr); in kern_addr_valid()
1540 pgd_t *pgd; in vmemmap_populate_hugepages() local
1548 pgd = vmemmap_pgd_populate(addr, node); in vmemmap_populate_hugepages()
1549 if (!pgd) in vmemmap_populate_hugepages()
1552 p4d = vmemmap_p4d_populate(pgd, addr, node); in vmemmap_populate_hugepages()
1633 pgd_t *pgd; in register_page_bootmem_memmap() local
1643 pgd = pgd_offset_k(addr); in register_page_bootmem_memmap()
1644 if (pgd_none(*pgd)) { in register_page_bootmem_memmap()
1648 get_page_bootmem(section_nr, pgd_page(*pgd), MIX_SECTION_INFO); in register_page_bootmem_memmap()
1650 p4d = p4d_offset(pgd, addr); in register_page_bootmem_memmap()