| 1 |
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ |
| 2 |
/* |
| 3 |
* Copyright (c) 2021 Intel Corporation. All rights reserved. |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef __LINUX_DMABUF_REG_H__ |
| 7 |
#define __LINUX_DMABUF_REG_H__ |
| 8 |
|
| 9 |
#ifdef __KERNEL__ |
| 10 |
#include <linux/types.h> |
| 11 |
#else |
| 12 |
#include <stdint.h> |
| 13 |
#endif |
| 14 |
|
| 15 |
#define DMABUF_REG_DEV_NAME "dmabuf_reg" |
| 16 |
#define DMABUF_REG_IOCTL 1 |
| 17 |
|
| 18 |
enum { |
| 19 |
DMABUF_REG_ADD, |
| 20 |
DMABUF_REG_REMOVE_ADDR, |
| 21 |
DMABUF_REG_REMOVE_FD, |
| 22 |
DMABUF_REG_QUERY, |
| 23 |
}; |
| 24 |
|
| 25 |
struct dmabuf_reg_param { |
| 26 |
uint64_t base; |
| 27 |
uint64_t size; |
| 28 |
uint32_t fd; |
| 29 |
uint32_t op; |
| 30 |
}; |
| 31 |
|
| 32 |
#endif /* __LINUX_DMABUF_REG_H__ */ |