Re: [PATCH 1/2] iommu/arm-smmu-v3: Replace sort_nonatomic() with sort()

From: Nicolin Chen

Date: Sun Aug 02 2026 - 13:46:14 EST


On Sun, Aug 02, 2026 at 10:23:48AM +0100, Will Deacon wrote:
> On Thu, Jul 30, 2026 at 06:12:15PM +0000, Kuan-Wei Chiu wrote:
> > @@ -4047,9 +4047,9 @@ static int arm_smmu_insert_master(struct arm_smmu_device *smmu,
> > }
> >
> > /* Put the ids into order for sorted to_merge/to_unref arrays */
> > - sort_nonatomic(master->streams, master->num_streams,
> > - sizeof(master->streams[0]), arm_smmu_stream_id_cmp,
> > - NULL);
> > + sort(master->streams, master->num_streams,
> > + sizeof(master->streams[0]), arm_smmu_stream_id_cmp,
> > + NULL);
>
> Makes sense to me. Nicolin, did you choose the nonatomic version
> specifically?

It's probably rare to have a large multi-stream array, so I think
sort() would be fine.

Nicolin