/kernel/linux/linux-6.6/arch/powerpc/mm/ |
H A D | pgtable-frag.c | 21 struct ptdesc *ptdesc; in pte_frag_destroy() local 23 ptdesc = virt_to_ptdesc(pte_frag); in pte_frag_destroy() 27 if (atomic_sub_and_test(PTE_FRAG_NR - count, &ptdesc->pt_frag_refcount)) { in pte_frag_destroy() 28 pagetable_pte_dtor(ptdesc); in pte_frag_destroy() 29 pagetable_free(ptdesc); in pte_frag_destroy() 58 struct ptdesc *ptdesc; in __alloc_for_ptecache() local 61 ptdesc = pagetable_alloc(PGALLOC_GFP | __GFP_ACCOUNT, 0); in __alloc_for_ptecache() 62 if (!ptdesc) in __alloc_for_ptecache() 111 struct ptdesc *ptdesc; pte_free_now() local 120 struct ptdesc *ptdesc = virt_to_ptdesc(table); pte_fragment_free() local [all...] |
/kernel/linux/linux-6.6/include/asm-generic/ |
H A D | pgalloc.h | 21 struct ptdesc *ptdesc = pagetable_alloc(GFP_PGTABLE_KERNEL & in __pte_alloc_one_kernel() local 24 if (!ptdesc) in __pte_alloc_one_kernel() 26 return ptdesc_address(ptdesc); in __pte_alloc_one_kernel() 57 * Allocate memory for a page table and ptdesc and runs pagetable_pte_ctor(). 62 * Return: `struct page` referencing the ptdesc or %NULL on error 66 struct ptdesc *ptdesc; in __pte_alloc_one() local 68 ptdesc = pagetable_alloc(gfp, 0); in __pte_alloc_one() 69 if (!ptdesc) in __pte_alloc_one() 106 struct ptdesc *ptdesc = page_ptdesc(pte_page); pte_free() local 129 struct ptdesc *ptdesc; pmd_alloc_one() local 148 struct ptdesc *ptdesc = virt_to_ptdesc(pmd); pmd_free() local 163 struct ptdesc *ptdesc; __pud_alloc_one() local [all...] |
H A D | tlb.h | 489 static inline void tlb_remove_page_ptdesc(struct mmu_gather *tlb, struct ptdesc *pt) in tlb_remove_page_ptdesc()
|
/kernel/linux/linux-6.6/arch/m68k/include/asm/ |
H A D | mcf_pgalloc.h | 17 struct ptdesc *ptdesc = pagetable_alloc((GFP_DMA | __GFP_ZERO) & in pte_alloc_one_kernel() local 20 if (!ptdesc) in pte_alloc_one_kernel() 23 return ptdesc_address(ptdesc); in pte_alloc_one_kernel() 38 struct ptdesc *ptdesc = virt_to_ptdesc(pgtable); in __pte_free_tlb() local 40 pagetable_pte_dtor(ptdesc); in __pte_free_tlb() 41 pagetable_free(ptdesc); in __pte_free_tlb() 46 struct ptdesc *ptdesc in pte_alloc_one() local 62 struct ptdesc *ptdesc = virt_to_ptdesc(pgtable); pte_free() local 82 struct ptdesc *ptdesc = pagetable_alloc((GFP_DMA | __GFP_NOWARN) & pgd_alloc() local [all...] |
/kernel/linux/linux-6.6/arch/s390/mm/ |
H A D | pgalloc.c | 46 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER); in crst_table_alloc() local 48 if (!ptdesc) in crst_table_alloc() 50 arch_set_page_dat(ptdesc_page(ptdesc), CRST_ALLOC_ORDER); in crst_table_alloc() 51 return (unsigned long *) ptdesc_to_virt(ptdesc); in crst_table_alloc() 143 struct ptdesc *ptdesc; in page_table_alloc_pgste() local 146 ptdesc = pagetable_alloc(GFP_KERNEL, 0); in page_table_alloc_pgste() 147 if (ptdesc) { in page_table_alloc_pgste() 148 table = (u64 *)ptdesc_to_virt(ptdesc); in page_table_alloc_pgste() 246 struct ptdesc *ptdesc; page_table_alloc() local 326 struct ptdesc *ptdesc; pte_free_now() local 336 struct ptdesc *ptdesc = virt_to_ptdesc(table); page_table_free() local 384 struct ptdesc *ptdesc = virt_to_ptdesc(table); page_table_free_rcu() local 423 struct ptdesc *ptdesc = virt_to_ptdesc(table); __tlb_remove_table() local 490 struct ptdesc *ptdesc; base_crst_alloc() local [all...] |
/kernel/linux/linux-6.6/arch/mips/include/asm/ |
H A D | pgalloc.h | 68 struct ptdesc *ptdesc; in pmd_alloc_one() local 70 ptdesc = pagetable_alloc(GFP_KERNEL_ACCOUNT, PMD_TABLE_ORDER); in pmd_alloc_one() 71 if (!ptdesc) in pmd_alloc_one() 74 if (!pagetable_pmd_ctor(ptdesc)) { in pmd_alloc_one() 75 pagetable_free(ptdesc); in pmd_alloc_one() 79 pmd = ptdesc_address(ptdesc); in pmd_alloc_one() 93 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, in pud_alloc_one() local 96 if (!ptdesc) in pud_alloc_one() [all...] |
/kernel/linux/linux-6.6/arch/loongarch/include/asm/ |
H A D | pgalloc.h | 58 struct ptdesc *ptdesc; in pmd_alloc_one() local 60 ptdesc = pagetable_alloc(GFP_KERNEL_ACCOUNT, 0); in pmd_alloc_one() 61 if (!ptdesc) in pmd_alloc_one() 64 if (!pagetable_pmd_ctor(ptdesc)) { in pmd_alloc_one() 65 pagetable_free(ptdesc); in pmd_alloc_one() 69 pmd = ptdesc_address(ptdesc); in pmd_alloc_one() 83 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0); in pud_alloc_one() local 85 if (!ptdesc) in pud_alloc_one() [all...] |
/kernel/linux/linux-6.6/arch/arm/include/asm/ |
H A D | tlb.h | 42 struct ptdesc *ptdesc = page_ptdesc(pte); in __pte_free_tlb() local 44 pagetable_pte_dtor(ptdesc); in __pte_free_tlb() 55 tlb_remove_ptdesc(tlb, ptdesc); in __pte_free_tlb() 62 struct ptdesc *ptdesc = virt_to_ptdesc(pmdp); in __pmd_free_tlb() local 64 pagetable_pmd_dtor(ptdesc); in __pmd_free_tlb() 65 tlb_remove_ptdesc(tlb, ptdesc); in __pmd_free_tlb()
|
/kernel/linux/linux-6.6/arch/arm64/include/asm/ |
H A D | tlb.h | 78 struct ptdesc *ptdesc = page_ptdesc(pte); in __pte_free_tlb() local 80 pagetable_pte_dtor(ptdesc); in __pte_free_tlb() 81 tlb_remove_ptdesc(tlb, ptdesc); in __pte_free_tlb() 88 struct ptdesc *ptdesc = virt_to_ptdesc(pmdp); in __pmd_free_tlb() local 90 pagetable_pmd_dtor(ptdesc); in __pmd_free_tlb() 91 tlb_remove_ptdesc(tlb, ptdesc); in __pmd_free_tlb()
|
/kernel/linux/linux-6.6/arch/x86/mm/ |
H A D | pgtable.c | 63 struct ptdesc *ptdesc = virt_to_ptdesc(pmd); in ___pmd_free_tlb() local 72 pagetable_pmd_dtor(ptdesc); in ___pmd_free_tlb() 73 paravirt_tlb_remove_table(tlb, ptdesc_page(ptdesc)); in ___pmd_free_tlb() 95 struct ptdesc *ptdesc = virt_to_ptdesc(pgd); in pgd_list_add() local 97 list_add(&ptdesc->pt_list, &pgd_list); in pgd_list_add() 102 struct ptdesc *ptdesc = virt_to_ptdesc(pgd); in pgd_list_del() local 104 list_del(&ptdesc in pgd_list_del() 216 struct ptdesc *ptdesc; free_pmds() local 240 struct ptdesc *ptdesc = pagetable_alloc(gfp, 0); preallocate_pmds() local [all...] |
/kernel/linux/linux-6.6/arch/powerpc/mm/book3s64/ |
H A D | pgtable.c | 388 struct ptdesc *ptdesc; in __alloc_for_pmdcache() local 393 ptdesc = pagetable_alloc(gfp, 0); in __alloc_for_pmdcache() 394 if (!ptdesc) in __alloc_for_pmdcache() 396 if (!pagetable_pmd_ctor(ptdesc)) { in __alloc_for_pmdcache() 397 pagetable_free(ptdesc); in __alloc_for_pmdcache() 401 atomic_set(&ptdesc->pt_frag_refcount, 1); in __alloc_for_pmdcache() 403 ret = ptdesc_address(ptdesc); in __alloc_for_pmdcache() 418 atomic_set(&ptdesc->pt_frag_refcount, PMD_FRAG_NR); in __alloc_for_pmdcache() 439 struct ptdesc *ptdes in pmd_fragment_free() local [all...] |
H A D | mmu_context.c | 249 struct ptdesc *ptdesc; in pmd_frag_destroy() local 251 ptdesc = virt_to_ptdesc(pmd_frag); in pmd_frag_destroy() 255 if (atomic_sub_and_test(PMD_FRAG_NR - count, &ptdesc->pt_frag_refcount)) { in pmd_frag_destroy() 256 pagetable_pmd_dtor(ptdesc); in pmd_frag_destroy() 257 pagetable_free(ptdesc); in pmd_frag_destroy()
|
/kernel/linux/linux-6.6/arch/mips/mm/ |
H A D | pgtable.c | 14 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, in pgd_alloc() local 17 if (ptdesc) { in pgd_alloc() 18 ret = ptdesc_address(ptdesc); in pgd_alloc()
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | mm.h | 2817 static inline struct ptdesc *virt_to_ptdesc(const void *x) in virt_to_ptdesc() 2822 static inline void *ptdesc_to_virt(const struct ptdesc *pt) in ptdesc_to_virt() 2827 static inline void *ptdesc_address(const struct ptdesc *pt) in ptdesc_address() 2832 static inline bool pagetable_is_reserved(struct ptdesc *pt) in pagetable_is_reserved() 2845 * Return: The ptdesc describing the allocated page tables. 2847 static inline struct ptdesc *pagetable_alloc(gfp_t gfp, unsigned int order) in pagetable_alloc() 2861 static inline void pagetable_free(struct ptdesc *pt) in pagetable_free() 2871 bool ptlock_alloc(struct ptdesc *ptdesc); 2872 void ptlock_free(struct ptdesc *ptdes 2874 ptlock_ptr(struct ptdesc *ptdesc) ptlock_ptr() argument 2883 ptlock_alloc(struct ptdesc *ptdesc) ptlock_alloc() argument 2888 ptlock_free(struct ptdesc *ptdesc) ptlock_free() argument 2892 ptlock_ptr(struct ptdesc *ptdesc) ptlock_ptr() argument 2903 ptlock_init(struct ptdesc *ptdesc) ptlock_init() argument 2928 ptlock_init(struct ptdesc *ptdesc) ptlock_init() argument 2929 ptlock_free(struct ptdesc *ptdesc) ptlock_free() argument 2932 pagetable_pte_ctor(struct ptdesc *ptdesc) pagetable_pte_ctor() argument 2943 pagetable_pte_dtor(struct ptdesc *ptdesc) pagetable_pte_dtor() argument 3008 pmd_ptlock_init(struct ptdesc *ptdesc) pmd_ptlock_init() argument 3016 pmd_ptlock_free(struct ptdesc *ptdesc) pmd_ptlock_free() argument 3033 pmd_ptlock_init(struct ptdesc *ptdesc) pmd_ptlock_init() argument 3034 pmd_ptlock_free(struct ptdesc *ptdesc) pmd_ptlock_free() argument 3047 pagetable_pmd_ctor(struct ptdesc *ptdesc) pagetable_pmd_ctor() argument 3058 pagetable_pmd_dtor(struct ptdesc *ptdesc) pagetable_pmd_dtor() argument [all...] |
H A D | mm_types.h | 394 * struct ptdesc - Memory descriptor for page tables. 399 * @pmd_huge_pte: Protected by ptdesc->ptl, used for THPs. 412 struct ptdesc { struct 446 static_assert(offsetof(struct page, pg) == offsetof(struct ptdesc, pt)) 458 static_assert(sizeof(struct ptdesc) <= sizeof(struct page)); 461 const struct ptdesc *: (const struct page *)(pt), \ 462 struct ptdesc *: (struct page *)(pt))) 465 const struct ptdesc *: (const struct folio *)(pt), \ 466 struct ptdesc *: (struct folio *)(pt))) 469 const struct page *: (const struct ptdesc *)( [all...] |
/kernel/linux/linux-6.6/arch/loongarch/mm/ |
H A D | pgtable.c | 27 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0); in pgd_alloc() local 29 if (ptdesc) { in pgd_alloc() 30 ret = (pgd_t *)ptdesc_address(ptdesc); in pgd_alloc()
|
/kernel/linux/linux-6.6/arch/riscv/mm/ |
H A D | init.c | 365 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0); in alloc_pte_late() local 367 BUG_ON(!ptdesc || !pagetable_pte_ctor(ptdesc)); in alloc_pte_late() 368 return __pa((pte_t *)ptdesc_address(ptdesc)); in alloc_pte_late() 446 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0); in alloc_pmd_late() local 448 BUG_ON(!ptdesc || !pagetable_pmd_ctor(ptdesc)); in alloc_pmd_late() 449 return __pa((pmd_t *)ptdesc_address(ptdesc)); in alloc_pmd_late() [all...] |
/kernel/linux/linux-6.6/arch/sparc/mm/ |
H A D | init_64.c | 2910 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL | __GFP_ZERO, 0); in pte_alloc_one() local 2912 if (!ptdesc) in pte_alloc_one() 2914 if (!pagetable_pte_ctor(ptdesc)) { in pte_alloc_one() 2915 pagetable_free(ptdesc); in pte_alloc_one() 2918 return ptdesc_address(ptdesc); in pte_alloc_one() 2928 struct ptdesc *ptdesc = virt_to_ptdesc(pte); in __pte_free() local 2930 pagetable_pte_dtor(ptdesc); in __pte_free() 2931 pagetable_free(ptdesc); in __pte_free() [all...] |
/kernel/linux/linux-6.6/arch/arm64/mm/ |
H A D | mmu.c | 429 struct ptdesc *ptdesc = page_ptdesc(phys_to_page(pa)); in pgd_pgtable_alloc() local 440 BUG_ON(!pagetable_pte_ctor(ptdesc)); in pgd_pgtable_alloc() 442 BUG_ON(!pagetable_pmd_ctor(ptdesc)); in pgd_pgtable_alloc()
|
/kernel/linux/linux-6.6/arch/arm/mm/ |
H A D | mmu.c | 740 void *ptdesc = pagetable_alloc(GFP_PGTABLE_KERNEL & ~__GFP_HIGHMEM, in late_alloc() local 743 if (!ptdesc || !pagetable_pte_ctor(ptdesc)) in late_alloc() 745 return ptdesc_to_virt(ptdesc); in late_alloc()
|
/kernel/linux/linux-6.6/mm/ |
H A D | memory.c | 6161 bool ptlock_alloc(struct ptdesc *ptdesc) in ptlock_alloc() argument 6168 ptdesc->ptl = ptl; in ptlock_alloc() 6172 void ptlock_free(struct ptdesc *ptdesc) in ptlock_free() argument 6174 kmem_cache_free(page_ptl_cachep, ptdesc->ptl); in ptlock_free()
|