From: Leo Jiang Date: Sat, 9 May 2026 07:07:33 +0000 (+0800) Subject: iommu/arm-smmu-v3: Limit queue allocation retry boundary to PAGE_SIZE X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b9f593dad4666998d2440f4a8a6905c90b805dd;p=thirdparty%2Fkernel%2Flinux.git iommu/arm-smmu-v3: Limit queue allocation retry boundary to PAGE_SIZE Stop retrying queue allocation when qsz reaches PAGE_SIZE. Signed-off-by: Leo Jiang Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index e8d7dbe495f03..4a0b15b1d4d24 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -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--;