iommu/amd: Rearrange GCR3 table setup code
authorVasant Hegde <vasant.hegde@amd.com>
Mon, 5 Feb 2024 11:56:06 +0000 (11:56 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Feb 2024 12:16:25 +0000 (13:16 +0100)
commitb2e8a7f5d2c3d99285e13cdd330d339d9b040599
tree34557f134ae4415a469d1c46acec9b2dc2bbe106
parent474bf01ed9f0358b243b264339baafcfbe6c6670
iommu/amd: Rearrange GCR3 table setup code

Consolidate GCR3 table related code in one place so that its easy
to maintain.

Note that this patch doesn't move __set_gcr3/__clear_gcr3. We are moving
GCR3 table from per domain to per device. Following series will rework
these functions. During that time I will move these functions as well.

No functional changes intended.

Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240205115615.6053-9-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c