]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: Use arch_virt_to_idmap() only when available
authorThierry Reding <treding@nvidia.com>
Mon, 21 Oct 2013 15:25:43 +0000 (17:25 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 24 Oct 2013 13:03:01 +0000 (15:03 +0200)
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 <treding@nvidia.com>
arch/arm/include/asm/memory.h

index 6748d6295a1a07ec23738d660dafb88489f99595..38f243796d5e82f4effb4d1efaa4193130343ae8 100644 (file)
@@ -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);
 }