Lines Matching refs:pte
3393 bool is_hugetlb_entry_migration(pte_t pte) in is_hugetlb_entry_migration() argument
3397 if (huge_pte_none(pte) || pte_present(pte)) in is_hugetlb_entry_migration()
3399 swp = pte_to_swp_entry(pte); in is_hugetlb_entry_migration()
3406 static int is_hugetlb_entry_hwpoisoned(pte_t pte) in is_hugetlb_entry_hwpoisoned() argument
3410 if (huge_pte_none(pte) || pte_present(pte)) in is_hugetlb_entry_hwpoisoned()
3412 swp = pte_to_swp_entry(pte); in is_hugetlb_entry_hwpoisoned()
3526 pte_t pte; in __unmap_hugepage_range() local
3567 pte = huge_ptep_get(ptep); in __unmap_hugepage_range()
3568 if (huge_pte_none(pte)) { in __unmap_hugepage_range()
3577 if (unlikely(!pte_present(pte))) { in __unmap_hugepage_range()
3583 page = pte_page(pte); in __unmap_hugepage_range()
3602 pte = huge_ptep_get_and_clear(mm, address, ptep); in __unmap_hugepage_range()
3604 if (huge_pte_dirty(pte)) in __unmap_hugepage_range()
3731 pte_t pte; in hugetlb_cow() local
3739 pte = huge_ptep_get(ptep); in hugetlb_cow()
3740 old_page = pte_page(pte); in hugetlb_cow()
3783 BUG_ON(huge_pte_none(pte)); in hugetlb_cow()
3785 BUG_ON(huge_pte_none(pte)); in hugetlb_cow()
3789 pte_same(huge_ptep_get(ptep), pte))) in hugetlb_cow()
3825 if (likely(ptep && pte_same(huge_ptep_get(ptep), pte))) { in hugetlb_cow()
4399 pte_t *pte; in follow_hugetlb_page() local
4420 pte = huge_pte_offset(mm, vaddr & huge_page_mask(h), in follow_hugetlb_page()
4422 if (pte) in follow_hugetlb_page()
4423 ptl = huge_pte_lock(h, mm, pte); in follow_hugetlb_page()
4424 absent = !pte || huge_pte_none(huge_ptep_get(pte)); in follow_hugetlb_page()
4435 if (pte) in follow_hugetlb_page()
4451 if (absent || is_swap_pte(huge_ptep_get(pte)) || in follow_hugetlb_page()
4453 !huge_pte_write(huge_ptep_get(pte)))) { in follow_hugetlb_page()
4457 if (pte) in follow_hugetlb_page()
4497 page = pte_page(huge_ptep_get(pte)); in follow_hugetlb_page()
4559 pte_t pte; in hugetlb_change_protection() local
4591 pte = huge_ptep_get(ptep); in hugetlb_change_protection()
4592 if (unlikely(is_hugetlb_entry_hwpoisoned(pte))) { in hugetlb_change_protection()
4596 if (unlikely(is_hugetlb_entry_migration(pte))) { in hugetlb_change_protection()
4597 swp_entry_t entry = pte_to_swp_entry(pte); in hugetlb_change_protection()
4611 if (!huge_pte_none(pte)) { in hugetlb_change_protection()
4615 pte = pte_mkhuge(huge_pte_modify(old_pte, newprot)); in hugetlb_change_protection()
4616 pte = arch_make_huge_pte(pte, vma, NULL, 0); in hugetlb_change_protection()
4617 huge_ptep_modify_prot_commit(vma, address, ptep, old_pte, pte); in hugetlb_change_protection()
4888 pte_t *pte; in huge_pmd_share() local
4923 pte = (pte_t *)pmd_alloc(mm, pud, addr); in huge_pmd_share()
4925 return pte; in huge_pmd_share()
4982 pte_t *pte = NULL; in huge_pte_alloc() local
4991 pte = (pte_t *)pud; in huge_pte_alloc()
4995 pte = huge_pmd_share(mm, addr, pud); in huge_pte_alloc()
4997 pte = (pte_t *)pmd_alloc(mm, pud, addr); in huge_pte_alloc()
5000 BUG_ON(pte && pte_present(*pte) && !pte_huge(*pte)); in huge_pte_alloc()
5002 return pte; in huge_pte_alloc()
5073 pte_t pte; in follow_huge_pmd() local
5083 pte = huge_ptep_get((pte_t *)pmd); in follow_huge_pmd()
5084 if (pte_present(pte)) { in follow_huge_pmd()
5089 if (is_hugetlb_entry_migration(pte)) { in follow_huge_pmd()