aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/pSeries_iommu.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-03 22:06:19 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-03 22:06:19 -0400
commit3c8c7b2f32c52b259daa7564fefd582146799b23 (patch)
tree59ff1ad0d6b7821d474d8fccafd884703684b6d7 /arch/ppc64/kernel/pSeries_iommu.c
parent7cb3cd090c2725b80561958a362c2ba15a7a8c86 (diff)
parent9123e0d78990246304fe681167b8d8097f1e02d7 (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'arch/ppc64/kernel/pSeries_iommu.c')
-rw-r--r--arch/ppc64/kernel/pSeries_iommu.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c
index 8c6313e7e145..d17f0108a032 100644
--- a/arch/ppc64/kernel/pSeries_iommu.c
+++ b/arch/ppc64/kernel/pSeries_iommu.c
@@ -364,7 +364,8 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus)
364 364
365 while (pci->phb->dma_window_size * children > 0x80000000ul) 365 while (pci->phb->dma_window_size * children > 0x80000000ul)
366 pci->phb->dma_window_size >>= 1; 366 pci->phb->dma_window_size >>= 1;
367 DBG("No ISA/IDE, window size is %x\n", pci->phb->dma_window_size); 367 DBG("No ISA/IDE, window size is 0x%lx\n",
368 pci->phb->dma_window_size);
368 pci->phb->dma_window_base_cur = 0; 369 pci->phb->dma_window_base_cur = 0;
369 370
370 return; 371 return;
@@ -388,7 +389,7 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus)
388 while (pci->phb->dma_window_size * children > 0x70000000ul) 389 while (pci->phb->dma_window_size * children > 0x70000000ul)
389 pci->phb->dma_window_size >>= 1; 390 pci->phb->dma_window_size >>= 1;
390 391
391 DBG("ISA/IDE, window size is %x\n", pci->phb->dma_window_size); 392 DBG("ISA/IDE, window size is 0x%lx\n", pci->phb->dma_window_size);
392 393
393} 394}
394 395
@@ -442,7 +443,7 @@ static void iommu_dev_setup_pSeries(struct pci_dev *dev)
442 struct device_node *dn, *mydn; 443 struct device_node *dn, *mydn;
443 struct iommu_table *tbl; 444 struct iommu_table *tbl;
444 445
445 DBG("iommu_dev_setup_pSeries, dev %p (%s)\n", dev, dev->pretty_name); 446 DBG("iommu_dev_setup_pSeries, dev %p (%s)\n", dev, pci_name(dev));
446 447
447 mydn = dn = pci_device_to_OF_node(dev); 448 mydn = dn = pci_device_to_OF_node(dev);
448 449
@@ -469,7 +470,7 @@ static void iommu_dev_setup_pSeries(struct pci_dev *dev)
469 if (dn && dn->data) { 470 if (dn && dn->data) {
470 PCI_DN(mydn)->iommu_table = PCI_DN(dn)->iommu_table; 471 PCI_DN(mydn)->iommu_table = PCI_DN(dn)->iommu_table;
471 } else { 472 } else {
472 DBG("iommu_dev_setup_pSeries, dev %p (%s) has no iommu table\n", dev, dev->pretty_name); 473 DBG("iommu_dev_setup_pSeries, dev %p (%s) has no iommu table\n", dev, pci_name(dev));
473 } 474 }
474} 475}
475 476
@@ -503,7 +504,7 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev)
503 int *dma_window = NULL; 504 int *dma_window = NULL;
504 struct pci_dn *pci; 505 struct pci_dn *pci;
505 506
506 DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, dev->pretty_name); 507 DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, pci_name(dev));
507 508
508 /* dev setup for LPAR is a little tricky, since the device tree might 509 /* dev setup for LPAR is a little tricky, since the device tree might
509 * contain the dma-window properties per-device and not neccesarily 510 * contain the dma-window properties per-device and not neccesarily
@@ -525,9 +526,8 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev)
525 * slots on POWER4 machines. 526 * slots on POWER4 machines.
526 */ 527 */
527 if (dma_window == NULL || pdn->parent == NULL) { 528 if (dma_window == NULL || pdn->parent == NULL) {
528 /* Fall back to regular (non-LPAR) dev setup */ 529 DBG("No dma window for device, linking to parent\n");
529 DBG("No dma window for device, falling back to regular setup\n"); 530 PCI_DN(dn)->iommu_table = PCI_DN(pdn)->iommu_table;
530 iommu_dev_setup_pSeries(dev);
531 return; 531 return;
532 } else { 532 } else {
533 DBG("Found DMA window, allocating table\n"); 533 DBG("Found DMA window, allocating table\n");