aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h4
-rw-r--r--unmodified_drivers/linux-2.6/platform-pci/platform-compat.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
index 191777a8ff..185a97449c 100644
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
@@ -29,4 +29,8 @@
#define nonseekable_open(inode, filp) /* Nothing to do */
#endif
+#if defined(_LINUX_MM_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+unsigned long vmalloc_to_pfn(void *addr);
+#endif
+
#endif
diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
index 6538964ecf..b79006bc21 100644
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
@@ -1,6 +1,7 @@
#include <linux/config.h>
#include <linux/version.h>
+#include <linux/mm.h>
#include <linux/module.h>
#include <xen/platform-compat.h>
@@ -29,3 +30,14 @@ size_t strcspn(const char *s, const char *reject)
}
EXPORT_SYMBOL(strcspn);
#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+/*
+ * Map a vmalloc()-space virtual address to the physical page frame number.
+ */
+unsigned long vmalloc_to_pfn(void * vmalloc_addr)
+{
+ return page_to_pfn(vmalloc_to_page(vmalloc_addr));
+}
+EXPORT_SYMBOL(vmalloc_to_pfn);
+#endif