aboutsummaryrefslogtreecommitdiffstats
path: root/unmodified_drivers
diff options
context:
space:
mode:
Diffstat (limited to 'unmodified_drivers')
-rw-r--r--unmodified_drivers/linux-2.6/Makefile1
-rw-r--r--unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h1
-rw-r--r--unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h15
-rwxr-xr-x[-rw-r--r--]unmodified_drivers/linux-2.6/mkbuildtree3
-rw-r--r--unmodified_drivers/linux-2.6/platform-pci/evtchn.c8
-rw-r--r--unmodified_drivers/linux-2.6/util/Kbuild3
-rw-r--r--unmodified_drivers/linux-2.6/util/Makefile3
7 files changed, 32 insertions, 2 deletions
diff --git a/unmodified_drivers/linux-2.6/Makefile b/unmodified_drivers/linux-2.6/Makefile
index 95d558f77b..119016f531 100644
--- a/unmodified_drivers/linux-2.6/Makefile
+++ b/unmodified_drivers/linux-2.6/Makefile
@@ -4,3 +4,4 @@ obj-m += platform-pci/
obj-m += xenbus/
obj-m += blkfront/
obj-m += netfront/
+obj-m += util/
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 <asm-generic/pgtable-nopud.h>
+#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
diff --git a/unmodified_drivers/linux-2.6/mkbuildtree b/unmodified_drivers/linux-2.6/mkbuildtree
index ce0a142447..ddcc13c75e 100644..100755
--- a/unmodified_drivers/linux-2.6/mkbuildtree
+++ b/unmodified_drivers/linux-2.6/mkbuildtree
@@ -22,6 +22,7 @@ done
ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
ln -sf ${XL}/drivers/xen/core/features.c platform-pci
ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus
+ln -sf ${XL}/drivers/xen/core/reboot.c util
mkdir -p include
mkdir -p include/xen
@@ -30,7 +31,7 @@ mkdir -p include/asm
mkdir -p include/asm/xen
lndir -silent ${XL}/include/xen include/xen
-ln -sf ${XEN}/include/public include/xen/interface
+ln -nsf ${XEN}/include/public include/xen/interface
# Need to be quite careful here: we don't want the files we link in to
# risk overriding the native Linux ones (in particular, system.h must
diff --git a/unmodified_drivers/linux-2.6/platform-pci/evtchn.c b/unmodified_drivers/linux-2.6/platform-pci/evtchn.c
index 4bd9592754..d07250add5 100644
--- a/unmodified_drivers/linux-2.6/platform-pci/evtchn.c
+++ b/unmodified_drivers/linux-2.6/platform-pci/evtchn.c
@@ -167,11 +167,17 @@ irqreturn_t evtchn_interrupt(int irq, void *dev_id, struct pt_regs *regs)
l2 = s->evtchn_pending[l1i] & ~s->evtchn_mask[l1i];
}
}
+
+ /* Make sure the hypervisor has a chance to notice that the
+ upcall_pending condition has been cleared, so that we don't
+ try and reinject the interrupt again. */
+ (void)HYPERVISOR_xen_version(0, NULL);
+
return IRQ_HANDLED;
}
void force_evtchn_callback(void)
{
- evtchn_interrupt(0, NULL, NULL);
+ (void)HYPERVISOR_xen_version(0, NULL);
}
EXPORT_SYMBOL(force_evtchn_callback);
diff --git a/unmodified_drivers/linux-2.6/util/Kbuild b/unmodified_drivers/linux-2.6/util/Kbuild
new file mode 100644
index 0000000000..35495d8194
--- /dev/null
+++ b/unmodified_drivers/linux-2.6/util/Kbuild
@@ -0,0 +1,3 @@
+include $(M)/overrides.mk
+
+obj-m := reboot.o
diff --git a/unmodified_drivers/linux-2.6/util/Makefile b/unmodified_drivers/linux-2.6/util/Makefile
new file mode 100644
index 0000000000..64e7acd194
--- /dev/null
+++ b/unmodified_drivers/linux-2.6/util/Makefile
@@ -0,0 +1,3 @@
+ifneq ($(KERNELRELEASE),)
+include $(src)/Kbuild
+endif