summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2023-03-22 13:08:01 -0700
committerJoerg Roedel <jroedel@suse.de>2023-03-31 10:03:26 +0200
commit1a14bf0fc7ed9476284cd6ab358c783fd9a0cb5b (patch)
treeccf533cba1d1d0ec073dfde591d05e18a4628ef7 /drivers/iommu
parent4e14176ab13fb6986dd079c711d46b70712da2f1 (diff)
downloadlinux-stable-1a14bf0fc7ed9476284cd6ab358c783fd9a0cb5b.tar.gz
iommu/sva: Use GFP_KERNEL for pasid allocation
We’re not using spinlock-protected IOASID allocation anymore, there’s no need for GFP_ATOMIC. Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Link: https://lore.kernel.org/r/20230322200803.869130-6-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/iommu-sva.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c
index 48e8a15ddc9b..c434b95dc8eb 100644
--- a/drivers/iommu/iommu-sva.c
+++ b/drivers/iommu/iommu-sva.c
@@ -28,8 +28,8 @@ static int iommu_sva_alloc_pasid(struct mm_struct *mm, ioasid_t min, ioasid_t ma
goto out;
}
- ret = ida_alloc_range(&iommu_global_pasid_ida, min, max, GFP_ATOMIC);
- if (ret < 0)
+ ret = ida_alloc_range(&iommu_global_pasid_ida, min, max, GFP_KERNEL);
+ if (ret < min)
goto out;
mm->pasid = ret;
ret = 0;