Home
last modified time | relevance | path

Searched refs:ptep (Results 1 – 25 of 204) sorted by relevance

123456789

/kernel/linux/linux-5.10/arch/s390/mm/
Dpgtable.c48 pte_t *ptep, int nodat) in ptep_ipte_local() argument
61 __ptep_ipte(addr, ptep, opt, asce, IPTE_LOCAL); in ptep_ipte_local()
63 __ptep_ipte(addr, ptep, 0, 0, IPTE_LOCAL); in ptep_ipte_local()
68 pte_t *ptep, int nodat) in ptep_ipte_global() argument
81 __ptep_ipte(addr, ptep, opt, asce, IPTE_GLOBAL); in ptep_ipte_global()
83 __ptep_ipte(addr, ptep, 0, 0, IPTE_GLOBAL); in ptep_ipte_global()
88 unsigned long addr, pte_t *ptep, in ptep_flush_direct() argument
93 old = *ptep; in ptep_flush_direct()
99 ptep_ipte_local(mm, addr, ptep, nodat); in ptep_flush_direct()
101 ptep_ipte_global(mm, addr, ptep, nodat); in ptep_flush_direct()
[all …]
/kernel/linux/linux-5.10/arch/arm64/mm/
Dhugetlbpage.c104 pte_t *ptep, size_t *pgsize) in find_num_contig() argument
115 if ((pte_t *)pmdp == ptep) { in find_num_contig()
158 pte_t *ptep, in get_clear_flush() argument
162 pte_t orig_pte = huge_ptep_get(ptep); in get_clear_flush()
166 for (i = 0; i < ncontig; i++, addr += pgsize, ptep++) { in get_clear_flush()
167 pte_t pte = ptep_get_and_clear(mm, addr, ptep); in get_clear_flush()
199 pte_t *ptep, in clear_flush() argument
206 for (i = 0; i < ncontig; i++, addr += pgsize, ptep++) in clear_flush()
207 pte_clear(mm, addr, ptep); in clear_flush()
213 pte_t *ptep, pte_t pte) in set_huge_pte_at() argument
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/aarch64/
Dprocessor.c92 uint64_t *ptep; in _virt_pg_map() local
108 ptep = addr_gpa2hva(vm, vm->pgd) + pgd_index(vm, vaddr) * 8; in _virt_pg_map()
109 if (!*ptep) { in _virt_pg_map()
110 *ptep = vm_phy_page_alloc(vm, KVM_GUEST_PAGE_TABLE_MIN_PADDR, pgd_memslot); in _virt_pg_map()
111 *ptep |= 3; in _virt_pg_map()
116 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pud_index(vm, vaddr) * 8; in _virt_pg_map()
117 if (!*ptep) { in _virt_pg_map()
118 *ptep = vm_phy_page_alloc(vm, KVM_GUEST_PAGE_TABLE_MIN_PADDR, pgd_memslot); in _virt_pg_map()
119 *ptep |= 3; in _virt_pg_map()
123 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pmd_index(vm, vaddr) * 8; in _virt_pg_map()
[all …]
/kernel/linux/linux-5.10/arch/s390/include/asm/
Dhugetlb.h19 pte_t *ptep, pte_t pte);
20 pte_t huge_ptep_get(pte_t *ptep);
22 unsigned long addr, pte_t *ptep);
47 pte_t *ptep, unsigned long sz) in huge_pte_clear() argument
49 if ((pte_val(*ptep) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3) in huge_pte_clear()
50 pte_val(*ptep) = _REGION3_ENTRY_EMPTY; in huge_pte_clear()
52 pte_val(*ptep) = _SEGMENT_ENTRY_EMPTY; in huge_pte_clear()
56 unsigned long address, pte_t *ptep) in huge_ptep_clear_flush() argument
58 huge_ptep_get_and_clear(vma->vm_mm, address, ptep); in huge_ptep_clear_flush()
62 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument
[all …]
/kernel/linux/linux-5.10/arch/arm64/kvm/hyp/
Dpgtable.c156 static void kvm_set_invalid_pte(kvm_pte_t *ptep) in kvm_set_invalid_pte() argument
158 kvm_pte_t pte = *ptep; in kvm_set_invalid_pte()
159 WRITE_ONCE(*ptep, pte & ~KVM_PTE_VALID); in kvm_set_invalid_pte()
162 static void kvm_set_table_pte(kvm_pte_t *ptep, kvm_pte_t *childp) in kvm_set_table_pte() argument
164 kvm_pte_t old = *ptep, pte = kvm_phys_to_pte(__pa(childp)); in kvm_set_table_pte()
170 smp_store_release(ptep, pte); in kvm_set_table_pte()
173 static bool kvm_set_valid_leaf_pte(kvm_pte_t *ptep, u64 pa, kvm_pte_t attr, in kvm_set_valid_leaf_pte() argument
176 kvm_pte_t old = *ptep, pte = kvm_phys_to_pte(pa); in kvm_set_valid_leaf_pte()
188 smp_store_release(ptep, pte); in kvm_set_valid_leaf_pte()
193 u32 level, kvm_pte_t *ptep, in kvm_pgtable_visitor_cb() argument
[all …]
/kernel/linux/linux-5.10/include/asm-generic/
Dhugetlb.h37 pte_t *ptep, unsigned long sz) in huge_pte_clear() argument
39 pte_clear(mm, addr, ptep); in huge_pte_clear()
54 pte_t *ptep, pte_t pte) in set_huge_pte_at() argument
56 set_pte_at(mm, addr, ptep, pte); in set_huge_pte_at()
62 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument
64 return ptep_get_and_clear(mm, addr, ptep); in huge_ptep_get_and_clear()
70 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument
72 ptep_clear_flush(vma, addr, ptep); in huge_ptep_clear_flush()
107 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument
109 ptep_set_wrprotect(mm, addr, ptep); in huge_ptep_set_wrprotect()
[all …]
/kernel/linux/linux-5.10/arch/sparc/include/asm/
Dhugetlb.h17 pte_t *ptep, pte_t pte);
21 pte_t *ptep);
25 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument
31 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument
33 pte_t old_pte = *ptep; in huge_ptep_set_wrprotect()
34 set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); in huge_ptep_set_wrprotect()
39 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument
42 int changed = !pte_same(*ptep, pte); in huge_ptep_set_access_flags()
44 set_huge_pte_at(vma->vm_mm, addr, ptep, pte); in huge_ptep_set_access_flags()
/kernel/linux/linux-5.10/arch/xtensa/include/asm/
Dpgalloc.h24 #define pmd_populate_kernel(mm, pmdp, ptep) \ argument
25 (pmd_val(*(pmdp)) = ((unsigned long)ptep))
36 static inline void ptes_clear(pte_t *ptep) in ptes_clear() argument
41 pte_clear(NULL, 0, ptep + i); in ptes_clear()
46 pte_t *ptep; in pte_alloc_one_kernel() local
48 ptep = (pte_t *)__pte_alloc_one_kernel(mm); in pte_alloc_one_kernel()
49 if (!ptep) in pte_alloc_one_kernel()
51 ptes_clear(ptep); in pte_alloc_one_kernel()
52 return ptep; in pte_alloc_one_kernel()
Dpgtable.h258 #define pte_clear(mm,addr,ptep) \ argument
259 do { update_pte(ptep, __pte(_PAGE_CA_INVALID | _PAGE_USER)); } while (0)
306 static inline void update_pte(pte_t *ptep, pte_t pteval) in update_pte() argument
308 *ptep = pteval; in update_pte()
310 __asm__ __volatile__ ("dhwb %0, 0" :: "a" (ptep)); in update_pte()
318 set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) in set_pte_at() argument
320 update_pte(ptep, pteval); in set_pte_at()
323 static inline void set_pte(pte_t *ptep, pte_t pteval) in set_pte() argument
325 update_pte(ptep, pteval); in set_pte()
338 pte_t *ptep) in ptep_test_and_clear_young() argument
[all …]
/kernel/linux/linux-5.10/arch/parisc/mm/
Dhugetlbpage.c123 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()
143 pte_t *ptep, pte_t entry) in set_huge_pte_at() argument
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()
155 __set_huge_pte_at(mm, addr, ptep, __pte(0)); 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()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/include/asm/nohash/64/
Dpgtable.h191 pte_t *ptep, unsigned long clr, in pte_update() argument
195 unsigned long old = pte_val(*ptep); in pte_update()
196 *ptep = __pte((old & ~clr) | set); in pte_update()
211 unsigned long addr, pte_t *ptep) in __ptep_test_and_clear_young() argument
215 if (pte_young(*ptep)) in __ptep_test_and_clear_young()
217 old = pte_update(mm, addr, ptep, _PAGE_ACCESSED, 0, 0); in __ptep_test_and_clear_young()
230 pte_t *ptep) in ptep_set_wrprotect() argument
233 if ((pte_val(*ptep) & _PAGE_RW) == 0) in ptep_set_wrprotect()
236 pte_update(mm, addr, ptep, _PAGE_RW, 0, 0); in ptep_set_wrprotect()
241 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument
[all …]
/kernel/linux/linux-5.10/arch/powerpc/mm/book3s64/
Dhash_hugetlbpage.c24 pte_t *ptep, unsigned long trap, unsigned long flags, in __hash_page_huge() argument
52 old_pte = pte_val(*ptep); in __hash_page_huge()
67 } while(!pte_xchg(ptep, __pte(old_pte), __pte(new_pte))); in __hash_page_huge()
78 rpte = __real_pte(__pte(old_pte), ptep, offset); in __hash_page_huge()
114 *ptep = __pte(old_pte); in __hash_page_huge()
120 new_pte |= pte_set_hidx(ptep, rpte, 0, slot, offset); in __hash_page_huge()
126 *ptep = __pte(new_pte & ~H_PAGE_BUSY); in __hash_page_huge()
131 unsigned long addr, pte_t *ptep) in huge_ptep_modify_prot_start() argument
139 pte_val = pte_update(vma->vm_mm, addr, ptep, in huge_ptep_modify_prot_start()
146 pte_t *ptep, pte_t old_pte, pte_t pte) in huge_ptep_modify_prot_commit() argument
[all …]
Dhash_64k.c37 pte_t *ptep, unsigned long trap, unsigned long flags, in __hash_page_4K() argument
52 pte_t pte = READ_ONCE(*ptep); in __hash_page_4K()
69 } while (!pte_xchg(ptep, __pte(old_pte), __pte(new_pte))); in __hash_page_4K()
89 rpte = __real_pte(__pte(old_pte), ptep, PTRS_PER_PTE); in __hash_page_4K()
129 *ptep = __pte(new_pte & ~H_PAGE_BUSY); in __hash_page_4K()
210 *ptep = __pte(old_pte); in __hash_page_4K()
216 new_pte |= pte_set_hidx(ptep, rpte, subpg_index, slot, PTRS_PER_PTE); in __hash_page_4K()
219 *ptep = __pte(new_pte & ~H_PAGE_BUSY); in __hash_page_4K()
224 unsigned long vsid, pte_t *ptep, unsigned long trap, in __hash_page_64K() argument
238 pte_t pte = READ_ONCE(*ptep); in __hash_page_64K()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/include/asm/book3s/64/
Dradix.h140 extern void radix__ptep_set_access_flags(struct vm_area_struct *vma, pte_t *ptep,
145 unsigned long addr, pte_t *ptep,
148 static inline unsigned long __radix_pte_update(pte_t *ptep, unsigned long clr, in __radix_pte_update() argument
159 : "=&r" (old_be), "=&r" (tmp_be), "=m" (*ptep) in __radix_pte_update()
160 : "r" (ptep), "r" (cpu_to_be64(set)), "r" (cpu_to_be64(clr)) in __radix_pte_update()
168 pte_t *ptep, unsigned long clr, in radix__pte_update() argument
174 old_pte = __radix_pte_update(ptep, clr, set); in radix__pte_update()
183 pte_t *ptep, int full) in radix__ptep_get_and_clear_full() argument
188 old_pte = pte_val(*ptep); in radix__ptep_get_and_clear_full()
189 *ptep = __pte(0); in radix__ptep_get_and_clear_full()
[all …]
Dhash.h147 pte_t *ptep, unsigned long pte, int huge);
152 pte_t *ptep, unsigned long clr, in hash__pte_update() argument
167 : "=&r" (old_be), "=&r" (tmp_be), "=m" (*ptep) in hash__pte_update()
168 : "r" (ptep), "r" (cpu_to_be64(clr)), "m" (*ptep), in hash__pte_update()
177 hpte_need_flush(mm, addr, ptep, old, huge); in hash__pte_update()
185 static inline void hash__ptep_set_access_flags(pte_t *ptep, pte_t entry) in hash__ptep_set_access_flags() argument
201 :"=&r" (old), "=&r" (tmp), "=m" (*ptep) in hash__ptep_set_access_flags()
202 :"r" (val), "r" (ptep), "m" (*ptep), "r" (cpu_to_be64(H_PAGE_BUSY)) in hash__ptep_set_access_flags()
225 pte_t *ptep, pte_t pte, int percpu) in hash__set_pte_at() argument
231 *ptep = pte; in hash__set_pte_at()
/kernel/linux/linux-5.10/arch/x86/xen/
Dp2m.c220 pte_t *ptep; in xen_build_mfn_list_list() local
248 ptep = lookup_address((unsigned long)(xen_p2m_addr + pfn), in xen_build_mfn_list_list()
250 BUG_ON(!ptep || level != PG_LEVEL_4K); in xen_build_mfn_list_list()
251 mfn = pte_mfn(*ptep); in xen_build_mfn_list_list()
252 ptep = (pte_t *)((unsigned long)ptep & ~(PAGE_SIZE - 1)); in xen_build_mfn_list_list()
258 if (ptep == p2m_missing_pte || ptep == p2m_identity_pte) { in xen_build_mfn_list_list()
336 pte_t *ptep; in xen_rebuild_p2m_list() local
384 ptep = populate_extra_pte((unsigned long)(p2m + pfn)); in xen_rebuild_p2m_list()
385 set_pte(ptep, in xen_rebuild_p2m_list()
394 ptep = populate_extra_pte((unsigned long)(p2m + pfn)); in xen_rebuild_p2m_list()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/include/asm/book3s/32/
Dpgtable.h220 #define pte_clear(mm, addr, ptep) \ argument
221 do { pte_update(mm, addr, ptep, ~_PAGE_HASHPTE, 0, 0); } while (0)
244 extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep,
293 unsigned long addr, pte_t *ptep) in __ptep_test_and_clear_young() argument
296 old = pte_update(mm, addr, ptep, _PAGE_ACCESSED, 0, 0); in __ptep_test_and_clear_young()
298 unsigned long ptephys = __pa(ptep) & PAGE_MASK; in __ptep_test_and_clear_young()
308 pte_t *ptep) in ptep_get_and_clear() argument
310 return __pte(pte_update(mm, addr, ptep, ~_PAGE_HASHPTE, 0, 0)); in ptep_get_and_clear()
315 pte_t *ptep) in ptep_set_wrprotect() argument
317 pte_update(mm, addr, ptep, _PAGE_RW, 0, 0); in ptep_set_wrprotect()
[all …]
/kernel/linux/linux-5.10/arch/mips/include/asm/
Dhugetlb.h35 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
54 huge_ptep_get_and_clear(vma->vm_mm, addr, ptep); in huge_ptep_clear_flush()
68 pte_t *ptep, pte_t pte, in huge_ptep_set_access_flags() argument
71 int changed = !pte_same(*ptep, pte); in huge_ptep_set_access_flags()
74 set_pte_at(vma->vm_mm, addr, ptep, pte); in huge_ptep_set_access_flags()
/kernel/linux/linux-5.10/arch/powerpc/kvm/
Dbook3s_64_mmu_radix.c345 static unsigned long kvmppc_radix_update_pte(struct kvm *kvm, pte_t *ptep, in kvmppc_radix_update_pte() argument
349 return __radix_pte_update(ptep, clr, set); in kvmppc_radix_update_pte()
353 pte_t *ptep, pte_t pte) in kvmppc_radix_set_pte_at() argument
355 radix__set_pte_at(kvm->mm, addr, ptep, pte, 0); in kvmppc_radix_set_pte_at()
372 static void kvmppc_pte_free(pte_t *ptep) in kvmppc_pte_free() argument
374 kmem_cache_free(kvm_pte_cache, ptep); in kvmppc_pte_free()
595 pte_t *ptep, *new_ptep = NULL; in kvmppc_create_pte() local
734 ptep = pte_offset_kernel(pmd, gpa); in kvmppc_create_pte()
735 if (pte_present(*ptep)) { in kvmppc_create_pte()
737 if (pte_raw(*ptep) == pte_raw(pte)) { in kvmppc_create_pte()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/mm/
Dpgtable.c178 void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, in set_pte_at() argument
185 VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep)); in set_pte_at()
194 __set_pte_at(mm, addr, ptep, pte, 0); in set_pte_at()
200 pte_t *ptep = pte_offset_kernel(pmdp, va); in unmap_kernel_page() local
202 pte_clear(&init_mm, va, ptep); in unmap_kernel_page()
214 pte_t *ptep, pte_t entry, int dirty) in ptep_set_access_flags() argument
218 changed = !pte_same(*(ptep), entry); in ptep_set_access_flags()
221 __ptep_set_access_flags(vma, ptep, entry, in ptep_set_access_flags()
229 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument
238 ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags()
[all …]
/kernel/linux/linux-5.10/arch/riscv/include/asm/
Dpgtable.h326 unsigned long address, pte_t *ptep) in update_mmu_cache() argument
349 static inline void set_pte(pte_t *ptep, pte_t pteval) in set_pte() argument
351 *ptep = pteval; in set_pte()
357 unsigned long addr, pte_t *ptep, pte_t pteval) in set_pte_at() argument
362 set_pte(ptep, pteval); in set_pte_at()
366 unsigned long addr, pte_t *ptep) in pte_clear() argument
368 set_pte_at(mm, addr, ptep, __pte(0)); in pte_clear()
373 unsigned long address, pte_t *ptep, in ptep_set_access_flags() argument
376 if (!pte_same(*ptep, entry)) in ptep_set_access_flags()
377 set_pte_at(vma->vm_mm, address, ptep, entry); in ptep_set_access_flags()
[all …]
/kernel/linux/linux-5.10/arch/arm64/include/asm/
Dhugetlb.h31 pte_t *ptep, pte_t pte);
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 pte_t *ptep, pte_t pte, unsigned long sz);
/kernel/linux/linux-5.10/drivers/iommu/
Dio-pgtable-arm-v7s.c298 static void __arm_v7s_pte_sync(arm_v7s_iopte *ptep, int num_entries, in __arm_v7s_pte_sync() argument
304 dma_sync_single_for_device(cfg->iommu_dev, __arm_v7s_dma_addr(ptep), in __arm_v7s_pte_sync()
305 num_entries * sizeof(*ptep), DMA_TO_DEVICE); in __arm_v7s_pte_sync()
307 static void __arm_v7s_set_pte(arm_v7s_iopte *ptep, arm_v7s_iopte pte, in __arm_v7s_set_pte() argument
313 ptep[i] = pte; in __arm_v7s_set_pte()
315 __arm_v7s_pte_sync(ptep, num_entries, cfg); in __arm_v7s_set_pte()
416 int lvl, int num_entries, arm_v7s_iopte *ptep) in arm_v7s_init_pte() argument
423 if (ARM_V7S_PTE_IS_TABLE(ptep[i], lvl)) { in arm_v7s_init_pte()
431 tblp = ptep - ARM_V7S_LVL_IDX(iova, lvl); in arm_v7s_init_pte()
435 } else if (ptep[i]) { in arm_v7s_init_pte()
[all …]
Dio-pgtable-arm.c235 static void __arm_lpae_sync_pte(arm_lpae_iopte *ptep, in __arm_lpae_sync_pte() argument
238 dma_sync_single_for_device(cfg->iommu_dev, __arm_lpae_dma_addr(ptep), in __arm_lpae_sync_pte()
239 sizeof(*ptep), DMA_TO_DEVICE); in __arm_lpae_sync_pte()
242 static void __arm_lpae_set_pte(arm_lpae_iopte *ptep, arm_lpae_iopte pte, in __arm_lpae_set_pte() argument
245 *ptep = pte; in __arm_lpae_set_pte()
248 __arm_lpae_sync_pte(ptep, cfg); in __arm_lpae_set_pte()
254 arm_lpae_iopte *ptep);
258 int lvl, arm_lpae_iopte *ptep) in __arm_lpae_init_pte() argument
269 __arm_lpae_set_pte(ptep, pte, &data->iop.cfg); in __arm_lpae_init_pte()
275 arm_lpae_iopte *ptep) in arm_lpae_init_pte() argument
[all …]
/kernel/linux/linux-5.10/arch/nds32/mm/
Dhighmem.c18 pte_t *ptep; in kmap_atomic_high_prot() local
25 ptep = pte_offset_kernel(pmd_off_k(vaddr), vaddr); in kmap_atomic_high_prot()
26 set_pte(ptep, pte); in kmap_atomic_high_prot()
40 pte_t *ptep; in kunmap_atomic_high() local
44 ptep = pte_offset_kernel(pmd_off_k(vaddr), vaddr); in kunmap_atomic_high()
45 set_pte(ptep, 0); in kunmap_atomic_high()

123456789