From: Ben Guthro <bguthro@virtualiron.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH 1/2][PV-on-HVM] Fix compile errors for RHEL/SLES
Date: Mon, 03 Dec 2007 15:16:16 -0500 [thread overview]
Message-ID: <47546410.6010901@virtualiron.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
[PATCH 1/2][PV-on-HVM] Fix compile errors for RHEL/SLES
Fix compile errors on a couple of distros.
1st fix was for SLES10-SP1 and SLES10-SP2:
netif_tx_lock_bh was pulled back into older kernels, and thus must be
detected.
2nd fix was for RHEL4-U5 which pulled back the irqreturn_t feature into
an older kernel. This too must be detected.
3rd fix was fixing a compile error in a printk for a more strict compile
in RHEL4-U5
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
[-- Attachment #2: xen-gos-fixes.patch --]
[-- Type: text/x-patch, Size: 2067 bytes --]
diff -r 3211cf988b50 unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Mon Dec 03 11:04:56 2007 -0500
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Mon Dec 03 14:09:06 2007 -0500
@@ -114,9 +114,17 @@ extern char *kasprintf(gfp_t gfp, const
#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,7 +141,14 @@ extern char *kasprintf(gfp_t gfp, const
#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)
diff -r 3211cf988b50 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Mon Dec 03 11:04:56 2007 -0500
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Mon Dec 03 11:04:56 2007 -0500
@@ -465,7 +465,7 @@ static int __init platform_pci_module_in
} else {
cpu_khz = simple_strtol(khz, NULL, 0);
kfree(khz);
- printk(KERN_INFO DRV_NAME ": cpu_khz %lu\n", cpu_khz);
+ printk(KERN_INFO DRV_NAME ": cpu_khz %u\n", cpu_khz);
}
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2007-12-03 20:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 20:16 Ben Guthro [this message]
2007-12-03 20:23 ` [PATCH 1/2][PV-on-HVM] Fix compile errors for RHEL/SLES Ben Guthro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47546410.6010901@virtualiron.com \
--to=bguthro@virtualiron.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.