diff options
-rw-r--r-- | arch/powerpc/platforms/iseries/hvcall.S | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 15 | ||||
-rw-r--r-- | include/asm-ppc64/pci-bridge.h | 2 |
4 files changed, 12 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/iseries/hvcall.S b/arch/powerpc/platforms/iseries/hvcall.S index 9901c0ec1415..07ae6ad5f49f 100644 --- a/arch/powerpc/platforms/iseries/hvcall.S +++ b/arch/powerpc/platforms/iseries/hvcall.S | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <asm/ppc_asm.h> | 11 | #include <asm/ppc_asm.h> |
12 | #include <asm/processor.h> | 12 | #include <asm/processor.h> |
13 | #include <asm/ptrace.h> /* XXX for STACK_FRAME_OVERHEAD */ | ||
13 | 14 | ||
14 | .text | 15 | .text |
15 | 16 | ||
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index 9ac735d5b817..e40c50b7cefc 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -89,11 +89,10 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | |||
89 | */ | 89 | */ |
90 | static struct iommu_table *iommu_table_find(struct iommu_table * tbl) | 90 | static struct iommu_table *iommu_table_find(struct iommu_table * tbl) |
91 | { | 91 | { |
92 | struct device_node *dp; | 92 | struct pci_dn *pdn; |
93 | |||
94 | list_for_each_entry(dp, &iSeries_Global_Device_List, Device_List) { | ||
95 | struct iommu_table *it = PCI_DN(dp)->iommu_table; | ||
96 | 93 | ||
94 | list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) { | ||
95 | struct iommu_table *it = pdn->iommu_table; | ||
97 | if ((it != NULL) && | 96 | if ((it != NULL) && |
98 | (it->it_type == TCE_PCI) && | 97 | (it->it_type == TCE_PCI) && |
99 | (it->it_offset == tbl->it_offset) && | 98 | (it->it_offset == tbl->it_offset) && |
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 70185dec940b..46879d7de925 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -220,7 +220,7 @@ static struct device_node *build_device_node(HvBusNumber Bus, | |||
220 | return NULL; | 220 | return NULL; |
221 | } | 221 | } |
222 | node->data = pdn; | 222 | node->data = pdn; |
223 | list_add_tail(&node->Device_List, &iSeries_Global_Device_List); | 223 | list_add_tail(&pdn->Device_List, &iSeries_Global_Device_List); |
224 | #if 0 | 224 | #if 0 |
225 | pdn->DsaAddr = ((u64)Bus << 48) + ((u64)SubBus << 40) + ((u64)0x10 << 32); | 225 | pdn->DsaAddr = ((u64)Bus << 48) + ((u64)SubBus << 40) + ((u64)0x10 << 32); |
226 | #endif | 226 | #endif |
@@ -549,15 +549,12 @@ EXPORT_SYMBOL(iSeries_memcpy_fromio); | |||
549 | */ | 549 | */ |
550 | static struct device_node *find_Device_Node(int bus, int devfn) | 550 | static struct device_node *find_Device_Node(int bus, int devfn) |
551 | { | 551 | { |
552 | struct list_head *pos; | 552 | struct pci_dn *pdn; |
553 | |||
554 | list_for_each(pos, &iSeries_Global_Device_List) { | ||
555 | struct device_node *node = | ||
556 | list_entry(pos, struct device_node, Device_List); | ||
557 | 553 | ||
558 | if ((bus == ISERIES_BUS(node)) && | 554 | list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) { |
559 | (devfn == PCI_DN(node)->devfn)) | 555 | if ((bus == pdn->DsaAddr.Dsa.busNumber) && |
560 | return node; | 556 | (devfn == pdn->devfn)) |
557 | return pdn->node; | ||
561 | } | 558 | } |
562 | return NULL; | 559 | return NULL; |
563 | } | 560 | } |
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h index c342c9eb07a4..56863df18232 100644 --- a/include/asm-ppc64/pci-bridge.h +++ b/include/asm-ppc64/pci-bridge.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #define _ASM_PCI_BRIDGE_H | 3 | #define _ASM_PCI_BRIDGE_H |
4 | 4 | ||
5 | #include <linux/pci.h> | 5 | #include <linux/pci.h> |
6 | #include <linux/list.h> | ||
6 | 7 | ||
7 | #include <asm/iSeries/HvCallPci.h> | 8 | #include <asm/iSeries/HvCallPci.h> |
8 | 9 | ||
@@ -74,6 +75,7 @@ struct pci_dn { | |||
74 | struct pci_dev *pcidev; /* back-pointer to the pci device */ | 75 | struct pci_dev *pcidev; /* back-pointer to the pci device */ |
75 | struct device_node *node; /* back-pointer to the device_node */ | 76 | struct device_node *node; /* back-pointer to the device_node */ |
76 | #ifdef CONFIG_PPC_ISERIES | 77 | #ifdef CONFIG_PPC_ISERIES |
78 | struct list_head Device_List; | ||
77 | union HvDsaMap DsaAddr; /* Direct Select Address */ | 79 | union HvDsaMap DsaAddr; /* Direct Select Address */ |
78 | /* busNumber, subBusNumber, */ | 80 | /* busNumber, subBusNumber, */ |
79 | /* deviceId, barNumber */ | 81 | /* deviceId, barNumber */ |