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

Wanpeng Li liwanp at linux.vnet.ibm.com
Sun Aug 4 03:54:34 EDT 2013

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’
>   if (pmd_trans_huge(*pmd))
>   ^
>mm/migrate.c:137:3: error: implicit declaration of function ‘pte_offset_map’
>   ptep = pte_offset_map(pmd, addr);

Similar one.


>Signed-off-by: Manjunath Goudar <manjunath.goudar at linaro.org>
>Acked-by: Arnd Bergmann <arnd at linaro.org>
>Cc: Deepak Saxena <dsaxena at linaro.org>
>Cc: IWAMOTO Toshihiro <iwamoto at valinux.co.jp>
>Cc: Hirokazu Takahashi <taka at valinux.co.jp>
>Cc: Dave Hansen <haveblue at us.ibm.com>
>Cc: linux-mm at kvack.org
>Cc: Johannes Weiner <hannes at cmpxchg.org>
>Cc: Michal Hocko <mhocko at suse.cz>
>Cc: Balbir Singh <bsingharora at gmail.com>
>Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>
> mm/Kconfig |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>diff --git a/mm/Kconfig b/mm/Kconfig
>index 256bfd0..ad6b98e 100644
>--- a/mm/Kconfig
>+++ b/mm/Kconfig
>@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
> config CMA
> 	bool "Contiguous Memory Allocator"
>-	depends on HAVE_MEMBLOCK
>+	depends on MMU && HAVE_MEMBLOCK
> 	select MIGRATION
> 	help
>To unsubscribe, send a message with 'unsubscribe linux-mm' in
>the body to majordomo at kvack.org.  For more info on Linux MM,
>see: http://www.linux-mm.org/ .
>Don't email: <a href=mailto:"dont at kvack.org"> email at kvack.org </a>

More information about the linux-arm-kernel mailing list