aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-10-31 13:51:57 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-11-23 07:53:20 -0500
commit719301ff1c77b6da7b1b6f78a1e51af64a678619 (patch)
tree86e61436ee5bd1c815e401d50e3e90359b502b73 /arch/arm/include/asm
parentac50e950784cae1c26ad9e09ebd8f8c706131eb3 (diff)
ARM: provide phys_to_page() to complement page_to_phys()
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>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/memory.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index cefedf062138..e0f8f4a4d45f 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -134,6 +134,12 @@
134#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) 134#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
135#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) 135#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
136 136
137/*
138 * Convert a page to/from a physical address
139 */
140#define page_to_phys(page) (__pfn_to_phys(page_to_pfn(page)))
141#define phys_to_page(phys) (pfn_to_page(__phys_to_pfn(phys)))
142
137#ifndef __ASSEMBLY__ 143#ifndef __ASSEMBLY__
138 144
139/* 145/*
@@ -293,11 +299,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
293#endif /* !CONFIG_DISCONTIGMEM */ 299#endif /* !CONFIG_DISCONTIGMEM */
294 300
295/* 301/*
296 * For BIO. "will die". Kill me when bio_to_phys() and bvec_to_phys() die.
297 */
298#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
299
300/*
301 * Optional coherency support. Currently used only by selected 302 * Optional coherency support. Currently used only by selected
302 * Intel XSC3-based systems. 303 * Intel XSC3-based systems.
303 */ 304 */