/openbmc/linux/arch/s390/mm/ |
H A D | pgtable.c | 93 old = *ptep; in ptep_flush_direct() 112 old = *ptep; in ptep_flush_lazy() 118 set_pte(ptep, set_pte_bit(*ptep, __pgprot(_PAGE_INVALID))); in ptep_flush_lazy() 593 pte_t *ptep; in pgtable_trans_huge_withdraw() local 608 ptep++; in pgtable_trans_huge_withdraw() 751 pte = *ptep; in ptep_zap_unused() 795 pte = *ptep; in ptep_test_and_clear_uc() 818 pte_t *ptep; in set_guest_storage_key() local 853 if (!ptep) in set_guest_storage_key() 960 if (!ptep) in reset_guest_reference_bit() [all …]
|
/openbmc/linux/arch/arm64/mm/ |
H A D | hugetlbpage.c | 115 if ((pte_t *)pmdp == ptep) { in find_num_contig() 151 pte_t huge_ptep_get(pte_t *ptep) in huge_ptep_get() argument 162 pte_t pte = ptep_get(ptep); in huge_ptep_get() 183 pte_t *ptep, in get_clear_contig() argument 209 pte_t *ptep, in get_clear_contig_flush() argument 231 pte_t *ptep, in clear_flush() argument 239 ptep_clear(mm, addr, ptep); in clear_flush() 283 pte_t *ptep = NULL; in huge_pte_alloc() local 292 ptep = (pte_t *)pudp; in huge_pte_alloc() 311 return ptep; in huge_pte_alloc() [all …]
|
/openbmc/linux/arch/riscv/mm/ |
H A D | hugetlbpage.c | 6 pte_t huge_ptep_get(pte_t *ptep) in huge_ptep_get() argument 18 pte_t pte = ptep_get(ptep); in huge_ptep_get() 150 pte_t *ptep, in get_clear_contig() argument 171 pte_t *ptep, in get_clear_contig_flush() argument 202 pte_t *ptep, in clear_flush() argument 225 pte_t *ptep, in set_huge_pte_at() argument 265 pte_t *ptep, in huge_ptep_set_access_flags() argument 296 pte_t *ptep) in huge_ptep_get_and_clear() argument 311 pte_t *ptep) in huge_ptep_set_wrprotect() argument 336 pte_t *ptep) in huge_ptep_clear_flush() argument [all …]
|
/openbmc/linux/arch/s390/include/asm/ |
H A D | hugetlb.h | 19 pte_t *ptep, pte_t pte, unsigned long sz); 21 pte_t *ptep, pte_t pte); 22 pte_t huge_ptep_get(pte_t *ptep); 24 unsigned long addr, pte_t *ptep); 49 pte_t *ptep, unsigned long sz) in huge_pte_clear() argument 52 set_pte(ptep, __pte(_REGION3_ENTRY_EMPTY)); in huge_pte_clear() 54 set_pte(ptep, __pte(_SEGMENT_ENTRY_EMPTY)); in huge_pte_clear() 58 unsigned long address, pte_t *ptep) in huge_ptep_clear_flush() argument 64 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 70 __set_huge_pte_at(vma->vm_mm, addr, ptep, pte); in huge_ptep_set_access_flags() [all …]
|
/openbmc/linux/drivers/iommu/ |
H A D | io-pgtable-dart.c | 195 dart_iopte pte, *ptep; in dart_get_l2() local 198 ptep = data->pgd[tbl]; in dart_get_l2() 199 if (!ptep) in dart_get_l2() 258 ptep = data->pgd[tbl]; in dart_map_pages() 283 ptep += map_idx_start; in dart_map_pages() 304 dart_iopte pte, *ptep; in dart_unmap_pages() local 312 if (WARN_ON(!ptep)) in dart_unmap_pages() 327 *ptep = 0; in dart_unmap_pages() 333 ptep++; in dart_unmap_pages() 349 if (!ptep) in dart_iova_to_phys() [all …]
|
/openbmc/linux/arch/sparc/include/asm/ |
H A D | hugetlb.h | 17 pte_t *ptep, pte_t pte, unsigned long sz); 19 pte_t *ptep, pte_t pte); 23 pte_t *ptep); 27 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 29 return *ptep; in huge_ptep_clear_flush() 34 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 36 pte_t old_pte = *ptep; in huge_ptep_set_wrprotect() 37 __set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); in huge_ptep_set_wrprotect() 42 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 45 int changed = !pte_same(*ptep, pte); in huge_ptep_set_access_flags() [all …]
|
/openbmc/linux/include/asm-generic/ |
H A D | hugetlb.h | 62 pte_t *ptep, unsigned long sz) in huge_pte_clear() argument 64 pte_clear(mm, addr, ptep); in huge_pte_clear() 79 pte_t *ptep, pte_t pte, unsigned long sz) in set_huge_pte_at() argument 81 set_pte_at(mm, addr, ptep, pte); in set_huge_pte_at() 87 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 95 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 97 return ptep_clear_flush(vma, addr, ptep); in huge_ptep_clear_flush() 131 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 133 ptep_set_wrprotect(mm, addr, ptep); in huge_ptep_set_wrprotect() 139 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument [all …]
|
/openbmc/linux/arch/xtensa/include/asm/ |
H A D | pgalloc.h | 24 #define pmd_populate_kernel(mm, pmdp, ptep) \ argument 25 (pmd_val(*(pmdp)) = ((unsigned long)ptep)) 35 static inline void ptes_clear(pte_t *ptep) in ptes_clear() argument 40 pte_clear(NULL, 0, ptep + i); in ptes_clear() 45 pte_t *ptep; in pte_alloc_one_kernel() local 47 ptep = (pte_t *)__pte_alloc_one_kernel(mm); in pte_alloc_one_kernel() 48 if (!ptep) in pte_alloc_one_kernel() 50 ptes_clear(ptep); in pte_alloc_one_kernel() 51 return ptep; in pte_alloc_one_kernel()
|
H A D | pgtable.h | 243 #define pte_clear(mm,addr,ptep) \ argument 296 *ptep = pteval; in update_pte() 307 update_pte(ptep, pte); in set_pte() 320 pte_t *ptep) in ptep_test_and_clear_young() argument 322 pte_t pte = *ptep; in ptep_test_and_clear_young() 325 update_pte(ptep, pte_mkold(pte)); in ptep_test_and_clear_young() 332 pte_t pte = *ptep; in ptep_get_and_clear() 333 pte_clear(mm, addr, ptep); in ptep_get_and_clear() 340 pte_t pte = *ptep; in ptep_set_wrprotect() 341 update_pte(ptep, pte_wrprotect(pte)); in ptep_set_wrprotect() [all …]
|
/openbmc/linux/tools/testing/selftests/kvm/lib/aarch64/ |
H A D | processor.c | 112 uint64_t *ptep; in _virt_pg_map() local 129 if (!*ptep) in _virt_pg_map() 135 if (!*ptep) in _virt_pg_map() 140 if (!*ptep) in _virt_pg_map() 168 if (!ptep) in virt_get_pte_hva() 174 if (!ptep) in virt_get_pte_hva() 179 if (!ptep) in virt_get_pte_hva() 184 if (!ptep) in virt_get_pte_hva() 191 return ptep; in virt_get_pte_hva() 216 if (!*ptep) in pte_dump() [all …]
|
/openbmc/linux/arch/parisc/mm/ |
H A D | hugetlbpage.c | 123 pte_t *ptep, pte_t entry) in __set_huge_pte_at() argument 132 set_pte(ptep, entry); in __set_huge_pte_at() 133 ptep++; in __set_huge_pte_at() 145 __set_huge_pte_at(mm, addr, ptep, entry); in set_huge_pte_at() 150 pte_t *ptep) in huge_ptep_get_and_clear() argument 154 entry = *ptep; in huge_ptep_get_and_clear() 162 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 166 old_pte = *ptep; in huge_ptep_set_wrprotect() 171 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 177 changed = !pte_same(*ptep, pte); in huge_ptep_set_access_flags() [all …]
|
/openbmc/linux/arch/powerpc/mm/ |
H A D | pageattr.c | 18 static pte_basic_t pte_update_delta(pte_t *ptep, unsigned long addr, in pte_update_delta() argument 21 return pte_update(&init_mm, addr, ptep, old & ~new, new & ~old, 0); in pte_update_delta() 30 static int change_page_attr(pte_t *ptep, unsigned long addr, void *data) in change_page_attr() argument 39 pte_update_delta(ptep, addr, _PAGE_KERNEL_RW & ~_PAGE_DIRTY, _PAGE_KERNEL_RO); in change_page_attr() 42 pte_update_delta(ptep, addr, _PAGE_KERNEL_RO, _PAGE_KERNEL_RW); in change_page_attr() 45 pte_update_delta(ptep, addr, _PAGE_KERNEL_ROX, _PAGE_KERNEL_RO); in change_page_attr() 48 pte_update_delta(ptep, addr, _PAGE_KERNEL_RO, _PAGE_KERNEL_ROX); in change_page_attr() 51 pte_update(&init_mm, addr, ptep, _PAGE_PRESENT, 0, 0); in change_page_attr() 54 pte_update(&init_mm, addr, ptep, 0, _PAGE_PRESENT, 0); in change_page_attr()
|
H A D | pgtable.c | 215 VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep)); in set_ptes() 218 __set_pte_at(mm, addr, ptep, pte, 0); in set_ptes() 221 ptep++; in set_ptes() 233 pte_t *ptep = pte_offset_kernel(pmdp, va); in unmap_kernel_page() local 235 pte_clear(&init_mm, va, ptep); in unmap_kernel_page() 247 pte_t *ptep, pte_t entry, int dirty) in ptep_set_access_flags() argument 251 changed = !pte_same(*(ptep), entry); in ptep_set_access_flags() 262 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 277 changed = !pte_same(*(ptep), pte); in huge_ptep_set_access_flags() 308 pte_basic_t *entry = (pte_basic_t *)ptep; in set_huge_pte_at() [all …]
|
/openbmc/linux/arch/riscv/kvm/ |
H A D | mmu.c | 100 pte_t *ptep; in gstage_get_leaf_entry() local 105 ptep = &ptep[gstage_pte_index(addr, current_level)]; in gstage_get_leaf_entry() 106 while (ptep && pte_val(ptep_get(ptep))) { in gstage_get_leaf_entry() 109 *ptepp = ptep; in gstage_get_leaf_entry() 116 ptep = (pte_t *)gstage_pte_page_vaddr(ptep_get(ptep)); in gstage_get_leaf_entry() 117 ptep = &ptep[gstage_pte_index(addr, current_level)]; in gstage_get_leaf_entry() 119 ptep = NULL; in gstage_get_leaf_entry() 273 pte_t *ptep; in gstage_unmap_range() local 308 pte_t *ptep; in gstage_wp_range() local 575 pte_t *ptep; in kvm_age_gfn() local [all …]
|
/openbmc/linux/arch/powerpc/include/asm/nohash/64/ |
H A D | pgtable.h | 180 unsigned long old = pte_val(*ptep); in pte_update() 181 *ptep = __pte((old & ~clr) | set); in pte_update() 200 if (!pte_young(*ptep)) in __ptep_test_and_clear_young() 215 pte_t *ptep) in ptep_set_wrprotect() argument 218 if ((pte_val(*ptep) & _PAGE_RW) == 0) in ptep_set_wrprotect() 226 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 228 if ((pte_val(*ptep) & _PAGE_RW) == 0) in huge_ptep_set_wrprotect() 251 pte_t * ptep) in pte_clear() argument 259 pte_t *ptep, pte_t entry, in __ptep_set_access_flags() argument 266 unsigned long old = pte_val(*ptep); in __ptep_set_access_flags() [all …]
|
/openbmc/linux/arch/powerpc/mm/book3s64/ |
H A D | hugetlbpage.c | 21 pte_t *ptep, unsigned long trap, unsigned long flags, in __hash_page_huge() argument 49 old_pte = pte_val(*ptep); in __hash_page_huge() 64 } while(!pte_xchg(ptep, __pte(old_pte), __pte(new_pte))); in __hash_page_huge() 75 rpte = __real_pte(__pte(old_pte), ptep, offset); in __hash_page_huge() 111 *ptep = __pte(old_pte); in __hash_page_huge() 117 new_pte |= pte_set_hidx(ptep, rpte, 0, slot, offset); in __hash_page_huge() 123 *ptep = __pte(new_pte & ~H_PAGE_BUSY); in __hash_page_huge() 129 unsigned long addr, pte_t *ptep) in huge_ptep_modify_prot_start() argument 137 pte_val = pte_update(vma->vm_mm, addr, ptep, in huge_ptep_modify_prot_start() 144 pte_t *ptep, pte_t old_pte, pte_t pte) in huge_ptep_modify_prot_commit() argument [all …]
|
/openbmc/linux/arch/arm64/include/asm/ |
H A D | hugetlb.h | 31 pte_t *ptep, pte_t pte, unsigned long sz); 34 unsigned long addr, pte_t *ptep, 38 unsigned long addr, pte_t *ptep); 41 unsigned long addr, pte_t *ptep); 44 unsigned long addr, pte_t *ptep); 47 pte_t *ptep, unsigned long sz); 49 extern pte_t huge_ptep_get(pte_t *ptep); 55 unsigned long addr, pte_t *ptep); 59 unsigned long addr, pte_t *ptep,
|
/openbmc/linux/arch/mips/include/asm/ |
H A D | hugetlb.h | 35 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 38 pte_t pte = *ptep; in huge_ptep_get_and_clear() 41 set_pte_at(mm, addr, ptep, clear); in huge_ptep_get_and_clear() 47 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 56 pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep); in huge_ptep_clear_flush() 71 pte_t *ptep, pte_t pte, in huge_ptep_set_access_flags() argument 74 int changed = !pte_same(*ptep, pte); in huge_ptep_set_access_flags() 77 set_pte_at(vma->vm_mm, addr, ptep, pte); in huge_ptep_set_access_flags()
|
/openbmc/linux/tools/testing/selftests/kvm/lib/riscv/ |
H A D | processor.c | 89 if (!*ptep) { in virt_arch_pg_map() 97 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + in virt_arch_pg_map() 115 uint64_t *ptep; in addr_arch_gva2gpa() local 122 if (!ptep) in addr_arch_gva2gpa() 127 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + in addr_arch_gva2gpa() 129 if (!ptep) in addr_arch_gva2gpa() 147 uint64_t pte, *ptep; in pte_dump() local 154 if (!*ptep) in pte_dump() 157 type[level], pte, *ptep, ptep); in pte_dump() 174 if (!*ptep) in virt_arch_dump() [all …]
|
/openbmc/linux/arch/loongarch/include/asm/ |
H A D | hugetlb.h | 34 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 37 pte_t pte = *ptep; in huge_ptep_get_and_clear() 40 set_pte_at(mm, addr, ptep, clear); in huge_ptep_get_and_clear() 46 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 50 pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep); in huge_ptep_clear_flush() 65 pte_t *ptep, pte_t pte, in huge_ptep_set_access_flags() argument 68 int changed = !pte_same(*ptep, pte); in huge_ptep_set_access_flags() 71 set_pte_at(vma->vm_mm, addr, ptep, pte); in huge_ptep_set_access_flags()
|
/openbmc/linux/arch/riscv/include/asm/ |
H A D | hugetlb.h | 22 pte_t *ptep, unsigned long sz); 26 unsigned long addr, pte_t *ptep, pte_t pte, 31 unsigned long addr, pte_t *ptep); 35 unsigned long addr, pte_t *ptep); 39 unsigned long addr, pte_t *ptep); 43 unsigned long addr, pte_t *ptep, 47 pte_t huge_ptep_get(pte_t *ptep);
|
/openbmc/linux/arch/powerpc/include/asm/book3s/64/ |
H A D | hash.h | 161 pte_t *ptep, unsigned long pte, int huge); 166 pte_t *ptep, unsigned long clr, in hash__pte_update() argument 181 : "=&r" (old_be), "=&r" (tmp_be), "=m" (*ptep) in hash__pte_update() 182 : "r" (ptep), "r" (cpu_to_be64(clr)), "m" (*ptep), in hash__pte_update() 191 hpte_need_flush(mm, addr, ptep, old, huge); in hash__pte_update() 199 static inline void hash__ptep_set_access_flags(pte_t *ptep, pte_t entry) in hash__ptep_set_access_flags() argument 215 :"=&r" (old), "=&r" (tmp), "=m" (*ptep) in hash__ptep_set_access_flags() 216 :"r" (val), "r" (ptep), "m" (*ptep), "r" (cpu_to_be64(H_PAGE_BUSY)) in hash__ptep_set_access_flags() 239 pte_t *ptep, pte_t pte, int percpu) in hash__set_pte_at() argument 245 *ptep = pte; in hash__set_pte_at()
|
/openbmc/linux/include/linux/ |
H A D | pgtable.h | 238 set_pte(ptep, pte); in set_ptes() 241 ptep++; in set_ptes() 247 #define set_pte_at(mm, addr, ptep, pte) set_ptes(mm, addr, ptep, pte, 1) argument 319 pte_t *ptep) in ptep_test_and_clear_young() argument 420 pte_t *ptep) in ptep_get_and_clear() argument 430 pte_t *ptep) in ptep_clear() argument 504 return ptep_get(ptep); in ptep_get_lockless() 611 pte_t *ptep); 851 WARN_ON_ONCE(pte_present(*ptep) && !pte_same(*ptep, pte)); \ 852 set_pte(ptep, pte); \ [all …]
|
/openbmc/linux/arch/x86/xen/ |
H A D | p2m.c | 217 pte_t *ptep; in xen_build_mfn_list_list() local 248 mfn = pte_mfn(*ptep); in xen_build_mfn_list_list() 249 ptep = (pte_t *)((unsigned long)ptep & ~(PAGE_SIZE - 1)); in xen_build_mfn_list_list() 255 if (ptep == p2m_missing_pte || ptep == p2m_identity_pte) { in xen_build_mfn_list_list() 333 pte_t *ptep; in xen_rebuild_p2m_list() local 382 set_pte(ptep, in xen_rebuild_p2m_list() 392 set_pte(ptep, in xen_rebuild_p2m_list() 434 pte_t *ptep; in get_phys_to_machine() local 545 if (!ptep) in xen_alloc_p2m_entry() 602 set_pte(ptep, in xen_alloc_p2m_entry() [all …]
|
/openbmc/linux/arch/parisc/include/asm/ |
H A D | hugetlb.h | 9 pte_t *ptep, pte_t pte, unsigned long sz); 13 pte_t *ptep); 32 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 34 return *ptep; in huge_ptep_clear_flush() 39 unsigned long addr, pte_t *ptep); 43 unsigned long addr, pte_t *ptep,
|