diff options
Diffstat (limited to 'include/asm-generic/page.h')
-rw-r--r-- | include/asm-generic/page.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h index 75fec18cdc59..351889d1de19 100644 --- a/include/asm-generic/page.h +++ b/include/asm-generic/page.h | |||
@@ -79,8 +79,8 @@ extern unsigned long memory_end; | |||
79 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | 79 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) |
80 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) | 80 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) |
81 | 81 | ||
82 | #define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) | 82 | #define virt_to_page(addr) pfn_to_page(virt_to_pfn(addr)) |
83 | #define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) | 83 | #define page_to_virt(page) pfn_to_virt(page_to_pfn(page)) |
84 | 84 | ||
85 | #ifndef page_to_phys | 85 | #ifndef page_to_phys |
86 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | 86 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) |