iommu/pages: Move the __GFP_HIGHMEM checks into the common code
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 8 Apr 2025 16:54:02 +0000 (13:54 -0300)
committerJoerg Roedel <jroedel@suse.de>
Thu, 17 Apr 2025 14:22:45 +0000 (16:22 +0200)
commit580ccca4ee53d7f2a2c90044220887daec0dcd9a
tree657018f11532e5eb6eca40d87a37d9618b59c641
parent212fcf36c6a6ee948790f9b860e89f87c68deb35
iommu/pages: Move the __GFP_HIGHMEM checks into the common code

The entire allocator API is built around using the kernel virtual address,
it is illegal to pass GFP_HIGHMEM in as a GFP flag. Block it in the common
code. Remove the duplicated checks from drivers.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/14-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/io-pgtable-arm.c
drivers/iommu/io-pgtable-dart.c
drivers/iommu/iommu-pages.c