diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-08-04 12:25:55 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-08-04 12:25:55 -0700 |
commit | faefdddc4f71cd099a82ac24055a51438b1ee66a (patch) | |
tree | 5fafda6ea8c4cd128b8d1980184238cbb69f0688 /drivers/iommu/amd_iommu.c | |
parent | 0c9561b6f843fad1954e32ed780842f9b6750938 (diff) | |
parent | 69483e398f196d87ca3289f31ad3291bad94af60 (diff) |
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-androidlinux-linaro-lsk-v3.14-android-test
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 9cbef59d404a..935974090aa0 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1922,9 +1922,15 @@ static void free_pt_##LVL (unsigned long __pt) \ pt = (u64 *)__pt; \ \ for (i = 0; i < 512; ++i) { \ + /* PTE present? */ \ if (!IOMMU_PTE_PRESENT(pt[i])) \ continue; \ \ + /* Large PTE? */ \ + if (PM_PTE_LEVEL(pt[i]) == 0 || \ + PM_PTE_LEVEL(pt[i]) == 7) \ + continue; \ + \ p = (unsigned long)IOMMU_PTE_PAGE(pt[i]); \ FN(p); \ } \ |