diff options
Diffstat (limited to 'unmodified_drivers/linux-2.6/platform-pci/platform-compat.c')
-rw-r--r-- | unmodified_drivers/linux-2.6/platform-pci/platform-compat.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 |