ia64/xen-unstable
changeset 18630:91ec8f01d6b9
[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@intel.com>
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@intel.com>
author | Isaku Yamahata <yamahata@valinux.co.jp> |
---|---|
date | Thu Oct 16 11:33:05 2008 +0900 (2008-10-16) |
parents | 9b227eb09263 |
children | 5450b008afce |
files | xen/arch/ia64/linux-xen/sn/kernel/irq.c xen/include/asm-ia64/linux-xen/linux/linux-pci.h |
line diff
1.1 --- a/xen/arch/ia64/linux-xen/sn/kernel/irq.c Tue Oct 14 19:19:48 2008 +0100 1.2 +++ b/xen/arch/ia64/linux-xen/sn/kernel/irq.c Thu Oct 16 11:33:05 2008 +0900 1.3 @@ -350,7 +350,11 @@ static void sn_irq_info_free(struct rcu_ 1.4 } 1.5 #endif 1.6 1.7 +#ifdef XEN 1.8 +void sn_irq_fixup(struct sn_pci_dev *pci_dev, struct sn_irq_info *sn_irq_info) 1.9 +#else 1.10 void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info) 1.11 +#endif 1.12 { 1.13 nasid_t nasid = sn_irq_info->irq_nasid; 1.14 int slice = sn_irq_info->irq_slice; 1.15 @@ -377,7 +381,11 @@ void sn_irq_fixup(struct pci_dev *pci_de 1.16 register_intr_pda(sn_irq_info); 1.17 } 1.18 1.19 +#ifdef XEN 1.20 +void sn_irq_unfixup(struct sn_pci_dev *pci_dev) 1.21 +#else 1.22 void sn_irq_unfixup(struct pci_dev *pci_dev) 1.23 +#endif 1.24 { 1.25 #ifndef XEN 1.26 struct sn_irq_info *sn_irq_info;
2.1 --- a/xen/include/asm-ia64/linux-xen/linux/linux-pci.h Tue Oct 14 19:19:48 2008 +0100 2.2 +++ b/xen/include/asm-ia64/linux-xen/linux/linux-pci.h Thu Oct 16 11:33:05 2008 +0900 2.3 @@ -34,9 +34,12 @@ 2.4 * 7:3 = slot 2.5 * 2:0 = function 2.6 */ 2.7 + 2.8 +#ifndef XEN 2.9 #define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) 2.10 #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) 2.11 #define PCI_FUNC(devfn) ((devfn) & 0x07) 2.12 +#endif 2.13 2.14 /* Ioctls for /proc/bus/pci/X/Y nodes. */ 2.15 #define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8) 2.16 @@ -112,7 +115,11 @@ struct pci_cap_saved_state { 2.17 /* 2.18 * The pci_dev structure is used to describe PCI devices. 2.19 */ 2.20 +#ifdef XEN 2.21 +struct sn_pci_dev { 2.22 +#else 2.23 struct pci_dev { 2.24 +#endif 2.25 struct list_head global_list; /* node in list of all PCI devices */ 2.26 struct list_head bus_list; /* node in per-bus list */ 2.27 struct pci_bus *bus; /* bus this device is on */ 2.28 @@ -178,6 +185,7 @@ struct pci_dev { 2.29 struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ 2.30 }; 2.31 2.32 +#ifndef XEN 2.33 #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) 2.34 #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) 2.35 #define to_pci_dev(n) container_of(n, struct pci_dev, dev) 2.36 @@ -206,6 +214,7 @@ static inline void pci_remove_saved_cap( 2.37 { 2.38 hlist_del(&cap->next); 2.39 } 2.40 +#endif 2.41 2.42 /* 2.43 * For PCI devices, the region numbers are assigned this way: 2.44 @@ -230,7 +239,11 @@ struct pci_bus { 2.45 struct pci_bus *parent; /* parent bus this bridge is on */ 2.46 struct list_head children; /* list of child buses */ 2.47 struct list_head devices; /* list of devices on this bus */ 2.48 +#ifdef XEN 2.49 + struct sn_pci_dev *self; /* bridge device as seen by parent */ 2.50 +#else 2.51 struct pci_dev *self; /* bridge device as seen by parent */ 2.52 +#endif 2.53 struct resource *resource[PCI_BUS_NUM_RESOURCES]; 2.54 /* address space routed to this bus */ 2.55 2.56 @@ -341,7 +354,7 @@ struct pci_error_handlers 2.57 }; 2.58 2.59 /* ---------------------------------------------------------------- */ 2.60 - 2.61 +#ifndef XEN 2.62 struct module; 2.63 struct pci_driver { 2.64 struct list_head node; 2.65 @@ -715,9 +728,11 @@ static inline void pci_unblock_user_cfg_ 2.66 #endif /* CONFIG_PCI */ 2.67 2.68 /* Include architecture-dependent settings and functions */ 2.69 +#endif 2.70 2.71 #include <asm/pci.h> 2.72 2.73 +#ifndef XEN 2.74 /* these helpers provide future and backwards compatibility 2.75 * for accessing popular PCI BAR info */ 2.76 #define pci_resource_start(dev,bar) ((dev)->resource[(bar)].start) 2.77 @@ -808,6 +823,7 @@ enum pci_fixup_pass { 2.78 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 2.79 2.80 extern int pci_pci_problems; 2.81 +#endif 2.82 #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ 2.83 #define PCIPCI_TRITON 2 2.84 #define PCIPCI_NATOMA 4