Commit 719301ff authored by Russell King's avatar Russell King

ARM: provide phys_to_page() to complement page_to_phys()

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Tested-By: default avatarJamie Iles <jamie@jamieiles.com>
Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent ac50e950
...@@ -134,6 +134,12 @@ ...@@ -134,6 +134,12 @@
#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) #define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
#define __pfn_to_phys(pfn) ((pfn) << 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__ #ifndef __ASSEMBLY__
/* /*
...@@ -292,11 +298,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) ...@@ -292,11 +298,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
#endif /* !CONFIG_DISCONTIGMEM */ #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 * Optional coherency support. Currently used only by selected
* Intel XSC3-based systems. * Intel XSC3-based systems.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment