Re: [PATCH v6 2/2] iommu/arm-smmu-v3: Default queue depths to one page in a kdump kernel

From: Jason Gunthorpe

Date: Wed Sep 23 2026 - 14:42:12 EST


> [ ... 40 lines skipped ... ]
> @@ -4432,10 +4435,30 @@ static u32 arm_smmu_queue_max_n_shift(u32 ceiling, u32 ent_sz_shift, u32 shift)
> {
> u32 floor = PAGE_SHIFT - ent_sz_shift;
>
> - if (!shift)
> + if (shift)
> + shift = max(shift, floor);
> + else if (is_kdump_kernel())
> + shift = floor;
> + else
> return ceiling;
>
> - return min(ceiling, max(shift, floor));
> + return min(ceiling, shift);
> +}

The logic looks OK

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

--
Jason