aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/psci/psci.c
diff options
context:
space:
mode:
authorMarek Szyprowski <[email protected]>2020-03-27 16:21:26 +0000
committerAlex Deucher <[email protected]>2020-04-05 14:44:12 +0000
commitc0f83d164fb8f3a2b7bc379a6c1e27d1123a9eab (patch)
treeb4a240c1160ac26cd189c80fb7215b200764c7bf /drivers/firmware/psci/psci.c
parentMerge drm/drm-next into drm-misc-next-fixes (diff)
downloadkernel-c0f83d164fb8f3a2b7bc379a6c1e27d1123a9eab.tar.gz
kernel-c0f83d164fb8f3a2b7bc379a6c1e27d1123a9eab.zip
drm/prime: fix extracting of the DMA addresses from a scatterlist
Scatterlist elements contains both pages and DMA addresses, but one should not assume 1:1 relation between them. The sg->length is the size of the physical memory chunk described by the sg->page, while sg_dma_len(sg) is the size of the DMA (IO virtual) chunk described by the sg_dma_address(sg). The proper way of extracting both: pages and DMA addresses of the whole buffer described by a scatterlist it to iterate independently over the sg->pages/sg->length and sg_dma_address(sg)/sg_dma_len(sg) entries. Fixes: 42e67b479eab ("drm/prime: use dma length macro when mapping sg") Signed-off-by: Marek Szyprowski <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Cc: [email protected]
Diffstat (limited to 'drivers/firmware/psci/psci.c')
0 files changed, 0 insertions, 0 deletions