Lines Matching refs:pmd

75 DEFINE_POPULATE(pud_populate, pud, pmd, init)
76 DEFINE_POPULATE(pmd_populate_kernel, pmd, pte, init)
90 DEFINE_ENTRY(pmd, pmd, init)
271 pmd_t *pmd = (pmd_t *) spp_getpage(); in fill_pmd() local
272 pud_populate(&init_mm, pud, pmd); in fill_pmd()
273 if (pmd != pmd_offset(pud, 0)) in fill_pmd()
275 pmd, pmd_offset(pud, 0)); in fill_pmd()
280 static pte_t *fill_pte(pmd_t *pmd, unsigned long vaddr) in fill_pte() argument
282 if (pmd_none(*pmd)) { in fill_pte()
284 pmd_populate_kernel(&init_mm, pmd, pte); in fill_pte()
285 if (pte != pte_offset_kernel(pmd, 0)) in fill_pte()
288 return pte_offset_kernel(pmd, vaddr); in fill_pte()
293 pmd_t *pmd = fill_pmd(pud, vaddr); in __set_pte_vaddr() local
294 pte_t *pte = fill_pte(pmd, vaddr); in __set_pte_vaddr()
352 pmd_t *pmd; in populate_extra_pte() local
354 pmd = populate_extra_pmd(vaddr); in populate_extra_pte()
355 return fill_pte(pmd, vaddr); in populate_extra_pte()
367 pmd_t *pmd; in __init_extra_mapping() local
388 pmd = (pmd_t *) spp_getpage(); in __init_extra_mapping()
389 set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | in __init_extra_mapping()
392 pmd = pmd_offset(pud, phys); in __init_extra_mapping()
393 BUG_ON(!pmd_none(*pmd)); in __init_extra_mapping()
394 set_pmd(pmd, __pmd(phys | pgprot_val(prot))); in __init_extra_mapping()
426 pmd_t *pmd = level2_kernel_pgt; in cleanup_highmap() local
436 for (; vaddr + PMD_SIZE - 1 < vaddr_end; pmd++, vaddr += PMD_SIZE) { in cleanup_highmap()
437 if (pmd_none(*pmd)) in cleanup_highmap()
440 set_pmd(pmd, __pmd(0)); in cleanup_highmap()
512 pmd_t *pmd = pmd_page + pmd_index(paddr); in phys_pmd_init() local
523 set_pmd_init(pmd, __pmd(0), init); in phys_pmd_init()
527 if (!pmd_none(*pmd)) { in phys_pmd_init()
528 if (!pmd_large(*pmd)) { in phys_pmd_init()
530 pte = (pte_t *)pmd_page_vaddr(*pmd); in phys_pmd_init()
555 new_prot = pte_pgprot(pte_clrhuge(*(pte_t *)pmd)); in phys_pmd_init()
561 set_pte_init((pte_t *)pmd, in phys_pmd_init()
574 pmd_populate_kernel_init(&init_mm, pmd, pte, init); in phys_pmd_init()
598 pmd_t *pmd; in phys_pud_init() local
617 pmd = pmd_offset(pud, 0); in phys_pud_init()
618 paddr_last = phys_pmd_init(pmd, paddr, in phys_pud_init()
660 pmd = alloc_low_page(); in phys_pud_init()
661 paddr_last = phys_pmd_init(pmd, paddr, paddr_end, in phys_pud_init()
665 pud_populate_init(&init_mm, pud, pmd, init); in phys_pud_init()
1004 static void __meminit free_pte_table(pte_t *pte_start, pmd_t *pmd) in free_pte_table() argument
1016 free_pagetable(pmd_page(*pmd), 0); in free_pte_table()
1018 pmd_clear(pmd); in free_pte_table()
1024 pmd_t *pmd; in free_pmd_table() local
1028 pmd = pmd_start + i; in free_pmd_table()
1029 if (!pmd_none(*pmd)) in free_pmd_table()
1107 pmd_t *pmd; in remove_pmd_table() local
1109 pmd = pmd_start + pmd_index(addr); in remove_pmd_table()
1110 for (; addr < end; addr = next, pmd++) { in remove_pmd_table()
1113 if (!pmd_present(*pmd)) in remove_pmd_table()
1116 if (pmd_large(*pmd)) { in remove_pmd_table()
1120 free_hugepage_table(pmd_page(*pmd), in remove_pmd_table()
1124 pmd_clear(pmd); in remove_pmd_table()
1130 free_hugepage_table(pmd_page(*pmd), in remove_pmd_table()
1133 pmd_clear(pmd); in remove_pmd_table()
1140 pte_base = (pte_t *)pmd_page_vaddr(*pmd); in remove_pmd_table()
1142 free_pte_table(pte_base, pmd); in remove_pmd_table()
1424 pmd_t *pmd; in kern_addr_valid() local
1445 pmd = pmd_offset(pud, addr); in kern_addr_valid()
1446 if (!pmd_present(*pmd)) in kern_addr_valid()
1449 if (pmd_large(*pmd)) in kern_addr_valid()
1450 return pfn_valid(pmd_pfn(*pmd)); in kern_addr_valid()
1452 pte = pte_offset_kernel(pmd, addr); in kern_addr_valid()
1543 pmd_t *pmd; in vmemmap_populate_hugepages() local
1560 pmd = pmd_offset(pud, addr); in vmemmap_populate_hugepages()
1561 if (pmd_none(*pmd)) { in vmemmap_populate_hugepages()
1570 set_pmd(pmd, __pmd(pte_val(entry))); in vmemmap_populate_hugepages()
1592 } else if (pmd_large(*pmd)) { in vmemmap_populate_hugepages()
1593 vmemmap_verify((pte_t *)pmd, node, addr, next); in vmemmap_populate_hugepages()
1636 pmd_t *pmd; in register_page_bootmem_memmap() local
1666 pmd = pmd_offset(pud, addr); in register_page_bootmem_memmap()
1667 if (pmd_none(*pmd)) in register_page_bootmem_memmap()
1669 get_page_bootmem(section_nr, pmd_page(*pmd), in register_page_bootmem_memmap()
1672 pte = pte_offset_kernel(pmd, addr); in register_page_bootmem_memmap()
1680 pmd = pmd_offset(pud, addr); in register_page_bootmem_memmap()
1681 if (pmd_none(*pmd)) in register_page_bootmem_memmap()
1685 page = pmd_page(*pmd); in register_page_bootmem_memmap()