diff options
Diffstat (limited to 'arch/arm/include/asm/memory.h')
-rw-r--r-- | arch/arm/include/asm/memory.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index c133bd915f48..d9b96c65e594 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -173,6 +173,7 @@ | |||
173 | */ | 173 | */ |
174 | #define __PV_BITS_31_24 0x81000000 | 174 | #define __PV_BITS_31_24 0x81000000 |
175 | 175 | ||
176 | extern phys_addr_t (*arch_virt_to_idmap) (unsigned long x); | ||
176 | extern unsigned long __pv_phys_offset; | 177 | extern unsigned long __pv_phys_offset; |
177 | #define PHYS_OFFSET __pv_phys_offset | 178 | #define PHYS_OFFSET __pv_phys_offset |
178 | 179 | ||
@@ -259,6 +260,21 @@ static inline void *phys_to_virt(phys_addr_t x) | |||
259 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 260 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
260 | 261 | ||
261 | /* | 262 | /* |
263 | * These are for systems that have a hardware interconnect supported alias of | ||
264 | * physical memory for idmap purposes. Most cases should leave these | ||
265 | * untouched. | ||
266 | */ | ||
267 | static inline phys_addr_t __virt_to_idmap(unsigned long x) | ||
268 | { | ||
269 | if (arch_virt_to_idmap) | ||
270 | return arch_virt_to_idmap(x); | ||
271 | else | ||
272 | return __virt_to_phys(x); | ||
273 | } | ||
274 | |||
275 | #define virt_to_idmap(x) __virt_to_idmap((unsigned long)(x)) | ||
276 | |||
277 | /* | ||
262 | * Virtual <-> DMA view memory address translations | 278 | * Virtual <-> DMA view memory address translations |
263 | * Again, these are *only* valid on the kernel direct mapped RAM | 279 | * Again, these are *only* valid on the kernel direct mapped RAM |
264 | * memory. Use of these is *deprecated* (and that doesn't mean | 280 | * memory. Use of these is *deprecated* (and that doesn't mean |