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>
*/
static inline phys_addr_t __virt_to_idmap(unsigned long 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
if (arch_virt_to_idmap)
return arch_virt_to_idmap(x);
else
return __virt_to_phys(x);
}
return __virt_to_phys(x);
}