iommu/amd: Remove the amd_iommu_domain_set_pt_root() and related
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 30 Aug 2024 00:06:14 +0000 (21:06 -0300)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 Sep 2024 09:38:31 +0000 (11:38 +0200)
commit1ed2d21d471caf2e4351c2e8bb14143bc8062092
treea88314596cb38315f48eadd12985bdacbcbf2acd
parent322d889ae7d39f8538a6deac35869aa3be1855bd
iommu/amd: Remove the amd_iommu_domain_set_pt_root() and related

Looks like many refactorings here have left this confused. There is only
one storage of the root/mode, it is in the iop struct.

increase_address_space() calls amd_iommu_domain_set_pgtable() with values
that it already stored in iop a few lines above.

amd_iommu_domain_clr_pt_root() is zero'ing memory we are about to free. It
used to protect against a double free of root, but that is gone now.

Remove amd_iommu_domain_set_pgtable(), amd_iommu_domain_set_pt_root(),
amd_iommu_domain_clr_pt_root() as they are all pointless.

Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/5-v2-831cdc4d00f3+1a315-amd_iopgtbl_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/io_pgtable.c