ia64/xen-unstable

changeset 16530:fda41d46a6a3

PV-on-HVM: Fix build for RHEL/SLES.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 05 10:42:45 2007 +0000 (2007-12-05)
parents 0974e59dd744
children 32237d8517b1
files unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
line diff
     1.1 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Wed Dec 05 10:40:19 2007 +0000
     1.2 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Wed Dec 05 10:42:45 2007 +0000
     1.3 @@ -114,9 +114,17 @@ extern char *kasprintf(gfp_t gfp, const 
     1.4  #define __supported_pte_mask ((maddr_t)0)
     1.5  #endif
     1.6  
     1.7 +/* This code duplication is not ideal, but || does not seem to properly 
     1.8 + *  short circuit in a #if condition.
     1.9 + **/
    1.10  #if defined(_LINUX_NETDEVICE_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
    1.11 +#if !defined(SLE_VERSION) 
    1.12  #define netif_tx_lock_bh(dev) spin_lock_bh(&(dev)->xmit_lock)
    1.13  #define netif_tx_unlock_bh(dev) spin_unlock_bh(&(dev)->xmit_lock)
    1.14 +#elif SLE_VERSION_CODE < SLE_VERSION(10,1,0)
    1.15 +#define netif_tx_lock_bh(dev) spin_lock_bh(&(dev)->xmit_lock)
    1.16 +#define netif_tx_unlock_bh(dev) spin_unlock_bh(&(dev)->xmit_lock)
    1.17 +#endif
    1.18  #endif
    1.19  
    1.20  #if defined(__LINUX_SEQLOCK_H) && !defined(DEFINE_SEQLOCK)
    1.21 @@ -133,8 +141,15 @@ extern char *kasprintf(gfp_t gfp, const 
    1.22  #endif
    1.23  
    1.24  #if defined(_LINUX_INTERRUPT_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
    1.25 +/**
    1.26 + *   RHEL4-U5 pulled back this feature into the older kernel 
    1.27 + *   Since it is a typedef, and not a macro - detect this kernel via
    1.28 + *   RHEL_VERSION
    1.29 + */
    1.30 +#if !defined(RHEL_VERSION) || (RHEL_VERSION == 4 && RHEL_UPDATE < 5)
    1.31  typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *);
    1.32  #endif
    1.33 +#endif
    1.34  
    1.35  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
    1.36  #define setup_xen_features xen_setup_features