From 5e1150542fd1d75fe2b6c3491415c860cdc06be2 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Mon, 8 Apr 2013 18:30:12 -0500 Subject: Hexagon: use correct translations for DMA mappings With physical offsets, pa<->va translations aren't just based on PAGE_OFFSET anymore. Signed-off-by: Richard Kuo --- arch/hexagon/include/asm/page.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/hexagon/include') diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h index f3b26f14a7c7..93f5669b4aa1 100644 --- a/arch/hexagon/include/asm/page.h +++ b/arch/hexagon/include/asm/page.h @@ -140,6 +140,11 @@ static inline void clear_page(void *page) */ #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) +#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) +#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) + +#define page_to_virt(page) __va(page_to_phys(page)) + /* * For port to Hexagon Virtual Machine, MAYBE we check for attempts * to reference reserved HVM space, but in any case, the VM will be -- cgit v1.2.3