]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/hexagon/include/asm/page.h
Hexagon: use correct translations for DMA mappings
[karo-tx-linux.git] / arch / hexagon / include / asm / page.h
index f3b26f14a7c787d40a671dbd96bfb6ee041be8e0..93f5669b4aa1a8c56bea29e999ce8b25c2306b9e 100644 (file)
@@ -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