Home
last modified time | relevance | path

Searched refs:ptdesc (Results 1 – 21 of 21) sorted by relevance

/openbmc/linux/arch/powerpc/mm/
H A Dpgtable-frag.c21 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 …]
/openbmc/linux/include/asm-generic/
H A Dpgalloc.h21 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 …]
H A Dtlb.h489 static inline void tlb_remove_page_ptdesc(struct mmu_gather *tlb, struct ptdesc *pt) in tlb_remove_page_ptdesc()
/openbmc/linux/arch/m68k/include/asm/
H A Dmcf_pgalloc.h17 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 …]
/openbmc/linux/arch/s390/mm/
H A Dpgalloc.c46 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()
145 struct ptdesc *ptdesc; in page_table_alloc_pgste() local
148 ptdesc = pagetable_alloc(GFP_KERNEL, 0); in page_table_alloc_pgste()
149 if (ptdesc) { in page_table_alloc_pgste()
150 table = (u64 *)ptdesc_to_virt(ptdesc); in page_table_alloc_pgste()
155 return ptdesc_page(ptdesc); in page_table_alloc_pgste()
248 struct ptdesc *ptdesc; in page_table_alloc() local
[all …]
/openbmc/linux/arch/loongarch/include/asm/
H A Dpgalloc.h58 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()
/openbmc/linux/arch/mips/include/asm/
H A Dpgalloc.h68 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()
/openbmc/linux/arch/arm/include/asm/
H A Dtlb.h42 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()
/openbmc/linux/arch/arm64/include/asm/
H A Dtlb.h78 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()
/openbmc/linux/include/linux/
H A Dmm_types.h412 struct ptdesc { struct
449 static_assert(offsetof(struct page, pg) == offsetof(struct ptdesc, pt)) argument
461 static_assert(sizeof(struct ptdesc) <= sizeof(struct page));
464 const struct ptdesc *: (const struct page *)(pt), \
465 struct ptdesc *: (struct page *)(pt)))
468 const struct ptdesc *: (const struct folio *)(pt), \
469 struct ptdesc *: (struct folio *)(pt)))
472 const struct page *: (const struct ptdesc *)(p), \
473 struct page *: (struct ptdesc *)(p)))
476 static inline void ptdesc_pmd_pts_init(struct ptdesc *ptdesc) in ptdesc_pmd_pts_init() argument
[all …]
H A Dmm.h2797 static inline struct ptdesc *virt_to_ptdesc(const void *x) in virt_to_ptdesc()
2802 static inline void *ptdesc_to_virt(const struct ptdesc *pt) in ptdesc_to_virt()
2807 static inline void *ptdesc_address(const struct ptdesc *pt) in ptdesc_address()
2812 static inline bool pagetable_is_reserved(struct ptdesc *pt) in pagetable_is_reserved()
2827 static inline struct ptdesc *pagetable_alloc(gfp_t gfp, unsigned int order) in pagetable_alloc()
2841 static inline void pagetable_free(struct ptdesc *pt) in pagetable_free()
2851 bool ptlock_alloc(struct ptdesc *ptdesc);
2852 void ptlock_free(struct ptdesc *ptdesc);
2854 static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc) in ptlock_ptr() argument
2856 return ptdesc->ptl; in ptlock_ptr()
[all …]
/openbmc/linux/arch/x86/mm/
H A Dpgtable.c63 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 …]
/openbmc/linux/arch/powerpc/mm/book3s64/
H A Dpgtable.c389 struct ptdesc *ptdesc; in __alloc_for_pmdcache() local
394 ptdesc = pagetable_alloc(gfp, 0); in __alloc_for_pmdcache()
395 if (!ptdesc) in __alloc_for_pmdcache()
397 if (!pagetable_pmd_ctor(ptdesc)) { in __alloc_for_pmdcache()
398 pagetable_free(ptdesc); in __alloc_for_pmdcache()
402 atomic_set(&ptdesc->pt_frag_refcount, 1); in __alloc_for_pmdcache()
404 ret = ptdesc_address(ptdesc); in __alloc_for_pmdcache()
419 atomic_set(&ptdesc->pt_frag_refcount, PMD_FRAG_NR); in __alloc_for_pmdcache()
440 struct ptdesc *ptdesc = virt_to_ptdesc(pmd); in pmd_fragment_free() local
442 if (pagetable_is_reserved(ptdesc)) in pmd_fragment_free()
[all …]
H A Dmmu_context.c249 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()
/openbmc/linux/arch/mips/mm/
H A Dpgtable.c14 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()
/openbmc/linux/arch/loongarch/mm/
H A Dpgtable.c27 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()
/openbmc/linux/arch/riscv/mm/
H A Dinit.c387 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0); in alloc_pte_late() local
389 BUG_ON(!ptdesc || !pagetable_pte_ctor(ptdesc)); in alloc_pte_late()
390 return __pa((pte_t *)ptdesc_address(ptdesc)); in alloc_pte_late()
468 struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0); in alloc_pmd_late() local
470 BUG_ON(!ptdesc || !pagetable_pmd_ctor(ptdesc)); in alloc_pmd_late()
471 return __pa((pmd_t *)ptdesc_address(ptdesc)); in alloc_pmd_late()
/openbmc/linux/arch/sparc/mm/
H A Dinit_64.c2910 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()
/openbmc/linux/arch/arm64/mm/
H A Dmmu.c429 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()
/openbmc/linux/arch/arm/mm/
H A Dmmu.c740 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()
/openbmc/linux/mm/
H A Dmemory.c6156 bool ptlock_alloc(struct ptdesc *ptdesc) in ptlock_alloc() argument
6163 ptdesc->ptl = ptl; in ptlock_alloc()
6167 void ptlock_free(struct ptdesc *ptdesc) in ptlock_free() argument
6169 kmem_cache_free(page_ptl_cachep, ptdesc->ptl); in ptlock_free()