]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/arm-smmu-v3: Limit queue allocation retry boundary to PAGE_SIZE
authorLeo Jiang <leo.jiang1224@foxmail.com>
Sat, 9 May 2026 07:07:33 +0000 (15:07 +0800)
committerWill Deacon <will@kernel.org>
Tue, 19 May 2026 11:57:53 +0000 (12:57 +0100)
Stop retrying queue allocation when qsz reaches PAGE_SIZE.

Signed-off-by: Leo Jiang <leo.jiang1224@foxmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

index e8d7dbe495f0302191c3c7ec4c6d7564062f6236..4a0b15b1d4d244e26c9c874f99cda372b137baf4 100644 (file)
@@ -4418,7 +4418,7 @@ int arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
                qsz = ((1 << q->llq.max_n_shift) * dwords) << 3;
                q->base = dmam_alloc_coherent(smmu->dev, qsz, &q->base_dma,
                                              GFP_KERNEL);
-               if (q->base || qsz < PAGE_SIZE)
+               if (q->base || qsz <= PAGE_SIZE)
                        break;
 
                q->llq.max_n_shift--;