diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 18:00:08 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 18:00:11 +0300 |
commit | 2fc42814d8a9dd757abc7f80fbf11e9247e97d40 (patch) | |
tree | 8216bbfc4fdf9bda4e30c04f415725dd0ef6da4f /arch/arm/include/asm/memory.h | |
parent | c6baa1963c2a76ffdb157e8b9a5a55b30046b125 (diff) | |
parent | 29cb8d0d249f6b8fa33683cc17622ff16ada834c (diff) | |
download | linux-2fc42814d8a9dd757abc7f80fbf11e9247e97d40.tar.xz |
Merge branch 'pending-dma-streaming' (early part) into devel
Diffstat (limited to 'arch/arm/include/asm/memory.h')
-rw-r--r-- | arch/arm/include/asm/memory.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index bc2ff8b28133..5421d82a2572 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -136,6 +136,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__ /* @@ -196,7 +202,8 @@ static inline void *phys_to_virt(unsigned long x) #ifndef __virt_to_bus #define __virt_to_bus __virt_to_phys #define __bus_to_virt __phys_to_virt -#define __pfn_to_bus(x) ((x) << PAGE_SHIFT) +#define __pfn_to_bus(x) __pfn_to_phys(x) +#define __bus_to_pfn(x) __phys_to_pfn(x) #endif static inline __deprecated unsigned long virt_to_bus(void *x) @@ -295,11 +302,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. */ |