Home
last modified time | relevance | path

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

1234

/arch/powerpc/mm/book3s64/
Dhash_pgtable.c152 pmd_t *pmdp; in hash__map_kernel_page() local
162 pmdp = pmd_alloc(&init_mm, pudp, ea); in hash__map_kernel_page()
163 if (!pmdp) in hash__map_kernel_page()
165 ptep = pte_alloc_kernel(pmdp, ea); in hash__map_kernel_page()
191 pmd_t *pmdp, unsigned long clr, in hash__pmd_hugepage_update() argument
198 WARN_ON(!hash__pmd_trans_huge(*pmdp) && !pmd_devmap(*pmdp)); in hash__pmd_hugepage_update()
199 assert_spin_locked(pmd_lockptr(mm, pmdp)); in hash__pmd_hugepage_update()
210 : "=&r" (old_be), "=&r" (tmp), "=m" (*pmdp) in hash__pmd_hugepage_update()
211 : "r" (pmdp), "r" (cpu_to_be64(clr)), "m" (*pmdp), in hash__pmd_hugepage_update()
219 hpte_do_hugepage_flush(mm, addr, pmdp, old); in hash__pmd_hugepage_update()
[all …]
Dpgtable.c39 pmd_t *pmdp, pmd_t entry, int dirty) in pmdp_set_access_flags() argument
43 WARN_ON(!pmd_trans_huge(*pmdp) && !pmd_devmap(*pmdp)); in pmdp_set_access_flags()
44 assert_spin_locked(pmd_lockptr(vma->vm_mm, pmdp)); in pmdp_set_access_flags()
46 changed = !pmd_same(*(pmdp), entry); in pmdp_set_access_flags()
52 __ptep_set_access_flags(vma, pmdp_ptep(pmdp), in pmdp_set_access_flags()
59 unsigned long address, pmd_t *pmdp) in pmdp_test_and_clear_young() argument
61 return __pmdp_test_and_clear_young(vma->vm_mm, address, pmdp); in pmdp_test_and_clear_young()
68 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument
76 WARN_ON(pte_hw_valid(pmd_pte(*pmdp)) && !pte_protnone(pmd_pte(*pmdp))); in set_pmd_at()
77 assert_spin_locked(pmd_lockptr(mm, pmdp)); in set_pmd_at()
[all …]
Dradix_pgtable.c78 pmd_t *pmdp; in early_map_kernel_page() local
94 pmdp = early_alloc_pgtable(PAGE_SIZE, nid, region_start, in early_map_kernel_page()
96 pud_populate(&init_mm, pudp, pmdp); in early_map_kernel_page()
98 pmdp = pmd_offset(pudp, ea); in early_map_kernel_page()
100 ptep = pmdp_ptep(pmdp); in early_map_kernel_page()
103 if (!pmd_present(*pmdp)) { in early_map_kernel_page()
106 pmd_populate_kernel(&init_mm, pmdp, ptep); in early_map_kernel_page()
108 ptep = pte_offset_kernel(pmdp, ea); in early_map_kernel_page()
130 pmd_t *pmdp; in __map_kernel_page() local
159 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()
/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
33 __pud_populate(pudp, __pa(pmdp), pudval); in pud_populate()
36 static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot) in __pud_populate() argument
66 static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t ptep, in __pmd_populate() argument
69 set_pmd(pmdp, __pmd(__phys_to_pmd_val(ptep) | prot)); in __pmd_populate()
77 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) in pmd_populate_kernel() argument
80 __pmd_populate(pmdp, __pa(ptep), PMD_TYPE_TABLE | PMD_TABLE_UXN); in pmd_populate_kernel()
84 pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep) in pmd_populate() argument
[all …]
/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()
/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()
/arch/sparc/mm/
Dtlb.c219 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument
221 pmd_t orig = *pmdp; in set_pmd_at()
223 *pmdp = pmd; in set_pmd_at()
228 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish() argument
233 old = *pmdp; in pmdp_establish()
234 } while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); in pmdp_establish()
244 pmd_t *pmdp) in pmdp_invalidate() argument
248 entry = __pmd(pmd_val(*pmdp) & ~_PAGE_VALID); in pmdp_invalidate()
249 old = pmdp_establish(vma, address, pmdp, entry); in pmdp_invalidate()
264 void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, in pgtable_trans_huge_deposit() argument
[all …]
/arch/s390/mm/
Dpageattr.c84 static int walk_pte_level(pmd_t *pmdp, unsigned long addr, unsigned long end, in walk_pte_level() argument
91 ptep = pte_offset_kernel(pmdp, addr); in walk_pte_level()
112 static int split_pmd_page(pmd_t *pmdp, unsigned long addr) in split_pmd_page() argument
122 pte_addr = pmd_pfn(*pmdp) << PAGE_SHIFT; in split_pmd_page()
123 ro = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_PROTECT); in split_pmd_page()
124 nx = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_NOEXEC); in split_pmd_page()
135 pgt_set((unsigned long *)pmdp, pmd_val(new), addr, CRDTE_DTT_SEGMENT); in split_pmd_page()
141 static void modify_pmd_page(pmd_t *pmdp, unsigned long addr, in modify_pmd_page() argument
144 pmd_t new = *pmdp; in modify_pmd_page()
154 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.c917 pmd_t *pmdp; in gmap_pmd_op_walk() local
920 pmdp = (pmd_t *) gmap_table_walk(gmap, gaddr, 1); in gmap_pmd_op_walk()
921 if (!pmdp) in gmap_pmd_op_walk()
926 return pmd_none(*pmdp) ? NULL : pmdp; in gmap_pmd_op_walk()
929 if (pmd_none(*pmdp)) { in gmap_pmd_op_walk()
935 if (!pmd_large(*pmdp)) in gmap_pmd_op_walk()
937 return pmdp; in gmap_pmd_op_walk()
945 static inline void gmap_pmd_op_end(struct gmap *gmap, pmd_t *pmdp) in gmap_pmd_op_end() argument
947 if (pmd_large(*pmdp)) in gmap_pmd_op_end()
966 pmd_t *pmdp, int prot, unsigned long bits) in gmap_protect_pmd() argument
[all …]
/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()
/arch/arm64/mm/
Dmmu.c157 static void init_pte(pmd_t *pmdp, unsigned long addr, unsigned long end, in init_pte() argument
162 ptep = pte_set_fixmap_offset(pmdp, addr); in init_pte()
181 static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr, in alloc_init_cont_pte() argument
188 pmd_t pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte()
199 __pmd_populate(pmdp, pte_phys, pmdval); in alloc_init_cont_pte()
200 pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte()
214 init_pte(pmdp, addr, next, phys, __prot); in alloc_init_cont_pte()
225 pmd_t *pmdp; in init_pmd() local
227 pmdp = pmd_set_fixmap_offset(pudp, addr); in init_pmd()
229 pmd_t old_pmd = READ_ONCE(*pmdp); in init_pmd()
[all …]
Dkasan_init.c62 static pte_t *__init kasan_pte_offset(pmd_t *pmdp, unsigned long addr, int node, in kasan_pte_offset() argument
65 if (pmd_none(READ_ONCE(*pmdp))) { in kasan_pte_offset()
69 __pmd_populate(pmdp, pte_phys, PMD_TYPE_TABLE); in kasan_pte_offset()
72 return early ? pte_offset_kimg(pmdp, addr) in kasan_pte_offset()
73 : pte_offset_kernel(pmdp, addr); in kasan_pte_offset()
102 static void __init kasan_pte_populate(pmd_t *pmdp, unsigned long addr, in kasan_pte_populate() argument
106 pte_t *ptep = kasan_pte_offset(pmdp, addr, node, early); in kasan_pte_populate()
123 pmd_t *pmdp = kasan_pmd_offset(pudp, addr, node, early); in kasan_pmd_populate() local
127 kasan_pte_populate(pmdp, addr, next, node, early); in kasan_pmd_populate()
128 } 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()
292 pmdp = pmd_alloc(mm, pudp, addr); in huge_pte_alloc()
294 return (pte_t *)pmdp; in huge_pte_alloc()
306 pmd_t *pmdp, pmd; in huge_pte_offset() local
[all …]
/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()
/arch/nds32/include/asm/
Dpgalloc.h36 pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmdp, pte_t * ptep) in pmd_populate_kernel() argument
48 set_pmd(pmdp, __pmd(pmdval)); in pmd_populate_kernel()
52 pmd_populate(struct mm_struct *mm, pmd_t * pmdp, pgtable_t ptep) in pmd_populate() argument
59 set_pmd(pmdp, __pmd(pmdval)); in pmd_populate()
/arch/powerpc/mm/
Dpgtable_32.c44 pmd_t *pmdp = pmd_off_k(addr); in early_ioremap_init() local
47 addr += PGDIR_SIZE, ptep += PTRS_PER_PTE, pmdp++) in early_ioremap_init()
48 pmd_populate_kernel(&init_mm, pmdp, ptep); in early_ioremap_init()
64 pte_t __init *early_pte_alloc_kernel(pmd_t *pmdp, unsigned long va) in early_pte_alloc_kernel() argument
66 if (pmd_none(*pmdp)) { in early_pte_alloc_kernel()
69 pmd_populate_kernel(&init_mm, pmdp, ptep); in early_pte_alloc_kernel()
71 return pte_offset_kernel(pmdp, va); in early_pte_alloc_kernel()
/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);
/arch/xtensa/include/asm/
Dpgalloc.h24 #define pmd_populate_kernel(mm, pmdp, ptep) \ argument
25 (pmd_val(*(pmdp)) = ((unsigned long)ptep))
26 #define pmd_populate(mm, pmdp, page) \ argument
27 (pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
/arch/powerpc/include/asm/book3s/32/
Dpgalloc.h28 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, in pmd_populate_kernel() argument
31 *pmdp = __pmd(__pa(pte) | _PMD_PRESENT); in pmd_populate_kernel()
34 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, in pmd_populate() argument
37 *pmdp = __pmd(__pa(pte_page) | _PMD_PRESENT); in pmd_populate()
/arch/riscv/include/asm/
Dpgtable.h215 static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) in set_pmd() argument
217 *pmdp = pmd; in set_pmd()
220 static inline void pmd_clear(pmd_t *pmdp) in pmd_clear() argument
222 set_pmd(pmdp, __pmd(0)); in pmd_clear()
397 unsigned long address, pmd_t *pmdp) in update_mmu_cache_pmd() argument
399 pte_t *ptep = (pte_t *)pmdp; in update_mmu_cache_pmd()
574 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument
576 return set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)); in set_pmd_at()
593 unsigned long address, pmd_t *pmdp, in pmdp_set_access_flags() argument
596 return ptep_set_access_flags(vma, address, (pte_t *)pmdp, pmd_pte(entry), dirty); in pmdp_set_access_flags()
[all …]
/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()

1234