summaryrefslogtreecommitdiff
path: root/drivers/iommu/iommu-debug.c
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2015-07-14 16:41:29 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:13:40 -0700
commitd1f111a6f98c2e86471b4cc8c987f0affde1f5ae (patch)
tree656113f4359a226076013876f5a6bdb52b613ca5 /drivers/iommu/iommu-debug.c
parentc84f867d941dcc5827f324c1c3b12c709b1c54d6 (diff)
iommu/io-pgtable-arm: Don't leave dangling table entries
Currently, when all of the 4K PTEs beneath a 2M table entry are unmapped, that 2M table entry is left intact, even though it doesn't point to any valid 4K mappings anymore. This results in a warning if a subsequent block mapping lands on top of the dangling table entry, since we require empty page table entries when we map. It also causes the page at which that the stomped-on table was pointing to be leaked. Fix this by keeping track of how many entries are currently mapped beneath a table. When the map count goes to zero (in unmap), free up the page the table is pointing at and zero out the table entry. Change-Id: I470e6ffb2206a09fe7c24253e3fd64a744337a7f Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'drivers/iommu/iommu-debug.c')
0 files changed, 0 insertions, 0 deletions