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()
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()
1224 pgd_t *pgd; in remove_pagetable() local
1230 pgd = pgd_offset_k(addr); in remove_pagetable()
1231 if (!pgd_present(*pgd)) in remove_pagetable()
1234 p4d = p4d_offset(pgd, 0); in remove_pagetable()
1292 pgd_t *pgd = pgd_offset_k(addr); in preallocate_vmalloc_pages() local
1297 p4d = p4d_alloc(&init_mm, pgd, addr); in preallocate_vmalloc_pages()
1422 pgd_t *pgd; in kern_addr_valid() local
1431 pgd = pgd_offset_k(addr); in kern_addr_valid()
1432 if (pgd_none(*pgd)) in kern_addr_valid()
1435 p4d = p4d_offset(pgd, addr); in kern_addr_valid()
1541 pgd_t *pgd; in vmemmap_populate_hugepages() local
1549 pgd = vmemmap_pgd_populate(addr, node); in vmemmap_populate_hugepages()
1550 if (!pgd) in vmemmap_populate_hugepages()
1553 p4d = vmemmap_p4d_populate(pgd, addr, node); in vmemmap_populate_hugepages()
1634 pgd_t *pgd; in register_page_bootmem_memmap() local
1644 pgd = pgd_offset_k(addr); in register_page_bootmem_memmap()
1645 if (pgd_none(*pgd)) { in register_page_bootmem_memmap()
1649 get_page_bootmem(section_nr, pgd_page(*pgd), MIX_SECTION_INFO); in register_page_bootmem_memmap()
1651 p4d = p4d_offset(pgd, addr); in register_page_bootmem_memmap()