# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1190796172 -3600
# Node ID fbc23b066c96415c13cfaa9ba957506424f43437
# Parent e441bb07066c826bd74b057768cfa916f558ceec
PV-on-HVM: More save/restore fixes.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset: 14794:5d7fb634ec1a1c127316ccb2cacbf473c8c77377
xen-unstable date: Wed Apr 11 09:16:04 2007 +0100
---
linux-2.6-xen-sparse/include/asm-generic/pci.h | 57 +++++++++++++
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h | 4
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h | 4
3 files changed, 63 insertions(+), 2 deletions(-)
diff -r e441bb07066c -r fbc23b066c96
linux-2.6-xen-sparse/include/asm-generic/pci.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux-2.6-xen-sparse/include/asm-generic/pci.h Wed Sep 26 09:42:52
2007 +0100
@@ -0,0 +1,57 @@
+/*
+ * linux/include/asm-generic/pci.h
+ *
+ * Copyright (C) 2003 Russell King
+ */
+#ifndef _ASM_GENERIC_PCI_H
+#define _ASM_GENERIC_PCI_H
+
+/**
+ * pcibios_resource_to_bus - convert resource to PCI bus address
+ * @dev: device which owns this resource
+ * @region: converted bus-centric region (start,end)
+ * @res: resource to convert
+ *
+ * Convert a resource to a PCI device bus address or bus window.
+ */
+static inline void
+pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
+ struct resource *res)
+{
+ region->start = res->start;
+ region->end = res->end;
+}
+
+static inline void
+pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+ struct pci_bus_region *region)
+{
+ res->start = region->start;
+ res->end = region->end;
+}
+
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+ struct resource *root = NULL;
+
+ if (res->flags & IORESOURCE_IO)
+ root = &ioport_resource;
+ if (res->flags & IORESOURCE_MEM)
+ root = &iomem_resource;
+
+ return root;
+}
+
+#ifndef pcibios_scan_all_fns
+#define pcibios_scan_all_fns(a, b) 0
+#endif
+
+#ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
+static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
+{
+ return channel ? 15 : 14;
+}
+#endif /* HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ */
+
+#endif
diff -r e441bb07066c -r fbc23b066c96
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h Tue Sep 25
09:40:14 2007 +0100
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h Wed Sep 26
09:42:52 2007 +0100
@@ -14,7 +14,9 @@ extern unsigned int pcibios_assign_all_b
#else
#define pcibios_assign_all_busses() 0
#endif
-#define pcibios_scan_all_fns(a, b) 0
+
+#include <asm/hypervisor.h>
+#define pcibios_scan_all_fns(a, b) (!is_initial_xendomain())
extern unsigned long pci_mem_start;
#define PCIBIOS_MIN_IO 0x1000
diff -r e441bb07066c -r fbc23b066c96
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h Tue Sep
25 09:40:14 2007 +0100
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h Wed Sep
26 09:42:52 2007 +0100
@@ -16,7 +16,9 @@ extern unsigned int pcibios_assign_all_b
#else
#define pcibios_assign_all_busses() 0
#endif
-#define pcibios_scan_all_fns(a, b) 0
+
+#include <asm/hypervisor.h>
+#define pcibios_scan_all_fns(a, b) (!is_initial_xendomain())
extern unsigned long pci_mem_start;
#define PCIBIOS_MIN_IO 0x1000
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|