]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/amd: Move the nid to pdom_setup_pgtable()
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 10 Jan 2025 16:35:04 +0000 (12:35 -0400)
committerJoerg Roedel <jroedel@suse.de>
Fri, 17 Jan 2025 07:59:31 +0000 (08:59 +0100)
commit5a081f7f428cc68c2df8eb281bfbaedf65b749c1
tree7a90b8d013aa3243288d699c5162f36c7c48baef
parent13b4ec749163710e3d188d2fed7405308b1b1e73
iommu/amd: Move the nid to pdom_setup_pgtable()

The only thing that uses the nid is the io_pgtable code, and it should be
set before calling alloc_io_pgtable_ops() to ensure that the top levels
are allocated on the correct nid.

Since dev is never NULL now we can just do this trivially and remove the
other uses of nid. SVA and identity code paths never use it since they
don't use io_pgtable.

Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/6-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/iommu.c
drivers/iommu/amd/pasid.c