Re: [PATCH v1 2/6] iommu/vt-d: Use IDA interface to manage iommu sequence id

2022-06-30 Thread Lu Baolu
On 6/30/22 4:21 PM, Tian, Kevin wrote: From: Lu Baolu Sent: Saturday, June 25, 2022 8:52 PM @@ -1062,11 +1040,14 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) if (!iommu) return -ENOMEM; - if (dmar_alloc_seq_id(iommu) < 0) { + iommu->seq_id =

RE: [PATCH v1 2/6] iommu/vt-d: Use IDA interface to manage iommu sequence id

2022-06-30 Thread Tian, Kevin
> From: Lu Baolu > Sent: Saturday, June 25, 2022 8:52 PM > > @@ -1062,11 +1040,14 @@ static int alloc_iommu(struct dmar_drhd_unit > *drhd) > if (!iommu) > return -ENOMEM; > > - if (dmar_alloc_seq_id(iommu) < 0) { > + iommu->seq_id = ida_alloc_range(_seq_ids, 0, > +

[PATCH v1 2/6] iommu/vt-d: Use IDA interface to manage iommu sequence id

2022-06-25 Thread Lu Baolu
Switch dmar unit sequence id allocation and release from bitmap to IDA interface. Signed-off-by: Lu Baolu --- drivers/iommu/intel/dmar.c | 33 +++-- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c