aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index 4839c503c88d..6bed2f6bf7cd 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -587,22 +587,15 @@ static unsigned long __init probe_existing_entries(struct pci_pbm_info *pbm,
587 587
588static int __init pci_sun4v_iommu_init(struct pci_pbm_info *pbm) 588static int __init pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
589{ 589{
590 static const u32 vdma_default[] = { 0x80000000, 0x80000000 };
590 struct iommu *iommu = pbm->iommu; 591 struct iommu *iommu = pbm->iommu;
591 struct property *prop;
592 unsigned long num_tsb_entries, sz, tsbsize; 592 unsigned long num_tsb_entries, sz, tsbsize;
593 u32 vdma[2], dma_mask, dma_offset; 593 u32 dma_mask, dma_offset;
594 594 const u32 *vdma;
595 prop = of_find_property(pbm->prom_node, "virtual-dma", NULL); 595
596 if (prop) { 596 vdma = of_get_property(pbm->prom_node, "virtual-dma", NULL);
597 u32 *val = prop->value; 597 if (!vdma)
598 598 vdma = vdma_default;
599 vdma[0] = val[0];
600 vdma[1] = val[1];
601 } else {
602 /* No property, use default values. */
603 vdma[0] = 0x80000000;
604 vdma[1] = 0x80000000;
605 }
606 599
607 if ((vdma[0] | vdma[1]) & ~IO_PAGE_MASK) { 600 if ((vdma[0] | vdma[1]) & ~IO_PAGE_MASK) {
608 printk(KERN_ERR PFX "Strange virtual-dma[%08x:%08x].\n", 601 printk(KERN_ERR PFX "Strange virtual-dma[%08x:%08x].\n",