iommu/amd: Simplify pagetable freeing
authorRobin Murphy <robin.murphy@arm.com>
Fri, 17 Dec 2021 15:30:58 +0000 (15:30 +0000)
committerJoerg Roedel <jroedel@suse.de>
Mon, 20 Dec 2021 08:03:05 +0000 (09:03 +0100)
commit6b3106e9ba2de7320a71291cedcefdcf1195ad58
treeff269d15f9fcea00aa87f60620744c3032d3dcd4
parent649ad9835a3783bcb6c69368fa939e0010abb2c6
iommu/amd: Simplify pagetable freeing

For reasons unclear, pagetable freeing is an effectively recursive
method implemented via an elaborate system of templated functions that
turns out to account for 25% of the object file size. Implementing it
using regular straightforward recursion makes the code simpler, and
seems like a good thing to do before we work on it further. As part of
that, also fix the types to avoid all the needless casting back and
forth which just gets in the way.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/d3d00c9f3fa0df4756b867072c201e6e82f9ce39.1639753638.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/io_pgtable.c