From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Guthro Subject: [PATCH 2/3] Fix Spinlock compile errors Date: Wed, 29 Aug 2007 14:14:42 -0400 Message-ID: <46D5B792.4000805@virtualiron.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020301070202030308090507" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------020301070202030308090507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Remove extra parentheses in netif_tx_lock_bh and etif_tx_unlock_bh macros, as it caused problems when compiling against a SLES9 tree. While at first glance - the existing code should work, these extraneous parentheses were causing build errors. It seems to me this was either a buggy kernel, or a buggy compiler, for this to fail. However, this change, (though subtle) does fix the compile error, and does not cause any other problems in newer guest kernels. Signed-off-by: Ben Guthro --------------020301070202030308090507 Content-Type: text/x-patch; name="xen-legacy-spinlock.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-legacy-spinlock.patch" diff -r e9f35dc18ae9 unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Wed Aug 15 16:15:06 2007 -0400 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Wed Aug 15 16:15:28 2007 -0400 @@ -108,8 +108,8 @@ extern char *kasprintf(gfp_t gfp, const #endif #if defined(_LINUX_NETDEVICE_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -#define netif_tx_lock_bh(dev) (spin_lock_bh(&(dev)->xmit_lock)) -#define netif_tx_unlock_bh(dev) (spin_unlock_bh(&(dev)->xmit_lock)) +#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 #if defined(__LINUX_SEQLOCK_H) && !defined(DEFINE_SEQLOCK) --------------020301070202030308090507 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------020301070202030308090507--