summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-12-21 14:50:54 +0300
committerJoerg Roedel <jroedel@suse.de>2015-12-28 19:18:50 +0300
commita7fb668fd88c979e790f0c324a1a6d749a8c5a60 (patch)
tree9fb7c02a178944b525505bef4ff98dce746e5ebf /drivers/iommu
parent759ce23b62c4ba1aa467fe5eb12bc9f95af606fe (diff)
downloadlinux-a7fb668fd88c979e790f0c324a1a6d749a8c5a60.tar.xz
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')
-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;
}