| /linux-6.15/include/asm-generic/ |
| H A D | pgtable-nop4d.h | 9 typedef struct { pgd_t pgd; } p4d_t; 21 static inline int pgd_none(pgd_t pgd) { return 0; } in pgd_none() 22 static inline int pgd_bad(pgd_t pgd) { return 0; } in pgd_bad() 23 static inline int pgd_present(pgd_t pgd) { return 1; } in pgd_present() 24 static inline void pgd_clear(pgd_t *pgd) { } in pgd_clear() 35 static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address) in p4d_offset()
|
| /linux-6.15/arch/x86/power/ |
| H A D | hibernate_32.c | 19 pgd_t *resume_pg_dir; 30 static pmd_t *resume_one_md_table_init(pgd_t *pgd) in resume_one_md_table_init() 81 static int resume_physical_mapping_init(pgd_t *pgd_base) in resume_physical_mapping_init() 84 pgd_t *pgd; in resume_physical_mapping_init() 133 static inline void resume_init_first_level_page_table(pgd_t *pg_dir) in resume_init_first_level_page_table() 145 static int set_up_temporary_text_mapping(pgd_t *pgd_base) in set_up_temporary_text_mapping() 147 pgd_t *pgd; in set_up_temporary_text_mapping() 175 resume_pg_dir = (pgd_t *)get_safe_page(GFP_ATOMIC); in swsusp_arch_resume()
|
| H A D | hibernate_64.c | 28 static int set_up_temporary_text_mapping(pgd_t *pgd) in set_up_temporary_text_mapping() 74 pgd_t new_pgd = __pgd(__pa(p4d) | pgprot_val(pgtable_prot)); in set_up_temporary_text_mapping() 80 pgd_t new_pgd = __pgd(__pa(pud) | pgprot_val(pgtable_prot)); in set_up_temporary_text_mapping() 100 pgd_t *pgd; in set_up_temporary_mappings() 104 pgd = (pgd_t *)get_safe_page(GFP_ATOMIC); in set_up_temporary_mappings()
|
| /linux-6.15/arch/x86/mm/ |
| H A D | pgtable.c | 57 static inline void pgd_list_add(pgd_t *pgd) in pgd_list_add() 64 static inline void pgd_list_del(pgd_t *pgd) in pgd_list_del() 107 static void pgd_dtor(pgd_t *pgd) in pgd_dtor() 237 pgd_t pgd = *pgdp; in mop_up_one_pmd() 291 pgd_t *k_pgd, pmd_t *pmds[]) in pgd_prepopulate_user_pmd() 294 pgd_t *u_pgd = kernel_to_user_pgdp(k_pgd); in pgd_prepopulate_user_pmd() 317 pgd_t *k_pgd, pmd_t *pmds[]) in pgd_prepopulate_user_pmd() 332 #define PGD_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) 392 pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 394 pgd_t *pgd; in pgd_alloc() [all …]
|
| /linux-6.15/arch/openrisc/include/asm/ |
| H A D | pgalloc.h | 42 static inline pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 44 pgd_t *ret = __pgd_alloc(mm, 0); in pgd_alloc() 49 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_alloc() 59 extern inline pgd_t *pgd_alloc(struct mm_struct *mm) 61 return (pgd_t *)get_zeroed_page(GFP_KERNEL);
|
| /linux-6.15/arch/sh/mm/ |
| H A D | pgtable.c | 14 pgd_t *pgd = x; in pgd_ctor() 16 memset(pgd, 0, USER_PTRS_PER_PGD * sizeof(pgd_t)); in pgd_ctor() 19 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_ctor() 34 pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 39 void pgd_free(struct mm_struct *mm, pgd_t *pgd) in pgd_free()
|
| /linux-6.15/arch/powerpc/include/asm/book3s/64/ |
| H A D | pgalloc.h | 25 static inline pgd_t *radix__pgd_alloc(struct mm_struct *mm) in radix__pgd_alloc() 28 return (pgd_t *)__get_free_page(pgtable_gfp_flags(mm, PGALLOC_GFP)); in radix__pgd_alloc() 35 return (pgd_t *) page_address(page); in radix__pgd_alloc() 39 static inline void radix__pgd_free(struct mm_struct *mm, pgd_t *pgd) in radix__pgd_free() 48 static inline pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 50 pgd_t *pgd; in pgd_alloc() 81 static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) in pgd_free()
|
| /linux-6.15/arch/powerpc/include/asm/ |
| H A D | pgtable-types.h | 53 typedef struct { unsigned long long pgd; } pgd_t; typedef 55 static inline unsigned long long pgd_val(pgd_t x) in pgd_val() 60 typedef struct { unsigned long pgd; } pgd_t; typedef 62 static inline unsigned long pgd_val(pgd_t x) in pgd_val() 67 #define __pgd(x) ((pgd_t) { (x) })
|
| H A D | pgtable-be-types.h | 53 typedef struct { __be64 pgd; } pgd_t; typedef 54 #define __pgd(x) ((pgd_t) { cpu_to_be64(x) }) 55 #define __pgd_raw(x) ((pgd_t) { (x) }) 56 static inline unsigned long pgd_val(pgd_t x) in pgd_val() 61 static inline __be64 pgd_raw(pgd_t x) in pgd_raw()
|
| /linux-6.15/arch/m68k/include/asm/ |
| H A D | mcf_pgalloc.h | 26 extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address) in pmd_alloc_kernel() 74 static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) in pgd_free() 79 static inline pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 81 pgd_t *new_pgd; in pgd_alloc() 90 memcpy(new_pgd, swapper_pg_dir, PTRS_PER_PGD * sizeof(pgd_t)); in pgd_alloc()
|
| /linux-6.15/arch/riscv/include/asm/ |
| H A D | pgalloc.h | 62 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d) in pgd_populate() 71 static inline void pgd_populate_safe(struct mm_struct *mm, pgd_t *pgd, in pgd_populate_safe() 104 static inline void sync_kernel_mappings(pgd_t *pgd) in sync_kernel_mappings() 108 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in sync_kernel_mappings() 111 static inline pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 113 pgd_t *pgd; in pgd_alloc()
|
| H A D | pgtable-64.h | 343 static inline void set_pgd(pgd_t *pgdp, pgd_t pgd) in set_pgd() 351 static inline int pgd_none(pgd_t pgd) in pgd_none() 359 static inline int pgd_present(pgd_t pgd) in pgd_present() 367 static inline int pgd_bad(pgd_t pgd) in pgd_bad() 375 static inline void pgd_clear(pgd_t *pgd) in pgd_clear() 381 static inline p4d_t *pgd_pgtable(pgd_t pgd) in pgd_pgtable() 390 static inline struct page *pgd_page(pgd_t pgd) in pgd_page() 399 p4d_t *p4d_offset(pgd_t *pgd, unsigned long address); 415 static inline int pgd_devmap(pgd_t pgd) in pgd_devmap()
|
| /linux-6.15/arch/arm64/include/asm/ |
| H A D | pgalloc.h | 20 #define PGD_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) 74 static inline void __pgd_populate(pgd_t *pgdp, phys_addr_t p4dp, pgdval_t prot) in __pgd_populate() 80 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgdp, p4d_t *p4dp) in pgd_populate() 89 static inline void __pgd_populate(pgd_t *pgdp, phys_addr_t p4dp, pgdval_t prot) in __pgd_populate() 95 extern pgd_t *pgd_alloc(struct mm_struct *mm); 96 extern void pgd_free(struct mm_struct *mm, pgd_t *pgdp);
|
| /linux-6.15/arch/arm/mm/ |
| H A D | pgd.c | 20 #define _pgd_alloc(mm) kmalloc_array(PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL | __GFP_ZERO) 30 pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 32 pgd_t *new_pgd, *init_pgd; in pgd_alloc() 47 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_alloc() 49 clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); in pgd_alloc() 140 void pgd_free(struct mm_struct *mm, pgd_t *pgd_base) in pgd_free() 142 pgd_t *pgd; in pgd_free()
|
| /linux-6.15/arch/nios2/mm/ |
| H A D | pgtable.c | 37 static void pgd_init(pgd_t *pgd) in pgd_init() 54 pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 56 pgd_t *ret, *init; in pgd_alloc() 63 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_alloc()
|
| /linux-6.15/arch/csky/include/asm/ |
| H A D | pgalloc.h | 42 static inline pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 44 pgd_t *ret; in pgd_alloc() 45 pgd_t *init; in pgd_alloc() 52 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_alloc()
|
| /linux-6.15/arch/hexagon/include/asm/ |
| H A D | pgalloc.h | 21 static inline pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 23 pgd_t *pgd; in pgd_alloc() 35 memcpy(pgd, swapper_pg_dir, PTRS_PER_PGD*sizeof(pgd_t)); in pgd_alloc() 83 pmdindex = (pgd_t *)pmd - mm->pgd; in pmd_populate_kernel()
|
| /linux-6.15/arch/powerpc/include/asm/nohash/ |
| H A D | pgalloc.h | 20 static inline pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 22 pgd_t *pgd = kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE), in pgd_alloc() 27 (MAX_PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_alloc() 32 static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) in pgd_free()
|
| /linux-6.15/arch/mips/mm/ |
| H A D | pgtable.c | 11 pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 13 pgd_t *init, *ret; in pgd_alloc() 20 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_alloc()
|
| /linux-6.15/arch/sh/include/asm/ |
| H A D | mmu_context_32.h | 42 static inline void set_TTB(pgd_t *pgd) in set_TTB() 47 static inline pgd_t *get_TTB(void) in get_TTB() 49 return (pgd_t *)__raw_readl(MMU_TTB); in get_TTB()
|
| /linux-6.15/arch/x86/include/asm/ |
| H A D | pgtable.h | 27 extern pgd_t early_top_pgt[PTRS_PER_PGD]; 956 pgd_t __pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd); 963 static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) in pti_set_user_pgtbl() 970 static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) in pti_set_user_pgtbl() 1209 static inline int pgd_bad(pgd_t pgd) in pgd_bad() 1222 static inline int pgd_none(pgd_t pgd) in pgd_none() 1251 extern pgd_t trampoline_pgd_entry; 1506 static inline pgd_t *kernel_to_user_pgdp(pgd_t *pgdp) in kernel_to_user_pgdp() 1511 static inline pgd_t *user_to_kernel_pgdp(pgd_t *pgdp) in user_to_kernel_pgdp() 1537 static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) in clone_pgd_range() [all …]
|
| H A D | pgtable_64.h | 27 extern pgd_t init_top_pgt[]; 144 pgd_t pgd; in native_set_p4d() 153 pgd = pti_set_user_pgtbl((pgd_t *)p4dp, pgd); in native_set_p4d() 162 static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd) in native_set_pgd() 167 static inline void native_pgd_clear(pgd_t *pgd) in native_pgd_clear()
|
| /linux-6.15/arch/riscv/kernel/ |
| H A D | hibernate.c | 32 static pgd_t *resume_pg_dir; 273 static int temp_pgtable_map_p4d(pgd_t *dst_pgdp, pgd_t *src_pgdp, unsigned long start, in temp_pgtable_map_p4d() 312 static int temp_pgtable_mapping(pgd_t *pgdp, unsigned long start, unsigned long end, pgprot_t prot) in temp_pgtable_mapping() 314 pgd_t *dst_pgdp = pgd_offset_pgd(pgdp, start); in temp_pgtable_mapping() 315 pgd_t *src_pgdp = pgd_offset_k(start); in temp_pgtable_mapping() 320 pgd_t pgd = READ_ONCE(*src_pgdp); in temp_pgtable_mapping() 364 resume_pg_dir = (pgd_t *)get_safe_page(GFP_ATOMIC); in swsusp_arch_resume()
|
| /linux-6.15/arch/um/kernel/ |
| H A D | mem.c | 51 pgd_t swapper_pg_dir[PTRS_PER_PGD]; 127 pgd_t *pgd_base) in fixrange_init() 129 pgd_t *pgd; in fixrange_init() 212 pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() 214 pgd_t *pgd = __pgd_alloc(mm, 0); in pgd_alloc() 219 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); in pgd_alloc()
|
| /linux-6.15/arch/arm64/mm/ |
| H A D | kasan_init.c | 26 static pgd_t tmp_pg_dir[PTRS_PER_PTE] __initdata __aligned(PAGE_SIZE); 102 static p4d_t *__init kasan_p4d_offset(pgd_t *pgdp, unsigned long addr, int node, in kasan_p4d_offset() 156 static void __init kasan_p4d_populate(pgd_t *pgdp, unsigned long addr, in kasan_p4d_populate() 172 pgd_t *pgdp; in kasan_pgd_populate() 218 pgd_t *pgdp = pgd_offset_k(KASAN_SHADOW_START); in kasan_early_init() 256 static void __init clone_next_level(u64 addr, pgd_t *tmp_pg_dir, pud_t *pud) in clone_next_level() 259 pgd_t pgd = READ_ONCE(swapper_pg_dir[idx]); in clone_next_level() 283 pgd_t pgd = READ_ONCE(swapper_pg_dir[pgd_idx]); in clear_next_level() 297 memset(&swapper_pg_dir[l], 0, (m - l) * sizeof(pgd_t)); in clear_shadow()
|