]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/amd: Refactor GCR3 table helper functions
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Mon, 5 Feb 2024 11:56:11 +0000 (11:56 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Feb 2024 12:16:28 +0000 (13:16 +0100)
commitcf70873e3d01653df69115576501f8f7f6f2b203
tree311289c1cd772ae0c7e2e1f19217386d0b1c953f
parentfb575d17813f6aff2e8b7e051dac8def2c291bff
iommu/amd: Refactor GCR3 table helper functions

To use the new per-device struct gcr3_tbl_info. Use GFP_KERNEL flag
instead of GFP_ATOMIC for GCR3 table allocation. Also modify
set_dte_entry() to use new per device GCR3 table.

Also in free_gcr3_table() path replace BUG_ON with WARN_ON_ONCE().

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