diff options
-rw-r--r-- | arch/arm/include/asm/memory.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 2398b3fc0268..431077c5a867 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/const.h> | 17 | #include <linux/const.h> |
18 | #include <linux/types.h> | ||
18 | #include <mach/memory.h> | 19 | #include <mach/memory.h> |
19 | #include <asm/sizes.h> | 20 | #include <asm/sizes.h> |
20 | 21 | ||
@@ -135,8 +136,8 @@ | |||
135 | /* | 136 | /* |
136 | * Convert a physical address to a Page Frame Number and back | 137 | * Convert a physical address to a Page Frame Number and back |
137 | */ | 138 | */ |
138 | #define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) | 139 | #define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT)) |
139 | #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) | 140 | #define __pfn_to_phys(pfn) ((phys_addr_t)(pfn) << PAGE_SHIFT) |
140 | 141 | ||
141 | /* | 142 | /* |
142 | * Convert a page to/from a physical address | 143 | * Convert a page to/from a physical address |
@@ -234,12 +235,12 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
234 | * translation for translating DMA addresses. Use the driver | 235 | * translation for translating DMA addresses. Use the driver |
235 | * DMA support - see dma-mapping.h. | 236 | * DMA support - see dma-mapping.h. |
236 | */ | 237 | */ |
237 | static inline unsigned long virt_to_phys(const volatile void *x) | 238 | static inline phys_addr_t virt_to_phys(const volatile void *x) |
238 | { | 239 | { |
239 | return __virt_to_phys((unsigned long)(x)); | 240 | return __virt_to_phys((unsigned long)(x)); |
240 | } | 241 | } |
241 | 242 | ||
242 | static inline void *phys_to_virt(unsigned long x) | 243 | static inline void *phys_to_virt(phys_addr_t x) |
243 | { | 244 | { |
244 | return (void *)(__phys_to_virt((unsigned long)(x))); | 245 | return (void *)(__phys_to_virt((unsigned long)(x))); |
245 | } | 246 | } |