summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-12-21 12:50:54 +0100
committerJoerg Roedel <jroedel@suse.de>2015-12-28 17:18:50 +0100
commita7fb668fd88c979e790f0c324a1a6d749a8c5a60 (patch)
tree9fb7c02a178944b525505bef4ff98dce746e5ebf /drivers/iommu/amd_iommu.c
parentiommu/amd: Constify mmu_notifier_ops structures (diff)
downloadlinux-a7fb668fd88c979e790f0c324a1a6d749a8c5a60.tar.xz
linux-a7fb668fd88c979e790f0c324a1a6d749a8c5a60.zip
iommu/amd: Warn only once on unexpected pte value
This prevents possible flooding of the kernel log. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 8b2be1e7714f..3cdfac6024a5 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2328,7 +2328,7 @@ static dma_addr_t dma_ops_domain_map(struct dma_ops_domain *dom,
else if (direction == DMA_BIDIRECTIONAL)
__pte |= IOMMU_PTE_IR | IOMMU_PTE_IW;
- WARN_ON(*pte);
+ WARN_ON_ONCE(*pte);
*pte = __pte;
@@ -2357,7 +2357,7 @@ static void dma_ops_domain_unmap(struct dma_ops_domain *dom,
pte += PM_LEVEL_INDEX(0, address);
- WARN_ON(!*pte);
+ WARN_ON_ONCE(!*pte);
*pte = 0ULL;
}