summaryrefslogtreecommitdiff
path: root/unmodified_drivers/linux-2.6
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2007-12-05 10:42:45 +0000
committerKeir Fraser <keir.fraser@citrix.com>2007-12-05 10:42:45 +0000
commit2b795c6e3709bd1049fe7ecdd4b6e95ca8ab3dc7 (patch)
tree708df112eb427ed215ecd8dabdd15b0e2d97d43e /unmodified_drivers/linux-2.6
parent7408fe83374a27bcbcb1b11d04f5db01575130e1 (diff)
downloadxen-2b795c6e3709bd1049fe7ecdd4b6e95ca8ab3dc7.tar.gz
PV-on-HVM: Fix build for RHEL/SLES.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Diffstat (limited to 'unmodified_drivers/linux-2.6')
-rw-r--r--unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h15
1 files changed, 15 insertions, 0 deletions
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 ca634ca086..fe3dc6de39 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
@@ -114,9 +114,17 @@ extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
#define __supported_pte_mask ((maddr_t)0)
#endif
+/* This code duplication is not ideal, but || does not seem to properly
+ * short circuit in a #if condition.
+ **/
#if defined(_LINUX_NETDEVICE_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+#if !defined(SLE_VERSION)
#define netif_tx_lock_bh(dev) spin_lock_bh(&(dev)->xmit_lock)
#define netif_tx_unlock_bh(dev) spin_unlock_bh(&(dev)->xmit_lock)
+#elif SLE_VERSION_CODE < SLE_VERSION(10,1,0)
+#define netif_tx_lock_bh(dev) spin_lock_bh(&(dev)->xmit_lock)
+#define netif_tx_unlock_bh(dev) spin_unlock_bh(&(dev)->xmit_lock)
+#endif
#endif
#if defined(__LINUX_SEQLOCK_H) && !defined(DEFINE_SEQLOCK)
@@ -133,8 +141,15 @@ extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
#endif
#if defined(_LINUX_INTERRUPT_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+/**
+ * RHEL4-U5 pulled back this feature into the older kernel
+ * Since it is a typedef, and not a macro - detect this kernel via
+ * RHEL_VERSION
+ */
+#if !defined(RHEL_VERSION) || (RHEL_VERSION == 4 && RHEL_UPDATE < 5)
typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *);
#endif
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
#define setup_xen_features xen_setup_features