diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-29 23:06:43 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-30 04:55:21 +0200 |
commit | 1bf20f0dc5629032ddd07617139d9fbca66c1642 (patch) | |
tree | 6911bea8e9333ea7ed36ad4bc7a2c6001000e41d /drivers | |
parent | intel-iommu: Combine domain_pfn_mapping() and domain_sg_mapping() (diff) | |
download | linux-1bf20f0dc5629032ddd07617139d9fbca66c1642.tar.xz linux-1bf20f0dc5629032ddd07617139d9fbca66c1642.zip |
intel-iommu: dump mappings but don't die on pte already set
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/intel-iommu.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 14308533b1cb..40ce5a03f18f 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1673,7 +1673,16 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, /* We don't need lock here, nobody else * touches the iova range */ - BUG_ON(dma_pte_addr(pte)); + if (unlikely(dma_pte_addr(pte))) { + static int dumps = 5; + printk(KERN_CRIT "ERROR: DMA PTE for vPFN 0x%lx already set (to %llx)\n", + iov_pfn, pte->val); + if (dumps) { + dumps--; + debug_dma_dump_mappings(NULL); + } + WARN_ON(1); + } pte->val = pteval; pte++; if (!nr_pages || |