[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] avoid name conflict with pci_dev.



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1224124385 -32400
# Node ID 91ec8f01d6b916af846acda6e949b80523aea3cd
# Parent  9b227eb0926393d535473c470fed70d7b39c4509
[IA64] avoid name conflict with pci_dev.

VTD introduces a new pci_dev structure which is conflict with that defined in
xen/include/asm-ia64/linux-xen/linux/linux-pci.h.

the pci_dev defined in linux-pci.h is only used by sn platform.
So change pci_dev to sn_pci_dev.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/linux-xen/sn/kernel/irq.c          |    8 ++++++++
 xen/include/asm-ia64/linux-xen/linux/linux-pci.h |   18 +++++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff -r 9b227eb09263 -r 91ec8f01d6b9 xen/arch/ia64/linux-xen/sn/kernel/irq.c
--- a/xen/arch/ia64/linux-xen/sn/kernel/irq.c   Tue Oct 14 19:19:48 2008 +0100
+++ b/xen/arch/ia64/linux-xen/sn/kernel/irq.c   Thu Oct 16 11:33:05 2008 +0900
@@ -350,7 +350,11 @@ static void sn_irq_info_free(struct rcu_
 }
 #endif
 
+#ifdef XEN
+void sn_irq_fixup(struct sn_pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
+#else  
 void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
+#endif
 {
        nasid_t nasid = sn_irq_info->irq_nasid;
        int slice = sn_irq_info->irq_slice;
@@ -377,7 +381,11 @@ void sn_irq_fixup(struct pci_dev *pci_de
        register_intr_pda(sn_irq_info);
 }
 
+#ifdef XEN
+void sn_irq_unfixup(struct sn_pci_dev *pci_dev)
+#else
 void sn_irq_unfixup(struct pci_dev *pci_dev)
+#endif
 {
 #ifndef XEN
        struct sn_irq_info *sn_irq_info;
diff -r 9b227eb09263 -r 91ec8f01d6b9 
xen/include/asm-ia64/linux-xen/linux/linux-pci.h
--- a/xen/include/asm-ia64/linux-xen/linux/linux-pci.h  Tue Oct 14 19:19:48 
2008 +0100
+++ b/xen/include/asm-ia64/linux-xen/linux/linux-pci.h  Thu Oct 16 11:33:05 
2008 +0900
@@ -34,9 +34,12 @@
  *     7:3 = slot
  *     2:0 = function
  */
+
+#ifndef XEN
 #define PCI_DEVFN(slot,func)   ((((slot) & 0x1f) << 3) | ((func) & 0x07))
 #define PCI_SLOT(devfn)                (((devfn) >> 3) & 0x1f)
 #define PCI_FUNC(devfn)                ((devfn) & 0x07)
+#endif
 
 /* Ioctls for /proc/bus/pci/X/Y nodes. */
 #define PCIIOC_BASE            ('P' << 24 | 'C' << 16 | 'I' << 8)
@@ -112,7 +115,11 @@ struct pci_cap_saved_state {
 /*
  * The pci_dev structure is used to describe PCI devices.
  */
+#ifdef XEN
+struct sn_pci_dev {
+#else
 struct pci_dev {
+#endif
        struct list_head global_list;   /* node in list of all PCI devices */
        struct list_head bus_list;      /* node in per-bus list */
        struct pci_bus  *bus;           /* bus this device is on */
@@ -178,6 +185,7 @@ struct pci_dev {
        struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file 
for resources */
 };
 
+#ifndef XEN
 #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list)
 #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)
 #define        to_pci_dev(n) container_of(n, struct pci_dev, dev)
@@ -206,6 +214,7 @@ static inline void pci_remove_saved_cap(
 {
        hlist_del(&cap->next);
 }
+#endif
 
 /*
  *  For PCI devices, the region numbers are assigned this way:
@@ -230,7 +239,11 @@ struct pci_bus {
        struct pci_bus  *parent;        /* parent bus this bridge is on */
        struct list_head children;      /* list of child buses */
        struct list_head devices;       /* list of devices on this bus */
+#ifdef XEN
+       struct sn_pci_dev       *self;  /* bridge device as seen by parent */
+#else
        struct pci_dev  *self;          /* bridge device as seen by parent */
+#endif
        struct resource *resource[PCI_BUS_NUM_RESOURCES];
                                        /* address space routed to this bus */
 
@@ -341,7 +354,7 @@ struct pci_error_handlers
 };
 
 /* ---------------------------------------------------------------- */
-
+#ifndef XEN
 struct module;
 struct pci_driver {
        struct list_head node;
@@ -715,9 +728,11 @@ static inline void pci_unblock_user_cfg_
 #endif /* CONFIG_PCI */
 
 /* Include architecture-dependent settings and functions */
+#endif
 
 #include <asm/pci.h>
 
+#ifndef XEN
 /* these helpers provide future and backwards compatibility
  * for accessing popular PCI BAR info */
 #define pci_resource_start(dev,bar)   ((dev)->resource[(bar)].start)
@@ -808,6 +823,7 @@ void pci_fixup_device(enum pci_fixup_pas
 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
 
 extern int pci_pci_problems;
+#endif
 #define PCIPCI_FAIL            1       /* No PCI PCI DMA */
 #define PCIPCI_TRITON          2
 #define PCIPCI_NATOMA          4

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.