Skip to content

Commit

Permalink
intel-iommu: dump mappings but don't die on pte already set
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jun 30, 2009
1 parent 9051aa0 commit 1bf20f0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit 1bf20f0

Please sign in to comment.