/arch/s390/include/asm/ |
D | pgtable.h | 46 #define update_mmu_cache(vma, address, ptep) do { } while (0) argument 545 static inline pgste_t pgste_get_lock(pte_t *ptep) in pgste_get_lock() argument 559 : "=&d" (old), "=&d" (new), "=Q" (ptep[PTRS_PER_PTE]) in pgste_get_lock() 560 : "Q" (ptep[PTRS_PER_PTE]) : "cc"); in pgste_get_lock() 565 static inline void pgste_set_unlock(pte_t *ptep, pgste_t pgste) in pgste_set_unlock() argument 571 : "=Q" (ptep[PTRS_PER_PTE]) in pgste_set_unlock() 572 : "d" (pgste_val(pgste)), "Q" (ptep[PTRS_PER_PTE]) : "cc"); in pgste_set_unlock() 577 static inline pgste_t pgste_update_all(pte_t *ptep, pgste_t pgste) in pgste_update_all() argument 583 if (!pte_present(*ptep)) in pgste_update_all() 585 address = pte_val(*ptep) & PAGE_MASK; in pgste_update_all() [all …]
|
D | hugetlb.h | 19 pte_t *ptep, pte_t pte); 52 static inline pte_t huge_ptep_get(pte_t *ptep) in huge_ptep_get() argument 54 pte_t pte = *ptep; in huge_ptep_get() 58 ptep = (pte_t *) (pte_val(pte) & _SEGMENT_ENTRY_ORIGIN); in huge_ptep_get() 59 if (ptep) { in huge_ptep_get() 62 pte = pte_mkhuge(*ptep); in huge_ptep_get() 70 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 72 pte_t pte = huge_ptep_get(ptep); in huge_ptep_get_and_clear() 75 pmd_clear((pmd_t *) ptep); in huge_ptep_get_and_clear() 110 unsigned long address, pte_t *ptep) in huge_ptep_invalidate() argument [all …]
|
/arch/tile/include/asm/ |
D | hugetlb.h | 55 pte_t *ptep, pte_t pte) in set_huge_pte_at() argument 57 set_pte(ptep, pte); in set_huge_pte_at() 61 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 63 return ptep_get_and_clear(mm, addr, ptep); in huge_ptep_get_and_clear() 67 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 69 ptep_clear_flush(vma, addr, ptep); in huge_ptep_clear_flush() 83 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 85 ptep_set_wrprotect(mm, addr, ptep); in huge_ptep_set_wrprotect() 89 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 92 return ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags() [all …]
|
D | pgtable_64.h | 153 unsigned long addr, pte_t *ptep) in ptep_test_and_clear_young() argument 155 return (__insn_fetchand(&ptep->val, ~HV_PTE_ACCESSED) >> in ptep_test_and_clear_young() 161 unsigned long addr, pte_t *ptep) in ptep_set_wrprotect() argument 163 __insn_fetchand(&ptep->val, ~HV_PTE_WRITABLE); in ptep_set_wrprotect() 168 unsigned long addr, pte_t *ptep) in ptep_get_and_clear() argument 170 return hv_pte(__insn_exch(&ptep->val, 0UL)); in ptep_get_and_clear()
|
/arch/sh/include/asm/ |
D | hugetlb.h | 39 pte_t *ptep, pte_t pte) in set_huge_pte_at() argument 41 set_pte_at(mm, addr, ptep, pte); in set_huge_pte_at() 45 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 47 return ptep_get_and_clear(mm, addr, ptep); in huge_ptep_get_and_clear() 51 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 66 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 68 ptep_set_wrprotect(mm, addr, ptep); in huge_ptep_set_wrprotect() 72 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 75 return ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags() 78 static inline pte_t huge_ptep_get(pte_t *ptep) in huge_ptep_get() argument [all …]
|
/arch/ia64/include/asm/ |
D | hugetlb.h | 27 pte_t *ptep, pte_t pte) in set_huge_pte_at() argument 29 set_pte_at(mm, addr, ptep, pte); in set_huge_pte_at() 33 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 35 return ptep_get_and_clear(mm, addr, ptep); in huge_ptep_get_and_clear() 39 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 54 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 56 ptep_set_wrprotect(mm, addr, ptep); in huge_ptep_set_wrprotect() 60 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 63 return ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags() 66 static inline pte_t huge_ptep_get(pte_t *ptep) in huge_ptep_get() argument [all …]
|
D | pgtable.h | 333 static inline void set_pte(pte_t *ptep, pte_t pteval) in set_pte() argument 340 (!pte_present(*ptep) || in set_pte() 341 pte_pfn(*ptep) != pte_pfn(pteval))) in set_pte() 344 *ptep = pteval; in set_pte() 347 #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) argument 413 ptep_test_and_clear_young (struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) in ptep_test_and_clear_young() argument 416 if (!pte_young(*ptep)) in ptep_test_and_clear_young() 418 return test_and_clear_bit(_PAGE_A_BIT, ptep); in ptep_test_and_clear_young() 420 pte_t pte = *ptep; in ptep_test_and_clear_young() 423 set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte)); in ptep_test_and_clear_young() [all …]
|
/arch/sparc/include/asm/ |
D | hugetlb.h | 8 pte_t *ptep, pte_t pte); 11 pte_t *ptep); 44 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 59 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 61 pte_t old_pte = *ptep; in huge_ptep_set_wrprotect() 62 set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); in huge_ptep_set_wrprotect() 66 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 69 int changed = !pte_same(*ptep, pte); in huge_ptep_set_access_flags() 71 set_huge_pte_at(vma->vm_mm, addr, ptep, pte); in huge_ptep_set_access_flags() 77 static inline pte_t huge_ptep_get(pte_t *ptep) in huge_ptep_get() argument [all …]
|
/arch/x86/include/asm/ |
D | hugetlb.h | 40 pte_t *ptep, pte_t pte) in set_huge_pte_at() argument 42 set_pte_at(mm, addr, ptep, pte); in set_huge_pte_at() 46 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 48 return ptep_get_and_clear(mm, addr, ptep); in huge_ptep_get_and_clear() 52 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 67 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 69 ptep_set_wrprotect(mm, addr, ptep); in huge_ptep_set_wrprotect() 73 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 76 return ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags() 79 static inline pte_t huge_ptep_get(pte_t *ptep) in huge_ptep_get() argument [all …]
|
D | pgtable-3level.h | 27 static inline void native_set_pte(pte_t *ptep, pte_t pte) in native_set_pte() argument 29 ptep->pte_high = pte.pte_high; in native_set_pte() 31 ptep->pte_low = pte.pte_low; in native_set_pte() 88 static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) in native_set_pte_atomic() argument 90 set_64bit((unsigned long long *)(ptep), native_pte_val(pte)); in native_set_pte_atomic() 109 pte_t *ptep) in native_pte_clear() argument 111 ptep->pte_low = 0; in native_pte_clear() 113 ptep->pte_high = 0; in native_pte_clear() 141 static inline pte_t native_ptep_get_and_clear(pte_t *ptep) in native_ptep_get_and_clear() argument 146 res.pte_low = xchg(&ptep->pte_low, 0); in native_ptep_get_and_clear() [all …]
|
D | pgtable.h | 36 #define set_pte(ptep, pte) native_set_pte(ptep, pte) argument 37 #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) argument 40 #define set_pte_atomic(ptep, pte) \ argument 41 native_set_pte_atomic(ptep, pte) 58 #define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep) argument 61 #define pte_update(mm, addr, ptep) do { } while (0) argument 62 #define pte_update_defer(mm, addr, ptep) do { } while (0) argument 63 #define pmd_update(mm, addr, ptep) do { } while (0) argument 64 #define pmd_update_defer(mm, addr, ptep) do { } while (0) argument 612 static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) in native_local_ptep_get_and_clear() argument [all …]
|
/arch/mips/include/asm/ |
D | hugetlb.h | 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() 60 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 63 pte_t pte = *ptep; in huge_ptep_get_and_clear() 66 set_pte_at(mm, addr, ptep, clear); in huge_ptep_get_and_clear() 71 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 88 unsigned long addr, pte_t *ptep) in huge_ptep_set_wrprotect() argument 90 ptep_set_wrprotect(mm, addr, ptep); in huge_ptep_set_wrprotect() 95 pte_t *ptep, pte_t pte, in huge_ptep_set_access_flags() argument 98 return ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags() [all …]
|
D | pgtable.h | 105 static inline void set_pte(pte_t *ptep, pte_t pte) in set_pte() argument 107 ptep->pte_high = pte.pte_high; in set_pte() 109 ptep->pte_low = pte.pte_low; in set_pte() 113 pte_t *buddy = ptep_buddy(ptep); in set_pte() 124 #define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval) argument 126 static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) in pte_clear() argument 131 if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL) in pte_clear() 134 set_pte_at(mm, addr, ptep, null); in pte_clear() 146 static inline void set_pte(pte_t *ptep, pte_t pteval) in set_pte() argument 148 *ptep = pteval; in set_pte() [all …]
|
/arch/powerpc/include/asm/ |
D | pgtable-ppc64.h | 206 pte_t *ptep, unsigned long clr, in pte_update() argument 219 : "=&r" (old), "=&r" (tmp), "=m" (*ptep) in pte_update() 220 : "r" (ptep), "r" (clr), "m" (*ptep), "i" (_PAGE_BUSY) in pte_update() 223 unsigned long old = pte_val(*ptep); in pte_update() 224 *ptep = __pte(old & ~clr); in pte_update() 232 hpte_need_flush(mm, addr, ptep, old, huge); in pte_update() 239 unsigned long addr, pte_t *ptep) in __ptep_test_and_clear_young() argument 243 if ((pte_val(*ptep) & (_PAGE_ACCESSED | _PAGE_HASHPTE)) == 0) in __ptep_test_and_clear_young() 245 old = pte_update(mm, addr, ptep, _PAGE_ACCESSED, 0); in __ptep_test_and_clear_young() 258 pte_t *ptep) in ptep_set_wrprotect() argument [all …]
|
D | hugetlb.h | 90 pte_t *ptep, pte_t pte) in set_huge_pte_at() argument 92 set_pte_at(mm, addr, ptep, pte); in set_huge_pte_at() 96 unsigned long addr, pte_t *ptep) in huge_ptep_get_and_clear() argument 99 return __pte(pte_update(mm, addr, ptep, ~0UL, 1)); in huge_ptep_get_and_clear() 101 return __pte(pte_update(ptep, ~0UL, 0)); in huge_ptep_get_and_clear() 106 unsigned long addr, pte_t *ptep) in huge_ptep_clear_flush() argument 109 pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep); in huge_ptep_clear_flush() 124 unsigned long addr, pte_t *ptep, in huge_ptep_set_access_flags() argument 133 ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags() 136 return ptep_set_access_flags(vma, addr, ptep, pte, dirty); in huge_ptep_set_access_flags() [all …]
|
D | pgtable.h | 83 extern void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, 92 pte_t *ptep, pte_t pte, int percpu) in __set_pte_at() argument 102 *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE) in __set_pte_at() 105 pte_update(ptep, ~_PAGE_HASHPTE, pte_val(pte)); in __set_pte_at() 117 *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE) in __set_pte_at() 122 if (pte_val(*ptep) & _PAGE_HASHPTE) in __set_pte_at() 123 flush_hash_entry(mm, ptep, addr); in __set_pte_at() 129 : "=m" (*ptep), "=m" (*((unsigned char *)ptep+4)) in __set_pte_at() 138 *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE) in __set_pte_at() 145 *ptep = pte; in __set_pte_at() [all …]
|
D | pgtable-ppc32.h | 129 #define pte_clear(mm, addr, ptep) \ argument 130 do { pte_update(ptep, ~_PAGE_HASHPTE, 0); } while (0) 149 extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, 234 static inline int __ptep_test_and_clear_young(unsigned int context, unsigned long addr, pte_t *ptep) in __ptep_test_and_clear_young() argument 237 old = pte_update(ptep, _PAGE_ACCESSED, 0); in __ptep_test_and_clear_young() 240 unsigned long ptephys = __pa(ptep) & PAGE_MASK; in __ptep_test_and_clear_young() 251 pte_t *ptep) in ptep_get_and_clear() argument 253 return __pte(pte_update(ptep, ~_PAGE_HASHPTE, 0)); in ptep_get_and_clear() 258 pte_t *ptep) in ptep_set_wrprotect() argument 260 pte_update(ptep, (_PAGE_RW | _PAGE_HWWRITE), 0); in ptep_set_wrprotect() [all …]
|
D | tlb.h | 36 extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, 39 static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, in __tlb_remove_tlb_entry() argument 43 if (pte_val(*ptep) & _PAGE_HASHPTE) in __tlb_remove_tlb_entry() 44 flush_hash_entry(tlb->mm, ptep, address); in __tlb_remove_tlb_entry()
|
/arch/s390/mm/ |
D | hugetlbpage.c | 32 pte_t *ptep; in arch_prepare_hugepage() local 38 ptep = (pte_t *) pte_alloc_one(&init_mm, addr); in arch_prepare_hugepage() 39 if (!ptep) in arch_prepare_hugepage() 44 set_pte_at(&init_mm, addr + i * PAGE_SIZE, ptep + i, pte); in arch_prepare_hugepage() 47 page[1].index = (unsigned long) ptep; in arch_prepare_hugepage() 53 pte_t *ptep; in arch_release_hugepage() local 58 ptep = (pte_t *) page[1].index; in arch_release_hugepage() 59 if (!ptep) in arch_release_hugepage() 61 page_table_free(&init_mm, (unsigned long *) ptep); in arch_release_hugepage() 94 int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) in huge_pmd_unshare() argument
|
D | pageattr.c | 14 pte_t *ptep, pte; in change_page_attr() local 28 ptep = pte_offset_kernel(pmdp, addr); in change_page_attr() 30 pte = *ptep; in change_page_attr() 32 __ptep_ipte(addr, ptep); in change_page_attr() 33 *ptep = pte; in change_page_attr()
|
/arch/xtensa/include/asm/ |
D | pgtable.h | 209 #define pte_clear(mm,addr,ptep) \ argument 210 do { update_pte(ptep, __pte(_PAGE_INVALID)); } while(0) 259 static inline void update_pte(pte_t *ptep, pte_t pteval) in update_pte() argument 261 *ptep = pteval; in update_pte() 263 __asm__ __volatile__ ("dhwb %0, 0" :: "a" (ptep)); in update_pte() 271 set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) in set_pte_at() argument 273 update_pte(ptep, pteval); in set_pte_at() 287 pte_t *ptep) in ptep_test_and_clear_young() argument 289 pte_t pte = *ptep; in ptep_test_and_clear_young() 292 update_pte(ptep, pte_mkold(pte)); in ptep_test_and_clear_young() [all …]
|
/arch/sh/mm/ |
D | gup.c | 17 static inline pte_t gup_get_pte(pte_t *ptep) in gup_get_pte() argument 20 return ACCESS_ONCE(*ptep); in gup_get_pte() 58 pte.pte_low = ptep->pte_low; in gup_get_pte() 60 pte.pte_high = ptep->pte_high; in gup_get_pte() 62 if (unlikely(pte.pte_low != ptep->pte_low)) in gup_get_pte() 78 pte_t *ptep; in gup_pte_range() local 96 ptep = pte_offset_map(&pmd, addr); in gup_pte_range() 98 pte_t pte = gup_get_pte(ptep); in gup_pte_range() 102 pte_unmap(ptep); in gup_pte_range() 111 } while (ptep++, addr += PAGE_SIZE, addr != end); in gup_pte_range() [all …]
|
/arch/arm/mm/ |
D | mm.h | 21 pte_t *ptep = pte_offset_kernel(top_pmd, va); in set_top_pte() local 22 set_pte_ext(ptep, pte, 0); in set_top_pte() 28 pte_t *ptep = pte_offset_kernel(top_pmd, va); in get_top_pte() local 29 return *ptep; in get_top_pte()
|
D | fault-armv.c | 41 unsigned long pfn, pte_t *ptep) in do_adjust_pte() argument 43 pte_t entry = *ptep; in do_adjust_pte() 61 set_pte_at(vma->vm_mm, address, ptep, entry); in do_adjust_pte() 133 unsigned long addr, pte_t *ptep, unsigned long pfn) in make_coherent() argument 165 do_adjust_pte(vma, addr, pfn, ptep); in make_coherent() 182 pte_t *ptep) in update_mmu_cache() argument 184 unsigned long pfn = pte_pfn(*ptep); in update_mmu_cache() 204 make_coherent(mapping, vma, addr, ptep, pfn); in update_mmu_cache()
|
/arch/xtensa/mm/ |
D | mmu.c | 54 pte_t *ptep = (pte_t *)addr; in pgd_ctor() local 57 for (i = 0; i < 1024; i++, ptep++) in pgd_ctor() 58 pte_clear(NULL, 0, ptep); in pgd_ctor()
|