From: David Woodhouse Date: Mon, 29 Jun 2009 21:06:43 +0000 (+0100) Subject: intel-iommu: dump mappings but don't die on pte already set X-Git-Tag: MMI-PSA29.97-13-9~27501^2~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1bf20f0dc5629032ddd07617139d9fbca66c1642;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git intel-iommu: dump mappings but don't die on pte already set Signed-off-by: David Woodhouse --- 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 ||