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 4dfadcfed34a..31e90c472c76 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1866,9 +1866,15 @@ static void free_pt_##LVL (unsigned long __pt) \
1866 pt = (u64 *)__pt; \ 1866 pt = (u64 *)__pt; \
1867 \ 1867 \
1868 for (i = 0; i < 512; ++i) { \ 1868 for (i = 0; i < 512; ++i) { \
1869 /* PTE present? */ \
1869 if (!IOMMU_PTE_PRESENT(pt[i])) \ 1870 if (!IOMMU_PTE_PRESENT(pt[i])) \
1870 continue; \ 1871 continue; \
1871 \ 1872 \
1873 /* Large PTE? */ \
1874 if (PM_PTE_LEVEL(pt[i]) == 0 || \
1875 PM_PTE_LEVEL(pt[i]) == 7) \
1876 continue; \
1877 \
1872 p = (unsigned long)IOMMU_PTE_PAGE(pt[i]); \ 1878 p = (unsigned long)IOMMU_PTE_PAGE(pt[i]); \
1873 FN(p); \ 1879 FN(p); \
1874 } \ 1880 } \