From: Thierry Reding Date: Mon, 21 Oct 2013 15:25:43 +0000 (+0200) Subject: ARM: Use arch_virt_to_idmap() only when available X-Git-Tag: next-20131024~2 X-Git-Url: https://git.karo-electronics.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=5bd299abd8a96938727df4925317b65c83511171 ARM: Use arch_virt_to_idmap() only when available The arch_virt_to_idmap variable is only available when patching of the physical to virtual translations at runtime is enabled via the Kconfig ARM_PATCH_PHYS_VIRT option. Signed-off-by: Thierry Reding --- diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 6748d6295a1a..38f243796d5e 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -297,9 +297,11 @@ static inline void *phys_to_virt(phys_addr_t x) */ static inline phys_addr_t __virt_to_idmap(unsigned long x) { +#ifdef CONFIG_ARM_PATCH_VIRT_PHYS if (arch_virt_to_idmap) return arch_virt_to_idmap(x); else +#endif return __virt_to_phys(x); }