diff options
author | Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> | 2023-05-16 03:26:53 +0000 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:34:01 -0500 |
commit | 1b1d3710380d5f0517dcaabe1b96b6401f68ec37 (patch) | |
tree | 3c58bafc2a821c4f033e78dfa64be24565965bc4 /io_uring/io-wq.c | |
parent | 6ed6ba32dba14ef851ecb7190597d6bac77618e2 (diff) |
drm/xe: Apply upper limit to sg element size
The iommu_dma_map_sg() function ensures iova allocation doesn't
cross dma segment boundary. It does so by padding some sg elements.
This can cause overflow, ending up with sg->length being set to 0.
Avoid this by halving the maximum segment size (rounded down to
PAGE_SIZE).
Specify maximum segment size for sg elements by using
sg_alloc_table_from_pages_segment() to allocate sg_table.
v2: Use correct max segment size in dma_set_max_seg_size() call
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Bruce Chang <yu.bruce.chang@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'io_uring/io-wq.c')
0 files changed, 0 insertions, 0 deletions