History

Merge branches 'for-3.18/always-poll-quirk', 'for-3.18/logitech', 'for-3.18/picolcd', 'for-3.18/rmi', 'for-3.18/sony', 'for-3.18/uhid', 'for-3.18/upstream' and 'for-3.18/wacom' into for-linus

Jiri Kosina committed 12 years ago

Commit ee5db7e9 parents 467669c 5235166 368d4e5 604b607 5b65c2a 981c5b4 8493ecc 5df4eb0 5ae6e894357 files · +172503 −102549Browse files

Showing the changes to include/uapi (20 of 4357 files). Show all

Unified · Split

20 files
  1. include/uapi/asm-generic/unistd.h +3 −1
  2. include/uapi/drm/drm.h +1 −1
  3. include/uapi/drm/drm_mode.h +5 −0
  4. include/uapi/drm/nouveau_drm.h +11 −0
  5. include/uapi/drm/radeon_drm.h +4 −1
  6. include/uapi/drm/tegra_drm.h +46 −0
  7. include/uapi/linux/bsg.h +6 −5
  8. include/uapi/linux/fcntl.h +15 −0
  9. include/uapi/linux/in6.h +1 −1
  10. include/uapi/linux/kexec.h +11 −0
  11. include/uapi/linux/kvm.h +4 −2
  12. include/uapi/linux/memfd.h +8 −0
  13. include/uapi/linux/serio.h +1 −0
  14. include/uapi/linux/uhid.h +95 −25
  15. include/uapi/linux/uinput.h +9 −0
  16. include/uapi/linux/vfio.h +34 −0
  17. include/uapi/linux/virtio_blk.h +5 −0
  18. include/uapi/rdma/ib_user_mad.h +42 −0
  19. include/uapi/rdma/ib_user_verbs.h +16 −0
  20. include/uapi/rdma/rdma_user_cm.h +1 −0
include/uapi/asm-generic/unistd.h+3−1
@@ -703,9 +703,11 @@ __SYSCALL(__NR_renameat2, sys_renameat2) · 702 unmodified lines
703__SYSCALL(__NR_seccomp, sys_seccomp)703__SYSCALL(__NR_seccomp, sys_seccomp)
704#define __NR_getrandom 278704#define __NR_getrandom 278
705__SYSCALL(__NR_getrandom, sys_getrandom)705__SYSCALL(__NR_getrandom, sys_getrandom)
706#define __NR_memfd_create 279
707__SYSCALL(__NR_memfd_create, sys_memfd_create)
706 708
707#undef __NR_syscalls709#undef __NR_syscalls
708#define __NR_syscalls 279710#define __NR_syscalls 280
709 711
710/*712/*
711 * All syscalls below here should go away really,713 * All syscalls below here should go away really,
include/uapi/drm/drm.h+1−1
@@ -780,7 +780,7 @@ struct drm_prime_handle { · 779 unmodified lines
780 780
781/**781/**
782 * Device specific ioctls should only be in their respective headers782 * 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 * Generic IOCTLS restart at 0xA0.784 * Generic IOCTLS restart at 0xA0.
785 *785 *
786 * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and786 * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and
include/uapi/drm/drm_mode.h+5−0
@@ -88,6 +88,11 @@ · 87 unmodified lines
88#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */88#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
89#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */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/* Dithering mode options */96/* Dithering mode options */
92#define DRM_MODE_DITHERING_OFF 097#define DRM_MODE_DITHERING_OFF 0
93#define DRM_MODE_DITHERING_ON 198#define DRM_MODE_DITHERING_ON 1
include/uapi/drm/nouveau_drm.h+11−0
@@ -25,6 +25,16 @@ · 24 unmodified lines
25#ifndef __NOUVEAU_DRM_H__25#ifndef __NOUVEAU_DRM_H__
26#define __NOUVEAU_DRM_H__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#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)38#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
29#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)39#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
30#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)40#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
@@ -123,6 +133,7 @@ struct drm_nouveau_gem_cpu_fini { · 92 unmodified lines
123#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */133#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */
124#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */134#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */
125#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */135#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */
136#define DRM_NOUVEAU_NVIF 0x07
126#define DRM_NOUVEAU_GEM_NEW 0x40137#define DRM_NOUVEAU_GEM_NEW 0x40
127#define DRM_NOUVEAU_GEM_PUSHBUF 0x41138#define DRM_NOUVEAU_GEM_PUSHBUF 0x41
128#define DRM_NOUVEAU_GEM_CPU_PREP 0x42139#define DRM_NOUVEAU_GEM_CPU_PREP 0x42
include/uapi/drm/radeon_drm.h+4−1
@@ -796,7 +796,9 @@ struct drm_radeon_gem_info { · 795 unmodified lines
796 uint64_t vram_visible;796 uint64_t vram_visible;
797};797};
798 798
799#define RADEON_GEM_NO_BACKING_STORE 1799#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
801struct drm_radeon_gem_create {803struct drm_radeon_gem_create {
802 uint64_t size;804 uint64_t size;
@@ -942,6 +944,7 @@ struct drm_radeon_cs_chunk { · 139 unmodified lines
942};944};
943 945
944/* drm_radeon_cs_reloc.flags */946/* drm_radeon_cs_reloc.flags */
947#define RADEON_RELOC_PRIO_MASK (0xf << 0)
945 948
946struct drm_radeon_cs_reloc {949struct drm_radeon_cs_reloc {
947 uint32_t handle;950 uint32_t handle;
include/uapi/drm/tegra_drm.h+46−0
@@ -129,6 +129,44 @@ struct drm_tegra_submit { · 128 unmodified lines
129 __u32 reserved[5]; /* future expansion */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
136struct drm_tegra_gem_set_tiling {
137 /* input */
138 __u32 handle;
139 __u32 mode;
140 __u32 value;
141 __u32 pad;
142};
143
144struct 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
156struct drm_tegra_gem_set_flags {
157 /* input */
158 __u32 handle;
159 /* output */
160 __u32 flags;
161};
162
163struct drm_tegra_gem_get_flags {
164 /* input */
165 __u32 handle;
166 /* output */
167 __u32 flags;
168};
169
132#define DRM_TEGRA_GEM_CREATE 0x00170#define DRM_TEGRA_GEM_CREATE 0x00
133#define DRM_TEGRA_GEM_MMAP 0x01171#define DRM_TEGRA_GEM_MMAP 0x01
134#define DRM_TEGRA_SYNCPT_READ 0x02172#define DRM_TEGRA_SYNCPT_READ 0x02
@@ -139,6 +177,10 @@ struct drm_tegra_submit { · 4 unmodified lines
139#define DRM_TEGRA_GET_SYNCPT 0x07177#define DRM_TEGRA_GET_SYNCPT 0x07
140#define DRM_TEGRA_SUBMIT 0x08178#define DRM_TEGRA_SUBMIT 0x08
141#define DRM_TEGRA_GET_SYNCPT_BASE 0x09179#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#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)185#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
144#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)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#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)192#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
151#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)193#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
152#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)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#endif200#endif
include/uapi/linux/bsg.h+6−5
@@ -10,12 +10,13 @@ · 9 unmodified lines
10#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 210#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2
11 11
12/*12/*
13 * For flags member below13 * For flag constants below:
14 * sg.h sg_io_hdr also has bits defined for it's flags member. However14 * sg.h sg_io_hdr also has bits defined for it's flags member. These
15 * none of these bits are implemented/used by bsg. The bits below are15 * two flag values (0x10 and 0x20) have the same meaning in sg.h . For
16 * allocated to not conflict with sg.h ones anyway.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
20struct sg_io_v4 {21struct sg_io_v4 {
21 __s32 guard; /* [i] 'Q' to differentiate from v3 */22 __s32 guard; /* [i] 'Q' to differentiate from v3 */
include/uapi/linux/fcntl.h+15−0
@@ -27,6 +27,21 @@ · 26 unmodified lines
27#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)27#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
28#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)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 * Types of directory notifications that may be requested.46 * Types of directory notifications that may be requested.
32 */47 */
include/uapi/linux/in6.h+1−1
@@ -233,7 +233,6 @@ struct in6_flowlabel_req { · 232 unmodified lines
233#if 0 /* not yet */233#if 0 /* not yet */
234#define IPV6_USE_MIN_MTU 63234#define IPV6_USE_MIN_MTU 63
235#endif235#endif
236#define IPV6_AUTOFLOWLABEL 64
237 236
238/*237/*
239 * Netfilter (1)238 * Netfilter (1)
@@ -262,6 +261,7 @@ struct in6_flowlabel_req { · 22 unmodified lines
262 * IP6T_SO_ORIGINAL_DST 80261 * IP6T_SO_ORIGINAL_DST 80
263 */262 */
264 263
264#define IPV6_AUTOFLOWLABEL 70
265/* RFC5014: Source address selection */265/* RFC5014: Source address selection */
266#define IPV6_ADDR_PREFERENCES 72266#define IPV6_ADDR_PREFERENCES 72
267 267
include/uapi/linux/kexec.h+11−0
@@ -13,6 +13,17 @@ · 12 unmodified lines
13#define KEXEC_PRESERVE_CONTEXT 0x0000000213#define KEXEC_PRESERVE_CONTEXT 0x00000002
14#define KEXEC_ARCH_MASK 0xffff000014#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/* These values match the ELF architecture values.27/* These values match the ELF architecture values.
17 * Unless there is a good reason that should continue to be the case.28 * Unless there is a good reason that should continue to be the case.
18 */29 */
include/uapi/linux/kvm.h+4−2
@@ -162,7 +162,7 @@ struct kvm_pit_config { · 161 unmodified lines
162#define KVM_EXIT_TPR_ACCESS 12162#define KVM_EXIT_TPR_ACCESS 12
163#define KVM_EXIT_S390_SIEIC 13163#define KVM_EXIT_S390_SIEIC 13
164#define KVM_EXIT_S390_RESET 14164#define KVM_EXIT_S390_RESET 14
165#define KVM_EXIT_DCR 15165#define KVM_EXIT_DCR 15 /* deprecated */
166#define KVM_EXIT_NMI 16166#define KVM_EXIT_NMI 16
167#define KVM_EXIT_INTERNAL_ERROR 17167#define KVM_EXIT_INTERNAL_ERROR 17
168#define KVM_EXIT_OSI 18168#define KVM_EXIT_OSI 18
@@ -268,7 +268,7 @@ struct kvm_run { · 99 unmodified lines
268 __u64 trans_exc_code;268 __u64 trans_exc_code;
269 __u32 pgm_code;269 __u32 pgm_code;
270 } s390_ucontrol;270 } s390_ucontrol;
271 /* KVM_EXIT_DCR */271 /* KVM_EXIT_DCR (deprecated) */
272 struct {272 struct {
273 __u32 dcrn;273 __u32 dcrn;
274 __u32 data;274 __u32 data;
@@ -763,6 +763,8 @@ struct kvm_ppc_smmu_info { · 488 unmodified lines
763#define KVM_CAP_VM_ATTRIBUTES 101763#define KVM_CAP_VM_ATTRIBUTES 101
764#define KVM_CAP_ARM_PSCI_0_2 102764#define KVM_CAP_ARM_PSCI_0_2 102
765#define KVM_CAP_PPC_FIXUP_HCALL 103765#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#ifdef KVM_CAP_IRQ_ROUTING769#ifdef KVM_CAP_IRQ_ROUTING
768 770
include/uapi/linux/memfd.h+8−0
@@ -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 */
include/uapi/linux/serio.h+1−0
@@ -76,5 +76,6 @@ · 75 unmodified lines
76#define SERIO_HAMPSHIRE 0x3b76#define SERIO_HAMPSHIRE 0x3b
77#define SERIO_PS2MULT 0x3c77#define SERIO_PS2MULT 0x3c
78#define SERIO_TSC40 0x3d78#define SERIO_TSC40 0x3d
79#define SERIO_WACOM_IV 0x3e
79 80
80#endif /* _UAPI_SERIO_H */81#endif /* _UAPI_SERIO_H */
include/uapi/linux/uhid.h+95−25
@@ -24,35 +24,23 @@ · 23 unmodified lines
24#include <linux/hid.h>24#include <linux/hid.h>
25 25
26enum uhid_event_type {26enum uhid_event_type {
27 UHID_CREATE,27 __UHID_LEGACY_CREATE,
28 UHID_DESTROY,28 UHID_DESTROY,
29 UHID_START,29 UHID_START,
30 UHID_STOP,30 UHID_STOP,
31 UHID_OPEN,31 UHID_OPEN,
32 UHID_CLOSE,32 UHID_CLOSE,
33 UHID_OUTPUT,33 UHID_OUTPUT,
34 UHID_OUTPUT_EV, /* obsolete! */34 __UHID_LEGACY_OUTPUT_EV,
35 UHID_INPUT,35 __UHID_LEGACY_INPUT,
36 UHID_FEATURE,36 UHID_GET_REPORT,
37 UHID_FEATURE_ANSWER,37 UHID_GET_REPORT_REPLY,
38 UHID_CREATE2,38 UHID_CREATE2,
39 UHID_INPUT2,39 UHID_INPUT2,
40 UHID_SET_REPORT,
41 UHID_SET_REPORT_REPLY,
40};42};
41 43
42struct 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
56struct uhid_create2_req {44struct uhid_create2_req {
57 __u8 name[128];45 __u8 name[128];
58 __u8 phys[64];46 __u8 phys[64];
@@ -66,6 +54,16 @@ struct uhid_create2_req { · 7 unmodified lines
66 __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE];54 __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE];
67} __attribute__((__packed__));55} __attribute__((__packed__));
68 56
57enum 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
63struct uhid_start_req {
64 __u64 dev_flags;
65};
66
69#define UHID_DATA_MAX 409667#define UHID_DATA_MAX 4096
70 68
71enum uhid_report_type {69enum uhid_report_type {
@@ -74,36 +72,94 @@ enum uhid_report_type { · 2 unmodified lines
74 UHID_INPUT_REPORT,72 UHID_INPUT_REPORT,
75};73};
76 74
77struct uhid_input_req {75struct uhid_input2_req {
76 __u16 size;
77 __u8 data[UHID_DATA_MAX];
78} __attribute__((__packed__));
79
80struct uhid_output_req {
78 __u8 data[UHID_DATA_MAX];81 __u8 data[UHID_DATA_MAX];
79 __u16 size;82 __u16 size;
83 __u8 rtype;
80} __attribute__((__packed__));84} __attribute__((__packed__));
81 85
82struct uhid_input2_req {86struct uhid_get_report_req {
87 __u32 id;
88 __u8 rnum;
89 __u8 rtype;
90} __attribute__((__packed__));
91
92struct uhid_get_report_reply_req {
93 __u32 id;
94 __u16 err;
83 __u16 size;95 __u16 size;
84 __u8 data[UHID_DATA_MAX];96 __u8 data[UHID_DATA_MAX];
85} __attribute__((__packed__));97} __attribute__((__packed__));
86 98
87struct uhid_output_req {99struct 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
107struct 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
119enum 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. */
128struct 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. */
143struct uhid_input_req {
88 __u8 data[UHID_DATA_MAX];144 __u8 data[UHID_DATA_MAX];
89 __u16 size;145 __u16 size;
90 __u8 rtype;
91} __attribute__((__packed__));146} __attribute__((__packed__));
92 147
93/* Obsolete! Newer kernels will no longer send these events but instead convert148/* Obsolete! Kernel uses UHID_OUTPUT exclusively now. */
94 * it into raw output reports via UHID_OUTPUT. */
95struct uhid_output_ev_req {149struct uhid_output_ev_req {
96 __u16 type;150 __u16 type;
97 __u16 code;151 __u16 code;
98 __s32 value;152 __s32 value;
99} __attribute__((__packed__));153} __attribute__((__packed__));
100 154
155/* Obsolete! Kernel uses ABI compatible UHID_GET_REPORT. */
101struct uhid_feature_req {156struct uhid_feature_req {
102 __u32 id;157 __u32 id;
103 __u8 rnum;158 __u8 rnum;
104 __u8 rtype;159 __u8 rtype;
105} __attribute__((__packed__));160} __attribute__((__packed__));
106 161
162/* Obsolete! Use ABI compatible UHID_GET_REPORT_REPLY. */
107struct uhid_feature_answer_req {163struct uhid_feature_answer_req {
108 __u32 id;164 __u32 id;
109 __u16 err;165 __u16 err;
@@ -111,6 +167,15 @@ struct uhid_feature_answer_req { · 1 unmodified line
111 __u8 data[UHID_DATA_MAX];167 __u8 data[UHID_DATA_MAX];
112} __attribute__((__packed__));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
114struct uhid_event {179struct uhid_event {
115 __u32 type;180 __u32 type;
116 181
@@ -120,9 +185,14 @@ struct uhid_event { · 3 unmodified lines
120 struct uhid_output_req output;185 struct uhid_output_req output;
121 struct uhid_output_ev_req output_ev;186 struct uhid_output_ev_req output_ev;
122 struct uhid_feature_req feature;187 struct uhid_feature_req feature;
188 struct uhid_get_report_req get_report;
123 struct uhid_feature_answer_req feature_answer;189 struct uhid_feature_answer_req feature_answer;
190 struct uhid_get_report_reply_req get_report_reply;
124 struct uhid_create2_req create2;191 struct uhid_create2_req create2;
125 struct uhid_input2_req input2;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 } u;196 } u;
127} __attribute__((__packed__));197} __attribute__((__packed__));
128 198
include/uapi/linux/uinput.h+9−0
@@ -84,6 +84,15 @@ struct uinput_ff_erase { · 83 unmodified lines
84 */84 */
85#define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len)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 * To write a force-feedback-capable driver, the upload_effect97 * To write a force-feedback-capable driver, the upload_effect
89 * and erase_effect callbacks in input_dev must be implemented.98 * and erase_effect callbacks in input_dev must be implemented.
include/uapi/linux/vfio.h+34−0
@@ -30,6 +30,9 @@ · 29 unmodified lines
30 */30 */
31#define VFIO_DMA_CC_IOMMU 431#define VFIO_DMA_CC_IOMMU 4
32 32
33/* Check if EEH is supported */
34#define VFIO_EEH 5
35
33/*36/*
34 * The IOCTL interface is designed for extensibility by embedding the37 * The IOCTL interface is designed for extensibility by embedding the
35 * structure length (argsz) and flags into structures passed between38 * 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#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)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 */
469struct 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#endif /* _UAPIVFIO_H */494#endif /* _UAPIVFIO_H */
include/uapi/linux/virtio_blk.h+5−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
40#define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */40#define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */
41#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */41#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
42#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */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#ifndef __KERNEL__45#ifndef __KERNEL__
45/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */46/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
@@ -77,6 +78,10 @@ struct virtio_blk_config { · 31 unmodified lines
77 78
78 /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */79 /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
79 __u8 wce;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} __attribute__((packed));85} __attribute__((packed));
81 86
82/*87/*
include/uapi/rdma/ib_user_mad.h+42−0
@@ -191,6 +191,45 @@ struct ib_user_mad_reg_req { · 190 unmodified lines
191 __u8 rmpp_version;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 */
216enum {
217 IB_USER_MAD_USER_RMPP = (1 << 0),
218};
219#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
220struct 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#define IB_IOCTL_MAGIC 0x1b233#define IB_IOCTL_MAGIC 0x1b
195 234
196#define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, \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#define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3)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#endif /* IB_USER_MAD_H */245#endif /* IB_USER_MAD_H */
include/uapi/rdma/ib_user_verbs.h+16−0
@@ -276,6 +276,22 @@ struct ib_uverbs_reg_mr_resp { · 275 unmodified lines
276 __u32 rkey;276 __u32 rkey;
277};277};
278 278
279struct 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
290struct ib_uverbs_rereg_mr_resp {
291 __u32 lkey;
292 __u32 rkey;
293};
294
279struct ib_uverbs_dereg_mr {295struct ib_uverbs_dereg_mr {
280 __u32 mr_handle;296 __u32 mr_handle;
281};297};
include/uapi/rdma/rdma_user_cm.h+1−0
@@ -34,6 +34,7 @@ · 33 unmodified lines
34#define RDMA_USER_CM_H34#define RDMA_USER_CM_H
35 35
36#include <linux/types.h>36#include <linux/types.h>
37#include <linux/socket.h>
37#include <linux/in6.h>38#include <linux/in6.h>
38#include <rdma/ib_user_verbs.h>39#include <rdma/ib_user_verbs.h>
39#include <rdma/ib_user_sa.h>40#include <rdma/ib_user_sa.h>