mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
iommu/arm-smmu-v3: Replace sort_nonatomic() with sort()
The number of master->num_streams per master device is typically very small in practice. Sorting this array takes a very small amount of time, so there is no practical risk of triggering a soft lockup that would necessitate calling cond_resched() during the sort. Replace sort_nonatomic() with the standard sort(). Since this is the only remaining in-tree caller of sort_nonatomic(), this change paves the way to eventually remove the unused sort_nonatomic() API from the core library. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
773f2b9e36
commit
340e3c5165
|
|
@ -4113,9 +4113,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);
|
||||
|
||||
mutex_lock(&smmu->streams_mutex);
|
||||
for (i = 0; i < fwspec->num_ids; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user