Message ID | 20230612210423.18611-33-vishal.moola@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Split ptdesc from struct page | expand |
Context | Check | Description |
---|---|---|
conchuod/tree_selection | fail | Failed to apply to next/pending-fixes, riscv/for-next or riscv/master |
On Mon, Jun 12, 2023 at 02:04:21PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable pte constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> Acked-by: Mike Rapoport (IBM) <rppt@kernel.org> > --- > arch/sparc/mm/srmmu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c > index 13f027afc875..8393faa3e596 100644 > --- a/arch/sparc/mm/srmmu.c > +++ b/arch/sparc/mm/srmmu.c > @@ -355,7 +355,8 @@ pgtable_t pte_alloc_one(struct mm_struct *mm) > return NULL; > page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); > spin_lock(&mm->page_table_lock); > - if (page_ref_inc_return(page) == 2 && !pgtable_pte_page_ctor(page)) { > + if (page_ref_inc_return(page) == 2 && > + !pagetable_pte_ctor(page_ptdesc(page))) { > page_ref_dec(page); > ptep = NULL; > } > @@ -371,7 +372,7 @@ void pte_free(struct mm_struct *mm, pgtable_t ptep) > page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); > spin_lock(&mm->page_table_lock); > if (page_ref_dec_return(page) == 1) > - pgtable_pte_page_dtor(page); > + pagetable_pte_dtor(page_ptdesc(page)); > spin_unlock(&mm->page_table_lock); > > srmmu_free_nocache(ptep, SRMMU_PTE_TABLE_SIZE); > -- > 2.40.1 > >
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 13f027afc875..8393faa3e596 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -355,7 +355,8 @@ pgtable_t pte_alloc_one(struct mm_struct *mm) return NULL; page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); spin_lock(&mm->page_table_lock); - if (page_ref_inc_return(page) == 2 && !pgtable_pte_page_ctor(page)) { + if (page_ref_inc_return(page) == 2 && + !pagetable_pte_ctor(page_ptdesc(page))) { page_ref_dec(page); ptep = NULL; } @@ -371,7 +372,7 @@ void pte_free(struct mm_struct *mm, pgtable_t ptep) page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); spin_lock(&mm->page_table_lock); if (page_ref_dec_return(page) == 1) - pgtable_pte_page_dtor(page); + pagetable_pte_dtor(page_ptdesc(page)); spin_unlock(&mm->page_table_lock); srmmu_free_nocache(ptep, SRMMU_PTE_TABLE_SIZE);
Part of the conversions to replace pgtable pte constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> --- arch/sparc/mm/srmmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)