Lines Matching defs:pmd
85 struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr,
97 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
302 * thp is handled differently when split by erasing the pmd so far.
324 * When {pte|pmd|...}_alloc() failed we treat it the same way as pgtable
328 #define change_pmd_prepare(vma, pmd, cp_flags) \
332 if (pte_alloc(vma->vm_mm, pmd)) \
341 * while {pmd|pud|p4d}_alloc() returns the valid pointer on success.
358 pmd_t *pmd;
366 pmd = pmd_offset(pud, addr);
373 ret = change_pmd_prepare(vma, pmd, cp_flags);
379 if (pmd_none(*pmd))
382 /* invoke the mmu notifier if the pmd is populated */
390 _pmd = pmdp_get_lockless(pmd);
394 __split_huge_pmd(vma, pmd, addr, false, NULL);
396 * For file-backed, the pmd could have been
397 * cleared; make sure pmd populated if
400 ret = change_pmd_prepare(vma, pmd, cp_flags);
406 ret = change_huge_pmd(tlb, vma, pmd,
414 /* huge pmd was handled */
418 /* fall through, the trans huge pmd just split */
421 ret = change_pte_range(tlb, vma, pmd, addr, next, newprot,
428 } while (pmd++, addr = next, addr != end);
449 ret = change_prepare(vma, pud, pmd, addr, cp_flags);