[PATCH v4 07/12] mm: enable MMU_GATHER_RCU_TABLE_FREE for m68k-coldfire

Lorenzo Stoakes (ARM) ljs at kernel.org
Wed Sep 23 04:36:43 PDT 2026


On Wed, Sep 23, 2026 at 09:31:47PM +1000, Greg Ungerer wrote:
> Hi Lorenzo,
>
> On 23/9/26 01:35, Lorenzo Stoakes (ARM) wrote:
> > Similar to sun3, the coldfire variant of m68k uses 2-level page tables.
> >
> > Update its __pte_free_tlb() function to use tlb_remove_ptdesc() in order
> > that, with CONFIG_MMU_GATHER_RCU_TABLE_FREE, page tables are freed under
> > RCU.
> >
> > The page tables occupy a page each and have no odd semantics, so this
> > change suffices to allow enabling of CONFIG_MMU_GATHER_RCU_TABLE_FREE for
> > m68k-coldfire, so do so.
> >
> > This forms part of an overall effort to switch every architecture to this
> > mode.
> >
> > Acked-by: Kiryl Shutsemau (Meta) <kas at kernel.org>
> > Signed-off-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>
>
> Looks good to me for ColdFire, so:
>
> Acked-by: Greg Ungerer <gerg at linux-m68k.org>
>
> Tested and run with no issues I could see on a M5475 ColdFire system, so:
>
> Tested-by: Greg Ungerer <gerg at linux-m68k.org>

Thanks, much appreciated! :)

>
> Regards
> Greg
>
>
>
> > ---
> >  arch/m68k/Kconfig                   | 2 +-
> >  arch/m68k/include/asm/mcf_pgalloc.h | 5 +----
> >  2 files changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
> > index e29610fd1240..6b8ec67c86fd 100644
> > --- a/arch/m68k/Kconfig
> > +++ b/arch/m68k/Kconfig
> > @@ -36,7 +36,7 @@ config M68K
> >  	select HAVE_MOD_ARCH_SPECIFIC
> >  	select HAVE_UID16
> >  	select MMU_GATHER_NO_RANGE if MMU
> > -	select MMU_GATHER_RCU_TABLE_FREE if MMU && SUN3
> > +	select MMU_GATHER_RCU_TABLE_FREE if MMU && (SUN3 || COLDFIRE)
> >  	select MODULES_USE_ELF_REL
> >  	select MODULES_USE_ELF_RELA
> >  	select NO_DMA if !MMU && !COLDFIRE
> > diff --git a/arch/m68k/include/asm/mcf_pgalloc.h b/arch/m68k/include/asm/mcf_pgalloc.h
> > index fc5454d37da3..b53ff0950db2 100644
> > --- a/arch/m68k/include/asm/mcf_pgalloc.h
> > +++ b/arch/m68k/include/asm/mcf_pgalloc.h
> > @@ -39,10 +39,7 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
> >  static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable,
> >  				  unsigned long address)
> >  {
> > -	struct ptdesc *ptdesc = virt_to_ptdesc(pgtable);
> > -
> > -	pagetable_dtor(ptdesc);
> > -	pagetable_free(ptdesc);
> > +	tlb_remove_ptdesc(tlb, virt_to_ptdesc(pgtable));
> >  }
> >
> >  static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
> >
>

--
Cheers, Lorenzo



More information about the linux-um mailing list