- Update Xen patches to 3.3-rc5 and c/s 1157.
[linux-flexiantxendom0-3.2.10.git] / drivers / xen / pci.c
index b84bf0b..19f694b 100644 (file)
 #include <xen/interface/physdev.h>
 #include <xen/interface/xen.h>
 
+#ifdef CONFIG_PARAVIRT_XEN
+#define CONFIG_XEN_COMPAT 0x040000
 #include <asm/xen/hypervisor.h>
 #include <asm/xen/hypercall.h>
+#else
+#include <asm/hypervisor.h>
+#endif
 #include "../pci/pci.h"
 
+#if CONFIG_XEN_COMPAT < 0x040200
 static bool __read_mostly pci_seg_supported = true;
+#else
+#define pci_seg_supported true
+#endif
 
 static int xen_add_device(struct device *dev)
 {
@@ -86,7 +95,9 @@ static int xen_add_device(struct device *dev)
                r = HYPERVISOR_physdev_op(PHYSDEVOP_pci_device_add, &add);
                if (r != -ENOSYS)
                        return r;
+#if CONFIG_XEN_COMPAT < 0x040200
                pci_seg_supported = false;
+#endif
        }
 
        if (pci_domain_nr(pci_dev->bus))