This series of swiotlb patches fixes a iwlwifi regression on the i.MX8MM IoT Gateway board running kernel 6.6.
This was noticed when updating the kernel from 5.10 to 6.6.
Without this series, the board cannot boot kernel 6.6 due to the storm of alignment errors from the iwlwifi driver.
This has been reported and discussed in the linux-wireless list: https://lore.kernel.org/linux-wireless/CAOMZO5D2Atb=rnvmNLvu8nrsn+3L9X9NbG1b...
Will Deacon suggested:
"If you want to backport that change, then I think you should probably take the whole series:
https://lore.kernel.org/all/20240308152829.25754-1-will@kernel.org/
(and there were some follow-ups from Michael iirc; you're best off checking the git history for kernel/dma/swiotlb.c).
FWIW: we have this series backported to 6.6 in the android15-6.6 tree."
From this series, only the two patches below are not present in the 6.6 stable tree:
swiotlb: Enforce page alignment in swiotlb_alloc() swiotlb: Reinstate page-alignment for mappings >= PAGE_SIZE
While at it, also backport: swiotlb: extend buffer pre-padding to alloc_align_mask if necessary
as it fixes a commit that is present in 6.6.
Petr Tesarik (1): swiotlb: extend buffer pre-padding to alloc_align_mask if necessary
Will Deacon (2): swiotlb: Enforce page alignment in swiotlb_alloc() swiotlb: Reinstate page-alignment for mappings >= PAGE_SIZE
kernel/dma/swiotlb.c | 83 +++++++++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 20 deletions(-)