mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xen/gntdev: Allow mappings for DMA buffers
Allow mappings for DMA backed buffers if grant table module supports such: this extends grant device to not only map buffers made of balloon pages, but also from buffers allocated with dma_alloc_xxx. 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>
This commit is contained in:
parent
9bdc7304f5
commit
975ef7ff81
2 changed files with 112 additions and 2 deletions
|
@ -200,4 +200,19 @@ struct ioctl_gntdev_grant_copy {
|
|||
/* Send an interrupt on the indicated event channel */
|
||||
#define UNMAP_NOTIFY_SEND_EVENT 0x2
|
||||
|
||||
/*
|
||||
* Flags to be used while requesting memory mapping's backing storage
|
||||
* to be allocated with DMA API.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The buffer is backed with memory allocated with dma_alloc_wc.
|
||||
*/
|
||||
#define GNTDEV_DMA_FLAG_WC (1 << 0)
|
||||
|
||||
/*
|
||||
* The buffer is backed with memory allocated with dma_alloc_coherent.
|
||||
*/
|
||||
#define GNTDEV_DMA_FLAG_COHERENT (1 << 1)
|
||||
|
||||
#endif /* __LINUX_PUBLIC_GNTDEV_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue