diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-16 08:46:01 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-16 12:41:33 -0300 |
commit | 9a40401cfa1356b0d169be8470ed7b2edc33b98f (patch) | |
tree | d5a06663aaea0288eacc183ac2d41ef785191987 /net/devres.c | |
parent | 16e7483e6f02973972f832b18042fd6c45fe26c0 (diff) | |
download | linux-9a40401cfa1356b0d169be8470ed7b2edc33b98f.tar.bz2 |
lib/scatterlist: Do not limit max_segment to PAGE_ALIGNED values
The main intention of the max_segment argument to
__sg_alloc_table_from_pages() is to match the DMA layer segment size set
by dma_set_max_seg_size().
Restricting the input to be page aligned makes it impossible to just
connect the DMA layer to this API.
The only reason for a page alignment here is because the algorithm will
overshoot the max_segment if it is not a multiple of PAGE_SIZE. Simply fix
the alignment before starting and don't expose this implementation detail
to the callers.
A future patch will completely remove SCATTERLIST_MAX_SEGMENT.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'net/devres.c')
0 files changed, 0 insertions, 0 deletions