diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 0c1958ac1011..edea60b7ee90 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -323,14 +323,13 @@ static void iommu_table_setparms(struct pci_controller *phb, | |||
323 | static void iommu_table_setparms_lpar(struct pci_controller *phb, | 323 | static void iommu_table_setparms_lpar(struct pci_controller *phb, |
324 | struct device_node *dn, | 324 | struct device_node *dn, |
325 | struct iommu_table *tbl, | 325 | struct iommu_table *tbl, |
326 | const void *dma_window, | 326 | const void *dma_window) |
327 | int bussubno) | ||
328 | { | 327 | { |
329 | unsigned long offset, size; | 328 | unsigned long offset, size; |
330 | 329 | ||
331 | tbl->it_busno = bussubno; | ||
332 | of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size); | 330 | of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size); |
333 | 331 | ||
332 | tbl->it_busno = phb->bus->number; | ||
334 | tbl->it_base = 0; | 333 | tbl->it_base = 0; |
335 | tbl->it_blocksize = 16; | 334 | tbl->it_blocksize = 16; |
336 | tbl->it_type = TCE_PCI; | 335 | tbl->it_type = TCE_PCI; |
@@ -450,8 +449,7 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus) | |||
450 | if (!ppci->iommu_table) { | 449 | if (!ppci->iommu_table) { |
451 | tbl = kzalloc_node(sizeof(struct iommu_table), GFP_KERNEL, | 450 | tbl = kzalloc_node(sizeof(struct iommu_table), GFP_KERNEL, |
452 | ppci->phb->node); | 451 | ppci->phb->node); |
453 | iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window, | 452 | iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window); |
454 | bus->number); | ||
455 | ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node); | 453 | ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node); |
456 | pr_debug(" created table: %p\n", ppci->iommu_table); | 454 | pr_debug(" created table: %p\n", ppci->iommu_table); |
457 | } | 455 | } |
@@ -534,8 +532,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
534 | if (!pci->iommu_table) { | 532 | if (!pci->iommu_table) { |
535 | tbl = kzalloc_node(sizeof(struct iommu_table), GFP_KERNEL, | 533 | tbl = kzalloc_node(sizeof(struct iommu_table), GFP_KERNEL, |
536 | pci->phb->node); | 534 | pci->phb->node); |
537 | iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window, | 535 | iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window); |
538 | pci->phb->bus->number); | ||
539 | pci->iommu_table = iommu_init_table(tbl, pci->phb->node); | 536 | pci->iommu_table = iommu_init_table(tbl, pci->phb->node); |
540 | pr_debug(" created table: %p\n", pci->iommu_table); | 537 | pr_debug(" created table: %p\n", pci->iommu_table); |
541 | } else { | 538 | } else { |