From: Ian Campbell Date: Thu, 2 Nov 2006 11:56:26 +0000 (+0000) Subject: PV-on-HVM: Fix PV-on-HVM drivers for IA64. X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d8656aaa3e9c089e3fb49a8bcd5ecccc1d6ce1eb;p=xen.git PV-on-HVM: Fix PV-on-HVM drivers for IA64. Thanks to Kasai Takanori and Doi Tsunehisa for testing. Signed-off-by: Ian Campbell --- diff --git a/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c b/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c index 3767e893fc..367b6b32de 100644 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c @@ -20,6 +20,11 @@ #include #include #include + +#ifdef HAVE_XEN_PLATFORM_COMPAT_H +#include +#endif + #include static int xencomm_debug = 0; diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c index ea8f3c283e..f0e42ba715 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c @@ -30,13 +30,16 @@ * IN THE SOFTWARE. */ -#include -#include #include #include #include #include +#include +#include #include + +#include + #include "xenbus_comms.h" #ifdef HAVE_XEN_PLATFORM_COMPAT_H diff --git a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h index 43f88b1930..7a522be483 100644 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h @@ -283,6 +283,9 @@ static inline void exit_idle(void) {} #ifdef CONFIG_XEN #include #endif /* CONFIG_XEN */ +#ifdef HAVE_XEN_PLATFORM_COMPAT_H +#include +#endif static inline unsigned long __HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size) diff --git a/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h b/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h index 8b23299dd0..05c9675760 100644 --- a/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h +++ b/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h @@ -9,6 +9,7 @@ #define pud_offset(d, va) d #define pud_none(pud) 0 #define pud_present(pud) 1 +#define pud_bad(pud) 0 #define PTRS_PER_PUD 1 #endif /* _PGTABLE_NOPUD_H */ 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 4978c63610..ea0e6b308f 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 @@ -25,6 +25,21 @@ #define NET_IP_ALIGN 0 #endif +#if defined(_LINUX_ERR_H) && !defined(IS_ERR_VALUE) +#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) +#endif + +#if defined(_ASM_IA64_PGTABLE_H) && !defined(_PGTABLE_NOPUD_H) +#include +#endif + +/* Some kernels have this typedef backported so we cannot reliably + * detect based on version number, hence we forcibly #define it. + */ +#if defined(__LINUX_TYPES_H) || defined(__LINUX_GFP_H) +#define gfp_t unsigned +#endif + #if defined(_LINUX_FS_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) #define nonseekable_open(inode, filp) /* Nothing to do */ #endif