]> git.baikalelectronics.ru Git - kernel.git/commit
vduse: Use memcpy_{to,from}_page() in do_bounce()
authorXie Yongji <xieyongji@bytedance.com>
Wed, 3 Aug 2022 04:55:20 +0000 (12:55 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:26:08 +0000 (04:26 -0400)
commit26be67fbb1aefcc3113a0f1d1c8457316aed848d
tree59bc34926c52e9c16aba821a508226adf9715c7f
parent719c9f9b8a4b77ff2d46fcb2928ab23969e18b40
vduse: Use memcpy_{to,from}_page() in do_bounce()

kmap_atomic() is being deprecated in favor of kmap_local_page().

The use of kmap_atomic() in do_bounce() is all thread local therefore
kmap_local_page() is a sufficient replacement.

Convert to kmap_local_page() but, instead of open coding it,
use the helpers memcpy_to_page() and memcpy_from_page().

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Message-Id: <20220803045523.23851-3-xieyongji@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_user/iova_domain.c