]> Pileus Git - ~andy/linux/commitdiff
ARM: provide phys_to_page() to complement page_to_phys()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 31 Oct 2009 17:51:57 +0000 (17:51 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 23 Nov 2009 12:53:20 +0000 (12:53 +0000)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-By: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/include/asm/memory.h

index cefedf062138dc579b2eb21ec154bd73afe1f02a..e0f8f4a4d45fd258c7feca0f698c57b385aa13db 100644 (file)
 #define        __phys_to_pfn(paddr)    ((paddr) >> PAGE_SHIFT)
 #define        __pfn_to_phys(pfn)      ((pfn) << PAGE_SHIFT)
 
+/*
+ * Convert a page to/from a physical address
+ */
+#define page_to_phys(page)     (__pfn_to_phys(page_to_pfn(page)))
+#define phys_to_page(phys)     (pfn_to_page(__phys_to_pfn(phys)))
+
 #ifndef __ASSEMBLY__
 
 /*
@@ -292,11 +298,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
 
 #endif /* !CONFIG_DISCONTIGMEM */
 
-/*
- * For BIO.  "will die".  Kill me when bio_to_phys() and bvec_to_phys() die.
- */
-#define page_to_phys(page)     (page_to_pfn(page) << PAGE_SHIFT)
-
 /*
  * Optional coherency support.  Currently used only by selected
  * Intel XSC3-based systems.