Lines Matching refs:pmd

153 static int __ref modify_pte_table(pmd_t *pmd, unsigned long addr,  in modify_pte_table()  argument
164 pte = pte_offset_kernel(pmd, addr); in modify_pte_table()
194 static void try_free_pte_table(pmd_t *pmd, unsigned long start) in try_free_pte_table() argument
200 pte = pte_offset_kernel(pmd, start); in try_free_pte_table()
205 vmem_pte_free((unsigned long *) pmd_deref(*pmd)); in try_free_pte_table()
206 pmd_clear(pmd); in try_free_pte_table()
215 pmd_t *pmd; in modify_pmd_table() local
222 pmd = pmd_offset(pud, addr); in modify_pmd_table()
223 for (; addr < end; addr = next, pmd++) { in modify_pmd_table()
226 if (pmd_none(*pmd)) in modify_pmd_table()
228 if (pmd_large(*pmd)) { in modify_pmd_table()
232 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE)); in modify_pmd_table()
233 pmd_clear(pmd); in modify_pmd_table()
236 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE)); in modify_pmd_table()
237 pmd_clear(pmd); in modify_pmd_table()
241 } else if (pmd_none(*pmd)) { in modify_pmd_table()
246 set_pmd(pmd, __pmd(__pa(addr) | prot)); in modify_pmd_table()
261 set_pmd(pmd, __pmd(__pa(new_page) | prot)); in modify_pmd_table()
272 pmd_populate(&init_mm, pmd, pte); in modify_pmd_table()
273 } else if (pmd_large(*pmd)) { in modify_pmd_table()
278 ret = modify_pte_table(pmd, addr, next, add, direct); in modify_pmd_table()
282 try_free_pte_table(pmd, addr & PMD_MASK); in modify_pmd_table()
293 pmd_t *pmd; in try_free_pmd_table() local
296 pmd = pmd_offset(pud, start); in try_free_pmd_table()
297 for (i = 0; i < PTRS_PER_PMD; i++, pmd++) in try_free_pmd_table()
298 if (!pmd_none(*pmd)) in try_free_pmd_table()
310 pmd_t *pmd; in modify_pud_table() local
338 pmd = vmem_crst_alloc(_SEGMENT_ENTRY_EMPTY); in modify_pud_table()
339 if (!pmd) in modify_pud_table()
341 pud_populate(&init_mm, pud, pmd); in modify_pud_table()
556 pmd_t *pmd; in vmem_get_alloc_pte() local
581 pmd = vmem_crst_alloc(_SEGMENT_ENTRY_EMPTY); in vmem_get_alloc_pte()
582 if (!pmd) in vmem_get_alloc_pte()
584 pud_populate(&init_mm, pud, pmd); in vmem_get_alloc_pte()
588 pmd = pmd_offset(pud, addr); in vmem_get_alloc_pte()
589 if (pmd_none(*pmd)) { in vmem_get_alloc_pte()
595 pmd_populate(&init_mm, pmd, pte); in vmem_get_alloc_pte()
596 } else if (WARN_ON_ONCE(pmd_large(*pmd))) { in vmem_get_alloc_pte()
599 ptep = pte_offset_kernel(pmd, addr); in vmem_get_alloc_pte()