/arch/powerpc/mm/book3s64/ |
D | hash_pgtable.c | 152 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 …]
|
D | radix_pgtable.c | 67 pmd_t *pmdp; in early_map_kernel_page() local 82 pmdp = early_alloc_pgtable(PMD_TABLE_SIZE, nid, in early_map_kernel_page() 84 pud_populate(&init_mm, pudp, pmdp); in early_map_kernel_page() 86 pmdp = pmd_offset(pudp, ea); in early_map_kernel_page() 88 ptep = pmdp_ptep(pmdp); in early_map_kernel_page() 91 if (!pmd_present(*pmdp)) { in early_map_kernel_page() 94 pmd_populate_kernel(&init_mm, pmdp, ptep); in early_map_kernel_page() 96 ptep = pte_offset_kernel(pmdp, ea); in early_map_kernel_page() 117 pmd_t *pmdp; in __map_kernel_page() local 145 pmdp = pmd_alloc(&init_mm, pudp, ea); in __map_kernel_page() [all …]
|
D | pgtable.c | 36 pmd_t *pmdp, pmd_t entry, int dirty) in pmdp_set_access_flags() argument 40 WARN_ON(!pmd_trans_huge(*pmdp) && !pmd_devmap(*pmdp)); in pmdp_set_access_flags() 41 assert_spin_locked(pmd_lockptr(vma->vm_mm, pmdp)); in pmdp_set_access_flags() 43 changed = !pmd_same(*(pmdp), entry); in pmdp_set_access_flags() 49 __ptep_set_access_flags(vma, pmdp_ptep(pmdp), in pmdp_set_access_flags() 56 unsigned long address, pmd_t *pmdp) in pmdp_test_and_clear_young() argument 58 return __pmdp_test_and_clear_young(vma->vm_mm, address, pmdp); in pmdp_test_and_clear_young() 65 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument 73 WARN_ON(pte_hw_valid(pmd_pte(*pmdp)) && !pte_protnone(pmd_pte(*pmdp))); in set_pmd_at() 74 assert_spin_locked(pmd_lockptr(mm, pmdp)); in set_pmd_at() [all …]
|
D | hash_hugepage.c | 22 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/ |
D | pgalloc.h | 40 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmdp) in pmd_free() argument 42 BUG_ON((unsigned long)pmdp & (PAGE_SIZE-1)); in pmd_free() 43 pgtable_pmd_page_dtor(virt_to_page(pmdp)); in pmd_free() 44 free_page((unsigned long)pmdp); in pmd_free() 47 static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot) in __pud_populate() argument 49 set_pud(pudp, __pud(__phys_to_pud_val(pmdp) | prot)); in __pud_populate() 52 static inline void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmdp) in pud_populate() argument 54 __pud_populate(pudp, __pa(pmdp), PMD_TYPE_TABLE); in pud_populate() 57 static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot) in __pud_populate() argument 95 static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t ptep, in __pmd_populate() argument [all …]
|
/arch/powerpc/mm/nohash/ |
D | 40x.c | 104 pmd_t *pmdp; in mmu_mapin_ram() local 107 pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); in mmu_mapin_ram() 108 *pmdp++ = __pmd(val); in mmu_mapin_ram() 109 *pmdp++ = __pmd(val); in mmu_mapin_ram() 110 *pmdp++ = __pmd(val); in mmu_mapin_ram() 111 *pmdp++ = __pmd(val); in mmu_mapin_ram() 119 pmd_t *pmdp; in mmu_mapin_ram() local 122 pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); in mmu_mapin_ram() 123 *pmdp = __pmd(val); in mmu_mapin_ram()
|
D | book3e_pgtable.c | 77 pmd_t *pmdp; in map_kernel_page() local 86 pmdp = pmd_alloc(&init_mm, pudp, ea); in map_kernel_page() 87 if (!pmdp) in map_kernel_page() 89 ptep = pte_alloc_kernel(pmdp, ea); in map_kernel_page() 102 pmdp = early_alloc_pgtable(PMD_TABLE_SIZE); in map_kernel_page() 103 pud_populate(&init_mm, pudp, pmdp); in map_kernel_page() 105 pmdp = pmd_offset(pudp, ea); in map_kernel_page() 106 if (!pmd_present(*pmdp)) { in map_kernel_page() 108 pmd_populate_kernel(&init_mm, pmdp, ptep); in map_kernel_page() 110 ptep = pte_offset_kernel(pmdp, ea); in map_kernel_page()
|
/arch/powerpc/include/asm/nohash/32/ |
D | pgalloc.h | 17 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/unicore32/include/asm/ |
D | pgalloc.h | 57 static inline void __pmd_populate(pmd_t *pmdp, unsigned long pmdval) in __pmd_populate() argument 59 set_pmd(pmdp, __pmd(pmdval)); in __pmd_populate() 60 flush_pmd_entry(pmdp); in __pmd_populate() 68 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) in pmd_populate_kernel() argument 76 __pmd_populate(pmdp, __pa(pte_ptr) | _PAGE_KERNEL_TABLE); in pmd_populate_kernel() 80 pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep) in pmd_populate() argument 82 __pmd_populate(pmdp, in pmd_populate()
|
/arch/sparc/mm/ |
D | tlb.c | 220 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument 222 pmd_t orig = *pmdp; in set_pmd_at() 224 *pmdp = pmd; in set_pmd_at() 229 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish() argument 234 old = *pmdp; in pmdp_establish() 235 } while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); in pmdp_establish() 245 pmd_t *pmdp) in pmdp_invalidate() argument 249 entry = __pmd(pmd_val(*pmdp) & ~_PAGE_VALID); in pmdp_invalidate() 250 old = pmdp_establish(vma, address, pmdp, entry); in pmdp_invalidate() 265 void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, in pgtable_trans_huge_deposit() argument [all …]
|
/arch/s390/mm/ |
D | pageattr.c | 84 static int walk_pte_level(pmd_t *pmdp, unsigned long addr, unsigned long end, in walk_pte_level() argument 89 ptep = pte_offset(pmdp, addr); in walk_pte_level() 110 static int split_pmd_page(pmd_t *pmdp, unsigned long addr) in split_pmd_page() argument 120 pte_addr = pmd_pfn(*pmdp) << PAGE_SHIFT; in split_pmd_page() 121 ro = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_PROTECT); in split_pmd_page() 122 nx = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_NOEXEC); in split_pmd_page() 133 pgt_set((unsigned long *)pmdp, pmd_val(new), addr, CRDTE_DTT_SEGMENT); in split_pmd_page() 139 static void modify_pmd_page(pmd_t *pmdp, unsigned long addr, in modify_pmd_page() argument 142 pmd_t new = *pmdp; in modify_pmd_page() 152 pgt_set((unsigned long *)pmdp, pmd_val(new), addr, CRDTE_DTT_SEGMENT); in modify_pmd_page() [all …]
|
D | pgtable.c | 343 unsigned long addr, pmd_t *pmdp) in pmdp_idte_local() argument 346 __pmdp_idte(addr, pmdp, IDTE_NODAT | IDTE_GUEST_ASCE, in pmdp_idte_local() 349 __pmdp_idte(addr, pmdp, 0, 0, IDTE_LOCAL); in pmdp_idte_local() 355 unsigned long addr, pmd_t *pmdp) in pmdp_idte_global() argument 358 __pmdp_idte(addr, pmdp, IDTE_NODAT | IDTE_GUEST_ASCE, in pmdp_idte_global() 363 __pmdp_idte(addr, pmdp, 0, 0, IDTE_GLOBAL); in pmdp_idte_global() 367 __pmdp_csp(pmdp); in pmdp_idte_global() 374 unsigned long addr, pmd_t *pmdp) in pmdp_flush_direct() argument 378 old = *pmdp; in pmdp_flush_direct() 384 pmdp_idte_local(mm, addr, pmdp); in pmdp_flush_direct() [all …]
|
D | gmap.c | 907 pmd_t *pmdp; in gmap_pmd_op_walk() local 910 pmdp = (pmd_t *) gmap_table_walk(gmap, gaddr, 1); in gmap_pmd_op_walk() 911 if (!pmdp) in gmap_pmd_op_walk() 916 return pmd_none(*pmdp) ? NULL : pmdp; in gmap_pmd_op_walk() 919 if (pmd_none(*pmdp)) { in gmap_pmd_op_walk() 925 if (!pmd_large(*pmdp)) in gmap_pmd_op_walk() 927 return pmdp; in gmap_pmd_op_walk() 935 static inline void gmap_pmd_op_end(struct gmap *gmap, pmd_t *pmdp) in gmap_pmd_op_end() argument 937 if (pmd_large(*pmdp)) in gmap_pmd_op_end() 956 pmd_t *pmdp, int prot, unsigned long bits) in gmap_protect_pmd() argument [all …]
|
/arch/arm/include/asm/ |
D | pgalloc.h | 111 static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, in __pmd_populate() argument 115 pmdp[0] = __pmd(pmdval); in __pmd_populate() 117 pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); in __pmd_populate() 119 flush_pmd_entry(pmdp); in __pmd_populate() 129 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) in pmd_populate_kernel() argument 134 __pmd_populate(pmdp, __pa(ptep), _PAGE_KERNEL_TABLE); in pmd_populate_kernel() 138 pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep) in pmd_populate() argument 148 __pmd_populate(pmdp, page_to_phys(ptep), prot); in pmd_populate()
|
/arch/arm64/mm/ |
D | mmu.c | 140 static void init_pte(pmd_t *pmdp, unsigned long addr, unsigned long end, in init_pte() argument 145 ptep = pte_set_fixmap_offset(pmdp, addr); in init_pte() 164 static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr, in alloc_init_cont_pte() argument 171 pmd_t pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte() 178 __pmd_populate(pmdp, pte_phys, PMD_TYPE_TABLE); in alloc_init_cont_pte() 179 pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte() 193 init_pte(pmdp, addr, next, phys, __prot); in alloc_init_cont_pte() 204 pmd_t *pmdp; in init_pmd() local 206 pmdp = pmd_set_fixmap_offset(pudp, addr); in init_pmd() 208 pmd_t old_pmd = READ_ONCE(*pmdp); in init_pmd() [all …]
|
D | kasan_init.c | 60 static pte_t *__init kasan_pte_offset(pmd_t *pmdp, unsigned long addr, int node, in kasan_pte_offset() argument 63 if (pmd_none(READ_ONCE(*pmdp))) { in kasan_pte_offset() 67 __pmd_populate(pmdp, pte_phys, PMD_TYPE_TABLE); in kasan_pte_offset() 70 return early ? pte_offset_kimg(pmdp, addr) in kasan_pte_offset() 71 : pte_offset_kernel(pmdp, addr); in kasan_pte_offset() 100 static void __init kasan_pte_populate(pmd_t *pmdp, unsigned long addr, in kasan_pte_populate() argument 104 pte_t *ptep = kasan_pte_offset(pmdp, addr, node, early); in kasan_pte_populate() 121 pmd_t *pmdp = kasan_pmd_offset(pudp, addr, node, early); in kasan_pmd_populate() local 125 kasan_pte_populate(pmdp, addr, next, node, early); in kasan_pmd_populate() 126 } while (pmdp++, addr = next, addr != end && pmd_none(READ_ONCE(*pmdp))); in kasan_pmd_populate()
|
/arch/m68k/include/asm/ |
D | motorola_pgtable.h | 109 static inline void pmd_set(pmd_t *pmdp, pte_t *ptep) in pmd_set() argument 112 unsigned long *ptr = pmdp->pmd; in pmd_set() 120 static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) in pgd_set() argument 122 pgd_val(*pgdp) = _PAGE_TABLE | _PAGE_ACCESSED | __pa(pmdp); in pgd_set() 141 #define pmd_clear(pmdp) ({ \ argument 142 unsigned long *__ptr = pmdp->pmd; \ 218 static inline pte_t *pte_offset_kernel(pmd_t *pmdp, unsigned long address) in pte_offset_kernel() argument 220 return (pte_t *)__pmd_page(*pmdp) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); in pte_offset_kernel() 223 #define pte_offset_map(pmdp,address) ((pte_t *)__pmd_page(*pmdp) + (((address) >> PAGE_SHIFT) & (PT… argument 242 pmd_t *pmdp; in nocache_page() local [all …]
|
D | mcf_pgtable.h | 165 #define pmd_set(pmdp, ptep) do {} while (0) argument 167 static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) in pgd_set() argument 169 pgd_val(*pgdp) = virt_to_phys(pmdp); in pgd_set() 199 static inline void pmd_clear(pmd_t *pmdp) { pmd_val(*pmdp) = 0; } in pmd_clear() argument 363 pmd_t *pmdp; in nocache_page() local 368 pmdp = pmd_offset(dir, addr); in nocache_page() 369 ptep = pte_offset_kernel(pmdp, addr); in nocache_page() 379 pmd_t *pmdp; in cache_page() local 384 pmdp = pmd_offset(dir, addr); in cache_page() 385 ptep = pte_offset_kernel(pmdp, addr); in cache_page() [all …]
|
/arch/x86/include/asm/ |
D | pgtable-3level.h | 73 static inline pmd_t pmd_read_atomic(pmd_t *pmdp) in pmd_read_atomic() argument 76 u32 *tmp = (u32 *)pmdp; in pmd_read_atomic() 96 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) in native_set_pmd() argument 98 set_64bit((unsigned long long *)(pmdp), native_pmd_val(pmd)); in native_set_pmd() 172 static inline pmd_t native_pmdp_get_and_clear(pmd_t *pmdp) in native_pmdp_get_and_clear() argument 174 union split_pmd res, *orig = (union split_pmd *)pmdp; in native_pmdp_get_and_clear() 190 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish() argument 202 ptr = (union split_pmd *)pmdp; in pmdp_establish() 214 old = *pmdp; in pmdp_establish() 215 } while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); in pmdp_establish()
|
/arch/powerpc/include/asm/book3s/64/ |
D | hash-4k.h | 104 static inline char *get_hpte_slot_array(pmd_t *pmdp) in get_hpte_slot_array() argument 147 unsigned long addr, pmd_t *pmdp, 150 unsigned long address, pmd_t *pmdp); 151 extern void hash__pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, 153 extern pgtable_t hash__pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp); 155 unsigned long addr, pmd_t *pmdp);
|
D | hash-64k.h | 189 static inline char *get_hpte_slot_array(pmd_t *pmdp) in get_hpte_slot_array() argument 198 return *(char **)(pmdp + PTRS_PER_PMD); in get_hpte_slot_array() 264 unsigned long addr, pmd_t *pmdp, 267 unsigned long address, pmd_t *pmdp); 268 extern void hash__pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, 270 extern pgtable_t hash__pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp); 272 unsigned long addr, pmd_t *pmdp);
|
/arch/nds32/include/asm/ |
D | pgalloc.h | 44 pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmdp, pte_t * ptep) in pmd_populate_kernel() argument 56 set_pmd(pmdp, __pmd(pmdval)); in pmd_populate_kernel() 60 pmd_populate(struct mm_struct *mm, pmd_t * pmdp, pgtable_t ptep) in pmd_populate() argument 67 set_pmd(pmdp, __pmd(pmdval)); in pmd_populate()
|
/arch/xtensa/include/asm/ |
D | pgalloc.h | 19 #define pmd_populate_kernel(mm, pmdp, ptep) \ argument 20 (pmd_val(*(pmdp)) = ((unsigned long)ptep)) 21 #define pmd_populate(mm, pmdp, page) \ argument 22 (pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
|
/arch/s390/include/asm/ |
D | pgtable.h | 902 static inline void pmd_clear(pmd_t *pmdp) in pmd_clear() argument 904 pmd_val(*pmdp) = _SEGMENT_ENTRY_EMPTY; in pmd_clear() 1426 static inline void __pmdp_csp(pmd_t *pmdp) in __pmdp_csp() argument 1428 csp((unsigned int *)pmdp + 1, pmd_val(*pmdp), in __pmdp_csp() 1429 pmd_val(*pmdp) | _SEGMENT_ENTRY_INVALID); in __pmdp_csp() 1439 static __always_inline void __pmdp_idte(unsigned long addr, pmd_t *pmdp, in __pmdp_idte() argument 1445 sto = (unsigned long) pmdp - pmd_index(addr) * sizeof(pmd_t); in __pmdp_idte() 1450 : "+m" (*pmdp) in __pmdp_idte() 1458 : "+m" (*pmdp) in __pmdp_idte() 1499 void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, [all …]
|
/arch/powerpc/include/asm/book3s/32/ |
D | pgalloc.h | 28 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()
|