/linux-6.6.21/arch/powerpc/mm/ |
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() 64 if (!pagetable_pte_ctor(ptdesc)) { in __alloc_for_ptecache() 65 pagetable_free(ptdesc); in __alloc_for_ptecache() [all …]
|
/linux-6.6.21/include/asm-generic/ |
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() 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() 71 if (!pagetable_pte_ctor(ptdesc)) { in __pte_alloc_one() 72 pagetable_free(ptdesc); in __pte_alloc_one() 76 return ptdesc_page(ptdesc); in __pte_alloc_one() 106 struct ptdesc *ptdesc = page_ptdesc(pte_page); in pte_free() local [all …]
|
D | tlb.h | 489 static inline void tlb_remove_page_ptdesc(struct mmu_gather *tlb, struct ptdesc *pt) in tlb_remove_page_ptdesc()
|
/linux-6.6.21/arch/m68k/include/asm/ |
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 = pagetable_alloc(GFP_DMA | __GFP_ZERO, 0); in pte_alloc_one() local 49 if (!ptdesc) in pte_alloc_one() 51 if (!pagetable_pte_ctor(ptdesc)) { in pte_alloc_one() 52 pagetable_free(ptdesc); in pte_alloc_one() [all …]
|
/linux-6.6.21/arch/s390/mm/ |
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() 153 return ptdesc_page(ptdesc); in page_table_alloc_pgste() 246 struct ptdesc *ptdesc; in page_table_alloc() local [all …]
|
/linux-6.6.21/arch/loongarch/include/asm/ |
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() 87 pud = ptdesc_address(ptdesc); in pud_alloc_one()
|
/linux-6.6.21/arch/mips/include/asm/ |
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() 98 pud = ptdesc_address(ptdesc); in pud_alloc_one()
|
/linux-6.6.21/arch/arm/include/asm/ |
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()
|
/linux-6.6.21/arch/arm64/include/asm/ |
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()
|
/linux-6.6.21/arch/x86/mm/ |
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->pt_list); in pgd_list_del() 216 struct ptdesc *ptdesc; in free_pmds() local 220 ptdesc = virt_to_ptdesc(pmds[i]); in free_pmds() 222 pagetable_pmd_dtor(ptdesc); in free_pmds() [all …]
|
/linux-6.6.21/arch/powerpc/mm/book3s64/ |
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 *ptdesc = virt_to_ptdesc(pmd); in pmd_fragment_free() local 441 if (pagetable_is_reserved(ptdesc)) in pmd_fragment_free() [all …]
|
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()
|
/linux-6.6.21/arch/mips/mm/ |
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()
|
/linux-6.6.21/include/linux/ |
D | mm.h | 2791 static inline struct ptdesc *virt_to_ptdesc(const void *x) in virt_to_ptdesc() 2796 static inline void *ptdesc_to_virt(const struct ptdesc *pt) in ptdesc_to_virt() 2801 static inline void *ptdesc_address(const struct ptdesc *pt) in ptdesc_address() 2806 static inline bool pagetable_is_reserved(struct ptdesc *pt) in pagetable_is_reserved() 2821 static inline struct ptdesc *pagetable_alloc(gfp_t gfp, unsigned int order) in pagetable_alloc() 2835 static inline void pagetable_free(struct ptdesc *pt) in pagetable_free() 2845 bool ptlock_alloc(struct ptdesc *ptdesc); 2846 void ptlock_free(struct ptdesc *ptdesc); 2848 static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc) in ptlock_ptr() argument 2850 return ptdesc->ptl; in ptlock_ptr() [all …]
|
D | mm_types.h | 411 struct ptdesc { struct 445 static_assert(offsetof(struct page, pg) == offsetof(struct ptdesc, pt)) argument 457 static_assert(sizeof(struct ptdesc) <= sizeof(struct page)); 460 const struct ptdesc *: (const struct page *)(pt), \ 461 struct ptdesc *: (struct page *)(pt))) 464 const struct ptdesc *: (const struct folio *)(pt), \ 465 struct ptdesc *: (struct folio *)(pt))) 468 const struct page *: (const struct ptdesc *)(p), \ 469 struct page *: (struct ptdesc *)(p)))
|
/linux-6.6.21/arch/loongarch/mm/ |
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()
|
/linux-6.6.21/arch/riscv/mm/ |
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()
|
/linux-6.6.21/arch/sparc/mm/ |
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()
|
/linux-6.6.21/arch/arm64/mm/ |
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()
|
/linux-6.6.21/arch/arm/mm/ |
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()
|
/linux-6.6.21/mm/ |
D | memory.c | 6125 bool ptlock_alloc(struct ptdesc *ptdesc) in ptlock_alloc() argument 6132 ptdesc->ptl = ptl; in ptlock_alloc() 6136 void ptlock_free(struct ptdesc *ptdesc) in ptlock_free() argument 6138 kmem_cache_free(page_ptl_cachep, ptdesc->ptl); in ptlock_free()
|