direct-io.hg

changeset 12206:2f34c6bcfe45

PV-on-HVM: Fix PV-on-HVM drivers for IA64.

Thanks to Kasai Takanori and Doi Tsunehisa for testing.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Thu Nov 02 11:56:26 2006 +0000 (2006-11-02)
parents af1403dd13af
children f3fbe9549f5f
files linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/include/asm-ia64/hypercall.h unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c	Thu Nov 02 11:56:26 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c	Thu Nov 02 11:56:26 2006 +0000
     1.3 @@ -20,6 +20,11 @@
     1.4  #include <linux/mm.h>
     1.5  #include <xen/interface/xen.h>
     1.6  #include <asm/page.h>
     1.7 +
     1.8 +#ifdef HAVE_XEN_PLATFORM_COMPAT_H
     1.9 +#include <xen/platform-compat.h>
    1.10 +#endif
    1.11 +
    1.12  #include <asm/xen/xencomm.h>
    1.13  
    1.14  static int xencomm_debug = 0;
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Thu Nov 02 11:56:26 2006 +0000
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Thu Nov 02 11:56:26 2006 +0000
     2.3 @@ -30,13 +30,16 @@
     2.4   * IN THE SOFTWARE.
     2.5   */
     2.6  
     2.7 -#include <asm/hypervisor.h>
     2.8 -#include <xen/evtchn.h>
     2.9  #include <linux/wait.h>
    2.10  #include <linux/interrupt.h>
    2.11  #include <linux/sched.h>
    2.12  #include <linux/err.h>
    2.13 +#include <linux/ptrace.h>
    2.14 +#include <xen/evtchn.h>
    2.15  #include <xen/xenbus.h>
    2.16 +
    2.17 +#include <asm/hypervisor.h>
    2.18 +
    2.19  #include "xenbus_comms.h"
    2.20  
    2.21  #ifdef HAVE_XEN_PLATFORM_COMPAT_H
     3.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Thu Nov 02 11:56:26 2006 +0000
     3.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Thu Nov 02 11:56:26 2006 +0000
     3.3 @@ -283,6 +283,9 @@ static inline void exit_idle(void) {}
     3.4  #ifdef CONFIG_XEN
     3.5  #include <asm/xen/privop.h>
     3.6  #endif /* CONFIG_XEN */
     3.7 +#ifdef HAVE_XEN_PLATFORM_COMPAT_H
     3.8 +#include <xen/platform-compat.h>
     3.9 +#endif
    3.10  
    3.11  static inline unsigned long
    3.12  __HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size)
     4.1 --- a/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h	Thu Nov 02 11:56:26 2006 +0000
     4.2 +++ b/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h	Thu Nov 02 11:56:26 2006 +0000
     4.3 @@ -9,6 +9,7 @@
     4.4  #define pud_offset(d, va)     d
     4.5  #define pud_none(pud)         0
     4.6  #define pud_present(pud)      1
     4.7 +#define pud_bad(pud)          0
     4.8  #define PTRS_PER_PUD          1
     4.9  
    4.10  #endif /* _PGTABLE_NOPUD_H */
     5.1 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Thu Nov 02 11:56:26 2006 +0000
     5.2 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Thu Nov 02 11:56:26 2006 +0000
     5.3 @@ -25,6 +25,21 @@
     5.4  #define NET_IP_ALIGN 0
     5.5  #endif
     5.6  
     5.7 +#if defined(_LINUX_ERR_H) && !defined(IS_ERR_VALUE)
     5.8 +#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
     5.9 +#endif
    5.10 +
    5.11 +#if defined(_ASM_IA64_PGTABLE_H) && !defined(_PGTABLE_NOPUD_H)
    5.12 +#include <asm-generic/pgtable-nopud.h>
    5.13 +#endif
    5.14 +
    5.15 +/* Some kernels have this typedef backported so we cannot reliably
    5.16 + * detect based on version number, hence we forcibly #define it.
    5.17 + */
    5.18 +#if defined(__LINUX_TYPES_H) || defined(__LINUX_GFP_H)
    5.19 +#define gfp_t unsigned
    5.20 +#endif
    5.21 +
    5.22  #if defined(_LINUX_FS_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
    5.23  #define nonseekable_open(inode, filp) /* Nothing to do */
    5.24  #endif