diff options
author | Richard Kuo <rkuo@codeaurora.org> | 2013-04-09 03:30:12 +0400 |
---|---|---|
committer | Richard Kuo <rkuo@codeaurora.org> | 2013-05-01 04:40:28 +0400 |
commit | 5e1150542fd1d75fe2b6c3491415c860cdc06be2 (patch) | |
tree | 04b129c2eb46c1d370c7647eb307465bffec45dd /arch/hexagon/include | |
parent | c710f5908768e18d8e8081e917fda362089cb13f (diff) | |
download | linux-5e1150542fd1d75fe2b6c3491415c860cdc06be2.tar.xz |
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 <rkuo@codeaurora.org>
Diffstat (limited to 'arch/hexagon/include')
-rw-r--r-- | arch/hexagon/include/asm/page.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 |