[PATCH v4 4/6] iommu/sva: Use GFP_KERNEL for pasid allocation

Jacob Pan posted 6 patches 3 years, 1 month ago
There is a newer version of this series
[PATCH v4 4/6] iommu/sva: Use GFP_KERNEL for pasid allocation
Posted by Jacob Pan 3 years, 1 month ago
We’re not using  spinlock-protected IOASID allocation anymore, there’s
no need for GFP_ATOMIC.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
---
 drivers/iommu/iommu-sva.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c
index 297852ae5e7c..8c92a145e15d 100644
--- a/drivers/iommu/iommu-sva.c
+++ b/drivers/iommu/iommu-sva.c
@@ -29,7 +29,7 @@ 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);
+	ret = ida_alloc_range(&iommu_global_pasid_ida, min, max, GFP_KERNEL);
 	if (ret < min)
 		goto out;
 	mm->pasid = ret;
-- 
2.25.1

Re: [PATCH v4 4/6] iommu/sva: Use GFP_KERNEL for pasid allocation
Posted by Baolu Lu 3 years, 1 month ago
On 2023/3/2 7:56, Jacob Pan wrote:
> We’re not using  spinlock-protected IOASID allocation anymore, there’s
> no need for GFP_ATOMIC.
> 
> Signed-off-by: Jacob Pan<jacob.jun.pan@linux.intel.com>

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu
RE: [PATCH v4 4/6] iommu/sva: Use GFP_KERNEL for pasid allocation
Posted by Tian, Kevin 3 years, 1 month ago
> From: Jacob Pan <jacob.jun.pan@linux.intel.com>
> Sent: Thursday, March 2, 2023 7:57 AM
> 
> We’re not using  spinlock-protected IOASID allocation anymore, there’s
> no need for GFP_ATOMIC.
> 
> Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>

Reviewed-by: Kevin Tian <kevin.tian@intel.com>