aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/pci-ioda.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci-ioda.c')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 0ddc2e5235d6..7999da1e0b11 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -656,13 +656,13 @@ static void __devinit pnv_ioda_link_pe_by_weight(struct pnv_phb *phb,
656{ 656{
657 struct pnv_ioda_pe *lpe; 657 struct pnv_ioda_pe *lpe;
658 658
659 list_for_each_entry(lpe, &phb->ioda.pe_list, link) { 659 list_for_each_entry(lpe, &phb->ioda.pe_dma_list, dma_link) {
660 if (lpe->dma_weight < pe->dma_weight) { 660 if (lpe->dma_weight < pe->dma_weight) {
661 list_add_tail(&pe->link, &lpe->link); 661 list_add_tail(&pe->dma_link, &lpe->dma_link);
662 return; 662 return;
663 } 663 }
664 } 664 }
665 list_add_tail(&pe->link, &phb->ioda.pe_list); 665 list_add_tail(&pe->dma_link, &phb->ioda.pe_dma_list);
666} 666}
667 667
668static unsigned int pnv_ioda_dma_weight(struct pci_dev *dev) 668static unsigned int pnv_ioda_dma_weight(struct pci_dev *dev)
@@ -828,6 +828,9 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all)
828 /* Associate it with all child devices */ 828 /* Associate it with all child devices */
829 pnv_ioda_setup_same_PE(bus, pe); 829 pnv_ioda_setup_same_PE(bus, pe);
830 830
831 /* Put PE to the list */
832 list_add_tail(&pe->list, &phb->ioda.pe_list);
833
831 /* Account for one DMA PE if at least one DMA capable device exist 834 /* Account for one DMA PE if at least one DMA capable device exist
832 * below the bridge 835 * below the bridge
833 */ 836 */
@@ -1011,7 +1014,7 @@ static void __devinit pnv_ioda_setup_dma(struct pnv_phb *phb)
1011 remaining = phb->ioda.tce32_count; 1014 remaining = phb->ioda.tce32_count;
1012 tw = phb->ioda.dma_weight; 1015 tw = phb->ioda.dma_weight;
1013 base = 0; 1016 base = 0;
1014 list_for_each_entry(pe, &phb->ioda.pe_list, link) { 1017 list_for_each_entry(pe, &phb->ioda.pe_dma_list, dma_link) {
1015 if (!pe->dma_weight) 1018 if (!pe->dma_weight)
1016 continue; 1019 continue;
1017 if (!remaining) { 1020 if (!remaining) {
@@ -1305,6 +1308,7 @@ void __init pnv_pci_init_ioda1_phb(struct device_node *np)
1305 phb->ioda.pe_array = aux + pemap_off; 1308 phb->ioda.pe_array = aux + pemap_off;
1306 set_bit(0, phb->ioda.pe_alloc); 1309 set_bit(0, phb->ioda.pe_alloc);
1307 1310
1311 INIT_LIST_HEAD(&phb->ioda.pe_dma_list);
1308 INIT_LIST_HEAD(&phb->ioda.pe_list); 1312 INIT_LIST_HEAD(&phb->ioda.pe_list);
1309 1313
1310 /* Calculate how many 32-bit TCE segments we have */ 1314 /* Calculate how many 32-bit TCE segments we have */