| /linux/arch/powerpc/mm/book3s64/ |
| H A D | hash_64k.c | 46 unsigned long old_pte, new_pte, subpg_pte; in __hash_page_4K() local 56 old_pte = pte_val(pte); in __hash_page_4K() 58 if (unlikely(old_pte & H_PAGE_BUSY)) in __hash_page_4K() 61 if (unlikely(!check_pte_access(access, old_pte))) in __hash_page_4K() 68 new_pte = old_pte | H_PAGE_BUSY | _PAGE_ACCESSED | H_PAGE_COMBO; in __hash_page_4K() 71 } while (!pte_xchg(ptep, __pte(old_pte), __pte(new_pte))); in __hash_page_4K() 86 rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap); in __hash_page_4K() 91 rpte = __real_pte(__pte(old_pte), ptep, PTRS_PER_PTE); in __hash_page_4K() 95 if (!(old_pte & H_PAGE_HASHPTE)) in __hash_page_4K() 101 if (!(old_pte & H_PAGE_COMBO)) { in __hash_page_4K() [all …]
|
| H A D | hash_4k.c | 28 unsigned long old_pte, new_pte; in __hash_page_4K() local 38 old_pte = pte_val(pte); in __hash_page_4K() 40 if (unlikely(old_pte & H_PAGE_BUSY)) in __hash_page_4K() 43 if (unlikely(!check_pte_access(access, old_pte))) in __hash_page_4K() 50 new_pte = old_pte | H_PAGE_BUSY | _PAGE_ACCESSED; in __hash_page_4K() 53 } while (!pte_xchg(ptep, __pte(old_pte), __pte(new_pte))); in __hash_page_4K() 60 rpte = __real_pte(__pte(old_pte), ptep, PTRS_PER_PTE); in __hash_page_4K() 64 rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap); in __hash_page_4K() 67 if (unlikely(old_pte & H_PAGE_HASHPTE)) { in __hash_page_4K() 76 old_pte &= ~_PAGE_HPTEFLAGS; in __hash_page_4K() [all …]
|
| H A D | radix_hugetlbpage.c | 47 pte_t old_pte, pte_t pte) in radix__huge_ptep_modify_prot_commit() argument 58 is_pte_rw_upgrade(pte_val(old_pte), pte_val(pte)) && in radix__huge_ptep_modify_prot_commit()
|
| /linux/arch/powerpc/include/asm/book3s/64/ |
| H A D | radix.h | 152 pte_t old_pte, pte_t pte); 178 unsigned long old_pte; in radix__pte_update() local 180 old_pte = __radix_pte_update(ptep, clr, set); in radix__pte_update() 184 return old_pte; in radix__pte_update() 191 unsigned long old_pte; in radix__ptep_get_and_clear_full() local 194 old_pte = pte_val(*ptep); in radix__ptep_get_and_clear_full() 197 old_pte = radix__pte_update(mm, addr, ptep, ~0ul, 0, 0); in radix__ptep_get_and_clear_full() 199 return __pte(old_pte); in radix__ptep_get_and_clear_full()
|
| /linux/arch/parisc/mm/ |
| H A D | hugetlbpage.c | 143 pte_t old_pte; in huge_ptep_set_wrprotect() local 145 old_pte = *ptep; in huge_ptep_set_wrprotect() 146 __set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); in huge_ptep_set_wrprotect()
|
| /linux/arch/riscv/kvm/ |
| H A D | mmu.c | 559 pte_t old_pte, new_pte; in kvm_riscv_mmu_dirty_log_write_fault_fast() local 583 old_pte = ptep_get(ptep); in kvm_riscv_mmu_dirty_log_write_fault_fast() 584 if (!(pte_val(old_pte) & _PAGE_LEAF)) { in kvm_riscv_mmu_dirty_log_write_fault_fast() 594 if ((pte_val(old_pte) & (_PAGE_WRITE | _PAGE_DIRTY)) == in kvm_riscv_mmu_dirty_log_write_fault_fast() 596 new_pte = old_pte; in kvm_riscv_mmu_dirty_log_write_fault_fast() 601 new_pte = pte_mkdirty(pte_mkwrite_novma(old_pte)); in kvm_riscv_mmu_dirty_log_write_fault_fast() 604 ptep, old_pte, new_pte)) { in kvm_riscv_mmu_dirty_log_write_fault_fast()
|
| /linux/mm/ |
| H A D | migrate.c | 300 struct folio *folio, pte_t old_pte, unsigned long idx) in try_to_map_unused_to_zeropage() argument 310 VM_BUG_ON_PAGE(pte_present(old_pte), page); in try_to_map_unused_to_zeropage() 328 if (pte_swp_soft_dirty(old_pte)) in try_to_map_unused_to_zeropage() 330 if (pte_swp_uffd(old_pte)) in try_to_map_unused_to_zeropage() 334 if (pte_swp_uffd(old_pte) && userfaultfd_rwp(pvmw->vma)) in try_to_map_unused_to_zeropage() 362 pte_t old_pte; in remove_migration_pte() local 375 old_pte = huge_ptep_get(vma->vm_mm, pvmw.address, in remove_migration_pte() 378 old_pte = ptep_get(pvmw.pte); in remove_migration_pte() 380 entry = softleaf_from_pte(old_pte); in remove_migration_pte() 385 try_to_map_unused_to_zeropage(&pvmw, folio, old_pte, idx)) in remove_migration_pte() [all …]
|
| H A D | mremap.c | 204 pte_t old_pte, pte; in move_ptes() local 271 old_pte = ptep_get(old_ptep); in move_ptes() 272 if (pte_none(old_pte)) in move_ptes() 286 if (pte_present(old_pte)) { in move_ptes() 288 old_pte, max_nr_ptes); in move_ptes()
|
| H A D | rmap.c | 2122 static pte_t swp_pte_prepare(swp_entry_t entry, pte_t old_pte, in swp_pte_prepare() argument 2130 if (likely(pte_present(old_pte))) { in swp_pte_prepare() 2131 if (pte_soft_dirty(old_pte)) in swp_pte_prepare() 2133 if (pte_uffd(old_pte)) in swp_pte_prepare() 2137 if (pte_swp_soft_dirty(old_pte)) in swp_pte_prepare() 2139 if (pte_swp_uffd(old_pte)) in swp_pte_prepare()
|
| H A D | swapfile.c | 2425 pte_t *pte, new_pte, old_pte; in unuse_pte() local 2456 old_pte = ptep_get(pte); in unuse_pte() 2491 if (pte_swp_exclusive(old_pte)) in unuse_pte() 2510 if (pte_swp_soft_dirty(old_pte)) in unuse_pte() 2512 if (pte_swp_uffd(old_pte)) in unuse_pte() 2516 if (pte_swp_uffd(old_pte) && userfaultfd_rwp(vma)) in unuse_pte()
|
| H A D | memory.c | 6199 pte_t pte, old_pte; in numa_rebuild_single_mapping() local 6201 old_pte = ptep_modify_prot_start(vma, fault_addr, fault_pte); in numa_rebuild_single_mapping() 6202 pte = pte_modify(old_pte, vma->vm_page_prot); in numa_rebuild_single_mapping() 6206 ptep_modify_prot_commit(vma, fault_addr, fault_pte, old_pte, pte); in numa_rebuild_single_mapping() 6297 pte_t pte, old_pte; in do_numa_page() local 6306 old_pte = ptep_get(vmf->pte); in do_numa_page() 6308 if (unlikely(!pte_same(old_pte, vmf->orig_pte))) { in do_numa_page() 6313 pte = pte_modify(old_pte, vma->vm_page_prot); in do_numa_page()
|
| H A D | hugetlb.c | 5751 pte_t *ptep, pte_t old_pte) in hugetlb_pte_stable() argument 5757 same = pte_same(huge_ptep_get(mm, addr, ptep), old_pte); in hugetlb_pte_stable() 6617 pte_t old_pte; in hugetlb_change_protection() local 6624 old_pte = huge_ptep_modify_prot_start(vma, address, ptep); in hugetlb_change_protection() 6625 pte = huge_pte_modify(old_pte, newprot); in hugetlb_change_protection() 6638 huge_ptep_modify_prot_commit(vma, address, ptep, old_pte, pte); in hugetlb_change_protection()
|
| /linux/arch/powerpc/include/asm/nohash/ |
| H A D | pgtable.h | 127 pte_t old_pte = __pte(pte_update(mm, addr, ptep, ~0UL, 0, 0)); in ptep_get_and_clear() local 129 page_table_check_pte_clear(mm, addr, old_pte); in ptep_get_and_clear() 131 return old_pte; in ptep_get_and_clear()
|
| /linux/arch/powerpc/include/asm/book3s/32/ |
| H A D | pgtable.h | 315 pte_t old_pte = __pte(pte_update(mm, addr, ptep, ~_PAGE_HASHPTE, 0, 0)); in ptep_get_and_clear() local 317 page_table_check_pte_clear(mm, addr, old_pte); in ptep_get_and_clear() 319 return old_pte; in ptep_get_and_clear()
|
| /linux/kernel/bpf/ |
| H A D | arena.c | 213 pte_t old_pte; in apply_range_clear_cb() local 220 old_pte = ptep_get_and_clear(&init_mm, addr, pte); in apply_range_clear_cb() 221 if (pte_none(old_pte) || !pte_present(old_pte)) in apply_range_clear_cb() 224 page = pte_page(old_pte); in apply_range_clear_cb()
|
| /linux/arch/x86/include/asm/ |
| H A D | pgtable.h | 1279 pte_t old_pte, new_pte; in ptep_set_wrprotect() local 1281 old_pte = READ_ONCE(*ptep); in ptep_set_wrprotect() 1283 new_pte = pte_wrprotect(old_pte); in ptep_set_wrprotect() 1284 } while (!try_cmpxchg((long *)&ptep->pte, (long *)&old_pte, *(long *)&new_pte)); in ptep_set_wrprotect() 1293 pte_t old_pte = __pte(0); in ptep_try_set() local 1295 return try_cmpxchg((long *)&ptep->pte, (long *)&old_pte, *(long *)&new_pte); in ptep_try_set()
|
| /linux/fs/proc/ |
| H A D | task_mmu.c | 1723 pte_t old_pte; in clear_soft_dirty() local 1727 old_pte = ptep_modify_prot_start(vma, addr, pte); in clear_soft_dirty() 1728 ptent = pte_wrprotect(old_pte); in clear_soft_dirty() 1730 ptep_modify_prot_commit(vma, addr, pte, old_pte, ptent); in clear_soft_dirty() 2507 pte_t old_pte; in make_uffd_wp_pte() local 2509 old_pte = ptep_modify_prot_start(vma, addr, pte); in make_uffd_wp_pte() 2510 ptent = pte_mkuffd(old_pte); in make_uffd_wp_pte() 2511 ptep_modify_prot_commit(vma, addr, pte, old_pte, ptent); in make_uffd_wp_pte() 2657 pte_t old_pte, new_pte; in make_uffd_wp_huge_pte() local 2659 old_pte = huge_ptep_modify_prot_start(vma, addr, ptep); in make_uffd_wp_huge_pte() [all …]
|
| /linux/arch/x86/mm/pat/ |
| H A D | set_memory.c | 1880 pte_t *kpte, old_pte; in __change_page_attr() local 1889 old_pte = *kpte; in __change_page_attr() 1890 if (pte_none(old_pte)) in __change_page_attr() 1895 pgprot_t old_prot = pte_pgprot(old_pte); in __change_page_attr() 1896 pgprot_t new_prot = pte_pgprot(old_pte); in __change_page_attr() 1897 unsigned long pfn = pte_pfn(old_pte); in __change_page_attr() 1922 if (pte_val(old_pte) != pte_val(new_pte)) { in __change_page_attr()
|
| /linux/arch/arm64/mm/ |
| H A D | mmu.c | 166 pte_t old_pte = __ptep_get(ptep); in init_pte() local 178 BUG_ON(!pgattr_change_is_safe(pte_val(old_pte), in init_pte() 2311 pte_t *ptep, pte_t old_pte, pte_t pte, in modify_prot_commit_ptes() argument 2318 pte_t old_pte, pte_t pte) in ptep_modify_prot_commit() argument 2320 modify_prot_commit_ptes(vma, addr, ptep, old_pte, pte, 1); in ptep_modify_prot_commit()
|
| H A D | hugetlbpage.c | 534 pte_t old_pte, pte_t pte) in huge_ptep_modify_prot_commit() argument
|
| /linux/arch/s390/mm/ |
| H A D | pgtable.c | 176 pte_t *ptep, pte_t old_pte, pte_t pte) in ptep_modify_prot_commit() argument
|