1e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * Berkeley style UIO structures - Alan Cox 1994. 4607ca46eSDavid Howells * 5607ca46eSDavid Howells * This program is free software; you can redistribute it and/or 6607ca46eSDavid Howells * modify it under the terms of the GNU General Public License 7607ca46eSDavid Howells * as published by the Free Software Foundation; either version 8607ca46eSDavid Howells * 2 of the License, or (at your option) any later version. 9607ca46eSDavid Howells */ 10607ca46eSDavid Howells #ifndef _UAPI__LINUX_UIO_H 11607ca46eSDavid Howells #define _UAPI__LINUX_UIO_H 12607ca46eSDavid Howells 13607ca46eSDavid Howells #include <linux/compiler.h> 14607ca46eSDavid Howells #include <linux/types.h> 15607ca46eSDavid Howells 16607ca46eSDavid Howells 17607ca46eSDavid Howells struct iovec 18607ca46eSDavid Howells { 19607ca46eSDavid Howells void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ 20607ca46eSDavid Howells __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ 21607ca46eSDavid Howells }; 22607ca46eSDavid Howells 238f0b3cc9SMina Almasry struct dmabuf_cmsg { 248f0b3cc9SMina Almasry __u64 frag_offset; /* offset into the dmabuf where the frag starts. 258f0b3cc9SMina Almasry */ 268f0b3cc9SMina Almasry __u32 frag_size; /* size of the frag. */ 278f0b3cc9SMina Almasry __u32 frag_token; /* token representing this frag for 288f0b3cc9SMina Almasry * DEVMEM_DONTNEED. 298f0b3cc9SMina Almasry */ 308f0b3cc9SMina Almasry __u32 dmabuf_id; /* dmabuf id this frag belongs to. */ 318f0b3cc9SMina Almasry __u32 flags; /* Currently unused. Reserved for future 328f0b3cc9SMina Almasry * uses. 338f0b3cc9SMina Almasry */ 348f0b3cc9SMina Almasry }; 358f0b3cc9SMina Almasry 36*678f6e28SMina Almasry struct dmabuf_token { 37*678f6e28SMina Almasry __u32 token_start; 38*678f6e28SMina Almasry __u32 token_count; 39*678f6e28SMina Almasry }; 40*678f6e28SMina Almasry 41607ca46eSDavid Howells /* 42607ca46eSDavid Howells * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) 43607ca46eSDavid Howells */ 44607ca46eSDavid Howells 45607ca46eSDavid Howells #define UIO_FASTIOV 8 46607ca46eSDavid Howells #define UIO_MAXIOV 1024 47607ca46eSDavid Howells 48607ca46eSDavid Howells 49607ca46eSDavid Howells #endif /* _UAPI__LINUX_UIO_H */ 50