Re: arch/arm/kernel/setup.c fails to compile for NOMMU

From: Michal Hocko
Date: Fri Aug 25 2017 - 02:45:50 EST


On Thu 24-08-17 17:17:41, Russell King - ARM Linux wrote:
> On Fri, Aug 18, 2017 at 01:24:02PM +0200, Michal Hocko wrote:
> > Hi Russel,
> > I have a battery of configs for compile testing and for some time I've
> > been seeing the following compilation error with nommu config (attached)
> >
> > arch/arm/kernel/setup.c: In function 'reserve_crashkernel':
> > arch/arm/kernel/setup.c:1005:25: error: 'SECTION_SIZE' undeclared (first
> > use in this function)
> > crash_size, SECTION_SIZE);
> >
> > I didn't get to look what is going on here, maybe my config is just too
> > artificial but the primary reason is that SECTION_SIZE is not defined in
> > pgtable-nommu.h. To be honest I am not familiar with nommu very much and
> > it smells like the whole reserve_crashkernel doesn't really make any
> > sense on those configs. Could you have a look what is the best fix
> > please?
>
> Hi,
>
> I suspect that mach-netx has never been tested in nommu configurations
> (ditto for many of the older platforms, which pre-date merging nommu
> support.)
>
> Maybe the best solution is to make these old platforms depend on MMU.
>
> However, I'm wondering whether kexec makes sense for !MMU - that's
> probably something that hasn't been tested and doesn't actually work.
> So maybe another approach would be to make kexec depend on MMU for
> ARM - but I'm afraid I don't really know.

Yeah, I've disabled KEXEC in my testing config. All I do care about is
to test nommu specific code paths in MM code.

> I only have very limited nommu experience.

me too

So what would you say about the following?
---