diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-07-17 05:33:04 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-07-17 10:08:40 -0400 |
commit | 0871b7248113ebfccbfabcd3fd1f867a2bc681f4 (patch) | |
tree | 89a5fddb18c7133654d3e53c0e84a3eebbd4ed7b | |
parent | bac51ad9d14f6baed3730ef53bedc1eb2238563a (diff) |
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 <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/include/asm/memory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 6f225acc07c5..b7f6fb462ea0 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); | |||
286 | */ | 286 | */ |
287 | static inline phys_addr_t __virt_to_idmap(unsigned long x) | 287 | static inline phys_addr_t __virt_to_idmap(unsigned long x) |
288 | { | 288 | { |
289 | if (arch_virt_to_idmap) | 289 | if (IS_ENABLED(CONFIG_MMU) && arch_virt_to_idmap) |
290 | return arch_virt_to_idmap(x); | 290 | return arch_virt_to_idmap(x); |
291 | else | 291 | else |
292 | return __virt_to_phys(x); | 292 | return __virt_to_phys(x); |