diff options
author | Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> | 2018-07-20 12:01:49 +0300 |
---|---|---|
committer | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2018-07-26 23:05:14 -0400 |
commit | a240d6e42e28c34fdc34b3a98ca838a31c939901 (patch) | |
tree | b2baa1625bc178faa79816dcbb37bae1bedfb105 /mm/cleancache.c | |
parent | 932d6562179efe8e2460a0343dbe0fcacf288a9e (diff) | |
download | talos-obmc-linux-a240d6e42e28c34fdc34b3a98ca838a31c939901.tar.gz talos-obmc-linux-a240d6e42e28c34fdc34b3a98ca838a31c939901.zip |
xen/gntdev: Implement dma-buf export functionality
1. Create a dma-buf from grant references provided by the foreign
domain. By default dma-buf is backed by system memory pages, but
by providing GNTDEV_DMA_FLAG_XXX flags it can also be created
as a DMA write-combine/coherent buffer, e.g. allocated with
corresponding dma_alloc_xxx API.
Export the resulting buffer as a new dma-buf.
2. Implement waiting for the dma-buf to be released: block until the
dma-buf with the file descriptor provided is released.
If within the time-out provided the buffer is not released then
-ETIMEDOUT error is returned. If the buffer with the file descriptor
does not exist or has already been released, then -ENOENT is
returned. For valid file descriptors this must not be treated as
error.
3. Make gntdev's common code and structures available to dma-buf.
[boris: added 'args.fd = -1' to dmabuf_exp_from_refs() to avoid an
unnecessary warning about it not being initialized on i386 with gcc 8.1.1]
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'mm/cleancache.c')
0 files changed, 0 insertions, 0 deletions