]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9f83ee91a6f25070fa4199729bf19a10910f08d6
treeff269d15f9fcea00aa87f60620744c3032d3dcd4
parent4888ad12e47b4ef512dc828c452c4c87c49a4d6f
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