[PATCH] MM: Make Contiguous Memory Allocator depends on MMU

Michal Hocko mhocko at suse.cz
Mon Aug 5 03:32:39 EDT 2013


On Mon 05-08-13 10:10:08, Manjunath Goudar wrote:
> On 4 August 2013 13:24, Wanpeng Li <liwanp at linux.vnet.ibm.com> wrote:
> 
> > On Sun, Aug 04, 2013 at 10:41:01AM +0530, Manjunath Goudar wrote:
> > >s patch adds a Kconfig dependency on an MMU being available before
> > >CMA can be enabled.  Without this patch, CMA can be enabled on an
> > >MMU-less system which can lead to issues. This was discovered during
> > >randconfig testing, in which CMA was enabled w/o MMU being enabled,
> > >leading to the following error:
> > >
> > > CC      mm/migrate.o
> > >mm/migrate.c: In function ‘remove_migration_pte’:
> > >mm/migrate.c:134:3: error: implicit declaration of function
> > ‘pmd_trans_huge’
> > >[-Werror=implicit-function-declaration]
> > >   if (pmd_trans_huge(*pmd))
> > >   ^
> > >mm/migrate.c:137:3: error: implicit declaration of function
> > ‘pte_offset_map’
> > >[-Werror=implicit-function-declaration]
> > >   ptep = pte_offset_map(pmd, addr);
> > >
> >
> > Similar one.
> >
> > http://marc.info/?l=linux-mm&m=137532486405085&w=2
> 
> 
> In this patch MIGRATION config is not required MMU, because already CMA
> config depends
> on MMU and HAVE_MEMBLOCK if both are true then only selecting MIGRATION and
> MEMORY_ISOLATION.

No, I think it should be config MIGRATION that should depend on MMU
explicitly because that is where the problem exists. It shouldn't rely
on other configs to not select it automatically.

The question is. Does CMA need to depend on MMU as well? Why?
But please comment on the original thread instead.
-- 
Michal Hocko
SUSE Labs



More information about the linux-arm-kernel mailing list