/linux-6.1.9/include/asm-generic/ |
D | pgtable-nopud.h | 16 typedef struct { p4d_t p4d; } pud_t; member 28 static inline int p4d_none(p4d_t p4d) { return 0; } in p4d_none() argument 29 static inline int p4d_bad(p4d_t p4d) { return 0; } in p4d_bad() argument 30 static inline int p4d_present(p4d_t p4d) { return 1; } in p4d_present() argument 31 static inline void p4d_clear(p4d_t *p4d) { } in p4d_clear() argument 32 #define pud_ERROR(pud) (p4d_ERROR((pud).p4d)) 34 #define p4d_populate(mm, p4d, pud) do { } while (0) argument 35 #define p4d_populate_safe(mm, p4d, pud) do { } while (0) argument 42 static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address) in pud_offset() argument 44 return (pud_t *)p4d; in pud_offset() [all …]
|
/linux-6.1.9/arch/riscv/include/asm/ |
D | pgtable-64.h | 48 unsigned long p4d; member 51 #define p4d_val(x) ((x).p4d) 240 static inline void set_p4d(p4d_t *p4dp, p4d_t p4d) in set_p4d() argument 243 *p4dp = p4d; in set_p4d() 245 set_pud((pud_t *)p4dp, (pud_t){ p4d_val(p4d) }); in set_p4d() 248 static inline int p4d_none(p4d_t p4d) in p4d_none() argument 251 return (p4d_val(p4d) == 0); in p4d_none() 256 static inline int p4d_present(p4d_t p4d) in p4d_present() argument 259 return (p4d_val(p4d) & _PAGE_PRESENT); in p4d_present() 264 static inline int p4d_bad(p4d_t p4d) in p4d_bad() argument [all …]
|
D | pgalloc.h | 42 static inline void p4d_populate(struct mm_struct *mm, p4d_t *p4d, pud_t *pud) in p4d_populate() argument 47 set_p4d(p4d, __p4d((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in p4d_populate() 51 static inline void p4d_populate_safe(struct mm_struct *mm, p4d_t *p4d, in p4d_populate_safe() argument 57 set_p4d_safe(p4d, in p4d_populate_safe() 62 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d) in pgd_populate() argument 65 unsigned long pfn = virt_to_pfn(p4d); in pgd_populate() 72 p4d_t *p4d) in pgd_populate_safe() argument 75 unsigned long pfn = virt_to_pfn(p4d); in pgd_populate_safe() 114 static inline void __p4d_free(struct mm_struct *mm, p4d_t *p4d) in __p4d_free() argument 116 BUG_ON((unsigned long)p4d & (PAGE_SIZE-1)); in __p4d_free() [all …]
|
/linux-6.1.9/mm/kasan/ |
D | init.c | 45 static inline bool kasan_pud_table(p4d_t p4d) in kasan_pud_table() argument 47 return p4d_page(p4d) == virt_to_page(lm_alias(kasan_early_shadow_pud)); in kasan_pud_table() 50 static inline bool kasan_pud_table(p4d_t p4d) in kasan_pud_table() argument 142 static int __ref zero_pud_populate(p4d_t *p4d, unsigned long addr, in zero_pud_populate() argument 145 pud_t *pud = pud_offset(p4d, addr); in zero_pud_populate() 182 p4d_t *p4d = p4d_offset(pgd, addr); in zero_p4d_populate() local 191 p4d_populate(&init_mm, p4d, in zero_p4d_populate() 193 pud = pud_offset(p4d, addr); in zero_p4d_populate() 202 if (p4d_none(*p4d)) { in zero_p4d_populate() 206 p = pud_alloc(&init_mm, p4d, addr); in zero_p4d_populate() [all …]
|
/linux-6.1.9/arch/powerpc/include/asm/nohash/64/ |
D | pgtable-4k.h | 56 #define p4d_none(p4d) (!p4d_val(p4d)) argument 57 #define p4d_bad(p4d) (p4d_val(p4d) == 0) argument 58 #define p4d_present(p4d) (p4d_val(p4d) != 0) argument 62 static inline pud_t *p4d_pgtable(p4d_t p4d) in p4d_pgtable() argument 64 return (pud_t *) (p4d_val(p4d) & ~P4D_MASKED_BITS); in p4d_pgtable() 72 static inline pte_t p4d_pte(p4d_t p4d) in p4d_pte() argument 74 return __pte(p4d_val(p4d)); in p4d_pte() 81 extern struct page *p4d_page(p4d_t p4d);
|
/linux-6.1.9/arch/x86/include/asm/ |
D | pgalloc.h | 113 static inline void p4d_populate(struct mm_struct *mm, p4d_t *p4d, pud_t *pud) in p4d_populate() argument 116 set_p4d(p4d, __p4d(_PAGE_TABLE | __pa(pud))); in p4d_populate() 119 static inline void p4d_populate_safe(struct mm_struct *mm, p4d_t *p4d, pud_t *pud) in p4d_populate_safe() argument 122 set_p4d_safe(p4d, __p4d(_PAGE_TABLE | __pa(pud))); in p4d_populate_safe() 134 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d) in pgd_populate() argument 138 paravirt_alloc_p4d(mm, __pa(p4d) >> PAGE_SHIFT); in pgd_populate() 139 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(p4d))); in pgd_populate() 142 static inline void pgd_populate_safe(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d) in pgd_populate_safe() argument 146 paravirt_alloc_p4d(mm, __pa(p4d) >> PAGE_SHIFT); in pgd_populate_safe() 147 set_pgd_safe(pgd, __pgd(_PAGE_TABLE | __pa(p4d))); in pgd_populate_safe() [all …]
|
D | pgtable_types.h | 312 typedef struct { p4dval_t p4d; } p4d_t; member 319 static inline p4dval_t native_p4d_val(p4d_t p4d) in native_p4d_val() argument 321 return p4d.p4d; in native_p4d_val() 331 static inline p4dval_t native_p4d_val(p4d_t p4d) in native_p4d_val() argument 333 return native_pgd_val(p4d.pgd); in native_p4d_val() 354 return (pud_t) { .p4d.pgd = native_make_pgd(val) }; in native_make_pud() 359 return native_pgd_val(pud.p4d.pgd); in native_pud_val() 380 return (pmd_t) { .pud.p4d.pgd = native_make_pgd(val) }; in native_make_pmd() 385 return native_pgd_val(pmd.pud.p4d.pgd); in native_pmd_val() 389 static inline p4dval_t p4d_pfn_mask(p4d_t p4d) in p4d_pfn_mask() argument [all …]
|
/linux-6.1.9/arch/x86/mm/ |
D | init_64.c | 73 DEFINE_POPULATE(p4d_populate, p4d, pud, init) in DEFINE_POPULATE() argument 74 DEFINE_POPULATE(pgd_populate, pgd, p4d, init) in DEFINE_POPULATE() 88 DEFINE_ENTRY(p4d, p4d, init) 192 p4d_t *p4d; in sync_global_pgds_l4() local 196 p4d = p4d_offset(pgd, addr); in sync_global_pgds_l4() 201 if (!p4d_none(*p4d_ref) && !p4d_none(*p4d)) in sync_global_pgds_l4() 202 BUG_ON(p4d_pgtable(*p4d) in sync_global_pgds_l4() 205 if (p4d_none(*p4d)) in sync_global_pgds_l4() 206 set_p4d(p4d, *p4d_ref); in sync_global_pgds_l4() 252 p4d_t *p4d = (p4d_t *)spp_getpage(); in fill_p4d() local [all …]
|
D | kasan_init_64.c | 103 static void __init kasan_populate_p4d(p4d_t *p4d, unsigned long addr, in kasan_populate_p4d() argument 109 if (p4d_none(*p4d)) { in kasan_populate_p4d() 112 p4d_populate(&init_mm, p4d, p); in kasan_populate_p4d() 115 pud = pud_offset(p4d, addr); in kasan_populate_p4d() 127 p4d_t *p4d; in kasan_populate_pgd() local 135 p4d = p4d_offset(pgd, addr); in kasan_populate_pgd() 138 kasan_populate_p4d(p4d, addr, next, nid); in kasan_populate_pgd() 139 } while (p4d++, addr = next, addr != end); in kasan_populate_pgd() 194 unsigned long p4d; in early_p4d_offset() local 199 p4d = pgd_val(*pgd) & PTE_PFN_MASK; in early_p4d_offset() [all …]
|
D | ident_map.c | 68 p4d_t *p4d = p4d_page + p4d_index(addr); in ident_p4d_init() local 75 if (p4d_present(*p4d)) { in ident_p4d_init() 76 pud = pud_offset(p4d, 0); in ident_p4d_init() 91 set_p4d(p4d, __p4d(__pa(pud) | info->kernpg_flag)); in ident_p4d_init() 114 p4d_t *p4d; in kernel_ident_mapping_init() local 121 p4d = p4d_offset(pgd, 0); in kernel_ident_mapping_init() 122 result = ident_p4d_init(info, p4d, addr, next); in kernel_ident_mapping_init() 128 p4d = (p4d_t *)info->alloc_pgt_page(info->context); in kernel_ident_mapping_init() 129 if (!p4d) in kernel_ident_mapping_init() 131 result = ident_p4d_init(info, p4d, addr, next); in kernel_ident_mapping_init() [all …]
|
D | pti.c | 202 p4d_t *p4d; in pti_user_pagetable_walk_pmd() local 205 p4d = pti_user_pagetable_walk_p4d(address); in pti_user_pagetable_walk_pmd() 206 if (!p4d) in pti_user_pagetable_walk_pmd() 209 BUILD_BUG_ON(p4d_large(*p4d) != 0); in pti_user_pagetable_walk_pmd() 210 if (p4d_none(*p4d)) { in pti_user_pagetable_walk_pmd() 215 set_p4d(p4d, __p4d(_KERNPG_TABLE | __pa(new_pud_page))); in pti_user_pagetable_walk_pmd() 218 pud = pud_offset(p4d, address); in pti_user_pagetable_walk_pmd() 316 p4d_t *p4d; in pti_clone_pgtable() local 326 p4d = p4d_offset(pgd, addr); in pti_clone_pgtable() 327 if (WARN_ON(p4d_none(*p4d))) in pti_clone_pgtable() [all …]
|
/linux-6.1.9/arch/sh/mm/ |
D | hugetlbpage.c | 28 p4d_t *p4d; in huge_pte_alloc() local 35 p4d = p4d_alloc(mm, pgd, addr); in huge_pte_alloc() 36 if (p4d) { in huge_pte_alloc() 37 pud = pud_alloc(mm, p4d, addr); in huge_pte_alloc() 53 p4d_t *p4d; in huge_pte_offset() local 60 p4d = p4d_offset(pgd, addr); in huge_pte_offset() 61 if (p4d) { in huge_pte_offset() 62 pud = pud_offset(p4d, addr); in huge_pte_offset()
|
/linux-6.1.9/arch/s390/mm/ |
D | vmem.c | 311 static int modify_pud_table(p4d_t *p4d, unsigned long addr, unsigned long end, in modify_pud_table() argument 322 pud = pud_offset(p4d, addr); in modify_pud_table() 365 static void try_free_pud_table(p4d_t *p4d, unsigned long start) in try_free_pud_table() argument 379 pud = pud_offset(p4d, start); in try_free_pud_table() 384 vmem_free_pages(p4d_deref(*p4d), CRST_ALLOC_ORDER); in try_free_pud_table() 385 p4d_clear(p4d); in try_free_pud_table() 393 p4d_t *p4d; in modify_p4d_table() local 396 p4d = p4d_offset(pgd, addr); in modify_p4d_table() 397 for (; addr < end; addr = next, p4d++) { in modify_p4d_table() 400 if (p4d_none(*p4d)) in modify_p4d_table() [all …]
|
D | page-states.c | 121 static void mark_kernel_pud(p4d_t *p4d, unsigned long addr, unsigned long end) in mark_kernel_pud() argument 128 pud = pud_offset(p4d, addr); in mark_kernel_pud() 146 p4d_t *p4d; in mark_kernel_p4d() local 149 p4d = p4d_offset(pgd, addr); in mark_kernel_p4d() 152 if (p4d_none(*p4d)) in mark_kernel_p4d() 154 if (!p4d_folded(*p4d)) { in mark_kernel_p4d() 155 page = phys_to_page(p4d_val(*p4d)); in mark_kernel_p4d() 159 mark_kernel_pud(p4d, addr, next); in mark_kernel_p4d() 160 } while (p4d++, addr = next, addr != end); in mark_kernel_p4d()
|
/linux-6.1.9/arch/mips/include/asm/ |
D | pgtable-64.h | 184 static inline int p4d_none(p4d_t p4d) in p4d_none() argument 186 return p4d_val(p4d) == (unsigned long)invalid_pud_table; in p4d_none() 189 static inline int p4d_bad(p4d_t p4d) in p4d_bad() argument 191 if (unlikely(p4d_val(p4d) & ~PAGE_MASK)) in p4d_bad() 197 static inline int p4d_present(p4d_t p4d) in p4d_present() argument 199 return p4d_val(p4d) != (unsigned long)invalid_pud_table; in p4d_present() 207 static inline pud_t *p4d_pgtable(p4d_t p4d) in p4d_pgtable() argument 209 return (pud_t *)p4d_val(p4d); in p4d_pgtable() 212 #define p4d_phys(p4d) virt_to_phys((void *)p4d_val(p4d)) argument 213 #define p4d_page(p4d) (pfn_to_page(p4d_phys(p4d) >> PAGE_SHIFT)) argument [all …]
|
/linux-6.1.9/arch/mips/mm/ |
D | hugetlbpage.c | 28 p4d_t *p4d; in huge_pte_alloc() local 33 p4d = p4d_alloc(mm, pgd, addr); in huge_pte_alloc() 34 pud = pud_alloc(mm, p4d, addr); in huge_pte_alloc() 45 p4d_t *p4d; in huge_pte_offset() local 51 p4d = p4d_offset(pgd, addr); in huge_pte_offset() 52 if (p4d_present(*p4d)) { in huge_pte_offset() 53 pud = pud_offset(p4d, addr); in huge_pte_offset()
|
/linux-6.1.9/arch/arm/mm/ |
D | pgd.c | 145 p4d_t *p4d; in pgd_free() local 157 p4d = p4d_offset(pgd, 0); in pgd_free() 158 if (p4d_none_or_clear_bad(p4d)) in pgd_free() 161 pud = pud_offset(p4d, 0); in pgd_free() 178 p4d_clear(p4d); in pgd_free() 182 p4d_free(mm, p4d); in pgd_free() 193 p4d = p4d_offset(pgd, 0); in pgd_free() 194 if (p4d_none_or_clear_bad(p4d)) in pgd_free() 196 pud = pud_offset(p4d, 0); in pgd_free() 203 p4d_clear(p4d); in pgd_free() [all …]
|
/linux-6.1.9/arch/loongarch/mm/ |
D | hugetlbpage.c | 20 p4d_t *p4d; in huge_pte_alloc() local 25 p4d = p4d_alloc(mm, pgd, addr); in huge_pte_alloc() 26 pud = pud_alloc(mm, p4d, addr); in huge_pte_alloc() 37 p4d_t *p4d; in huge_pte_offset() local 43 p4d = p4d_offset(pgd, addr); in huge_pte_offset() 44 if (p4d_present(*p4d)) { in huge_pte_offset() 45 pud = pud_offset(p4d, addr); in huge_pte_offset()
|
/linux-6.1.9/arch/x86/power/ |
D | hibernate_64.c | 32 p4d_t *p4d = NULL; in set_up_temporary_text_mapping() local 55 p4d = (p4d_t *)get_safe_page(GFP_ATOMIC); in set_up_temporary_text_mapping() 56 if (!p4d) in set_up_temporary_text_mapping() 72 if (p4d) { in set_up_temporary_text_mapping() 74 pgd_t new_pgd = __pgd(__pa(p4d) | pgprot_val(pgtable_prot)); in set_up_temporary_text_mapping() 76 set_p4d(p4d + p4d_index(restore_jump_address), new_p4d); in set_up_temporary_text_mapping()
|
D | hibernate.c | 153 p4d_t *p4d; in relocate_restore_code() local 167 p4d = p4d_offset(pgd, relocated_restore_code); in relocate_restore_code() 168 if (p4d_large(*p4d)) { in relocate_restore_code() 169 set_p4d(p4d, __p4d(p4d_val(*p4d) & ~_PAGE_NX)); in relocate_restore_code() 172 pud = pud_offset(p4d, relocated_restore_code); in relocate_restore_code()
|
/linux-6.1.9/arch/sparc/mm/ |
D | hugetlbpage.c | 285 p4d_t *p4d; in huge_pte_alloc() local 290 p4d = p4d_offset(pgd, addr); in huge_pte_alloc() 291 pud = pud_alloc(mm, p4d, addr); in huge_pte_alloc() 308 p4d_t *p4d; in huge_pte_offset() local 315 p4d = p4d_offset(pgd, addr); in huge_pte_offset() 316 if (p4d_none(*p4d)) in huge_pte_offset() 318 pud = pud_offset(p4d, addr); in huge_pte_offset() 463 static void hugetlb_free_pud_range(struct mmu_gather *tlb, p4d_t *p4d, in hugetlb_free_pud_range() argument 472 pud = pud_offset(p4d, addr); in hugetlb_free_pud_range() 495 pud = pud_offset(p4d, start); in hugetlb_free_pud_range() [all …]
|
/linux-6.1.9/arch/parisc/mm/ |
D | hugetlbpage.c | 51 p4d_t *p4d; in huge_pte_alloc() local 64 p4d = p4d_offset(pgd, addr); in huge_pte_alloc() 65 pud = pud_alloc(mm, p4d, addr); in huge_pte_alloc() 78 p4d_t *p4d; in huge_pte_offset() local 87 p4d = p4d_offset(pgd, addr); in huge_pte_offset() 88 if (!p4d_none(*p4d)) { in huge_pte_offset() 89 pud = pud_offset(p4d, addr); in huge_pte_offset()
|
/linux-6.1.9/arch/ia64/mm/ |
D | hugetlbpage.c | 33 p4d_t *p4d; in huge_pte_alloc() local 39 p4d = p4d_offset(pgd, taddr); in huge_pte_alloc() 40 pud = pud_alloc(mm, p4d, taddr); in huge_pte_alloc() 54 p4d_t *p4d; in huge_pte_offset() local 61 p4d = p4d_offset(pgd, addr); in huge_pte_offset() 62 if (p4d_present(*p4d)) { in huge_pte_offset() 63 pud = pud_offset(p4d, taddr); in huge_pte_offset()
|
/linux-6.1.9/arch/powerpc/mm/ |
D | pgtable_64.c | 101 struct page *p4d_page(p4d_t p4d) in p4d_page() argument 103 if (p4d_is_leaf(p4d)) { in p4d_page() 105 VM_WARN_ON(!p4d_huge(p4d)); in p4d_page() 106 return pte_page(p4d_pte(p4d)); in p4d_page() 108 return virt_to_page(p4d_pgtable(p4d)); in p4d_page()
|
/linux-6.1.9/arch/um/kernel/ |
D | tlb.c | 273 static inline int update_pud_range(p4d_t *p4d, unsigned long addr, in update_pud_range() argument 281 pud = pud_offset(p4d, addr); in update_pud_range() 299 p4d_t *p4d; in update_p4d_range() local 303 p4d = p4d_offset(pgd, addr); in update_p4d_range() 306 if (!p4d_present(*p4d)) { in update_p4d_range() 307 if (hvc->force || p4d_newpage(*p4d)) { in update_p4d_range() 309 p4d_mkuptodate(*p4d); in update_p4d_range() 312 ret = update_pud_range(p4d, addr, next, hvc); in update_p4d_range() 313 } while (p4d++, addr = next, ((addr < end) && !ret)); in update_p4d_range() 355 p4d_t *p4d; in flush_tlb_kernel_range_common() local [all …]
|