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

From
Jason Gunthorpe <jgg@nvidia.com>
Date
2026-09-23 17:03:59
Also in
linux-iommu, linux-tegra, lkml
Reply to
Kiryl Shutsemau (Meta), 2026-09-09
quoted hunk ↗ jump to hunk
[ ... 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@nvidia.com>

-- 
Jason
Thread (10 messages) 10 messages, 5 authors, last reply 2026-10-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help