Commit 1a14bf0f authored by Jacob Pan's avatar Jacob Pan Committed by Joerg Roedel

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: default avatarKevin Tian <kevin.tian@intel.com>
Reviewed-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
Link: https://lore.kernel.org/r/20230322200803.869130-6-jacob.jun.pan@linux.intel.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 4e14176a
...@@ -28,8 +28,8 @@ static int iommu_sva_alloc_pasid(struct mm_struct *mm, ioasid_t min, ioasid_t ma ...@@ -28,8 +28,8 @@ static int iommu_sva_alloc_pasid(struct mm_struct *mm, ioasid_t min, ioasid_t ma
goto out; goto out;
} }
ret = ida_alloc_range(&iommu_global_pasid_ida, min, max, GFP_ATOMIC); ret = ida_alloc_range(&iommu_global_pasid_ida, min, max, GFP_KERNEL);
if (ret < 0) if (ret < min)
goto out; goto out;
mm->pasid = ret; mm->pasid = ret;
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment