OSDN Git Service

dma-buf: Clarify that dma-buf sg lists are page aligned
authorJianxin Xiong <jianxin.xiong@intel.com>
Wed, 14 Oct 2020 16:16:01 +0000 (09:16 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 15 Oct 2020 21:15:43 +0000 (23:15 +0200)
commitac80cd17a615e472e3dcff0a5446a58540e64e6d
tree44d8ef5a2d724ef5e835c3344717d21a36265a49
parent73b62cdb93b68d7e2c1d373c6a411bc00c53e702
dma-buf: Clarify that dma-buf sg lists are page aligned

The dma-buf API have been used under the assumption that the sg lists
returned from dma_buf_map_attachment() are fully page aligned. Lots of
stuff can break otherwise all over the place. Clarify this in the
documentation and add a check when DMA API debug is enabled.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1602692161-107096-1-git-send-email-jianxin.xiong@intel.com
drivers/dma-buf/dma-buf.c
include/linux/dma-buf.h