Go to the documentation of this file.
11 #ifndef _ASM_VIRTCONVERT_H
12 #define _ASM_VIRTCONVERT_H
20 #include <asm/setup.h>
24 #define phys_to_virt(vaddr) ((void *) ((unsigned long)(vaddr) + PAGE_OFFSET))
25 #define virt_to_phys(vaddr) ((unsigned long) (vaddr) - PAGE_OFFSET)
29 #define phys_to_virt(vaddr) ((void *) (vaddr))
30 #define virt_to_phys(vaddr) ((unsigned long) (vaddr))
34 #define virt_to_bus virt_to_phys
35 #define bus_to_virt phys_to_virt
37 #define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
38 #define page_to_phys(page) virt_to_phys((void *)__page_address(page))