ANDROID: iommu/iommu: Handle multi-page deferred sg mappings
The `__iommu_add_sg` function currently assumes that a scatter-gather entry will always map to a single page size. However, a single scatter-gather entry can span multiple IOMMU page sizes if there is a larger page size mapping. This can lead to issues with deferred scatter-gather mappings. This patch modifies `__iommu_add_sg` to iteratively call `ops->add_deferred_map_sg` for each IOMMU page-sized chunk within a scatter-gather entry, ensuring that all parts of the entry are correctly handled for deferred mappings. Fixes: 1a608d2b ("BACKPORT: FROMLIST: drivers/iommu: Add deferred map_sg operations") Change-Id: I2d2edbd5fa3d37c0b1e4a9976824b77a9ef39676 Signed-off-by:Ryan Huang <tzukui@google.com> Signed-off-by:
Mostafa Saleh <smostafa@google.com>
Loading
Please sign in to comment