Lines Matching refs:pte
556 static void smaps_pte_entry(pte_t *pte, unsigned long addr, in smaps_pte_entry() argument
565 if (pte_present(*pte)) { in smaps_pte_entry()
566 page = vm_normal_page(vma, addr, *pte); in smaps_pte_entry()
567 young = pte_young(*pte); in smaps_pte_entry()
568 dirty = pte_dirty(*pte); in smaps_pte_entry()
569 } else if (is_swap_pte(*pte)) { in smaps_pte_entry()
570 swp_entry_t swpent = pte_to_swp_entry(*pte); in smaps_pte_entry()
591 && pte_none(*pte))) { in smaps_pte_entry()
651 pte_t *pte; in smaps_pte_range() local
668 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); in smaps_pte_range()
669 for (; addr != end; pte++, addr += PAGE_SIZE) in smaps_pte_range()
670 smaps_pte_entry(pte, addr, walk); in smaps_pte_range()
671 pte_unmap_unlock(pte - 1, ptl); in smaps_pte_range()
758 static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask, in smaps_hugetlb_range() argument
766 if (pte_present(*pte)) { in smaps_hugetlb_range()
767 page = vm_normal_page(vma, addr, *pte); in smaps_hugetlb_range()
768 } else if (is_swap_pte(*pte)) { in smaps_hugetlb_range()
769 swp_entry_t swpent = pte_to_swp_entry(*pte); in smaps_hugetlb_range()
777 if (page_mapcount(page) >= 2 || hugetlb_pmd_shared(pte)) in smaps_hugetlb_range()
1121 static inline bool pte_is_pinned(struct vm_area_struct *vma, unsigned long addr, pte_t pte) in pte_is_pinned() argument
1125 if (!pte_write(pte)) in pte_is_pinned()
1131 page = vm_normal_page(vma, addr, pte); in pte_is_pinned()
1138 unsigned long addr, pte_t *pte) in clear_soft_dirty() argument
1146 pte_t ptent = *pte; in clear_soft_dirty()
1153 old_pte = ptep_modify_prot_start(vma, addr, pte); in clear_soft_dirty()
1156 ptep_modify_prot_commit(vma, addr, pte, old_pte, ptent); in clear_soft_dirty()
1159 set_pte_at(vma->vm_mm, addr, pte, ptent); in clear_soft_dirty()
1164 unsigned long addr, pte_t *pte) in clear_soft_dirty() argument
1204 pte_t *pte, ptent; in clear_refs_pte_range() local
1232 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); in clear_refs_pte_range()
1233 for (; addr != end; pte++, addr += PAGE_SIZE) { in clear_refs_pte_range()
1234 ptent = *pte; in clear_refs_pte_range()
1237 clear_soft_dirty(vma, addr, pte); in clear_refs_pte_range()
1249 ptep_test_and_clear_young(vma, addr, pte); in clear_refs_pte_range()
1253 pte_unmap_unlock(pte - 1, ptl); in clear_refs_pte_range()
1448 struct vm_area_struct *vma, unsigned long addr, pte_t pte) in pte_to_pagemap_entry() argument
1454 if (pte_present(pte)) { in pte_to_pagemap_entry()
1456 frame = pte_pfn(pte); in pte_to_pagemap_entry()
1458 page = vm_normal_page(vma, addr, pte); in pte_to_pagemap_entry()
1459 if (pte_soft_dirty(pte)) in pte_to_pagemap_entry()
1461 } else if (is_swap_pte(pte)) { in pte_to_pagemap_entry()
1463 if (pte_swp_soft_dirty(pte)) in pte_to_pagemap_entry()
1465 entry = pte_to_swp_entry(pte); in pte_to_pagemap_entry()
1495 pte_t *pte, *orig_pte; in pagemap_pmd_range() local
1567 orig_pte = pte = pte_offset_map_lock(walk->mm, pmdp, addr, &ptl); in pagemap_pmd_range()
1568 for (; addr < end; pte++, addr += PAGE_SIZE) { in pagemap_pmd_range()
1571 pme = pte_to_pagemap_entry(pm, vma, addr, *pte); in pagemap_pmd_range()
1593 pte_t pte; in pagemap_hugetlb_range() local
1598 pte = huge_ptep_get(ptep); in pagemap_hugetlb_range()
1599 if (pte_present(pte)) { in pagemap_hugetlb_range()
1600 struct page *page = pte_page(pte); in pagemap_hugetlb_range()
1610 frame = pte_pfn(pte) + in pagemap_hugetlb_range()
1826 static struct page *can_gather_numa_stats(pte_t pte, struct vm_area_struct *vma, in can_gather_numa_stats() argument
1832 if (!pte_present(pte)) in can_gather_numa_stats()
1835 page = vm_normal_page(vma, addr, pte); in can_gather_numa_stats()
1882 pte_t *pte; in gather_pte_stats() local
1900 orig_pte = pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl); in gather_pte_stats()
1902 struct page *page = can_gather_numa_stats(*pte, vma, addr); in gather_pte_stats()
1905 gather_stats(page, md, pte_dirty(*pte), 1); in gather_pte_stats()
1907 } while (pte++, addr += PAGE_SIZE, addr != end); in gather_pte_stats()
1913 static int gather_hugetlb_stats(pte_t *pte, unsigned long hmask, in gather_hugetlb_stats() argument
1916 pte_t huge_pte = huge_ptep_get(pte); in gather_hugetlb_stats()
1933 static int gather_hugetlb_stats(pte_t *pte, unsigned long hmask, in gather_hugetlb_stats() argument