/* * Copyright 2017 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Authors: Jérôme Glisse */ #ifndef COMPOTE_UAPI_H #define COMPOTE_UAPI_H #include #include #include struct compote_ioctl_mem_alloc { uint64_t nbytes; uint64_t foffset; }; struct compote_ioctl_mem_free { uint64_t foffset; }; struct compote_ioctl_channel_alloc { uint64_t channel; }; struct compote_ioctl_channel_free { uint64_t channel; }; struct compote_ioctl_channel_execute { uint64_t channel; uint64_t addr; uint32_t ndw; }; /* Expose the address space of the calling process through hmm dummy dev file */ #define COMPOTE_IOCTL_MEM_ALLOC _IOWR('H', 0x00, struct compote_ioctl_mem_alloc) #define COMPOTE_IOCTL_MEM_FREE _IOWR('H', 0x01, struct compote_ioctl_mem_free) #define COMPOTE_IOCTL_CHAN_ALLOC _IOWR('H', 0x02, struct compote_ioctl_channel_alloc) #define COMPOTE_IOCTL_CHAN_FREE _IOWR('H', 0x03, struct compote_ioctl_channel_free) #define COMPOTE_IOCTL_CHAN_EXEC _IOWR('H', 0x04, struct compote_ioctl_channel_execute) #endif /* COMPOTE_UAPI_H */