aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iommu/amd_iommu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index e1c7e9e51045..ca9f4edbb940 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1869,9 +1869,15 @@ static void free_pt_##LVL (unsigned long __pt) \
1869 pt = (u64 *)__pt; \ 1869 pt = (u64 *)__pt; \
1870 \ 1870 \
1871 for (i = 0; i < 512; ++i) { \ 1871 for (i = 0; i < 512; ++i) { \
1872 /* PTE present? */ \
1872 if (!IOMMU_PTE_PRESENT(pt[i])) \ 1873 if (!IOMMU_PTE_PRESENT(pt[i])) \
1873 continue; \ 1874 continue; \
1874 \ 1875 \
1876 /* Large PTE? */ \
1877 if (PM_PTE_LEVEL(pt[i]) == 0 || \
1878 PM_PTE_LEVEL(pt[i]) == 7) \
1879 continue; \
1880 \
1875 p = (unsigned long)IOMMU_PTE_PAGE(pt[i]); \ 1881 p = (unsigned long)IOMMU_PTE_PAGE(pt[i]); \
1876 FN(p); \ 1882 FN(p); \
1877 } \ 1883 } \