Skip to content

Commit 0871b72

Browse files
author
Russell King
committed
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>
1 parent bac51ad commit 0871b72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/arm/include/asm/memory.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
286286
*/
287287
static inline phys_addr_t __virt_to_idmap(unsigned long x)
288288
{
289-
if (arch_virt_to_idmap)
289+
if (IS_ENABLED(CONFIG_MMU) && arch_virt_to_idmap)
290290
return arch_virt_to_idmap(x);
291291
else
292292
return __virt_to_phys(x);

0 commit comments

Comments
 (0)