|
@@ -173,6 +173,7 @@
|
|
|
*/
|
|
|
#define __PV_BITS_31_24 0x81000000
|
|
|
|
|
|
+extern phys_addr_t (*arch_virt_to_idmap) (unsigned long x);
|
|
|
extern unsigned long __pv_phys_offset;
|
|
|
#define PHYS_OFFSET __pv_phys_offset
|
|
|
|
|
@@ -258,6 +259,21 @@ static inline void *phys_to_virt(phys_addr_t x)
|
|
|
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
|
|
|
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
|
|
|
|
|
|
+/*
|
|
|
+ * These are for systems that have a hardware interconnect supported alias of
|
|
|
+ * physical memory for idmap purposes. Most cases should leave these
|
|
|
+ * untouched.
|
|
|
+ */
|
|
|
+static inline phys_addr_t __virt_to_idmap(unsigned long x)
|
|
|
+{
|
|
|
+ if (arch_virt_to_idmap)
|
|
|
+ return arch_virt_to_idmap(x);
|
|
|
+ else
|
|
|
+ return __virt_to_phys(x);
|
|
|
+}
|
|
|
+
|
|
|
+#define virt_to_idmap(x) __virt_to_idmap((unsigned long)(x))
|
|
|
+
|
|
|
/*
|
|
|
* Virtual <-> DMA view memory address translations
|
|
|
* Again, these are *only* valid on the kernel direct mapped RAM
|