Commit 672185e5 authored by Ryan Huang's avatar Ryan Huang Committed by Mostafa Saleh
Browse files

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: default avatarRyan Huang <tzukui@google.com>
Signed-off-by: default avatarMostafa Saleh <smostafa@google.com>
parent 740d42d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment