Re: [PATCH v2 08/10] mm/vma: Use unmap_desc in exit_mmap() and vms_clear_ptes()
From: Andrew Morton
Date: Fri Jan 16 2026 - 22:25:51 EST
On Fri, 16 Jan 2026 17:07:06 -0800 SeongJae Park <sj@xxxxxxxxxx> wrote:
> > > Suspect you need to add:
> > >
> > > #include <linux/pgtable.h>
> > >
> > > to mm/vma_internal.h.
> > >
> > > Some arches don't define it and that header has:
> > >
> > > #ifndef USER_PGTABLES_CEILING
> > > #define USER_PGTABLES_CEILING 0UL
> > > #endif
> > >
> > > ...
> > >
> > > #ifndef FIRST_USER_ADDRESS
> > > #define FIRST_USER_ADDRESS 0UL
> > > #endif
>
> But the macro definitions are enclosed by '#ifdef CONFIG_MMU'. I have
> !CONFIG_MMU build test, which shows similar errors, even after Lorenzo's
> suggestion is applied. Should we move the definitions out of the '#ifdef
> CONFIG_MMU', or implement another unmap_all_init() for !CONFIG_MMU case?
>
> I confirmed a simple version of the first option (moving definitions out of
> CONFIG_MMU, in addition to including pgtable.h) like below works at least for
> my !CONFIG_MMU test.
>
Worked for me, thanks. I also unbreaks arm allnoconfig. I usually run
that but I must have missed this time.
I understand that v3 is in the works. Meanwhile I'll include your patch to
make mm-new a happier place.