Linux 4.4-rc2 Backmerge to get at commit 1b0e3a049efe471c399674fd954500ce97438d30 Author: Imre Deak <imre.deak@intel.com> Date: Thu Nov 5 23:04:11 2015 +0200 drm/i915/skl: disable display side power well support for now so that we can proplery re-eanble skl power wells in -next. Conflicts are just adjacent lines changed, except for intel_fbdev.c where we need to interleave the changs. Nothing nefarious.
Showing the changes to include/uapi (72 of 9857 files). Show all
Unified · Split
| @@ -25,6 +25,11 @@ · 24 unmodified lines | |||
| 25 | # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ | 25 | # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | /* | ||
| 29 | * Flags for mlock | ||
| 30 | */ | ||
| 31 | #define MLOCK_ONFAULT 0x01 /* Lock pages in range after they are faulted in, do not prefault */ | ||
| 32 | |||
| 28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | 33 | #define MS_ASYNC 1 /* sync memory asynchronously */ |
| 29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | 34 | #define MS_INVALIDATE 2 /* invalidate the caches */ |
| 30 | #define MS_SYNC 4 /* synchronous memory sync */ | 35 | #define MS_SYNC 4 /* synchronous memory sync */ |
| @@ -17,5 +17,6 @@ · 16 unmodified lines | |||
| 17 | 17 | ||
| 18 | #define MCL_CURRENT 1 /* lock all current mappings */ | 18 | #define MCL_CURRENT 1 /* lock all current mappings */ |
| 19 | #define MCL_FUTURE 2 /* lock all future mappings */ | 19 | #define MCL_FUTURE 2 /* lock all future mappings */ |
| 20 | #define MCL_ONFAULT 4 /* lock all pages that are faulted in */ | ||
| 20 | 21 | ||
| 21 | #endif /* __ASM_GENERIC_MMAN_H */ | 22 | #endif /* __ASM_GENERIC_MMAN_H */ |
| @@ -80,8 +80,10 @@ · 79 unmodified lines | |||
| 80 | * SA_RESTORER 0x04000000 | 80 | * SA_RESTORER 0x04000000 |
| 81 | */ | 81 | */ |
| 82 | 82 | ||
| 83 | #if !defined MINSIGSTKSZ || !defined SIGSTKSZ | ||
| 83 | #define MINSIGSTKSZ 2048 | 84 | #define MINSIGSTKSZ 2048 |
| 84 | #define SIGSTKSZ 8192 | 85 | #define SIGSTKSZ 8192 |
| 86 | #endif | ||
| 85 | 87 | ||
| 86 | #ifndef __ASSEMBLY__ | 88 | #ifndef __ASSEMBLY__ |
| 87 | typedef struct { | 89 | typedef struct { |
| @@ -713,9 +713,11 @@ __SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat) · 712 unmodified lines | |||
| 713 | __SYSCALL(__NR_userfaultfd, sys_userfaultfd) | 713 | __SYSCALL(__NR_userfaultfd, sys_userfaultfd) |
| 714 | #define __NR_membarrier 283 | 714 | #define __NR_membarrier 283 |
| 715 | __SYSCALL(__NR_membarrier, sys_membarrier) | 715 | __SYSCALL(__NR_membarrier, sys_membarrier) |
| 716 | #define __NR_mlock2 284 | ||
| 717 | __SYSCALL(__NR_mlock2, sys_mlock2) | ||
| 716 | 718 | ||
| 717 | #undef __NR_syscalls | 719 | #undef __NR_syscalls |
| 718 | #define __NR_syscalls 284 | 720 | #define __NR_syscalls 285 |
| 719 | 721 | ||
| 720 | /* | 722 | /* |
| 721 | * All syscalls below here should go away really, | 723 | * All syscalls below here should go away really, |
| @@ -17,3 +17,4 @@ header-y += tegra_drm.h · 16 unmodified lines | |||
| 17 | header-y += via_drm.h | 17 | header-y += via_drm.h |
| 18 | header-y += vmwgfx_drm.h | 18 | header-y += vmwgfx_drm.h |
| 19 | header-y += msm_drm.h | 19 | header-y += msm_drm.h |
| 20 | header-y += virtgpu_drm.h | ||
| @@ -640,6 +640,6 @@ struct drm_amdgpu_info_hw_ip { · 639 unmodified lines | |||
| 640 | #define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */ | 640 | #define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */ |
| 641 | #define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */ | 641 | #define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */ |
| 642 | #define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */ | 642 | #define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */ |
| 643 | #define AMDGPU_FAMILY_CZ 135 /* Carrizo */ | 643 | #define AMDGPU_FAMILY_CZ 135 /* Carrizo, Stoney */ |
| 644 | 644 | ||
| 645 | #endif | 645 | #endif |
| @@ -158,7 +158,7 @@ · 157 unmodified lines | |||
| 158 | /* add more to the end as needed */ | 158 | /* add more to the end as needed */ |
| 159 | 159 | ||
| 160 | #define fourcc_mod_code(vendor, val) \ | 160 | #define fourcc_mod_code(vendor, val) \ |
| 161 | ((((u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | (val & 0x00ffffffffffffffULL)) | 161 | ((((__u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | (val & 0x00ffffffffffffffULL)) |
| 162 | 162 | ||
| 163 | /* | 163 | /* |
| 164 | * Format Modifier tokens: | 164 | * Format Modifier tokens: |
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _I810_DRM_H_ | 1 | #ifndef _I810_DRM_H_ |
| 2 | #define _I810_DRM_H_ | 2 | #define _I810_DRM_H_ |
| 3 | 3 | ||
| 4 | #include <drm/drm.h> | ||
| 5 | |||
| 4 | /* WARNING: These defines must be the same as what the Xserver uses. | 6 | /* WARNING: These defines must be the same as what the Xserver uses. |
| 5 | * if you change them, you must change the defines in the Xserver. | 7 | * if you change them, you must change the defines in the Xserver. |
| 6 | */ | 8 | */ |
| @@ -27,14 +27,6 @@ · 26 unmodified lines | |||
| 27 | 27 | ||
| 28 | #define DRM_NOUVEAU_EVENT_NVIF 0x80000000 | 28 | #define DRM_NOUVEAU_EVENT_NVIF 0x80000000 |
| 29 | 29 | ||
| 30 | /* reserved object handles when using deprecated object APIs - these | ||
| 31 | * are here so that libdrm can allow interoperability with the new | ||
| 32 | * object APIs | ||
| 33 | */ | ||
| 34 | #define NOUVEAU_ABI16_CLIENT 0xffffffff | ||
| 35 | #define NOUVEAU_ABI16_DEVICE 0xdddddddd | ||
| 36 | #define NOUVEAU_ABI16_CHAN(n) (0xcccc0000 | (n)) | ||
| 37 | |||
| 38 | #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) | 30 | #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) |
| 39 | #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) | 31 | #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) |
| 40 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) | 32 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) |
| @@ -33,6 +33,8 @@ · 32 unmodified lines | |||
| 33 | #ifndef __R128_DRM_H__ | 33 | #ifndef __R128_DRM_H__ |
| 34 | #define __R128_DRM_H__ | 34 | #define __R128_DRM_H__ |
| 35 | 35 | ||
| 36 | #include <drm/drm.h> | ||
| 37 | |||
| 36 | /* WARNING: If you change any of these defines, make sure to change the | 38 | /* WARNING: If you change any of these defines, make sure to change the |
| 37 | * defines in the X server file (r128_sarea.h) | 39 | * defines in the X server file (r128_sarea.h) |
| 38 | */ | 40 | */ |
| @@ -26,6 +26,8 @@ · 25 unmodified lines | |||
| 26 | #ifndef __SAVAGE_DRM_H__ | 26 | #ifndef __SAVAGE_DRM_H__ |
| 27 | #define __SAVAGE_DRM_H__ | 27 | #define __SAVAGE_DRM_H__ |
| 28 | 28 | ||
| 29 | #include <drm/drm.h> | ||
| 30 | |||
| 29 | #ifndef __SAVAGE_SAREA_DEFINES__ | 31 | #ifndef __SAVAGE_SAREA_DEFINES__ |
| 30 | #define __SAVAGE_SAREA_DEFINES__ | 32 | #define __SAVAGE_SAREA_DEFINES__ |
| 31 | 33 | ||
| @@ -64,8 +64,4 @@ typedef struct { · 63 unmodified lines | |||
| 64 | unsigned long offset, size; | 64 | unsigned long offset, size; |
| 65 | } drm_sis_fb_t; | 65 | } drm_sis_fb_t; |
| 66 | 66 | ||
| 67 | struct sis_file_private { | ||
| 68 | struct list_head obj_list; | ||
| 69 | }; | ||
| 70 | |||
| 71 | #endif /* __SIS_DRM_H__ */ | 67 | #endif /* __SIS_DRM_H__ */ |
| @@ -274,8 +274,4 @@ typedef struct drm_via_dmablit { · 273 unmodified lines | |||
| 274 | drm_via_blitsync_t sync; | 274 | drm_via_blitsync_t sync; |
| 275 | } drm_via_dmablit_t; | 275 | } drm_via_dmablit_t; |
| 276 | 276 | ||
| 277 | struct via_file_private { | ||
| 278 | struct list_head obj_list; | ||
| 279 | }; | ||
| 280 | |||
| 281 | #endif /* _VIA_DRM_H_ */ | 277 | #endif /* _VIA_DRM_H_ */ |
| @@ -0,0 +1,167 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2013 Red Hat | ||
| 3 | * All Rights Reserved. | ||
| 4 | * | ||
| 5 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 6 | * copy of this software and associated documentation files (the "Software"), | ||
| 7 | * to deal in the Software without restriction, including without limitation | ||
| 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 9 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 10 | * Software is furnished to do so, subject to the following conditions: | ||
| 11 | * | ||
| 12 | * The above copyright notice and this permission notice (including the next | ||
| 13 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 14 | * Software. | ||
| 15 | * | ||
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 19 | * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 22 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | */ | ||
| 24 | #ifndef VIRTGPU_DRM_H | ||
| 25 | #define VIRTGPU_DRM_H | ||
| 26 | |||
| 27 | #include <stddef.h> | ||
| 28 | #include "drm/drm.h" | ||
| 29 | |||
| 30 | /* Please note that modifications to all structs defined here are | ||
| 31 | * subject to backwards-compatibility constraints. | ||
| 32 | * | ||
| 33 | * Do not use pointers, use uint64_t instead for 32 bit / 64 bit user/kernel | ||
| 34 | * compatibility Keep fields aligned to their size | ||
| 35 | */ | ||
| 36 | |||
| 37 | #define DRM_VIRTGPU_MAP 0x01 | ||
| 38 | #define DRM_VIRTGPU_EXECBUFFER 0x02 | ||
| 39 | #define DRM_VIRTGPU_GETPARAM 0x03 | ||
| 40 | #define DRM_VIRTGPU_RESOURCE_CREATE 0x04 | ||
| 41 | #define DRM_VIRTGPU_RESOURCE_INFO 0x05 | ||
| 42 | #define DRM_VIRTGPU_TRANSFER_FROM_HOST 0x06 | ||
| 43 | #define DRM_VIRTGPU_TRANSFER_TO_HOST 0x07 | ||
| 44 | #define DRM_VIRTGPU_WAIT 0x08 | ||
| 45 | #define DRM_VIRTGPU_GET_CAPS 0x09 | ||
| 46 | |||
| 47 | struct drm_virtgpu_map { | ||
| 48 | uint64_t offset; /* use for mmap system call */ | ||
| 49 | uint32_t handle; | ||
| 50 | uint32_t pad; | ||
| 51 | }; | ||
| 52 | |||
| 53 | struct drm_virtgpu_execbuffer { | ||
| 54 | uint32_t flags; /* for future use */ | ||
| 55 | uint32_t size; | ||
| 56 | uint64_t command; /* void* */ | ||
| 57 | uint64_t bo_handles; | ||
| 58 | uint32_t num_bo_handles; | ||
| 59 | uint32_t pad; | ||
| 60 | }; | ||
| 61 | |||
| 62 | #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ | ||
| 63 | |||
| 64 | struct drm_virtgpu_getparam { | ||
| 65 | uint64_t param; | ||
| 66 | uint64_t value; | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* NO_BO flags? NO resource flag? */ | ||
| 70 | /* resource flag for y_0_top */ | ||
| 71 | struct drm_virtgpu_resource_create { | ||
| 72 | uint32_t target; | ||
| 73 | uint32_t format; | ||
| 74 | uint32_t bind; | ||
| 75 | uint32_t width; | ||
| 76 | uint32_t height; | ||
| 77 | uint32_t depth; | ||
| 78 | uint32_t array_size; | ||
| 79 | uint32_t last_level; | ||
| 80 | uint32_t nr_samples; | ||
| 81 | uint32_t flags; | ||
| 82 | uint32_t bo_handle; /* if this is set - recreate a new resource attached to this bo ? */ | ||
| 83 | uint32_t res_handle; /* returned by kernel */ | ||
| 84 | uint32_t size; /* validate transfer in the host */ | ||
| 85 | uint32_t stride; /* validate transfer in the host */ | ||
| 86 | }; | ||
| 87 | |||
| 88 | struct drm_virtgpu_resource_info { | ||
| 89 | uint32_t bo_handle; | ||
| 90 | uint32_t res_handle; | ||
| 91 | uint32_t size; | ||
| 92 | uint32_t stride; | ||
| 93 | }; | ||
| 94 | |||
| 95 | struct drm_virtgpu_3d_box { | ||
| 96 | uint32_t x; | ||
| 97 | uint32_t y; | ||
| 98 | uint32_t z; | ||
| 99 | uint32_t w; | ||
| 100 | uint32_t h; | ||
| 101 | uint32_t d; | ||
| 102 | }; | ||
| 103 | |||
| 104 | struct drm_virtgpu_3d_transfer_to_host { | ||
| 105 | uint32_t bo_handle; | ||
| 106 | struct drm_virtgpu_3d_box box; | ||
| 107 | uint32_t level; | ||
| 108 | uint32_t offset; | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct drm_virtgpu_3d_transfer_from_host { | ||
| 112 | uint32_t bo_handle; | ||
| 113 | struct drm_virtgpu_3d_box box; | ||
| 114 | uint32_t level; | ||
| 115 | uint32_t offset; | ||
| 116 | }; | ||
| 117 | |||
| 118 | #define VIRTGPU_WAIT_NOWAIT 1 /* like it */ | ||
| 119 | struct drm_virtgpu_3d_wait { | ||
| 120 | uint32_t handle; /* 0 is an invalid handle */ | ||
| 121 | uint32_t flags; | ||
| 122 | }; | ||
| 123 | |||
| 124 | struct drm_virtgpu_get_caps { | ||
| 125 | uint32_t cap_set_id; | ||
| 126 | uint32_t cap_set_ver; | ||
| 127 | uint64_t addr; | ||
| 128 | uint32_t size; | ||
| 129 | uint32_t pad; | ||
| 130 | }; | ||
| 131 | |||
| 132 | #define DRM_IOCTL_VIRTGPU_MAP \ | ||
| 133 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map) | ||
| 134 | |||
| 135 | #define DRM_IOCTL_VIRTGPU_EXECBUFFER \ | ||
| 136 | DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\ | ||
| 137 | struct drm_virtgpu_execbuffer) | ||
| 138 | |||
| 139 | #define DRM_IOCTL_VIRTGPU_GETPARAM \ | ||
| 140 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GETPARAM,\ | ||
| 141 | struct drm_virtgpu_getparam) | ||
| 142 | |||
| 143 | #define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE \ | ||
| 144 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE, \ | ||
| 145 | struct drm_virtgpu_resource_create) | ||
| 146 | |||
| 147 | #define DRM_IOCTL_VIRTGPU_RESOURCE_INFO \ | ||
| 148 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, \ | ||
| 149 | struct drm_virtgpu_resource_info) | ||
| 150 | |||
| 151 | #define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST \ | ||
| 152 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, \ | ||
| 153 | struct drm_virtgpu_3d_transfer_from_host) | ||
| 154 | |||
| 155 | #define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST \ | ||
| 156 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_TO_HOST, \ | ||
| 157 | struct drm_virtgpu_3d_transfer_to_host) | ||
| 158 | |||
| 159 | #define DRM_IOCTL_VIRTGPU_WAIT \ | ||
| 160 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_WAIT, \ | ||
| 161 | struct drm_virtgpu_3d_wait) | ||
| 162 | |||
| 163 | #define DRM_IOCTL_VIRTGPU_GET_CAPS \ | ||
| 164 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, \ | ||
| 165 | struct drm_virtgpu_get_caps) | ||
| 166 | |||
| 167 | #endif | ||
| @@ -191,6 +191,7 @@ header-y += inet_diag.h · 190 unmodified lines | |||
| 191 | header-y += in.h | 191 | header-y += in.h |
| 192 | header-y += inotify.h | 192 | header-y += inotify.h |
| 193 | header-y += input.h | 193 | header-y += input.h |
| 194 | header-y += input-event-codes.h | ||
| 194 | header-y += in_route.h | 195 | header-y += in_route.h |
| 195 | header-y += ioctl.h | 196 | header-y += ioctl.h |
| 196 | header-y += ip6_tunnel.h | 197 | header-y += ip6_tunnel.h |
| @@ -263,6 +264,7 @@ header-y += minix_fs.h · 66 unmodified lines | |||
| 263 | header-y += mman.h | 264 | header-y += mman.h |
| 264 | header-y += mmtimer.h | 265 | header-y += mmtimer.h |
| 265 | header-y += mpls.h | 266 | header-y += mpls.h |
| 267 | header-y += mpls_iptunnel.h | ||
| 266 | header-y += mqueue.h | 268 | header-y += mqueue.h |
| 267 | header-y += mroute6.h | 269 | header-y += mroute6.h |
| 268 | header-y += mroute.h | 270 | header-y += mroute.h |
| @@ -35,12 +35,6 @@ struct zatm_pool_req { · 34 unmodified lines | |||
| 35 | struct zatm_pool_info info; /* actual information */ | 35 | struct zatm_pool_info info; /* actual information */ |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | struct zatm_t_hist { | ||
| 39 | struct timeval real; /* real (wall-clock) time */ | ||
| 40 | struct timeval expected; /* expected real time */ | ||
| 41 | }; | ||
| 42 | |||
| 43 | |||
| 44 | #define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */ | 38 | #define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */ |
| 45 | #define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */ | 39 | #define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */ |
| 46 | #define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */ | 40 | #define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef _LINUX_BLKPG_H | 1 | #ifndef _UAPI__LINUX_BLKPG_H |
| 2 | #define _LINUX_BLKPG_H | 2 | #define _UAPI__LINUX_BLKPG_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * Partition table and disk geometry handling | 5 | * Partition table and disk geometry handling |
| @@ -56,4 +56,4 @@ struct blkpg_partition { · 50 unmodified lines | |||
| 56 | char volname[BLKPG_VOLNAMELTH]; /* volume label */ | 56 | char volname[BLKPG_VOLNAMELTH]; /* volume label */ |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | #endif /* _LINUX_BLKPG_H */ | 59 | #endif /* _UAPI__LINUX_BLKPG_H */ |
| @@ -63,50 +63,16 @@ struct bpf_insn { · 62 unmodified lines | |||
| 63 | __s32 imm; /* signed immediate constant */ | 63 | __s32 imm; /* signed immediate constant */ |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | /* BPF syscall commands */ | 66 | /* BPF syscall commands, see bpf(2) man-page for details. */ |
| 67 | enum bpf_cmd { | 67 | enum bpf_cmd { |
| 68 | /* create a map with given type and attributes | ||
| 69 | * fd = bpf(BPF_MAP_CREATE, union bpf_attr *, u32 size) | ||
| 70 | * returns fd or negative error | ||
| 71 | * map is deleted when fd is closed | ||
| 72 | */ | ||
| 73 | BPF_MAP_CREATE, | 68 | BPF_MAP_CREATE, |
| 74 | |||
| 75 | /* lookup key in a given map | ||
| 76 | * err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size) | ||
| 77 | * Using attr->map_fd, attr->key, attr->value | ||
| 78 | * returns zero and stores found elem into value | ||
| 79 | * or negative error | ||
| 80 | */ | ||
| 81 | BPF_MAP_LOOKUP_ELEM, | 69 | BPF_MAP_LOOKUP_ELEM, |
| 82 | |||
| 83 | /* create or update key/value pair in a given map | ||
| 84 | * err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size) | ||
| 85 | * Using attr->map_fd, attr->key, attr->value, attr->flags | ||
| 86 | * returns zero or negative error | ||
| 87 | */ | ||
| 88 | BPF_MAP_UPDATE_ELEM, | 70 | BPF_MAP_UPDATE_ELEM, |
| 89 | |||
| 90 | /* find and delete elem by key in a given map | ||
| 91 | * err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size) | ||
| 92 | * Using attr->map_fd, attr->key | ||
| 93 | * returns zero or negative error | ||
| 94 | */ | ||
| 95 | BPF_MAP_DELETE_ELEM, | 71 | BPF_MAP_DELETE_ELEM, |
| 96 | |||
| 97 | /* lookup key in a given map and return next key | ||
| 98 | * err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size) | ||
| 99 | * Using attr->map_fd, attr->key, attr->next_key | ||
| 100 | * returns zero and stores next key or negative error | ||
| 101 | */ | ||
| 102 | BPF_MAP_GET_NEXT_KEY, | 72 | BPF_MAP_GET_NEXT_KEY, |
| 103 | |||
| 104 | /* verify and load eBPF program | ||
| 105 | * prog_fd = bpf(BPF_PROG_LOAD, union bpf_attr *attr, u32 size) | ||
| 106 | * Using attr->prog_type, attr->insns, attr->license | ||
| 107 | * returns fd or negative error | ||
| 108 | */ | ||
| 109 | BPF_PROG_LOAD, | 73 | BPF_PROG_LOAD, |
| 74 | BPF_OBJ_PIN, | ||
| 75 | BPF_OBJ_GET, | ||
| 110 | }; | 76 | }; |
| 111 | 77 | ||
| 112 | enum bpf_map_type { | 78 | enum bpf_map_type { |
| @@ -160,6 +126,11 @@ union bpf_attr { · 47 unmodified lines | |||
| 160 | __aligned_u64 log_buf; /* user supplied buffer */ | 126 | __aligned_u64 log_buf; /* user supplied buffer */ |
| 161 | __u32 kern_version; /* checked when prog_type=kprobe */ | 127 | __u32 kern_version; /* checked when prog_type=kprobe */ |
| 162 | }; | 128 | }; |
| 129 | |||
| 130 | struct { /* anonymous struct used by BPF_OBJ_* commands */ | ||
| 131 | __aligned_u64 pathname; | ||
| 132 | __u32 bpf_fd; | ||
| 133 | }; | ||
| 163 | } __attribute__((aligned(8))); | 134 | } __attribute__((aligned(8))); |
| 164 | 135 | ||
| 165 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 136 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| @@ -272,6 +243,32 @@ enum bpf_func_id { · 106 unmodified lines | |||
| 272 | BPF_FUNC_skb_get_tunnel_key, | 243 | BPF_FUNC_skb_get_tunnel_key, |
| 273 | BPF_FUNC_skb_set_tunnel_key, | 244 | BPF_FUNC_skb_set_tunnel_key, |
| 274 | BPF_FUNC_perf_event_read, /* u64 bpf_perf_event_read(&map, index) */ | 245 | BPF_FUNC_perf_event_read, /* u64 bpf_perf_event_read(&map, index) */ |
| 246 | /** | ||
| 247 | * bpf_redirect(ifindex, flags) - redirect to another netdev | ||
| 248 | * @ifindex: ifindex of the net device | ||
| 249 | * @flags: bit 0 - if set, redirect to ingress instead of egress | ||
| 250 | * other bits - reserved | ||
| 251 | * Return: TC_ACT_REDIRECT | ||
| 252 | */ | ||
| 253 | BPF_FUNC_redirect, | ||
| 254 | |||
| 255 | /** | ||
| 256 | * bpf_get_route_realm(skb) - retrieve a dst's tclassid | ||
| 257 | * @skb: pointer to skb | ||
| 258 | * Return: realm if != 0 | ||
| 259 | */ | ||
| 260 | BPF_FUNC_get_route_realm, | ||
| 261 | |||
| 262 | /** | ||
| 263 | * bpf_perf_event_output(ctx, map, index, data, size) - output perf raw sample | ||
| 264 | * @ctx: struct pt_regs* | ||
| 265 | * @map: pointer to perf_event_array map | ||
| 266 | * @index: index of event in the map | ||
| 267 | * @data: data on stack to be output as raw data | ||
| 268 | * @size: size of data | ||
| 269 | * Return: 0 on success | ||
| 270 | */ | ||
| 271 | BPF_FUNC_perf_event_output, | ||
| 275 | __BPF_FUNC_MAX_ID, | 272 | __BPF_FUNC_MAX_ID, |
| 276 | }; | 273 | }; |
| 277 | 274 | ||
| @@ -293,6 +290,7 @@ struct __sk_buff { · 15 unmodified lines | |||
| 293 | __u32 tc_index; | 290 | __u32 tc_index; |
| 294 | __u32 cb[5]; | 291 | __u32 cb[5]; |
| 295 | __u32 hash; | 292 | __u32 hash; |
| 293 | __u32 tc_classid; | ||
| 296 | }; | 294 | }; |
| 297 | 295 | ||
| 298 | struct bpf_tunnel_key { | 296 | struct bpf_tunnel_key { |
| @@ -206,7 +206,13 @@ struct btrfs_ioctl_feature_flags { · 205 unmodified lines | |||
| 206 | */ | 206 | */ |
| 207 | struct btrfs_balance_args { | 207 | struct btrfs_balance_args { |
| 208 | __u64 profiles; | 208 | __u64 profiles; |
| 209 | __u64 usage; | 209 | union { |
| 210 | __le64 usage; | ||
| 211 | struct { | ||
| 212 | __le32 usage_min; | ||
| 213 | __le32 usage_max; | ||
| 214 | }; | ||
| 215 | }; | ||
| 210 | __u64 devid; | 216 | __u64 devid; |
| 211 | __u64 pstart; | 217 | __u64 pstart; |
| 212 | __u64 pend; | 218 | __u64 pend; |
| @@ -217,8 +223,27 @@ struct btrfs_balance_args { · 4 unmodified lines | |||
| 217 | 223 | ||
| 218 | __u64 flags; | 224 | __u64 flags; |
| 219 | 225 | ||
| 220 | __u64 limit; /* limit number of processed chunks */ | 226 | /* |
| 221 | __u64 unused[7]; | 227 | * BTRFS_BALANCE_ARGS_LIMIT with value 'limit' |
| 228 | * BTRFS_BALANCE_ARGS_LIMIT_RANGE - the extend version can use minimum | ||
| 229 | * and maximum | ||
| 230 | */ | ||
| 231 | union { | ||
| 232 | __u64 limit; /* limit number of processed chunks */ | ||
| 233 | struct { | ||
| 234 | __u32 limit_min; | ||
| 235 | __u32 limit_max; | ||
| 236 | }; | ||
| 237 | }; | ||
| 238 | |||
| 239 | /* | ||
| 240 | * Process chunks that cross stripes_min..stripes_max devices, | ||
| 241 | * BTRFS_BALANCE_ARGS_STRIPES_RANGE | ||
| 242 | */ | ||
| 243 | __le32 stripes_min; | ||
| 244 | __le32 stripes_max; | ||
| 245 | |||
| 246 | __u64 unused[6]; | ||
| 222 | } __attribute__ ((__packed__)); | 247 | } __attribute__ ((__packed__)); |
| 223 | 248 | ||
| 224 | /* report balance progress to userspace */ | 249 | /* report balance progress to userspace */ |
| @@ -47,6 +47,11 @@ · 46 unmodified lines | |||
| 47 | #include <linux/types.h> | 47 | #include <linux/types.h> |
| 48 | #include <linux/can.h> | 48 | #include <linux/can.h> |
| 49 | 49 | ||
| 50 | struct bcm_timeval { | ||
| 51 | long tv_sec; | ||
| 52 | long tv_usec; | ||
| 53 | }; | ||
| 54 | |||
| 50 | /** | 55 | /** |
| 51 | * struct bcm_msg_head - head of messages to/from the broadcast manager | 56 | * struct bcm_msg_head - head of messages to/from the broadcast manager |
| 52 | * @opcode: opcode, see enum below. | 57 | * @opcode: opcode, see enum below. |
| @@ -62,7 +67,7 @@ struct bcm_msg_head { · 9 unmodified lines | |||
| 62 | __u32 opcode; | 67 | __u32 opcode; |
| 63 | __u32 flags; | 68 | __u32 flags; |
| 64 | __u32 count; | 69 | __u32 count; |
| 65 | struct timeval ival1, ival2; | 70 | struct bcm_timeval ival1, ival2; |
| 66 | canid_t can_id; | 71 | canid_t can_id; |
| 67 | __u32 nframes; | 72 | __u32 nframes; |
| 68 | struct can_frame frames[0]; | 73 | struct can_frame frames[0]; |
| @@ -267,9 +267,9 @@ enum { · 266 unmodified lines | |||
| 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 268 | 268 | ||
| 269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
| 270 | #define DM_VERSION_MINOR 33 | 270 | #define DM_VERSION_MINOR 34 |
| 271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
| 272 | #define DM_VERSION_EXTRA "-ioctl (2015-8-18)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2015-10-28)" |
| 273 | 273 | ||
| 274 | /* Status bits */ | 274 | /* Status bits */ |
| 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -197,6 +197,7 @@ struct inodes_stat_t { · 196 unmodified lines | |||
| 197 | #define FS_EXTENT_FL 0x00080000 /* Extents */ | 197 | #define FS_EXTENT_FL 0x00080000 /* Extents */ |
| 198 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ | 198 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ |
| 199 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ | 199 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ |
| 200 | #define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */ | ||
| 200 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 201 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ |
| 201 | 202 | ||
| 202 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 203 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ |
| @@ -66,7 +66,9 @@ struct i2c_rdwr_ioctl_data { · 65 unmodified lines | |||
| 66 | __u32 nmsgs; /* number of i2c_msgs */ | 66 | __u32 nmsgs; /* number of i2c_msgs */ |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | #define I2C_RDRW_IOCTL_MAX_MSGS 42 | 69 | #define I2C_RDWR_IOCTL_MAX_MSGS 42 |
| 70 | /* Originally defined with a typo, keep it for compatibility */ | ||
| 71 | #define I2C_RDRW_IOCTL_MAX_MSGS I2C_RDWR_IOCTL_MAX_MSGS | ||
| 70 | 72 | ||
| 71 | 73 | ||
| 72 | #endif /* _UAPI_LINUX_I2C_DEV_H */ | 74 | #endif /* _UAPI_LINUX_I2C_DEV_H */ |
| @@ -19,7 +19,6 @@ · 18 unmodified lines | |||
| 19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
| 20 | #include <linux/if_ether.h> | 20 | #include <linux/if_ether.h> |
| 21 | 21 | ||
| 22 | |||
| 23 | /* | 22 | /* |
| 24 | * These are the defined ARCnet Protocol ID's. | 23 | * These are the defined ARCnet Protocol ID's. |
| 25 | */ | 24 | */ |
| @@ -57,42 +56,40 @@ · 31 unmodified lines | |||
| 57 | * The RFC1201-specific components of an arcnet packet header. | 56 | * The RFC1201-specific components of an arcnet packet header. |
| 58 | */ | 57 | */ |
| 59 | struct arc_rfc1201 { | 58 | struct arc_rfc1201 { |
| 60 | __u8 proto; /* protocol ID field - varies */ | 59 | __u8 proto; /* protocol ID field - varies */ |
| 61 | __u8 split_flag; /* for use with split packets */ | 60 | __u8 split_flag; /* for use with split packets */ |
| 62 | __be16 sequence; /* sequence number */ | 61 | __be16 sequence; /* sequence number */ |
| 63 | __u8 payload[0]; /* space remaining in packet (504 bytes)*/ | 62 | __u8 payload[0]; /* space remaining in packet (504 bytes)*/ |
| 64 | }; | 63 | }; |
| 65 | #define RFC1201_HDR_SIZE 4 | 64 | #define RFC1201_HDR_SIZE 4 |
| 66 | 65 | ||
| 67 | |||
| 68 | /* | 66 | /* |
| 69 | * The RFC1051-specific components. | 67 | * The RFC1051-specific components. |
| 70 | */ | 68 | */ |
| 71 | struct arc_rfc1051 { | 69 | struct arc_rfc1051 { |
| 72 | __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ | 70 | __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ |
| 73 | __u8 payload[0]; /* 507 bytes */ | 71 | __u8 payload[0]; /* 507 bytes */ |
| 74 | }; | 72 | }; |
| 75 | #define RFC1051_HDR_SIZE 1 | 73 | #define RFC1051_HDR_SIZE 1 |
| 76 | 74 | ||
| 77 | |||
| 78 | /* | 75 | /* |
| 79 | * The ethernet-encap-specific components. We have a real ethernet header | 76 | * The ethernet-encap-specific components. We have a real ethernet header |
| 80 | * and some data. | 77 | * and some data. |
| 81 | */ | 78 | */ |
| 82 | struct arc_eth_encap { | 79 | struct arc_eth_encap { |
| 83 | __u8 proto; /* Always ARC_P_ETHER */ | 80 | __u8 proto; /* Always ARC_P_ETHER */ |
| 84 | struct ethhdr eth; /* standard ethernet header (yuck!) */ | 81 | struct ethhdr eth; /* standard ethernet header (yuck!) */ |
| 85 | __u8 payload[0]; /* 493 bytes */ | 82 | __u8 payload[0]; /* 493 bytes */ |
| 86 | }; | 83 | }; |
| 87 | #define ETH_ENCAP_HDR_SIZE 14 | 84 | #define ETH_ENCAP_HDR_SIZE 14 |
| 88 | 85 | ||
| 89 | |||
| 90 | struct arc_cap { | 86 | struct arc_cap { |
| 91 | __u8 proto; | 87 | __u8 proto; |
| 92 | __u8 cookie[sizeof(int)]; /* Actually NOT sent over the network */ | 88 | __u8 cookie[sizeof(int)]; |
| 89 | /* Actually NOT sent over the network */ | ||
| 93 | union { | 90 | union { |
| 94 | __u8 ack; | 91 | __u8 ack; |
| 95 | __u8 raw[0]; /* 507 bytes */ | 92 | __u8 raw[0]; /* 507 bytes */ |
| 96 | } mes; | 93 | } mes; |
| 97 | }; | 94 | }; |
| 98 | 95 | ||
| @@ -105,9 +102,9 @@ struct arc_cap { · 6 unmodified lines | |||
| 105 | * driver. | 102 | * driver. |
| 106 | */ | 103 | */ |
| 107 | struct arc_hardware { | 104 | struct arc_hardware { |
| 108 | __u8 source, /* source ARCnet - filled in automagically */ | 105 | __u8 source; /* source ARCnet - filled in automagically */ |
| 109 | dest, /* destination ARCnet - 0 for broadcast */ | 106 | __u8 dest; /* destination ARCnet - 0 for broadcast */ |
| 110 | offset[2]; /* offset bytes (some weird semantics) */ | 107 | __u8 offset[2]; /* offset bytes (some weird semantics) */ |
| 111 | }; | 108 | }; |
| 112 | #define ARC_HDR_SIZE 4 | 109 | #define ARC_HDR_SIZE 4 |
| 113 | 110 | ||
| @@ -116,17 +113,17 @@ struct arc_hardware { · 2 unmodified lines | |||
| 116 | * when you do a raw packet capture). | 113 | * when you do a raw packet capture). |
| 117 | */ | 114 | */ |
| 118 | struct archdr { | 115 | struct archdr { |
| 119 | /* hardware requirements */ | 116 | /* hardware requirements */ |
| 120 | struct arc_hardware hard; | 117 | struct arc_hardware hard; |
| 121 | 118 | ||
| 122 | /* arcnet encapsulation-specific bits */ | 119 | /* arcnet encapsulation-specific bits */ |
| 123 | union { | 120 | union { |
| 124 | struct arc_rfc1201 rfc1201; | 121 | struct arc_rfc1201 rfc1201; |
| 125 | struct arc_rfc1051 rfc1051; | 122 | struct arc_rfc1051 rfc1051; |
| 126 | struct arc_eth_encap eth_encap; | 123 | struct arc_eth_encap eth_encap; |
| 127 | struct arc_cap cap; | 124 | struct arc_cap cap; |
| 128 | __u8 raw[0]; /* 508 bytes */ | 125 | __u8 raw[0]; /* 508 bytes */ |
| 129 | } soft; | 126 | } soft; |
| 130 | }; | 127 | }; |
| 131 | 128 | ||
| 132 | #endif /* _LINUX_IF_ARCNET_H */ | 129 | #endif /* _LINUX_IF_ARCNET_H */ |
| @@ -127,6 +127,7 @@ enum { · 126 unmodified lines | |||
| 127 | #define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */ | 127 | #define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */ |
| 128 | #define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */ | 128 | #define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */ |
| 129 | #define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */ | 129 | #define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */ |
| 130 | #define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */ | ||
| 130 | 131 | ||
| 131 | struct bridge_vlan_info { | 132 | struct bridge_vlan_info { |
| 132 | __u16 flags; | 133 | __u16 flags; |
| @@ -232,11 +232,47 @@ enum { · 231 unmodified lines | |||
| 232 | IFLA_BR_PRIORITY, | 232 | IFLA_BR_PRIORITY, |
| 233 | IFLA_BR_VLAN_FILTERING, | 233 | IFLA_BR_VLAN_FILTERING, |
| 234 | IFLA_BR_VLAN_PROTOCOL, | 234 | IFLA_BR_VLAN_PROTOCOL, |
| 235 | IFLA_BR_GROUP_FWD_MASK, | ||
| 236 | IFLA_BR_ROOT_ID, | ||
| 237 | IFLA_BR_BRIDGE_ID, | ||
| 238 | IFLA_BR_ROOT_PORT, | ||
| 239 | IFLA_BR_ROOT_PATH_COST, | ||
| 240 | IFLA_BR_TOPOLOGY_CHANGE, | ||
| 241 | IFLA_BR_TOPOLOGY_CHANGE_DETECTED, | ||
| 242 | IFLA_BR_HELLO_TIMER, | ||
| 243 | IFLA_BR_TCN_TIMER, | ||
| 244 | IFLA_BR_TOPOLOGY_CHANGE_TIMER, | ||
| 245 | IFLA_BR_GC_TIMER, | ||
| 246 | IFLA_BR_GROUP_ADDR, | ||
| 247 | IFLA_BR_FDB_FLUSH, | ||
| 248 | IFLA_BR_MCAST_ROUTER, | ||
| 249 | IFLA_BR_MCAST_SNOOPING, | ||
| 250 | IFLA_BR_MCAST_QUERY_USE_IFADDR, | ||
| 251 | IFLA_BR_MCAST_QUERIER, | ||
| 252 | IFLA_BR_MCAST_HASH_ELASTICITY, | ||
| 253 | IFLA_BR_MCAST_HASH_MAX, | ||
| 254 | IFLA_BR_MCAST_LAST_MEMBER_CNT, | ||
| 255 | IFLA_BR_MCAST_STARTUP_QUERY_CNT, | ||
| 256 | IFLA_BR_MCAST_LAST_MEMBER_INTVL, | ||
| 257 | IFLA_BR_MCAST_MEMBERSHIP_INTVL, | ||
| 258 | IFLA_BR_MCAST_QUERIER_INTVL, | ||
| 259 | IFLA_BR_MCAST_QUERY_INTVL, | ||
| 260 | IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, | ||
| 261 | IFLA_BR_MCAST_STARTUP_QUERY_INTVL, | ||
| 262 | IFLA_BR_NF_CALL_IPTABLES, | ||
| 263 | IFLA_BR_NF_CALL_IP6TABLES, | ||
| 264 | IFLA_BR_NF_CALL_ARPTABLES, | ||
| 265 | IFLA_BR_VLAN_DEFAULT_PVID, | ||
| 235 | __IFLA_BR_MAX, | 266 | __IFLA_BR_MAX, |
| 236 | }; | 267 | }; |
| 237 | 268 | ||
| 238 | #define IFLA_BR_MAX (__IFLA_BR_MAX - 1) | 269 | #define IFLA_BR_MAX (__IFLA_BR_MAX - 1) |
| 239 | 270 | ||
| 271 | struct ifla_bridge_id { | ||
| 272 | __u8 prio[2]; | ||
| 273 | __u8 addr[6]; /* ETH_ALEN */ | ||
| 274 | }; | ||
| 275 | |||
| 240 | enum { | 276 | enum { |
| 241 | BRIDGE_MODE_UNSPEC, | 277 | BRIDGE_MODE_UNSPEC, |
| 242 | BRIDGE_MODE_HAIRPIN, | 278 | BRIDGE_MODE_HAIRPIN, |
| @@ -256,6 +292,19 @@ enum { · 13 unmodified lines | |||
| 256 | IFLA_BRPORT_PROXYARP, /* proxy ARP */ | 292 | IFLA_BRPORT_PROXYARP, /* proxy ARP */ |
| 257 | IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */ | 293 | IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */ |
| 258 | IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */ | 294 | IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */ |
| 295 | IFLA_BRPORT_ROOT_ID, /* designated root */ | ||
| 296 | IFLA_BRPORT_BRIDGE_ID, /* designated bridge */ | ||
| 297 | IFLA_BRPORT_DESIGNATED_PORT, | ||
| 298 | IFLA_BRPORT_DESIGNATED_COST, | ||
| 299 | IFLA_BRPORT_ID, | ||
| 300 | IFLA_BRPORT_NO, | ||
| 301 | IFLA_BRPORT_TOPOLOGY_CHANGE_ACK, | ||
| 302 | IFLA_BRPORT_CONFIG_PENDING, | ||
| 303 | IFLA_BRPORT_MESSAGE_AGE_TIMER, | ||
| 304 | IFLA_BRPORT_FORWARD_DELAY_TIMER, | ||
| 305 | IFLA_BRPORT_HOLD_TIMER, | ||
| 306 | IFLA_BRPORT_FLUSH, | ||
| 307 | IFLA_BRPORT_MULTICAST_ROUTER, | ||
| 259 | __IFLA_BRPORT_MAX | 308 | __IFLA_BRPORT_MAX |
| 260 | }; | 309 | }; |
| 261 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | 310 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) |
| @@ -412,6 +461,7 @@ enum { · 150 unmodified lines | |||
| 412 | IFLA_GENEVE_TOS, | 461 | IFLA_GENEVE_TOS, |
| 413 | IFLA_GENEVE_PORT, /* destination port */ | 462 | IFLA_GENEVE_PORT, /* destination port */ |
| 414 | IFLA_GENEVE_COLLECT_METADATA, | 463 | IFLA_GENEVE_COLLECT_METADATA, |
| 464 | IFLA_GENEVE_REMOTE6, | ||
| 415 | __IFLA_GENEVE_MAX | 465 | __IFLA_GENEVE_MAX |
| 416 | }; | 466 | }; |
| 417 | #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) | 467 | #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) |
| @@ -501,6 +551,7 @@ enum { · 83 unmodified lines | |||
| 501 | * on/off switch | 551 | * on/off switch |
| 502 | */ | 552 | */ |
| 503 | IFLA_VF_STATS, /* network device statistics */ | 553 | IFLA_VF_STATS, /* network device statistics */ |
| 554 | IFLA_VF_TRUST, /* Trust VF */ | ||
| 504 | __IFLA_VF_MAX, | 555 | __IFLA_VF_MAX, |
| 505 | }; | 556 | }; |
| 506 | 557 | ||
| @@ -562,6 +613,11 @@ enum { · 55 unmodified lines | |||
| 562 | 613 | ||
| 563 | #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1) | 614 | #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1) |
| 564 | 615 | ||
| 616 | struct ifla_vf_trust { | ||
| 617 | __u32 vf; | ||
| 618 | __u32 setting; | ||
| 619 | }; | ||
| 620 | |||
| 565 | /* VF ports management section | 621 | /* VF ports management section |
| 566 | * | 622 | * |
| 567 | * Nested layout of set/get msg is: | 623 | * Nested layout of set/get msg is: |
| @@ -35,6 +35,8 @@ enum iio_chan_type { · 34 unmodified lines | |||
| 35 | IIO_ENERGY, | 35 | IIO_ENERGY, |
| 36 | IIO_DISTANCE, | 36 | IIO_DISTANCE, |
| 37 | IIO_VELOCITY, | 37 | IIO_VELOCITY, |
| 38 | IIO_CONCENTRATION, | ||
| 39 | IIO_RESISTANCE, | ||
| 38 | }; | 40 | }; |
| 39 | 41 | ||
| 40 | enum iio_modifier { | 42 | enum iio_modifier { |
| @@ -72,6 +74,8 @@ enum iio_modifier { · 31 unmodified lines | |||
| 72 | IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, | 74 | IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z, |
| 73 | IIO_MOD_I, | 75 | IIO_MOD_I, |
| 74 | IIO_MOD_Q, | 76 | IIO_MOD_Q, |
| 77 | IIO_MOD_CO2, | ||
| 78 | IIO_MOD_VOC, | ||
| 75 | }; | 79 | }; |
| 76 | 80 | ||
| 77 | enum iio_event_type { | 81 | enum iio_event_type { |
| @@ -0,0 +1,805 @@ | |||
| 1 | /* | ||
| 2 | * Input event codes | ||
| 3 | * | ||
| 4 | * *** IMPORTANT *** | ||
| 5 | * This file is not only included from C-code but also from devicetree source | ||
| 6 | * files. As such this file MUST only contain comments and defines. | ||
| 7 | * | ||
| 8 | * Copyright (c) 1999-2002 Vojtech Pavlik | ||
| 9 | * Copyright (c) 2015 Hans de Goede <hdegoede@redhat.com> | ||
| 10 | * | ||
| 11 | * This program is free software; you can redistribute it and/or modify it | ||
| 12 | * under the terms of the GNU General Public License version 2 as published by | ||
| 13 | * the Free Software Foundation. | ||
| 14 | */ | ||
| 15 | #ifndef _UAPI_INPUT_EVENT_CODES_H | ||
| 16 | #define _UAPI_INPUT_EVENT_CODES_H | ||
| 17 | |||
| 18 | /* | ||
| 19 | * Device properties and quirks | ||
| 20 | */ | ||
| 21 | |||
| 22 | #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ | ||
| 23 | #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ | ||
| 24 | #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ | ||
| 25 | #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ | ||
| 26 | #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ | ||
| 27 | #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ | ||
| 28 | #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ | ||
| 29 | |||
| 30 | #define INPUT_PROP_MAX 0x1f | ||
| 31 | #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Event types | ||
| 35 | */ | ||
| 36 | |||
| 37 | #define EV_SYN 0x00 | ||
| 38 | #define EV_KEY 0x01 | ||
| 39 | #define EV_REL 0x02 | ||
| 40 | #define EV_ABS 0x03 | ||
| 41 | #define EV_MSC 0x04 | ||
| 42 | #define EV_SW 0x05 | ||
| 43 | #define EV_LED 0x11 | ||
| 44 | #define EV_SND 0x12 | ||
| 45 | #define EV_REP 0x14 | ||
| 46 | #define EV_FF 0x15 | ||
| 47 | #define EV_PWR 0x16 | ||
| 48 | #define EV_FF_STATUS 0x17 | ||
| 49 | #define EV_MAX 0x1f | ||
| 50 | #define EV_CNT (EV_MAX+1) | ||
| 51 | |||
| 52 | /* | ||
| 53 | * Synchronization events. | ||
| 54 | */ | ||
| 55 | |||
| 56 | #define SYN_REPORT 0 | ||
| 57 | #define SYN_CONFIG 1 | ||
| 58 | #define SYN_MT_REPORT 2 | ||
| 59 | #define SYN_DROPPED 3 | ||
| 60 | #define SYN_MAX 0xf | ||
| 61 | #define SYN_CNT (SYN_MAX+1) | ||
| 62 | |||
| 63 | /* | ||
| 64 | * Keys and buttons | ||
| 65 | * | ||
| 66 | * Most of the keys/buttons are modeled after USB HUT 1.12 | ||
| 67 | * (see http://www.usb.org/developers/hidpage). | ||
| 68 | * Abbreviations in the comments: | ||
| 69 | * AC - Application Control | ||
| 70 | * AL - Application Launch Button | ||
| 71 | * SC - System Control | ||
| 72 | */ | ||
| 73 | |||
| 74 | #define KEY_RESERVED 0 | ||
| 75 | #define KEY_ESC 1 | ||
| 76 | #define KEY_1 2 | ||
| 77 | #define KEY_2 3 | ||
| 78 | #define KEY_3 4 | ||
| 79 | #define KEY_4 5 | ||
| 80 | #define KEY_5 6 | ||
| 81 | #define KEY_6 7 | ||
| 82 | #define KEY_7 8 | ||
| 83 | #define KEY_8 9 | ||
| 84 | #define KEY_9 10 | ||
| 85 | #define KEY_0 11 | ||
| 86 | #define KEY_MINUS 12 | ||
| 87 | #define KEY_EQUAL 13 | ||
| 88 | #define KEY_BACKSPACE 14 | ||
| 89 | #define KEY_TAB 15 | ||
| 90 | #define KEY_Q 16 | ||
| 91 | #define KEY_W 17 | ||
| 92 | #define KEY_E 18 | ||
| 93 | #define KEY_R 19 | ||
| 94 | #define KEY_T 20 | ||
| 95 | #define KEY_Y 21 | ||
| 96 | #define KEY_U 22 | ||
| 97 | #define KEY_I 23 | ||
| 98 | #define KEY_O 24 | ||
| 99 | #define KEY_P 25 | ||
| 100 | #define KEY_LEFTBRACE 26 | ||
| 101 | #define KEY_RIGHTBRACE 27 | ||
| 102 | #define KEY_ENTER 28 | ||
| 103 | #define KEY_LEFTCTRL 29 | ||
| 104 | #define KEY_A 30 | ||
| 105 | #define KEY_S 31 | ||
| 106 | #define KEY_D 32 | ||
| 107 | #define KEY_F 33 | ||
| 108 | #define KEY_G 34 | ||
| 109 | #define KEY_H 35 | ||
| 110 | #define KEY_J 36 | ||
| 111 | #define KEY_K 37 | ||
| 112 | #define KEY_L 38 | ||
| 113 | #define KEY_SEMICOLON 39 | ||
| 114 | #define KEY_APOSTROPHE 40 | ||
| 115 | #define KEY_GRAVE 41 | ||
| 116 | #define KEY_LEFTSHIFT 42 | ||
| 117 | #define KEY_BACKSLASH 43 | ||
| 118 | #define KEY_Z 44 | ||
| 119 | #define KEY_X 45 | ||
| 120 | #define KEY_C 46 | ||
| 121 | #define KEY_V 47 | ||
| 122 | #define KEY_B 48 | ||
| 123 | #define KEY_N 49 | ||
| 124 | #define KEY_M 50 | ||
| 125 | #define KEY_COMMA 51 | ||
| 126 | #define KEY_DOT 52 | ||
| 127 | #define KEY_SLASH 53 | ||
| 128 | #define KEY_RIGHTSHIFT 54 | ||
| 129 | #define KEY_KPASTERISK 55 | ||
| 130 | #define KEY_LEFTALT 56 | ||
| 131 | #define KEY_SPACE 57 | ||
| 132 | #define KEY_CAPSLOCK 58 | ||
| 133 | #define KEY_F1 59 | ||
| 134 | #define KEY_F2 60 | ||
| 135 | #define KEY_F3 61 | ||
| 136 | #define KEY_F4 62 | ||
| 137 | #define KEY_F5 63 | ||
| 138 | #define KEY_F6 64 | ||
| 139 | #define KEY_F7 65 | ||
| 140 | #define KEY_F8 66 | ||
| 141 | #define KEY_F9 67 | ||
| 142 | #define KEY_F10 68 | ||
| 143 | #define KEY_NUMLOCK 69 | ||
| 144 | #define KEY_SCROLLLOCK 70 | ||
| 145 | #define KEY_KP7 71 | ||
| 146 | #define KEY_KP8 72 | ||
| 147 | #define KEY_KP9 73 | ||
| 148 | #define KEY_KPMINUS 74 | ||
| 149 | #define KEY_KP4 75 | ||
| 150 | #define KEY_KP5 76 | ||
| 151 | #define KEY_KP6 77 | ||
| 152 | #define KEY_KPPLUS 78 | ||
| 153 | #define KEY_KP1 79 | ||
| 154 | #define KEY_KP2 80 | ||
| 155 | #define KEY_KP3 81 | ||
| 156 | #define KEY_KP0 82 | ||
| 157 | #define KEY_KPDOT 83 | ||
| 158 | |||
| 159 | #define KEY_ZENKAKUHANKAKU 85 | ||
| 160 | #define KEY_102ND 86 | ||
| 161 | #define KEY_F11 87 | ||
| 162 | #define KEY_F12 88 | ||
| 163 | #define KEY_RO 89 | ||
| 164 | #define KEY_KATAKANA 90 | ||
| 165 | #define KEY_HIRAGANA 91 | ||
| 166 | #define KEY_HENKAN 92 | ||
| 167 | #define KEY_KATAKANAHIRAGANA 93 | ||
| 168 | #define KEY_MUHENKAN 94 | ||
| 169 | #define KEY_KPJPCOMMA 95 | ||
| 170 | #define KEY_KPENTER 96 | ||
| 171 | #define KEY_RIGHTCTRL 97 | ||
| 172 | #define KEY_KPSLASH 98 | ||
| 173 | #define KEY_SYSRQ 99 | ||
| 174 | #define KEY_RIGHTALT 100 | ||
| 175 | #define KEY_LINEFEED 101 | ||
| 176 | #define KEY_HOME 102 | ||
| 177 | #define KEY_UP 103 | ||
| 178 | #define KEY_PAGEUP 104 | ||
| 179 | #define KEY_LEFT 105 | ||
| 180 | #define KEY_RIGHT 106 | ||
| 181 | #define KEY_END 107 | ||
| 182 | #define KEY_DOWN 108 | ||
| 183 | #define KEY_PAGEDOWN 109 | ||
| 184 | #define KEY_INSERT 110 | ||
| 185 | #define KEY_DELETE 111 | ||
| 186 | #define KEY_MACRO 112 | ||
| 187 | #define KEY_MUTE 113 | ||
| 188 | #define KEY_VOLUMEDOWN 114 | ||
| 189 | #define KEY_VOLUMEUP 115 | ||
| 190 | #define KEY_POWER 116 /* SC System Power Down */ | ||
| 191 | #define KEY_KPEQUAL 117 | ||
| 192 | #define KEY_KPPLUSMINUS 118 | ||
| 193 | #define KEY_PAUSE 119 | ||
| 194 | #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ | ||
| 195 | |||
| 196 | #define KEY_KPCOMMA 121 | ||
| 197 | #define KEY_HANGEUL 122 | ||
| 198 | #define KEY_HANGUEL KEY_HANGEUL | ||
| 199 | #define KEY_HANJA 123 | ||
| 200 | #define KEY_YEN 124 | ||
| 201 | #define KEY_LEFTMETA 125 | ||
| 202 | #define KEY_RIGHTMETA 126 | ||
| 203 | #define KEY_COMPOSE 127 | ||
| 204 | |||
| 205 | #define KEY_STOP 128 /* AC Stop */ | ||
| 206 | #define KEY_AGAIN 129 | ||
| 207 | #define KEY_PROPS 130 /* AC Properties */ | ||
| 208 | #define KEY_UNDO 131 /* AC Undo */ | ||
| 209 | #define KEY_FRONT 132 | ||
| 210 | #define KEY_COPY 133 /* AC Copy */ | ||
| 211 | #define KEY_OPEN 134 /* AC Open */ | ||
| 212 | #define KEY_PASTE 135 /* AC Paste */ | ||
| 213 | #define KEY_FIND 136 /* AC Search */ | ||
| 214 | #define KEY_CUT 137 /* AC Cut */ | ||
| 215 | #define KEY_HELP 138 /* AL Integrated Help Center */ | ||
| 216 | #define KEY_MENU 139 /* Menu (show menu) */ | ||
| 217 | #define KEY_CALC 140 /* AL Calculator */ | ||
| 218 | #define KEY_SETUP 141 | ||
| 219 | #define KEY_SLEEP 142 /* SC System Sleep */ | ||
| 220 | #define KEY_WAKEUP 143 /* System Wake Up */ | ||
| 221 | #define KEY_FILE 144 /* AL Local Machine Browser */ | ||
| 222 | #define KEY_SENDFILE 145 | ||
| 223 | #define KEY_DELETEFILE 146 | ||
| 224 | #define KEY_XFER 147 | ||
| 225 | #define KEY_PROG1 148 | ||
| 226 | #define KEY_PROG2 149 | ||
| 227 | #define KEY_WWW 150 /* AL Internet Browser */ | ||
| 228 | #define KEY_MSDOS 151 | ||
| 229 | #define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ | ||
| 230 | #define KEY_SCREENLOCK KEY_COFFEE | ||
| 231 | #define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ | ||
| 232 | #define KEY_DIRECTION KEY_ROTATE_DISPLAY | ||
| 233 | #define KEY_CYCLEWINDOWS 154 | ||
| 234 | #define KEY_MAIL 155 | ||
| 235 | #define KEY_BOOKMARKS 156 /* AC Bookmarks */ | ||
| 236 | #define KEY_COMPUTER 157 | ||
| 237 | #define KEY_BACK 158 /* AC Back */ | ||
| 238 | #define KEY_FORWARD 159 /* AC Forward */ | ||
| 239 | #define KEY_CLOSECD 160 | ||
| 240 | #define KEY_EJECTCD 161 | ||
| 241 | #define KEY_EJECTCLOSECD 162 | ||
| 242 | #define KEY_NEXTSONG 163 | ||
| 243 | #define KEY_PLAYPAUSE 164 | ||
| 244 | #define KEY_PREVIOUSSONG 165 | ||
| 245 | #define KEY_STOPCD 166 | ||
| 246 | #define KEY_RECORD 167 | ||
| 247 | #define KEY_REWIND 168 | ||
| 248 | #define KEY_PHONE 169 /* Media Select Telephone */ | ||
| 249 | #define KEY_ISO 170 | ||
| 250 | #define KEY_CONFIG 171 /* AL Consumer Control Configuration */ | ||
| 251 | #define KEY_HOMEPAGE 172 /* AC Home */ | ||
| 252 | #define KEY_REFRESH 173 /* AC Refresh */ | ||
| 253 | #define KEY_EXIT 174 /* AC Exit */ | ||
| 254 | #define KEY_MOVE 175 | ||
| 255 | #define KEY_EDIT 176 | ||
| 256 | #define KEY_SCROLLUP 177 | ||
| 257 | #define KEY_SCROLLDOWN 178 | ||
| 258 | #define KEY_KPLEFTPAREN 179 | ||
| 259 | #define KEY_KPRIGHTPAREN 180 | ||
| 260 | #define KEY_NEW 181 /* AC New */ | ||
| 261 | #define KEY_REDO 182 /* AC Redo/Repeat */ | ||
| 262 | |||
| 263 | #define KEY_F13 183 | ||
| 264 | #define KEY_F14 184 | ||
| 265 | #define KEY_F15 185 | ||
| 266 | #define KEY_F16 186 | ||
| 267 | #define KEY_F17 187 | ||
| 268 | #define KEY_F18 188 | ||
| 269 | #define KEY_F19 189 | ||
| 270 | #define KEY_F20 190 | ||
| 271 | #define KEY_F21 191 | ||
| 272 | #define KEY_F22 192 | ||
| 273 | #define KEY_F23 193 | ||
| 274 | #define KEY_F24 194 | ||
| 275 | |||
| 276 | #define KEY_PLAYCD 200 | ||
| 277 | #define KEY_PAUSECD 201 | ||
| 278 | #define KEY_PROG3 202 | ||
| 279 | #define KEY_PROG4 203 | ||
| 280 | #define KEY_DASHBOARD 204 /* AL Dashboard */ | ||
| 281 | #define KEY_SUSPEND 205 | ||
| 282 | #define KEY_CLOSE 206 /* AC Close */ | ||
| 283 | #define KEY_PLAY 207 | ||
| 284 | #define KEY_FASTFORWARD 208 | ||
| 285 | #define KEY_BASSBOOST 209 | ||
| 286 | #define KEY_PRINT 210 /* AC Print */ | ||
| 287 | #define KEY_HP 211 | ||
| 288 | #define KEY_CAMERA 212 | ||
| 289 | #define KEY_SOUND 213 | ||
| 290 | #define KEY_QUESTION 214 | ||
| 291 | #define KEY_EMAIL 215 | ||
| 292 | #define KEY_CHAT 216 | ||
| 293 | #define KEY_SEARCH 217 | ||
| 294 | #define KEY_CONNECT 218 | ||
| 295 | #define KEY_FINANCE 219 /* AL Checkbook/Finance */ | ||
| 296 | #define KEY_SPORT 220 | ||
| 297 | #define KEY_SHOP 221 | ||
| 298 | #define KEY_ALTERASE 222 | ||
| 299 | #define KEY_CANCEL 223 /* AC Cancel */ | ||
| 300 | #define KEY_BRIGHTNESSDOWN 224 | ||
| 301 | #define KEY_BRIGHTNESSUP 225 | ||
| 302 | #define KEY_MEDIA 226 | ||
| 303 | |||
| 304 | #define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video | ||
| 305 | outputs (Monitor/LCD/TV-out/etc) */ | ||
| 306 | #define KEY_KBDILLUMTOGGLE 228 | ||
| 307 | #define KEY_KBDILLUMDOWN 229 | ||
| 308 | #define KEY_KBDILLUMUP 230 | ||
| 309 | |||
| 310 | #define KEY_SEND 231 /* AC Send */ | ||
| 311 | #define KEY_REPLY 232 /* AC Reply */ | ||
| 312 | #define KEY_FORWARDMAIL 233 /* AC Forward Msg */ | ||
| 313 | #define KEY_SAVE 234 /* AC Save */ | ||
| 314 | #define KEY_DOCUMENTS 235 | ||
| 315 | |||
| 316 | #define KEY_BATTERY 236 | ||
| 317 | |||
| 318 | #define KEY_BLUETOOTH 237 | ||
| 319 | #define KEY_WLAN 238 | ||
| 320 | #define KEY_UWB 239 | ||
| 321 | |||
| 322 | #define KEY_UNKNOWN 240 | ||
| 323 | |||
| 324 | #define KEY_VIDEO_NEXT 241 /* drive next video source */ | ||
| 325 | #define KEY_VIDEO_PREV 242 /* drive previous video source */ | ||
| 326 | #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ | ||
| 327 | #define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual | ||
| 328 | brightness control is off, | ||
| 329 | rely on ambient */ | ||
| 330 | #define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO | ||
| 331 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | ||
| 332 | |||
| 333 | #define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ | ||
| 334 | #define KEY_WIMAX KEY_WWAN | ||
| 335 | #define KEY_RFKILL 247 /* Key that controls all radios */ | ||
| 336 | |||
| 337 | #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ | ||
| 338 | |||
| 339 | /* Code 255 is reserved for special needs of AT keyboard driver */ | ||
| 340 | |||
| 341 | #define BTN_MISC 0x100 | ||
| 342 | #define BTN_0 0x100 | ||
| 343 | #define BTN_1 0x101 | ||
| 344 | #define BTN_2 0x102 | ||
| 345 | #define BTN_3 0x103 | ||
| 346 | #define BTN_4 0x104 | ||
| 347 | #define BTN_5 0x105 | ||
| 348 | #define BTN_6 0x106 | ||
| 349 | #define BTN_7 0x107 | ||
| 350 | #define BTN_8 0x108 | ||
| 351 | #define BTN_9 0x109 | ||
| 352 | |||
| 353 | #define BTN_MOUSE 0x110 | ||
| 354 | #define BTN_LEFT 0x110 | ||
| 355 | #define BTN_RIGHT 0x111 | ||
| 356 | #define BTN_MIDDLE 0x112 | ||
| 357 | #define BTN_SIDE 0x113 | ||
| 358 | #define BTN_EXTRA 0x114 | ||
| 359 | #define BTN_FORWARD 0x115 | ||
| 360 | #define BTN_BACK 0x116 | ||
| 361 | #define BTN_TASK 0x117 | ||
| 362 | |||
| 363 | #define BTN_JOYSTICK 0x120 | ||
| 364 | #define BTN_TRIGGER 0x120 | ||
| 365 | #define BTN_THUMB 0x121 | ||
| 366 | #define BTN_THUMB2 0x122 | ||
| 367 | #define BTN_TOP 0x123 | ||
| 368 | #define BTN_TOP2 0x124 | ||
| 369 | #define BTN_PINKIE 0x125 | ||
| 370 | #define BTN_BASE 0x126 | ||
| 371 | #define BTN_BASE2 0x127 | ||
| 372 | #define BTN_BASE3 0x128 | ||
| 373 | #define BTN_BASE4 0x129 | ||
| 374 | #define BTN_BASE5 0x12a | ||
| 375 | #define BTN_BASE6 0x12b | ||
| 376 | #define BTN_DEAD 0x12f | ||
| 377 | |||
| 378 | #define BTN_GAMEPAD 0x130 | ||
| 379 | #define BTN_SOUTH 0x130 | ||
| 380 | #define BTN_A BTN_SOUTH | ||
| 381 | #define BTN_EAST 0x131 | ||
| 382 | #define BTN_B BTN_EAST | ||
| 383 | #define BTN_C 0x132 | ||
| 384 | #define BTN_NORTH 0x133 | ||
| 385 | #define BTN_X BTN_NORTH | ||
| 386 | #define BTN_WEST 0x134 | ||
| 387 | #define BTN_Y BTN_WEST | ||
| 388 | #define BTN_Z 0x135 | ||
| 389 | #define BTN_TL 0x136 | ||
| 390 | #define BTN_TR 0x137 | ||
| 391 | #define BTN_TL2 0x138 | ||
| 392 | #define BTN_TR2 0x139 | ||
| 393 | #define BTN_SELECT 0x13a | ||
| 394 | #define BTN_START 0x13b | ||
| 395 | #define BTN_MODE 0x13c | ||
| 396 | #define BTN_THUMBL 0x13d | ||
| 397 | #define BTN_THUMBR 0x13e | ||
| 398 | |||
| 399 | #define BTN_DIGI 0x140 | ||
| 400 | #define BTN_TOOL_PEN 0x140 | ||
| 401 | #define BTN_TOOL_RUBBER 0x141 | ||
| 402 | #define BTN_TOOL_BRUSH 0x142 | ||
| 403 | #define BTN_TOOL_PENCIL 0x143 | ||
| 404 | #define BTN_TOOL_AIRBRUSH 0x144 | ||
| 405 | #define BTN_TOOL_FINGER 0x145 | ||
| 406 | #define BTN_TOOL_MOUSE 0x146 | ||
| 407 | #define BTN_TOOL_LENS 0x147 | ||
| 408 | #define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ | ||
| 409 | #define BTN_TOUCH 0x14a | ||
| 410 | #define BTN_STYLUS 0x14b | ||
| 411 | #define BTN_STYLUS2 0x14c | ||
| 412 | #define BTN_TOOL_DOUBLETAP 0x14d | ||
| 413 | #define BTN_TOOL_TRIPLETAP 0x14e | ||
| 414 | #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ | ||
| 415 | |||
| 416 | #define BTN_WHEEL 0x150 | ||
| 417 | #define BTN_GEAR_DOWN 0x150 | ||
| 418 | #define BTN_GEAR_UP 0x151 | ||
| 419 | |||
| 420 | #define KEY_OK 0x160 | ||
| 421 | #define KEY_SELECT 0x161 | ||
| 422 | #define KEY_GOTO 0x162 | ||
| 423 | #define KEY_CLEAR 0x163 | ||
| 424 | #define KEY_POWER2 0x164 | ||
| 425 | #define KEY_OPTION 0x165 | ||
| 426 | #define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ | ||
| 427 | #define KEY_TIME 0x167 | ||
| 428 | #define KEY_VENDOR 0x168 | ||
| 429 | #define KEY_ARCHIVE 0x169 | ||
| 430 | #define KEY_PROGRAM 0x16a /* Media Select Program Guide */ | ||
| 431 | #define KEY_CHANNEL 0x16b | ||
| 432 | #define KEY_FAVORITES 0x16c | ||
| 433 | #define KEY_EPG 0x16d | ||
| 434 | #define KEY_PVR 0x16e /* Media Select Home */ | ||
| 435 | #define KEY_MHP 0x16f | ||
| 436 | #define KEY_LANGUAGE 0x170 | ||
| 437 | #define KEY_TITLE 0x171 | ||
| 438 | #define KEY_SUBTITLE 0x172 | ||
| 439 | #define KEY_ANGLE 0x173 | ||
| 440 | #define KEY_ZOOM 0x174 | ||
| 441 | #define KEY_MODE 0x175 | ||
| 442 | #define KEY_KEYBOARD 0x176 | ||
| 443 | #define KEY_SCREEN 0x177 | ||
| 444 | #define KEY_PC 0x178 /* Media Select Computer */ | ||
| 445 | #define KEY_TV 0x179 /* Media Select TV */ | ||
| 446 | #define KEY_TV2 0x17a /* Media Select Cable */ | ||
| 447 | #define KEY_VCR 0x17b /* Media Select VCR */ | ||
| 448 | #define KEY_VCR2 0x17c /* VCR Plus */ | ||
| 449 | #define KEY_SAT 0x17d /* Media Select Satellite */ | ||
| 450 | #define KEY_SAT2 0x17e | ||
| 451 | #define KEY_CD 0x17f /* Media Select CD */ | ||
| 452 | #define KEY_TAPE 0x180 /* Media Select Tape */ | ||
| 453 | #define KEY_RADIO 0x181 | ||
| 454 | #define KEY_TUNER 0x182 /* Media Select Tuner */ | ||
| 455 | #define KEY_PLAYER 0x183 | ||
| 456 | #define KEY_TEXT 0x184 | ||
| 457 | #define KEY_DVD 0x185 /* Media Select DVD */ | ||
| 458 | #define KEY_AUX 0x186 | ||
| 459 | #define KEY_MP3 0x187 | ||
| 460 | #define KEY_AUDIO 0x188 /* AL Audio Browser */ | ||
| 461 | #define KEY_VIDEO 0x189 /* AL Movie Browser */ | ||
| 462 | #define KEY_DIRECTORY 0x18a | ||
| 463 | #define KEY_LIST 0x18b | ||
| 464 | #define KEY_MEMO 0x18c /* Media Select Messages */ | ||
| 465 | #define KEY_CALENDAR 0x18d | ||
| 466 | #define KEY_RED 0x18e | ||
| 467 | #define KEY_GREEN 0x18f | ||
| 468 | #define KEY_YELLOW 0x190 | ||
| 469 | #define KEY_BLUE 0x191 | ||
| 470 | #define KEY_CHANNELUP 0x192 /* Channel Increment */ | ||
| 471 | #define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ | ||
| 472 | #define KEY_FIRST 0x194 | ||
| 473 | #define KEY_LAST 0x195 /* Recall Last */ | ||
| 474 | #define KEY_AB 0x196 | ||
| 475 | #define KEY_NEXT 0x197 | ||
| 476 | #define KEY_RESTART 0x198 | ||
| 477 | #define KEY_SLOW 0x199 | ||
| 478 | #define KEY_SHUFFLE 0x19a | ||
| 479 | #define KEY_BREAK 0x19b | ||
| 480 | #define KEY_PREVIOUS 0x19c | ||
| 481 | #define KEY_DIGITS 0x19d | ||
| 482 | #define KEY_TEEN 0x19e | ||
| 483 | #define KEY_TWEN 0x19f | ||
| 484 | #define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ | ||
| 485 | #define KEY_GAMES 0x1a1 /* Media Select Games */ | ||
| 486 | #define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ | ||
| 487 | #define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ | ||
| 488 | #define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ | ||
| 489 | #define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ | ||
| 490 | #define KEY_EDITOR 0x1a6 /* AL Text Editor */ | ||
| 491 | #define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ | ||
| 492 | #define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ | ||
| 493 | #define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ | ||
| 494 | #define KEY_DATABASE 0x1aa /* AL Database App */ | ||
| 495 | #define KEY_NEWS 0x1ab /* AL Newsreader */ | ||
| 496 | #define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ | ||
| 497 | #define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ | ||
| 498 | #define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ | ||
| 499 | #define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ | ||
| 500 | #define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE | ||
| 501 | #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ | ||
| 502 | #define KEY_LOGOFF 0x1b1 /* AL Logoff */ | ||
| 503 | |||
| 504 | #define KEY_DOLLAR 0x1b2 | ||
| 505 | #define KEY_EURO 0x1b3 | ||
| 506 | |||
| 507 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ | ||
| 508 | #define KEY_FRAMEFORWARD 0x1b5 | ||
| 509 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | ||
| 510 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | ||
| 511 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ | ||
| 512 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ | ||
| 513 | #define KEY_IMAGES 0x1ba /* AL Image Browser */ | ||
| 514 | |||
| 515 | #define KEY_DEL_EOL 0x1c0 | ||
| 516 | #define KEY_DEL_EOS 0x1c1 | ||
| 517 | #define KEY_INS_LINE 0x1c2 | ||
| 518 | #define KEY_DEL_LINE 0x1c3 | ||
| 519 | |||
| 520 | #define KEY_FN 0x1d0 | ||
| 521 | #define KEY_FN_ESC 0x1d1 | ||
| 522 | #define KEY_FN_F1 0x1d2 | ||
| 523 | #define KEY_FN_F2 0x1d3 | ||
| 524 | #define KEY_FN_F3 0x1d4 | ||
| 525 | #define KEY_FN_F4 0x1d5 | ||
| 526 | #define KEY_FN_F5 0x1d6 | ||
| 527 | #define KEY_FN_F6 0x1d7 | ||
| 528 | #define KEY_FN_F7 0x1d8 | ||
| 529 | #define KEY_FN_F8 0x1d9 | ||
| 530 | #define KEY_FN_F9 0x1da | ||
| 531 | #define KEY_FN_F10 0x1db | ||
| 532 | #define KEY_FN_F11 0x1dc | ||
| 533 | #define KEY_FN_F12 0x1dd | ||
| 534 | #define KEY_FN_1 0x1de | ||
| 535 | #define KEY_FN_2 0x1df | ||
| 536 | #define KEY_FN_D 0x1e0 | ||
| 537 | #define KEY_FN_E 0x1e1 | ||
| 538 | #define KEY_FN_F 0x1e2 | ||
| 539 | #define KEY_FN_S 0x1e3 | ||
| 540 | #define KEY_FN_B 0x1e4 | ||
| 541 | |||
| 542 | #define KEY_BRL_DOT1 0x1f1 | ||
| 543 | #define KEY_BRL_DOT2 0x1f2 | ||
| 544 | #define KEY_BRL_DOT3 0x1f3 | ||
| 545 | #define KEY_BRL_DOT4 0x1f4 | ||
| 546 | #define KEY_BRL_DOT5 0x1f5 | ||
| 547 | #define KEY_BRL_DOT6 0x1f6 | ||
| 548 | #define KEY_BRL_DOT7 0x1f7 | ||
| 549 | #define KEY_BRL_DOT8 0x1f8 | ||
| 550 | #define KEY_BRL_DOT9 0x1f9 | ||
| 551 | #define KEY_BRL_DOT10 0x1fa | ||
| 552 | |||
| 553 | #define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ | ||
| 554 | #define KEY_NUMERIC_1 0x201 /* and other keypads */ | ||
| 555 | #define KEY_NUMERIC_2 0x202 | ||
| 556 | #define KEY_NUMERIC_3 0x203 | ||
| 557 | #define KEY_NUMERIC_4 0x204 | ||
| 558 | #define KEY_NUMERIC_5 0x205 | ||
| 559 | #define KEY_NUMERIC_6 0x206 | ||
| 560 | #define KEY_NUMERIC_7 0x207 | ||
| 561 | #define KEY_NUMERIC_8 0x208 | ||
| 562 | #define KEY_NUMERIC_9 0x209 | ||
| 563 | #define KEY_NUMERIC_STAR 0x20a | ||
| 564 | #define KEY_NUMERIC_POUND 0x20b | ||
| 565 | #define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ | ||
| 566 | #define KEY_NUMERIC_B 0x20d | ||
| 567 | #define KEY_NUMERIC_C 0x20e | ||
| 568 | #define KEY_NUMERIC_D 0x20f | ||
| 569 | |||
| 570 | #define KEY_CAMERA_FOCUS 0x210 | ||
| 571 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ | ||
| 572 | |||
| 573 | #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ | ||
| 574 | #define KEY_TOUCHPAD_ON 0x213 | ||
| 575 | #define KEY_TOUCHPAD_OFF 0x214 | ||
| 576 | |||
| 577 | #define KEY_CAMERA_ZOOMIN 0x215 | ||
| 578 | #define KEY_CAMERA_ZOOMOUT 0x216 | ||
| 579 | #define KEY_CAMERA_UP 0x217 | ||
| 580 | #define KEY_CAMERA_DOWN 0x218 | ||
| 581 | #define KEY_CAMERA_LEFT 0x219 | ||
| 582 | #define KEY_CAMERA_RIGHT 0x21a | ||
| 583 | |||
| 584 | #define KEY_ATTENDANT_ON 0x21b | ||
| 585 | #define KEY_ATTENDANT_OFF 0x21c | ||
| 586 | #define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ | ||
| 587 | #define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ | ||
| 588 | |||
| 589 | #define BTN_DPAD_UP 0x220 | ||
| 590 | #define BTN_DPAD_DOWN 0x221 | ||
| 591 | #define BTN_DPAD_LEFT 0x222 | ||
| 592 | #define BTN_DPAD_RIGHT 0x223 | ||
| 593 | |||
| 594 | #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ | ||
| 595 | |||
| 596 | #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ | ||
| 597 | #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ | ||
| 598 | #define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ | ||
| 599 | #define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ | ||
| 600 | #define KEY_APPSELECT 0x244 /* AL Select Task/Application */ | ||
| 601 | #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ | ||
| 602 | #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ | ||
| 603 | |||
| 604 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ | ||
| 605 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ | ||
| 606 | |||
| 607 | #define KEY_KBDINPUTASSIST_PREV 0x260 | ||
| 608 | #define KEY_KBDINPUTASSIST_NEXT 0x261 | ||
| 609 | #define KEY_KBDINPUTASSIST_PREVGROUP 0x262 | ||
| 610 | #define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 | ||
| 611 | #define KEY_KBDINPUTASSIST_ACCEPT 0x264 | ||
| 612 | #define KEY_KBDINPUTASSIST_CANCEL 0x265 | ||
| 613 | |||
| 614 | #define BTN_TRIGGER_HAPPY 0x2c0 | ||
| 615 | #define BTN_TRIGGER_HAPPY1 0x2c0 | ||
| 616 | #define BTN_TRIGGER_HAPPY2 0x2c1 | ||
| 617 | #define BTN_TRIGGER_HAPPY3 0x2c2 | ||
| 618 | #define BTN_TRIGGER_HAPPY4 0x2c3 | ||
| 619 | #define BTN_TRIGGER_HAPPY5 0x2c4 | ||
| 620 | #define BTN_TRIGGER_HAPPY6 0x2c5 | ||
| 621 | #define BTN_TRIGGER_HAPPY7 0x2c6 | ||
| 622 | #define BTN_TRIGGER_HAPPY8 0x2c7 | ||
| 623 | #define BTN_TRIGGER_HAPPY9 0x2c8 | ||
| 624 | #define BTN_TRIGGER_HAPPY10 0x2c9 | ||
| 625 | #define BTN_TRIGGER_HAPPY11 0x2ca | ||
| 626 | #define BTN_TRIGGER_HAPPY12 0x2cb | ||
| 627 | #define BTN_TRIGGER_HAPPY13 0x2cc | ||
| 628 | #define BTN_TRIGGER_HAPPY14 0x2cd | ||
| 629 | #define BTN_TRIGGER_HAPPY15 0x2ce | ||
| 630 | #define BTN_TRIGGER_HAPPY16 0x2cf | ||
| 631 | #define BTN_TRIGGER_HAPPY17 0x2d0 | ||
| 632 | #define BTN_TRIGGER_HAPPY18 0x2d1 | ||
| 633 | #define BTN_TRIGGER_HAPPY19 0x2d2 | ||
| 634 | #define BTN_TRIGGER_HAPPY20 0x2d3 | ||
| 635 | #define BTN_TRIGGER_HAPPY21 0x2d4 | ||
| 636 | #define BTN_TRIGGER_HAPPY22 0x2d5 | ||
| 637 | #define BTN_TRIGGER_HAPPY23 0x2d6 | ||
| 638 | #define BTN_TRIGGER_HAPPY24 0x2d7 | ||
| 639 | #define BTN_TRIGGER_HAPPY25 0x2d8 | ||
| 640 | #define BTN_TRIGGER_HAPPY26 0x2d9 | ||
| 641 | #define BTN_TRIGGER_HAPPY27 0x2da | ||
| 642 | #define BTN_TRIGGER_HAPPY28 0x2db | ||
| 643 | #define BTN_TRIGGER_HAPPY29 0x2dc | ||
| 644 | #define BTN_TRIGGER_HAPPY30 0x2dd | ||
| 645 | #define BTN_TRIGGER_HAPPY31 0x2de | ||
| 646 | #define BTN_TRIGGER_HAPPY32 0x2df | ||
| 647 | #define BTN_TRIGGER_HAPPY33 0x2e0 | ||
| 648 | #define BTN_TRIGGER_HAPPY34 0x2e1 | ||
| 649 | #define BTN_TRIGGER_HAPPY35 0x2e2 | ||
| 650 | #define BTN_TRIGGER_HAPPY36 0x2e3 | ||
| 651 | #define BTN_TRIGGER_HAPPY37 0x2e4 | ||
| 652 | #define BTN_TRIGGER_HAPPY38 0x2e5 | ||
| 653 | #define BTN_TRIGGER_HAPPY39 0x2e6 | ||
| 654 | #define BTN_TRIGGER_HAPPY40 0x2e7 | ||
| 655 | |||
| 656 | /* We avoid low common keys in module aliases so they don't get huge. */ | ||
| 657 | #define KEY_MIN_INTERESTING KEY_MUTE | ||
| 658 | #define KEY_MAX 0x2ff | ||
| 659 | #define KEY_CNT (KEY_MAX+1) | ||
| 660 | |||
| 661 | /* | ||
| 662 | * Relative axes | ||
| 663 | */ | ||
| 664 | |||
| 665 | #define REL_X 0x00 | ||
| 666 | #define REL_Y 0x01 | ||
| 667 | #define REL_Z 0x02 | ||
| 668 | #define REL_RX 0x03 | ||
| 669 | #define REL_RY 0x04 | ||
| 670 | #define REL_RZ 0x05 | ||
| 671 | #define REL_HWHEEL 0x06 | ||
| 672 | #define REL_DIAL 0x07 | ||
| 673 | #define REL_WHEEL 0x08 | ||
| 674 | #define REL_MISC 0x09 | ||
| 675 | #define REL_MAX 0x0f | ||
| 676 | #define REL_CNT (REL_MAX+1) | ||
| 677 | |||
| 678 | /* | ||
| 679 | * Absolute axes | ||
| 680 | */ | ||
| 681 | |||
| 682 | #define ABS_X 0x00 | ||
| 683 | #define ABS_Y 0x01 | ||
| 684 | #define ABS_Z 0x02 | ||
| 685 | #define ABS_RX 0x03 | ||
| 686 | #define ABS_RY 0x04 | ||
| 687 | #define ABS_RZ 0x05 | ||
| 688 | #define ABS_THROTTLE 0x06 | ||
| 689 | #define ABS_RUDDER 0x07 | ||
| 690 | #define ABS_WHEEL 0x08 | ||
| 691 | #define ABS_GAS 0x09 | ||
| 692 | #define ABS_BRAKE 0x0a | ||
| 693 | #define ABS_HAT0X 0x10 | ||
| 694 | #define ABS_HAT0Y 0x11 | ||
| 695 | #define ABS_HAT1X 0x12 | ||
| 696 | #define ABS_HAT1Y 0x13 | ||
| 697 | #define ABS_HAT2X 0x14 | ||
| 698 | #define ABS_HAT2Y 0x15 | ||
| 699 | #define ABS_HAT3X 0x16 | ||
| 700 | #define ABS_HAT3Y 0x17 | ||
| 701 | #define ABS_PRESSURE 0x18 | ||
| 702 | #define ABS_DISTANCE 0x19 | ||
| 703 | #define ABS_TILT_X 0x1a | ||
| 704 | #define ABS_TILT_Y 0x1b | ||
| 705 | #define ABS_TOOL_WIDTH 0x1c | ||
| 706 | |||
| 707 | #define ABS_VOLUME 0x20 | ||
| 708 | |||
| 709 | #define ABS_MISC 0x28 | ||
| 710 | |||
| 711 | #define ABS_MT_SLOT 0x2f /* MT slot being modified */ | ||
| 712 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | ||
| 713 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | ||
| 714 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | ||
| 715 | #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ | ||
| 716 | #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ | ||
| 717 | #define ABS_MT_POSITION_X 0x35 /* Center X touch position */ | ||
| 718 | #define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ | ||
| 719 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | ||
| 720 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | ||
| 721 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | ||
| 722 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | ||
| 723 | #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ | ||
| 724 | #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ | ||
| 725 | #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ | ||
| 726 | |||
| 727 | |||
| 728 | #define ABS_MAX 0x3f | ||
| 729 | #define ABS_CNT (ABS_MAX+1) | ||
| 730 | |||
| 731 | /* | ||
| 732 | * Switch events | ||
| 733 | */ | ||
| 734 | |||
| 735 | #define SW_LID 0x00 /* set = lid shut */ | ||
| 736 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ | ||
| 737 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ | ||
| 738 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" | ||
| 739 | set = radio enabled */ | ||
| 740 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | ||
| 741 | #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ | ||
| 742 | #define SW_DOCK 0x05 /* set = plugged into dock */ | ||
| 743 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ | ||
| 744 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ | ||
| 745 | #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ | ||
| 746 | #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ | ||
| 747 | #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ | ||
| 748 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ | ||
| 749 | #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ | ||
| 750 | #define SW_LINEIN_INSERT 0x0d /* set = inserted */ | ||
| 751 | #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ | ||
| 752 | #define SW_MAX 0x0f | ||
| 753 | #define SW_CNT (SW_MAX+1) | ||
| 754 | |||
| 755 | /* | ||
| 756 | * Misc events | ||
| 757 | */ | ||
| 758 | |||
| 759 | #define MSC_SERIAL 0x00 | ||
| 760 | #define MSC_PULSELED 0x01 | ||
| 761 | #define MSC_GESTURE 0x02 | ||
| 762 | #define MSC_RAW 0x03 | ||
| 763 | #define MSC_SCAN 0x04 | ||
| 764 | #define MSC_TIMESTAMP 0x05 | ||
| 765 | #define MSC_MAX 0x07 | ||
| 766 | #define MSC_CNT (MSC_MAX+1) | ||
| 767 | |||
| 768 | /* | ||
| 769 | * LEDs | ||
| 770 | */ | ||
| 771 | |||
| 772 | #define LED_NUML 0x00 | ||
| 773 | #define LED_CAPSL 0x01 | ||
| 774 | #define LED_SCROLLL 0x02 | ||
| 775 | #define LED_COMPOSE 0x03 | ||
| 776 | #define LED_KANA 0x04 | ||
| 777 | #define LED_SLEEP 0x05 | ||
| 778 | #define LED_SUSPEND 0x06 | ||
| 779 | #define LED_MUTE 0x07 | ||
| 780 | #define LED_MISC 0x08 | ||
| 781 | #define LED_MAIL 0x09 | ||
| 782 | #define LED_CHARGING 0x0a | ||
| 783 | #define LED_MAX 0x0f | ||
| 784 | #define LED_CNT (LED_MAX+1) | ||
| 785 | |||
| 786 | /* | ||
| 787 | * Autorepeat values | ||
| 788 | */ | ||
| 789 | |||
| 790 | #define REP_DELAY 0x00 | ||
| 791 | #define REP_PERIOD 0x01 | ||
| 792 | #define REP_MAX 0x01 | ||
| 793 | #define REP_CNT (REP_MAX+1) | ||
| 794 | |||
| 795 | /* | ||
| 796 | * Sounds | ||
| 797 | */ | ||
| 798 | |||
| 799 | #define SND_CLICK 0x00 | ||
| 800 | #define SND_BELL 0x01 | ||
| 801 | #define SND_TONE 0x02 | ||
| 802 | #define SND_MAX 0x07 | ||
| 803 | #define SND_CNT (SND_MAX+1) | ||
| 804 | |||
| 805 | #endif | ||
| @@ -16,6 +16,7 @@ · 15 unmodified lines | |||
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | #endif | 17 | #endif |
| 18 | 18 | ||
| 19 | #include "input-event-codes.h" | ||
| 19 | 20 | ||
| 20 | /* | 21 | /* |
| 21 | * The event structure itself | 22 | * The event structure itself |
| @@ -97,6 +98,12 @@ struct input_keymap_entry { · 75 unmodified lines | |||
| 97 | __u8 scancode[32]; | 98 | __u8 scancode[32]; |
| 98 | }; | 99 | }; |
| 99 | 100 | ||
| 101 | struct input_mask { | ||
| 102 | __u32 type; | ||
| 103 | __u32 codes_size; | ||
| 104 | __u64 codes_ptr; | ||
| 105 | }; | ||
| 106 | |||
| 100 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 107 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
| 101 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 108 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
| 102 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ | 109 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
| @@ -147,801 +154,68 @@ struct input_keymap_entry { · 44 unmodified lines | |||
| 147 | #define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ | 154 | #define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ |
| 148 | #define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */ | 155 | #define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */ |
| 149 | 156 | ||
| 150 | #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ | 157 | #define EVIOCSFF _IOW('E', 0x80, struct ff_effect) /* send a force effect to a force feedback device */ |
| 151 | #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ | 158 | #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
| 152 | #define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ | 159 | #define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
| 153 | 160 | ||
| 154 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ | 161 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
| 155 | #define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ | 162 | #define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ |
| 156 | 163 | ||
| 157 | #define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ | 164 | /** |
| 158 | 165 | * EVIOCGMASK - Retrieve current event mask | |
| 159 | /* | ||
| 160 | * Device properties and quirks | ||
| 161 | */ | ||
| 162 | |||
| 163 | #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ | ||
| 164 | #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ | ||
| 165 | #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ | ||
| 166 | #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ | ||
| 167 | #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ | ||
| 168 | #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ | ||
| 169 | #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ | ||
| 170 | |||
| 171 | #define INPUT_PROP_MAX 0x1f | ||
| 172 | #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) | ||
| 173 | |||
| 174 | /* | ||
| 175 | * Event types | ||
| 176 | */ | ||
| 177 | |||
| 178 | #define EV_SYN 0x00 | ||
| 179 | #define EV_KEY 0x01 | ||
| 180 | #define EV_REL 0x02 | ||
| 181 | #define EV_ABS 0x03 | ||
| 182 | #define EV_MSC 0x04 | ||
| 183 | #define EV_SW 0x05 | ||
| 184 | #define EV_LED 0x11 | ||
| 185 | #define EV_SND 0x12 | ||
| 186 | #define EV_REP 0x14 | ||
| 187 | #define EV_FF 0x15 | ||
| 188 | #define EV_PWR 0x16 | ||
| 189 | #define EV_FF_STATUS 0x17 | ||
| 190 | #define EV_MAX 0x1f | ||
| 191 | #define EV_CNT (EV_MAX+1) | ||
| 192 | |||
| 193 | /* | ||
| 194 | * Synchronization events. | ||
| 195 | */ | ||
| 196 | |||
| 197 | #define SYN_REPORT 0 | ||
| 198 | #define SYN_CONFIG 1 | ||
| 199 | #define SYN_MT_REPORT 2 | ||
| 200 | #define SYN_DROPPED 3 | ||
| 201 | #define SYN_MAX 0xf | ||
| 202 | #define SYN_CNT (SYN_MAX+1) | ||
| 203 | |||
| 204 | /* | ||
| 205 | * Keys and buttons | ||
| 206 | * | 166 | * |
| 207 | * Most of the keys/buttons are modeled after USB HUT 1.12 | 167 | * This ioctl allows user to retrieve the current event mask for specific |
| 208 | * (see http://www.usb.org/developers/hidpage). | 168 | * event type. The argument must be of type "struct input_mask" and |
| 209 | * Abbreviations in the comments: | 169 | * specifies the event type to query, the address of the receive buffer and |
| 210 | * AC - Application Control | 170 | * the size of the receive buffer. |
| 211 | * AL - Application Launch Button | 171 | * |
| 212 | * SC - System Control | 172 | * The event mask is a per-client mask that specifies which events are |
| 213 | */ | 173 | * forwarded to the client. Each event code is represented by a single bit |
| 214 | 174 | * in the event mask. If the bit is set, the event is passed to the client | |
| 215 | #define KEY_RESERVED 0 | 175 | * normally. Otherwise, the event is filtered and will never be queued on |
| 216 | #define KEY_ESC 1 | 176 | * the client's receive buffer. |
| 217 | #define KEY_1 2 | 177 | * |
| 218 | #define KEY_2 3 | 178 | * Event masks do not affect global state of the input device. They only |
| 219 | #define KEY_3 4 | 179 | * affect the file descriptor they are applied to. |
| 220 | #define KEY_4 5 | 180 | * |
| 221 | #define KEY_5 6 | 181 | * The default event mask for a client has all bits set, i.e. all events |
| 222 | #define KEY_6 7 | 182 | * are forwarded to the client. If the kernel is queried for an unknown |
| 223 | #define KEY_7 8 | 183 | * event type or if the receive buffer is larger than the number of |
| 224 | #define KEY_8 9 | 184 | * event codes known to the kernel, the kernel returns all zeroes for those |
| 225 | #define KEY_9 10 | 185 | * codes. |
| 226 | #define KEY_0 11 | 186 | * |
| 227 | #define KEY_MINUS 12 | 187 | * At maximum, codes_size bytes are copied. |
| 228 | #define KEY_EQUAL 13 | 188 | * |
| 229 | #define KEY_BACKSPACE 14 | 189 | * This ioctl may fail with ENODEV in case the file is revoked, EFAULT |
| 230 | #define KEY_TAB 15 | 190 | * if the receive-buffer points to invalid memory, or EINVAL if the kernel |
| 231 | #define KEY_Q 16 | 191 | * does not implement the ioctl. |
| 232 | #define KEY_W 17 | ||
| 233 | #define KEY_E 18 | ||
| 234 | #define KEY_R 19 | ||
| 235 | #define KEY_T 20 | ||
| 236 | #define KEY_Y 21 | ||
| 237 | #define KEY_U 22 | ||
| 238 | #define KEY_I 23 | ||
| 239 | #define KEY_O 24 | ||
| 240 | #define KEY_P 25 | ||
| 241 | #define KEY_LEFTBRACE 26 | ||
| 242 | #define KEY_RIGHTBRACE 27 | ||
| 243 | #define KEY_ENTER 28 | ||
| 244 | #define KEY_LEFTCTRL 29 | ||
| 245 | #define KEY_A 30 | ||
| 246 | #define KEY_S 31 | ||
| 247 | #define KEY_D 32 | ||
| 248 | #define KEY_F 33 | ||
| 249 | #define KEY_G 34 | ||
| 250 | #define KEY_H 35 | ||
| 251 | #define KEY_J 36 | ||
| 252 | #define KEY_K 37 | ||
| 253 | #define KEY_L 38 | ||
| 254 | #define KEY_SEMICOLON 39 | ||
| 255 | #define KEY_APOSTROPHE 40 | ||
| 256 | #define KEY_GRAVE 41 | ||
| 257 | #define KEY_LEFTSHIFT 42 | ||
| 258 | #define KEY_BACKSLASH 43 | ||
| 259 | #define KEY_Z 44 | ||
| 260 | #define KEY_X 45 | ||
| 261 | #define KEY_C 46 | ||
| 262 | #define KEY_V 47 | ||
| 263 | #define KEY_B 48 | ||
| 264 | #define KEY_N 49 | ||
| 265 | #define KEY_M 50 | ||
| 266 | #define KEY_COMMA 51 | ||
| 267 | #define KEY_DOT 52 | ||
| 268 | #define KEY_SLASH 53 | ||
| 269 | #define KEY_RIGHTSHIFT 54 | ||
| 270 | #define KEY_KPASTERISK 55 | ||
| 271 | #define KEY_LEFTALT 56 | ||
| 272 | #define KEY_SPACE 57 | ||
| 273 | #define KEY_CAPSLOCK 58 | ||
| 274 | #define KEY_F1 59 | ||
| 275 | #define KEY_F2 60 | ||
| 276 | #define KEY_F3 61 | ||
| 277 | #define KEY_F4 62 | ||
| 278 | #define KEY_F5 63 | ||
| 279 | #define KEY_F6 64 | ||
| 280 | #define KEY_F7 65 | ||
| 281 | #define KEY_F8 66 | ||
| 282 | #define KEY_F9 67 | ||
| 283 | #define KEY_F10 68 | ||
| 284 | #define KEY_NUMLOCK 69 | ||
| 285 | #define KEY_SCROLLLOCK 70 | ||
| 286 | #define KEY_KP7 71 | ||
| 287 | #define KEY_KP8 72 | ||
| 288 | #define KEY_KP9 73 | ||
| 289 | #define KEY_KPMINUS 74 | ||
| 290 | #define KEY_KP4 75 | ||
| 291 | #define KEY_KP5 76 | ||
| 292 | #define KEY_KP6 77 | ||
| 293 | #define KEY_KPPLUS 78 | ||
| 294 | #define KEY_KP1 79 | ||
| 295 | #define KEY_KP2 80 | ||
| 296 | #define KEY_KP3 81 | ||
| 297 | #define KEY_KP0 82 | ||
| 298 | #define KEY_KPDOT 83 | ||
| 299 | |||
| 300 | #define KEY_ZENKAKUHANKAKU 85 | ||
| 301 | #define KEY_102ND 86 | ||
| 302 | #define KEY_F11 87 | ||
| 303 | #define KEY_F12 88 | ||
| 304 | #define KEY_RO 89 | ||
| 305 | #define KEY_KATAKANA 90 | ||
| 306 | #define KEY_HIRAGANA 91 | ||
| 307 | #define KEY_HENKAN 92 | ||
| 308 | #define KEY_KATAKANAHIRAGANA 93 | ||
| 309 | #define KEY_MUHENKAN 94 | ||
| 310 | #define KEY_KPJPCOMMA 95 | ||
| 311 | #define KEY_KPENTER 96 | ||
| 312 | #define KEY_RIGHTCTRL 97 | ||
| 313 | #define KEY_KPSLASH 98 | ||
| 314 | #define KEY_SYSRQ 99 | ||
| 315 | #define KEY_RIGHTALT 100 | ||
| 316 | #define KEY_LINEFEED 101 | ||
| 317 | #define KEY_HOME 102 | ||
| 318 | #define KEY_UP 103 | ||
| 319 | #define KEY_PAGEUP 104 | ||
| 320 | #define KEY_LEFT 105 | ||
| 321 | #define KEY_RIGHT 106 | ||
| 322 | #define KEY_END 107 | ||
| 323 | #define KEY_DOWN 108 | ||
| 324 | #define KEY_PAGEDOWN 109 | ||
| 325 | #define KEY_INSERT 110 | ||
| 326 | #define KEY_DELETE 111 | ||
| 327 | #define KEY_MACRO 112 | ||
| 328 | #define KEY_MUTE 113 | ||
| 329 | #define KEY_VOLUMEDOWN 114 | ||
| 330 | #define KEY_VOLUMEUP 115 | ||
| 331 | #define KEY_POWER 116 /* SC System Power Down */ | ||
| 332 | #define KEY_KPEQUAL 117 | ||
| 333 | #define KEY_KPPLUSMINUS 118 | ||
| 334 | #define KEY_PAUSE 119 | ||
| 335 | #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ | ||
| 336 | |||
| 337 | #define KEY_KPCOMMA 121 | ||
| 338 | #define KEY_HANGEUL 122 | ||
| 339 | #define KEY_HANGUEL KEY_HANGEUL | ||
| 340 | #define KEY_HANJA 123 | ||
| 341 | #define KEY_YEN 124 | ||
| 342 | #define KEY_LEFTMETA 125 | ||
| 343 | #define KEY_RIGHTMETA 126 | ||
| 344 | #define KEY_COMPOSE 127 | ||
| 345 | |||
| 346 | #define KEY_STOP 128 /* AC Stop */ | ||
| 347 | #define KEY_AGAIN 129 | ||
| 348 | #define KEY_PROPS 130 /* AC Properties */ | ||
| 349 | #define KEY_UNDO 131 /* AC Undo */ | ||
| 350 | #define KEY_FRONT 132 | ||
| 351 | #define KEY_COPY 133 /* AC Copy */ | ||
| 352 | #define KEY_OPEN 134 /* AC Open */ | ||
| 353 | #define KEY_PASTE 135 /* AC Paste */ | ||
| 354 | #define KEY_FIND 136 /* AC Search */ | ||
| 355 | #define KEY_CUT 137 /* AC Cut */ | ||
| 356 | #define KEY_HELP 138 /* AL Integrated Help Center */ | ||
| 357 | #define KEY_MENU 139 /* Menu (show menu) */ | ||
| 358 | #define KEY_CALC 140 /* AL Calculator */ | ||
| 359 | #define KEY_SETUP 141 | ||
| 360 | #define KEY_SLEEP 142 /* SC System Sleep */ | ||
| 361 | #define KEY_WAKEUP 143 /* System Wake Up */ | ||
| 362 | #define KEY_FILE 144 /* AL Local Machine Browser */ | ||
| 363 | #define KEY_SENDFILE 145 | ||
| 364 | #define KEY_DELETEFILE 146 | ||
| 365 | #define KEY_XFER 147 | ||
| 366 | #define KEY_PROG1 148 | ||
| 367 | #define KEY_PROG2 149 | ||
| 368 | #define KEY_WWW 150 /* AL Internet Browser */ | ||
| 369 | #define KEY_MSDOS 151 | ||
| 370 | #define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ | ||
| 371 | #define KEY_SCREENLOCK KEY_COFFEE | ||
| 372 | #define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ | ||
| 373 | #define KEY_DIRECTION KEY_ROTATE_DISPLAY | ||
| 374 | #define KEY_CYCLEWINDOWS 154 | ||
| 375 | #define KEY_MAIL 155 | ||
| 376 | #define KEY_BOOKMARKS 156 /* AC Bookmarks */ | ||
| 377 | #define KEY_COMPUTER 157 | ||
| 378 | #define KEY_BACK 158 /* AC Back */ | ||
| 379 | #define KEY_FORWARD 159 /* AC Forward */ | ||
| 380 | #define KEY_CLOSECD 160 | ||
| 381 | #define KEY_EJECTCD 161 | ||
| 382 | #define KEY_EJECTCLOSECD 162 | ||
| 383 | #define KEY_NEXTSONG 163 | ||
| 384 | #define KEY_PLAYPAUSE 164 | ||
| 385 | #define KEY_PREVIOUSSONG 165 | ||
| 386 | #define KEY_STOPCD 166 | ||
| 387 | #define KEY_RECORD 167 | ||
| 388 | #define KEY_REWIND 168 | ||
| 389 | #define KEY_PHONE 169 /* Media Select Telephone */ | ||
| 390 | #define KEY_ISO 170 | ||
| 391 | #define KEY_CONFIG 171 /* AL Consumer Control Configuration */ | ||
| 392 | #define KEY_HOMEPAGE 172 /* AC Home */ | ||
| 393 | #define KEY_REFRESH 173 /* AC Refresh */ | ||
| 394 | #define KEY_EXIT 174 /* AC Exit */ | ||
| 395 | #define KEY_MOVE 175 | ||
| 396 | #define KEY_EDIT 176 | ||
| 397 | #define KEY_SCROLLUP 177 | ||
| 398 | #define KEY_SCROLLDOWN 178 | ||
| 399 | #define KEY_KPLEFTPAREN 179 | ||
| 400 | #define KEY_KPRIGHTPAREN 180 | ||
| 401 | #define KEY_NEW 181 /* AC New */ | ||
| 402 | #define KEY_REDO 182 /* AC Redo/Repeat */ | ||
| 403 | |||
| 404 | #define KEY_F13 183 | ||
| 405 | #define KEY_F14 184 | ||
| 406 | #define KEY_F15 185 | ||
| 407 | #define KEY_F16 186 | ||
| 408 | #define KEY_F17 187 | ||
| 409 | #define KEY_F18 188 | ||
| 410 | #define KEY_F19 189 | ||
| 411 | #define KEY_F20 190 | ||
| 412 | #define KEY_F21 191 | ||
| 413 | #define KEY_F22 192 | ||
| 414 | #define KEY_F23 193 | ||
| 415 | #define KEY_F24 194 | ||
| 416 | |||
| 417 | #define KEY_PLAYCD 200 | ||
| 418 | #define KEY_PAUSECD 201 | ||
| 419 | #define KEY_PROG3 202 | ||
| 420 | #define KEY_PROG4 203 | ||
| 421 | #define KEY_DASHBOARD 204 /* AL Dashboard */ | ||
| 422 | #define KEY_SUSPEND 205 | ||
| 423 | #define KEY_CLOSE 206 /* AC Close */ | ||
| 424 | #define KEY_PLAY 207 | ||
| 425 | #define KEY_FASTFORWARD 208 | ||
| 426 | #define KEY_BASSBOOST 209 | ||
| 427 | #define KEY_PRINT 210 /* AC Print */ | ||
| 428 | #define KEY_HP 211 | ||
| 429 | #define KEY_CAMERA 212 | ||
| 430 | #define KEY_SOUND 213 | ||
| 431 | #define KEY_QUESTION 214 | ||
| 432 | #define KEY_EMAIL 215 | ||
| 433 | #define KEY_CHAT 216 | ||
| 434 | #define KEY_SEARCH 217 | ||
| 435 | #define KEY_CONNECT 218 | ||
| 436 | #define KEY_FINANCE 219 /* AL Checkbook/Finance */ | ||
| 437 | #define KEY_SPORT 220 | ||
| 438 | #define KEY_SHOP 221 | ||
| 439 | #define KEY_ALTERASE 222 | ||
| 440 | #define KEY_CANCEL 223 /* AC Cancel */ | ||
| 441 | #define KEY_BRIGHTNESSDOWN 224 | ||
| 442 | #define KEY_BRIGHTNESSUP 225 | ||
| 443 | #define KEY_MEDIA 226 | ||
| 444 | |||
| 445 | #define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video | ||
| 446 | outputs (Monitor/LCD/TV-out/etc) */ | ||
| 447 | #define KEY_KBDILLUMTOGGLE 228 | ||
| 448 | #define KEY_KBDILLUMDOWN 229 | ||
| 449 | #define KEY_KBDILLUMUP 230 | ||
| 450 | |||
| 451 | #define KEY_SEND 231 /* AC Send */ | ||
| 452 | #define KEY_REPLY 232 /* AC Reply */ | ||
| 453 | #define KEY_FORWARDMAIL 233 /* AC Forward Msg */ | ||
| 454 | #define KEY_SAVE 234 /* AC Save */ | ||
| 455 | #define KEY_DOCUMENTS 235 | ||
| 456 | |||
| 457 | #define KEY_BATTERY 236 | ||
| 458 | |||
| 459 | #define KEY_BLUETOOTH 237 | ||
| 460 | #define KEY_WLAN 238 | ||
| 461 | #define KEY_UWB 239 | ||
| 462 | |||
| 463 | #define KEY_UNKNOWN 240 | ||
| 464 | |||
| 465 | #define KEY_VIDEO_NEXT 241 /* drive next video source */ | ||
| 466 | #define KEY_VIDEO_PREV 242 /* drive previous video source */ | ||
| 467 | #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ | ||
| 468 | #define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual | ||
| 469 | brightness control is off, | ||
| 470 | rely on ambient */ | ||
| 471 | #define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO | ||
| 472 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | ||
| 473 | |||
| 474 | #define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ | ||
| 475 | #define KEY_WIMAX KEY_WWAN | ||
| 476 | #define KEY_RFKILL 247 /* Key that controls all radios */ | ||
| 477 | |||
| 478 | #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ | ||
| 479 | |||
| 480 | /* Code 255 is reserved for special needs of AT keyboard driver */ | ||
| 481 | |||
| 482 | #define BTN_MISC 0x100 | ||
| 483 | #define BTN_0 0x100 | ||
| 484 | #define BTN_1 0x101 | ||
| 485 | #define BTN_2 0x102 | ||
| 486 | #define BTN_3 0x103 | ||
| 487 | #define BTN_4 0x104 | ||
| 488 | #define BTN_5 0x105 | ||
| 489 | #define BTN_6 0x106 | ||
| 490 | #define BTN_7 0x107 | ||
| 491 | #define BTN_8 0x108 | ||
| 492 | #define BTN_9 0x109 | ||
| 493 | |||
| 494 | #define BTN_MOUSE 0x110 | ||
| 495 | #define BTN_LEFT 0x110 | ||
| 496 | #define BTN_RIGHT 0x111 | ||
| 497 | #define BTN_MIDDLE 0x112 | ||
| 498 | #define BTN_SIDE 0x113 | ||
| 499 | #define BTN_EXTRA 0x114 | ||
| 500 | #define BTN_FORWARD 0x115 | ||
| 501 | #define BTN_BACK 0x116 | ||
| 502 | #define BTN_TASK 0x117 | ||
| 503 | |||
| 504 | #define BTN_JOYSTICK 0x120 | ||
| 505 | #define BTN_TRIGGER 0x120 | ||
| 506 | #define BTN_THUMB 0x121 | ||
| 507 | #define BTN_THUMB2 0x122 | ||
| 508 | #define BTN_TOP 0x123 | ||
| 509 | #define BTN_TOP2 0x124 | ||
| 510 | #define BTN_PINKIE 0x125 | ||
| 511 | #define BTN_BASE 0x126 | ||
| 512 | #define BTN_BASE2 0x127 | ||
| 513 | #define BTN_BASE3 0x128 | ||
| 514 | #define BTN_BASE4 0x129 | ||
| 515 | #define BTN_BASE5 0x12a | ||
| 516 | #define BTN_BASE6 0x12b | ||
| 517 | #define BTN_DEAD 0x12f | ||
| 518 | |||
| 519 | #define BTN_GAMEPAD 0x130 | ||
| 520 | #define BTN_SOUTH 0x130 | ||
| 521 | #define BTN_A BTN_SOUTH | ||
| 522 | #define BTN_EAST 0x131 | ||
| 523 | #define BTN_B BTN_EAST | ||
| 524 | #define BTN_C 0x132 | ||
| 525 | #define BTN_NORTH 0x133 | ||
| 526 | #define BTN_X BTN_NORTH | ||
| 527 | #define BTN_WEST 0x134 | ||
| 528 | #define BTN_Y BTN_WEST | ||
| 529 | #define BTN_Z 0x135 | ||
| 530 | #define BTN_TL 0x136 | ||
| 531 | #define BTN_TR 0x137 | ||
| 532 | #define BTN_TL2 0x138 | ||
| 533 | #define BTN_TR2 0x139 | ||
| 534 | #define BTN_SELECT 0x13a | ||
| 535 | #define BTN_START 0x13b | ||
| 536 | #define BTN_MODE 0x13c | ||
| 537 | #define BTN_THUMBL 0x13d | ||
| 538 | #define BTN_THUMBR 0x13e | ||
| 539 | |||
| 540 | #define BTN_DIGI 0x140 | ||
| 541 | #define BTN_TOOL_PEN 0x140 | ||
| 542 | #define BTN_TOOL_RUBBER 0x141 | ||
| 543 | #define BTN_TOOL_BRUSH 0x142 | ||
| 544 | #define BTN_TOOL_PENCIL 0x143 | ||
| 545 | #define BTN_TOOL_AIRBRUSH 0x144 | ||
| 546 | #define BTN_TOOL_FINGER 0x145 | ||
| 547 | #define BTN_TOOL_MOUSE 0x146 | ||
| 548 | #define BTN_TOOL_LENS 0x147 | ||
| 549 | #define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ | ||
| 550 | #define BTN_TOUCH 0x14a | ||
| 551 | #define BTN_STYLUS 0x14b | ||
| 552 | #define BTN_STYLUS2 0x14c | ||
| 553 | #define BTN_TOOL_DOUBLETAP 0x14d | ||
| 554 | #define BTN_TOOL_TRIPLETAP 0x14e | ||
| 555 | #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ | ||
| 556 | |||
| 557 | #define BTN_WHEEL 0x150 | ||
| 558 | #define BTN_GEAR_DOWN 0x150 | ||
| 559 | #define BTN_GEAR_UP 0x151 | ||
| 560 | |||
| 561 | #define KEY_OK 0x160 | ||
| 562 | #define KEY_SELECT 0x161 | ||
| 563 | #define KEY_GOTO 0x162 | ||
| 564 | #define KEY_CLEAR 0x163 | ||
| 565 | #define KEY_POWER2 0x164 | ||
| 566 | #define KEY_OPTION 0x165 | ||
| 567 | #define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ | ||
| 568 | #define KEY_TIME 0x167 | ||
| 569 | #define KEY_VENDOR 0x168 | ||
| 570 | #define KEY_ARCHIVE 0x169 | ||
| 571 | #define KEY_PROGRAM 0x16a /* Media Select Program Guide */ | ||
| 572 | #define KEY_CHANNEL 0x16b | ||
| 573 | #define KEY_FAVORITES 0x16c | ||
| 574 | #define KEY_EPG 0x16d | ||
| 575 | #define KEY_PVR 0x16e /* Media Select Home */ | ||
| 576 | #define KEY_MHP 0x16f | ||
| 577 | #define KEY_LANGUAGE 0x170 | ||
| 578 | #define KEY_TITLE 0x171 | ||
| 579 | #define KEY_SUBTITLE 0x172 | ||
| 580 | #define KEY_ANGLE 0x173 | ||
| 581 | #define KEY_ZOOM 0x174 | ||
| 582 | #define KEY_MODE 0x175 | ||
| 583 | #define KEY_KEYBOARD 0x176 | ||
| 584 | #define KEY_SCREEN 0x177 | ||
| 585 | #define KEY_PC 0x178 /* Media Select Computer */ | ||
| 586 | #define KEY_TV 0x179 /* Media Select TV */ | ||
| 587 | #define KEY_TV2 0x17a /* Media Select Cable */ | ||
| 588 | #define KEY_VCR 0x17b /* Media Select VCR */ | ||
| 589 | #define KEY_VCR2 0x17c /* VCR Plus */ | ||
| 590 | #define KEY_SAT 0x17d /* Media Select Satellite */ | ||
| 591 | #define KEY_SAT2 0x17e | ||
| 592 | #define KEY_CD 0x17f /* Media Select CD */ | ||
| 593 | #define KEY_TAPE 0x180 /* Media Select Tape */ | ||
| 594 | #define KEY_RADIO 0x181 | ||
| 595 | #define KEY_TUNER 0x182 /* Media Select Tuner */ | ||
| 596 | #define KEY_PLAYER 0x183 | ||
| 597 | #define KEY_TEXT 0x184 | ||
| 598 | #define KEY_DVD 0x185 /* Media Select DVD */ | ||
| 599 | #define KEY_AUX 0x186 | ||
| 600 | #define KEY_MP3 0x187 | ||
| 601 | #define KEY_AUDIO 0x188 /* AL Audio Browser */ | ||
| 602 | #define KEY_VIDEO 0x189 /* AL Movie Browser */ | ||
| 603 | #define KEY_DIRECTORY 0x18a | ||
| 604 | #define KEY_LIST 0x18b | ||
| 605 | #define KEY_MEMO 0x18c /* Media Select Messages */ | ||
| 606 | #define KEY_CALENDAR 0x18d | ||
| 607 | #define KEY_RED 0x18e | ||
| 608 | #define KEY_GREEN 0x18f | ||
| 609 | #define KEY_YELLOW 0x190 | ||
| 610 | #define KEY_BLUE 0x191 | ||
| 611 | #define KEY_CHANNELUP 0x192 /* Channel Increment */ | ||
| 612 | #define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ | ||
| 613 | #define KEY_FIRST 0x194 | ||
| 614 | #define KEY_LAST 0x195 /* Recall Last */ | ||
| 615 | #define KEY_AB 0x196 | ||
| 616 | #define KEY_NEXT 0x197 | ||
| 617 | #define KEY_RESTART 0x198 | ||
| 618 | #define KEY_SLOW 0x199 | ||
| 619 | #define KEY_SHUFFLE 0x19a | ||
| 620 | #define KEY_BREAK 0x19b | ||
| 621 | #define KEY_PREVIOUS 0x19c | ||
| 622 | #define KEY_DIGITS 0x19d | ||
| 623 | #define KEY_TEEN 0x19e | ||
| 624 | #define KEY_TWEN 0x19f | ||
| 625 | #define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ | ||
| 626 | #define KEY_GAMES 0x1a1 /* Media Select Games */ | ||
| 627 | #define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ | ||
| 628 | #define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ | ||
| 629 | #define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ | ||
| 630 | #define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ | ||
| 631 | #define KEY_EDITOR 0x1a6 /* AL Text Editor */ | ||
| 632 | #define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ | ||
| 633 | #define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ | ||
| 634 | #define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ | ||
| 635 | #define KEY_DATABASE 0x1aa /* AL Database App */ | ||
| 636 | #define KEY_NEWS 0x1ab /* AL Newsreader */ | ||
| 637 | #define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ | ||
| 638 | #define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ | ||
| 639 | #define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ | ||
| 640 | #define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ | ||
| 641 | #define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE | ||
| 642 | #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ | ||
| 643 | #define KEY_LOGOFF 0x1b1 /* AL Logoff */ | ||
| 644 | |||
| 645 | #define KEY_DOLLAR 0x1b2 | ||
| 646 | #define KEY_EURO 0x1b3 | ||
| 647 | |||
| 648 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ | ||
| 649 | #define KEY_FRAMEFORWARD 0x1b5 | ||
| 650 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | ||
| 651 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | ||
| 652 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ | ||
| 653 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ | ||
| 654 | #define KEY_IMAGES 0x1ba /* AL Image Browser */ | ||
| 655 | |||
| 656 | #define KEY_DEL_EOL 0x1c0 | ||
| 657 | #define KEY_DEL_EOS 0x1c1 | ||
| 658 | #define KEY_INS_LINE 0x1c2 | ||
| 659 | #define KEY_DEL_LINE 0x1c3 | ||
| 660 | |||
| 661 | #define KEY_FN 0x1d0 | ||
| 662 | #define KEY_FN_ESC 0x1d1 | ||
| 663 | #define KEY_FN_F1 0x1d2 | ||
| 664 | #define KEY_FN_F2 0x1d3 | ||
| 665 | #define KEY_FN_F3 0x1d4 | ||
| 666 | #define KEY_FN_F4 0x1d5 | ||
| 667 | #define KEY_FN_F5 0x1d6 | ||
| 668 | #define KEY_FN_F6 0x1d7 | ||
| 669 | #define KEY_FN_F7 0x1d8 | ||
| 670 | #define KEY_FN_F8 0x1d9 | ||
| 671 | #define KEY_FN_F9 0x1da | ||
| 672 | #define KEY_FN_F10 0x1db | ||
| 673 | #define KEY_FN_F11 0x1dc | ||
| 674 | #define KEY_FN_F12 0x1dd | ||
| 675 | #define KEY_FN_1 0x1de | ||
| 676 | #define KEY_FN_2 0x1df | ||
| 677 | #define KEY_FN_D 0x1e0 | ||
| 678 | #define KEY_FN_E 0x1e1 | ||
| 679 | #define KEY_FN_F 0x1e2 | ||
| 680 | #define KEY_FN_S 0x1e3 | ||
| 681 | #define KEY_FN_B 0x1e4 | ||
| 682 | |||
| 683 | #define KEY_BRL_DOT1 0x1f1 | ||
| 684 | #define KEY_BRL_DOT2 0x1f2 | ||
| 685 | #define KEY_BRL_DOT3 0x1f3 | ||
| 686 | #define KEY_BRL_DOT4 0x1f4 | ||
| 687 | #define KEY_BRL_DOT5 0x1f5 | ||
| 688 | #define KEY_BRL_DOT6 0x1f6 | ||
| 689 | #define KEY_BRL_DOT7 0x1f7 | ||
| 690 | #define KEY_BRL_DOT8 0x1f8 | ||
| 691 | #define KEY_BRL_DOT9 0x1f9 | ||
| 692 | #define KEY_BRL_DOT10 0x1fa | ||
| 693 | |||
| 694 | #define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ | ||
| 695 | #define KEY_NUMERIC_1 0x201 /* and other keypads */ | ||
| 696 | #define KEY_NUMERIC_2 0x202 | ||
| 697 | #define KEY_NUMERIC_3 0x203 | ||
| 698 | #define KEY_NUMERIC_4 0x204 | ||
| 699 | #define KEY_NUMERIC_5 0x205 | ||
| 700 | #define KEY_NUMERIC_6 0x206 | ||
| 701 | #define KEY_NUMERIC_7 0x207 | ||
| 702 | #define KEY_NUMERIC_8 0x208 | ||
| 703 | #define KEY_NUMERIC_9 0x209 | ||
| 704 | #define KEY_NUMERIC_STAR 0x20a | ||
| 705 | #define KEY_NUMERIC_POUND 0x20b | ||
| 706 | #define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ | ||
| 707 | #define KEY_NUMERIC_B 0x20d | ||
| 708 | #define KEY_NUMERIC_C 0x20e | ||
| 709 | #define KEY_NUMERIC_D 0x20f | ||
| 710 | |||
| 711 | #define KEY_CAMERA_FOCUS 0x210 | ||
| 712 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ | ||
| 713 | |||
| 714 | #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ | ||
| 715 | #define KEY_TOUCHPAD_ON 0x213 | ||
| 716 | #define KEY_TOUCHPAD_OFF 0x214 | ||
| 717 | |||
| 718 | #define KEY_CAMERA_ZOOMIN 0x215 | ||
| 719 | #define KEY_CAMERA_ZOOMOUT 0x216 | ||
| 720 | #define KEY_CAMERA_UP 0x217 | ||
| 721 | #define KEY_CAMERA_DOWN 0x218 | ||
| 722 | #define KEY_CAMERA_LEFT 0x219 | ||
| 723 | #define KEY_CAMERA_RIGHT 0x21a | ||
| 724 | |||
| 725 | #define KEY_ATTENDANT_ON 0x21b | ||
| 726 | #define KEY_ATTENDANT_OFF 0x21c | ||
| 727 | #define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ | ||
| 728 | #define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ | ||
| 729 | |||
| 730 | #define BTN_DPAD_UP 0x220 | ||
| 731 | #define BTN_DPAD_DOWN 0x221 | ||
| 732 | #define BTN_DPAD_LEFT 0x222 | ||
| 733 | #define BTN_DPAD_RIGHT 0x223 | ||
| 734 | |||
| 735 | #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ | ||
| 736 | |||
| 737 | #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ | ||
| 738 | #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ | ||
| 739 | #define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ | ||
| 740 | #define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ | ||
| 741 | #define KEY_APPSELECT 0x244 /* AL Select Task/Application */ | ||
| 742 | #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ | ||
| 743 | #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ | ||
| 744 | |||
| 745 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ | ||
| 746 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ | ||
| 747 | |||
| 748 | #define KEY_KBDINPUTASSIST_PREV 0x260 | ||
| 749 | #define KEY_KBDINPUTASSIST_NEXT 0x261 | ||
| 750 | #define KEY_KBDINPUTASSIST_PREVGROUP 0x262 | ||
| 751 | #define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 | ||
| 752 | #define KEY_KBDINPUTASSIST_ACCEPT 0x264 | ||
| 753 | #define KEY_KBDINPUTASSIST_CANCEL 0x265 | ||
| 754 | |||
| 755 | #define BTN_TRIGGER_HAPPY 0x2c0 | ||
| 756 | #define BTN_TRIGGER_HAPPY1 0x2c0 | ||
| 757 | #define BTN_TRIGGER_HAPPY2 0x2c1 | ||
| 758 | #define BTN_TRIGGER_HAPPY3 0x2c2 | ||
| 759 | #define BTN_TRIGGER_HAPPY4 0x2c3 | ||
| 760 | #define BTN_TRIGGER_HAPPY5 0x2c4 | ||
| 761 | #define BTN_TRIGGER_HAPPY6 0x2c5 | ||
| 762 | #define BTN_TRIGGER_HAPPY7 0x2c6 | ||
| 763 | #define BTN_TRIGGER_HAPPY8 0x2c7 | ||
| 764 | #define BTN_TRIGGER_HAPPY9 0x2c8 | ||
| 765 | #define BTN_TRIGGER_HAPPY10 0x2c9 | ||
| 766 | #define BTN_TRIGGER_HAPPY11 0x2ca | ||
| 767 | #define BTN_TRIGGER_HAPPY12 0x2cb | ||
| 768 | #define BTN_TRIGGER_HAPPY13 0x2cc | ||
| 769 | #define BTN_TRIGGER_HAPPY14 0x2cd | ||
| 770 | #define BTN_TRIGGER_HAPPY15 0x2ce | ||
| 771 | #define BTN_TRIGGER_HAPPY16 0x2cf | ||
| 772 | #define BTN_TRIGGER_HAPPY17 0x2d0 | ||
| 773 | #define BTN_TRIGGER_HAPPY18 0x2d1 | ||
| 774 | #define BTN_TRIGGER_HAPPY19 0x2d2 | ||
| 775 | #define BTN_TRIGGER_HAPPY20 0x2d3 | ||
| 776 | #define BTN_TRIGGER_HAPPY21 0x2d4 | ||
| 777 | #define BTN_TRIGGER_HAPPY22 0x2d5 | ||
| 778 | #define BTN_TRIGGER_HAPPY23 0x2d6 | ||
| 779 | #define BTN_TRIGGER_HAPPY24 0x2d7 | ||
| 780 | #define BTN_TRIGGER_HAPPY25 0x2d8 | ||
| 781 | #define BTN_TRIGGER_HAPPY26 0x2d9 | ||
| 782 | #define BTN_TRIGGER_HAPPY27 0x2da | ||
| 783 | #define BTN_TRIGGER_HAPPY28 0x2db | ||
| 784 | #define BTN_TRIGGER_HAPPY29 0x2dc | ||
| 785 | #define BTN_TRIGGER_HAPPY30 0x2dd | ||
| 786 | #define BTN_TRIGGER_HAPPY31 0x2de | ||
| 787 | #define BTN_TRIGGER_HAPPY32 0x2df | ||
| 788 | #define BTN_TRIGGER_HAPPY33 0x2e0 | ||
| 789 | #define BTN_TRIGGER_HAPPY34 0x2e1 | ||
| 790 | #define BTN_TRIGGER_HAPPY35 0x2e2 | ||
| 791 | #define BTN_TRIGGER_HAPPY36 0x2e3 | ||
| 792 | #define BTN_TRIGGER_HAPPY37 0x2e4 | ||
| 793 | #define BTN_TRIGGER_HAPPY38 0x2e5 | ||
| 794 | #define BTN_TRIGGER_HAPPY39 0x2e6 | ||
| 795 | #define BTN_TRIGGER_HAPPY40 0x2e7 | ||
| 796 | |||
| 797 | /* We avoid low common keys in module aliases so they don't get huge. */ | ||
| 798 | #define KEY_MIN_INTERESTING KEY_MUTE | ||
| 799 | #define KEY_MAX 0x2ff | ||
| 800 | #define KEY_CNT (KEY_MAX+1) | ||
| 801 | |||
| 802 | /* | ||
| 803 | * Relative axes | ||
| 804 | */ | ||
| 805 | |||
| 806 | #define REL_X 0x00 | ||
| 807 | #define REL_Y 0x01 | ||
| 808 | #define REL_Z 0x02 | ||
| 809 | #define REL_RX 0x03 | ||
| 810 | #define REL_RY 0x04 | ||
| 811 | #define REL_RZ 0x05 | ||
| 812 | #define REL_HWHEEL 0x06 | ||
| 813 | #define REL_DIAL 0x07 | ||
| 814 | #define REL_WHEEL 0x08 | ||
| 815 | #define REL_MISC 0x09 | ||
| 816 | #define REL_MAX 0x0f | ||
| 817 | #define REL_CNT (REL_MAX+1) | ||
| 818 | |||
| 819 | /* | ||
| 820 | * Absolute axes | ||
| 821 | */ | ||
| 822 | |||
| 823 | #define ABS_X 0x00 | ||
| 824 | #define ABS_Y 0x01 | ||
| 825 | #define ABS_Z 0x02 | ||
| 826 | #define ABS_RX 0x03 | ||
| 827 | #define ABS_RY 0x04 | ||
| 828 | #define ABS_RZ 0x05 | ||
| 829 | #define ABS_THROTTLE 0x06 | ||
| 830 | #define ABS_RUDDER 0x07 | ||
| 831 | #define ABS_WHEEL 0x08 | ||
| 832 | #define ABS_GAS 0x09 | ||
| 833 | #define ABS_BRAKE 0x0a | ||
| 834 | #define ABS_HAT0X 0x10 | ||
| 835 | #define ABS_HAT0Y 0x11 | ||
| 836 | #define ABS_HAT1X 0x12 | ||
| 837 | #define ABS_HAT1Y 0x13 | ||
| 838 | #define ABS_HAT2X 0x14 | ||
| 839 | #define ABS_HAT2Y 0x15 | ||
| 840 | #define ABS_HAT3X 0x16 | ||
| 841 | #define ABS_HAT3Y 0x17 | ||
| 842 | #define ABS_PRESSURE 0x18 | ||
| 843 | #define ABS_DISTANCE 0x19 | ||
| 844 | #define ABS_TILT_X 0x1a | ||
| 845 | #define ABS_TILT_Y 0x1b | ||
| 846 | #define ABS_TOOL_WIDTH 0x1c | ||
| 847 | |||
| 848 | #define ABS_VOLUME 0x20 | ||
| 849 | |||
| 850 | #define ABS_MISC 0x28 | ||
| 851 | |||
| 852 | #define ABS_MT_SLOT 0x2f /* MT slot being modified */ | ||
| 853 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | ||
| 854 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | ||
| 855 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | ||
| 856 | #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ | ||
| 857 | #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ | ||
| 858 | #define ABS_MT_POSITION_X 0x35 /* Center X touch position */ | ||
| 859 | #define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ | ||
| 860 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | ||
| 861 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | ||
| 862 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | ||
| 863 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | ||
| 864 | #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ | ||
| 865 | #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ | ||
| 866 | #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ | ||
| 867 | |||
| 868 | |||
| 869 | #define ABS_MAX 0x3f | ||
| 870 | #define ABS_CNT (ABS_MAX+1) | ||
| 871 | |||
| 872 | /* | ||
| 873 | * Switch events | ||
| 874 | */ | ||
| 875 | |||
| 876 | #define SW_LID 0x00 /* set = lid shut */ | ||
| 877 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ | ||
| 878 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ | ||
| 879 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" | ||
| 880 | set = radio enabled */ | ||
| 881 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | ||
| 882 | #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ | ||
| 883 | #define SW_DOCK 0x05 /* set = plugged into dock */ | ||
| 884 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ | ||
| 885 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ | ||
| 886 | #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ | ||
| 887 | #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ | ||
| 888 | #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ | ||
| 889 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ | ||
| 890 | #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ | ||
| 891 | #define SW_LINEIN_INSERT 0x0d /* set = inserted */ | ||
| 892 | #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ | ||
| 893 | #define SW_MAX 0x0f | ||
| 894 | #define SW_CNT (SW_MAX+1) | ||
| 895 | |||
| 896 | /* | ||
| 897 | * Misc events | ||
| 898 | */ | ||
| 899 | |||
| 900 | #define MSC_SERIAL 0x00 | ||
| 901 | #define MSC_PULSELED 0x01 | ||
| 902 | #define MSC_GESTURE 0x02 | ||
| 903 | #define MSC_RAW 0x03 | ||
| 904 | #define MSC_SCAN 0x04 | ||
| 905 | #define MSC_TIMESTAMP 0x05 | ||
| 906 | #define MSC_MAX 0x07 | ||
| 907 | #define MSC_CNT (MSC_MAX+1) | ||
| 908 | |||
| 909 | /* | ||
| 910 | * LEDs | ||
| 911 | */ | ||
| 912 | |||
| 913 | #define LED_NUML 0x00 | ||
| 914 | #define LED_CAPSL 0x01 | ||
| 915 | #define LED_SCROLLL 0x02 | ||
| 916 | #define LED_COMPOSE 0x03 | ||
| 917 | #define LED_KANA 0x04 | ||
| 918 | #define LED_SLEEP 0x05 | ||
| 919 | #define LED_SUSPEND 0x06 | ||
| 920 | #define LED_MUTE 0x07 | ||
| 921 | #define LED_MISC 0x08 | ||
| 922 | #define LED_MAIL 0x09 | ||
| 923 | #define LED_CHARGING 0x0a | ||
| 924 | #define LED_MAX 0x0f | ||
| 925 | #define LED_CNT (LED_MAX+1) | ||
| 926 | |||
| 927 | /* | ||
| 928 | * Autorepeat values | ||
| 929 | */ | 192 | */ |
| 193 | #define EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */ | ||
| 930 | 194 | ||
| 931 | #define REP_DELAY 0x00 | 195 | /** |
| 932 | #define REP_PERIOD 0x01 | 196 | * EVIOCSMASK - Set event mask |
| 933 | #define REP_MAX 0x01 | 197 | * |
| 934 | #define REP_CNT (REP_MAX+1) | 198 | * This ioctl is the counterpart to EVIOCGMASK. Instead of receiving the |
| 935 | 199 | * current event mask, this changes the client's event mask for a specific | |
| 936 | /* | 200 | * type. See EVIOCGMASK for a description of event-masks and the |
| 937 | * Sounds | 201 | * argument-type. |
| 202 | * | ||
| 203 | * This ioctl provides full forward compatibility. If the passed event type | ||
| 204 | * is unknown to the kernel, or if the number of event codes specified in | ||
| 205 | * the mask is bigger than what is known to the kernel, the ioctl is still | ||
| 206 | * accepted and applied. However, any unknown codes are left untouched and | ||
| 207 | * stay cleared. That means, the kernel always filters unknown codes | ||
| 208 | * regardless of what the client requests. If the new mask doesn't cover | ||
| 209 | * all known event-codes, all remaining codes are automatically cleared and | ||
| 210 | * thus filtered. | ||
| 211 | * | ||
| 212 | * This ioctl may fail with ENODEV in case the file is revoked. EFAULT is | ||
| 213 | * returned if the receive-buffer points to invalid memory. EINVAL is returned | ||
| 214 | * if the kernel does not implement the ioctl. | ||
| 938 | */ | 215 | */ |
| 216 | #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */ | ||
| 939 | 217 | ||
| 940 | #define SND_CLICK 0x00 | 218 | #define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ |
| 941 | #define SND_BELL 0x01 | ||
| 942 | #define SND_TONE 0x02 | ||
| 943 | #define SND_MAX 0x07 | ||
| 944 | #define SND_CNT (SND_MAX+1) | ||
| 945 | 219 | ||
| 946 | /* | 220 | /* |
| 947 | * IDs. | 221 | * IDs. |
| @@ -1200,6 +474,14 @@ struct ff_effect { · 252 unmodified lines | |||
| 1200 | #define FF_GAIN 0x60 | 474 | #define FF_GAIN 0x60 |
| 1201 | #define FF_AUTOCENTER 0x61 | 475 | #define FF_AUTOCENTER 0x61 |
| 1202 | 476 | ||
| 477 | /* | ||
| 478 | * ff->playback(effect_id = FF_GAIN) is the first effect_id to | ||
| 479 | * cause a collision with another ff method, in this case ff->set_gain(). | ||
| 480 | * Therefore the greatest safe value for effect_id is FF_GAIN - 1, | ||
| 481 | * and thus the total number of effects should never exceed FF_GAIN. | ||
| 482 | */ | ||
| 483 | #define FF_MAX_EFFECTS FF_GAIN | ||
| 484 | |||
| 1203 | #define FF_MAX 0x7f | 485 | #define FF_MAX 0x7f |
| 1204 | #define FF_CNT (FF_MAX+1) | 486 | #define FF_CNT (FF_MAX+1) |
| 1205 | 487 | ||
| @@ -183,6 +183,7 @@ struct kvm_s390_skeys { · 182 unmodified lines | |||
| 183 | #define KVM_EXIT_EPR 23 | 183 | #define KVM_EXIT_EPR 23 |
| 184 | #define KVM_EXIT_SYSTEM_EVENT 24 | 184 | #define KVM_EXIT_SYSTEM_EVENT 24 |
| 185 | #define KVM_EXIT_S390_STSI 25 | 185 | #define KVM_EXIT_S390_STSI 25 |
| 186 | #define KVM_EXIT_IOAPIC_EOI 26 | ||
| 186 | 187 | ||
| 187 | /* For KVM_EXIT_INTERNAL_ERROR */ | 188 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 188 | /* Emulate instruction failed. */ | 189 | /* Emulate instruction failed. */ |
| @@ -333,6 +334,10 @@ struct kvm_run { · 144 unmodified lines | |||
| 333 | __u8 sel1; | 334 | __u8 sel1; |
| 334 | __u16 sel2; | 335 | __u16 sel2; |
| 335 | } s390_stsi; | 336 | } s390_stsi; |
| 337 | /* KVM_EXIT_IOAPIC_EOI */ | ||
| 338 | struct { | ||
| 339 | __u8 vector; | ||
| 340 | } eoi; | ||
| 336 | /* Fix the size of the union. */ | 341 | /* Fix the size of the union. */ |
| 337 | char padding[256]; | 342 | char padding[256]; |
| 338 | }; | 343 | }; |
| @@ -824,6 +829,8 @@ struct kvm_ppc_smmu_info { · 485 unmodified lines | |||
| 824 | #define KVM_CAP_MULTI_ADDRESS_SPACE 118 | 829 | #define KVM_CAP_MULTI_ADDRESS_SPACE 118 |
| 825 | #define KVM_CAP_GUEST_DEBUG_HW_BPS 119 | 830 | #define KVM_CAP_GUEST_DEBUG_HW_BPS 119 |
| 826 | #define KVM_CAP_GUEST_DEBUG_HW_WPS 120 | 831 | #define KVM_CAP_GUEST_DEBUG_HW_WPS 120 |
| 832 | #define KVM_CAP_SPLIT_IRQCHIP 121 | ||
| 833 | #define KVM_CAP_IOEVENTFD_ANY_LENGTH 122 | ||
| 827 | 834 | ||
| 828 | #ifdef KVM_CAP_IRQ_ROUTING | 835 | #ifdef KVM_CAP_IRQ_ROUTING |
| 829 | 836 | ||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2015 CNEX Labs. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License version | ||
| 6 | * 2 as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, but | ||
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 11 | * General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program; see the file COPYING. If not, write to | ||
| 15 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, | ||
| 16 | * USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef _UAPI_LINUX_LIGHTNVM_H | ||
| 20 | #define _UAPI_LINUX_LIGHTNVM_H | ||
| 21 | |||
| 22 | #ifdef __KERNEL__ | ||
| 23 | #include <linux/kernel.h> | ||
| 24 | #include <linux/ioctl.h> | ||
| 25 | #else /* __KERNEL__ */ | ||
| 26 | #include <stdio.h> | ||
| 27 | #include <sys/ioctl.h> | ||
| 28 | #define DISK_NAME_LEN 32 | ||
| 29 | #endif /* __KERNEL__ */ | ||
| 30 | |||
| 31 | #include <linux/types.h> | ||
| 32 | #include <linux/ioctl.h> | ||
| 33 | |||
| 34 | #define NVM_TTYPE_NAME_MAX 48 | ||
| 35 | #define NVM_TTYPE_MAX 63 | ||
| 36 | |||
| 37 | #define NVM_CTRL_FILE "/dev/lightnvm/control" | ||
| 38 | |||
| 39 | struct nvm_ioctl_info_tgt { | ||
| 40 | __u32 version[3]; | ||
| 41 | __u32 reserved; | ||
| 42 | char tgtname[NVM_TTYPE_NAME_MAX]; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct nvm_ioctl_info { | ||
| 46 | __u32 version[3]; /* in/out - major, minor, patch */ | ||
| 47 | __u16 tgtsize; /* number of targets */ | ||
| 48 | __u16 reserved16; /* pad to 4K page */ | ||
| 49 | __u32 reserved[12]; | ||
| 50 | struct nvm_ioctl_info_tgt tgts[NVM_TTYPE_MAX]; | ||
| 51 | }; | ||
| 52 | |||
| 53 | enum { | ||
| 54 | NVM_DEVICE_ACTIVE = 1 << 0, | ||
| 55 | }; | ||
| 56 | |||
| 57 | struct nvm_ioctl_device_info { | ||
| 58 | char devname[DISK_NAME_LEN]; | ||
| 59 | char bmname[NVM_TTYPE_NAME_MAX]; | ||
| 60 | __u32 bmversion[3]; | ||
| 61 | __u32 flags; | ||
| 62 | __u32 reserved[8]; | ||
| 63 | }; | ||
| 64 | |||
| 65 | struct nvm_ioctl_get_devices { | ||
| 66 | __u32 nr_devices; | ||
| 67 | __u32 reserved[31]; | ||
| 68 | struct nvm_ioctl_device_info info[31]; | ||
| 69 | }; | ||
| 70 | |||
| 71 | struct nvm_ioctl_create_simple { | ||
| 72 | __u32 lun_begin; | ||
| 73 | __u32 lun_end; | ||
| 74 | }; | ||
| 75 | |||
| 76 | enum { | ||
| 77 | NVM_CONFIG_TYPE_SIMPLE = 0, | ||
| 78 | }; | ||
| 79 | |||
| 80 | struct nvm_ioctl_create_conf { | ||
| 81 | __u32 type; | ||
| 82 | union { | ||
| 83 | struct nvm_ioctl_create_simple s; | ||
| 84 | }; | ||
| 85 | }; | ||
| 86 | |||
| 87 | struct nvm_ioctl_create { | ||
| 88 | char dev[DISK_NAME_LEN]; /* open-channel SSD device */ | ||
| 89 | char tgttype[NVM_TTYPE_NAME_MAX]; /* target type name */ | ||
| 90 | char tgtname[DISK_NAME_LEN]; /* dev to expose target as */ | ||
| 91 | |||
| 92 | __u32 flags; | ||
| 93 | |||
| 94 | struct nvm_ioctl_create_conf conf; | ||
| 95 | }; | ||
| 96 | |||
| 97 | struct nvm_ioctl_remove { | ||
| 98 | char tgtname[DISK_NAME_LEN]; | ||
| 99 | |||
| 100 | __u32 flags; | ||
| 101 | }; | ||
| 102 | |||
| 103 | |||
| 104 | /* The ioctl type, 'L', 0x20 - 0x2F documented in ioctl-number.txt */ | ||
| 105 | enum { | ||
| 106 | /* top level cmds */ | ||
| 107 | NVM_INFO_CMD = 0x20, | ||
| 108 | NVM_GET_DEVICES_CMD, | ||
| 109 | |||
| 110 | /* device level cmds */ | ||
| 111 | NVM_DEV_CREATE_CMD, | ||
| 112 | NVM_DEV_REMOVE_CMD, | ||
| 113 | }; | ||
| 114 | |||
| 115 | #define NVM_IOCTL 'L' /* 0x4c */ | ||
| 116 | |||
| 117 | #define NVM_INFO _IOWR(NVM_IOCTL, NVM_INFO_CMD, \ | ||
| 118 | struct nvm_ioctl_info) | ||
| 119 | #define NVM_GET_DEVICES _IOR(NVM_IOCTL, NVM_GET_DEVICES_CMD, \ | ||
| 120 | struct nvm_ioctl_get_devices) | ||
| 121 | #define NVM_DEV_CREATE _IOW(NVM_IOCTL, NVM_DEV_CREATE_CMD, \ | ||
| 122 | struct nvm_ioctl_create) | ||
| 123 | #define NVM_DEV_REMOVE _IOW(NVM_IOCTL, NVM_DEV_REMOVE_CMD, \ | ||
| 124 | struct nvm_ioctl_remove) | ||
| 125 | |||
| 126 | #define NVM_VERSION_MAJOR 1 | ||
| 127 | #define NVM_VERSION_MINOR 0 | ||
| 128 | #define NVM_VERSION_PATCHLEVEL 0 | ||
| 129 | |||
| 130 | #endif | ||
| @@ -21,6 +21,7 @@ enum { · 20 unmodified lines | |||
| 21 | LO_FLAGS_READ_ONLY = 1, | 21 | LO_FLAGS_READ_ONLY = 1, |
| 22 | LO_FLAGS_AUTOCLEAR = 4, | 22 | LO_FLAGS_AUTOCLEAR = 4, |
| 23 | LO_FLAGS_PARTSCAN = 8, | 23 | LO_FLAGS_PARTSCAN = 8, |
| 24 | LO_FLAGS_DIRECT_IO = 16, | ||
| 24 | }; | 25 | }; |
| 25 | 26 | ||
| 26 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | 27 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ |
| @@ -86,6 +87,7 @@ struct loop_info64 { · 59 unmodified lines | |||
| 86 | #define LOOP_GET_STATUS64 0x4C05 | 87 | #define LOOP_GET_STATUS64 0x4C05 |
| 87 | #define LOOP_CHANGE_FD 0x4C06 | 88 | #define LOOP_CHANGE_FD 0x4C06 |
| 88 | #define LOOP_SET_CAPACITY 0x4C07 | 89 | #define LOOP_SET_CAPACITY 0x4C07 |
| 90 | #define LOOP_SET_DIRECT_IO 0x4C08 | ||
| 89 | 91 | ||
| 90 | /* /dev/loop-control interface */ | 92 | /* /dev/loop-control interface */ |
| 91 | #define LOOP_CTL_ADD 0x4C80 | 93 | #define LOOP_CTL_ADD 0x4C80 |
| @@ -75,5 +75,6 @@ · 74 unmodified lines | |||
| 75 | #define ANON_INODE_FS_MAGIC 0x09041934 | 75 | #define ANON_INODE_FS_MAGIC 0x09041934 |
| 76 | #define BTRFS_TEST_MAGIC 0x73727279 | 76 | #define BTRFS_TEST_MAGIC 0x73727279 |
| 77 | #define NSFS_MAGIC 0x6e736673 | 77 | #define NSFS_MAGIC 0x6e736673 |
| 78 | #define BPF_FS_MAGIC 0xcafe4a11 | ||
| 78 | 79 | ||
| 79 | #endif /* __LINUX_MAGIC_H__ */ | 80 | #endif /* __LINUX_MAGIC_H__ */ |
| @@ -75,12 +75,7 @@ struct mic_device_ctrl { · 74 unmodified lines | |||
| 75 | * struct mic_bootparam: Virtio device independent information in device page | 75 | * struct mic_bootparam: Virtio device independent information in device page |
| 76 | * | 76 | * |
| 77 | * @magic: A magic value used by the card to ensure it can see the host | 77 | * @magic: A magic value used by the card to ensure it can see the host |
| 78 | * @c2h_shutdown_db: Card to Host shutdown doorbell set by host | ||
| 79 | * @h2c_shutdown_db: Host to Card shutdown doorbell set by card | ||
| 80 | * @h2c_config_db: Host to Card Virtio config doorbell set by card | 78 | * @h2c_config_db: Host to Card Virtio config doorbell set by card |
| 81 | * @shutdown_status: Card shutdown status set by card | ||
| 82 | * @shutdown_card: Set to 1 by the host when a card shutdown is initiated | ||
| 83 | * @tot_nodes: Total number of nodes in the SCIF network | ||
| 84 | * @node_id: Unique id of the node | 79 | * @node_id: Unique id of the node |
| 85 | * @h2c_scif_db - Host to card SCIF doorbell set by card | 80 | * @h2c_scif_db - Host to card SCIF doorbell set by card |
| 86 | * @c2h_scif_db - Card to host SCIF doorbell set by host | 81 | * @c2h_scif_db - Card to host SCIF doorbell set by host |
| @@ -89,12 +84,7 @@ struct mic_device_ctrl { · 2 unmodified lines | |||
| 89 | */ | 84 | */ |
| 90 | struct mic_bootparam { | 85 | struct mic_bootparam { |
| 91 | __le32 magic; | 86 | __le32 magic; |
| 92 | __s8 c2h_shutdown_db; | ||
| 93 | __s8 h2c_shutdown_db; | ||
| 94 | __s8 h2c_config_db; | 87 | __s8 h2c_config_db; |
| 95 | __u8 shutdown_status; | ||
| 96 | __u8 shutdown_card; | ||
| 97 | __u8 tot_nodes; | ||
| 98 | __u8 node_id; | 88 | __u8 node_id; |
| 99 | __u8 h2c_scif_db; | 89 | __u8 h2c_scif_db; |
| 100 | __u8 c2h_scif_db; | 90 | __u8 c2h_scif_db; |
| @@ -219,12 +209,12 @@ static inline unsigned mic_total_desc_size(struct mic_device_desc *desc) · 118 unmodified lines | |||
| 219 | * enum mic_states - MIC states. | 209 | * enum mic_states - MIC states. |
| 220 | */ | 210 | */ |
| 221 | enum mic_states { | 211 | enum mic_states { |
| 222 | MIC_OFFLINE = 0, | 212 | MIC_READY = 0, |
| 213 | MIC_BOOTING, | ||
| 223 | MIC_ONLINE, | 214 | MIC_ONLINE, |
| 224 | MIC_SHUTTING_DOWN, | 215 | MIC_SHUTTING_DOWN, |
| 216 | MIC_RESETTING, | ||
| 225 | MIC_RESET_FAILED, | 217 | MIC_RESET_FAILED, |
| 226 | MIC_SUSPENDING, | ||
| 227 | MIC_SUSPENDED, | ||
| 228 | MIC_LAST | 218 | MIC_LAST |
| 229 | }; | 219 | }; |
| 230 | 220 | ||
| @@ -45,8 +45,24 @@ struct mmc_ioc_cmd { · 44 unmodified lines | |||
| 45 | }; | 45 | }; |
| 46 | #define mmc_ioc_cmd_set_data(ic, ptr) ic.data_ptr = (__u64)(unsigned long) ptr | 46 | #define mmc_ioc_cmd_set_data(ic, ptr) ic.data_ptr = (__u64)(unsigned long) ptr |
| 47 | 47 | ||
| 48 | #define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) | 48 | /** |
| 49 | * struct mmc_ioc_multi_cmd - multi command information | ||
| 50 | * @num_of_cmds: Number of commands to send. Must be equal to or less than | ||
| 51 | * MMC_IOC_MAX_CMDS. | ||
| 52 | * @cmds: Array of commands with length equal to 'num_of_cmds' | ||
| 53 | */ | ||
| 54 | struct mmc_ioc_multi_cmd { | ||
| 55 | __u64 num_of_cmds; | ||
| 56 | struct mmc_ioc_cmd cmds[0]; | ||
| 57 | }; | ||
| 49 | 58 | ||
| 59 | #define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) | ||
| 60 | /* | ||
| 61 | * MMC_IOC_MULTI_CMD: Used to send an array of MMC commands described by | ||
| 62 | * the structure mmc_ioc_multi_cmd. The MMC driver will issue all | ||
| 63 | * commands in array in sequence to card. | ||
| 64 | */ | ||
| 65 | #define MMC_IOC_MULTI_CMD _IOWR(MMC_BLOCK_MAJOR, 1, struct mmc_ioc_multi_cmd) | ||
| 50 | /* | 66 | /* |
| 51 | * Since this ioctl is only meant to enhance (and not replace) normal access | 67 | * Since this ioctl is only meant to enhance (and not replace) normal access |
| 52 | * to the mmc bus device, an upper data transfer limit of MMC_IOC_MAX_BYTES | 68 | * to the mmc bus device, an upper data transfer limit of MMC_IOC_MAX_BYTES |
| @@ -54,4 +70,5 @@ struct mmc_ioc_cmd { · 1 unmodified line | |||
| 54 | * block device operations. | 70 | * block device operations. |
| 55 | */ | 71 | */ |
| 56 | #define MMC_IOC_MAX_BYTES (512L * 256) | 72 | #define MMC_IOC_MAX_BYTES (512L * 256) |
| 73 | #define MMC_IOC_MAX_CMDS 255 | ||
| 57 | #endif /* LINUX_MMC_IOCTL_H */ | 74 | #endif /* LINUX_MMC_IOCTL_H */ |
| @@ -51,6 +51,8 @@ enum nfulnl_attr_type { · 50 unmodified lines | |||
| 51 | NFULA_HWTYPE, /* hardware type */ | 51 | NFULA_HWTYPE, /* hardware type */ |
| 52 | NFULA_HWHEADER, /* hardware header */ | 52 | NFULA_HWHEADER, /* hardware header */ |
| 53 | NFULA_HWLEN, /* hardware header length */ | 53 | NFULA_HWLEN, /* hardware header length */ |
| 54 | NFULA_CT, /* nf_conntrack_netlink.h */ | ||
| 55 | NFULA_CT_INFO, /* enum ip_conntrack_info */ | ||
| 54 | 56 | ||
| 55 | __NFULA_MAX | 57 | __NFULA_MAX |
| 56 | }; | 58 | }; |
| @@ -93,5 +95,6 @@ enum nfulnl_attr_config { · 36 unmodified lines | |||
| 93 | 95 | ||
| 94 | #define NFULNL_CFG_F_SEQ 0x0001 | 96 | #define NFULNL_CFG_F_SEQ 0x0001 |
| 95 | #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 | 97 | #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 |
| 98 | #define NFULNL_CFG_F_CONNTRACK 0x0004 | ||
| 96 | 99 | ||
| 97 | #endif /* _NFNETLINK_LOG_H */ | 100 | #endif /* _NFNETLINK_LOG_H */ |
| @@ -54,6 +54,7 @@ struct nlmsghdr { · 53 unmodified lines | |||
| 54 | #define NLM_F_ACK 4 /* Reply with ack, with zero or error code */ | 54 | #define NLM_F_ACK 4 /* Reply with ack, with zero or error code */ |
| 55 | #define NLM_F_ECHO 8 /* Echo this request */ | 55 | #define NLM_F_ECHO 8 /* Echo this request */ |
| 56 | #define NLM_F_DUMP_INTR 16 /* Dump was inconsistent due to sequence change */ | 56 | #define NLM_F_DUMP_INTR 16 /* Dump was inconsistent due to sequence change */ |
| 57 | #define NLM_F_DUMP_FILTERED 32 /* Dump was filtered as requested */ | ||
| 57 | 58 | ||
| 58 | /* Modifiers to GET request */ | 59 | /* Modifiers to GET request */ |
| 59 | #define NLM_F_ROOT 0x100 /* specify tree root */ | 60 | #define NLM_F_ROOT 0x100 /* specify tree root */ |
| @@ -86,6 +86,7 @@ · 85 unmodified lines | |||
| 86 | * for this event is the application ID (AID). | 86 | * for this event is the application ID (AID). |
| 87 | * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller. | 87 | * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller. |
| 88 | * @NFC_CMD_SE_IO: Send/Receive APDUs to/from the selected secure element. | 88 | * @NFC_CMD_SE_IO: Send/Receive APDUs to/from the selected secure element. |
| 89 | * @NFC_CMD_ACTIVATE_TARGET: Request NFC controller to reactivate target. | ||
| 89 | * @NFC_CMD_VENDOR: Vendor specific command, to be implemented directly | 90 | * @NFC_CMD_VENDOR: Vendor specific command, to be implemented directly |
| 90 | * from the driver in order to support hardware specific operations. | 91 | * from the driver in order to support hardware specific operations. |
| 91 | */ | 92 | */ |
| @@ -156,6 +157,7 @@ enum nfc_commands { · 64 unmodified lines | |||
| 156 | * @NFC_ATTR_APDU: Secure element APDU | 157 | * @NFC_ATTR_APDU: Secure element APDU |
| 157 | * @NFC_ATTR_TARGET_ISO15693_DSFID: ISO 15693 Data Storage Format Identifier | 158 | * @NFC_ATTR_TARGET_ISO15693_DSFID: ISO 15693 Data Storage Format Identifier |
| 158 | * @NFC_ATTR_TARGET_ISO15693_UID: ISO 15693 Unique Identifier | 159 | * @NFC_ATTR_TARGET_ISO15693_UID: ISO 15693 Unique Identifier |
| 160 | * @NFC_ATTR_SE_PARAMS: Parameters data from an evt_transaction | ||
| 159 | * @NFC_ATTR_VENDOR_ID: NFC manufacturer unique ID, typically an OUI | 161 | * @NFC_ATTR_VENDOR_ID: NFC manufacturer unique ID, typically an OUI |
| 160 | * @NFC_ATTR_VENDOR_SUBCMD: Vendor specific sub command | 162 | * @NFC_ATTR_VENDOR_SUBCMD: Vendor specific sub command |
| 161 | * @NFC_ATTR_VENDOR_DATA: Vendor specific data, to be optionally passed | 163 | * @NFC_ATTR_VENDOR_DATA: Vendor specific data, to be optionally passed |
| @@ -7,6 +7,8 @@ · 6 unmodified lines | |||
| 7 | #ifndef _UAPI_LINUX_NFS_H | 7 | #ifndef _UAPI_LINUX_NFS_H |
| 8 | #define _UAPI_LINUX_NFS_H | 8 | #define _UAPI_LINUX_NFS_H |
| 9 | 9 | ||
| 10 | #include <linux/types.h> | ||
| 11 | |||
| 10 | #define NFS_PROGRAM 100003 | 12 | #define NFS_PROGRAM 100003 |
| 11 | #define NFS_PORT 2049 | 13 | #define NFS_PORT 2049 |
| 12 | #define NFS_MAXDATA 8192 | 14 | #define NFS_MAXDATA 8192 |
| @@ -31,6 +33,17 @@ · 18 unmodified lines | |||
| 31 | 33 | ||
| 32 | #define NFS_PIPE_DIRNAME "nfs" | 34 | #define NFS_PIPE_DIRNAME "nfs" |
| 33 | 35 | ||
| 36 | /* NFS ioctls */ | ||
| 37 | /* Let's follow btrfs lead on CLONE to avoid messing userspace */ | ||
| 38 | #define NFS_IOC_CLONE _IOW(0x94, 9, int) | ||
| 39 | #define NFS_IOC_CLONE_RANGE _IOW(0x94, 13, int) | ||
| 40 | |||
| 41 | struct nfs_ioctl_clone_range_args { | ||
| 42 | __s64 src_fd; | ||
| 43 | __u64 src_off, count; | ||
| 44 | __u64 dst_off; | ||
| 45 | }; | ||
| 46 | |||
| 34 | /* | 47 | /* |
| 35 | * NFS stats. The good thing with these values is that NFSv3 errors are | 48 | * NFS stats. The good thing with these values is that NFSv3 errors are |
| 36 | * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which | 49 | * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | |||
| 10 | * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com> | 10 | * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com> |
| 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> | 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> |
| 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> | 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> |
| 13 | * Copyright 2015 Intel Deutschland GmbH | ||
| 13 | * | 14 | * |
| 14 | * Permission to use, copy, modify, and/or distribute this software for any | 15 | * Permission to use, copy, modify, and/or distribute this software for any |
| 15 | * purpose with or without fee is hereby granted, provided that the above | 16 | * purpose with or without fee is hereby granted, provided that the above |
| @@ -328,7 +329,15 @@ · 312 unmodified lines | |||
| 328 | * partial scan results may be available | 329 | * partial scan results may be available |
| 329 | * | 330 | * |
| 330 | * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain | 331 | * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain |
| 331 | * intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL. | 332 | * intervals and certain number of cycles, as specified by |
| 333 | * %NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is | ||
| 334 | * not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified, | ||
| 335 | * scheduled scan will run in an infinite loop with the specified interval. | ||
| 336 | * These attributes are mutually exculsive, | ||
| 337 | * i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if | ||
| 338 | * NL80211_ATTR_SCHED_SCAN_PLANS is defined. | ||
| 339 | * If for some reason scheduled scan is aborted by the driver, all scan | ||
| 340 | * plans are canceled (including scan plans that did not start yet). | ||
| 332 | * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS) | 341 | * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS) |
| 333 | * are passed, they are used in the probe requests. For | 342 | * are passed, they are used in the probe requests. For |
| 334 | * broadcast, a broadcast SSID must be passed (ie. an empty | 343 | * broadcast, a broadcast SSID must be passed (ie. an empty |
| @@ -1761,6 +1770,19 @@ enum nl80211_commands { · 1426 unmodified lines | |||
| 1761 | * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device | 1770 | * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device |
| 1762 | * is operating in an indoor environment. | 1771 | * is operating in an indoor environment. |
| 1763 | * | 1772 | * |
| 1773 | * @NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS: maximum number of scan plans for | ||
| 1774 | * scheduled scan supported by the device (u32), a wiphy attribute. | ||
| 1775 | * @NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL: maximum interval (in seconds) for | ||
| 1776 | * a scan plan (u32), a wiphy attribute. | ||
| 1777 | * @NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS: maximum number of iterations in | ||
| 1778 | * a scan plan (u32), a wiphy attribute. | ||
| 1779 | * @NL80211_ATTR_SCHED_SCAN_PLANS: a list of scan plans for scheduled scan. | ||
| 1780 | * Each scan plan defines the number of scan iterations and the interval | ||
| 1781 | * between scans. The last scan plan will always run infinitely, | ||
| 1782 | * thus it must not specify the number of iterations, only the interval | ||
| 1783 | * between scans. The scan plans are executed sequentially. | ||
| 1784 | * Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan. | ||
| 1785 | * | ||
| 1764 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 1786 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 1765 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1787 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1766 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1788 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2130,6 +2152,11 @@ enum nl80211_attrs { · 363 unmodified lines | |||
| 2130 | 2152 | ||
| 2131 | NL80211_ATTR_REG_INDOOR, | 2153 | NL80211_ATTR_REG_INDOOR, |
| 2132 | 2154 | ||
| 2155 | NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS, | ||
| 2156 | NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL, | ||
| 2157 | NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS, | ||
| 2158 | NL80211_ATTR_SCHED_SCAN_PLANS, | ||
| 2159 | |||
| 2133 | /* add attributes here, update the policy in nl80211.c */ | 2160 | /* add attributes here, update the policy in nl80211.c */ |
| 2134 | 2161 | ||
| 2135 | __NL80211_ATTR_AFTER_LAST, | 2162 | __NL80211_ATTR_AFTER_LAST, |
| @@ -3364,6 +3391,9 @@ enum nl80211_bss_scan_width { · 1228 unmodified lines | |||
| 3364 | * (not present if no beacon frame has been received yet) | 3391 | * (not present if no beacon frame has been received yet) |
| 3365 | * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and | 3392 | * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and |
| 3366 | * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) | 3393 | * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) |
| 3394 | * @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry | ||
| 3395 | * was last updated by a received frame. The value is expected to be | ||
| 3396 | * accurate to about 10ms. (u64, nanoseconds) | ||
| 3367 | * @__NL80211_BSS_AFTER_LAST: internal | 3397 | * @__NL80211_BSS_AFTER_LAST: internal |
| 3368 | * @NL80211_BSS_MAX: highest BSS attribute | 3398 | * @NL80211_BSS_MAX: highest BSS attribute |
| 3369 | */ | 3399 | */ |
| @@ -3383,6 +3413,7 @@ enum nl80211_bss { · 13 unmodified lines | |||
| 3383 | NL80211_BSS_CHAN_WIDTH, | 3413 | NL80211_BSS_CHAN_WIDTH, |
| 3384 | NL80211_BSS_BEACON_TSF, | 3414 | NL80211_BSS_BEACON_TSF, |
| 3385 | NL80211_BSS_PRESP_DATA, | 3415 | NL80211_BSS_PRESP_DATA, |
| 3416 | NL80211_BSS_LAST_SEEN_BOOTTIME, | ||
| 3386 | 3417 | ||
| 3387 | /* keep last */ | 3418 | /* keep last */ |
| 3388 | __NL80211_BSS_AFTER_LAST, | 3419 | __NL80211_BSS_AFTER_LAST, |
| @@ -4589,4 +4620,28 @@ enum nl80211_tdls_peer_capability { · 1200 unmodified lines | |||
| 4589 | NL80211_TDLS_PEER_WMM = 1<<2, | 4620 | NL80211_TDLS_PEER_WMM = 1<<2, |
| 4590 | }; | 4621 | }; |
| 4591 | 4622 | ||
| 4623 | /** | ||
| 4624 | * enum nl80211_sched_scan_plan - scanning plan for scheduled scan | ||
| 4625 | * @__NL80211_SCHED_SCAN_PLAN_INVALID: attribute number 0 is reserved | ||
| 4626 | * @NL80211_SCHED_SCAN_PLAN_INTERVAL: interval between scan iterations. In | ||
| 4627 | * seconds (u32). | ||
| 4628 | * @NL80211_SCHED_SCAN_PLAN_ITERATIONS: number of scan iterations in this | ||
| 4629 | * scan plan (u32). The last scan plan must not specify this attribute | ||
| 4630 | * because it will run infinitely. A value of zero is invalid as it will | ||
| 4631 | * make the scan plan meaningless. | ||
| 4632 | * @NL80211_SCHED_SCAN_PLAN_MAX: highest scheduled scan plan attribute number | ||
| 4633 | * currently defined | ||
| 4634 | * @__NL80211_SCHED_SCAN_PLAN_AFTER_LAST: internal use | ||
| 4635 | */ | ||
| 4636 | enum nl80211_sched_scan_plan { | ||
| 4637 | __NL80211_SCHED_SCAN_PLAN_INVALID, | ||
| 4638 | NL80211_SCHED_SCAN_PLAN_INTERVAL, | ||
| 4639 | NL80211_SCHED_SCAN_PLAN_ITERATIONS, | ||
| 4640 | |||
| 4641 | /* keep last */ | ||
| 4642 | __NL80211_SCHED_SCAN_PLAN_AFTER_LAST, | ||
| 4643 | NL80211_SCHED_SCAN_PLAN_MAX = | ||
| 4644 | __NL80211_SCHED_SCAN_PLAN_AFTER_LAST - 1 | ||
| 4645 | }; | ||
| 4646 | |||
| 4592 | #endif /* __LINUX_NL80211_H */ | 4647 | #endif /* __LINUX_NL80211_H */ |
| @@ -1,589 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Definitions for the NVM Express interface | ||
| 3 | * Copyright (c) 2011-2014, Intel Corporation. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms and conditions of the GNU General Public License, | ||
| 7 | * version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _UAPI_LINUX_NVME_H | ||
| 16 | #define _UAPI_LINUX_NVME_H | ||
| 17 | |||
| 18 | #include <linux/types.h> | ||
| 19 | |||
| 20 | struct nvme_id_power_state { | ||
| 21 | __le16 max_power; /* centiwatts */ | ||
| 22 | __u8 rsvd2; | ||
| 23 | __u8 flags; | ||
| 24 | __le32 entry_lat; /* microseconds */ | ||
| 25 | __le32 exit_lat; /* microseconds */ | ||
| 26 | __u8 read_tput; | ||
| 27 | __u8 read_lat; | ||
| 28 | __u8 write_tput; | ||
| 29 | __u8 write_lat; | ||
| 30 | __le16 idle_power; | ||
| 31 | __u8 idle_scale; | ||
| 32 | __u8 rsvd19; | ||
| 33 | __le16 active_power; | ||
| 34 | __u8 active_work_scale; | ||
| 35 | __u8 rsvd23[9]; | ||
| 36 | }; | ||
| 37 | |||
| 38 | enum { | ||
| 39 | NVME_PS_FLAGS_MAX_POWER_SCALE = 1 << 0, | ||
| 40 | NVME_PS_FLAGS_NON_OP_STATE = 1 << 1, | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct nvme_id_ctrl { | ||
| 44 | __le16 vid; | ||
| 45 | __le16 ssvid; | ||
| 46 | char sn[20]; | ||
| 47 | char mn[40]; | ||
| 48 | char fr[8]; | ||
| 49 | __u8 rab; | ||
| 50 | __u8 ieee[3]; | ||
| 51 | __u8 mic; | ||
| 52 | __u8 mdts; | ||
| 53 | __u16 cntlid; | ||
| 54 | __u32 ver; | ||
| 55 | __u8 rsvd84[172]; | ||
| 56 | __le16 oacs; | ||
| 57 | __u8 acl; | ||
| 58 | __u8 aerl; | ||
| 59 | __u8 frmw; | ||
| 60 | __u8 lpa; | ||
| 61 | __u8 elpe; | ||
| 62 | __u8 npss; | ||
| 63 | __u8 avscc; | ||
| 64 | __u8 apsta; | ||
| 65 | __le16 wctemp; | ||
| 66 | __le16 cctemp; | ||
| 67 | __u8 rsvd270[242]; | ||
| 68 | __u8 sqes; | ||
| 69 | __u8 cqes; | ||
| 70 | __u8 rsvd514[2]; | ||
| 71 | __le32 nn; | ||
| 72 | __le16 oncs; | ||
| 73 | __le16 fuses; | ||
| 74 | __u8 fna; | ||
| 75 | __u8 vwc; | ||
| 76 | __le16 awun; | ||
| 77 | __le16 awupf; | ||
| 78 | __u8 nvscc; | ||
| 79 | __u8 rsvd531; | ||
| 80 | __le16 acwu; | ||
| 81 | __u8 rsvd534[2]; | ||
| 82 | __le32 sgls; | ||
| 83 | __u8 rsvd540[1508]; | ||
| 84 | struct nvme_id_power_state psd[32]; | ||
| 85 | __u8 vs[1024]; | ||
| 86 | }; | ||
| 87 | |||
| 88 | enum { | ||
| 89 | NVME_CTRL_ONCS_COMPARE = 1 << 0, | ||
| 90 | NVME_CTRL_ONCS_WRITE_UNCORRECTABLE = 1 << 1, | ||
| 91 | NVME_CTRL_ONCS_DSM = 1 << 2, | ||
| 92 | NVME_CTRL_VWC_PRESENT = 1 << 0, | ||
| 93 | }; | ||
| 94 | |||
| 95 | struct nvme_lbaf { | ||
| 96 | __le16 ms; | ||
| 97 | __u8 ds; | ||
| 98 | __u8 rp; | ||
| 99 | }; | ||
| 100 | |||
| 101 | struct nvme_id_ns { | ||
| 102 | __le64 nsze; | ||
| 103 | __le64 ncap; | ||
| 104 | __le64 nuse; | ||
| 105 | __u8 nsfeat; | ||
| 106 | __u8 nlbaf; | ||
| 107 | __u8 flbas; | ||
| 108 | __u8 mc; | ||
| 109 | __u8 dpc; | ||
| 110 | __u8 dps; | ||
| 111 | __u8 nmic; | ||
| 112 | __u8 rescap; | ||
| 113 | __u8 fpi; | ||
| 114 | __u8 rsvd33; | ||
| 115 | __le16 nawun; | ||
| 116 | __le16 nawupf; | ||
| 117 | __le16 nacwu; | ||
| 118 | __le16 nabsn; | ||
| 119 | __le16 nabo; | ||
| 120 | __le16 nabspf; | ||
| 121 | __u16 rsvd46; | ||
| 122 | __le64 nvmcap[2]; | ||
| 123 | __u8 rsvd64[40]; | ||
| 124 | __u8 nguid[16]; | ||
| 125 | __u8 eui64[8]; | ||
| 126 | struct nvme_lbaf lbaf[16]; | ||
| 127 | __u8 rsvd192[192]; | ||
| 128 | __u8 vs[3712]; | ||
| 129 | }; | ||
| 130 | |||
| 131 | enum { | ||
| 132 | NVME_NS_FEAT_THIN = 1 << 0, | ||
| 133 | NVME_NS_FLBAS_LBA_MASK = 0xf, | ||
| 134 | NVME_NS_FLBAS_META_EXT = 0x10, | ||
| 135 | NVME_LBAF_RP_BEST = 0, | ||
| 136 | NVME_LBAF_RP_BETTER = 1, | ||
| 137 | NVME_LBAF_RP_GOOD = 2, | ||
| 138 | NVME_LBAF_RP_DEGRADED = 3, | ||
| 139 | NVME_NS_DPC_PI_LAST = 1 << 4, | ||
| 140 | NVME_NS_DPC_PI_FIRST = 1 << 3, | ||
| 141 | NVME_NS_DPC_PI_TYPE3 = 1 << 2, | ||
| 142 | NVME_NS_DPC_PI_TYPE2 = 1 << 1, | ||
| 143 | NVME_NS_DPC_PI_TYPE1 = 1 << 0, | ||
| 144 | NVME_NS_DPS_PI_FIRST = 1 << 3, | ||
| 145 | NVME_NS_DPS_PI_MASK = 0x7, | ||
| 146 | NVME_NS_DPS_PI_TYPE1 = 1, | ||
| 147 | NVME_NS_DPS_PI_TYPE2 = 2, | ||
| 148 | NVME_NS_DPS_PI_TYPE3 = 3, | ||
| 149 | }; | ||
| 150 | |||
| 151 | struct nvme_smart_log { | ||
| 152 | __u8 critical_warning; | ||
| 153 | __u8 temperature[2]; | ||
| 154 | __u8 avail_spare; | ||
| 155 | __u8 spare_thresh; | ||
| 156 | __u8 percent_used; | ||
| 157 | __u8 rsvd6[26]; | ||
| 158 | __u8 data_units_read[16]; | ||
| 159 | __u8 data_units_written[16]; | ||
| 160 | __u8 host_reads[16]; | ||
| 161 | __u8 host_writes[16]; | ||
| 162 | __u8 ctrl_busy_time[16]; | ||
| 163 | __u8 power_cycles[16]; | ||
| 164 | __u8 power_on_hours[16]; | ||
| 165 | __u8 unsafe_shutdowns[16]; | ||
| 166 | __u8 media_errors[16]; | ||
| 167 | __u8 num_err_log_entries[16]; | ||
| 168 | __le32 warning_temp_time; | ||
| 169 | __le32 critical_comp_time; | ||
| 170 | __le16 temp_sensor[8]; | ||
| 171 | __u8 rsvd216[296]; | ||
| 172 | }; | ||
| 173 | |||
| 174 | enum { | ||
| 175 | NVME_SMART_CRIT_SPARE = 1 << 0, | ||
| 176 | NVME_SMART_CRIT_TEMPERATURE = 1 << 1, | ||
| 177 | NVME_SMART_CRIT_RELIABILITY = 1 << 2, | ||
| 178 | NVME_SMART_CRIT_MEDIA = 1 << 3, | ||
| 179 | NVME_SMART_CRIT_VOLATILE_MEMORY = 1 << 4, | ||
| 180 | }; | ||
| 181 | |||
| 182 | enum { | ||
| 183 | NVME_AER_NOTICE_NS_CHANGED = 0x0002, | ||
| 184 | }; | ||
| 185 | |||
| 186 | struct nvme_lba_range_type { | ||
| 187 | __u8 type; | ||
| 188 | __u8 attributes; | ||
| 189 | __u8 rsvd2[14]; | ||
| 190 | __u64 slba; | ||
| 191 | __u64 nlb; | ||
| 192 | __u8 guid[16]; | ||
| 193 | __u8 rsvd48[16]; | ||
| 194 | }; | ||
| 195 | |||
| 196 | enum { | ||
| 197 | NVME_LBART_TYPE_FS = 0x01, | ||
| 198 | NVME_LBART_TYPE_RAID = 0x02, | ||
| 199 | NVME_LBART_TYPE_CACHE = 0x03, | ||
| 200 | NVME_LBART_TYPE_SWAP = 0x04, | ||
| 201 | |||
| 202 | NVME_LBART_ATTRIB_TEMP = 1 << 0, | ||
| 203 | NVME_LBART_ATTRIB_HIDE = 1 << 1, | ||
| 204 | }; | ||
| 205 | |||
| 206 | struct nvme_reservation_status { | ||
| 207 | __le32 gen; | ||
| 208 | __u8 rtype; | ||
| 209 | __u8 regctl[2]; | ||
| 210 | __u8 resv5[2]; | ||
| 211 | __u8 ptpls; | ||
| 212 | __u8 resv10[13]; | ||
| 213 | struct { | ||
| 214 | __le16 cntlid; | ||
| 215 | __u8 rcsts; | ||
| 216 | __u8 resv3[5]; | ||
| 217 | __le64 hostid; | ||
| 218 | __le64 rkey; | ||
| 219 | } regctl_ds[]; | ||
| 220 | }; | ||
| 221 | |||
| 222 | /* I/O commands */ | ||
| 223 | |||
| 224 | enum nvme_opcode { | ||
| 225 | nvme_cmd_flush = 0x00, | ||
| 226 | nvme_cmd_write = 0x01, | ||
| 227 | nvme_cmd_read = 0x02, | ||
| 228 | nvme_cmd_write_uncor = 0x04, | ||
| 229 | nvme_cmd_compare = 0x05, | ||
| 230 | nvme_cmd_write_zeroes = 0x08, | ||
| 231 | nvme_cmd_dsm = 0x09, | ||
| 232 | nvme_cmd_resv_register = 0x0d, | ||
| 233 | nvme_cmd_resv_report = 0x0e, | ||
| 234 | nvme_cmd_resv_acquire = 0x11, | ||
| 235 | nvme_cmd_resv_release = 0x15, | ||
| 236 | }; | ||
| 237 | |||
| 238 | struct nvme_common_command { | ||
| 239 | __u8 opcode; | ||
| 240 | __u8 flags; | ||
| 241 | __u16 command_id; | ||
| 242 | __le32 nsid; | ||
| 243 | __le32 cdw2[2]; | ||
| 244 | __le64 metadata; | ||
| 245 | __le64 prp1; | ||
| 246 | __le64 prp2; | ||
| 247 | __le32 cdw10[6]; | ||
| 248 | }; | ||
| 249 | |||
| 250 | struct nvme_rw_command { | ||
| 251 | __u8 opcode; | ||
| 252 | __u8 flags; | ||
| 253 | __u16 command_id; | ||
| 254 | __le32 nsid; | ||
| 255 | __u64 rsvd2; | ||
| 256 | __le64 metadata; | ||
| 257 | __le64 prp1; | ||
| 258 | __le64 prp2; | ||
| 259 | __le64 slba; | ||
| 260 | __le16 length; | ||
| 261 | __le16 control; | ||
| 262 | __le32 dsmgmt; | ||
| 263 | __le32 reftag; | ||
| 264 | __le16 apptag; | ||
| 265 | __le16 appmask; | ||
| 266 | }; | ||
| 267 | |||
| 268 | enum { | ||
| 269 | NVME_RW_LR = 1 << 15, | ||
| 270 | NVME_RW_FUA = 1 << 14, | ||
| 271 | NVME_RW_DSM_FREQ_UNSPEC = 0, | ||
| 272 | NVME_RW_DSM_FREQ_TYPICAL = 1, | ||
| 273 | NVME_RW_DSM_FREQ_RARE = 2, | ||
| 274 | NVME_RW_DSM_FREQ_READS = 3, | ||
| 275 | NVME_RW_DSM_FREQ_WRITES = 4, | ||
| 276 | NVME_RW_DSM_FREQ_RW = 5, | ||
| 277 | NVME_RW_DSM_FREQ_ONCE = 6, | ||
| 278 | NVME_RW_DSM_FREQ_PREFETCH = 7, | ||
| 279 | NVME_RW_DSM_FREQ_TEMP = 8, | ||
| 280 | NVME_RW_DSM_LATENCY_NONE = 0 << 4, | ||
| 281 | NVME_RW_DSM_LATENCY_IDLE = 1 << 4, | ||
| 282 | NVME_RW_DSM_LATENCY_NORM = 2 << 4, | ||
| 283 | NVME_RW_DSM_LATENCY_LOW = 3 << 4, | ||
| 284 | NVME_RW_DSM_SEQ_REQ = 1 << 6, | ||
| 285 | NVME_RW_DSM_COMPRESSED = 1 << 7, | ||
| 286 | NVME_RW_PRINFO_PRCHK_REF = 1 << 10, | ||
| 287 | NVME_RW_PRINFO_PRCHK_APP = 1 << 11, | ||
| 288 | NVME_RW_PRINFO_PRCHK_GUARD = 1 << 12, | ||
| 289 | NVME_RW_PRINFO_PRACT = 1 << 13, | ||
| 290 | }; | ||
| 291 | |||
| 292 | struct nvme_dsm_cmd { | ||
| 293 | __u8 opcode; | ||
| 294 | __u8 flags; | ||
| 295 | __u16 command_id; | ||
| 296 | __le32 nsid; | ||
| 297 | __u64 rsvd2[2]; | ||
| 298 | __le64 prp1; | ||
| 299 | __le64 prp2; | ||
| 300 | __le32 nr; | ||
| 301 | __le32 attributes; | ||
| 302 | __u32 rsvd12[4]; | ||
| 303 | }; | ||
| 304 | |||
| 305 | enum { | ||
| 306 | NVME_DSMGMT_IDR = 1 << 0, | ||
| 307 | NVME_DSMGMT_IDW = 1 << 1, | ||
| 308 | NVME_DSMGMT_AD = 1 << 2, | ||
| 309 | }; | ||
| 310 | |||
| 311 | struct nvme_dsm_range { | ||
| 312 | __le32 cattr; | ||
| 313 | __le32 nlb; | ||
| 314 | __le64 slba; | ||
| 315 | }; | ||
| 316 | |||
| 317 | /* Admin commands */ | ||
| 318 | |||
| 319 | enum nvme_admin_opcode { | ||
| 320 | nvme_admin_delete_sq = 0x00, | ||
| 321 | nvme_admin_create_sq = 0x01, | ||
| 322 | nvme_admin_get_log_page = 0x02, | ||
| 323 | nvme_admin_delete_cq = 0x04, | ||
| 324 | nvme_admin_create_cq = 0x05, | ||
| 325 | nvme_admin_identify = 0x06, | ||
| 326 | nvme_admin_abort_cmd = 0x08, | ||
| 327 | nvme_admin_set_features = 0x09, | ||
| 328 | nvme_admin_get_features = 0x0a, | ||
| 329 | nvme_admin_async_event = 0x0c, | ||
| 330 | nvme_admin_activate_fw = 0x10, | ||
| 331 | nvme_admin_download_fw = 0x11, | ||
| 332 | nvme_admin_format_nvm = 0x80, | ||
| 333 | nvme_admin_security_send = 0x81, | ||
| 334 | nvme_admin_security_recv = 0x82, | ||
| 335 | }; | ||
| 336 | |||
| 337 | enum { | ||
| 338 | NVME_QUEUE_PHYS_CONTIG = (1 << 0), | ||
| 339 | NVME_CQ_IRQ_ENABLED = (1 << 1), | ||
| 340 | NVME_SQ_PRIO_URGENT = (0 << 1), | ||
| 341 | NVME_SQ_PRIO_HIGH = (1 << 1), | ||
| 342 | NVME_SQ_PRIO_MEDIUM = (2 << 1), | ||
| 343 | NVME_SQ_PRIO_LOW = (3 << 1), | ||
| 344 | NVME_FEAT_ARBITRATION = 0x01, | ||
| 345 | NVME_FEAT_POWER_MGMT = 0x02, | ||
| 346 | NVME_FEAT_LBA_RANGE = 0x03, | ||
| 347 | NVME_FEAT_TEMP_THRESH = 0x04, | ||
| 348 | NVME_FEAT_ERR_RECOVERY = 0x05, | ||
| 349 | NVME_FEAT_VOLATILE_WC = 0x06, | ||
| 350 | NVME_FEAT_NUM_QUEUES = 0x07, | ||
| 351 | NVME_FEAT_IRQ_COALESCE = 0x08, | ||
| 352 | NVME_FEAT_IRQ_CONFIG = 0x09, | ||
| 353 | NVME_FEAT_WRITE_ATOMIC = 0x0a, | ||
| 354 | NVME_FEAT_ASYNC_EVENT = 0x0b, | ||
| 355 | NVME_FEAT_AUTO_PST = 0x0c, | ||
| 356 | NVME_FEAT_SW_PROGRESS = 0x80, | ||
| 357 | NVME_FEAT_HOST_ID = 0x81, | ||
| 358 | NVME_FEAT_RESV_MASK = 0x82, | ||
| 359 | NVME_FEAT_RESV_PERSIST = 0x83, | ||
| 360 | NVME_LOG_ERROR = 0x01, | ||
| 361 | NVME_LOG_SMART = 0x02, | ||
| 362 | NVME_LOG_FW_SLOT = 0x03, | ||
| 363 | NVME_LOG_RESERVATION = 0x80, | ||
| 364 | NVME_FWACT_REPL = (0 << 3), | ||
| 365 | NVME_FWACT_REPL_ACTV = (1 << 3), | ||
| 366 | NVME_FWACT_ACTV = (2 << 3), | ||
| 367 | }; | ||
| 368 | |||
| 369 | struct nvme_identify { | ||
| 370 | __u8 opcode; | ||
| 371 | __u8 flags; | ||
| 372 | __u16 command_id; | ||
| 373 | __le32 nsid; | ||
| 374 | __u64 rsvd2[2]; | ||
| 375 | __le64 prp1; | ||
| 376 | __le64 prp2; | ||
| 377 | __le32 cns; | ||
| 378 | __u32 rsvd11[5]; | ||
| 379 | }; | ||
| 380 | |||
| 381 | struct nvme_features { | ||
| 382 | __u8 opcode; | ||
| 383 | __u8 flags; | ||
| 384 | __u16 command_id; | ||
| 385 | __le32 nsid; | ||
| 386 | __u64 rsvd2[2]; | ||
| 387 | __le64 prp1; | ||
| 388 | __le64 prp2; | ||
| 389 | __le32 fid; | ||
| 390 | __le32 dword11; | ||
| 391 | __u32 rsvd12[4]; | ||
| 392 | }; | ||
| 393 | |||
| 394 | struct nvme_create_cq { | ||
| 395 | __u8 opcode; | ||
| 396 | __u8 flags; | ||
| 397 | __u16 command_id; | ||
| 398 | __u32 rsvd1[5]; | ||
| 399 | __le64 prp1; | ||
| 400 | __u64 rsvd8; | ||
| 401 | __le16 cqid; | ||
| 402 | __le16 qsize; | ||
| 403 | __le16 cq_flags; | ||
| 404 | __le16 irq_vector; | ||
| 405 | __u32 rsvd12[4]; | ||
| 406 | }; | ||
| 407 | |||
| 408 | struct nvme_create_sq { | ||
| 409 | __u8 opcode; | ||
| 410 | __u8 flags; | ||
| 411 | __u16 command_id; | ||
| 412 | __u32 rsvd1[5]; | ||
| 413 | __le64 prp1; | ||
| 414 | __u64 rsvd8; | ||
| 415 | __le16 sqid; | ||
| 416 | __le16 qsize; | ||
| 417 | __le16 sq_flags; | ||
| 418 | __le16 cqid; | ||
| 419 | __u32 rsvd12[4]; | ||
| 420 | }; | ||
| 421 | |||
| 422 | struct nvme_delete_queue { | ||
| 423 | __u8 opcode; | ||
| 424 | __u8 flags; | ||
| 425 | __u16 command_id; | ||
| 426 | __u32 rsvd1[9]; | ||
| 427 | __le16 qid; | ||
| 428 | __u16 rsvd10; | ||
| 429 | __u32 rsvd11[5]; | ||
| 430 | }; | ||
| 431 | |||
| 432 | struct nvme_abort_cmd { | ||
| 433 | __u8 opcode; | ||
| 434 | __u8 flags; | ||
| 435 | __u16 command_id; | ||
| 436 | __u32 rsvd1[9]; | ||
| 437 | __le16 sqid; | ||
| 438 | __u16 cid; | ||
| 439 | __u32 rsvd11[5]; | ||
| 440 | }; | ||
| 441 | |||
| 442 | struct nvme_download_firmware { | ||
| 443 | __u8 opcode; | ||
| 444 | __u8 flags; | ||
| 445 | __u16 command_id; | ||
| 446 | __u32 rsvd1[5]; | ||
| 447 | __le64 prp1; | ||
| 448 | __le64 prp2; | ||
| 449 | __le32 numd; | ||
| 450 | __le32 offset; | ||
| 451 | __u32 rsvd12[4]; | ||
| 452 | }; | ||
| 453 | |||
| 454 | struct nvme_format_cmd { | ||
| 455 | __u8 opcode; | ||
| 456 | __u8 flags; | ||
| 457 | __u16 command_id; | ||
| 458 | __le32 nsid; | ||
| 459 | __u64 rsvd2[4]; | ||
| 460 | __le32 cdw10; | ||
| 461 | __u32 rsvd11[5]; | ||
| 462 | }; | ||
| 463 | |||
| 464 | struct nvme_command { | ||
| 465 | union { | ||
| 466 | struct nvme_common_command common; | ||
| 467 | struct nvme_rw_command rw; | ||
| 468 | struct nvme_identify identify; | ||
| 469 | struct nvme_features features; | ||
| 470 | struct nvme_create_cq create_cq; | ||
| 471 | struct nvme_create_sq create_sq; | ||
| 472 | struct nvme_delete_queue delete_queue; | ||
| 473 | struct nvme_download_firmware dlfw; | ||
| 474 | struct nvme_format_cmd format; | ||
| 475 | struct nvme_dsm_cmd dsm; | ||
| 476 | struct nvme_abort_cmd abort; | ||
| 477 | }; | ||
| 478 | }; | ||
| 479 | |||
| 480 | enum { | ||
| 481 | NVME_SC_SUCCESS = 0x0, | ||
| 482 | NVME_SC_INVALID_OPCODE = 0x1, | ||
| 483 | NVME_SC_INVALID_FIELD = 0x2, | ||
| 484 | NVME_SC_CMDID_CONFLICT = 0x3, | ||
| 485 | NVME_SC_DATA_XFER_ERROR = 0x4, | ||
| 486 | NVME_SC_POWER_LOSS = 0x5, | ||
| 487 | NVME_SC_INTERNAL = 0x6, | ||
| 488 | NVME_SC_ABORT_REQ = 0x7, | ||
| 489 | NVME_SC_ABORT_QUEUE = 0x8, | ||
| 490 | NVME_SC_FUSED_FAIL = 0x9, | ||
| 491 | NVME_SC_FUSED_MISSING = 0xa, | ||
| 492 | NVME_SC_INVALID_NS = 0xb, | ||
| 493 | NVME_SC_CMD_SEQ_ERROR = 0xc, | ||
| 494 | NVME_SC_SGL_INVALID_LAST = 0xd, | ||
| 495 | NVME_SC_SGL_INVALID_COUNT = 0xe, | ||
| 496 | NVME_SC_SGL_INVALID_DATA = 0xf, | ||
| 497 | NVME_SC_SGL_INVALID_METADATA = 0x10, | ||
| 498 | NVME_SC_SGL_INVALID_TYPE = 0x11, | ||
| 499 | NVME_SC_LBA_RANGE = 0x80, | ||
| 500 | NVME_SC_CAP_EXCEEDED = 0x81, | ||
| 501 | NVME_SC_NS_NOT_READY = 0x82, | ||
| 502 | NVME_SC_RESERVATION_CONFLICT = 0x83, | ||
| 503 | NVME_SC_CQ_INVALID = 0x100, | ||
| 504 | NVME_SC_QID_INVALID = 0x101, | ||
| 505 | NVME_SC_QUEUE_SIZE = 0x102, | ||
| 506 | NVME_SC_ABORT_LIMIT = 0x103, | ||
| 507 | NVME_SC_ABORT_MISSING = 0x104, | ||
| 508 | NVME_SC_ASYNC_LIMIT = 0x105, | ||
| 509 | NVME_SC_FIRMWARE_SLOT = 0x106, | ||
| 510 | NVME_SC_FIRMWARE_IMAGE = 0x107, | ||
| 511 | NVME_SC_INVALID_VECTOR = 0x108, | ||
| 512 | NVME_SC_INVALID_LOG_PAGE = 0x109, | ||
| 513 | NVME_SC_INVALID_FORMAT = 0x10a, | ||
| 514 | NVME_SC_FIRMWARE_NEEDS_RESET = 0x10b, | ||
| 515 | NVME_SC_INVALID_QUEUE = 0x10c, | ||
| 516 | NVME_SC_FEATURE_NOT_SAVEABLE = 0x10d, | ||
| 517 | NVME_SC_FEATURE_NOT_CHANGEABLE = 0x10e, | ||
| 518 | NVME_SC_FEATURE_NOT_PER_NS = 0x10f, | ||
| 519 | NVME_SC_FW_NEEDS_RESET_SUBSYS = 0x110, | ||
| 520 | NVME_SC_BAD_ATTRIBUTES = 0x180, | ||
| 521 | NVME_SC_INVALID_PI = 0x181, | ||
| 522 | NVME_SC_READ_ONLY = 0x182, | ||
| 523 | NVME_SC_WRITE_FAULT = 0x280, | ||
| 524 | NVME_SC_READ_ERROR = 0x281, | ||
| 525 | NVME_SC_GUARD_CHECK = 0x282, | ||
| 526 | NVME_SC_APPTAG_CHECK = 0x283, | ||
| 527 | NVME_SC_REFTAG_CHECK = 0x284, | ||
| 528 | NVME_SC_COMPARE_FAILED = 0x285, | ||
| 529 | NVME_SC_ACCESS_DENIED = 0x286, | ||
| 530 | NVME_SC_DNR = 0x4000, | ||
| 531 | }; | ||
| 532 | |||
| 533 | struct nvme_completion { | ||
| 534 | __le32 result; /* Used by admin commands to return data */ | ||
| 535 | __u32 rsvd; | ||
| 536 | __le16 sq_head; /* how much of this queue may be reclaimed */ | ||
| 537 | __le16 sq_id; /* submission queue that generated this entry */ | ||
| 538 | __u16 command_id; /* of the command which completed */ | ||
| 539 | __le16 status; /* did the command fail, and if so, why? */ | ||
| 540 | }; | ||
| 541 | |||
| 542 | struct nvme_user_io { | ||
| 543 | __u8 opcode; | ||
| 544 | __u8 flags; | ||
| 545 | __u16 control; | ||
| 546 | __u16 nblocks; | ||
| 547 | __u16 rsvd; | ||
| 548 | __u64 metadata; | ||
| 549 | __u64 addr; | ||
| 550 | __u64 slba; | ||
| 551 | __u32 dsmgmt; | ||
| 552 | __u32 reftag; | ||
| 553 | __u16 apptag; | ||
| 554 | __u16 appmask; | ||
| 555 | }; | ||
| 556 | |||
| 557 | struct nvme_passthru_cmd { | ||
| 558 | __u8 opcode; | ||
| 559 | __u8 flags; | ||
| 560 | __u16 rsvd1; | ||
| 561 | __u32 nsid; | ||
| 562 | __u32 cdw2; | ||
| 563 | __u32 cdw3; | ||
| 564 | __u64 metadata; | ||
| 565 | __u64 addr; | ||
| 566 | __u32 metadata_len; | ||
| 567 | __u32 data_len; | ||
| 568 | __u32 cdw10; | ||
| 569 | __u32 cdw11; | ||
| 570 | __u32 cdw12; | ||
| 571 | __u32 cdw13; | ||
| 572 | __u32 cdw14; | ||
| 573 | __u32 cdw15; | ||
| 574 | __u32 timeout_ms; | ||
| 575 | __u32 result; | ||
| 576 | }; | ||
| 577 | |||
| 578 | #define NVME_VS(major, minor) (((major) << 16) | ((minor) << 8)) | ||
| 579 | |||
| 580 | #define nvme_admin_cmd nvme_passthru_cmd | ||
| 581 | |||
| 582 | #define NVME_IOCTL_ID _IO('N', 0x40) | ||
| 583 | #define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) | ||
| 584 | #define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) | ||
| 585 | #define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd) | ||
| 586 | #define NVME_IOCTL_RESET _IO('N', 0x44) | ||
| 587 | #define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45) | ||
| 588 | |||
| 589 | #endif /* _UAPI_LINUX_NVME_H */ | ||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* | ||
| 2 | * Definitions for the NVM Express ioctl interface | ||
| 3 | * Copyright (c) 2011-2014, Intel Corporation. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms and conditions of the GNU General Public License, | ||
| 7 | * version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _UAPI_LINUX_NVME_IOCTL_H | ||
| 16 | #define _UAPI_LINUX_NVME_IOCTL_H | ||
| 17 | |||
| 18 | #include <linux/types.h> | ||
| 19 | |||
| 20 | struct nvme_user_io { | ||
| 21 | __u8 opcode; | ||
| 22 | __u8 flags; | ||
| 23 | __u16 control; | ||
| 24 | __u16 nblocks; | ||
| 25 | __u16 rsvd; | ||
| 26 | __u64 metadata; | ||
| 27 | __u64 addr; | ||
| 28 | __u64 slba; | ||
| 29 | __u32 dsmgmt; | ||
| 30 | __u32 reftag; | ||
| 31 | __u16 apptag; | ||
| 32 | __u16 appmask; | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct nvme_passthru_cmd { | ||
| 36 | __u8 opcode; | ||
| 37 | __u8 flags; | ||
| 38 | __u16 rsvd1; | ||
| 39 | __u32 nsid; | ||
| 40 | __u32 cdw2; | ||
| 41 | __u32 cdw3; | ||
| 42 | __u64 metadata; | ||
| 43 | __u64 addr; | ||
| 44 | __u32 metadata_len; | ||
| 45 | __u32 data_len; | ||
| 46 | __u32 cdw10; | ||
| 47 | __u32 cdw11; | ||
| 48 | __u32 cdw12; | ||
| 49 | __u32 cdw13; | ||
| 50 | __u32 cdw14; | ||
| 51 | __u32 cdw15; | ||
| 52 | __u32 timeout_ms; | ||
| 53 | __u32 result; | ||
| 54 | }; | ||
| 55 | |||
| 56 | #define nvme_admin_cmd nvme_passthru_cmd | ||
| 57 | |||
| 58 | #define NVME_IOCTL_ID _IO('N', 0x40) | ||
| 59 | #define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) | ||
| 60 | #define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) | ||
| 61 | #define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd) | ||
| 62 | #define NVME_IOCTL_RESET _IO('N', 0x44) | ||
| 63 | #define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45) | ||
| 64 | |||
| 65 | #endif /* _UAPI_LINUX_NVME_IOCTL_H */ | ||
| @@ -323,10 +323,10 @@ enum ovs_key_attr { · 322 unmodified lines | |||
| 323 | OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls. | 323 | OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls. |
| 324 | * The implementation may restrict | 324 | * The implementation may restrict |
| 325 | * the accepted length of the array. */ | 325 | * the accepted length of the array. */ |
| 326 | OVS_KEY_ATTR_CT_STATE, /* u8 bitmask of OVS_CS_F_* */ | 326 | OVS_KEY_ATTR_CT_STATE, /* u32 bitmask of OVS_CS_F_* */ |
| 327 | OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */ | 327 | OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */ |
| 328 | OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */ | 328 | OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */ |
| 329 | OVS_KEY_ATTR_CT_LABEL, /* 16-octet connection tracking label */ | 329 | OVS_KEY_ATTR_CT_LABELS, /* 16-octet connection tracking label */ |
| 330 | 330 | ||
| 331 | #ifdef __KERNEL__ | 331 | #ifdef __KERNEL__ |
| 332 | OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */ | 332 | OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */ |
| @@ -349,6 +349,8 @@ enum ovs_tunnel_key_attr { · 16 unmodified lines | |||
| 349 | OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ | 349 | OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ |
| 350 | OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */ | 350 | OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */ |
| 351 | OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS, /* Nested OVS_VXLAN_EXT_* */ | 351 | OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS, /* Nested OVS_VXLAN_EXT_* */ |
| 352 | OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */ | ||
| 353 | OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ | ||
| 352 | __OVS_TUNNEL_KEY_ATTR_MAX | 354 | __OVS_TUNNEL_KEY_ATTR_MAX |
| 353 | }; | 355 | }; |
| 354 | 356 | ||
| @@ -439,9 +441,9 @@ struct ovs_key_nd { · 84 unmodified lines | |||
| 439 | __u8 nd_tll[ETH_ALEN]; | 441 | __u8 nd_tll[ETH_ALEN]; |
| 440 | }; | 442 | }; |
| 441 | 443 | ||
| 442 | #define OVS_CT_LABEL_LEN 16 | 444 | #define OVS_CT_LABELS_LEN 16 |
| 443 | struct ovs_key_ct_label { | 445 | struct ovs_key_ct_labels { |
| 444 | __u8 ct_label[OVS_CT_LABEL_LEN]; | 446 | __u8 ct_labels[OVS_CT_LABELS_LEN]; |
| 445 | }; | 447 | }; |
| 446 | 448 | ||
| 447 | /* OVS_KEY_ATTR_CT_STATE flags */ | 449 | /* OVS_KEY_ATTR_CT_STATE flags */ |
| @@ -449,9 +451,9 @@ struct ovs_key_ct_label { · 1 unmodified line | |||
| 449 | #define OVS_CS_F_ESTABLISHED 0x02 /* Part of an existing connection. */ | 451 | #define OVS_CS_F_ESTABLISHED 0x02 /* Part of an existing connection. */ |
| 450 | #define OVS_CS_F_RELATED 0x04 /* Related to an established | 452 | #define OVS_CS_F_RELATED 0x04 /* Related to an established |
| 451 | * connection. */ | 453 | * connection. */ |
| 452 | #define OVS_CS_F_INVALID 0x20 /* Could not track connection. */ | 454 | #define OVS_CS_F_REPLY_DIR 0x08 /* Flow is in the reply direction. */ |
| 453 | #define OVS_CS_F_REPLY_DIR 0x40 /* Flow is in the reply direction. */ | 455 | #define OVS_CS_F_INVALID 0x10 /* Could not track connection. */ |
| 454 | #define OVS_CS_F_TRACKED 0x80 /* Conntrack has occurred. */ | 456 | #define OVS_CS_F_TRACKED 0x20 /* Conntrack has occurred. */ |
| 455 | 457 | ||
| 456 | /** | 458 | /** |
| 457 | * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. | 459 | * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. |
| @@ -618,22 +620,25 @@ struct ovs_action_hash { · 160 unmodified lines | |||
| 618 | 620 | ||
| 619 | /** | 621 | /** |
| 620 | * enum ovs_ct_attr - Attributes for %OVS_ACTION_ATTR_CT action. | 622 | * enum ovs_ct_attr - Attributes for %OVS_ACTION_ATTR_CT action. |
| 621 | * @OVS_CT_ATTR_FLAGS: u32 connection tracking flags. | 623 | * @OVS_CT_ATTR_COMMIT: If present, commits the connection to the conntrack |
| 624 | * table. This allows future packets for the same connection to be identified | ||
| 625 | * as 'established' or 'related'. The flow key for the current packet will | ||
| 626 | * retain the pre-commit connection state. | ||
| 622 | * @OVS_CT_ATTR_ZONE: u16 connection tracking zone. | 627 | * @OVS_CT_ATTR_ZONE: u16 connection tracking zone. |
| 623 | * @OVS_CT_ATTR_MARK: u32 value followed by u32 mask. For each bit set in the | 628 | * @OVS_CT_ATTR_MARK: u32 value followed by u32 mask. For each bit set in the |
| 624 | * mask, the corresponding bit in the value is copied to the connection | 629 | * mask, the corresponding bit in the value is copied to the connection |
| 625 | * tracking mark field in the connection. | 630 | * tracking mark field in the connection. |
| 626 | * @OVS_CT_ATTR_LABEL: %OVS_CT_LABEL_LEN value followed by %OVS_CT_LABEL_LEN | 631 | * @OVS_CT_ATTR_LABEL: %OVS_CT_LABELS_LEN value followed by %OVS_CT_LABELS_LEN |
| 627 | * mask. For each bit set in the mask, the corresponding bit in the value is | 632 | * mask. For each bit set in the mask, the corresponding bit in the value is |
| 628 | * copied to the connection tracking label field in the connection. | 633 | * copied to the connection tracking label field in the connection. |
| 629 | * @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG. | 634 | * @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG. |
| 630 | */ | 635 | */ |
| 631 | enum ovs_ct_attr { | 636 | enum ovs_ct_attr { |
| 632 | OVS_CT_ATTR_UNSPEC, | 637 | OVS_CT_ATTR_UNSPEC, |
| 633 | OVS_CT_ATTR_FLAGS, /* u8 bitmask of OVS_CT_F_*. */ | 638 | OVS_CT_ATTR_COMMIT, /* No argument, commits connection. */ |
| 634 | OVS_CT_ATTR_ZONE, /* u16 zone id. */ | 639 | OVS_CT_ATTR_ZONE, /* u16 zone id. */ |
| 635 | OVS_CT_ATTR_MARK, /* mark to associate with this connection. */ | 640 | OVS_CT_ATTR_MARK, /* mark to associate with this connection. */ |
| 636 | OVS_CT_ATTR_LABEL, /* label to associate with this connection. */ | 641 | OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */ |
| 637 | OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of | 642 | OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of |
| 638 | related connections. */ | 643 | related connections. */ |
| 639 | __OVS_CT_ATTR_MAX | 644 | __OVS_CT_ATTR_MAX |
| @@ -641,14 +646,6 @@ enum ovs_ct_attr { · 1 unmodified line | |||
| 641 | 646 | ||
| 642 | #define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1) | 647 | #define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1) |
| 643 | 648 | ||
| 644 | /* | ||
| 645 | * OVS_CT_ATTR_FLAGS flags - bitmask of %OVS_CT_F_* | ||
| 646 | * @OVS_CT_F_COMMIT: Commits the flow to the conntrack table. This allows | ||
| 647 | * future packets for the same connection to be identified as 'established' | ||
| 648 | * or 'related'. | ||
| 649 | */ | ||
| 650 | #define OVS_CT_F_COMMIT 0x01 | ||
| 651 | |||
| 652 | /** | 649 | /** |
| 653 | * enum ovs_action_attr - Action types. | 650 | * enum ovs_action_attr - Action types. |
| 654 | * | 651 | * |
| @@ -705,7 +702,7 @@ enum ovs_action_attr { · 50 unmodified lines | |||
| 705 | * data immediately followed by a mask. | 702 | * data immediately followed by a mask. |
| 706 | * The data must be zero for the unmasked | 703 | * The data must be zero for the unmasked |
| 707 | * bits. */ | 704 | * bits. */ |
| 708 | OVS_ACTION_ATTR_CT, /* One nested OVS_CT_ATTR_* . */ | 705 | OVS_ACTION_ATTR_CT, /* Nested OVS_CT_ATTR_* . */ |
| 709 | 706 | ||
| 710 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted | 707 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted |
| 711 | * from userspace. */ | 708 | * from userspace. */ |
| @@ -216,7 +216,8 @@ · 215 unmodified lines | |||
| 216 | #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ | 216 | #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ |
| 217 | #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ | 217 | #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ |
| 218 | #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ | 218 | #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ |
| 219 | #define PCI_CAP_ID_MAX PCI_CAP_ID_AF | 219 | #define PCI_CAP_ID_EA 0x14 /* PCI Enhanced Allocation */ |
| 220 | #define PCI_CAP_ID_MAX PCI_CAP_ID_EA | ||
| 220 | #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ | 221 | #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ |
| 221 | #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ | 222 | #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ |
| 222 | #define PCI_CAP_SIZEOF 4 | 223 | #define PCI_CAP_SIZEOF 4 |
| @@ -353,6 +354,46 @@ · 130 unmodified lines | |||
| 353 | #define PCI_AF_STATUS_TP 0x01 | 354 | #define PCI_AF_STATUS_TP 0x01 |
| 354 | #define PCI_CAP_AF_SIZEOF 6 /* size of AF registers */ | 355 | #define PCI_CAP_AF_SIZEOF 6 /* size of AF registers */ |
| 355 | 356 | ||
| 357 | /* PCI Enhanced Allocation registers */ | ||
| 358 | |||
| 359 | #define PCI_EA_NUM_ENT 2 /* Number of Capability Entries */ | ||
| 360 | #define PCI_EA_NUM_ENT_MASK 0x3f /* Num Entries Mask */ | ||
| 361 | #define PCI_EA_FIRST_ENT 4 /* First EA Entry in List */ | ||
| 362 | #define PCI_EA_FIRST_ENT_BRIDGE 8 /* First EA Entry for Bridges */ | ||
| 363 | #define PCI_EA_ES 0x00000007 /* Entry Size */ | ||
| 364 | #define PCI_EA_BEI 0x000000f0 /* BAR Equivalent Indicator */ | ||
| 365 | /* 0-5 map to BARs 0-5 respectively */ | ||
| 366 | #define PCI_EA_BEI_BAR0 0 | ||
| 367 | #define PCI_EA_BEI_BAR5 5 | ||
| 368 | #define PCI_EA_BEI_BRIDGE 6 /* Resource behind bridge */ | ||
| 369 | #define PCI_EA_BEI_ENI 7 /* Equivalent Not Indicated */ | ||
| 370 | #define PCI_EA_BEI_ROM 8 /* Expansion ROM */ | ||
| 371 | /* 9-14 map to VF BARs 0-5 respectively */ | ||
| 372 | #define PCI_EA_BEI_VF_BAR0 9 | ||
| 373 | #define PCI_EA_BEI_VF_BAR5 14 | ||
| 374 | #define PCI_EA_BEI_RESERVED 15 /* Reserved - Treat like ENI */ | ||
| 375 | #define PCI_EA_PP 0x0000ff00 /* Primary Properties */ | ||
| 376 | #define PCI_EA_SP 0x00ff0000 /* Secondary Properties */ | ||
| 377 | #define PCI_EA_P_MEM 0x00 /* Non-Prefetch Memory */ | ||
| 378 | #define PCI_EA_P_MEM_PREFETCH 0x01 /* Prefetchable Memory */ | ||
| 379 | #define PCI_EA_P_IO 0x02 /* I/O Space */ | ||
| 380 | #define PCI_EA_P_VF_MEM_PREFETCH 0x03 /* VF Prefetchable Memory */ | ||
| 381 | #define PCI_EA_P_VF_MEM 0x04 /* VF Non-Prefetch Memory */ | ||
| 382 | #define PCI_EA_P_BRIDGE_MEM 0x05 /* Bridge Non-Prefetch Memory */ | ||
| 383 | #define PCI_EA_P_BRIDGE_MEM_PREFETCH 0x06 /* Bridge Prefetchable Memory */ | ||
| 384 | #define PCI_EA_P_BRIDGE_IO 0x07 /* Bridge I/O Space */ | ||
| 385 | /* 0x08-0xfc reserved */ | ||
| 386 | #define PCI_EA_P_MEM_RESERVED 0xfd /* Reserved Memory */ | ||
| 387 | #define PCI_EA_P_IO_RESERVED 0xfe /* Reserved I/O Space */ | ||
| 388 | #define PCI_EA_P_UNAVAILABLE 0xff /* Entry Unavailable */ | ||
| 389 | #define PCI_EA_WRITABLE 0x40000000 /* Writable: 1 = RW, 0 = HwInit */ | ||
| 390 | #define PCI_EA_ENABLE 0x80000000 /* Enable for this entry */ | ||
| 391 | #define PCI_EA_BASE 4 /* Base Address Offset */ | ||
| 392 | #define PCI_EA_MAX_OFFSET 8 /* MaxOffset (resource length) */ | ||
| 393 | /* bit 0 is reserved */ | ||
| 394 | #define PCI_EA_IS_64 0x00000002 /* 64-bit field flag */ | ||
| 395 | #define PCI_EA_FIELD_MASK 0xfffffffc /* For Base & Max Offset */ | ||
| 396 | |||
| 356 | /* PCI-X registers (Type 0 (non-bridge) devices) */ | 397 | /* PCI-X registers (Type 0 (non-bridge) devices) */ |
| 357 | 398 | ||
| 358 | #define PCI_X_CMD 2 /* Modes & Features */ | 399 | #define PCI_X_CMD 2 /* Modes & Features */ |
| @@ -110,6 +110,7 @@ enum perf_sw_ids { · 109 unmodified lines | |||
| 110 | PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, | 110 | PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, |
| 111 | PERF_COUNT_SW_EMULATION_FAULTS = 8, | 111 | PERF_COUNT_SW_EMULATION_FAULTS = 8, |
| 112 | PERF_COUNT_SW_DUMMY = 9, | 112 | PERF_COUNT_SW_DUMMY = 9, |
| 113 | PERF_COUNT_SW_BPF_OUTPUT = 10, | ||
| 113 | 114 | ||
| 114 | PERF_COUNT_SW_MAX, /* non-ABI */ | 115 | PERF_COUNT_SW_MAX, /* non-ABI */ |
| 115 | }; | 116 | }; |
| @@ -168,6 +169,7 @@ enum perf_branch_sample_type_shift { · 52 unmodified lines | |||
| 168 | 169 | ||
| 169 | PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 11, /* call/ret stack */ | 170 | PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 11, /* call/ret stack */ |
| 170 | PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 12, /* indirect jumps */ | 171 | PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 12, /* indirect jumps */ |
| 172 | PERF_SAMPLE_BRANCH_CALL_SHIFT = 13, /* direct call */ | ||
| 171 | 173 | ||
| 172 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ | 174 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ |
| 173 | }; | 175 | }; |
| @@ -188,6 +190,7 @@ enum perf_branch_sample_type { · 14 unmodified lines | |||
| 188 | 190 | ||
| 189 | PERF_SAMPLE_BRANCH_CALL_STACK = 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, | 191 | PERF_SAMPLE_BRANCH_CALL_STACK = 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, |
| 190 | PERF_SAMPLE_BRANCH_IND_JUMP = 1U << PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT, | 192 | PERF_SAMPLE_BRANCH_IND_JUMP = 1U << PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT, |
| 193 | PERF_SAMPLE_BRANCH_CALL = 1U << PERF_SAMPLE_BRANCH_CALL_SHIFT, | ||
| 191 | 194 | ||
| 192 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | 195 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, |
| 193 | }; | 196 | }; |
| @@ -476,7 +479,7 @@ struct perf_event_mmap_page { · 282 unmodified lines | |||
| 476 | * u64 delta; | 479 | * u64 delta; |
| 477 | * | 480 | * |
| 478 | * quot = (cyc >> time_shift); | 481 | * quot = (cyc >> time_shift); |
| 479 | * rem = cyc & ((1 << time_shift) - 1); | 482 | * rem = cyc & (((u64)1 << time_shift) - 1); |
| 480 | * delta = time_offset + quot * time_mult + | 483 | * delta = time_offset + quot * time_mult + |
| 481 | * ((rem * time_mult) >> time_shift); | 484 | * ((rem * time_mult) >> time_shift); |
| 482 | * | 485 | * |
| @@ -507,7 +510,7 @@ struct perf_event_mmap_page { · 24 unmodified lines | |||
| 507 | * And vice versa: | 510 | * And vice versa: |
| 508 | * | 511 | * |
| 509 | * quot = cyc >> time_shift; | 512 | * quot = cyc >> time_shift; |
| 510 | * rem = cyc & ((1 << time_shift) - 1); | 513 | * rem = cyc & (((u64)1 << time_shift) - 1); |
| 511 | * timestamp = time_zero + quot * time_mult + | 514 | * timestamp = time_zero + quot * time_mult + |
| 512 | * ((rem * time_mult) >> time_shift); | 515 | * ((rem * time_mult) >> time_shift); |
| 513 | */ | 516 | */ |
| @@ -87,6 +87,7 @@ enum { · 86 unmodified lines | |||
| 87 | #define TC_ACT_STOLEN 4 | 87 | #define TC_ACT_STOLEN 4 |
| 88 | #define TC_ACT_QUEUED 5 | 88 | #define TC_ACT_QUEUED 5 |
| 89 | #define TC_ACT_REPEAT 6 | 89 | #define TC_ACT_REPEAT 6 |
| 90 | #define TC_ACT_REDIRECT 7 | ||
| 90 | #define TC_ACT_JUMP 0x10000000 | 91 | #define TC_ACT_JUMP 0x10000000 |
| 91 | 92 | ||
| 92 | /* Action type identifiers*/ | 93 | /* Action type identifiers*/ |
| @@ -373,6 +374,8 @@ enum { · 280 unmodified lines | |||
| 373 | 374 | ||
| 374 | /* BPF classifier */ | 375 | /* BPF classifier */ |
| 375 | 376 | ||
| 377 | #define TCA_BPF_FLAG_ACT_DIRECT (1 << 0) | ||
| 378 | |||
| 376 | enum { | 379 | enum { |
| 377 | TCA_BPF_UNSPEC, | 380 | TCA_BPF_UNSPEC, |
| 378 | TCA_BPF_ACT, | 381 | TCA_BPF_ACT, |
| @@ -382,6 +385,7 @@ enum { · 3 unmodified lines | |||
| 382 | TCA_BPF_OPS, | 385 | TCA_BPF_OPS, |
| 383 | TCA_BPF_FD, | 386 | TCA_BPF_FD, |
| 384 | TCA_BPF_NAME, | 387 | TCA_BPF_NAME, |
| 388 | TCA_BPF_FLAGS, | ||
| 385 | __TCA_BPF_MAX, | 389 | __TCA_BPF_MAX, |
| 386 | }; | 390 | }; |
| 387 | 391 | ||
| @@ -0,0 +1,48 @@ | |||
| 1 | #ifndef _UAPI_PR_H | ||
| 2 | #define _UAPI_PR_H | ||
| 3 | |||
| 4 | enum pr_type { | ||
| 5 | PR_WRITE_EXCLUSIVE = 1, | ||
| 6 | PR_EXCLUSIVE_ACCESS = 2, | ||
| 7 | PR_WRITE_EXCLUSIVE_REG_ONLY = 3, | ||
| 8 | PR_EXCLUSIVE_ACCESS_REG_ONLY = 4, | ||
| 9 | PR_WRITE_EXCLUSIVE_ALL_REGS = 5, | ||
| 10 | PR_EXCLUSIVE_ACCESS_ALL_REGS = 6, | ||
| 11 | }; | ||
| 12 | |||
| 13 | struct pr_reservation { | ||
| 14 | __u64 key; | ||
| 15 | __u32 type; | ||
| 16 | __u32 flags; | ||
| 17 | }; | ||
| 18 | |||
| 19 | struct pr_registration { | ||
| 20 | __u64 old_key; | ||
| 21 | __u64 new_key; | ||
| 22 | __u32 flags; | ||
| 23 | __u32 __pad; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct pr_preempt { | ||
| 27 | __u64 old_key; | ||
| 28 | __u64 new_key; | ||
| 29 | __u32 type; | ||
| 30 | __u32 flags; | ||
| 31 | }; | ||
| 32 | |||
| 33 | struct pr_clear { | ||
| 34 | __u64 key; | ||
| 35 | __u32 flags; | ||
| 36 | __u32 __pad; | ||
| 37 | }; | ||
| 38 | |||
| 39 | #define PR_FL_IGNORE_KEY (1 << 0) /* ignore existing key */ | ||
| 40 | |||
| 41 | #define IOC_PR_REGISTER _IOW('p', 200, struct pr_registration) | ||
| 42 | #define IOC_PR_RESERVE _IOW('p', 201, struct pr_reservation) | ||
| 43 | #define IOC_PR_RELEASE _IOW('p', 202, struct pr_reservation) | ||
| 44 | #define IOC_PR_PREEMPT _IOW('p', 203, struct pr_preempt) | ||
| 45 | #define IOC_PR_PREEMPT_ABORT _IOW('p', 204, struct pr_preempt) | ||
| 46 | #define IOC_PR_CLEAR _IOW('p', 205, struct pr_clear) | ||
| 47 | |||
| 48 | #endif /* _UAPI_PR_H */ | ||
| @@ -46,6 +46,11 @@ · 45 unmodified lines | |||
| 46 | #define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5) | 46 | #define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5) |
| 47 | #define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7) | 47 | #define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7) |
| 48 | 48 | ||
| 49 | #define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10) | ||
| 50 | #define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14) | ||
| 51 | |||
| 52 | #define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) | ||
| 53 | |||
| 49 | /* PSCI v0.2 power state encoding for CPU_SUSPEND function */ | 54 | /* PSCI v0.2 power state encoding for CPU_SUSPEND function */ |
| 50 | #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff | 55 | #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff |
| 51 | #define PSCI_0_2_POWER_STATE_ID_SHIFT 0 | 56 | #define PSCI_0_2_POWER_STATE_ID_SHIFT 0 |
| @@ -56,6 +61,13 @@ · 4 unmodified lines | |||
| 56 | #define PSCI_0_2_POWER_STATE_AFFL_MASK \ | 61 | #define PSCI_0_2_POWER_STATE_AFFL_MASK \ |
| 57 | (0x3 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | 62 | (0x3 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) |
| 58 | 63 | ||
| 64 | /* PSCI extended power state encoding for CPU_SUSPEND function */ | ||
| 65 | #define PSCI_1_0_EXT_POWER_STATE_ID_MASK 0xfffffff | ||
| 66 | #define PSCI_1_0_EXT_POWER_STATE_ID_SHIFT 0 | ||
| 67 | #define PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT 30 | ||
| 68 | #define PSCI_1_0_EXT_POWER_STATE_TYPE_MASK \ | ||
| 69 | (0x1 << PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT) | ||
| 70 | |||
| 59 | /* PSCI v0.2 affinity level state returned by AFFINITY_INFO */ | 71 | /* PSCI v0.2 affinity level state returned by AFFINITY_INFO */ |
| 60 | #define PSCI_0_2_AFFINITY_LEVEL_ON 0 | 72 | #define PSCI_0_2_AFFINITY_LEVEL_ON 0 |
| 61 | #define PSCI_0_2_AFFINITY_LEVEL_OFF 1 | 73 | #define PSCI_0_2_AFFINITY_LEVEL_OFF 1 |
| @@ -76,6 +88,11 @@ · 14 unmodified lines | |||
| 76 | #define PSCI_VERSION_MINOR(ver) \ | 88 | #define PSCI_VERSION_MINOR(ver) \ |
| 77 | ((ver) & PSCI_VERSION_MINOR_MASK) | 89 | ((ver) & PSCI_VERSION_MINOR_MASK) |
| 78 | 90 | ||
| 91 | /* PSCI features decoding (>=1.0) */ | ||
| 92 | #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT 1 | ||
| 93 | #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ | ||
| 94 | (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) | ||
| 95 | |||
| 79 | /* PSCI return values (inclusive of all PSCI versions) */ | 96 | /* PSCI return values (inclusive of all PSCI versions) */ |
| 80 | #define PSCI_RET_SUCCESS 0 | 97 | #define PSCI_RET_SUCCESS 0 |
| 81 | #define PSCI_RET_NOT_SUPPORTED -1 | 98 | #define PSCI_RET_NOT_SUPPORTED -1 |
| @@ -86,5 +103,6 @@ · 4 unmodified lines | |||
| 86 | #define PSCI_RET_INTERNAL_FAILURE -6 | 103 | #define PSCI_RET_INTERNAL_FAILURE -6 |
| 87 | #define PSCI_RET_NOT_PRESENT -7 | 104 | #define PSCI_RET_NOT_PRESENT -7 |
| 88 | #define PSCI_RET_DISABLED -8 | 105 | #define PSCI_RET_DISABLED -8 |
| 106 | #define PSCI_RET_INVALID_ADDRESS -9 | ||
| 89 | 107 | ||
| 90 | #endif /* _UAPI_LINUX_PSCI_H */ | 108 | #endif /* _UAPI_LINUX_PSCI_H */ |
| @@ -64,6 +64,8 @@ struct ptrace_peeksiginfo_args { · 63 unmodified lines | |||
| 64 | #define PTRACE_GETSIGMASK 0x420a | 64 | #define PTRACE_GETSIGMASK 0x420a |
| 65 | #define PTRACE_SETSIGMASK 0x420b | 65 | #define PTRACE_SETSIGMASK 0x420b |
| 66 | 66 | ||
| 67 | #define PTRACE_SECCOMP_GET_FILTER 0x420c | ||
| 68 | |||
| 67 | /* Read signals from a shared (process wide) queue */ | 69 | /* Read signals from a shared (process wide) queue */ |
| 68 | #define PTRACE_PEEKSIGINFO_SHARED (1 << 0) | 70 | #define PTRACE_PEEKSIGINFO_SHARED (1 << 0) |
| 69 | 71 | ||
| @@ -89,6 +89,12 @@ · 88 unmodified lines | |||
| 89 | * read requests will only be sent here in | 89 | * read requests will only be sent here in |
| 90 | * dire need | 90 | * dire need |
| 91 | */ | 91 | */ |
| 92 | #define MD_DISK_JOURNAL 18 /* disk is used as the write journal in RAID-5/6 */ | ||
| 93 | |||
| 94 | #define MD_DISK_ROLE_SPARE 0xffff | ||
| 95 | #define MD_DISK_ROLE_FAULTY 0xfffe | ||
| 96 | #define MD_DISK_ROLE_JOURNAL 0xfffd | ||
| 97 | #define MD_DISK_ROLE_MAX 0xff00 /* max value of regular disk role */ | ||
| 92 | 98 | ||
| 93 | typedef struct mdp_device_descriptor_s { | 99 | typedef struct mdp_device_descriptor_s { |
| 94 | __u32 number; /* 0 Device number in the entire set */ | 100 | __u32 number; /* 0 Device number in the entire set */ |
| @@ -252,7 +258,10 @@ struct mdp_superblock_1 { · 157 unmodified lines | |||
| 252 | __le64 data_offset; /* sector start of data, often 0 */ | 258 | __le64 data_offset; /* sector start of data, often 0 */ |
| 253 | __le64 data_size; /* sectors in this device that can be used for data */ | 259 | __le64 data_size; /* sectors in this device that can be used for data */ |
| 254 | __le64 super_offset; /* sector start of this superblock */ | 260 | __le64 super_offset; /* sector start of this superblock */ |
| 255 | __le64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */ | 261 | union { |
| 262 | __le64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */ | ||
| 263 | __le64 journal_tail;/* journal tail of journal device (from data_offset) */ | ||
| 264 | }; | ||
| 256 | __le32 dev_number; /* permanent identifier of this device - not role in raid */ | 265 | __le32 dev_number; /* permanent identifier of this device - not role in raid */ |
| 257 | __le32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */ | 266 | __le32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */ |
| 258 | __u8 device_uuid[16]; /* user-space setable, ignored by kernel */ | 267 | __u8 device_uuid[16]; /* user-space setable, ignored by kernel */ |
| @@ -302,6 +311,8 @@ struct mdp_superblock_1 { · 43 unmodified lines | |||
| 302 | #define MD_FEATURE_RECOVERY_BITMAP 128 /* recovery that is happening | 311 | #define MD_FEATURE_RECOVERY_BITMAP 128 /* recovery that is happening |
| 303 | * is guided by bitmap. | 312 | * is guided by bitmap. |
| 304 | */ | 313 | */ |
| 314 | #define MD_FEATURE_CLUSTERED 256 /* clustered MD */ | ||
| 315 | #define MD_FEATURE_JOURNAL 512 /* support write cache */ | ||
| 305 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ | 316 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ |
| 306 | |MD_FEATURE_RECOVERY_OFFSET \ | 317 | |MD_FEATURE_RECOVERY_OFFSET \ |
| 307 | |MD_FEATURE_RESHAPE_ACTIVE \ | 318 | |MD_FEATURE_RESHAPE_ACTIVE \ |
| @@ -310,6 +321,66 @@ struct mdp_superblock_1 { · 2 unmodified lines | |||
| 310 | |MD_FEATURE_RESHAPE_BACKWARDS \ | 321 | |MD_FEATURE_RESHAPE_BACKWARDS \ |
| 311 | |MD_FEATURE_NEW_OFFSET \ | 322 | |MD_FEATURE_NEW_OFFSET \ |
| 312 | |MD_FEATURE_RECOVERY_BITMAP \ | 323 | |MD_FEATURE_RECOVERY_BITMAP \ |
| 324 | |MD_FEATURE_CLUSTERED \ | ||
| 325 | |MD_FEATURE_JOURNAL \ | ||
| 313 | ) | 326 | ) |
| 314 | 327 | ||
| 328 | struct r5l_payload_header { | ||
| 329 | __le16 type; | ||
| 330 | __le16 flags; | ||
| 331 | } __attribute__ ((__packed__)); | ||
| 332 | |||
| 333 | enum r5l_payload_type { | ||
| 334 | R5LOG_PAYLOAD_DATA = 0, | ||
| 335 | R5LOG_PAYLOAD_PARITY = 1, | ||
| 336 | R5LOG_PAYLOAD_FLUSH = 2, | ||
| 337 | }; | ||
| 338 | |||
| 339 | struct r5l_payload_data_parity { | ||
| 340 | struct r5l_payload_header header; | ||
| 341 | __le32 size; /* sector. data/parity size. each 4k | ||
| 342 | * has a checksum */ | ||
| 343 | __le64 location; /* sector. For data, it's raid sector. For | ||
| 344 | * parity, it's stripe sector */ | ||
| 345 | __le32 checksum[]; | ||
| 346 | } __attribute__ ((__packed__)); | ||
| 347 | |||
| 348 | enum r5l_payload_data_parity_flag { | ||
| 349 | R5LOG_PAYLOAD_FLAG_DISCARD = 1, /* payload is discard */ | ||
| 350 | /* | ||
| 351 | * RESHAPED/RESHAPING is only set when there is reshape activity. Note, | ||
| 352 | * both data/parity of a stripe should have the same flag set | ||
| 353 | * | ||
| 354 | * RESHAPED: reshape is running, and this stripe finished reshape | ||
| 355 | * RESHAPING: reshape is running, and this stripe isn't reshaped | ||
| 356 | */ | ||
| 357 | R5LOG_PAYLOAD_FLAG_RESHAPED = 2, | ||
| 358 | R5LOG_PAYLOAD_FLAG_RESHAPING = 3, | ||
| 359 | }; | ||
| 360 | |||
| 361 | struct r5l_payload_flush { | ||
| 362 | struct r5l_payload_header header; | ||
| 363 | __le32 size; /* flush_stripes size, bytes */ | ||
| 364 | __le64 flush_stripes[]; | ||
| 365 | } __attribute__ ((__packed__)); | ||
| 366 | |||
| 367 | enum r5l_payload_flush_flag { | ||
| 368 | R5LOG_PAYLOAD_FLAG_FLUSH_STRIPE = 1, /* data represents whole stripe */ | ||
| 369 | }; | ||
| 370 | |||
| 371 | struct r5l_meta_block { | ||
| 372 | __le32 magic; | ||
| 373 | __le32 checksum; | ||
| 374 | __u8 version; | ||
| 375 | __u8 __zero_pading_1; | ||
| 376 | __le16 __zero_pading_2; | ||
| 377 | __le32 meta_size; /* whole size of the block */ | ||
| 378 | |||
| 379 | __le64 seq; | ||
| 380 | __le64 position; /* sector, start from rdev->data_offset, current position */ | ||
| 381 | struct r5l_payload_header payloads[]; | ||
| 382 | } __attribute__ ((__packed__)); | ||
| 383 | |||
| 384 | #define R5LOG_VERSION 0x1 | ||
| 385 | #define R5LOG_MAGIC 0x6433c509 | ||
| 315 | #endif | 386 | #endif |
| @@ -160,7 +160,7 @@ struct rtattr { · 159 unmodified lines | |||
| 160 | 160 | ||
| 161 | /* Macros to handle rtattributes */ | 161 | /* Macros to handle rtattributes */ |
| 162 | 162 | ||
| 163 | #define RTA_ALIGNTO 4 | 163 | #define RTA_ALIGNTO 4U |
| 164 | #define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) | 164 | #define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) |
| 165 | #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ | 165 | #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ |
| 166 | (rta)->rta_len >= sizeof(struct rtattr) && \ | 166 | (rta)->rta_len >= sizeof(struct rtattr) && \ |
| @@ -270,6 +270,7 @@ enum rt_scope_t { · 103 unmodified lines | |||
| 270 | #define RTM_F_CLONED 0x200 /* This route is cloned */ | 270 | #define RTM_F_CLONED 0x200 /* This route is cloned */ |
| 271 | #define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */ | 271 | #define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */ |
| 272 | #define RTM_F_PREFIX 0x800 /* Prefix addresses */ | 272 | #define RTM_F_PREFIX 0x800 /* Prefix addresses */ |
| 273 | #define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */ | ||
| 273 | 274 | ||
| 274 | /* Reserved table identifiers */ | 275 | /* Reserved table identifiers */ |
| 275 | 276 | ||
| @@ -666,6 +667,7 @@ struct tcamsg { · 390 unmodified lines | |||
| 666 | #define RTEXT_FILTER_VF (1 << 0) | 667 | #define RTEXT_FILTER_VF (1 << 0) |
| 667 | #define RTEXT_FILTER_BRVLAN (1 << 1) | 668 | #define RTEXT_FILTER_BRVLAN (1 << 1) |
| 668 | #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2) | 669 | #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2) |
| 670 | #define RTEXT_FILTER_SKIP_STATS (1 << 3) | ||
| 669 | 671 | ||
| 670 | /* End of information exported to user level */ | 672 | /* End of information exported to user level */ |
| 671 | 673 | ||
| @@ -106,6 +106,82 @@ struct scifioctl_msg { · 105 unmodified lines | |||
| 106 | __s32 out_len; | 106 | __s32 out_len; |
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | /** | ||
| 110 | * struct scifioctl_reg - used for SCIF_REG IOCTL | ||
| 111 | * @addr: starting virtual address | ||
| 112 | * @len: length of range | ||
| 113 | * @offset: offset of window | ||
| 114 | * @prot: read/write protection | ||
| 115 | * @flags: flags | ||
| 116 | * @out_offset: offset returned | ||
| 117 | */ | ||
| 118 | struct scifioctl_reg { | ||
| 119 | __u64 addr; | ||
| 120 | __u64 len; | ||
| 121 | __s64 offset; | ||
| 122 | __s32 prot; | ||
| 123 | __s32 flags; | ||
| 124 | __s64 out_offset; | ||
| 125 | }; | ||
| 126 | |||
| 127 | /** | ||
| 128 | * struct scifioctl_unreg - used for SCIF_UNREG IOCTL | ||
| 129 | * @offset: start of range to unregister | ||
| 130 | * @len: length of range to unregister | ||
| 131 | */ | ||
| 132 | struct scifioctl_unreg { | ||
| 133 | __s64 offset; | ||
| 134 | __u64 len; | ||
| 135 | }; | ||
| 136 | |||
| 137 | /** | ||
| 138 | * struct scifioctl_copy - used for SCIF DMA copy IOCTLs | ||
| 139 | * | ||
| 140 | * @loffset: offset in local registered address space to/from | ||
| 141 | * which to copy | ||
| 142 | * @len: length of range to copy | ||
| 143 | * @roffset: offset in remote registered address space to/from | ||
| 144 | * which to copy | ||
| 145 | * @addr: user virtual address to/from which to copy | ||
| 146 | * @flags: flags | ||
| 147 | * | ||
| 148 | * This structure is used for SCIF_READFROM, SCIF_WRITETO, SCIF_VREADFROM | ||
| 149 | * and SCIF_VREADFROM IOCTL's. | ||
| 150 | */ | ||
| 151 | struct scifioctl_copy { | ||
| 152 | __s64 loffset; | ||
| 153 | __u64 len; | ||
| 154 | __s64 roffset; | ||
| 155 | __u64 addr; | ||
| 156 | __s32 flags; | ||
| 157 | }; | ||
| 158 | |||
| 159 | /** | ||
| 160 | * struct scifioctl_fence_mark - used for SCIF_FENCE_MARK IOCTL | ||
| 161 | * @flags: flags | ||
| 162 | * @mark: fence handle which is a pointer to a __s32 | ||
| 163 | */ | ||
| 164 | struct scifioctl_fence_mark { | ||
| 165 | __s32 flags; | ||
| 166 | __u64 mark; | ||
| 167 | }; | ||
| 168 | |||
| 169 | /** | ||
| 170 | * struct scifioctl_fence_signal - used for SCIF_FENCE_SIGNAL IOCTL | ||
| 171 | * @loff: local offset | ||
| 172 | * @lval: value to write to loffset | ||
| 173 | * @roff: remote offset | ||
| 174 | * @rval: value to write to roffset | ||
| 175 | * @flags: flags | ||
| 176 | */ | ||
| 177 | struct scifioctl_fence_signal { | ||
| 178 | __s64 loff; | ||
| 179 | __u64 lval; | ||
| 180 | __s64 roff; | ||
| 181 | __u64 rval; | ||
| 182 | __s32 flags; | ||
| 183 | }; | ||
| 184 | |||
| 109 | /** | 185 | /** |
| 110 | * struct scifioctl_node_ids - used for SCIF_GET_NODEIDS IOCTL | 186 | * struct scifioctl_node_ids - used for SCIF_GET_NODEIDS IOCTL |
| 111 | * @nodes: pointer to an array of node_ids | 187 | * @nodes: pointer to an array of node_ids |
| @@ -125,6 +201,15 @@ struct scifioctl_node_ids { · 13 unmodified lines | |||
| 125 | #define SCIF_ACCEPTREG _IOWR('s', 5, __u64) | 201 | #define SCIF_ACCEPTREG _IOWR('s', 5, __u64) |
| 126 | #define SCIF_SEND _IOWR('s', 6, struct scifioctl_msg) | 202 | #define SCIF_SEND _IOWR('s', 6, struct scifioctl_msg) |
| 127 | #define SCIF_RECV _IOWR('s', 7, struct scifioctl_msg) | 203 | #define SCIF_RECV _IOWR('s', 7, struct scifioctl_msg) |
| 204 | #define SCIF_REG _IOWR('s', 8, struct scifioctl_reg) | ||
| 205 | #define SCIF_UNREG _IOWR('s', 9, struct scifioctl_unreg) | ||
| 206 | #define SCIF_READFROM _IOWR('s', 10, struct scifioctl_copy) | ||
| 207 | #define SCIF_WRITETO _IOWR('s', 11, struct scifioctl_copy) | ||
| 208 | #define SCIF_VREADFROM _IOWR('s', 12, struct scifioctl_copy) | ||
| 209 | #define SCIF_VWRITETO _IOWR('s', 13, struct scifioctl_copy) | ||
| 128 | #define SCIF_GET_NODEIDS _IOWR('s', 14, struct scifioctl_node_ids) | 210 | #define SCIF_GET_NODEIDS _IOWR('s', 14, struct scifioctl_node_ids) |
| 211 | #define SCIF_FENCE_MARK _IOWR('s', 15, struct scifioctl_fence_mark) | ||
| 212 | #define SCIF_FENCE_WAIT _IOWR('s', 16, __s32) | ||
| 213 | #define SCIF_FENCE_SIGNAL _IOWR('s', 17, struct scifioctl_fence_signal) | ||
| 129 | 214 | ||
| 130 | #endif /* SCIF_IOCTL_H */ | 215 | #endif /* SCIF_IOCTL_H */ |
| @@ -43,7 +43,8 @@ struct screen_info { · 42 unmodified lines | |||
| 43 | __u16 pages; /* 0x32 */ | 43 | __u16 pages; /* 0x32 */ |
| 44 | __u16 vesa_attributes; /* 0x34 */ | 44 | __u16 vesa_attributes; /* 0x34 */ |
| 45 | __u32 capabilities; /* 0x36 */ | 45 | __u32 capabilities; /* 0x36 */ |
| 46 | __u8 _reserved[6]; /* 0x3a */ | 46 | __u32 ext_lfb_base; /* 0x3a */ |
| 47 | __u8 _reserved[2]; /* 0x3e */ | ||
| 47 | } __attribute__((packed)); | 48 | } __attribute__((packed)); |
| 48 | 49 | ||
| 49 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ | 50 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ |
| @@ -69,6 +70,6 @@ struct screen_info { · 19 unmodified lines | |||
| 69 | #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ | 70 | #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ |
| 70 | 71 | ||
| 71 | #define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0) | 72 | #define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0) |
| 72 | 73 | #define VIDEO_CAPABILITY_64BIT_BASE (1 << 1) /* Frame buffer base is 64-bit */ | |
| 73 | 74 | ||
| 74 | #endif /* _UAPI_SCREEN_INFO_H */ | 75 | #endif /* _UAPI_SCREEN_INFO_H */ |
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * System Trace Module (STM) userspace interfaces | ||
| 3 | * Copyright (c) 2014, Intel Corporation. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms and conditions of the GNU General Public License, | ||
| 7 | * version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | * | ||
| 14 | * STM class implements generic infrastructure for System Trace Module devices | ||
| 15 | * as defined in MIPI STPv2 specification. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef _UAPI_LINUX_STM_H | ||
| 19 | #define _UAPI_LINUX_STM_H | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | |||
| 23 | /** | ||
| 24 | * struct stp_policy_id - identification for the STP policy | ||
| 25 | * @size: size of the structure including real id[] length | ||
| 26 | * @master: assigned master | ||
| 27 | * @channel: first assigned channel | ||
| 28 | * @width: number of requested channels | ||
| 29 | * @id: identification string | ||
| 30 | * | ||
| 31 | * User must calculate the total size of the structure and put it into | ||
| 32 | * @size field, fill out the @id and desired @width. In return, kernel | ||
| 33 | * fills out @master, @channel and @width. | ||
| 34 | */ | ||
| 35 | struct stp_policy_id { | ||
| 36 | __u32 size; | ||
| 37 | __u16 master; | ||
| 38 | __u16 channel; | ||
| 39 | __u16 width; | ||
| 40 | /* padding */ | ||
| 41 | __u16 __reserved_0; | ||
| 42 | __u32 __reserved_1; | ||
| 43 | char id[0]; | ||
| 44 | }; | ||
| 45 | |||
| 46 | #define STP_POLICY_ID_SET _IOWR('%', 0, struct stp_policy_id) | ||
| 47 | #define STP_POLICY_ID_GET _IOR('%', 1, struct stp_policy_id) | ||
| 48 | #define STP_SET_OPTIONS _IOW('%', 2, __u64) | ||
| 49 | |||
| 50 | #endif /* _UAPI_LINUX_STM_H */ | ||
| @@ -6,8 +6,8 @@ · 5 unmodified lines | |||
| 6 | * firmware based USB peripherals. | 6 | * firmware based USB peripherals. |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | #ifndef __LINUX_USB_CDC_H | 9 | #ifndef __UAPI_LINUX_USB_CDC_H |
| 10 | #define __LINUX_USB_CDC_H | 10 | #define __UAPI_LINUX_USB_CDC_H |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | 13 | ||
| @@ -444,4 +444,4 @@ struct usb_cdc_ncm_ndp_input_size { · 430 unmodified lines | |||
| 444 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 | 444 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 |
| 445 | #define USB_CDC_NCM_CRC_APPENDED 0x01 | 445 | #define USB_CDC_NCM_CRC_APPENDED 0x01 |
| 446 | 446 | ||
| 447 | #endif /* __LINUX_USB_CDC_H */ | 447 | #endif /* __UAPI_LINUX_USB_CDC_H */ |
| @@ -866,6 +866,35 @@ struct usb_ss_container_id_descriptor { · 865 unmodified lines | |||
| 866 | } __attribute__((packed)); | 866 | } __attribute__((packed)); |
| 867 | 867 | ||
| 868 | #define USB_DT_USB_SS_CONTN_ID_SIZE 20 | 868 | #define USB_DT_USB_SS_CONTN_ID_SIZE 20 |
| 869 | |||
| 870 | /* | ||
| 871 | * SuperSpeed Plus USB Capability descriptor: Defines the set of | ||
| 872 | * SuperSpeed Plus USB specific device level capabilities | ||
| 873 | */ | ||
| 874 | #define USB_SSP_CAP_TYPE 0xa | ||
| 875 | struct usb_ssp_cap_descriptor { | ||
| 876 | __u8 bLength; | ||
| 877 | __u8 bDescriptorType; | ||
| 878 | __u8 bDevCapabilityType; | ||
| 879 | __u8 bReserved; | ||
| 880 | __le32 bmAttributes; | ||
| 881 | #define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0) /* sublink speed entries */ | ||
| 882 | #define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5) /* speed ID entries */ | ||
| 883 | __u16 wFunctionalitySupport; | ||
| 884 | #define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf) | ||
| 885 | #define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8) | ||
| 886 | #define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12) | ||
| 887 | __le16 wReserved; | ||
| 888 | __le32 bmSublinkSpeedAttr[1]; /* list of sublink speed attrib entries */ | ||
| 889 | #define USB_SSP_SUBLINK_SPEED_SSID (0xf) /* sublink speed ID */ | ||
| 890 | #define USB_SSP_SUBLINK_SPEED_LSE (0x3 << 4) /* Lanespeed exponent */ | ||
| 891 | #define USB_SSP_SUBLINK_SPEED_ST (0x3 << 6) /* Sublink type */ | ||
| 892 | #define USB_SSP_SUBLINK_SPEED_RSVD (0x3f << 8) /* Reserved */ | ||
| 893 | #define USB_SSP_SUBLINK_SPEED_LP (0x3 << 14) /* Link protocol */ | ||
| 894 | #define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16) /* Lanespeed mantissa */ | ||
| 895 | } __attribute__((packed)); | ||
| 896 | |||
| 897 | |||
| 869 | /*-------------------------------------------------------------------------*/ | 898 | /*-------------------------------------------------------------------------*/ |
| 870 | 899 | ||
| 871 | /* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with | 900 | /* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with |
| @@ -11,8 +11,6 @@ · 10 unmodified lines | |||
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | 13 | ||
| 14 | #include <linux/compiler.h> | ||
| 15 | |||
| 16 | #define UFFD_API ((__u64)0xAA) | 14 | #define UFFD_API ((__u64)0xAA) |
| 17 | /* | 15 | /* |
| 18 | * After implementing the respective features it will become: | 16 | * After implementing the respective features it will become: |
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | * userio: virtual serio device support | ||
| 3 | * Copyright (C) 2015 Red Hat | ||
| 4 | * Copyright (C) 2015 Lyude (Stephen Chandler Paul) <cpaul@redhat.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU Lesser General Public License as published by the | ||
| 8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 9 | * option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 13 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
| 14 | * details. | ||
| 15 | * | ||
| 16 | * This is the public header used for user-space communication with the userio | ||
| 17 | * driver. __attribute__((__packed__)) is used for all structs to keep ABI | ||
| 18 | * compatibility between all architectures. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef _USERIO_H | ||
| 22 | #define _USERIO_H | ||
| 23 | |||
| 24 | #include <linux/types.h> | ||
| 25 | |||
| 26 | enum userio_cmd_type { | ||
| 27 | USERIO_CMD_REGISTER = 0, | ||
| 28 | USERIO_CMD_SET_PORT_TYPE = 1, | ||
| 29 | USERIO_CMD_SEND_INTERRUPT = 2 | ||
| 30 | }; | ||
| 31 | |||
| 32 | /* | ||
| 33 | * userio Commands | ||
| 34 | * All commands sent to /dev/userio are encoded using this structure. The type | ||
| 35 | * field should contain a USERIO_CMD* value that indicates what kind of command | ||
| 36 | * is being sent to userio. The data field should contain the accompanying | ||
| 37 | * argument for the command, if there is one. | ||
| 38 | */ | ||
| 39 | struct userio_cmd { | ||
| 40 | __u8 type; | ||
| 41 | __u8 data; | ||
| 42 | } __attribute__((__packed__)); | ||
| 43 | |||
| 44 | #endif /* !_USERIO_H */ | ||
| @@ -936,6 +936,7 @@ enum v4l2_deemphasis { · 935 unmodified lines | |||
| 936 | 936 | ||
| 937 | #define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 11) | 937 | #define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 11) |
| 938 | #define V4L2_CID_RF_TUNER_BANDWIDTH (V4L2_CID_RF_TUNER_CLASS_BASE + 12) | 938 | #define V4L2_CID_RF_TUNER_BANDWIDTH (V4L2_CID_RF_TUNER_CLASS_BASE + 12) |
| 939 | #define V4L2_CID_RF_TUNER_RF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 32) | ||
| 939 | #define V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 41) | 940 | #define V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 41) |
| 940 | #define V4L2_CID_RF_TUNER_LNA_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 42) | 941 | #define V4L2_CID_RF_TUNER_LNA_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 42) |
| 941 | #define V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 51) | 942 | #define V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 51) |
| @@ -38,6 +38,13 @@ · 37 unmodified lines | |||
| 38 | 38 | ||
| 39 | #define VFIO_SPAPR_TCE_v2_IOMMU 7 | 39 | #define VFIO_SPAPR_TCE_v2_IOMMU 7 |
| 40 | 40 | ||
| 41 | /* | ||
| 42 | * The No-IOMMU IOMMU offers no translation or isolation for devices and | ||
| 43 | * supports no ioctls outside of VFIO_CHECK_EXTENSION. Use of VFIO's No-IOMMU | ||
| 44 | * code will taint the host kernel and should be used with extreme caution. | ||
| 45 | */ | ||
| 46 | #define VFIO_NOIOMMU_IOMMU 8 | ||
| 47 | |||
| 41 | /* | 48 | /* |
| 42 | * The IOCTL interface is designed for extensibility by embedding the | 49 | * The IOCTL interface is designed for extensibility by embedding the |
| 43 | * structure length (argsz) and flags into structures passed between | 50 | * structure length (argsz) and flags into structures passed between |
| @@ -145,6 +145,7 @@ enum v4l2_buf_type { · 144 unmodified lines | |||
| 145 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, | 145 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, |
| 146 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, | 146 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, |
| 147 | V4L2_BUF_TYPE_SDR_CAPTURE = 11, | 147 | V4L2_BUF_TYPE_SDR_CAPTURE = 11, |
| 148 | V4L2_BUF_TYPE_SDR_OUTPUT = 12, | ||
| 148 | /* Deprecated, do not use */ | 149 | /* Deprecated, do not use */ |
| 149 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 150 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
| 150 | }; | 151 | }; |
| @@ -159,16 +160,20 @@ enum v4l2_buf_type { · 8 unmodified lines | |||
| 159 | || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \ | 160 | || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \ |
| 160 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \ | 161 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \ |
| 161 | || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \ | 162 | || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \ |
| 162 | || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) | 163 | || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT \ |
| 164 | || (type) == V4L2_BUF_TYPE_SDR_OUTPUT) | ||
| 163 | 165 | ||
| 164 | enum v4l2_tuner_type { | 166 | enum v4l2_tuner_type { |
| 165 | V4L2_TUNER_RADIO = 1, | 167 | V4L2_TUNER_RADIO = 1, |
| 166 | V4L2_TUNER_ANALOG_TV = 2, | 168 | V4L2_TUNER_ANALOG_TV = 2, |
| 167 | V4L2_TUNER_DIGITAL_TV = 3, | 169 | V4L2_TUNER_DIGITAL_TV = 3, |
| 168 | V4L2_TUNER_ADC = 4, | 170 | V4L2_TUNER_SDR = 4, |
| 169 | V4L2_TUNER_RF = 5, | 171 | V4L2_TUNER_RF = 5, |
| 170 | }; | 172 | }; |
| 171 | 173 | ||
| 174 | /* Deprecated, do not use */ | ||
| 175 | #define V4L2_TUNER_ADC V4L2_TUNER_SDR | ||
| 176 | |||
| 172 | enum v4l2_memory { | 177 | enum v4l2_memory { |
| 173 | V4L2_MEMORY_MMAP = 1, | 178 | V4L2_MEMORY_MMAP = 1, |
| 174 | V4L2_MEMORY_USERPTR = 2, | 179 | V4L2_MEMORY_USERPTR = 2, |
| @@ -229,6 +234,9 @@ enum v4l2_colorspace { · 54 unmodified lines | |||
| 229 | 234 | ||
| 230 | /* Raw colorspace: for RAW unprocessed images */ | 235 | /* Raw colorspace: for RAW unprocessed images */ |
| 231 | V4L2_COLORSPACE_RAW = 11, | 236 | V4L2_COLORSPACE_RAW = 11, |
| 237 | |||
| 238 | /* DCI-P3 colorspace, used by cinema projectors */ | ||
| 239 | V4L2_COLORSPACE_DCI_P3 = 12, | ||
| 232 | }; | 240 | }; |
| 233 | 241 | ||
| 234 | /* | 242 | /* |
| @@ -256,6 +264,8 @@ enum v4l2_xfer_func { · 21 unmodified lines | |||
| 256 | * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M | 264 | * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M |
| 257 | * | 265 | * |
| 258 | * V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE | 266 | * V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE |
| 267 | * | ||
| 268 | * V4L2_COLORSPACE_DCI_P3: V4L2_XFER_FUNC_DCI_P3 | ||
| 259 | */ | 269 | */ |
| 260 | V4L2_XFER_FUNC_DEFAULT = 0, | 270 | V4L2_XFER_FUNC_DEFAULT = 0, |
| 261 | V4L2_XFER_FUNC_709 = 1, | 271 | V4L2_XFER_FUNC_709 = 1, |
| @@ -263,6 +273,8 @@ enum v4l2_xfer_func { · 1 unmodified line | |||
| 263 | V4L2_XFER_FUNC_ADOBERGB = 3, | 273 | V4L2_XFER_FUNC_ADOBERGB = 3, |
| 264 | V4L2_XFER_FUNC_SMPTE240M = 4, | 274 | V4L2_XFER_FUNC_SMPTE240M = 4, |
| 265 | V4L2_XFER_FUNC_NONE = 5, | 275 | V4L2_XFER_FUNC_NONE = 5, |
| 276 | V4L2_XFER_FUNC_DCI_P3 = 6, | ||
| 277 | V4L2_XFER_FUNC_SMPTE2084 = 7, | ||
| 266 | }; | 278 | }; |
| 267 | 279 | ||
| 268 | /* | 280 | /* |
| @@ -272,9 +284,10 @@ enum v4l2_xfer_func { · 3 unmodified lines | |||
| 272 | #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ | 284 | #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ |
| 273 | ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \ | 285 | ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \ |
| 274 | ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \ | 286 | ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \ |
| 275 | ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \ | 287 | ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \ |
| 276 | ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \ | 288 | ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \ |
| 277 | V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709)))) | 289 | ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \ |
| 290 | V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709))))) | ||
| 278 | 291 | ||
| 279 | enum v4l2_ycbcr_encoding { | 292 | enum v4l2_ycbcr_encoding { |
| 280 | /* | 293 | /* |
| @@ -285,7 +298,7 @@ enum v4l2_ycbcr_encoding { · 4 unmodified lines | |||
| 285 | * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_ADOBERGB and | 298 | * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_ADOBERGB and |
| 286 | * V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 | 299 | * V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 |
| 287 | * | 300 | * |
| 288 | * V4L2_COLORSPACE_REC709: V4L2_YCBCR_ENC_709 | 301 | * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709 |
| 289 | * | 302 | * |
| 290 | * V4L2_COLORSPACE_SRGB: V4L2_YCBCR_ENC_SYCC | 303 | * V4L2_COLORSPACE_SRGB: V4L2_YCBCR_ENC_SYCC |
| 291 | * | 304 | * |
| @@ -325,7 +338,8 @@ enum v4l2_ycbcr_encoding { · 33 unmodified lines | |||
| 325 | * This depends on the colorspace. | 338 | * This depends on the colorspace. |
| 326 | */ | 339 | */ |
| 327 | #define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \ | 340 | #define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \ |
| 328 | ((colsp) == V4L2_COLORSPACE_REC709 ? V4L2_YCBCR_ENC_709 : \ | 341 | (((colsp) == V4L2_COLORSPACE_REC709 || \ |
| 342 | (colsp) == V4L2_COLORSPACE_DCI_P3) ? V4L2_YCBCR_ENC_709 : \ | ||
| 329 | ((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 : \ | 343 | ((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 : \ |
| 330 | ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M : \ | 344 | ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M : \ |
| 331 | V4L2_YCBCR_ENC_601))) | 345 | V4L2_YCBCR_ENC_601))) |
| @@ -423,6 +437,7 @@ struct v4l2_capability { · 91 unmodified lines | |||
| 423 | 437 | ||
| 424 | #define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ | 438 | #define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ |
| 425 | #define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */ | 439 | #define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */ |
| 440 | #define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */ | ||
| 426 | 441 | ||
| 427 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ | 442 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ |
| 428 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ | 443 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
| @@ -1578,7 +1593,8 @@ struct v4l2_modulator { · 1149 unmodified lines | |||
| 1578 | __u32 rangelow; | 1593 | __u32 rangelow; |
| 1579 | __u32 rangehigh; | 1594 | __u32 rangehigh; |
| 1580 | __u32 txsubchans; | 1595 | __u32 txsubchans; |
| 1581 | __u32 reserved[4]; | 1596 | __u32 type; /* enum v4l2_tuner_type */ |
| 1597 | __u32 reserved[3]; | ||
| 1582 | }; | 1598 | }; |
| 1583 | 1599 | ||
| 1584 | /* Flags for the 'capability' field */ | 1600 | /* Flags for the 'capability' field */ |
| @@ -2271,7 +2287,7 @@ struct v4l2_create_buffers { · 686 unmodified lines | |||
| 2271 | #define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl) | 2287 | #define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl) |
| 2272 | 2288 | ||
| 2273 | /* Reminder: when adding new ioctls please add support for them to | 2289 | /* Reminder: when adding new ioctls please add support for them to |
| 2274 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 2290 | drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */ |
| 2275 | 2291 | ||
| 2276 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ | 2292 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ |
| 2277 | 2293 | ||
| @@ -40,6 +40,8 @@ · 39 unmodified lines | |||
| 40 | 40 | ||
| 41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
| 42 | 42 | ||
| 43 | #define VIRTIO_GPU_F_VIRGL 0 | ||
| 44 | |||
| 43 | enum virtio_gpu_ctrl_type { | 45 | enum virtio_gpu_ctrl_type { |
| 44 | VIRTIO_GPU_UNDEFINED = 0, | 46 | VIRTIO_GPU_UNDEFINED = 0, |
| 45 | 47 | ||
| @@ -52,6 +54,18 @@ enum virtio_gpu_ctrl_type { · 6 unmodified lines | |||
| 52 | VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D, | 54 | VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D, |
| 53 | VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING, | 55 | VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING, |
| 54 | VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING, | 56 | VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING, |
| 57 | VIRTIO_GPU_CMD_GET_CAPSET_INFO, | ||
| 58 | VIRTIO_GPU_CMD_GET_CAPSET, | ||
| 59 | |||
| 60 | /* 3d commands */ | ||
| 61 | VIRTIO_GPU_CMD_CTX_CREATE = 0x0200, | ||
| 62 | VIRTIO_GPU_CMD_CTX_DESTROY, | ||
| 63 | VIRTIO_GPU_CMD_CTX_ATTACH_RESOURCE, | ||
| 64 | VIRTIO_GPU_CMD_CTX_DETACH_RESOURCE, | ||
| 65 | VIRTIO_GPU_CMD_RESOURCE_CREATE_3D, | ||
| 66 | VIRTIO_GPU_CMD_TRANSFER_TO_HOST_3D, | ||
| 67 | VIRTIO_GPU_CMD_TRANSFER_FROM_HOST_3D, | ||
| 68 | VIRTIO_GPU_CMD_SUBMIT_3D, | ||
| 55 | 69 | ||
| 56 | /* cursor commands */ | 70 | /* cursor commands */ |
| 57 | VIRTIO_GPU_CMD_UPDATE_CURSOR = 0x0300, | 71 | VIRTIO_GPU_CMD_UPDATE_CURSOR = 0x0300, |
| @@ -60,6 +74,8 @@ enum virtio_gpu_ctrl_type { · 2 unmodified lines | |||
| 60 | /* success responses */ | 74 | /* success responses */ |
| 61 | VIRTIO_GPU_RESP_OK_NODATA = 0x1100, | 75 | VIRTIO_GPU_RESP_OK_NODATA = 0x1100, |
| 62 | VIRTIO_GPU_RESP_OK_DISPLAY_INFO, | 76 | VIRTIO_GPU_RESP_OK_DISPLAY_INFO, |
| 77 | VIRTIO_GPU_RESP_OK_CAPSET_INFO, | ||
| 78 | VIRTIO_GPU_RESP_OK_CAPSET, | ||
| 63 | 79 | ||
| 64 | /* error responses */ | 80 | /* error responses */ |
| 65 | VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200, | 81 | VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200, |
| @@ -180,13 +196,107 @@ struct virtio_gpu_resp_display_info { · 114 unmodified lines | |||
| 180 | } pmodes[VIRTIO_GPU_MAX_SCANOUTS]; | 196 | } pmodes[VIRTIO_GPU_MAX_SCANOUTS]; |
| 181 | }; | 197 | }; |
| 182 | 198 | ||
| 199 | /* data passed in the control vq, 3d related */ | ||
| 200 | |||
| 201 | struct virtio_gpu_box { | ||
| 202 | __le32 x, y, z; | ||
| 203 | __le32 w, h, d; | ||
| 204 | }; | ||
| 205 | |||
| 206 | /* VIRTIO_GPU_CMD_TRANSFER_TO_HOST_3D, VIRTIO_GPU_CMD_TRANSFER_FROM_HOST_3D */ | ||
| 207 | struct virtio_gpu_transfer_host_3d { | ||
| 208 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 209 | struct virtio_gpu_box box; | ||
| 210 | __le64 offset; | ||
| 211 | __le32 resource_id; | ||
| 212 | __le32 level; | ||
| 213 | __le32 stride; | ||
| 214 | __le32 layer_stride; | ||
| 215 | }; | ||
| 216 | |||
| 217 | /* VIRTIO_GPU_CMD_RESOURCE_CREATE_3D */ | ||
| 218 | #define VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP (1 << 0) | ||
| 219 | struct virtio_gpu_resource_create_3d { | ||
| 220 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 221 | __le32 resource_id; | ||
| 222 | __le32 target; | ||
| 223 | __le32 format; | ||
| 224 | __le32 bind; | ||
| 225 | __le32 width; | ||
| 226 | __le32 height; | ||
| 227 | __le32 depth; | ||
| 228 | __le32 array_size; | ||
| 229 | __le32 last_level; | ||
| 230 | __le32 nr_samples; | ||
| 231 | __le32 flags; | ||
| 232 | __le32 padding; | ||
| 233 | }; | ||
| 234 | |||
| 235 | /* VIRTIO_GPU_CMD_CTX_CREATE */ | ||
| 236 | struct virtio_gpu_ctx_create { | ||
| 237 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 238 | __le32 nlen; | ||
| 239 | __le32 padding; | ||
| 240 | char debug_name[64]; | ||
| 241 | }; | ||
| 242 | |||
| 243 | /* VIRTIO_GPU_CMD_CTX_DESTROY */ | ||
| 244 | struct virtio_gpu_ctx_destroy { | ||
| 245 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 246 | }; | ||
| 247 | |||
| 248 | /* VIRTIO_GPU_CMD_CTX_ATTACH_RESOURCE, VIRTIO_GPU_CMD_CTX_DETACH_RESOURCE */ | ||
| 249 | struct virtio_gpu_ctx_resource { | ||
| 250 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 251 | __le32 resource_id; | ||
| 252 | __le32 padding; | ||
| 253 | }; | ||
| 254 | |||
| 255 | /* VIRTIO_GPU_CMD_SUBMIT_3D */ | ||
| 256 | struct virtio_gpu_cmd_submit { | ||
| 257 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 258 | __le32 size; | ||
| 259 | __le32 padding; | ||
| 260 | }; | ||
| 261 | |||
| 262 | #define VIRTIO_GPU_CAPSET_VIRGL 1 | ||
| 263 | |||
| 264 | /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ | ||
| 265 | struct virtio_gpu_get_capset_info { | ||
| 266 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 267 | __le32 capset_index; | ||
| 268 | __le32 padding; | ||
| 269 | }; | ||
| 270 | |||
| 271 | /* VIRTIO_GPU_RESP_OK_CAPSET_INFO */ | ||
| 272 | struct virtio_gpu_resp_capset_info { | ||
| 273 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 274 | __le32 capset_id; | ||
| 275 | __le32 capset_max_version; | ||
| 276 | __le32 capset_max_size; | ||
| 277 | __le32 padding; | ||
| 278 | }; | ||
| 279 | |||
| 280 | /* VIRTIO_GPU_CMD_GET_CAPSET */ | ||
| 281 | struct virtio_gpu_get_capset { | ||
| 282 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 283 | __le32 capset_id; | ||
| 284 | __le32 capset_version; | ||
| 285 | }; | ||
| 286 | |||
| 287 | /* VIRTIO_GPU_RESP_OK_CAPSET */ | ||
| 288 | struct virtio_gpu_resp_capset { | ||
| 289 | struct virtio_gpu_ctrl_hdr hdr; | ||
| 290 | uint8_t capset_data[]; | ||
| 291 | }; | ||
| 292 | |||
| 183 | #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) | 293 | #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) |
| 184 | 294 | ||
| 185 | struct virtio_gpu_config { | 295 | struct virtio_gpu_config { |
| 186 | __u32 events_read; | 296 | __u32 events_read; |
| 187 | __u32 events_clear; | 297 | __u32 events_clear; |
| 188 | __u32 num_scanouts; | 298 | __u32 num_scanouts; |
| 189 | __u32 reserved; | 299 | __u32 num_capsets; |
| 190 | }; | 300 | }; |
| 191 | 301 | ||
| 192 | /* simple formats for fbcon/X use */ | 302 | /* simple formats for fbcon/X use */ |
| @@ -20,8 +20,6 @@ · 19 unmodified lines | |||
| 20 | #ifndef __MTD_USER_H__ | 20 | #ifndef __MTD_USER_H__ |
| 21 | #define __MTD_USER_H__ | 21 | #define __MTD_USER_H__ |
| 22 | 22 | ||
| 23 | #include <stdint.h> | ||
| 24 | |||
| 25 | /* This file is blessed for inclusion by userspace */ | 23 | /* This file is blessed for inclusion by userspace */ |
| 26 | #include <mtd/mtd-abi.h> | 24 | #include <mtd/mtd-abi.h> |
| 27 | 25 | ||
| @@ -88,7 +88,7 @@ · 87 unmodified lines | |||
| 88 | #define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */ | 88 | #define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */ |
| 89 | #define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */ | 89 | #define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */ |
| 90 | #define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */ | 90 | #define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */ |
| 91 | /* 1UL << 5 reserved */ | 91 | /* 1UL << 5 unused */ |
| 92 | #define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */ | 92 | #define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */ |
| 93 | #define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/ | 93 | #define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/ |
| 94 | #define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */ | 94 | #define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */ |
| @@ -99,7 +99,7 @@ · 4 unmodified lines | |||
| 99 | #define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */ | 99 | #define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */ |
| 100 | #define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */ | 100 | #define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */ |
| 101 | #define HFI1_CAP_STATIC_RATE_CTRL (1UL << 15) /* Allow PBC.StaticRateControl */ | 101 | #define HFI1_CAP_STATIC_RATE_CTRL (1UL << 15) /* Allow PBC.StaticRateControl */ |
| 102 | #define HFI1_CAP_QSFP_ENABLED (1UL << 16) /* Enable QSFP check during LNI */ | 102 | /* 1UL << 16 unused */ |
| 103 | #define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */ | 103 | #define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */ |
| 104 | #define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */ | 104 | #define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */ |
| 105 | 105 | ||
| @@ -92,6 +92,7 @@ enum { · 91 unmodified lines | |||
| 92 | enum { | 92 | enum { |
| 93 | IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE, | 93 | IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE, |
| 94 | IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ, | 94 | IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ, |
| 95 | IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP, | ||
| 95 | IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, | 96 | IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, |
| 96 | IB_USER_VERBS_EX_CMD_DESTROY_FLOW, | 97 | IB_USER_VERBS_EX_CMD_DESTROY_FLOW, |
| 97 | }; | 98 | }; |
| @@ -516,6 +517,25 @@ struct ib_uverbs_create_qp { · 418 unmodified lines | |||
| 516 | __u64 driver_data[0]; | 517 | __u64 driver_data[0]; |
| 517 | }; | 518 | }; |
| 518 | 519 | ||
| 520 | struct ib_uverbs_ex_create_qp { | ||
| 521 | __u64 user_handle; | ||
| 522 | __u32 pd_handle; | ||
| 523 | __u32 send_cq_handle; | ||
| 524 | __u32 recv_cq_handle; | ||
| 525 | __u32 srq_handle; | ||
| 526 | __u32 max_send_wr; | ||
| 527 | __u32 max_recv_wr; | ||
| 528 | __u32 max_send_sge; | ||
| 529 | __u32 max_recv_sge; | ||
| 530 | __u32 max_inline_data; | ||
| 531 | __u8 sq_sig_all; | ||
| 532 | __u8 qp_type; | ||
| 533 | __u8 is_srq; | ||
| 534 | __u8 reserved; | ||
| 535 | __u32 comp_mask; | ||
| 536 | __u32 create_flags; | ||
| 537 | }; | ||
| 538 | |||
| 519 | struct ib_uverbs_open_qp { | 539 | struct ib_uverbs_open_qp { |
| 520 | __u64 response; | 540 | __u64 response; |
| 521 | __u64 user_handle; | 541 | __u64 user_handle; |
| @@ -538,6 +558,12 @@ struct ib_uverbs_create_qp_resp { · 16 unmodified lines | |||
| 538 | __u32 reserved; | 558 | __u32 reserved; |
| 539 | }; | 559 | }; |
| 540 | 560 | ||
| 561 | struct ib_uverbs_ex_create_qp_resp { | ||
| 562 | struct ib_uverbs_create_qp_resp base; | ||
| 563 | __u32 comp_mask; | ||
| 564 | __u32 response_length; | ||
| 565 | }; | ||
| 566 | |||
| 541 | /* | 567 | /* |
| 542 | * This struct needs to remain a multiple of 8 bytes to keep the | 568 | * This struct needs to remain a multiple of 8 bytes to keep the |
| 543 | * alignment of the modify QP parameters. | 569 | * alignment of the modify QP parameters. |
| @@ -83,7 +83,7 @@ · 82 unmodified lines | |||
| 83 | #define SND_SOC_TPLG_NUM_TEXTS 16 | 83 | #define SND_SOC_TPLG_NUM_TEXTS 16 |
| 84 | 84 | ||
| 85 | /* ABI version */ | 85 | /* ABI version */ |
| 86 | #define SND_SOC_TPLG_ABI_VERSION 0x3 | 86 | #define SND_SOC_TPLG_ABI_VERSION 0x4 |
| 87 | 87 | ||
| 88 | /* Max size of TLV data */ | 88 | /* Max size of TLV data */ |
| 89 | #define SND_SOC_TPLG_TLV_SIZE 32 | 89 | #define SND_SOC_TPLG_TLV_SIZE 32 |
| @@ -103,7 +103,8 @@ · 13 unmodified lines | |||
| 103 | #define SND_SOC_TPLG_TYPE_PCM 7 | 103 | #define SND_SOC_TPLG_TYPE_PCM 7 |
| 104 | #define SND_SOC_TPLG_TYPE_MANIFEST 8 | 104 | #define SND_SOC_TPLG_TYPE_MANIFEST 8 |
| 105 | #define SND_SOC_TPLG_TYPE_CODEC_LINK 9 | 105 | #define SND_SOC_TPLG_TYPE_CODEC_LINK 9 |
| 106 | #define SND_SOC_TPLG_TYPE_PDATA 10 | 106 | #define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 |
| 107 | #define SND_SOC_TPLG_TYPE_PDATA 11 | ||
| 107 | #define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_PDATA | 108 | #define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_PDATA |
| 108 | 109 | ||
| 109 | /* vendor block IDs - please add new vendor types to end */ | 110 | /* vendor block IDs - please add new vendor types to end */ |
| @@ -198,7 +199,7 @@ struct snd_soc_tplg_ctl_hdr { · 88 unmodified lines | |||
| 198 | struct snd_soc_tplg_stream_caps { | 199 | struct snd_soc_tplg_stream_caps { |
| 199 | __le32 size; /* in bytes of this structure */ | 200 | __le32 size; /* in bytes of this structure */ |
| 200 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | 201 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 201 | __le64 formats[SND_SOC_TPLG_MAX_FORMATS]; /* supported formats SNDRV_PCM_FMTBIT_* */ | 202 | __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ |
| 202 | __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ | 203 | __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ |
| 203 | __le32 rate_min; /* min rate */ | 204 | __le32 rate_min; /* min rate */ |
| 204 | __le32 rate_max; /* max rate */ | 205 | __le32 rate_max; /* max rate */ |
| @@ -217,23 +218,12 @@ struct snd_soc_tplg_stream_caps { · 12 unmodified lines | |||
| 217 | */ | 218 | */ |
| 218 | struct snd_soc_tplg_stream { | 219 | struct snd_soc_tplg_stream { |
| 219 | __le32 size; /* in bytes of this structure */ | 220 | __le32 size; /* in bytes of this structure */ |
| 221 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */ | ||
| 220 | __le64 format; /* SNDRV_PCM_FMTBIT_* */ | 222 | __le64 format; /* SNDRV_PCM_FMTBIT_* */ |
| 221 | __le32 rate; /* SNDRV_PCM_RATE_* */ | 223 | __le32 rate; /* SNDRV_PCM_RATE_* */ |
| 222 | __le32 period_bytes; /* size of period in bytes */ | 224 | __le32 period_bytes; /* size of period in bytes */ |
| 223 | __le32 buffer_bytes; /* size of buffer in bytes */ | 225 | __le32 buffer_bytes; /* size of buffer in bytes */ |
| 224 | __le32 channels; /* channels */ | 226 | __le32 channels; /* channels */ |
| 225 | __le32 tdm_slot; /* optional BE bitmask of supported TDM slots */ | ||
| 226 | __le32 dai_fmt; /* SND_SOC_DAIFMT_ */ | ||
| 227 | } __attribute__((packed)); | ||
| 228 | |||
| 229 | /* | ||
| 230 | * Duplex stream configuration supported by SW/FW. | ||
| 231 | */ | ||
| 232 | struct snd_soc_tplg_stream_config { | ||
| 233 | __le32 size; /* in bytes of this structure */ | ||
| 234 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
| 235 | struct snd_soc_tplg_stream playback; | ||
| 236 | struct snd_soc_tplg_stream capture; | ||
| 237 | } __attribute__((packed)); | 227 | } __attribute__((packed)); |
| 238 | 228 | ||
| 239 | /* | 229 | /* |
| @@ -366,11 +356,11 @@ struct snd_soc_tplg_dapm_widget { · 126 unmodified lines | |||
| 366 | __le32 shift; /* bits to shift */ | 356 | __le32 shift; /* bits to shift */ |
| 367 | __le32 mask; /* non-shifted mask */ | 357 | __le32 mask; /* non-shifted mask */ |
| 368 | __le32 subseq; /* sort within widget type */ | 358 | __le32 subseq; /* sort within widget type */ |
| 369 | __u32 invert; /* invert the power bit */ | 359 | __le32 invert; /* invert the power bit */ |
| 370 | __u32 ignore_suspend; /* kept enabled over suspend */ | 360 | __le32 ignore_suspend; /* kept enabled over suspend */ |
| 371 | __u16 event_flags; | 361 | __le16 event_flags; |
| 372 | __u16 event_type; | 362 | __le16 event_type; |
| 373 | __u16 num_kcontrols; | 363 | __le32 num_kcontrols; |
| 374 | struct snd_soc_tplg_private priv; | 364 | struct snd_soc_tplg_private priv; |
| 375 | /* | 365 | /* |
| 376 | * kcontrols that relate to this widget | 366 | * kcontrols that relate to this widget |
| @@ -378,30 +368,46 @@ struct snd_soc_tplg_dapm_widget { · 1 unmodified line | |||
| 378 | */ | 368 | */ |
| 379 | } __attribute__((packed)); | 369 | } __attribute__((packed)); |
| 380 | 370 | ||
| 381 | struct snd_soc_tplg_pcm_cfg_caps { | ||
| 382 | struct snd_soc_tplg_stream_caps caps; | ||
| 383 | struct snd_soc_tplg_stream_config configs[SND_SOC_TPLG_STREAM_CONFIG_MAX]; | ||
| 384 | __le32 num_configs; /* number of configs */ | ||
| 385 | } __attribute__((packed)); | ||
| 386 | 371 | ||
| 387 | /* | 372 | /* |
| 388 | * Describes SW/FW specific features of PCM or DAI link. | 373 | * Describes SW/FW specific features of PCM (FE DAI & DAI link). |
| 389 | * | 374 | * |
| 390 | * File block representation for PCM/DAI-Link :- | 375 | * File block representation for PCM :- |
| 391 | * +-----------------------------------+-----+ | 376 | * +-----------------------------------+-----+ |
| 392 | * | struct snd_soc_tplg_hdr | 1 | | 377 | * | struct snd_soc_tplg_hdr | 1 | |
| 393 | * +-----------------------------------+-----+ | 378 | * +-----------------------------------+-----+ |
| 394 | * | struct snd_soc_tplg_dapm_pcm_dai | N | | 379 | * | struct snd_soc_tplg_pcm | N | |
| 395 | * +-----------------------------------+-----+ | 380 | * +-----------------------------------+-----+ |
| 396 | */ | 381 | */ |
| 397 | struct snd_soc_tplg_pcm_dai { | 382 | struct snd_soc_tplg_pcm { |
| 398 | __le32 size; /* in bytes of this structure */ | 383 | __le32 size; /* in bytes of this structure */ |
| 399 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | 384 | char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 400 | __le32 id; /* unique ID - used to match */ | 385 | char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 401 | __le32 playback; /* supports playback mode */ | 386 | __le32 pcm_id; /* unique ID - used to match */ |
| 402 | __le32 capture; /* supports capture mode */ | 387 | __le32 dai_id; /* unique ID - used to match */ |
| 403 | __le32 compress; /* 1 = compressed; 0 = PCM */ | 388 | __le32 playback; /* supports playback mode */ |
| 404 | struct snd_soc_tplg_pcm_cfg_caps capconf[2]; /* capabilities and configs */ | 389 | __le32 capture; /* supports capture mode */ |
| 390 | __le32 compress; /* 1 = compressed; 0 = PCM */ | ||
| 391 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ | ||
| 392 | __le32 num_streams; /* number of streams */ | ||
| 393 | struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ | ||
| 405 | } __attribute__((packed)); | 394 | } __attribute__((packed)); |
| 406 | 395 | ||
| 396 | |||
| 397 | /* | ||
| 398 | * Describes the BE or CC link runtime supported configs or params | ||
| 399 | * | ||
| 400 | * File block representation for BE/CC link config :- | ||
| 401 | * +-----------------------------------+-----+ | ||
| 402 | * | struct snd_soc_tplg_hdr | 1 | | ||
| 403 | * +-----------------------------------+-----+ | ||
| 404 | * | struct snd_soc_tplg_link_config | N | | ||
| 405 | * +-----------------------------------+-----+ | ||
| 406 | */ | ||
| 407 | struct snd_soc_tplg_link_config { | ||
| 408 | __le32 size; /* in bytes of this structure */ | ||
| 409 | __le32 id; /* unique ID - used to match */ | ||
| 410 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ | ||
| 411 | __le32 num_streams; /* number of streams */ | ||
| 412 | } __attribute__((packed)); | ||
| 407 | #endif | 413 | #endif |
| @@ -100,9 +100,11 @@ enum { · 99 unmodified lines | |||
| 100 | SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ | 100 | SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ |
| 101 | SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ | 101 | SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ |
| 102 | SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */ | 102 | SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */ |
| 103 | SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */ | ||
| 104 | SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */ | ||
| 103 | 105 | ||
| 104 | /* Don't forget to change the following: */ | 106 | /* Don't forget to change the following: */ |
| 105 | SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_OXFW | 107 | SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_TASCAM |
| 106 | }; | 108 | }; |
| 107 | 109 | ||
| 108 | struct snd_hwdep_info { | 110 | struct snd_hwdep_info { |
| @@ -34,6 +34,14 @@ · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | #define EMU10K1_FX8010_PCM_COUNT 8 | 35 | #define EMU10K1_FX8010_PCM_COUNT 8 |
| 36 | 36 | ||
| 37 | /* | ||
| 38 | * Following definition is copied from linux/types.h to support compiling | ||
| 39 | * this header file in userspace since they are not generally available for | ||
| 40 | * uapi headers. | ||
| 41 | */ | ||
| 42 | #define __EMU10K1_DECLARE_BITMAP(name,bits) \ | ||
| 43 | unsigned long name[(bits) / (sizeof(unsigned long) * 8)] | ||
| 44 | |||
| 37 | /* instruction set */ | 45 | /* instruction set */ |
| 38 | #define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ | 46 | #define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ |
| 39 | #define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ | 47 | #define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ |
| @@ -300,7 +308,7 @@ struct snd_emu10k1_fx8010_control_old_gpr { · 260 unmodified lines | |||
| 300 | struct snd_emu10k1_fx8010_code { | 308 | struct snd_emu10k1_fx8010_code { |
| 301 | char name[128]; | 309 | char name[128]; |
| 302 | 310 | ||
| 303 | DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ | 311 | __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ |
| 304 | __u32 __user *gpr_map; /* initializers */ | 312 | __u32 __user *gpr_map; /* initializers */ |
| 305 | 313 | ||
| 306 | unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ | 314 | unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ |
| @@ -313,11 +321,11 @@ struct snd_emu10k1_fx8010_code { · 6 unmodified lines | |||
| 313 | unsigned int gpr_list_control_total; /* total count of GPR controls */ | 321 | unsigned int gpr_list_control_total; /* total count of GPR controls */ |
| 314 | struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ | 322 | struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ |
| 315 | 323 | ||
| 316 | DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ | 324 | __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ |
| 317 | __u32 __user *tram_data_map; /* data initializers */ | 325 | __u32 __user *tram_data_map; /* data initializers */ |
| 318 | __u32 __user *tram_addr_map; /* map initializers */ | 326 | __u32 __user *tram_addr_map; /* map initializers */ |
| 319 | 327 | ||
| 320 | DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ | 328 | __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ |
| 321 | __u32 __user *code; /* one instruction - 64 bits */ | 329 | __u32 __user *code; /* one instruction - 64 bits */ |
| 322 | }; | 330 | }; |
| 323 | 331 | ||
| @@ -9,6 +9,7 @@ · 8 unmodified lines | |||
| 9 | #define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc | 9 | #define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc |
| 10 | #define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e | 10 | #define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e |
| 11 | #define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475 | 11 | #define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475 |
| 12 | #define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c | ||
| 12 | 13 | ||
| 13 | struct snd_firewire_event_common { | 14 | struct snd_firewire_event_common { |
| 14 | unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */ | 15 | unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */ |
| @@ -40,11 +41,17 @@ struct snd_firewire_event_efw_response { · 25 unmodified lines | |||
| 40 | __be32 response[0]; /* some responses */ | 41 | __be32 response[0]; /* some responses */ |
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 44 | struct snd_firewire_event_digi00x_message { | ||
| 45 | unsigned int type; | ||
| 46 | __u32 message; /* Digi00x-specific message */ | ||
| 47 | }; | ||
| 48 | |||
| 43 | union snd_firewire_event { | 49 | union snd_firewire_event { |
| 44 | struct snd_firewire_event_common common; | 50 | struct snd_firewire_event_common common; |
| 45 | struct snd_firewire_event_lock_status lock_status; | 51 | struct snd_firewire_event_lock_status lock_status; |
| 46 | struct snd_firewire_event_dice_notification dice_notification; | 52 | struct snd_firewire_event_dice_notification dice_notification; |
| 47 | struct snd_firewire_event_efw_response efw_response; | 53 | struct snd_firewire_event_efw_response efw_response; |
| 54 | struct snd_firewire_event_digi00x_message digi00x_message; | ||
| 48 | }; | 55 | }; |
| 49 | 56 | ||
| 50 | 57 | ||
| @@ -56,6 +63,8 @@ union snd_firewire_event { · 5 unmodified lines | |||
| 56 | #define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 | 63 | #define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 |
| 57 | #define SNDRV_FIREWIRE_TYPE_BEBOB 3 | 64 | #define SNDRV_FIREWIRE_TYPE_BEBOB 3 |
| 58 | #define SNDRV_FIREWIRE_TYPE_OXFW 4 | 65 | #define SNDRV_FIREWIRE_TYPE_OXFW 4 |
| 66 | #define SNDRV_FIREWIRE_TYPE_DIGI00X 5 | ||
| 67 | #define SNDRV_FIREWIRE_TYPE_TASCAM 6 | ||
| 59 | /* RME, MOTU, ... */ | 68 | /* RME, MOTU, ... */ |
| 60 | 69 | ||
| 61 | struct snd_firewire_get_info { | 70 | struct snd_firewire_get_info { |
| @@ -20,11 +20,7 @@ · 19 unmodified lines | |||
| 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | #ifdef __KERNEL__ | ||
| 24 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 25 | #else | ||
| 26 | #include <stdint.h> | ||
| 27 | #endif | ||
| 28 | 24 | ||
| 29 | /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ | 25 | /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ |
| 30 | #define HDSPM_MAX_CHANNELS 64 | 26 | #define HDSPM_MAX_CHANNELS 64 |
| @@ -46,15 +42,15 @@ enum hdspm_speed { · 15 unmodified lines | |||
| 46 | /* -------------------- IOCTL Peak/RMS Meters -------------------- */ | 42 | /* -------------------- IOCTL Peak/RMS Meters -------------------- */ |
| 47 | 43 | ||
| 48 | struct hdspm_peak_rms { | 44 | struct hdspm_peak_rms { |
| 49 | uint32_t input_peaks[64]; | 45 | __u32 input_peaks[64]; |
| 50 | uint32_t playback_peaks[64]; | 46 | __u32 playback_peaks[64]; |
| 51 | uint32_t output_peaks[64]; | 47 | __u32 output_peaks[64]; |
| 52 | 48 | ||
| 53 | uint64_t input_rms[64]; | 49 | __u64 input_rms[64]; |
| 54 | uint64_t playback_rms[64]; | 50 | __u64 playback_rms[64]; |
| 55 | uint64_t output_rms[64]; | 51 | __u64 output_rms[64]; |
| 56 | 52 | ||
| 57 | uint8_t speed; /* enum {ss, ds, qs} */ | 53 | __u8 speed; /* enum {ss, ds, qs} */ |
| 58 | int status2; | 54 | int status2; |
| 59 | }; | 55 | }; |
| 60 | 56 | ||
| @@ -155,21 +151,21 @@ enum hdspm_syncsource { · 94 unmodified lines | |||
| 155 | }; | 151 | }; |
| 156 | 152 | ||
| 157 | struct hdspm_status { | 153 | struct hdspm_status { |
| 158 | uint8_t card_type; /* enum hdspm_io_type */ | 154 | __u8 card_type; /* enum hdspm_io_type */ |
| 159 | enum hdspm_syncsource autosync_source; | 155 | enum hdspm_syncsource autosync_source; |
| 160 | 156 | ||
| 161 | uint64_t card_clock; | 157 | __u64 card_clock; |
| 162 | uint32_t master_period; | 158 | __u32 master_period; |
| 163 | 159 | ||
| 164 | union { | 160 | union { |
| 165 | struct { | 161 | struct { |
| 166 | uint8_t sync_wc; /* enum hdspm_sync */ | 162 | __u8 sync_wc; /* enum hdspm_sync */ |
| 167 | uint8_t sync_madi; /* enum hdspm_sync */ | 163 | __u8 sync_madi; /* enum hdspm_sync */ |
| 168 | uint8_t sync_tco; /* enum hdspm_sync */ | 164 | __u8 sync_tco; /* enum hdspm_sync */ |
| 169 | uint8_t sync_in; /* enum hdspm_sync */ | 165 | __u8 sync_in; /* enum hdspm_sync */ |
| 170 | uint8_t madi_input; /* enum hdspm_madi_input */ | 166 | __u8 madi_input; /* enum hdspm_madi_input */ |
| 171 | uint8_t channel_format; /* enum hdspm_madi_channel_format */ | 167 | __u8 channel_format; /* enum hdspm_madi_channel_format */ |
| 172 | uint8_t frame_format; /* enum hdspm_madi_frame_format */ | 168 | __u8 frame_format; /* enum hdspm_madi_frame_format */ |
| 173 | } madi; | 169 | } madi; |
| 174 | } card_specific; | 170 | } card_specific; |
| 175 | }; | 171 | }; |
| @@ -184,7 +180,7 @@ struct hdspm_status { · 8 unmodified lines | |||
| 184 | #define HDSPM_ADDON_TCO 1 | 180 | #define HDSPM_ADDON_TCO 1 |
| 185 | 181 | ||
| 186 | struct hdspm_version { | 182 | struct hdspm_version { |
| 187 | uint8_t card_type; /* enum hdspm_io_type */ | 183 | __u8 card_type; /* enum hdspm_io_type */ |
| 188 | char cardname[20]; | 184 | char cardname[20]; |
| 189 | unsigned int serial; | 185 | unsigned int serial; |
| 190 | unsigned short firmware_rev; | 186 | unsigned short firmware_rev; |
| @@ -11,6 +11,8 @@ · 10 unmodified lines | |||
| 11 | #ifndef __LINUX_PUBLIC_GNTALLOC_H__ | 11 | #ifndef __LINUX_PUBLIC_GNTALLOC_H__ |
| 12 | #define __LINUX_PUBLIC_GNTALLOC_H__ | 12 | #define __LINUX_PUBLIC_GNTALLOC_H__ |
| 13 | 13 | ||
| 14 | #include <linux/types.h> | ||
| 15 | |||
| 14 | /* | 16 | /* |
| 15 | * Allocates a new page and creates a new grant reference. | 17 | * Allocates a new page and creates a new grant reference. |
| 16 | */ | 18 | */ |
| @@ -19,17 +21,17 @@ _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref)) · 2 unmodified lines | |||
| 19 | struct ioctl_gntalloc_alloc_gref { | 21 | struct ioctl_gntalloc_alloc_gref { |
| 20 | /* IN parameters */ | 22 | /* IN parameters */ |
| 21 | /* The ID of the domain to be given access to the grants. */ | 23 | /* The ID of the domain to be given access to the grants. */ |
| 22 | uint16_t domid; | 24 | __u16 domid; |
| 23 | /* Flags for this mapping */ | 25 | /* Flags for this mapping */ |
| 24 | uint16_t flags; | 26 | __u16 flags; |
| 25 | /* Number of pages to map */ | 27 | /* Number of pages to map */ |
| 26 | uint32_t count; | 28 | __u32 count; |
| 27 | /* OUT parameters */ | 29 | /* OUT parameters */ |
| 28 | /* The offset to be used on a subsequent call to mmap(). */ | 30 | /* The offset to be used on a subsequent call to mmap(). */ |
| 29 | uint64_t index; | 31 | __u64 index; |
| 30 | /* The grant references of the newly created grant, one per page */ | 32 | /* The grant references of the newly created grant, one per page */ |
| 31 | /* Variable size, depending on count */ | 33 | /* Variable size, depending on count */ |
| 32 | uint32_t gref_ids[1]; | 34 | __u32 gref_ids[1]; |
| 33 | }; | 35 | }; |
| 34 | 36 | ||
| 35 | #define GNTALLOC_FLAG_WRITABLE 1 | 37 | #define GNTALLOC_FLAG_WRITABLE 1 |
| @@ -43,9 +45,9 @@ _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref)) · 7 unmodified lines | |||
| 43 | struct ioctl_gntalloc_dealloc_gref { | 45 | struct ioctl_gntalloc_dealloc_gref { |
| 44 | /* IN parameters */ | 46 | /* IN parameters */ |
| 45 | /* The offset returned in the map operation */ | 47 | /* The offset returned in the map operation */ |
| 46 | uint64_t index; | 48 | __u64 index; |
| 47 | /* Number of references to unmap */ | 49 | /* Number of references to unmap */ |
| 48 | uint32_t count; | 50 | __u32 count; |
| 49 | }; | 51 | }; |
| 50 | 52 | ||
| 51 | /* | 53 | /* |
| @@ -67,11 +69,11 @@ struct ioctl_gntalloc_unmap_notify { · 15 unmodified lines | |||
| 67 | * be cleared. Otherwise, it can be any byte in the page whose | 69 | * be cleared. Otherwise, it can be any byte in the page whose |
| 68 | * notification we are adjusting. | 70 | * notification we are adjusting. |
| 69 | */ | 71 | */ |
| 70 | uint64_t index; | 72 | __u64 index; |
| 71 | /* Action(s) to take on unmap */ | 73 | /* Action(s) to take on unmap */ |
| 72 | uint32_t action; | 74 | __u32 action; |
| 73 | /* Event channel to notify */ | 75 | /* Event channel to notify */ |
| 74 | uint32_t event_channel_port; | 76 | __u32 event_channel_port; |
| 75 | }; | 77 | }; |
| 76 | 78 | ||
| 77 | /* Clear (set to zero) the byte specified by index */ | 79 | /* Clear (set to zero) the byte specified by index */ |
| @@ -33,11 +33,13 @@ · 32 unmodified lines | |||
| 33 | #ifndef __LINUX_PUBLIC_GNTDEV_H__ | 33 | #ifndef __LINUX_PUBLIC_GNTDEV_H__ |
| 34 | #define __LINUX_PUBLIC_GNTDEV_H__ | 34 | #define __LINUX_PUBLIC_GNTDEV_H__ |
| 35 | 35 | ||
| 36 | #include <linux/types.h> | ||
| 37 | |||
| 36 | struct ioctl_gntdev_grant_ref { | 38 | struct ioctl_gntdev_grant_ref { |
| 37 | /* The domain ID of the grant to be mapped. */ | 39 | /* The domain ID of the grant to be mapped. */ |
| 38 | uint32_t domid; | 40 | __u32 domid; |
| 39 | /* The grant reference of the grant to be mapped. */ | 41 | /* The grant reference of the grant to be mapped. */ |
| 40 | uint32_t ref; | 42 | __u32 ref; |
| 41 | }; | 43 | }; |
| 42 | 44 | ||
| 43 | /* | 45 | /* |
| @@ -50,11 +52,11 @@ _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref)) · 6 unmodified lines | |||
| 50 | struct ioctl_gntdev_map_grant_ref { | 52 | struct ioctl_gntdev_map_grant_ref { |
| 51 | /* IN parameters */ | 53 | /* IN parameters */ |
| 52 | /* The number of grants to be mapped. */ | 54 | /* The number of grants to be mapped. */ |
| 53 | uint32_t count; | 55 | __u32 count; |
| 54 | uint32_t pad; | 56 | __u32 pad; |
| 55 | /* OUT parameters */ | 57 | /* OUT parameters */ |
| 56 | /* The offset to be used on a subsequent call to mmap(). */ | 58 | /* The offset to be used on a subsequent call to mmap(). */ |
| 57 | uint64_t index; | 59 | __u64 index; |
| 58 | /* Variable IN parameter. */ | 60 | /* Variable IN parameter. */ |
| 59 | /* Array of grant references, of size @count. */ | 61 | /* Array of grant references, of size @count. */ |
| 60 | struct ioctl_gntdev_grant_ref refs[1]; | 62 | struct ioctl_gntdev_grant_ref refs[1]; |
| @@ -70,10 +72,10 @@ _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref)) · 9 unmodified lines | |||
| 70 | struct ioctl_gntdev_unmap_grant_ref { | 72 | struct ioctl_gntdev_unmap_grant_ref { |
| 71 | /* IN parameters */ | 73 | /* IN parameters */ |
| 72 | /* The offset was returned by the corresponding map operation. */ | 74 | /* The offset was returned by the corresponding map operation. */ |
| 73 | uint64_t index; | 75 | __u64 index; |
| 74 | /* The number of pages to be unmapped. */ | 76 | /* The number of pages to be unmapped. */ |
| 75 | uint32_t count; | 77 | __u32 count; |
| 76 | uint32_t pad; | 78 | __u32 pad; |
| 77 | }; | 79 | }; |
| 78 | 80 | ||
| 79 | /* | 81 | /* |
| @@ -93,13 +95,13 @@ _IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr)) · 13 unmodified lines | |||
| 93 | struct ioctl_gntdev_get_offset_for_vaddr { | 95 | struct ioctl_gntdev_get_offset_for_vaddr { |
| 94 | /* IN parameters */ | 96 | /* IN parameters */ |
| 95 | /* The virtual address of the first mapped page in a range. */ | 97 | /* The virtual address of the first mapped page in a range. */ |
| 96 | uint64_t vaddr; | 98 | __u64 vaddr; |
| 97 | /* OUT parameters */ | 99 | /* OUT parameters */ |
| 98 | /* The offset that was used in the initial mmap() operation. */ | 100 | /* The offset that was used in the initial mmap() operation. */ |
| 99 | uint64_t offset; | 101 | __u64 offset; |
| 100 | /* The number of pages mapped in the VM area that begins at @vaddr. */ | 102 | /* The number of pages mapped in the VM area that begins at @vaddr. */ |
| 101 | uint32_t count; | 103 | __u32 count; |
| 102 | uint32_t pad; | 104 | __u32 pad; |
| 103 | }; | 105 | }; |
| 104 | 106 | ||
| 105 | /* | 107 | /* |
| @@ -113,7 +115,7 @@ _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants)) · 7 unmodified lines | |||
| 113 | struct ioctl_gntdev_set_max_grants { | 115 | struct ioctl_gntdev_set_max_grants { |
| 114 | /* IN parameter */ | 116 | /* IN parameter */ |
| 115 | /* The maximum number of grants that may be mapped at once. */ | 117 | /* The maximum number of grants that may be mapped at once. */ |
| 116 | uint32_t count; | 118 | __u32 count; |
| 117 | }; | 119 | }; |
| 118 | 120 | ||
| 119 | /* | 121 | /* |
| @@ -135,11 +137,11 @@ struct ioctl_gntdev_unmap_notify { · 15 unmodified lines | |||
| 135 | * be cleared. Otherwise, it can be any byte in the page whose | 137 | * be cleared. Otherwise, it can be any byte in the page whose |
| 136 | * notification we are adjusting. | 138 | * notification we are adjusting. |
| 137 | */ | 139 | */ |
| 138 | uint64_t index; | 140 | __u64 index; |
| 139 | /* Action(s) to take on unmap */ | 141 | /* Action(s) to take on unmap */ |
| 140 | uint32_t action; | 142 | __u32 action; |
| 141 | /* Event channel to notify */ | 143 | /* Event channel to notify */ |
| 142 | uint32_t event_channel_port; | 144 | __u32 event_channel_port; |
| 143 | }; | 145 | }; |
| 144 | 146 | ||
| 145 | /* Clear (set to zero) the byte specified by index */ | 147 | /* Clear (set to zero) the byte specified by index */ |