Home
last modified time | relevance | path

Searched refs:pmdp (Results 1 – 25 of 104) sorted by relevance

12345

/kernel/linux/linux-5.10/mm/
Dpgtable-generic.c106 unsigned long address, pmd_t *pmdp, in pmdp_set_access_flags() argument
109 int changed = !pmd_same(*pmdp, entry); in pmdp_set_access_flags()
112 set_pmd_at(vma->vm_mm, address, pmdp, entry); in pmdp_set_access_flags()
121 unsigned long address, pmd_t *pmdp) in pmdp_clear_flush_young() argument
125 young = pmdp_test_and_clear_young(vma, address, pmdp); in pmdp_clear_flush_young()
134 pmd_t *pmdp) in pmdp_huge_clear_flush() argument
138 VM_BUG_ON(pmd_present(*pmdp) && !pmd_trans_huge(*pmdp) && in pmdp_huge_clear_flush()
139 !pmd_devmap(*pmdp)); in pmdp_huge_clear_flush()
140 pmd = pmdp_huge_get_and_clear(vma->vm_mm, address, pmdp); in pmdp_huge_clear_flush()
161 void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, in pgtable_trans_huge_deposit() argument
[all …]
Ddebug_vm_pgtable.c187 struct vm_area_struct *vma, pmd_t *pmdp, in pmd_advanced_tests() argument
200 pgtable_trans_huge_deposit(mm, pmdp, pgtable); in pmd_advanced_tests()
203 set_pmd_at(mm, vaddr, pmdp, pmd); in pmd_advanced_tests()
204 pmdp_set_wrprotect(mm, vaddr, pmdp); in pmd_advanced_tests()
205 pmd = READ_ONCE(*pmdp); in pmd_advanced_tests()
207 pmdp_huge_get_and_clear(mm, vaddr, pmdp); in pmd_advanced_tests()
208 pmd = READ_ONCE(*pmdp); in pmd_advanced_tests()
214 set_pmd_at(mm, vaddr, pmdp, pmd); in pmd_advanced_tests()
217 pmdp_set_access_flags(vma, vaddr, pmdp, pmd, 1); in pmd_advanced_tests()
218 pmd = READ_ONCE(*pmdp); in pmd_advanced_tests()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/mm/book3s64/
Dhash_pgtable.c151 pmd_t *pmdp; in hash__map_kernel_page() local
161 pmdp = pmd_alloc(&init_mm, pudp, ea); in hash__map_kernel_page()
162 if (!pmdp) in hash__map_kernel_page()
164 ptep = pte_alloc_kernel(pmdp, ea); in hash__map_kernel_page()
190 pmd_t *pmdp, unsigned long clr, in hash__pmd_hugepage_update() argument
197 WARN_ON(!hash__pmd_trans_huge(*pmdp) && !pmd_devmap(*pmdp)); in hash__pmd_hugepage_update()
198 assert_spin_locked(pmd_lockptr(mm, pmdp)); in hash__pmd_hugepage_update()
209 : "=&r" (old_be), "=&r" (tmp), "=m" (*pmdp) in hash__pmd_hugepage_update()
210 : "r" (pmdp), "r" (cpu_to_be64(clr)), "m" (*pmdp), in hash__pmd_hugepage_update()
218 hpte_do_hugepage_flush(mm, addr, pmdp, old); in hash__pmd_hugepage_update()
[all …]
Dpgtable.c37 pmd_t *pmdp, pmd_t entry, int dirty) in pmdp_set_access_flags() argument
41 WARN_ON(!pmd_trans_huge(*pmdp) && !pmd_devmap(*pmdp)); in pmdp_set_access_flags()
42 assert_spin_locked(pmd_lockptr(vma->vm_mm, pmdp)); in pmdp_set_access_flags()
44 changed = !pmd_same(*(pmdp), entry); in pmdp_set_access_flags()
50 __ptep_set_access_flags(vma, pmdp_ptep(pmdp), in pmdp_set_access_flags()
57 unsigned long address, pmd_t *pmdp) in pmdp_test_and_clear_young() argument
59 return __pmdp_test_and_clear_young(vma->vm_mm, address, pmdp); in pmdp_test_and_clear_young()
66 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument
74 WARN_ON(pte_hw_valid(pmd_pte(*pmdp)) && !pte_protnone(pmd_pte(*pmdp))); in set_pmd_at()
75 assert_spin_locked(pmd_lockptr(mm, pmdp)); in set_pmd_at()
[all …]
Dradix_pgtable.c77 pmd_t *pmdp; in early_map_kernel_page() local
93 pmdp = early_alloc_pgtable(PAGE_SIZE, nid, region_start, in early_map_kernel_page()
95 pud_populate(&init_mm, pudp, pmdp); in early_map_kernel_page()
97 pmdp = pmd_offset(pudp, ea); in early_map_kernel_page()
99 ptep = pmdp_ptep(pmdp); in early_map_kernel_page()
102 if (!pmd_present(*pmdp)) { in early_map_kernel_page()
105 pmd_populate_kernel(&init_mm, pmdp, ptep); in early_map_kernel_page()
107 ptep = pte_offset_kernel(pmdp, ea); in early_map_kernel_page()
129 pmd_t *pmdp; in __map_kernel_page() local
158 pmdp = pmd_alloc(&init_mm, pudp, ea); in __map_kernel_page()
[all …]
Dhash_hugepage.c22 pmd_t *pmdp, unsigned long trap, unsigned long flags, in __hash_page_thp() argument
36 pmd_t pmd = READ_ONCE(*pmdp); in __hash_page_thp()
52 } while (!pmd_xchg(pmdp, __pmd(old_pmd), __pmd(new_pmd))); in __hash_page_thp()
80 hpte_slot_array = get_hpte_slot_array(pmdp); in __hash_page_thp()
88 flush_hash_hugepage(vsid, ea, pmdp, MMU_PAGE_64K, in __hash_page_thp()
165 *pmdp = __pmd(old_pmd); in __hash_page_thp()
189 *pmdp = __pmd(new_pmd & ~H_PAGE_BUSY); in __hash_page_thp()
/kernel/linux/linux-5.10/arch/arm64/include/asm/
Dpgalloc.h23 static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot) in __pud_populate() argument
25 set_pud(pudp, __pud(__phys_to_pud_val(pmdp) | prot)); in __pud_populate()
28 static inline void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmdp) in pud_populate() argument
30 __pud_populate(pudp, __pa(pmdp), PMD_TYPE_TABLE); in pud_populate()
33 static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot) in __pud_populate() argument
60 static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t ptep, in __pmd_populate() argument
63 set_pmd(pmdp, __pmd(__phys_to_pmd_val(ptep) | prot)); in __pmd_populate()
71 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) in pmd_populate_kernel() argument
76 __pmd_populate(pmdp, __pa(ptep), PMD_TYPE_TABLE); in pmd_populate_kernel()
80 pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep) in pmd_populate() argument
[all …]
/kernel/linux/linux-5.10/arch/powerpc/mm/nohash/
D40x.c102 pmd_t *pmdp; in mmu_mapin_ram() local
105 pmdp = pmd_off_k(v); in mmu_mapin_ram()
106 *pmdp++ = __pmd(val); in mmu_mapin_ram()
107 *pmdp++ = __pmd(val); in mmu_mapin_ram()
108 *pmdp++ = __pmd(val); in mmu_mapin_ram()
109 *pmdp++ = __pmd(val); in mmu_mapin_ram()
117 pmd_t *pmdp; in mmu_mapin_ram() local
120 pmdp = pmd_off_k(v); in mmu_mapin_ram()
121 *pmdp = __pmd(val); in mmu_mapin_ram()
Dbook3e_pgtable.c78 pmd_t *pmdp; in map_kernel_page() local
88 pmdp = pmd_alloc(&init_mm, pudp, ea); in map_kernel_page()
89 if (!pmdp) in map_kernel_page()
91 ptep = pte_alloc_kernel(pmdp, ea); in map_kernel_page()
103 pmdp = early_alloc_pgtable(PMD_TABLE_SIZE); in map_kernel_page()
104 pud_populate(&init_mm, pudp, pmdp); in map_kernel_page()
106 pmdp = pmd_offset(pudp, ea); in map_kernel_page()
107 if (!pmd_present(*pmdp)) { in map_kernel_page()
109 pmd_populate_kernel(&init_mm, pmdp, ptep); in map_kernel_page()
111 ptep = pte_offset_kernel(pmdp, ea); in map_kernel_page()
D8xx.c59 static pte_t __init *early_hugepd_alloc_kernel(hugepd_t *pmdp, unsigned long va) in early_hugepd_alloc_kernel() argument
61 if (hpd_val(*pmdp) == 0) { in early_hugepd_alloc_kernel()
67 hugepd_populate_kernel((hugepd_t *)pmdp, ptep, PAGE_SHIFT_8M); in early_hugepd_alloc_kernel()
68 hugepd_populate_kernel((hugepd_t *)pmdp + 1, ptep, PAGE_SHIFT_8M); in early_hugepd_alloc_kernel()
70 return hugepte_offset(*(hugepd_t *)pmdp, va, PGDIR_SHIFT); in early_hugepd_alloc_kernel()
76 pmd_t *pmdp = pmd_off_k(va); in __early_map_kernel_hugepage() local
87 ptep = early_pte_alloc_kernel(pmdp, va); in __early_map_kernel_hugepage()
89 ptep = early_hugepd_alloc_kernel((hugepd_t *)pmdp, va); in __early_map_kernel_hugepage()
92 ptep = pte_offset_kernel(pmdp, va); in __early_map_kernel_hugepage()
94 ptep = hugepte_offset(*(hugepd_t *)pmdp, va, PGDIR_SHIFT); in __early_map_kernel_hugepage()
/kernel/linux/linux-5.10/arch/sparc/mm/
Dtlb.c218 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument
220 pmd_t orig = *pmdp; in set_pmd_at()
222 *pmdp = pmd; in set_pmd_at()
227 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish() argument
232 old = *pmdp; in pmdp_establish()
233 } while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); in pmdp_establish()
243 pmd_t *pmdp) in pmdp_invalidate() argument
247 entry = __pmd(pmd_val(*pmdp) & ~_PAGE_VALID); in pmdp_invalidate()
248 old = pmdp_establish(vma, address, pmdp, entry); in pmdp_invalidate()
263 void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, in pgtable_trans_huge_deposit() argument
[all …]
/kernel/linux/linux-5.10/arch/s390/mm/
Dpageattr.c83 static int walk_pte_level(pmd_t *pmdp, unsigned long addr, unsigned long end, in walk_pte_level() argument
88 ptep = pte_offset_kernel(pmdp, addr); in walk_pte_level()
109 static int split_pmd_page(pmd_t *pmdp, unsigned long addr) in split_pmd_page() argument
119 pte_addr = pmd_pfn(*pmdp) << PAGE_SHIFT; in split_pmd_page()
120 ro = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_PROTECT); in split_pmd_page()
121 nx = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_NOEXEC); in split_pmd_page()
132 pgt_set((unsigned long *)pmdp, pmd_val(new), addr, CRDTE_DTT_SEGMENT); in split_pmd_page()
138 static void modify_pmd_page(pmd_t *pmdp, unsigned long addr, in modify_pmd_page() argument
141 pmd_t new = *pmdp; in modify_pmd_page()
151 pgt_set((unsigned long *)pmdp, pmd_val(new), addr, CRDTE_DTT_SEGMENT); in modify_pmd_page()
[all …]
Dpgtable.c361 unsigned long addr, pmd_t *pmdp) in pmdp_idte_local() argument
364 __pmdp_idte(addr, pmdp, IDTE_NODAT | IDTE_GUEST_ASCE, in pmdp_idte_local()
367 __pmdp_idte(addr, pmdp, 0, 0, IDTE_LOCAL); in pmdp_idte_local()
373 unsigned long addr, pmd_t *pmdp) in pmdp_idte_global() argument
376 __pmdp_idte(addr, pmdp, IDTE_NODAT | IDTE_GUEST_ASCE, in pmdp_idte_global()
381 __pmdp_idte(addr, pmdp, 0, 0, IDTE_GLOBAL); in pmdp_idte_global()
385 __pmdp_csp(pmdp); in pmdp_idte_global()
392 unsigned long addr, pmd_t *pmdp) in pmdp_flush_direct() argument
396 old = *pmdp; in pmdp_flush_direct()
402 pmdp_idte_local(mm, addr, pmdp); in pmdp_flush_direct()
[all …]
Dgmap.c912 pmd_t *pmdp; in gmap_pmd_op_walk() local
915 pmdp = (pmd_t *) gmap_table_walk(gmap, gaddr, 1); in gmap_pmd_op_walk()
916 if (!pmdp) in gmap_pmd_op_walk()
921 return pmd_none(*pmdp) ? NULL : pmdp; in gmap_pmd_op_walk()
924 if (pmd_none(*pmdp)) { in gmap_pmd_op_walk()
930 if (!pmd_large(*pmdp)) in gmap_pmd_op_walk()
932 return pmdp; in gmap_pmd_op_walk()
940 static inline void gmap_pmd_op_end(struct gmap *gmap, pmd_t *pmdp) in gmap_pmd_op_end() argument
942 if (pmd_large(*pmdp)) in gmap_pmd_op_end()
961 pmd_t *pmdp, int prot, unsigned long bits) in gmap_protect_pmd() argument
[all …]
/kernel/linux/linux-5.10/arch/arm64/mm/
Dmmu.c154 static void init_pte(pmd_t *pmdp, unsigned long addr, unsigned long end, in init_pte() argument
159 ptep = pte_set_fixmap_offset(pmdp, addr); in init_pte()
178 static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr, in alloc_init_cont_pte() argument
185 pmd_t pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte()
192 __pmd_populate(pmdp, pte_phys, PMD_TYPE_TABLE); in alloc_init_cont_pte()
193 pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte()
207 init_pte(pmdp, addr, next, phys, __prot); in alloc_init_cont_pte()
218 pmd_t *pmdp; in init_pmd() local
220 pmdp = pmd_set_fixmap_offset(pudp, addr); in init_pmd()
222 pmd_t old_pmd = READ_ONCE(*pmdp); in init_pmd()
[all …]
Dkasan_init.c59 static pte_t *__init kasan_pte_offset(pmd_t *pmdp, unsigned long addr, int node, in kasan_pte_offset() argument
62 if (pmd_none(READ_ONCE(*pmdp))) { in kasan_pte_offset()
66 __pmd_populate(pmdp, pte_phys, PMD_TYPE_TABLE); in kasan_pte_offset()
69 return early ? pte_offset_kimg(pmdp, addr) in kasan_pte_offset()
70 : pte_offset_kernel(pmdp, addr); in kasan_pte_offset()
99 static void __init kasan_pte_populate(pmd_t *pmdp, unsigned long addr, in kasan_pte_populate() argument
103 pte_t *ptep = kasan_pte_offset(pmdp, addr, node, early); in kasan_pte_populate()
120 pmd_t *pmdp = kasan_pmd_offset(pudp, addr, node, early); in kasan_pmd_populate() local
124 kasan_pte_populate(pmdp, addr, next, node, early); in kasan_pmd_populate()
125 } while (pmdp++, addr = next, addr != end && pmd_none(READ_ONCE(*pmdp))); in kasan_pmd_populate()
Dhugetlbpage.c109 pmd_t *pmdp; in find_num_contig() local
114 pmdp = pmd_offset(pudp, addr); in find_num_contig()
115 if ((pte_t *)pmdp == ptep) { in find_num_contig()
261 pmd_t *pmdp; in huge_pte_alloc() local
273 pmdp = pmd_alloc(mm, pudp, addr); in huge_pte_alloc()
274 if (!pmdp) in huge_pte_alloc()
285 ptep = pte_alloc_map(mm, pmdp, addr); in huge_pte_alloc()
293 pmdp = pmd_alloc(mm, pudp, addr); in huge_pte_alloc()
295 return (pte_t *)pmdp; in huge_pte_alloc()
307 pmd_t *pmdp, pmd; in huge_pte_offset() local
[all …]
/kernel/linux/linux-5.10/arch/powerpc/include/asm/nohash/32/
Dpgalloc.h17 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, in pmd_populate_kernel() argument
21 *pmdp = __pmd((unsigned long)pte | _PMD_PRESENT); in pmd_populate_kernel()
23 *pmdp = __pmd(__pa(pte) | _PMD_PRESENT); in pmd_populate_kernel()
26 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, in pmd_populate() argument
30 *pmdp = __pmd((unsigned long)pte_page | _PMD_PRESENT); in pmd_populate()
32 *pmdp = __pmd(__pa(pte_page) | _PMD_USER | _PMD_PRESENT); in pmd_populate()
/kernel/linux/linux-5.10/arch/arm/include/asm/
Dpgalloc.h107 static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, in __pmd_populate() argument
111 pmdp[0] = __pmd(pmdval); in __pmd_populate()
113 pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); in __pmd_populate()
115 flush_pmd_entry(pmdp); in __pmd_populate()
125 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) in pmd_populate_kernel() argument
130 __pmd_populate(pmdp, __pa(ptep), _PAGE_KERNEL_TABLE); in pmd_populate_kernel()
134 pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep) in pmd_populate() argument
144 __pmd_populate(pmdp, page_to_phys(ptep), prot); in pmd_populate()
/kernel/linux/linux-5.10/include/linux/
Dpgtable.h158 unsigned long address, pmd_t *pmdp,
165 unsigned long address, pmd_t *pmdp, in pmdp_set_access_flags() argument
200 pmd_t *pmdp) in pmdp_test_and_clear_young() argument
202 pmd_t pmd = *pmdp; in pmdp_test_and_clear_young()
207 set_pmd_at(vma->vm_mm, address, pmdp, pmd_mkold(pmd)); in pmdp_test_and_clear_young()
213 pmd_t *pmdp) in pmdp_test_and_clear_young() argument
229 unsigned long address, pmd_t *pmdp);
236 unsigned long address, pmd_t *pmdp) in pmdp_clear_flush_young() argument
266 pmd_t *pmdp) in pmdp_huge_get_and_clear() argument
268 pmd_t pmd = *pmdp; in pmdp_huge_get_and_clear()
[all …]
/kernel/linux/linux-5.10/arch/x86/include/asm/
Dpgtable-3level.h75 static inline pmd_t pmd_read_atomic(pmd_t *pmdp) in pmd_read_atomic() argument
78 u32 *tmp = (u32 *)pmdp; in pmd_read_atomic()
98 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) in native_set_pmd() argument
100 set_64bit((unsigned long long *)(pmdp), native_pmd_val(pmd)); in native_set_pmd()
174 static inline pmd_t native_pmdp_get_and_clear(pmd_t *pmdp) in native_pmdp_get_and_clear() argument
176 union split_pmd res, *orig = (union split_pmd *)pmdp; in native_pmdp_get_and_clear()
192 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish() argument
204 ptr = (union split_pmd *)pmdp; in pmdp_establish()
216 old = *pmdp; in pmdp_establish()
217 } while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); in pmdp_establish()
/kernel/linux/linux-5.10/arch/powerpc/include/asm/book3s/64/
Dhash-4k.h109 static inline char *get_hpte_slot_array(pmd_t *pmdp) in get_hpte_slot_array() argument
152 unsigned long addr, pmd_t *pmdp,
155 unsigned long address, pmd_t *pmdp);
156 extern void hash__pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
158 extern pgtable_t hash__pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp);
160 unsigned long addr, pmd_t *pmdp);
Dpgtable.h879 static inline void pmd_clear(pmd_t *pmdp) in pmd_clear() argument
886 WARN_ON((pmd_val(*pmdp) & (H_PAGE_HASHPTE | _PAGE_PTE)) == (H_PAGE_HASHPTE | _PAGE_PTE)); in pmd_clear()
888 *pmdp = __pmd(0); in pmd_clear()
1151 pmd_t *pmdp, pmd_t pmd);
1167 pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, in pmd_hugepage_update() argument
1171 return radix__pmd_hugepage_update(mm, addr, pmdp, clr, set); in pmd_hugepage_update()
1172 return hash__pmd_hugepage_update(mm, addr, pmdp, clr, set); in pmd_hugepage_update()
1189 unsigned long addr, pmd_t *pmdp) in __pmdp_test_and_clear_young() argument
1193 if ((pmd_raw(*pmdp) & cpu_to_be64(_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0) in __pmdp_test_and_clear_young()
1195 old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0); in __pmdp_test_and_clear_young()
[all …]
/kernel/linux/linux-5.10/arch/s390/include/asm/
Dpgtable.h908 static inline void pmd_clear(pmd_t *pmdp) in pmd_clear() argument
910 pmd_val(*pmdp) = _SEGMENT_ENTRY_EMPTY; in pmd_clear()
1474 static inline void __pmdp_csp(pmd_t *pmdp) in __pmdp_csp() argument
1476 csp((unsigned int *)pmdp + 1, pmd_val(*pmdp), in __pmdp_csp()
1477 pmd_val(*pmdp) | _SEGMENT_ENTRY_INVALID); in __pmdp_csp()
1487 static __always_inline void __pmdp_idte(unsigned long addr, pmd_t *pmdp, in __pmdp_idte() argument
1493 sto = (unsigned long) pmdp - pmd_index(addr) * sizeof(pmd_t); in __pmdp_idte()
1498 : "+m" (*pmdp) in __pmdp_idte()
1506 : "+m" (*pmdp) in __pmdp_idte()
1547 void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
[all …]
/kernel/linux/linux-5.10/arch/arm/mm/
Dkasan_init.c38 static void __init kasan_pte_populate(pmd_t *pmdp, unsigned long addr, in kasan_pte_populate() argument
42 pte_t *ptep = pte_offset_kernel(pmdp, addr); in kasan_pte_populate()
92 pmd_t *pmdp = pmd_offset(pudp, addr); in kasan_pmd_populate() local
95 if (pmd_none(*pmdp)) { in kasan_pmd_populate()
109 pmd_populate_kernel(&init_mm, pmdp, p); in kasan_pmd_populate()
110 flush_pmd_entry(pmdp); in kasan_pmd_populate()
114 kasan_pte_populate(pmdp, addr, next, early); in kasan_pmd_populate()
115 } while (pmdp++, addr = next, addr != end); in kasan_pmd_populate()

12345