Skip to content
Commit 6c385c1f authored by Will Deacon's avatar Will Deacon Committed by Greg Kroah-Hartman
Browse files

swiotlb: Reinstate page-alignment for mappings >= PAGE_SIZE

commit 14cebf68 upstream.

For swiotlb allocations >= PAGE_SIZE, the slab search historically
adjusted the stride to avoid checking unaligned slots. This had the
side-effect of aligning large mapping requests to PAGE_SIZE, but that
was broken by 0eee5ae1

 ("swiotlb: fix slot alignment checks").

Since this alignment could be relied upon drivers, reinstate PAGE_SIZE
alignment for swiotlb mappings >= PAGE_SIZE.

Cc: stable@vger.kernel.org # v6.6+
Reported-by: default avatarMichael Kelley <mhklinux@outlook.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
Reviewed-by: default avatarPetr Tesarik <petr.tesarik1@huawei-partners.com>
Tested-by: default avatarNicolin Chen <nicolinc@nvidia.com>
Tested-by: default avatarMichael Kelley <mhklinux@outlook.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarFabio Estevam <festevam@denx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6033fc95
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment