diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2023-01-23 21:35:54 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-01-25 11:52:00 +0100 |
commit | 1369459b2e219a6f4c861404c4f195cd81dcbb40 (patch) | |
tree | 6fcaf0e9691616113f7f10521e5d151ac8090f29 /drivers/net/ipa/ipa_mem.c | |
parent | Linux 6.2-rc3 (diff) | |
download | linux-1369459b2e219a6f4c861404c4f195cd81dcbb40.tar.xz linux-1369459b2e219a6f4c861404c4f195cd81dcbb40.zip |
iommu: Add a gfp parameter to iommu_map()
The internal mechanisms support this, but instead of exposting the gfp to
the caller it wrappers it into iommu_map() and iommu_map_atomic()
Fix this instead of adding more variants for GFP_KERNEL_ACCOUNT.
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/1-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/net/ipa/ipa_mem.c')
-rw-r--r-- | drivers/net/ipa/ipa_mem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index 9ec5af323f73..991a7d39f066 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -466,7 +466,8 @@ static int ipa_imem_init(struct ipa *ipa, unsigned long addr, size_t size) size = PAGE_ALIGN(size + addr - phys); iova = phys; /* We just want a direct mapping */ - ret = iommu_map(domain, iova, phys, size, IOMMU_READ | IOMMU_WRITE); + ret = iommu_map(domain, iova, phys, size, IOMMU_READ | IOMMU_WRITE, + GFP_KERNEL); if (ret) return ret; @@ -574,7 +575,8 @@ static int ipa_smem_init(struct ipa *ipa, u32 item, size_t size) size = PAGE_ALIGN(size + addr - phys); iova = phys; /* We just want a direct mapping */ - ret = iommu_map(domain, iova, phys, size, IOMMU_READ | IOMMU_WRITE); + ret = iommu_map(domain, iova, phys, size, IOMMU_READ | IOMMU_WRITE, + GFP_KERNEL); if (ret) return ret; |