ia64/xen-unstable

changeset 11991:ac6e4405ab6c

PV-on-HVM: Include compatability vmalloc_to_pfn for kernels before 2.6.10

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
author Ian Campbell <ian.campbell@xensource.com>
date Wed Oct 25 13:58:30 2006 +0100 (2006-10-25)
parents 4dcf172e699e
children 0886fc73e787
files unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
line diff
     1.1 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Wed Oct 25 13:58:30 2006 +0100
     1.2 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Wed Oct 25 13:58:30 2006 +0100
     1.3 @@ -29,4 +29,8 @@
     1.4  #define nonseekable_open(inode, filp) /* Nothing to do */
     1.5  #endif
     1.6  
     1.7 +#if defined(_LINUX_MM_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
     1.8 +unsigned long vmalloc_to_pfn(void *addr);
     1.9  #endif
    1.10 +
    1.11 +#endif
     2.1 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c	Wed Oct 25 13:58:30 2006 +0100
     2.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c	Wed Oct 25 13:58:30 2006 +0100
     2.3 @@ -1,6 +1,7 @@
     2.4  #include <linux/config.h>
     2.5  #include <linux/version.h>
     2.6  
     2.7 +#include <linux/mm.h>
     2.8  #include <linux/module.h>
     2.9  
    2.10  #include <xen/platform-compat.h>
    2.11 @@ -29,3 +30,14 @@ size_t strcspn(const char *s, const char
    2.12  }
    2.13  EXPORT_SYMBOL(strcspn);
    2.14  #endif
    2.15 +
    2.16 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
    2.17 +/*
    2.18 + * Map a vmalloc()-space virtual address to the physical page frame number.
    2.19 + */
    2.20 +unsigned long vmalloc_to_pfn(void * vmalloc_addr)
    2.21 +{
    2.22 +        return page_to_pfn(vmalloc_to_page(vmalloc_addr));
    2.23 +}
    2.24 +EXPORT_SYMBOL(vmalloc_to_pfn);
    2.25 +#endif