ee5db7e9 parents 467669c 5235166 368d4e5 604b607 5b65c2a 981c5b4 8493ecc 5df4eb0 5ae6e894357 files · +172503 −102549Browse filesShowing the changes to include/uapi (20 of 4357 files). Show all
Unified · Split
| @@ -703,9 +703,11 @@ __SYSCALL(__NR_renameat2, sys_renameat2) · 702 unmodified lines | ||
| 703 | 703 | __SYSCALL(__NR_seccomp, sys_seccomp) |
| 704 | 704 | #define __NR_getrandom 278 |
| 705 | 705 | __SYSCALL(__NR_getrandom, sys_getrandom) |
| 706 | +#define __NR_memfd_create 279 | |
| 707 | +__SYSCALL(__NR_memfd_create, sys_memfd_create) | |
| 706 | 708 | |
| 707 | 709 | #undef __NR_syscalls |
| 708 | −#define __NR_syscalls 279 | |
| 710 | +#define __NR_syscalls 280 | |
| 709 | 711 | |
| 710 | 712 | /* |
| 711 | 713 | * All syscalls below here should go away really, |
| @@ -780,7 +780,7 @@ struct drm_prime_handle { · 779 unmodified lines | ||
| 780 | 780 | |
| 781 | 781 | /** |
| 782 | 782 | * Device specific ioctls should only be in their respective headers |
| 783 | − * The device specific ioctl range is from 0x40 to 0x99. | |
| 783 | + * The device specific ioctl range is from 0x40 to 0x9f. | |
| 784 | 784 | * Generic IOCTLS restart at 0xA0. |
| 785 | 785 | * |
| 786 | 786 | * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and |
| @@ -88,6 +88,11 @@ · 87 unmodified lines | ||
| 88 | 88 | #define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */ |
| 89 | 89 | #define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */ |
| 90 | 90 | |
| 91 | +/* Picture aspect ratio options */ | |
| 92 | +#define DRM_MODE_PICTURE_ASPECT_NONE 0 | |
| 93 | +#define DRM_MODE_PICTURE_ASPECT_4_3 1 | |
| 94 | +#define DRM_MODE_PICTURE_ASPECT_16_9 2 | |
| 95 | + | |
| 91 | 96 | /* Dithering mode options */ |
| 92 | 97 | #define DRM_MODE_DITHERING_OFF 0 |
| 93 | 98 | #define DRM_MODE_DITHERING_ON 1 |
| @@ -25,6 +25,16 @@ · 24 unmodified lines | ||
| 25 | 25 | #ifndef __NOUVEAU_DRM_H__ |
| 26 | 26 | #define __NOUVEAU_DRM_H__ |
| 27 | 27 | |
| 28 | +#define DRM_NOUVEAU_EVENT_NVIF 0x80000000 | |
| 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 | + | |
| 28 | 38 | #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) |
| 29 | 39 | #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) |
| 30 | 40 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) |
| @@ -123,6 +133,7 @@ struct drm_nouveau_gem_cpu_fini { · 92 unmodified lines | ||
| 123 | 133 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */ |
| 124 | 134 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */ |
| 125 | 135 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */ |
| 136 | +#define DRM_NOUVEAU_NVIF 0x07 | |
| 126 | 137 | #define DRM_NOUVEAU_GEM_NEW 0x40 |
| 127 | 138 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 |
| 128 | 139 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x42 |
| @@ -796,7 +796,9 @@ struct drm_radeon_gem_info { · 795 unmodified lines | ||
| 796 | 796 | uint64_t vram_visible; |
| 797 | 797 | }; |
| 798 | 798 | |
| 799 | −#define RADEON_GEM_NO_BACKING_STORE 1 | |
| 799 | +#define RADEON_GEM_NO_BACKING_STORE (1 << 0) | |
| 800 | +#define RADEON_GEM_GTT_UC (1 << 1) | |
| 801 | +#define RADEON_GEM_GTT_WC (1 << 2) | |
| 800 | 802 | |
| 801 | 803 | struct drm_radeon_gem_create { |
| 802 | 804 | uint64_t size; |
| @@ -942,6 +944,7 @@ struct drm_radeon_cs_chunk { · 139 unmodified lines | ||
| 942 | 944 | }; |
| 943 | 945 | |
| 944 | 946 | /* drm_radeon_cs_reloc.flags */ |
| 947 | +#define RADEON_RELOC_PRIO_MASK (0xf << 0) | |
| 945 | 948 | |
| 946 | 949 | struct drm_radeon_cs_reloc { |
| 947 | 950 | uint32_t handle; |
| @@ -129,6 +129,44 @@ struct drm_tegra_submit { · 128 unmodified lines | ||
| 129 | 129 | __u32 reserved[5]; /* future expansion */ |
| 130 | 130 | }; |
| 131 | 131 | |
| 132 | +#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0 | |
| 133 | +#define DRM_TEGRA_GEM_TILING_MODE_TILED 1 | |
| 134 | +#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2 | |
| 135 | + | |
| 136 | +struct drm_tegra_gem_set_tiling { | |
| 137 | + /* input */ | |
| 138 | + __u32 handle; | |
| 139 | + __u32 mode; | |
| 140 | + __u32 value; | |
| 141 | + __u32 pad; | |
| 142 | +}; | |
| 143 | + | |
| 144 | +struct drm_tegra_gem_get_tiling { | |
| 145 | + /* input */ | |
| 146 | + __u32 handle; | |
| 147 | + /* output */ | |
| 148 | + __u32 mode; | |
| 149 | + __u32 value; | |
| 150 | + __u32 pad; | |
| 151 | +}; | |
| 152 | + | |
| 153 | +#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0) | |
| 154 | +#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP) | |
| 155 | + | |
| 156 | +struct drm_tegra_gem_set_flags { | |
| 157 | + /* input */ | |
| 158 | + __u32 handle; | |
| 159 | + /* output */ | |
| 160 | + __u32 flags; | |
| 161 | +}; | |
| 162 | + | |
| 163 | +struct drm_tegra_gem_get_flags { | |
| 164 | + /* input */ | |
| 165 | + __u32 handle; | |
| 166 | + /* output */ | |
| 167 | + __u32 flags; | |
| 168 | +}; | |
| 169 | + | |
| 132 | 170 | #define DRM_TEGRA_GEM_CREATE 0x00 |
| 133 | 171 | #define DRM_TEGRA_GEM_MMAP 0x01 |
| 134 | 172 | #define DRM_TEGRA_SYNCPT_READ 0x02 |
| @@ -139,6 +177,10 @@ struct drm_tegra_submit { · 4 unmodified lines | ||
| 139 | 177 | #define DRM_TEGRA_GET_SYNCPT 0x07 |
| 140 | 178 | #define DRM_TEGRA_SUBMIT 0x08 |
| 141 | 179 | #define DRM_TEGRA_GET_SYNCPT_BASE 0x09 |
| 180 | +#define DRM_TEGRA_GEM_SET_TILING 0x0a | |
| 181 | +#define DRM_TEGRA_GEM_GET_TILING 0x0b | |
| 182 | +#define DRM_TEGRA_GEM_SET_FLAGS 0x0c | |
| 183 | +#define DRM_TEGRA_GEM_GET_FLAGS 0x0d | |
| 142 | 184 | |
| 143 | 185 | #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) |
| 144 | 186 | #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) |
| @@ -150,5 +192,9 @@ struct drm_tegra_submit { · 5 unmodified lines | ||
| 150 | 192 | #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) |
| 151 | 193 | #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) |
| 152 | 194 | #define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) |
| 195 | +#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling) | |
| 196 | +#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling) | |
| 197 | +#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) | |
| 198 | +#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) | |
| 153 | 199 | |
| 154 | 200 | #endif |
| @@ -10,12 +10,13 @@ · 9 unmodified lines | ||
| 10 | 10 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 |
| 11 | 11 | |
| 12 | 12 | /* |
| 13 | − * For flags member below | |
| 14 | − * sg.h sg_io_hdr also has bits defined for it's flags member. However | |
| 15 | − * none of these bits are implemented/used by bsg. The bits below are | |
| 16 | − * allocated to not conflict with sg.h ones anyway. | |
| 13 | + * For flag constants below: | |
| 14 | + * sg.h sg_io_hdr also has bits defined for it's flags member. These | |
| 15 | + * two flag values (0x10 and 0x20) have the same meaning in sg.h . For | |
| 16 | + * bsg the BSG_FLAG_Q_AT_HEAD flag is ignored since it is the deafult. | |
| 17 | 17 | */ |
| 18 | −#define BSG_FLAG_Q_AT_TAIL 0x10 /* default, == 0 at this bit, is Q_AT_HEAD */ | |
| 18 | +#define BSG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */ | |
| 19 | +#define BSG_FLAG_Q_AT_HEAD 0x20 | |
| 19 | 20 | |
| 20 | 21 | struct sg_io_v4 { |
| 21 | 22 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ |
| @@ -27,6 +27,21 @@ · 26 unmodified lines | ||
| 27 | 27 | #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) |
| 28 | 28 | #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) |
| 29 | 29 | |
| 30 | +/* | |
| 31 | + * Set/Get seals | |
| 32 | + */ | |
| 33 | +#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) | |
| 34 | +#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) | |
| 35 | + | |
| 36 | +/* | |
| 37 | + * Types of seals | |
| 38 | + */ | |
| 39 | +#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ | |
| 40 | +#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ | |
| 41 | +#define F_SEAL_GROW 0x0004 /* prevent file from growing */ | |
| 42 | +#define F_SEAL_WRITE 0x0008 /* prevent writes */ | |
| 43 | +/* (1U << 31) is reserved for signed error codes */ | |
| 44 | + | |
| 30 | 45 | /* |
| 31 | 46 | * Types of directory notifications that may be requested. |
| 32 | 47 | */ |
| @@ -233,7 +233,6 @@ struct in6_flowlabel_req { · 232 unmodified lines | ||
| 233 | 233 | #if 0 /* not yet */ |
| 234 | 234 | #define IPV6_USE_MIN_MTU 63 |
| 235 | 235 | #endif |
| 236 | −#define IPV6_AUTOFLOWLABEL 64 | |
| 237 | 236 | |
| 238 | 237 | /* |
| 239 | 238 | * Netfilter (1) |
| @@ -262,6 +261,7 @@ struct in6_flowlabel_req { · 22 unmodified lines | ||
| 262 | 261 | * IP6T_SO_ORIGINAL_DST 80 |
| 263 | 262 | */ |
| 264 | 263 | |
| 264 | +#define IPV6_AUTOFLOWLABEL 70 | |
| 265 | 265 | /* RFC5014: Source address selection */ |
| 266 | 266 | #define IPV6_ADDR_PREFERENCES 72 |
| 267 | 267 | |
| @@ -13,6 +13,17 @@ · 12 unmodified lines | ||
| 13 | 13 | #define KEXEC_PRESERVE_CONTEXT 0x00000002 |
| 14 | 14 | #define KEXEC_ARCH_MASK 0xffff0000 |
| 15 | 15 | |
| 16 | +/* | |
| 17 | + * Kexec file load interface flags. | |
| 18 | + * KEXEC_FILE_UNLOAD : Unload already loaded kexec/kdump image. | |
| 19 | + * KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image. | |
| 20 | + * KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd | |
| 21 | + * fd field. | |
| 22 | + */ | |
| 23 | +#define KEXEC_FILE_UNLOAD 0x00000001 | |
| 24 | +#define KEXEC_FILE_ON_CRASH 0x00000002 | |
| 25 | +#define KEXEC_FILE_NO_INITRAMFS 0x00000004 | |
| 26 | + | |
| 16 | 27 | /* These values match the ELF architecture values. |
| 17 | 28 | * Unless there is a good reason that should continue to be the case. |
| 18 | 29 | */ |
| @@ -162,7 +162,7 @@ struct kvm_pit_config { · 161 unmodified lines | ||
| 162 | 162 | #define KVM_EXIT_TPR_ACCESS 12 |
| 163 | 163 | #define KVM_EXIT_S390_SIEIC 13 |
| 164 | 164 | #define KVM_EXIT_S390_RESET 14 |
| 165 | −#define KVM_EXIT_DCR 15 | |
| 165 | +#define KVM_EXIT_DCR 15 /* deprecated */ | |
| 166 | 166 | #define KVM_EXIT_NMI 16 |
| 167 | 167 | #define KVM_EXIT_INTERNAL_ERROR 17 |
| 168 | 168 | #define KVM_EXIT_OSI 18 |
| @@ -268,7 +268,7 @@ struct kvm_run { · 99 unmodified lines | ||
| 268 | 268 | __u64 trans_exc_code; |
| 269 | 269 | __u32 pgm_code; |
| 270 | 270 | } s390_ucontrol; |
| 271 | − /* KVM_EXIT_DCR */ | |
| 271 | + /* KVM_EXIT_DCR (deprecated) */ | |
| 272 | 272 | struct { |
| 273 | 273 | __u32 dcrn; |
| 274 | 274 | __u32 data; |
| @@ -763,6 +763,8 @@ struct kvm_ppc_smmu_info { · 488 unmodified lines | ||
| 763 | 763 | #define KVM_CAP_VM_ATTRIBUTES 101 |
| 764 | 764 | #define KVM_CAP_ARM_PSCI_0_2 102 |
| 765 | 765 | #define KVM_CAP_PPC_FIXUP_HCALL 103 |
| 766 | +#define KVM_CAP_PPC_ENABLE_HCALL 104 | |
| 767 | +#define KVM_CAP_CHECK_EXTENSION_VM 105 | |
| 766 | 768 | |
| 767 | 769 | #ifdef KVM_CAP_IRQ_ROUTING |
| 768 | 770 | |
| @@ -0,0 +1,8 @@ | ||
| 1 | +#ifndef _UAPI_LINUX_MEMFD_H | |
| 2 | +#define _UAPI_LINUX_MEMFD_H | |
| 3 | + | |
| 4 | +/* flags for memfd_create(2) (unsigned int) */ | |
| 5 | +#define MFD_CLOEXEC 0x0001U | |
| 6 | +#define MFD_ALLOW_SEALING 0x0002U | |
| 7 | + | |
| 8 | +#endif /* _UAPI_LINUX_MEMFD_H */ | |
| @@ -76,5 +76,6 @@ · 75 unmodified lines | ||
| 76 | 76 | #define SERIO_HAMPSHIRE 0x3b |
| 77 | 77 | #define SERIO_PS2MULT 0x3c |
| 78 | 78 | #define SERIO_TSC40 0x3d |
| 79 | +#define SERIO_WACOM_IV 0x3e | |
| 79 | 80 | |
| 80 | 81 | #endif /* _UAPI_SERIO_H */ |
| @@ -24,35 +24,23 @@ · 23 unmodified lines | ||
| 24 | 24 | #include <linux/hid.h> |
| 25 | 25 | |
| 26 | 26 | enum uhid_event_type { |
| 27 | − UHID_CREATE, | |
| 27 | + __UHID_LEGACY_CREATE, | |
| 28 | 28 | UHID_DESTROY, |
| 29 | 29 | UHID_START, |
| 30 | 30 | UHID_STOP, |
| 31 | 31 | UHID_OPEN, |
| 32 | 32 | UHID_CLOSE, |
| 33 | 33 | UHID_OUTPUT, |
| 34 | − UHID_OUTPUT_EV, /* obsolete! */ | |
| 35 | − UHID_INPUT, | |
| 36 | − UHID_FEATURE, | |
| 37 | − UHID_FEATURE_ANSWER, | |
| 34 | + __UHID_LEGACY_OUTPUT_EV, | |
| 35 | + __UHID_LEGACY_INPUT, | |
| 36 | + UHID_GET_REPORT, | |
| 37 | + UHID_GET_REPORT_REPLY, | |
| 38 | 38 | UHID_CREATE2, |
| 39 | 39 | UHID_INPUT2, |
| 40 | + UHID_SET_REPORT, | |
| 41 | + UHID_SET_REPORT_REPLY, | |
| 40 | 42 | }; |
| 41 | 43 | |
| 42 | −struct uhid_create_req { | |
| 43 | − __u8 name[128]; | |
| 44 | − __u8 phys[64]; | |
| 45 | − __u8 uniq[64]; | |
| 46 | − __u8 __user *rd_data; | |
| 47 | − __u16 rd_size; | |
| 48 | − | |
| 49 | − __u16 bus; | |
| 50 | − __u32 vendor; | |
| 51 | − __u32 product; | |
| 52 | − __u32 version; | |
| 53 | − __u32 country; | |
| 54 | −} __attribute__((__packed__)); | |
| 55 | − | |
| 56 | 44 | struct uhid_create2_req { |
| 57 | 45 | __u8 name[128]; |
| 58 | 46 | __u8 phys[64]; |
| @@ -66,6 +54,16 @@ struct uhid_create2_req { · 7 unmodified lines | ||
| 66 | 54 | __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE]; |
| 67 | 55 | } __attribute__((__packed__)); |
| 68 | 56 | |
| 57 | +enum uhid_dev_flag { | |
| 58 | + UHID_DEV_NUMBERED_FEATURE_REPORTS = (1ULL << 0), | |
| 59 | + UHID_DEV_NUMBERED_OUTPUT_REPORTS = (1ULL << 1), | |
| 60 | + UHID_DEV_NUMBERED_INPUT_REPORTS = (1ULL << 2), | |
| 61 | +}; | |
| 62 | + | |
| 63 | +struct uhid_start_req { | |
| 64 | + __u64 dev_flags; | |
| 65 | +}; | |
| 66 | + | |
| 69 | 67 | #define UHID_DATA_MAX 4096 |
| 70 | 68 | |
| 71 | 69 | enum uhid_report_type { |
| @@ -74,36 +72,94 @@ enum uhid_report_type { · 2 unmodified lines | ||
| 74 | 72 | UHID_INPUT_REPORT, |
| 75 | 73 | }; |
| 76 | 74 | |
| 77 | −struct uhid_input_req { | |
| 75 | +struct uhid_input2_req { | |
| 76 | + __u16 size; | |
| 77 | + __u8 data[UHID_DATA_MAX]; | |
| 78 | +} __attribute__((__packed__)); | |
| 79 | + | |
| 80 | +struct uhid_output_req { | |
| 78 | 81 | __u8 data[UHID_DATA_MAX]; |
| 79 | 82 | __u16 size; |
| 83 | + __u8 rtype; | |
| 80 | 84 | } __attribute__((__packed__)); |
| 81 | 85 | |
| 82 | −struct uhid_input2_req { | |
| 86 | +struct uhid_get_report_req { | |
| 87 | + __u32 id; | |
| 88 | + __u8 rnum; | |
| 89 | + __u8 rtype; | |
| 90 | +} __attribute__((__packed__)); | |
| 91 | + | |
| 92 | +struct uhid_get_report_reply_req { | |
| 93 | + __u32 id; | |
| 94 | + __u16 err; | |
| 83 | 95 | __u16 size; |
| 84 | 96 | __u8 data[UHID_DATA_MAX]; |
| 85 | 97 | } __attribute__((__packed__)); |
| 86 | 98 | |
| 87 | −struct uhid_output_req { | |
| 99 | +struct uhid_set_report_req { | |
| 100 | + __u32 id; | |
| 101 | + __u8 rnum; | |
| 102 | + __u8 rtype; | |
| 103 | + __u16 size; | |
| 104 | + __u8 data[UHID_DATA_MAX]; | |
| 105 | +} __attribute__((__packed__)); | |
| 106 | + | |
| 107 | +struct uhid_set_report_reply_req { | |
| 108 | + __u32 id; | |
| 109 | + __u16 err; | |
| 110 | +} __attribute__((__packed__)); | |
| 111 | + | |
| 112 | +/* | |
| 113 | + * Compat Layer | |
| 114 | + * All these commands and requests are obsolete. You should avoid using them in | |
| 115 | + * new code. We support them for backwards-compatibility, but you might not get | |
| 116 | + * access to new feature in case you use them. | |
| 117 | + */ | |
| 118 | + | |
| 119 | +enum uhid_legacy_event_type { | |
| 120 | + UHID_CREATE = __UHID_LEGACY_CREATE, | |
| 121 | + UHID_OUTPUT_EV = __UHID_LEGACY_OUTPUT_EV, | |
| 122 | + UHID_INPUT = __UHID_LEGACY_INPUT, | |
| 123 | + UHID_FEATURE = UHID_GET_REPORT, | |
| 124 | + UHID_FEATURE_ANSWER = UHID_GET_REPORT_REPLY, | |
| 125 | +}; | |
| 126 | + | |
| 127 | +/* Obsolete! Use UHID_CREATE2. */ | |
| 128 | +struct uhid_create_req { | |
| 129 | + __u8 name[128]; | |
| 130 | + __u8 phys[64]; | |
| 131 | + __u8 uniq[64]; | |
| 132 | + __u8 __user *rd_data; | |
| 133 | + __u16 rd_size; | |
| 134 | + | |
| 135 | + __u16 bus; | |
| 136 | + __u32 vendor; | |
| 137 | + __u32 product; | |
| 138 | + __u32 version; | |
| 139 | + __u32 country; | |
| 140 | +} __attribute__((__packed__)); | |
| 141 | + | |
| 142 | +/* Obsolete! Use UHID_INPUT2. */ | |
| 143 | +struct uhid_input_req { | |
| 88 | 144 | __u8 data[UHID_DATA_MAX]; |
| 89 | 145 | __u16 size; |
| 90 | − __u8 rtype; | |
| 91 | 146 | } __attribute__((__packed__)); |
| 92 | 147 | |
| 93 | −/* Obsolete! Newer kernels will no longer send these events but instead convert | |
| 94 | − * it into raw output reports via UHID_OUTPUT. */ | |
| 148 | +/* Obsolete! Kernel uses UHID_OUTPUT exclusively now. */ | |
| 95 | 149 | struct uhid_output_ev_req { |
| 96 | 150 | __u16 type; |
| 97 | 151 | __u16 code; |
| 98 | 152 | __s32 value; |
| 99 | 153 | } __attribute__((__packed__)); |
| 100 | 154 | |
| 155 | +/* Obsolete! Kernel uses ABI compatible UHID_GET_REPORT. */ | |
| 101 | 156 | struct uhid_feature_req { |
| 102 | 157 | __u32 id; |
| 103 | 158 | __u8 rnum; |
| 104 | 159 | __u8 rtype; |
| 105 | 160 | } __attribute__((__packed__)); |
| 106 | 161 | |
| 162 | +/* Obsolete! Use ABI compatible UHID_GET_REPORT_REPLY. */ | |
| 107 | 163 | struct uhid_feature_answer_req { |
| 108 | 164 | __u32 id; |
| 109 | 165 | __u16 err; |
| @@ -111,6 +167,15 @@ struct uhid_feature_answer_req { · 1 unmodified line | ||
| 111 | 167 | __u8 data[UHID_DATA_MAX]; |
| 112 | 168 | } __attribute__((__packed__)); |
| 113 | 169 | |
| 170 | +/* | |
| 171 | + * UHID Events | |
| 172 | + * All UHID events from and to the kernel are encoded as "struct uhid_event". | |
| 173 | + * The "type" field contains a UHID_* type identifier. All payload depends on | |
| 174 | + * that type and can be accessed via ev->u.XYZ accordingly. | |
| 175 | + * If user-space writes short events, they're extended with 0s by the kernel. If | |
| 176 | + * the kernel writes short events, user-space shall extend them with 0s. | |
| 177 | + */ | |
| 178 | + | |
| 114 | 179 | struct uhid_event { |
| 115 | 180 | __u32 type; |
| 116 | 181 | |
| @@ -120,9 +185,14 @@ struct uhid_event { · 3 unmodified lines | ||
| 120 | 185 | struct uhid_output_req output; |
| 121 | 186 | struct uhid_output_ev_req output_ev; |
| 122 | 187 | struct uhid_feature_req feature; |
| 188 | + struct uhid_get_report_req get_report; | |
| 123 | 189 | struct uhid_feature_answer_req feature_answer; |
| 190 | + struct uhid_get_report_reply_req get_report_reply; | |
| 124 | 191 | struct uhid_create2_req create2; |
| 125 | 192 | struct uhid_input2_req input2; |
| 193 | + struct uhid_set_report_req set_report; | |
| 194 | + struct uhid_set_report_reply_req set_report_reply; | |
| 195 | + struct uhid_start_req start; | |
| 126 | 196 | } u; |
| 127 | 197 | } __attribute__((__packed__)); |
| 128 | 198 | |
| @@ -84,6 +84,15 @@ struct uinput_ff_erase { · 83 unmodified lines | ||
| 84 | 84 | */ |
| 85 | 85 | #define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len) |
| 86 | 86 | |
| 87 | +/** | |
| 88 | + * UI_GET_VERSION - Return version of uinput protocol | |
| 89 | + * | |
| 90 | + * This writes uinput protocol version implemented by the kernel into | |
| 91 | + * the integer pointed to by the ioctl argument. The protocol version | |
| 92 | + * is hard-coded in the kernel and is independent of the uinput device. | |
| 93 | + */ | |
| 94 | +#define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 301, unsigned int) | |
| 95 | + | |
| 87 | 96 | /* |
| 88 | 97 | * To write a force-feedback-capable driver, the upload_effect |
| 89 | 98 | * and erase_effect callbacks in input_dev must be implemented. |
| @@ -30,6 +30,9 @@ · 29 unmodified lines | ||
| 30 | 30 | */ |
| 31 | 31 | #define VFIO_DMA_CC_IOMMU 4 |
| 32 | 32 | |
| 33 | +/* Check if EEH is supported */ | |
| 34 | +#define VFIO_EEH 5 | |
| 35 | + | |
| 33 | 36 | /* |
| 34 | 37 | * The IOCTL interface is designed for extensibility by embedding the |
| 35 | 38 | * structure length (argsz) and flags into structures passed between |
| @@ -455,6 +458,37 @@ struct vfio_iommu_spapr_tce_info { · 419 unmodified lines | ||
| 455 | 458 | |
| 456 | 459 | #define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) |
| 457 | 460 | |
| 461 | +/* | |
| 462 | + * EEH PE operation struct provides ways to: | |
| 463 | + * - enable/disable EEH functionality; | |
| 464 | + * - unfreeze IO/DMA for frozen PE; | |
| 465 | + * - read PE state; | |
| 466 | + * - reset PE; | |
| 467 | + * - configure PE. | |
| 468 | + */ | |
| 469 | +struct vfio_eeh_pe_op { | |
| 470 | + __u32 argsz; | |
| 471 | + __u32 flags; | |
| 472 | + __u32 op; | |
| 473 | +}; | |
| 474 | + | |
| 475 | +#define VFIO_EEH_PE_DISABLE 0 /* Disable EEH functionality */ | |
| 476 | +#define VFIO_EEH_PE_ENABLE 1 /* Enable EEH functionality */ | |
| 477 | +#define VFIO_EEH_PE_UNFREEZE_IO 2 /* Enable IO for frozen PE */ | |
| 478 | +#define VFIO_EEH_PE_UNFREEZE_DMA 3 /* Enable DMA for frozen PE */ | |
| 479 | +#define VFIO_EEH_PE_GET_STATE 4 /* PE state retrieval */ | |
| 480 | +#define VFIO_EEH_PE_STATE_NORMAL 0 /* PE in functional state */ | |
| 481 | +#define VFIO_EEH_PE_STATE_RESET 1 /* PE reset in progress */ | |
| 482 | +#define VFIO_EEH_PE_STATE_STOPPED 2 /* Stopped DMA and IO */ | |
| 483 | +#define VFIO_EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA only */ | |
| 484 | +#define VFIO_EEH_PE_STATE_UNAVAIL 5 /* State unavailable */ | |
| 485 | +#define VFIO_EEH_PE_RESET_DEACTIVATE 5 /* Deassert PE reset */ | |
| 486 | +#define VFIO_EEH_PE_RESET_HOT 6 /* Assert hot reset */ | |
| 487 | +#define VFIO_EEH_PE_RESET_FUNDAMENTAL 7 /* Assert fundamental reset */ | |
| 488 | +#define VFIO_EEH_PE_CONFIGURE 8 /* PE configuration */ | |
| 489 | + | |
| 490 | +#define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21) | |
| 491 | + | |
| 458 | 492 | /* ***************************************************************** */ |
| 459 | 493 | |
| 460 | 494 | #endif /* _UAPIVFIO_H */ |
| @@ -40,6 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | #define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */ |
| 41 | 41 | #define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */ |
| 42 | 42 | #define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */ |
| 43 | +#define VIRTIO_BLK_F_MQ 12 /* support more than one vq */ | |
| 43 | 44 | |
| 44 | 45 | #ifndef __KERNEL__ |
| 45 | 46 | /* Old (deprecated) name for VIRTIO_BLK_F_WCE. */ |
| @@ -77,6 +78,10 @@ struct virtio_blk_config { · 31 unmodified lines | ||
| 77 | 78 | |
| 78 | 79 | /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */ |
| 79 | 80 | __u8 wce; |
| 81 | + __u8 unused; | |
| 82 | + | |
| 83 | + /* number of vqs, only available when VIRTIO_BLK_F_MQ is set */ | |
| 84 | + __u16 num_queues; | |
| 80 | 85 | } __attribute__((packed)); |
| 81 | 86 | |
| 82 | 87 | /* |
| @@ -191,6 +191,45 @@ struct ib_user_mad_reg_req { · 190 unmodified lines | ||
| 191 | 191 | __u8 rmpp_version; |
| 192 | 192 | }; |
| 193 | 193 | |
| 194 | +/** | |
| 195 | + * ib_user_mad_reg_req2 - MAD registration request | |
| 196 | + * | |
| 197 | + * @id - Set by the _kernel_; used by userspace to identify the | |
| 198 | + * registered agent in future requests. | |
| 199 | + * @qpn - Queue pair number; must be 0 or 1. | |
| 200 | + * @mgmt_class - Indicates which management class of MADs should be | |
| 201 | + * receive by the caller. This field is only required if | |
| 202 | + * the user wishes to receive unsolicited MADs, otherwise | |
| 203 | + * it should be 0. | |
| 204 | + * @mgmt_class_version - Indicates which version of MADs for the given | |
| 205 | + * management class to receive. | |
| 206 | + * @res - Ignored. | |
| 207 | + * @flags - additional registration flags; Must be in the set of | |
| 208 | + * flags defined in IB_USER_MAD_REG_FLAGS_CAP | |
| 209 | + * @method_mask - The caller wishes to receive unsolicited MADs for the | |
| 210 | + * methods whose bit(s) is(are) set. | |
| 211 | + * @oui - Indicates IEEE OUI to use when mgmt_class is a vendor | |
| 212 | + * class in the range from 0x30 to 0x4f. Otherwise not | |
| 213 | + * used. | |
| 214 | + * @rmpp_version - If set, indicates the RMPP version to use. | |
| 215 | + */ | |
| 216 | +enum { | |
| 217 | + IB_USER_MAD_USER_RMPP = (1 << 0), | |
| 218 | +}; | |
| 219 | +#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP) | |
| 220 | +struct ib_user_mad_reg_req2 { | |
| 221 | + __u32 id; | |
| 222 | + __u32 qpn; | |
| 223 | + __u8 mgmt_class; | |
| 224 | + __u8 mgmt_class_version; | |
| 225 | + __u16 res; | |
| 226 | + __u32 flags; | |
| 227 | + __u64 method_mask[2]; | |
| 228 | + __u32 oui; | |
| 229 | + __u8 rmpp_version; | |
| 230 | + __u8 reserved[3]; | |
| 231 | +}; | |
| 232 | + | |
| 194 | 233 | #define IB_IOCTL_MAGIC 0x1b |
| 195 | 234 | |
| 196 | 235 | #define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, \ |
| @@ -200,4 +239,7 @@ struct ib_user_mad_reg_req { · 3 unmodified lines | ||
| 200 | 239 | |
| 201 | 240 | #define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3) |
| 202 | 241 | |
| 242 | +#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(IB_IOCTL_MAGIC, 4, \ | |
| 243 | + struct ib_user_mad_reg_req2) | |
| 244 | + | |
| 203 | 245 | #endif /* IB_USER_MAD_H */ |
| @@ -276,6 +276,22 @@ struct ib_uverbs_reg_mr_resp { · 275 unmodified lines | ||
| 276 | 276 | __u32 rkey; |
| 277 | 277 | }; |
| 278 | 278 | |
| 279 | +struct ib_uverbs_rereg_mr { | |
| 280 | + __u64 response; | |
| 281 | + __u32 mr_handle; | |
| 282 | + __u32 flags; | |
| 283 | + __u64 start; | |
| 284 | + __u64 length; | |
| 285 | + __u64 hca_va; | |
| 286 | + __u32 pd_handle; | |
| 287 | + __u32 access_flags; | |
| 288 | +}; | |
| 289 | + | |
| 290 | +struct ib_uverbs_rereg_mr_resp { | |
| 291 | + __u32 lkey; | |
| 292 | + __u32 rkey; | |
| 293 | +}; | |
| 294 | + | |
| 279 | 295 | struct ib_uverbs_dereg_mr { |
| 280 | 296 | __u32 mr_handle; |
| 281 | 297 | }; |
| @@ -34,6 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | #define RDMA_USER_CM_H |
| 35 | 35 | |
| 36 | 36 | #include <linux/types.h> |
| 37 | +#include <linux/socket.h> | |
| 37 | 38 | #include <linux/in6.h> |
| 38 | 39 | #include <rdma/ib_user_verbs.h> |
| 39 | 40 | #include <rdma/ib_user_sa.h> |