diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-31 17:51:57 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-23 12:53:20 +0000 |
commit | 719301ff1c77b6da7b1b6f78a1e51af64a678619 (patch) | |
tree | 86e61436ee5bd1c815e401d50e3e90359b502b73 /arch/arm/include/asm/memory.h | |
parent | ac50e950784cae1c26ad9e09ebd8f8c706131eb3 (diff) | |
download | op-kernel-dev-719301ff1c77b6da7b1b6f78a1e51af64a678619.zip op-kernel-dev-719301ff1c77b6da7b1b6f78a1e51af64a678619.tar.gz |
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/memory.h')
-rw-r--r-- | arch/arm/include/asm/memory.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index cefedf0..e0f8f4a 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -134,6 +134,12 @@ #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__ /* @@ -293,11 +299,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. */ |