xen/pv-driver-build.patch

61 lines
2.5 KiB
Diff

Index: xen-3.1-testing/unmodified_drivers/linux-2.6/mkbuildtree
===================================================================
--- xen-3.1-testing.orig/unmodified_drivers/linux-2.6/mkbuildtree
+++ xen-3.1-testing/unmodified_drivers/linux-2.6/mkbuildtree
@@ -11,7 +11,12 @@ fi
C=$PWD
XEN=$C/../../xen
-XL=$C/../../linux-2.6-xen-sparse
+if [ -n "$XL" -a -d "$XL" ]; then
+ XL=$(cd $XL && pwd)
+else
+ XL=/usr/src/linux
+fi
+cd "$(dirname "$0")"
for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
if ! echo $d | egrep -q back; then
Index: xen-3.1-testing/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
===================================================================
--- xen-3.1-testing.orig/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
+++ xen-3.1-testing/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
@@ -107,4 +107,12 @@ extern char *kasprintf(gfp_t gfp, const
#define __supported_pte_mask ((maddr_t)0)
#endif
+/*
+ * This variable at present is referenced by netfront, but only in code that
+ * is dead when running in hvm guests. To detect potential active uses of it
+ * in the future, don't try to supply a 'valid' value here, so that any
+ * mappings created with it will fault when accessed.
+ */
+#define __supported_pte_mask ((maddr_t)0)
+
#endif
Index: xen-3.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
===================================================================
--- xen-3.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
+++ xen-3.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
@@ -119,7 +119,9 @@ void *kzalloc(size_t size, int flags)
EXPORT_SYMBOL(kzalloc);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+#if defined(CONFIG_SUSE_KERNEL) \
+ ? LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) \
+ : LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
/* Simplified asprintf. */
char *kasprintf(gfp_t gfp, const char *fmt, ...)
{
Index: xen-3.1-testing/unmodified_drivers/linux-2.6/overrides.mk
===================================================================
--- xen-3.1-testing.orig/unmodified_drivers/linux-2.6/overrides.mk
+++ xen-3.1-testing/unmodified_drivers/linux-2.6/overrides.mk
@@ -11,4 +11,4 @@ ifeq ($(ARCH),ia64)
EXTRA_CFLAGS += -DCONFIG_VMX_GUEST
endif
-EXTRA_CFLAGS += -include $(srctree)/include/linux/autoconf.h
+#EXTRA_CFLAGS += -include $(srctree)/include/linux/autoconf.h