phys_to_virt and __va are preprocessor macros. phys_to_virt:
#if !defined(CONFIG_MMU)
#define virt_to_phys(address) ((unsigned long)(address))
#define phys_to_virt(address) ((void *)(address))
#else
#define virt_to_phys(address) (__pa(address))
#define phys_to_virt(address) (__va(address))
#endif
And __va
#define __va(x) ((void *)((unsigned long) (x)))
If CONFIG_MMU is not defined, then equal.
source
share