From: Russell King Date: Fri, 17 Jul 2015 09:33:04 +0000 (+0100) Subject: ARM: fix __virt_to_idmap build error on !MMU X-Git-Tag: v4.14-rc1~4646^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0871b7248113ebfccbfabcd3fd1f867a2bc681f4;p=platform%2Fkernel%2Flinux-rpi.git ARM: fix __virt_to_idmap build error on !MMU Fengguang Wu reports that building ARM with !MMU results in the following build error: arch/arm/kernel/built-in.o: In function `__soft_restart': >> :(.text+0x1624): undefined reference to `arch_virt_to_idmap' Fix this by adding an appropriate IS_ENABLED(CONFIG_MMU) into the __virt_to_idmap() inline function. Signed-off-by: Russell King --- diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 6f225ac..b7f6fb4 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -286,7 +286,7 @@ extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x); */ static inline phys_addr_t __virt_to_idmap(unsigned long x) { - if (arch_virt_to_idmap) + if (IS_ENABLED(CONFIG_MMU) && arch_virt_to_idmap) return arch_virt_to_idmap(x); else return __virt_to_phys(x);