History

Merge drm/drm-next into drm-misc-next

Backmerging to get v5.12 fixes. Requested for vmwgfx.

Thomas Zimmermann committed 5 years ago

Commit fd531022 parents eb185a3 6efb94311090 files · +450066 −215332Browse files

Showing the changes to include/uapi (70 of 11090 files). Show all

Unified · Split

70 files
  1. include/uapi/asm-generic/siginfo.h +5 −1
  2. include/uapi/asm-generic/unistd.h +10 −1
  3. include/uapi/linux/android/binder.h +28 −0
  4. include/uapi/linux/bpf.h +831 −3
  5. include/uapi/linux/btf.h +3 −2
  6. include/uapi/linux/capability.h +2 −1
  7. include/uapi/linux/cec.h +2 −1
  8. include/uapi/linux/cyclades.h +0 −494
  9. include/uapi/linux/dm-ioctl.h +16 −2
  10. include/uapi/linux/dqblk_xfs.h +4 −1
  11. include/uapi/linux/elf.h +1 −0
  12. include/uapi/linux/ethtool.h +44 −11
  13. include/uapi/linux/ethtool_netlink.h +187 −0
  14. include/uapi/linux/fd.h +23 −23
  15. include/uapi/linux/fuse.h +14 −0
  16. include/uapi/linux/icmp.h +42 −0
  17. include/uapi/linux/icmpv6.h +3 −0
  18. include/uapi/linux/idxd.h +2 −2
  19. include/uapi/linux/if_bonding.h +0 −11
  20. include/uapi/linux/if_fddi.h +1 −1
  21. include/uapi/linux/if_link.h +1 −0
  22. include/uapi/linux/iio/buffer.h +10 −0
  23. include/uapi/linux/io_uring.h +40 −0
  24. include/uapi/linux/iommu.h +2 −1
  25. include/uapi/linux/kexec.h +1 −0
  26. include/uapi/linux/kvm.h +45 −0
  27. include/uapi/linux/landlock.h +137 −0
  28. include/uapi/linux/lightnvm.h +0 −1
  29. include/uapi/linux/major.h +0 −2
  30. include/uapi/linux/map_to_7segment.h +0 −14
  31. include/uapi/linux/mdio.h +2 −0
  32. include/uapi/linux/mempolicy.h +7 −0
  33. include/uapi/linux/mptcp.h +11 −0
  34. include/uapi/linux/netfilter/nf_tables.h +6 −0
  35. include/uapi/linux/netfilter/xt_SECMARK.h +6 −0
  36. include/uapi/linux/nexthop.h +46 −1
  37. include/uapi/linux/nfs4.h +0 −6
  38. include/uapi/linux/nfsd/nfsfh.h +19 −8
  39. include/uapi/linux/nl80211.h +22 −0
  40. include/uapi/linux/perf_event.h +36 −5
  41. include/uapi/linux/pkt_cls.h +2 −0
  42. include/uapi/linux/prctl.h +4 −0
  43. include/uapi/linux/psample.h +7 −0
  44. include/uapi/linux/ptrace.h +10 −0
  45. include/uapi/linux/rkisp1-config.h +8 −8
  46. include/uapi/linux/rpmsg.h +11 −2
  47. include/uapi/linux/rtnetlink.h +8 −0
  48. include/uapi/linux/seg6_local.h +30 −0
  49. include/uapi/linux/serial.h +2 −2
  50. include/uapi/linux/signalfd.h +3 −1
  51. include/uapi/linux/surface_aggregator/dtx.h +146 −0
  52. include/uapi/linux/thermal.h +1 −1
  53. include/uapi/linux/tty_flags.h +4 −4
  54. include/uapi/linux/usb/video.h +2 −1
  55. include/uapi/linux/userfaultfd.h +32 −4
  56. include/uapi/linux/uvcvideo.h +5 −5
  57. include/uapi/linux/v4l2-controls.h +240 −1
  58. include/uapi/linux/v4l2-subdev.h +11 −1
  59. include/uapi/linux/vfio.h +8 −0
  60. include/uapi/linux/videodev2.h +22 −1
  61. include/uapi/linux/virtio_bt.h +31 −0
  62. include/uapi/linux/virtio_ids.h +2 −0
  63. include/uapi/linux/virtio_snd.h +334 −0
  64. include/uapi/misc/habanalabs.h +57 −20
  65. include/uapi/misc/uacce/hisi_qm.h +1 −0
  66. include/uapi/mtd/mtd-abi.h +2 −0
  67. include/uapi/rdma/hns-abi.h +2 −0
  68. include/uapi/rdma/mlx5_user_ioctl_cmds.h +29 −0
  69. include/uapi/rdma/mlx5_user_ioctl_verbs.h +25 −0
  70. include/uapi/rdma/rdma_netlink.h +16 −0
include/uapi/asm-generic/siginfo.h+5−1
@@ -91,6 +91,8 @@ union __sifields { · 90 unmodified lines
91 char _dummy_pkey[__ADDR_BND_PKEY_PAD];91 char _dummy_pkey[__ADDR_BND_PKEY_PAD];
92 __u32 _pkey;92 __u32 _pkey;
93 } _addr_pkey;93 } _addr_pkey;
94 /* used when si_code=TRAP_PERF */
95 unsigned long _perf;
94 };96 };
95 } _sigfault;97 } _sigfault;
96 98
@@ -155,6 +157,7 @@ typedef struct siginfo { · 58 unmodified lines
155#define si_lower _sifields._sigfault._addr_bnd._lower157#define si_lower _sifields._sigfault._addr_bnd._lower
156#define si_upper _sifields._sigfault._addr_bnd._upper158#define si_upper _sifields._sigfault._addr_bnd._upper
157#define si_pkey _sifields._sigfault._addr_pkey._pkey159#define si_pkey _sifields._sigfault._addr_pkey._pkey
160#define si_perf _sifields._sigfault._perf
158#define si_band _sifields._sigpoll._band161#define si_band _sifields._sigpoll._band
159#define si_fd _sifields._sigpoll._fd162#define si_fd _sifields._sigpoll._fd
160#define si_call_addr _sifields._sigsys._call_addr163#define si_call_addr _sifields._sigsys._call_addr
@@ -253,7 +256,8 @@ typedef struct siginfo { · 92 unmodified lines
253#define TRAP_BRANCH 3 /* process taken branch trap */256#define TRAP_BRANCH 3 /* process taken branch trap */
254#define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */257#define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */
255#define TRAP_UNK 5 /* undiagnosed trap */258#define TRAP_UNK 5 /* undiagnosed trap */
256#define NSIGTRAP 5259#define TRAP_PERF 6 /* perf event with sigtrap=1 */
260#define NSIGTRAP 6
257 261
258/*262/*
259 * There is an additional set of SIGTRAP si_codes used by ptrace263 * There is an additional set of SIGTRAP si_codes used by ptrace
include/uapi/asm-generic/unistd.h+10−1
@@ -863,9 +863,18 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise) · 862 unmodified lines
863__SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2)863__SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2)
864#define __NR_mount_setattr 442864#define __NR_mount_setattr 442
865__SYSCALL(__NR_mount_setattr, sys_mount_setattr)865__SYSCALL(__NR_mount_setattr, sys_mount_setattr)
866#define __NR_quotactl_path 443
867__SYSCALL(__NR_quotactl_path, sys_quotactl_path)
868
869#define __NR_landlock_create_ruleset 444
870__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
871#define __NR_landlock_add_rule 445
872__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
873#define __NR_landlock_restrict_self 446
874__SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)
866 875
867#undef __NR_syscalls876#undef __NR_syscalls
868#define __NR_syscalls 443877#define __NR_syscalls 447
869 878
870/*879/*
871 * 32 bit systems traditionally used different880 * 32 bit systems traditionally used different
include/uapi/linux/android/binder.h+28−0
@@ -217,6 +217,18 @@ struct binder_node_info_for_ref { · 216 unmodified lines
217 __u32 reserved3;217 __u32 reserved3;
218};218};
219 219
220struct binder_freeze_info {
221 __u32 pid;
222 __u32 enable;
223 __u32 timeout_ms;
224};
225
226struct binder_frozen_status_info {
227 __u32 pid;
228 __u32 sync_recv;
229 __u32 async_recv;
230};
231
220#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)232#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
221#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)233#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)
222#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)234#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)
@@ -227,6 +239,9 @@ struct binder_node_info_for_ref { · 4 unmodified lines
227#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info)239#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info)
228#define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref)240#define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref)
229#define BINDER_SET_CONTEXT_MGR_EXT _IOW('b', 13, struct flat_binder_object)241#define BINDER_SET_CONTEXT_MGR_EXT _IOW('b', 13, struct flat_binder_object)
242#define BINDER_FREEZE _IOW('b', 14, struct binder_freeze_info)
243#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info)
244#define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32)
230 245
231/*246/*
232 * NOTE: Two special error codes you should check for when calling247 * NOTE: Two special error codes you should check for when calling
@@ -408,6 +423,19 @@ enum binder_driver_return_protocol { · 175 unmodified lines
408 * The last transaction (either a bcTRANSACTION or423 * The last transaction (either a bcTRANSACTION or
409 * a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters.424 * a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters.
410 */425 */
426
427 BR_FROZEN_REPLY = _IO('r', 18),
428 /*
429 * The target of the last transaction (either a bcTRANSACTION or
430 * a bcATTEMPT_ACQUIRE) is frozen. No parameters.
431 */
432
433 BR_ONEWAY_SPAM_SUSPECT = _IO('r', 19),
434 /*
435 * Current process sent too many oneway calls to target, and the last
436 * asynchronous transaction makes the allocated async buffer size exceed
437 * detection threshold. No parameters.
438 */
411};439};
412 440
413enum binder_driver_command_protocol {441enum binder_driver_command_protocol {
include/uapi/linux/bpf.h+831−3
@@ -93,7 +93,738 @@ union bpf_iter_link_info { · 92 unmodified lines
93 } map;93 } map;
94};94};
95 95
96/* BPF syscall commands, see bpf(2) man-page for details. */96/* BPF syscall commands, see bpf(2) man-page for more details. */
97/**
98 * DOC: eBPF Syscall Preamble
99 *
100 * The operation to be performed by the **bpf**\ () system call is determined
101 * by the *cmd* argument. Each operation takes an accompanying argument,
102 * provided via *attr*, which is a pointer to a union of type *bpf_attr* (see
103 * below). The size argument is the size of the union pointed to by *attr*.
104 */
105/**
106 * DOC: eBPF Syscall Commands
107 *
108 * BPF_MAP_CREATE
109 * Description
110 * Create a map and return a file descriptor that refers to the
111 * map. The close-on-exec file descriptor flag (see **fcntl**\ (2))
112 * is automatically enabled for the new file descriptor.
113 *
114 * Applying **close**\ (2) to the file descriptor returned by
115 * **BPF_MAP_CREATE** will delete the map (but see NOTES).
116 *
117 * Return
118 * A new file descriptor (a nonnegative integer), or -1 if an
119 * error occurred (in which case, *errno* is set appropriately).
120 *
121 * BPF_MAP_LOOKUP_ELEM
122 * Description
123 * Look up an element with a given *key* in the map referred to
124 * by the file descriptor *map_fd*.
125 *
126 * The *flags* argument may be specified as one of the
127 * following:
128 *
129 * **BPF_F_LOCK**
130 * Look up the value of a spin-locked map without
131 * returning the lock. This must be specified if the
132 * elements contain a spinlock.
133 *
134 * Return
135 * Returns zero on success. On error, -1 is returned and *errno*
136 * is set appropriately.
137 *
138 * BPF_MAP_UPDATE_ELEM
139 * Description
140 * Create or update an element (key/value pair) in a specified map.
141 *
142 * The *flags* argument should be specified as one of the
143 * following:
144 *
145 * **BPF_ANY**
146 * Create a new element or update an existing element.
147 * **BPF_NOEXIST**
148 * Create a new element only if it did not exist.
149 * **BPF_EXIST**
150 * Update an existing element.
151 * **BPF_F_LOCK**
152 * Update a spin_lock-ed map element.
153 *
154 * Return
155 * Returns zero on success. On error, -1 is returned and *errno*
156 * is set appropriately.
157 *
158 * May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**,
159 * **E2BIG**, **EEXIST**, or **ENOENT**.
160 *
161 * **E2BIG**
162 * The number of elements in the map reached the
163 * *max_entries* limit specified at map creation time.
164 * **EEXIST**
165 * If *flags* specifies **BPF_NOEXIST** and the element
166 * with *key* already exists in the map.
167 * **ENOENT**
168 * If *flags* specifies **BPF_EXIST** and the element with
169 * *key* does not exist in the map.
170 *
171 * BPF_MAP_DELETE_ELEM
172 * Description
173 * Look up and delete an element by key in a specified map.
174 *
175 * Return
176 * Returns zero on success. On error, -1 is returned and *errno*
177 * is set appropriately.
178 *
179 * BPF_MAP_GET_NEXT_KEY
180 * Description
181 * Look up an element by key in a specified map and return the key
182 * of the next element. Can be used to iterate over all elements
183 * in the map.
184 *
185 * Return
186 * Returns zero on success. On error, -1 is returned and *errno*
187 * is set appropriately.
188 *
189 * The following cases can be used to iterate over all elements of
190 * the map:
191 *
192 * * If *key* is not found, the operation returns zero and sets
193 * the *next_key* pointer to the key of the first element.
194 * * If *key* is found, the operation returns zero and sets the
195 * *next_key* pointer to the key of the next element.
196 * * If *key* is the last element, returns -1 and *errno* is set
197 * to **ENOENT**.
198 *
199 * May set *errno* to **ENOMEM**, **EFAULT**, **EPERM**, or
200 * **EINVAL** on error.
201 *
202 * BPF_PROG_LOAD
203 * Description
204 * Verify and load an eBPF program, returning a new file
205 * descriptor associated with the program.
206 *
207 * Applying **close**\ (2) to the file descriptor returned by
208 * **BPF_PROG_LOAD** will unload the eBPF program (but see NOTES).
209 *
210 * The close-on-exec file descriptor flag (see **fcntl**\ (2)) is
211 * automatically enabled for the new file descriptor.
212 *
213 * Return
214 * A new file descriptor (a nonnegative integer), or -1 if an
215 * error occurred (in which case, *errno* is set appropriately).
216 *
217 * BPF_OBJ_PIN
218 * Description
219 * Pin an eBPF program or map referred by the specified *bpf_fd*
220 * to the provided *pathname* on the filesystem.
221 *
222 * The *pathname* argument must not contain a dot (".").
223 *
224 * On success, *pathname* retains a reference to the eBPF object,
225 * preventing deallocation of the object when the original
226 * *bpf_fd* is closed. This allow the eBPF object to live beyond
227 * **close**\ (\ *bpf_fd*\ ), and hence the lifetime of the parent
228 * process.
229 *
230 * Applying **unlink**\ (2) or similar calls to the *pathname*
231 * unpins the object from the filesystem, removing the reference.
232 * If no other file descriptors or filesystem nodes refer to the
233 * same object, it will be deallocated (see NOTES).
234 *
235 * The filesystem type for the parent directory of *pathname* must
236 * be **BPF_FS_MAGIC**.
237 *
238 * Return
239 * Returns zero on success. On error, -1 is returned and *errno*
240 * is set appropriately.
241 *
242 * BPF_OBJ_GET
243 * Description
244 * Open a file descriptor for the eBPF object pinned to the
245 * specified *pathname*.
246 *
247 * Return
248 * A new file descriptor (a nonnegative integer), or -1 if an
249 * error occurred (in which case, *errno* is set appropriately).
250 *
251 * BPF_PROG_ATTACH
252 * Description
253 * Attach an eBPF program to a *target_fd* at the specified
254 * *attach_type* hook.
255 *
256 * The *attach_type* specifies the eBPF attachment point to
257 * attach the program to, and must be one of *bpf_attach_type*
258 * (see below).
259 *
260 * The *attach_bpf_fd* must be a valid file descriptor for a
261 * loaded eBPF program of a cgroup, flow dissector, LIRC, sockmap
262 * or sock_ops type corresponding to the specified *attach_type*.
263 *
264 * The *target_fd* must be a valid file descriptor for a kernel
265 * object which depends on the attach type of *attach_bpf_fd*:
266 *
267 * **BPF_PROG_TYPE_CGROUP_DEVICE**,
268 * **BPF_PROG_TYPE_CGROUP_SKB**,
269 * **BPF_PROG_TYPE_CGROUP_SOCK**,
270 * **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**,
271 * **BPF_PROG_TYPE_CGROUP_SOCKOPT**,
272 * **BPF_PROG_TYPE_CGROUP_SYSCTL**,
273 * **BPF_PROG_TYPE_SOCK_OPS**
274 *
275 * Control Group v2 hierarchy with the eBPF controller
276 * enabled. Requires the kernel to be compiled with
277 * **CONFIG_CGROUP_BPF**.
278 *
279 * **BPF_PROG_TYPE_FLOW_DISSECTOR**
280 *
281 * Network namespace (eg /proc/self/ns/net).
282 *
283 * **BPF_PROG_TYPE_LIRC_MODE2**
284 *
285 * LIRC device path (eg /dev/lircN). Requires the kernel
286 * to be compiled with **CONFIG_BPF_LIRC_MODE2**.
287 *
288 * **BPF_PROG_TYPE_SK_SKB**,
289 * **BPF_PROG_TYPE_SK_MSG**
290 *
291 * eBPF map of socket type (eg **BPF_MAP_TYPE_SOCKHASH**).
292 *
293 * Return
294 * Returns zero on success. On error, -1 is returned and *errno*
295 * is set appropriately.
296 *
297 * BPF_PROG_DETACH
298 * Description
299 * Detach the eBPF program associated with the *target_fd* at the
300 * hook specified by *attach_type*. The program must have been
301 * previously attached using **BPF_PROG_ATTACH**.
302 *
303 * Return
304 * Returns zero on success. On error, -1 is returned and *errno*
305 * is set appropriately.
306 *
307 * BPF_PROG_TEST_RUN
308 * Description
309 * Run the eBPF program associated with the *prog_fd* a *repeat*
310 * number of times against a provided program context *ctx_in* and
311 * data *data_in*, and return the modified program context
312 * *ctx_out*, *data_out* (for example, packet data), result of the
313 * execution *retval*, and *duration* of the test run.
314 *
315 * The sizes of the buffers provided as input and output
316 * parameters *ctx_in*, *ctx_out*, *data_in*, and *data_out* must
317 * be provided in the corresponding variables *ctx_size_in*,
318 * *ctx_size_out*, *data_size_in*, and/or *data_size_out*. If any
319 * of these parameters are not provided (ie set to NULL), the
320 * corresponding size field must be zero.
321 *
322 * Some program types have particular requirements:
323 *
324 * **BPF_PROG_TYPE_SK_LOOKUP**
325 * *data_in* and *data_out* must be NULL.
326 *
327 * **BPF_PROG_TYPE_XDP**
328 * *ctx_in* and *ctx_out* must be NULL.
329 *
330 * **BPF_PROG_TYPE_RAW_TRACEPOINT**,
331 * **BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE**
332 *
333 * *ctx_out*, *data_in* and *data_out* must be NULL.
334 * *repeat* must be zero.
335 *
336 * Return
337 * Returns zero on success. On error, -1 is returned and *errno*
338 * is set appropriately.
339 *
340 * **ENOSPC**
341 * Either *data_size_out* or *ctx_size_out* is too small.
342 * **ENOTSUPP**
343 * This command is not supported by the program type of
344 * the program referred to by *prog_fd*.
345 *
346 * BPF_PROG_GET_NEXT_ID
347 * Description
348 * Fetch the next eBPF program currently loaded into the kernel.
349 *
350 * Looks for the eBPF program with an id greater than *start_id*
351 * and updates *next_id* on success. If no other eBPF programs
352 * remain with ids higher than *start_id*, returns -1 and sets
353 * *errno* to **ENOENT**.
354 *
355 * Return
356 * Returns zero on success. On error, or when no id remains, -1
357 * is returned and *errno* is set appropriately.
358 *
359 * BPF_MAP_GET_NEXT_ID
360 * Description
361 * Fetch the next eBPF map currently loaded into the kernel.
362 *
363 * Looks for the eBPF map with an id greater than *start_id*
364 * and updates *next_id* on success. If no other eBPF maps
365 * remain with ids higher than *start_id*, returns -1 and sets
366 * *errno* to **ENOENT**.
367 *
368 * Return
369 * Returns zero on success. On error, or when no id remains, -1
370 * is returned and *errno* is set appropriately.
371 *
372 * BPF_PROG_GET_FD_BY_ID
373 * Description
374 * Open a file descriptor for the eBPF program corresponding to
375 * *prog_id*.
376 *
377 * Return
378 * A new file descriptor (a nonnegative integer), or -1 if an
379 * error occurred (in which case, *errno* is set appropriately).
380 *
381 * BPF_MAP_GET_FD_BY_ID
382 * Description
383 * Open a file descriptor for the eBPF map corresponding to
384 * *map_id*.
385 *
386 * Return
387 * A new file descriptor (a nonnegative integer), or -1 if an
388 * error occurred (in which case, *errno* is set appropriately).
389 *
390 * BPF_OBJ_GET_INFO_BY_FD
391 * Description
392 * Obtain information about the eBPF object corresponding to
393 * *bpf_fd*.
394 *
395 * Populates up to *info_len* bytes of *info*, which will be in
396 * one of the following formats depending on the eBPF object type
397 * of *bpf_fd*:
398 *
399 * * **struct bpf_prog_info**
400 * * **struct bpf_map_info**
401 * * **struct bpf_btf_info**
402 * * **struct bpf_link_info**
403 *
404 * Return
405 * Returns zero on success. On error, -1 is returned and *errno*
406 * is set appropriately.
407 *
408 * BPF_PROG_QUERY
409 * Description
410 * Obtain information about eBPF programs associated with the
411 * specified *attach_type* hook.
412 *
413 * The *target_fd* must be a valid file descriptor for a kernel
414 * object which depends on the attach type of *attach_bpf_fd*:
415 *
416 * **BPF_PROG_TYPE_CGROUP_DEVICE**,
417 * **BPF_PROG_TYPE_CGROUP_SKB**,
418 * **BPF_PROG_TYPE_CGROUP_SOCK**,
419 * **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**,
420 * **BPF_PROG_TYPE_CGROUP_SOCKOPT**,
421 * **BPF_PROG_TYPE_CGROUP_SYSCTL**,
422 * **BPF_PROG_TYPE_SOCK_OPS**
423 *
424 * Control Group v2 hierarchy with the eBPF controller
425 * enabled. Requires the kernel to be compiled with
426 * **CONFIG_CGROUP_BPF**.
427 *
428 * **BPF_PROG_TYPE_FLOW_DISSECTOR**
429 *
430 * Network namespace (eg /proc/self/ns/net).
431 *
432 * **BPF_PROG_TYPE_LIRC_MODE2**
433 *
434 * LIRC device path (eg /dev/lircN). Requires the kernel
435 * to be compiled with **CONFIG_BPF_LIRC_MODE2**.
436 *
437 * **BPF_PROG_QUERY** always fetches the number of programs
438 * attached and the *attach_flags* which were used to attach those
439 * programs. Additionally, if *prog_ids* is nonzero and the number
440 * of attached programs is less than *prog_cnt*, populates
441 * *prog_ids* with the eBPF program ids of the programs attached
442 * at *target_fd*.
443 *
444 * The following flags may alter the result:
445 *
446 * **BPF_F_QUERY_EFFECTIVE**
447 * Only return information regarding programs which are
448 * currently effective at the specified *target_fd*.
449 *
450 * Return
451 * Returns zero on success. On error, -1 is returned and *errno*
452 * is set appropriately.
453 *
454 * BPF_RAW_TRACEPOINT_OPEN
455 * Description
456 * Attach an eBPF program to a tracepoint *name* to access kernel
457 * internal arguments of the tracepoint in their raw form.
458 *
459 * The *prog_fd* must be a valid file descriptor associated with
460 * a loaded eBPF program of type **BPF_PROG_TYPE_RAW_TRACEPOINT**.
461 *
462 * No ABI guarantees are made about the content of tracepoint
463 * arguments exposed to the corresponding eBPF program.
464 *
465 * Applying **close**\ (2) to the file descriptor returned by
466 * **BPF_RAW_TRACEPOINT_OPEN** will delete the map (but see NOTES).
467 *
468 * Return
469 * A new file descriptor (a nonnegative integer), or -1 if an
470 * error occurred (in which case, *errno* is set appropriately).
471 *
472 * BPF_BTF_LOAD
473 * Description
474 * Verify and load BPF Type Format (BTF) metadata into the kernel,
475 * returning a new file descriptor associated with the metadata.
476 * BTF is described in more detail at
477 * https://www.kernel.org/doc/html/latest/bpf/btf.html.
478 *
479 * The *btf* parameter must point to valid memory providing
480 * *btf_size* bytes of BTF binary metadata.
481 *
482 * The returned file descriptor can be passed to other **bpf**\ ()
483 * subcommands such as **BPF_PROG_LOAD** or **BPF_MAP_CREATE** to
484 * associate the BTF with those objects.
485 *
486 * Similar to **BPF_PROG_LOAD**, **BPF_BTF_LOAD** has optional
487 * parameters to specify a *btf_log_buf*, *btf_log_size* and
488 * *btf_log_level* which allow the kernel to return freeform log
489 * output regarding the BTF verification process.
490 *
491 * Return
492 * A new file descriptor (a nonnegative integer), or -1 if an
493 * error occurred (in which case, *errno* is set appropriately).
494 *
495 * BPF_BTF_GET_FD_BY_ID
496 * Description
497 * Open a file descriptor for the BPF Type Format (BTF)
498 * corresponding to *btf_id*.
499 *
500 * Return
501 * A new file descriptor (a nonnegative integer), or -1 if an
502 * error occurred (in which case, *errno* is set appropriately).
503 *
504 * BPF_TASK_FD_QUERY
505 * Description
506 * Obtain information about eBPF programs associated with the
507 * target process identified by *pid* and *fd*.
508 *
509 * If the *pid* and *fd* are associated with a tracepoint, kprobe
510 * or uprobe perf event, then the *prog_id* and *fd_type* will
511 * be populated with the eBPF program id and file descriptor type
512 * of type **bpf_task_fd_type**. If associated with a kprobe or
513 * uprobe, the *probe_offset* and *probe_addr* will also be
514 * populated. Optionally, if *buf* is provided, then up to
515 * *buf_len* bytes of *buf* will be populated with the name of
516 * the tracepoint, kprobe or uprobe.
517 *
518 * The resulting *prog_id* may be introspected in deeper detail
519 * using **BPF_PROG_GET_FD_BY_ID** and **BPF_OBJ_GET_INFO_BY_FD**.
520 *
521 * Return
522 * Returns zero on success. On error, -1 is returned and *errno*
523 * is set appropriately.
524 *
525 * BPF_MAP_LOOKUP_AND_DELETE_ELEM
526 * Description
527 * Look up an element with the given *key* in the map referred to
528 * by the file descriptor *fd*, and if found, delete the element.
529 *
530 * The **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types
531 * implement this command as a "pop" operation, deleting the top
532 * element rather than one corresponding to *key*.
533 * The *key* and *key_len* parameters should be zeroed when
534 * issuing this operation for these map types.
535 *
536 * This command is only valid for the following map types:
537 * * **BPF_MAP_TYPE_QUEUE**
538 * * **BPF_MAP_TYPE_STACK**
539 *
540 * Return
541 * Returns zero on success. On error, -1 is returned and *errno*
542 * is set appropriately.
543 *
544 * BPF_MAP_FREEZE
545 * Description
546 * Freeze the permissions of the specified map.
547 *
548 * Write permissions may be frozen by passing zero *flags*.
549 * Upon success, no future syscall invocations may alter the
550 * map state of *map_fd*. Write operations from eBPF programs
551 * are still possible for a frozen map.
552 *
553 * Not supported for maps of type **BPF_MAP_TYPE_STRUCT_OPS**.
554 *
555 * Return
556 * Returns zero on success. On error, -1 is returned and *errno*
557 * is set appropriately.
558 *
559 * BPF_BTF_GET_NEXT_ID
560 * Description
561 * Fetch the next BPF Type Format (BTF) object currently loaded
562 * into the kernel.
563 *
564 * Looks for the BTF object with an id greater than *start_id*
565 * and updates *next_id* on success. If no other BTF objects
566 * remain with ids higher than *start_id*, returns -1 and sets
567 * *errno* to **ENOENT**.
568 *
569 * Return
570 * Returns zero on success. On error, or when no id remains, -1
571 * is returned and *errno* is set appropriately.
572 *
573 * BPF_MAP_LOOKUP_BATCH
574 * Description
575 * Iterate and fetch multiple elements in a map.
576 *
577 * Two opaque values are used to manage batch operations,
578 * *in_batch* and *out_batch*. Initially, *in_batch* must be set
579 * to NULL to begin the batched operation. After each subsequent
580 * **BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant
581 * *out_batch* as the *in_batch* for the next operation to
582 * continue iteration from the current point.
583 *
584 * The *keys* and *values* are output parameters which must point
585 * to memory large enough to hold *count* items based on the key
586 * and value size of the map *map_fd*. The *keys* buffer must be
587 * of *key_size* * *count*. The *values* buffer must be of
588 * *value_size* * *count*.
589 *
590 * The *elem_flags* argument may be specified as one of the
591 * following:
592 *
593 * **BPF_F_LOCK**
594 * Look up the value of a spin-locked map without
595 * returning the lock. This must be specified if the
596 * elements contain a spinlock.
597 *
598 * On success, *count* elements from the map are copied into the
599 * user buffer, with the keys copied into *keys* and the values
600 * copied into the corresponding indices in *values*.
601 *
602 * If an error is returned and *errno* is not **EFAULT**, *count*
603 * is set to the number of successfully processed elements.
604 *
605 * Return
606 * Returns zero on success. On error, -1 is returned and *errno*
607 * is set appropriately.
608 *
609 * May set *errno* to **ENOSPC** to indicate that *keys* or
610 * *values* is too small to dump an entire bucket during
611 * iteration of a hash-based map type.
612 *
613 * BPF_MAP_LOOKUP_AND_DELETE_BATCH
614 * Description
615 * Iterate and delete all elements in a map.
616 *
617 * This operation has the same behavior as
618 * **BPF_MAP_LOOKUP_BATCH** with two exceptions:
619 *
620 * * Every element that is successfully returned is also deleted
621 * from the map. This is at least *count* elements. Note that
622 * *count* is both an input and an output parameter.
623 * * Upon returning with *errno* set to **EFAULT**, up to
624 * *count* elements may be deleted without returning the keys
625 * and values of the deleted elements.
626 *
627 * Return
628 * Returns zero on success. On error, -1 is returned and *errno*
629 * is set appropriately.
630 *
631 * BPF_MAP_UPDATE_BATCH
632 * Description
633 * Update multiple elements in a map by *key*.
634 *
635 * The *keys* and *values* are input parameters which must point
636 * to memory large enough to hold *count* items based on the key
637 * and value size of the map *map_fd*. The *keys* buffer must be
638 * of *key_size* * *count*. The *values* buffer must be of
639 * *value_size* * *count*.
640 *
641 * Each element specified in *keys* is sequentially updated to the
642 * value in the corresponding index in *values*. The *in_batch*
643 * and *out_batch* parameters are ignored and should be zeroed.
644 *
645 * The *elem_flags* argument should be specified as one of the
646 * following:
647 *
648 * **BPF_ANY**
649 * Create new elements or update a existing elements.
650 * **BPF_NOEXIST**
651 * Create new elements only if they do not exist.
652 * **BPF_EXIST**
653 * Update existing elements.
654 * **BPF_F_LOCK**
655 * Update spin_lock-ed map elements. This must be
656 * specified if the map value contains a spinlock.
657 *
658 * On success, *count* elements from the map are updated.
659 *
660 * If an error is returned and *errno* is not **EFAULT**, *count*
661 * is set to the number of successfully processed elements.
662 *
663 * Return
664 * Returns zero on success. On error, -1 is returned and *errno*
665 * is set appropriately.
666 *
667 * May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, or
668 * **E2BIG**. **E2BIG** indicates that the number of elements in
669 * the map reached the *max_entries* limit specified at map
670 * creation time.
671 *
672 * May set *errno* to one of the following error codes under
673 * specific circumstances:
674 *
675 * **EEXIST**
676 * If *flags* specifies **BPF_NOEXIST** and the element
677 * with *key* already exists in the map.
678 * **ENOENT**
679 * If *flags* specifies **BPF_EXIST** and the element with
680 * *key* does not exist in the map.
681 *
682 * BPF_MAP_DELETE_BATCH
683 * Description
684 * Delete multiple elements in a map by *key*.
685 *
686 * The *keys* parameter is an input parameter which must point
687 * to memory large enough to hold *count* items based on the key
688 * size of the map *map_fd*, that is, *key_size* * *count*.
689 *
690 * Each element specified in *keys* is sequentially deleted. The
691 * *in_batch*, *out_batch*, and *values* parameters are ignored
692 * and should be zeroed.
693 *
694 * The *elem_flags* argument may be specified as one of the
695 * following:
696 *
697 * **BPF_F_LOCK**
698 * Look up the value of a spin-locked map without
699 * returning the lock. This must be specified if the
700 * elements contain a spinlock.
701 *
702 * On success, *count* elements from the map are updated.
703 *
704 * If an error is returned and *errno* is not **EFAULT**, *count*
705 * is set to the number of successfully processed elements. If
706 * *errno* is **EFAULT**, up to *count* elements may be been
707 * deleted.
708 *
709 * Return
710 * Returns zero on success. On error, -1 is returned and *errno*
711 * is set appropriately.
712 *
713 * BPF_LINK_CREATE
714 * Description
715 * Attach an eBPF program to a *target_fd* at the specified
716 * *attach_type* hook and return a file descriptor handle for
717 * managing the link.
718 *
719 * Return
720 * A new file descriptor (a nonnegative integer), or -1 if an
721 * error occurred (in which case, *errno* is set appropriately).
722 *
723 * BPF_LINK_UPDATE
724 * Description
725 * Update the eBPF program in the specified *link_fd* to
726 * *new_prog_fd*.
727 *
728 * Return
729 * Returns zero on success. On error, -1 is returned and *errno*
730 * is set appropriately.
731 *
732 * BPF_LINK_GET_FD_BY_ID
733 * Description
734 * Open a file descriptor for the eBPF Link corresponding to
735 * *link_id*.
736 *
737 * Return
738 * A new file descriptor (a nonnegative integer), or -1 if an
739 * error occurred (in which case, *errno* is set appropriately).
740 *
741 * BPF_LINK_GET_NEXT_ID
742 * Description
743 * Fetch the next eBPF link currently loaded into the kernel.
744 *
745 * Looks for the eBPF link with an id greater than *start_id*
746 * and updates *next_id* on success. If no other eBPF links
747 * remain with ids higher than *start_id*, returns -1 and sets
748 * *errno* to **ENOENT**.
749 *
750 * Return
751 * Returns zero on success. On error, or when no id remains, -1
752 * is returned and *errno* is set appropriately.
753 *
754 * BPF_ENABLE_STATS
755 * Description
756 * Enable eBPF runtime statistics gathering.
757 *
758 * Runtime statistics gathering for the eBPF runtime is disabled
759 * by default to minimize the corresponding performance overhead.
760 * This command enables statistics globally.
761 *
762 * Multiple programs may independently enable statistics.
763 * After gathering the desired statistics, eBPF runtime statistics
764 * may be disabled again by calling **close**\ (2) for the file
765 * descriptor returned by this function. Statistics will only be
766 * disabled system-wide when all outstanding file descriptors
767 * returned by prior calls for this subcommand are closed.
768 *
769 * Return
770 * A new file descriptor (a nonnegative integer), or -1 if an
771 * error occurred (in which case, *errno* is set appropriately).
772 *
773 * BPF_ITER_CREATE
774 * Description
775 * Create an iterator on top of the specified *link_fd* (as
776 * previously created using **BPF_LINK_CREATE**) and return a
777 * file descriptor that can be used to trigger the iteration.
778 *
779 * If the resulting file descriptor is pinned to the filesystem
780 * using **BPF_OBJ_PIN**, then subsequent **read**\ (2) syscalls
781 * for that path will trigger the iterator to read kernel state
782 * using the eBPF program attached to *link_fd*.
783 *
784 * Return
785 * A new file descriptor (a nonnegative integer), or -1 if an
786 * error occurred (in which case, *errno* is set appropriately).
787 *
788 * BPF_LINK_DETACH
789 * Description
790 * Forcefully detach the specified *link_fd* from its
791 * corresponding attachment point.
792 *
793 * Return
794 * Returns zero on success. On error, -1 is returned and *errno*
795 * is set appropriately.
796 *
797 * BPF_PROG_BIND_MAP
798 * Description
799 * Bind a map to the lifetime of an eBPF program.
800 *
801 * The map identified by *map_fd* is bound to the program
802 * identified by *prog_fd* and only released when *prog_fd* is
803 * released. This may be used in cases where metadata should be
804 * associated with a program which otherwise does not contain any
805 * references to the map (for example, embedded in the eBPF
806 * program instructions).
807 *
808 * Return
809 * Returns zero on success. On error, -1 is returned and *errno*
810 * is set appropriately.
811 *
812 * NOTES
813 * eBPF objects (maps and programs) can be shared between processes.
814 *
815 * * After **fork**\ (2), the child inherits file descriptors
816 * referring to the same eBPF objects.
817 * * File descriptors referring to eBPF objects can be transferred over
818 * **unix**\ (7) domain sockets.
819 * * File descriptors referring to eBPF objects can be duplicated in the
820 * usual way, using **dup**\ (2) and similar calls.
821 * * File descriptors referring to eBPF objects can be pinned to the
822 * filesystem using the **BPF_OBJ_PIN** command of **bpf**\ (2).
823 *
824 * An eBPF object is deallocated only after all file descriptors referring
825 * to the object have been closed and no references remain pinned to the
826 * filesystem or attached (for example, bound to a program or device).
827 */
97enum bpf_cmd {828enum bpf_cmd {
98 BPF_MAP_CREATE,829 BPF_MAP_CREATE,
99 BPF_MAP_LOOKUP_ELEM,830 BPF_MAP_LOOKUP_ELEM,
@@ -247,6 +978,7 @@ enum bpf_attach_type { · 147 unmodified lines
247 BPF_XDP_CPUMAP,978 BPF_XDP_CPUMAP,
248 BPF_SK_LOOKUP,979 BPF_SK_LOOKUP,
249 BPF_XDP,980 BPF_XDP,
981 BPF_SK_SKB_VERDICT,
250 __MAX_BPF_ATTACH_TYPE982 __MAX_BPF_ATTACH_TYPE
251};983};
252 984
@@ -393,11 +1125,24 @@ enum bpf_link_type { · 140 unmodified lines
393 * is struct/union.1125 * is struct/union.
394 */1126 */
395#define BPF_PSEUDO_BTF_ID 31127#define BPF_PSEUDO_BTF_ID 3
1128/* insn[0].src_reg: BPF_PSEUDO_FUNC
1129 * insn[0].imm: insn offset to the func
1130 * insn[1].imm: 0
1131 * insn[0].off: 0
1132 * insn[1].off: 0
1133 * ldimm64 rewrite: address of the function
1134 * verifier type: PTR_TO_FUNC.
1135 */
1136#define BPF_PSEUDO_FUNC 4
396 1137
397/* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative1138/* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
398 * offset to another bpf function1139 * offset to another bpf function
399 */1140 */
400#define BPF_PSEUDO_CALL 11141#define BPF_PSEUDO_CALL 1
1142/* when bpf_call->src_reg == BPF_PSEUDO_KFUNC_CALL,
1143 * bpf_call->imm == btf_id of a BTF_KIND_FUNC in the running kernel
1144 */
1145#define BPF_PSEUDO_KFUNC_CALL 2
401 1146
402/* flags for BPF_MAP_UPDATE_ELEM command */1147/* flags for BPF_MAP_UPDATE_ELEM command */
403enum {1148enum {
@@ -720,7 +1465,7 @@ union bpf_attr { · 316 unmodified lines
720 * parsed and used to produce a manual page. The workflow is the following,1465 * parsed and used to produce a manual page. The workflow is the following,
721 * and requires the rst2man utility:1466 * and requires the rst2man utility:
722 *1467 *
723 * $ ./scripts/bpf_helpers_doc.py \1468 * $ ./scripts/bpf_doc.py \
724 * --filename include/uapi/linux/bpf.h > /tmp/bpf-helpers.rst1469 * --filename include/uapi/linux/bpf.h > /tmp/bpf-helpers.rst
725 * $ rst2man /tmp/bpf-helpers.rst > /tmp/bpf-helpers.71470 * $ rst2man /tmp/bpf-helpers.rst > /tmp/bpf-helpers.7
726 * $ man /tmp/bpf-helpers.71471 * $ man /tmp/bpf-helpers.7
@@ -1765,6 +2510,10 @@ union bpf_attr { · 1038 unmodified lines
1765 * Use with ENCAP_L3/L4 flags to further specify the tunnel2510 * Use with ENCAP_L3/L4 flags to further specify the tunnel
1766 * type; *len* is the length of the inner MAC header.2511 * type; *len* is the length of the inner MAC header.
1767 *2512 *
2513 * * **BPF_F_ADJ_ROOM_ENCAP_L2_ETH**:
2514 * Use with BPF_F_ADJ_ROOM_ENCAP_L2 flag to further specify the
2515 * L2 type as Ethernet.
2516 *
1768 * A call to this helper is susceptible to change the underlying2517 * A call to this helper is susceptible to change the underlying
1769 * packet buffer. Therefore, at load time, all checks on pointers2518 * packet buffer. Therefore, at load time, all checks on pointers
1770 * previously done by the verifier are invalidated and must be2519 * previously done by the verifier are invalidated and must be
@@ -3333,12 +4082,20 @@ union bpf_attr { · 1562 unmodified lines
3333 * of new data availability is sent.4082 * of new data availability is sent.
3334 * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification4083 * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
3335 * of new data availability is sent unconditionally.4084 * of new data availability is sent unconditionally.
4085 * If **0** is specified in *flags*, an adaptive notification
4086 * of new data availability is sent.
4087 *
4088 * An adaptive notification is a notification sent whenever the user-space
4089 * process has caught up and consumed all available payloads. In case the user-space
4090 * process is still processing a previous payload, then no notification is needed
4091 * as it will process the newly added payload automatically.
3336 * Return4092 * Return
3337 * 0 on success, or a negative error in case of failure.4093 * 0 on success, or a negative error in case of failure.
3338 *4094 *
3339 * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)4095 * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
3340 * Description4096 * Description
3341 * Reserve *size* bytes of payload in a ring buffer *ringbuf*.4097 * Reserve *size* bytes of payload in a ring buffer *ringbuf*.
4098 * *flags* must be 0.
3342 * Return4099 * Return
3343 * Valid pointer with *size* bytes of memory available; NULL,4100 * Valid pointer with *size* bytes of memory available; NULL,
3344 * otherwise.4101 * otherwise.
@@ -3350,6 +4107,10 @@ union bpf_attr { · 5 unmodified lines
3350 * of new data availability is sent.4107 * of new data availability is sent.
3351 * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification4108 * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
3352 * of new data availability is sent unconditionally.4109 * of new data availability is sent unconditionally.
4110 * If **0** is specified in *flags*, an adaptive notification
4111 * of new data availability is sent.
4112 *
4113 * See 'bpf_ringbuf_output()' for the definition of adaptive notification.
3353 * Return4114 * Return
3354 * Nothing. Always succeeds.4115 * Nothing. Always succeeds.
3355 *4116 *
@@ -3360,6 +4121,10 @@ union bpf_attr { · 4 unmodified lines
3360 * of new data availability is sent.4121 * of new data availability is sent.
3361 * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification4122 * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
3362 * of new data availability is sent unconditionally.4123 * of new data availability is sent unconditionally.
4124 * If **0** is specified in *flags*, an adaptive notification
4125 * of new data availability is sent.
4126 *
4127 * See 'bpf_ringbuf_output()' for the definition of adaptive notification.
3363 * Return4128 * Return
3364 * Nothing. Always succeeds.4129 * Nothing. Always succeeds.
3365 *4130 *
@@ -3915,6 +4680,61 @@ union bpf_attr { · 549 unmodified lines
3915 * * **BPF_MTU_CHK_RET_FRAG_NEEDED**4680 * * **BPF_MTU_CHK_RET_FRAG_NEEDED**
3916 * * **BPF_MTU_CHK_RET_SEGS_TOOBIG**4681 * * **BPF_MTU_CHK_RET_SEGS_TOOBIG**
3917 *4682 *
4683 * long bpf_for_each_map_elem(struct bpf_map *map, void *callback_fn, void *callback_ctx, u64 flags)
4684 * Description
4685 * For each element in **map**, call **callback_fn** function with
4686 * **map**, **callback_ctx** and other map-specific parameters.
4687 * The **callback_fn** should be a static function and
4688 * the **callback_ctx** should be a pointer to the stack.
4689 * The **flags** is used to control certain aspects of the helper.
4690 * Currently, the **flags** must be 0.
4691 *
4692 * The following are a list of supported map types and their
4693 * respective expected callback signatures:
4694 *
4695 * BPF_MAP_TYPE_HASH, BPF_MAP_TYPE_PERCPU_HASH,
4696 * BPF_MAP_TYPE_LRU_HASH, BPF_MAP_TYPE_LRU_PERCPU_HASH,
4697 * BPF_MAP_TYPE_ARRAY, BPF_MAP_TYPE_PERCPU_ARRAY
4698 *
4699 * long (\*callback_fn)(struct bpf_map \*map, const void \*key, void \*value, void \*ctx);
4700 *
4701 * For per_cpu maps, the map_value is the value on the cpu where the
4702 * bpf_prog is running.
4703 *
4704 * If **callback_fn** return 0, the helper will continue to the next
4705 * element. If return value is 1, the helper will skip the rest of
4706 * elements and return. Other return values are not used now.
4707 *
4708 * Return
4709 * The number of traversed map elements for success, **-EINVAL** for
4710 * invalid **flags**.
4711 *
4712 * long bpf_snprintf(char *str, u32 str_size, const char *fmt, u64 *data, u32 data_len)
4713 * Description
4714 * Outputs a string into the **str** buffer of size **str_size**
4715 * based on a format string stored in a read-only map pointed by
4716 * **fmt**.
4717 *
4718 * Each format specifier in **fmt** corresponds to one u64 element
4719 * in the **data** array. For strings and pointers where pointees
4720 * are accessed, only the pointer values are stored in the *data*
4721 * array. The *data_len* is the size of *data* in bytes.
4722 *
4723 * Formats **%s** and **%p{i,I}{4,6}** require to read kernel
4724 * memory. Reading kernel memory may fail due to either invalid
4725 * address or valid address but requiring a major memory fault. If
4726 * reading kernel memory fails, the string for **%s** will be an
4727 * empty string, and the ip address for **%p{i,I}{4,6}** will be 0.
4728 * Not returning error to bpf program is consistent with what
4729 * **bpf_trace_printk**\ () does for now.
4730 *
4731 * Return
4732 * The strictly positive length of the formatted string, including
4733 * the trailing zero character. If the return value is greater than
4734 * **str_size**, **str** contains a truncated string, guaranteed to
4735 * be zero-terminated except when **str_size** is 0.
4736 *
4737 * Or **-EBUSY** if the per-CPU memory copy buffer is busy.
3918 */4738 */
3919#define __BPF_FUNC_MAPPER(FN) \4739#define __BPF_FUNC_MAPPER(FN) \
3920 FN(unspec), \4740 FN(unspec), \
@@ -4081,6 +4901,8 @@ union bpf_attr { · 160 unmodified lines
4081 FN(ima_inode_hash), \4901 FN(ima_inode_hash), \
4082 FN(sock_from_file), \4902 FN(sock_from_file), \
4083 FN(check_mtu), \4903 FN(check_mtu), \
4904 FN(for_each_map_elem), \
4905 FN(snprintf), \
4084 /* */4906 /* */
4085 4907
4086/* integer value in 'imm' field of BPF_CALL instruction selects which helper4908/* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -4174,6 +4996,7 @@ enum { · 87 unmodified lines
4174 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3),4996 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3),
4175 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),4997 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),
4176 BPF_F_ADJ_ROOM_NO_CSUM_RESET = (1ULL << 5),4998 BPF_F_ADJ_ROOM_NO_CSUM_RESET = (1ULL << 5),
4999 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = (1ULL << 6),
4177};5000};
4178 5001
4179enum {5002enum {
@@ -4621,6 +5444,8 @@ struct bpf_link_info { · 441 unmodified lines
4621 } raw_tracepoint;5444 } raw_tracepoint;
4622 struct {5445 struct {
4623 __u32 attach_type;5446 __u32 attach_type;
5447 __u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */
5448 __u32 target_btf_id; /* BTF type id inside the object */
4624 } tracing;5449 } tracing;
4625 struct {5450 struct {
4626 __u64 cgroup_id;5451 __u64 cgroup_id;
@@ -5211,7 +6036,10 @@ struct bpf_pidns_info { · 584 unmodified lines
5211 6036
5212/* User accessible data for SK_LOOKUP programs. Add new fields at the end. */6037/* User accessible data for SK_LOOKUP programs. Add new fields at the end. */
5213struct bpf_sk_lookup {6038struct bpf_sk_lookup {
5214 __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */6039 union {
6040 __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
6041 __u64 cookie; /* Non-zero if socket was selected in PROG_TEST_RUN */
6042 };
5215 6043
5216 __u32 family; /* Protocol family (AF_INET, AF_INET6) */6044 __u32 family; /* Protocol family (AF_INET, AF_INET6) */
5217 __u32 protocol; /* IP protocol (IPPROTO_TCP, IPPROTO_UDP) */6045 __u32 protocol; /* IP protocol (IPPROTO_TCP, IPPROTO_UDP) */
include/uapi/linux/btf.h+3−2
@@ -52,7 +52,7 @@ struct btf_type { · 51 unmodified lines
52 };52 };
53};53};
54 54
55#define BTF_INFO_KIND(info) (((info) >> 24) & 0x0f)55#define BTF_INFO_KIND(info) (((info) >> 24) & 0x1f)
56#define BTF_INFO_VLEN(info) ((info) & 0xffff)56#define BTF_INFO_VLEN(info) ((info) & 0xffff)
57#define BTF_INFO_KFLAG(info) ((info) >> 31)57#define BTF_INFO_KFLAG(info) ((info) >> 31)
58 58
@@ -72,7 +72,8 @@ struct btf_type { · 13 unmodified lines
72#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */72#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
73#define BTF_KIND_VAR 14 /* Variable */73#define BTF_KIND_VAR 14 /* Variable */
74#define BTF_KIND_DATASEC 15 /* Section */74#define BTF_KIND_DATASEC 15 /* Section */
75#define BTF_KIND_MAX BTF_KIND_DATASEC75#define BTF_KIND_FLOAT 16 /* Floating point */
76#define BTF_KIND_MAX BTF_KIND_FLOAT
76#define NR_BTF_KINDS (BTF_KIND_MAX + 1)77#define NR_BTF_KINDS (BTF_KIND_MAX + 1)
77 78
78/* For some specific BTF_KIND, "struct btf_type" is immediately79/* For some specific BTF_KIND, "struct btf_type" is immediately
include/uapi/linux/capability.h+2−1
@@ -335,7 +335,8 @@ struct vfs_ns_cap_data { · 334 unmodified lines
335 335
336#define CAP_AUDIT_CONTROL 30336#define CAP_AUDIT_CONTROL 30
337 337
338/* Set or remove capabilities on files */338/* Set or remove capabilities on files.
339 Map uid=0 into a child user namespace. */
339 340
340#define CAP_SETFCAP 31341#define CAP_SETFCAP 31
341 342
include/uapi/linux/cec.h+2−1
@@ -396,6 +396,7 @@ struct cec_drm_connector_info { · 395 unmodified lines
396 * associated with the CEC adapter.396 * associated with the CEC adapter.
397 * @type: connector type (if any)397 * @type: connector type (if any)
398 * @drm: drm connector info398 * @drm: drm connector info
399 * @raw: array to pad the union
399 */400 */
400struct cec_connector_info {401struct cec_connector_info {
401 __u32 type;402 __u32 type;
@@ -453,7 +454,7 @@ struct cec_event_lost_msgs { · 51 unmodified lines
453 * struct cec_event - CEC event structure454 * struct cec_event - CEC event structure
454 * @ts: the timestamp of when the event was sent.455 * @ts: the timestamp of when the event was sent.
455 * @event: the event.456 * @event: the event.
456 * array.457 * @flags: event flags.
457 * @state_change: the event payload for CEC_EVENT_STATE_CHANGE.458 * @state_change: the event payload for CEC_EVENT_STATE_CHANGE.
458 * @lost_msgs: the event payload for CEC_EVENT_LOST_MSGS.459 * @lost_msgs: the event payload for CEC_EVENT_LOST_MSGS.
459 * @raw: array to pad the union.460 * @raw: array to pad the union.
include/uapi/linux/cyclades.h+0−494
@@ -1,494 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $
3 * linux/include/linux/cyclades.h
4 *
5 * This file was initially written by
6 * Randolph Bentson <bentson@grieg.seaslug.org> and is maintained by
7 * Ivan Passos <ivan@cyclades.com>.
8 *
9 * This file contains the general definitions for the cyclades.c driver
10 *$Log: cyclades.h,v $
11 *Revision 3.1 2002/01/29 11:36:16 henrique
12 *added throttle field on struct cyclades_port to indicate whether the
13 *port is throttled or not
14 *
15 *Revision 3.1 2000/04/19 18:52:52 ivan
16 *converted address fields to unsigned long and added fields for physical
17 *addresses on cyclades_card structure;
18 *
19 *Revision 3.0 1998/11/02 14:20:59 ivan
20 *added nports field on cyclades_card structure;
21 *
22 *Revision 2.5 1998/08/03 16:57:01 ivan
23 *added cyclades_idle_stats structure;
24 *
25 *Revision 2.4 1998/06/01 12:09:53 ivan
26 *removed closing_wait2 from cyclades_port structure;
27 *
28 *Revision 2.3 1998/03/16 18:01:12 ivan
29 *changes in the cyclades_port structure to get it closer to the
30 *standard serial port structure;
31 *added constants for new ioctls;
32 *
33 *Revision 2.2 1998/02/17 16:50:00 ivan
34 *changes in the cyclades_port structure (addition of shutdown_wait and
35 *chip_rev variables);
36 *added constants for new ioctls and for CD1400 rev. numbers.
37 *
38 *Revision 2.1 1997/10/24 16:03:00 ivan
39 *added rflow (which allows enabling the CD1400 special flow control
40 *feature) and rtsdtr_inv (which allows DTR/RTS pin inversion) to
41 *cyclades_port structure;
42 *added Alpha support
43 *
44 *Revision 2.0 1997/06/30 10:30:00 ivan
45 *added some new doorbell command constants related to IOCTLW and
46 *UART error signaling
47 *
48 *Revision 1.8 1997/06/03 15:30:00 ivan
49 *added constant ZFIRM_HLT
50 *added constant CyPCI_Ze_win ( = 2 * Cy_PCI_Zwin)
51 *
52 *Revision 1.7 1997/03/26 10:30:00 daniel
53 *new entries at the end of cyclades_port struct to reallocate
54 *variables illegally allocated within card memory.
55 *
56 *Revision 1.6 1996/09/09 18:35:30 bentson
57 *fold in changes for Cyclom-Z -- including structures for
58 *communicating with board as well modest changes to original
59 *structures to support new features.
60 *
61 *Revision 1.5 1995/11/13 21:13:31 bentson
62 *changes suggested by Michael Chastain <mec@duracef.shout.net>
63 *to support use of this file in non-kernel applications
64 *
65 *
66 */
67
68#ifndef _UAPI_LINUX_CYCLADES_H
69#define _UAPI_LINUX_CYCLADES_H
70
71#include <linux/types.h>
72
73struct cyclades_monitor {
74 unsigned long int_count;
75 unsigned long char_count;
76 unsigned long char_max;
77 unsigned long char_last;
78};
79
80/*
81 * These stats all reflect activity since the device was last initialized.
82 * (i.e., since the port was opened with no other processes already having it
83 * open)
84 */
85struct cyclades_idle_stats {
86 __kernel_old_time_t in_use; /* Time device has been in use (secs) */
87 __kernel_old_time_t recv_idle; /* Time since last char received (secs) */
88 __kernel_old_time_t xmit_idle; /* Time since last char transmitted (secs) */
89 unsigned long recv_bytes; /* Bytes received */
90 unsigned long xmit_bytes; /* Bytes transmitted */
91 unsigned long overruns; /* Input overruns */
92 unsigned long frame_errs; /* Input framing errors */
93 unsigned long parity_errs; /* Input parity errors */
94};
95
96#define CYCLADES_MAGIC 0x4359
97
98#define CYGETMON 0x435901
99#define CYGETTHRESH 0x435902
100#define CYSETTHRESH 0x435903
101#define CYGETDEFTHRESH 0x435904
102#define CYSETDEFTHRESH 0x435905
103#define CYGETTIMEOUT 0x435906
104#define CYSETTIMEOUT 0x435907
105#define CYGETDEFTIMEOUT 0x435908
106#define CYSETDEFTIMEOUT 0x435909
107#define CYSETRFLOW 0x43590a
108#define CYGETRFLOW 0x43590b
109#define CYSETRTSDTR_INV 0x43590c
110#define CYGETRTSDTR_INV 0x43590d
111#define CYZSETPOLLCYCLE 0x43590e
112#define CYZGETPOLLCYCLE 0x43590f
113#define CYGETCD1400VER 0x435910
114#define CYSETWAIT 0x435912
115#define CYGETWAIT 0x435913
116
117/*************** CYCLOM-Z ADDITIONS ***************/
118
119#define CZIOC ('M' << 8)
120#define CZ_NBOARDS (CZIOC|0xfa)
121#define CZ_BOOT_START (CZIOC|0xfb)
122#define CZ_BOOT_DATA (CZIOC|0xfc)
123#define CZ_BOOT_END (CZIOC|0xfd)
124#define CZ_TEST (CZIOC|0xfe)
125
126#define CZ_DEF_POLL (HZ/25)
127
128#define MAX_BOARD 4 /* Max number of boards */
129#define MAX_DEV 256 /* Max number of ports total */
130#define CYZ_MAX_SPEED 921600
131
132#define CYZ_FIFO_SIZE 16
133
134#define CYZ_BOOT_NWORDS 0x100
135struct CYZ_BOOT_CTRL {
136 unsigned short nboard;
137 int status[MAX_BOARD];
138 int nchannel[MAX_BOARD];
139 int fw_rev[MAX_BOARD];
140 unsigned long offset;
141 unsigned long data[CYZ_BOOT_NWORDS];
142};
143
144
145#ifndef DP_WINDOW_SIZE
146/*
147 * Memory Window Sizes
148 */
149
150#define DP_WINDOW_SIZE (0x00080000) /* window size 512 Kb */
151#define ZE_DP_WINDOW_SIZE (0x00100000) /* window size 1 Mb (Ze and
152 8Zo V.2 */
153#define CTRL_WINDOW_SIZE (0x00000080) /* runtime regs 128 bytes */
154
155/*
156 * CUSTOM_REG - Cyclom-Z/PCI Custom Registers Set. The driver
157 * normally will access only interested on the fpga_id, fpga_version,
158 * start_cpu and stop_cpu.
159 */
160
161struct CUSTOM_REG {
162 __u32 fpga_id; /* FPGA Identification Register */
163 __u32 fpga_version; /* FPGA Version Number Register */
164 __u32 cpu_start; /* CPU start Register (write) */
165 __u32 cpu_stop; /* CPU stop Register (write) */
166 __u32 misc_reg; /* Miscellaneous Register */
167 __u32 idt_mode; /* IDT mode Register */
168 __u32 uart_irq_status; /* UART IRQ status Register */
169 __u32 clear_timer0_irq; /* Clear timer interrupt Register */
170 __u32 clear_timer1_irq; /* Clear timer interrupt Register */
171 __u32 clear_timer2_irq; /* Clear timer interrupt Register */
172 __u32 test_register; /* Test Register */
173 __u32 test_count; /* Test Count Register */
174 __u32 timer_select; /* Timer select register */
175 __u32 pr_uart_irq_status; /* Prioritized UART IRQ stat Reg */
176 __u32 ram_wait_state; /* RAM wait-state Register */
177 __u32 uart_wait_state; /* UART wait-state Register */
178 __u32 timer_wait_state; /* timer wait-state Register */
179 __u32 ack_wait_state; /* ACK wait State Register */
180};
181
182/*
183 * RUNTIME_9060 - PLX PCI9060ES local configuration and shared runtime
184 * registers. This structure can be used to access the 9060 registers
185 * (memory mapped).
186 */
187
188struct RUNTIME_9060 {
189 __u32 loc_addr_range; /* 00h - Local Address Range */
190 __u32 loc_addr_base; /* 04h - Local Address Base */
191 __u32 loc_arbitr; /* 08h - Local Arbitration */
192 __u32 endian_descr; /* 0Ch - Big/Little Endian Descriptor */
193 __u32 loc_rom_range; /* 10h - Local ROM Range */
194 __u32 loc_rom_base; /* 14h - Local ROM Base */
195 __u32 loc_bus_descr; /* 18h - Local Bus descriptor */
196 __u32 loc_range_mst; /* 1Ch - Local Range for Master to PCI */
197 __u32 loc_base_mst; /* 20h - Local Base for Master PCI */
198 __u32 loc_range_io; /* 24h - Local Range for Master IO */
199 __u32 pci_base_mst; /* 28h - PCI Base for Master PCI */
200 __u32 pci_conf_io; /* 2Ch - PCI configuration for Master IO */
201 __u32 filler1; /* 30h */
202 __u32 filler2; /* 34h */
203 __u32 filler3; /* 38h */
204 __u32 filler4; /* 3Ch */
205 __u32 mail_box_0; /* 40h - Mail Box 0 */
206 __u32 mail_box_1; /* 44h - Mail Box 1 */
207 __u32 mail_box_2; /* 48h - Mail Box 2 */
208 __u32 mail_box_3; /* 4Ch - Mail Box 3 */
209 __u32 filler5; /* 50h */
210 __u32 filler6; /* 54h */
211 __u32 filler7; /* 58h */
212 __u32 filler8; /* 5Ch */
213 __u32 pci_doorbell; /* 60h - PCI to Local Doorbell */
214 __u32 loc_doorbell; /* 64h - Local to PCI Doorbell */
215 __u32 intr_ctrl_stat; /* 68h - Interrupt Control/Status */
216 __u32 init_ctrl; /* 6Ch - EEPROM control, Init Control, etc */
217};
218
219/* Values for the Local Base Address re-map register */
220
221#define WIN_RAM 0x00000001L /* set the sliding window to RAM */
222#define WIN_CREG 0x14000001L /* set the window to custom Registers */
223
224/* Values timer select registers */
225
226#define TIMER_BY_1M 0x00 /* clock divided by 1M */
227#define TIMER_BY_256K 0x01 /* clock divided by 256k */
228#define TIMER_BY_128K 0x02 /* clock divided by 128k */
229#define TIMER_BY_32K 0x03 /* clock divided by 32k */
230
231/****************** ****************** *******************/
232#endif
233
234#ifndef ZFIRM_ID
235/* #include "zfwint.h" */
236/****************** ****************** *******************/
237/*
238 * This file contains the definitions for interfacing with the
239 * Cyclom-Z ZFIRM Firmware.
240 */
241
242/* General Constant definitions */
243
244#define MAX_CHAN 64 /* max number of channels per board */
245
246/* firmware id structure (set after boot) */
247
248#define ID_ADDRESS 0x00000180L /* signature/pointer address */
249#define ZFIRM_ID 0x5557465AL /* ZFIRM/U signature */
250#define ZFIRM_HLT 0x59505B5CL /* ZFIRM needs external power supply */
251#define ZFIRM_RST 0x56040674L /* RST signal (due to FW reset) */
252
253#define ZF_TINACT_DEF 1000 /* default inactivity timeout
254 (1000 ms) */
255#define ZF_TINACT ZF_TINACT_DEF
256
257struct FIRM_ID {
258 __u32 signature; /* ZFIRM/U signature */
259 __u32 zfwctrl_addr; /* pointer to ZFW_CTRL structure */
260};
261
262/* Op. System id */
263
264#define C_OS_LINUX 0x00000030 /* generic Linux system */
265
266/* channel op_mode */
267
268#define C_CH_DISABLE 0x00000000 /* channel is disabled */
269#define C_CH_TXENABLE 0x00000001 /* channel Tx enabled */
270#define C_CH_RXENABLE 0x00000002 /* channel Rx enabled */
271#define C_CH_ENABLE 0x00000003 /* channel Tx/Rx enabled */
272#define C_CH_LOOPBACK 0x00000004 /* Loopback mode */
273
274/* comm_parity - parity */
275
276#define C_PR_NONE 0x00000000 /* None */
277#define C_PR_ODD 0x00000001 /* Odd */
278#define C_PR_EVEN 0x00000002 /* Even */
279#define C_PR_MARK 0x00000004 /* Mark */
280#define C_PR_SPACE 0x00000008 /* Space */
281#define C_PR_PARITY 0x000000ff
282
283#define C_PR_DISCARD 0x00000100 /* discard char with frame/par error */
284#define C_PR_IGNORE 0x00000200 /* ignore frame/par error */
285
286/* comm_data_l - data length and stop bits */
287
288#define C_DL_CS5 0x00000001
289#define C_DL_CS6 0x00000002
290#define C_DL_CS7 0x00000004
291#define C_DL_CS8 0x00000008
292#define C_DL_CS 0x0000000f
293#define C_DL_1STOP 0x00000010
294#define C_DL_15STOP 0x00000020
295#define C_DL_2STOP 0x00000040
296#define C_DL_STOP 0x000000f0
297
298/* interrupt enabling/status */
299
300#define C_IN_DISABLE 0x00000000 /* zero, disable interrupts */
301#define C_IN_TXBEMPTY 0x00000001 /* tx buffer empty */
302#define C_IN_TXLOWWM 0x00000002 /* tx buffer below LWM */
303#define C_IN_RXHIWM 0x00000010 /* rx buffer above HWM */
304#define C_IN_RXNNDT 0x00000020 /* rx no new data timeout */
305#define C_IN_MDCD 0x00000100 /* modem DCD change */
306#define C_IN_MDSR 0x00000200 /* modem DSR change */
307#define C_IN_MRI 0x00000400 /* modem RI change */
308#define C_IN_MCTS 0x00000800 /* modem CTS change */
309#define C_IN_RXBRK 0x00001000 /* Break received */
310#define C_IN_PR_ERROR 0x00002000 /* parity error */
311#define C_IN_FR_ERROR 0x00004000 /* frame error */
312#define C_IN_OVR_ERROR 0x00008000 /* overrun error */
313#define C_IN_RXOFL 0x00010000 /* RX buffer overflow */
314#define C_IN_IOCTLW 0x00020000 /* I/O control w/ wait */
315#define C_IN_MRTS 0x00040000 /* modem RTS drop */
316#define C_IN_ICHAR 0x00080000
317
318/* flow control */
319
320#define C_FL_OXX 0x00000001 /* output Xon/Xoff flow control */
321#define C_FL_IXX 0x00000002 /* output Xon/Xoff flow control */
322#define C_FL_OIXANY 0x00000004 /* output Xon/Xoff (any xon) */
323#define C_FL_SWFLOW 0x0000000f
324
325/* flow status */
326
327#define C_FS_TXIDLE 0x00000000 /* no Tx data in the buffer or UART */
328#define C_FS_SENDING 0x00000001 /* UART is sending data */
329#define C_FS_SWFLOW 0x00000002 /* Tx is stopped by received Xoff */
330
331/* rs_control/rs_status RS-232 signals */
332
333#define C_RS_PARAM 0x80000000 /* Indicates presence of parameter in
334 IOCTLM command */
335#define C_RS_RTS 0x00000001 /* RTS */
336#define C_RS_DTR 0x00000004 /* DTR */
337#define C_RS_DCD 0x00000100 /* CD */
338#define C_RS_DSR 0x00000200 /* DSR */
339#define C_RS_RI 0x00000400 /* RI */
340#define C_RS_CTS 0x00000800 /* CTS */
341
342/* commands Host <-> Board */
343
344#define C_CM_RESET 0x01 /* reset/flush buffers */
345#define C_CM_IOCTL 0x02 /* re-read CH_CTRL */
346#define C_CM_IOCTLW 0x03 /* re-read CH_CTRL, intr when done */
347#define C_CM_IOCTLM 0x04 /* RS-232 outputs change */
348#define C_CM_SENDXOFF 0x10 /* send Xoff */
349#define C_CM_SENDXON 0x11 /* send Xon */
350#define C_CM_CLFLOW 0x12 /* Clear flow control (resume) */
351#define C_CM_SENDBRK 0x41 /* send break */
352#define C_CM_INTBACK 0x42 /* Interrupt back */
353#define C_CM_SET_BREAK 0x43 /* Tx break on */
354#define C_CM_CLR_BREAK 0x44 /* Tx break off */
355#define C_CM_CMD_DONE 0x45 /* Previous command done */
356#define C_CM_INTBACK2 0x46 /* Alternate Interrupt back */
357#define C_CM_TINACT 0x51 /* set inactivity detection */
358#define C_CM_IRQ_ENBL 0x52 /* enable generation of interrupts */
359#define C_CM_IRQ_DSBL 0x53 /* disable generation of interrupts */
360#define C_CM_ACK_ENBL 0x54 /* enable acknowledged interrupt mode */
361#define C_CM_ACK_DSBL 0x55 /* disable acknowledged intr mode */
362#define C_CM_FLUSH_RX 0x56 /* flushes Rx buffer */
363#define C_CM_FLUSH_TX 0x57 /* flushes Tx buffer */
364#define C_CM_Q_ENABLE 0x58 /* enables queue access from the
365 driver */
366#define C_CM_Q_DISABLE 0x59 /* disables queue access from the
367 driver */
368
369#define C_CM_TXBEMPTY 0x60 /* Tx buffer is empty */
370#define C_CM_TXLOWWM 0x61 /* Tx buffer low water mark */
371#define C_CM_RXHIWM 0x62 /* Rx buffer high water mark */
372#define C_CM_RXNNDT 0x63 /* rx no new data timeout */
373#define C_CM_TXFEMPTY 0x64
374#define C_CM_ICHAR 0x65
375#define C_CM_MDCD 0x70 /* modem DCD change */
376#define C_CM_MDSR 0x71 /* modem DSR change */
377#define C_CM_MRI 0x72 /* modem RI change */
378#define C_CM_MCTS 0x73 /* modem CTS change */
379#define C_CM_MRTS 0x74 /* modem RTS drop */
380#define C_CM_RXBRK 0x84 /* Break received */
381#define C_CM_PR_ERROR 0x85 /* Parity error */
382#define C_CM_FR_ERROR 0x86 /* Frame error */
383#define C_CM_OVR_ERROR 0x87 /* Overrun error */
384#define C_CM_RXOFL 0x88 /* RX buffer overflow */
385#define C_CM_CMDERROR 0x90 /* command error */
386#define C_CM_FATAL 0x91 /* fatal error */
387#define C_CM_HW_RESET 0x92 /* reset board */
388
389/*
390 * CH_CTRL - This per port structure contains all parameters
391 * that control an specific port. It can be seen as the
392 * configuration registers of a "super-serial-controller".
393 */
394
395struct CH_CTRL {
396 __u32 op_mode; /* operation mode */
397 __u32 intr_enable; /* interrupt masking */
398 __u32 sw_flow; /* SW flow control */
399 __u32 flow_status; /* output flow status */
400 __u32 comm_baud; /* baud rate - numerically specified */
401 __u32 comm_parity; /* parity */
402 __u32 comm_data_l; /* data length/stop */
403 __u32 comm_flags; /* other flags */
404 __u32 hw_flow; /* HW flow control */
405 __u32 rs_control; /* RS-232 outputs */
406 __u32 rs_status; /* RS-232 inputs */
407 __u32 flow_xon; /* xon char */
408 __u32 flow_xoff; /* xoff char */
409 __u32 hw_overflow; /* hw overflow counter */
410 __u32 sw_overflow; /* sw overflow counter */
411 __u32 comm_error; /* frame/parity error counter */
412 __u32 ichar;
413 __u32 filler[7];
414};
415
416
417/*
418 * BUF_CTRL - This per channel structure contains
419 * all Tx and Rx buffer control for a given channel.
420 */
421
422struct BUF_CTRL {
423 __u32 flag_dma; /* buffers are in Host memory */
424 __u32 tx_bufaddr; /* address of the tx buffer */
425 __u32 tx_bufsize; /* tx buffer size */
426 __u32 tx_threshold; /* tx low water mark */
427 __u32 tx_get; /* tail index tx buf */
428 __u32 tx_put; /* head index tx buf */
429 __u32 rx_bufaddr; /* address of the rx buffer */
430 __u32 rx_bufsize; /* rx buffer size */
431 __u32 rx_threshold; /* rx high water mark */
432 __u32 rx_get; /* tail index rx buf */
433 __u32 rx_put; /* head index rx buf */
434 __u32 filler[5]; /* filler to align structures */
435};
436
437/*
438 * BOARD_CTRL - This per board structure contains all global
439 * control fields related to the board.
440 */
441
442struct BOARD_CTRL {
443
444 /* static info provided by the on-board CPU */
445 __u32 n_channel; /* number of channels */
446 __u32 fw_version; /* firmware version */
447
448 /* static info provided by the driver */
449 __u32 op_system; /* op_system id */
450 __u32 dr_version; /* driver version */
451
452 /* board control area */
453 __u32 inactivity; /* inactivity control */
454
455 /* host to FW commands */
456 __u32 hcmd_channel; /* channel number */
457 __u32 hcmd_param; /* pointer to parameters */
458
459 /* FW to Host commands */
460 __u32 fwcmd_channel; /* channel number */
461 __u32 fwcmd_param; /* pointer to parameters */
462 __u32 zf_int_queue_addr; /* offset for INT_QUEUE structure */
463
464 /* filler so the structures are aligned */
465 __u32 filler[6];
466};
467
468/* Host Interrupt Queue */
469
470#define QUEUE_SIZE (10*MAX_CHAN)
471
472struct INT_QUEUE {
473 unsigned char intr_code[QUEUE_SIZE];
474 unsigned long channel[QUEUE_SIZE];
475 unsigned long param[QUEUE_SIZE];
476 unsigned long put;
477 unsigned long get;
478};
479
480/*
481 * ZFW_CTRL - This is the data structure that includes all other
482 * data structures used by the Firmware.
483 */
484
485struct ZFW_CTRL {
486 struct BOARD_CTRL board_ctrl;
487 struct CH_CTRL ch_ctrl[MAX_CHAN];
488 struct BUF_CTRL buf_ctrl[MAX_CHAN];
489};
490
491/****************** ****************** *******************/
492#endif
493
494#endif /* _UAPI_LINUX_CYCLADES_H */
include/uapi/linux/dm-ioctl.h+16−2
@@ -193,8 +193,22 @@ struct dm_name_list { · 192 unmodified lines
193 __u32 next; /* offset to the next record from193 __u32 next; /* offset to the next record from
194 the _start_ of this */194 the _start_ of this */
195 char name[0];195 char name[0];
196
197 /*
198 * The following members can be accessed by taking a pointer that
199 * points immediately after the terminating zero character in "name"
200 * and aligning this pointer to next 8-byte boundary.
201 * Uuid is present if the flag DM_NAME_LIST_FLAG_HAS_UUID is set.
202 *
203 * __u32 event_nr;
204 * __u32 flags;
205 * char uuid[0];
206 */
196};207};
197 208
209#define DM_NAME_LIST_FLAG_HAS_UUID 1
210#define DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID 2
211
198/*212/*
199 * Used to retrieve the target versions213 * Used to retrieve the target versions
200 */214 */
@@ -272,9 +286,9 @@ enum { · 71 unmodified lines
272#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)286#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
273 287
274#define DM_VERSION_MAJOR 4288#define DM_VERSION_MAJOR 4
275#define DM_VERSION_MINOR 44289#define DM_VERSION_MINOR 45
276#define DM_VERSION_PATCHLEVEL 0290#define DM_VERSION_PATCHLEVEL 0
277#define DM_VERSION_EXTRA "-ioctl (2021-02-01)"291#define DM_VERSION_EXTRA "-ioctl (2021-03-22)"
278 292
279/* Status bits */293/* Status bits */
280#define DM_READONLY_FLAG (1 << 0) /* In/Out */294#define DM_READONLY_FLAG (1 << 0) /* In/Out */
include/uapi/linux/dqblk_xfs.h+4−1
@@ -219,7 +219,10 @@ struct fs_quota_statv { · 218 unmodified lines
219 __s32 qs_rtbtimelimit;/* limit for rt blks timer */219 __s32 qs_rtbtimelimit;/* limit for rt blks timer */
220 __u16 qs_bwarnlimit; /* limit for num warnings */220 __u16 qs_bwarnlimit; /* limit for num warnings */
221 __u16 qs_iwarnlimit; /* limit for num warnings */221 __u16 qs_iwarnlimit; /* limit for num warnings */
222 __u64 qs_pad2[8]; /* for future proofing */222 __u16 qs_rtbwarnlimit;/* limit for rt blks warnings */
223 __u16 qs_pad3;
224 __u32 qs_pad4;
225 __u64 qs_pad2[7]; /* for future proofing */
223};226};
224 227
225#endif /* _LINUX_DQBLK_XFS_H */228#endif /* _LINUX_DQBLK_XFS_H */
include/uapi/linux/elf.h+1−0
@@ -426,6 +426,7 @@ typedef struct elf64_shdr { · 425 unmodified lines
426#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */426#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */
427#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */427#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */
428#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* arm64 tagged address control (prctl()) */428#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* arm64 tagged address control (prctl()) */
429#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* arm64 ptr auth enabled keys (prctl()) */
429#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */430#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
430#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */431#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
431#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */432#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
include/uapi/linux/ethtool.h+44−11
@@ -669,6 +669,11 @@ enum ethtool_link_ext_substate_cable_issue { · 668 unmodified lines
669 * @ETH_SS_TS_TX_TYPES: timestamping Tx types669 * @ETH_SS_TS_TX_TYPES: timestamping Tx types
670 * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters670 * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
671 * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types671 * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
672 * @ETH_SS_STATS_STD: standardized stats
673 * @ETH_SS_STATS_ETH_PHY: names of IEEE 802.3 PHY statistics
674 * @ETH_SS_STATS_ETH_MAC: names of IEEE 802.3 MAC statistics
675 * @ETH_SS_STATS_ETH_CTRL: names of IEEE 802.3 MAC Control statistics
676 * @ETH_SS_STATS_RMON: names of RMON statistics
672 *677 *
673 * @ETH_SS_COUNT: number of defined string sets678 * @ETH_SS_COUNT: number of defined string sets
674 */679 */
@@ -689,6 +694,11 @@ enum ethtool_stringset { · 14 unmodified lines
689 ETH_SS_TS_TX_TYPES,694 ETH_SS_TS_TX_TYPES,
690 ETH_SS_TS_RX_FILTERS,695 ETH_SS_TS_RX_FILTERS,
691 ETH_SS_UDP_TUNNEL_TYPES,696 ETH_SS_UDP_TUNNEL_TYPES,
697 ETH_SS_STATS_STD,
698 ETH_SS_STATS_ETH_PHY,
699 ETH_SS_STATS_ETH_MAC,
700 ETH_SS_STATS_ETH_CTRL,
701 ETH_SS_STATS_RMON,
692 702
693 /* add new constants above here */703 /* add new constants above here */
694 ETH_SS_COUNT704 ETH_SS_COUNT
@@ -1383,15 +1393,33 @@ struct ethtool_per_queue_op { · 688 unmodified lines
1383};1393};
1384 1394
1385/**1395/**
1386 * struct ethtool_fecparam - Ethernet forward error correction(fec) parameters1396 * struct ethtool_fecparam - Ethernet Forward Error Correction parameters
1387 * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM1397 * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM
1388 * @active_fec: FEC mode which is active on porte1398 * @active_fec: FEC mode which is active on the port, single bit set, GET only.
1389 * @fec: Bitmask of supported/configured FEC modes1399 * @fec: Bitmask of configured FEC modes.
1390 * @rsvd: Reserved for future extensions. i.e FEC bypass feature.1400 * @reserved: Reserved for future extensions, ignore on GET, write 0 for SET.
1391 *1401 *
1392 * Drivers should reject a non-zero setting of @autoneg when1402 * Note that @reserved was never validated on input and ethtool user space
1393 * autoneogotiation is disabled (or not supported) for the link.1403 * left it uninitialized when calling SET. Hence going forward it can only be
1404 * used to return a value to userspace with GET.
1405 *
1406 * FEC modes supported by the device can be read via %ETHTOOL_GLINKSETTINGS.
1407 * FEC settings are configured by link autonegotiation whenever it's enabled.
1408 * With autoneg on %ETHTOOL_GFECPARAM can be used to read the current mode.
1409 *
1410 * When autoneg is disabled %ETHTOOL_SFECPARAM controls the FEC settings.
1411 * It is recommended that drivers only accept a single bit set in @fec.
1412 * When multiple bits are set in @fec drivers may pick mode in an implementation
1413 * dependent way. Drivers should reject mixing %ETHTOOL_FEC_AUTO_BIT with other
1414 * FEC modes, because it's unclear whether in this case other modes constrain
1415 * AUTO or are independent choices.
1416 * Drivers must reject SET requests if they support none of the requested modes.
1417 *
1418 * If device does not support FEC drivers may use %ETHTOOL_FEC_NONE instead
1419 * of returning %EOPNOTSUPP from %ETHTOOL_GFECPARAM.
1394 *1420 *
1421 * See enum ethtool_fec_config_bits for definition of valid bits for both
1422 * @fec and @active_fec.
1395 */1423 */
1396struct ethtool_fecparam {1424struct ethtool_fecparam {
1397 __u32 cmd;1425 __u32 cmd;
@@ -1403,11 +1431,16 @@ struct ethtool_fecparam { · 5 unmodified lines
1403 1431
1404/**1432/**
1405 * enum ethtool_fec_config_bits - flags definition of ethtool_fec_configuration1433 * enum ethtool_fec_config_bits - flags definition of ethtool_fec_configuration
1406 * @ETHTOOL_FEC_NONE: FEC mode configuration is not supported1434 * @ETHTOOL_FEC_NONE_BIT: FEC mode configuration is not supported. Should not
1407 * @ETHTOOL_FEC_AUTO: Default/Best FEC mode provided by driver1435 * be used together with other bits. GET only.
1408 * @ETHTOOL_FEC_OFF: No FEC Mode1436 * @ETHTOOL_FEC_AUTO_BIT: Select default/best FEC mode automatically, usually
1409 * @ETHTOOL_FEC_RS: Reed-Solomon Forward Error Detection mode1437 * based link mode and SFP parameters read from module's
1410 * @ETHTOOL_FEC_BASER: Base-R/Reed-Solomon Forward Error Detection mode1438 * EEPROM. This bit does _not_ mean autonegotiation.
1439 * @ETHTOOL_FEC_OFF_BIT: No FEC Mode
1440 * @ETHTOOL_FEC_RS_BIT: Reed-Solomon FEC Mode
1441 * @ETHTOOL_FEC_BASER_BIT: Base-R/Reed-Solomon FEC Mode
1442 * @ETHTOOL_FEC_LLRS_BIT: Low Latency Reed Solomon FEC Mode (25G/50G Ethernet
1443 * Consortium)
1411 */1444 */
1412enum ethtool_fec_config_bits {1445enum ethtool_fec_config_bits {
1413 ETHTOOL_FEC_NONE_BIT,1446 ETHTOOL_FEC_NONE_BIT,
include/uapi/linux/ethtool_netlink.h+187−0
@@ -42,6 +42,10 @@ enum { · 41 unmodified lines
42 ETHTOOL_MSG_CABLE_TEST_ACT,42 ETHTOOL_MSG_CABLE_TEST_ACT,
43 ETHTOOL_MSG_CABLE_TEST_TDR_ACT,43 ETHTOOL_MSG_CABLE_TEST_TDR_ACT,
44 ETHTOOL_MSG_TUNNEL_INFO_GET,44 ETHTOOL_MSG_TUNNEL_INFO_GET,
45 ETHTOOL_MSG_FEC_GET,
46 ETHTOOL_MSG_FEC_SET,
47 ETHTOOL_MSG_MODULE_EEPROM_GET,
48 ETHTOOL_MSG_STATS_GET,
45 49
46 /* add new constants above here */50 /* add new constants above here */
47 __ETHTOOL_MSG_USER_CNT,51 __ETHTOOL_MSG_USER_CNT,
@@ -80,6 +84,10 @@ enum { · 32 unmodified lines
80 ETHTOOL_MSG_CABLE_TEST_NTF,84 ETHTOOL_MSG_CABLE_TEST_NTF,
81 ETHTOOL_MSG_CABLE_TEST_TDR_NTF,85 ETHTOOL_MSG_CABLE_TEST_TDR_NTF,
82 ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY,86 ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY,
87 ETHTOOL_MSG_FEC_GET_REPLY,
88 ETHTOOL_MSG_FEC_NTF,
89 ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY,
90 ETHTOOL_MSG_STATS_GET_REPLY,
83 91
84 /* add new constants above here */92 /* add new constants above here */
85 __ETHTOOL_MSG_KERNEL_CNT,93 __ETHTOOL_MSG_KERNEL_CNT,
@@ -629,6 +637,185 @@ enum { · 543 unmodified lines
629 ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)637 ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)
630};638};
631 639
640/* FEC */
641
642enum {
643 ETHTOOL_A_FEC_UNSPEC,
644 ETHTOOL_A_FEC_HEADER, /* nest - _A_HEADER_* */
645 ETHTOOL_A_FEC_MODES, /* bitset */
646 ETHTOOL_A_FEC_AUTO, /* u8 */
647 ETHTOOL_A_FEC_ACTIVE, /* u32 */
648 ETHTOOL_A_FEC_STATS, /* nest - _A_FEC_STAT */
649
650 __ETHTOOL_A_FEC_CNT,
651 ETHTOOL_A_FEC_MAX = (__ETHTOOL_A_FEC_CNT - 1)
652};
653
654enum {
655 ETHTOOL_A_FEC_STAT_UNSPEC,
656 ETHTOOL_A_FEC_STAT_PAD,
657
658 ETHTOOL_A_FEC_STAT_CORRECTED, /* array, u64 */
659 ETHTOOL_A_FEC_STAT_UNCORR, /* array, u64 */
660 ETHTOOL_A_FEC_STAT_CORR_BITS, /* array, u64 */
661
662 /* add new constants above here */
663 __ETHTOOL_A_FEC_STAT_CNT,
664 ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1)
665};
666
667/* MODULE EEPROM */
668
669enum {
670 ETHTOOL_A_MODULE_EEPROM_UNSPEC,
671 ETHTOOL_A_MODULE_EEPROM_HEADER, /* nest - _A_HEADER_* */
672
673 ETHTOOL_A_MODULE_EEPROM_OFFSET, /* u32 */
674 ETHTOOL_A_MODULE_EEPROM_LENGTH, /* u32 */
675 ETHTOOL_A_MODULE_EEPROM_PAGE, /* u8 */
676 ETHTOOL_A_MODULE_EEPROM_BANK, /* u8 */
677 ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS, /* u8 */
678 ETHTOOL_A_MODULE_EEPROM_DATA, /* nested */
679
680 __ETHTOOL_A_MODULE_EEPROM_CNT,
681 ETHTOOL_A_MODULE_EEPROM_MAX = (__ETHTOOL_A_MODULE_EEPROM_CNT - 1)
682};
683
684/* STATS */
685
686enum {
687 ETHTOOL_A_STATS_UNSPEC,
688 ETHTOOL_A_STATS_PAD,
689 ETHTOOL_A_STATS_HEADER, /* nest - _A_HEADER_* */
690 ETHTOOL_A_STATS_GROUPS, /* bitset */
691
692 ETHTOOL_A_STATS_GRP, /* nest - _A_STATS_GRP_* */
693
694 /* add new constants above here */
695 __ETHTOOL_A_STATS_CNT,
696 ETHTOOL_A_STATS_MAX = (__ETHTOOL_A_STATS_CNT - 1)
697};
698
699enum {
700 ETHTOOL_STATS_ETH_PHY,
701 ETHTOOL_STATS_ETH_MAC,
702 ETHTOOL_STATS_ETH_CTRL,
703 ETHTOOL_STATS_RMON,
704
705 /* add new constants above here */
706 __ETHTOOL_STATS_CNT
707};
708
709enum {
710 ETHTOOL_A_STATS_GRP_UNSPEC,
711 ETHTOOL_A_STATS_GRP_PAD,
712
713 ETHTOOL_A_STATS_GRP_ID, /* u32 */
714 ETHTOOL_A_STATS_GRP_SS_ID, /* u32 */
715
716 ETHTOOL_A_STATS_GRP_STAT, /* nest */
717
718 ETHTOOL_A_STATS_GRP_HIST_RX, /* nest */
719 ETHTOOL_A_STATS_GRP_HIST_TX, /* nest */
720
721 ETHTOOL_A_STATS_GRP_HIST_BKT_LOW, /* u32 */
722 ETHTOOL_A_STATS_GRP_HIST_BKT_HI, /* u32 */
723 ETHTOOL_A_STATS_GRP_HIST_VAL, /* u64 */
724
725 /* add new constants above here */
726 __ETHTOOL_A_STATS_GRP_CNT,
727 ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1)
728};
729
730enum {
731 /* 30.3.2.1.5 aSymbolErrorDuringCarrier */
732 ETHTOOL_A_STATS_ETH_PHY_5_SYM_ERR,
733
734 /* add new constants above here */
735 __ETHTOOL_A_STATS_ETH_PHY_CNT,
736 ETHTOOL_A_STATS_ETH_PHY_MAX = (__ETHTOOL_A_STATS_ETH_PHY_CNT - 1)
737};
738
739enum {
740 /* 30.3.1.1.2 aFramesTransmittedOK */
741 ETHTOOL_A_STATS_ETH_MAC_2_TX_PKT,
742 /* 30.3.1.1.3 aSingleCollisionFrames */
743 ETHTOOL_A_STATS_ETH_MAC_3_SINGLE_COL,
744 /* 30.3.1.1.4 aMultipleCollisionFrames */
745 ETHTOOL_A_STATS_ETH_MAC_4_MULTI_COL,
746 /* 30.3.1.1.5 aFramesReceivedOK */
747 ETHTOOL_A_STATS_ETH_MAC_5_RX_PKT,
748 /* 30.3.1.1.6 aFrameCheckSequenceErrors */
749 ETHTOOL_A_STATS_ETH_MAC_6_FCS_ERR,
750 /* 30.3.1.1.7 aAlignmentErrors */
751 ETHTOOL_A_STATS_ETH_MAC_7_ALIGN_ERR,
752 /* 30.3.1.1.8 aOctetsTransmittedOK */
753 ETHTOOL_A_STATS_ETH_MAC_8_TX_BYTES,
754 /* 30.3.1.1.9 aFramesWithDeferredXmissions */
755 ETHTOOL_A_STATS_ETH_MAC_9_TX_DEFER,
756 /* 30.3.1.1.10 aLateCollisions */
757 ETHTOOL_A_STATS_ETH_MAC_10_LATE_COL,
758 /* 30.3.1.1.11 aFramesAbortedDueToXSColls */
759 ETHTOOL_A_STATS_ETH_MAC_11_XS_COL,
760 /* 30.3.1.1.12 aFramesLostDueToIntMACXmitError */
761 ETHTOOL_A_STATS_ETH_MAC_12_TX_INT_ERR,
762 /* 30.3.1.1.13 aCarrierSenseErrors */
763 ETHTOOL_A_STATS_ETH_MAC_13_CS_ERR,
764 /* 30.3.1.1.14 aOctetsReceivedOK */
765 ETHTOOL_A_STATS_ETH_MAC_14_RX_BYTES,
766 /* 30.3.1.1.15 aFramesLostDueToIntMACRcvError */
767 ETHTOOL_A_STATS_ETH_MAC_15_RX_INT_ERR,
768
769 /* 30.3.1.1.18 aMulticastFramesXmittedOK */
770 ETHTOOL_A_STATS_ETH_MAC_18_TX_MCAST,
771 /* 30.3.1.1.19 aBroadcastFramesXmittedOK */
772 ETHTOOL_A_STATS_ETH_MAC_19_TX_BCAST,
773 /* 30.3.1.1.20 aFramesWithExcessiveDeferral */
774 ETHTOOL_A_STATS_ETH_MAC_20_XS_DEFER,
775 /* 30.3.1.1.21 aMulticastFramesReceivedOK */
776 ETHTOOL_A_STATS_ETH_MAC_21_RX_MCAST,
777 /* 30.3.1.1.22 aBroadcastFramesReceivedOK */
778 ETHTOOL_A_STATS_ETH_MAC_22_RX_BCAST,
779 /* 30.3.1.1.23 aInRangeLengthErrors */
780 ETHTOOL_A_STATS_ETH_MAC_23_IR_LEN_ERR,
781 /* 30.3.1.1.24 aOutOfRangeLengthField */
782 ETHTOOL_A_STATS_ETH_MAC_24_OOR_LEN,
783 /* 30.3.1.1.25 aFrameTooLongErrors */
784 ETHTOOL_A_STATS_ETH_MAC_25_TOO_LONG_ERR,
785
786 /* add new constants above here */
787 __ETHTOOL_A_STATS_ETH_MAC_CNT,
788 ETHTOOL_A_STATS_ETH_MAC_MAX = (__ETHTOOL_A_STATS_ETH_MAC_CNT - 1)
789};
790
791enum {
792 /* 30.3.3.3 aMACControlFramesTransmitted */
793 ETHTOOL_A_STATS_ETH_CTRL_3_TX,
794 /* 30.3.3.4 aMACControlFramesReceived */
795 ETHTOOL_A_STATS_ETH_CTRL_4_RX,
796 /* 30.3.3.5 aUnsupportedOpcodesReceived */
797 ETHTOOL_A_STATS_ETH_CTRL_5_RX_UNSUP,
798
799 /* add new constants above here */
800 __ETHTOOL_A_STATS_ETH_CTRL_CNT,
801 ETHTOOL_A_STATS_ETH_CTRL_MAX = (__ETHTOOL_A_STATS_ETH_CTRL_CNT - 1)
802};
803
804enum {
805 /* etherStatsUndersizePkts */
806 ETHTOOL_A_STATS_RMON_UNDERSIZE,
807 /* etherStatsOversizePkts */
808 ETHTOOL_A_STATS_RMON_OVERSIZE,
809 /* etherStatsFragments */
810 ETHTOOL_A_STATS_RMON_FRAG,
811 /* etherStatsJabbers */
812 ETHTOOL_A_STATS_RMON_JABBER,
813
814 /* add new constants above here */
815 __ETHTOOL_A_STATS_RMON_CNT,
816 ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1)
817};
818
632/* generic netlink info */819/* generic netlink info */
633#define ETHTOOL_GENL_NAME "ethtool"820#define ETHTOOL_GENL_NAME "ethtool"
634#define ETHTOOL_GENL_VERSION 1821#define ETHTOOL_GENL_VERSION 1
include/uapi/linux/fd.h+23−23
@@ -49,11 +49,11 @@ struct floppy_struct { · 48 unmodified lines
49#define FDCLRPRM _IO(2, 0x41)49#define FDCLRPRM _IO(2, 0x41)
50/* clear user-defined parameters */50/* clear user-defined parameters */
51 51
52#define FDSETPRM _IOW(2, 0x42, struct floppy_struct) 52#define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
53#define FDSETMEDIAPRM FDSETPRM53#define FDSETMEDIAPRM FDSETPRM
54/* set user-defined parameters for current media */54/* set user-defined parameters for current media */
55 55
56#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct) 56#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
57#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)57#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
58#define FDDEFMEDIAPRM FDDEFPRM58#define FDDEFMEDIAPRM FDDEFPRM
59#define FDGETMEDIAPRM FDGETPRM59#define FDGETMEDIAPRM FDGETPRM
@@ -65,7 +65,7 @@ struct floppy_struct { · 5 unmodified lines
65/* issue/don't issue kernel messages on media type change */65/* issue/don't issue kernel messages on media type change */
66 66
67 67
68/* 68/*
69 * Formatting (obsolete)69 * Formatting (obsolete)
70 */70 */
71#define FD_FILL_BYTE 0xF6 /* format fill byte. */71#define FD_FILL_BYTE 0xF6 /* format fill byte. */
@@ -126,13 +126,13 @@ typedef char floppy_drive_name[16]; · 54 unmodified lines
126 */126 */
127struct floppy_drive_params {127struct floppy_drive_params {
128 signed char cmos; /* CMOS type */128 signed char cmos; /* CMOS type */
129 129
130 /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms 130 /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms
131 * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA).131 * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA).
132 */132 */
133 unsigned long max_dtr; /* Step rate, usec */133 unsigned long max_dtr; /* Step rate, usec */
134 unsigned long hlt; /* Head load/settle time, msec */134 unsigned long hlt; /* Head load/settle time, msec */
135 unsigned long hut; /* Head unload time (remnant of 135 unsigned long hut; /* Head unload time (remnant of
136 * 8" drives) */136 * 8" drives) */
137 unsigned long srt; /* Step rate, usec */137 unsigned long srt; /* Step rate, usec */
138 138
@@ -145,12 +145,12 @@ struct floppy_drive_params { · 6 unmodified lines
145 unsigned char rps; /* rotations per second */145 unsigned char rps; /* rotations per second */
146 unsigned char tracks; /* maximum number of tracks */146 unsigned char tracks; /* maximum number of tracks */
147 unsigned long timeout; /* timeout for interrupt requests */147 unsigned long timeout; /* timeout for interrupt requests */
148 148
149 unsigned char interleave_sect; /* if there are more sectors, use 149 unsigned char interleave_sect; /* if there are more sectors, use
150 * interleave */150 * interleave */
151 151
152 struct floppy_max_errors max_errors;152 struct floppy_max_errors max_errors;
153 153
154 char flags; /* various flags, including ftd_msg */154 char flags; /* various flags, including ftd_msg */
155/*155/*
156 * Announce successful media type detection and media information loss after156 * Announce successful media type detection and media information loss after
@@ -162,7 +162,7 @@ struct floppy_drive_params { · 5 unmodified lines
162#define FD_BROKEN_DCL 0x20162#define FD_BROKEN_DCL 0x20
163#define FD_DEBUG 0x02163#define FD_DEBUG 0x02
164#define FD_SILENT_DCL_CLEAR 0x4164#define FD_SILENT_DCL_CLEAR 0x4
165#define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware 165#define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware
166 considerations */166 considerations */
167 167
168 char read_track; /* use readtrack during probing? */168 char read_track; /* use readtrack during probing? */
@@ -176,8 +176,8 @@ struct floppy_drive_params { · 7 unmodified lines
176#define FD_AUTODETECT_SIZE 8176#define FD_AUTODETECT_SIZE 8
177 177
178 short autodetect[FD_AUTODETECT_SIZE]; /* autodetected formats */178 short autodetect[FD_AUTODETECT_SIZE]; /* autodetected formats */
179 179
180 int checkfreq; /* how often should the drive be checked for disk 180 int checkfreq; /* how often should the drive be checked for disk
181 * changes */181 * changes */
182 int native_format; /* native format of this drive */182 int native_format; /* native format of this drive */
183};183};
@@ -225,13 +225,13 @@ struct floppy_drive_struct { · 41 unmodified lines
225 * decremented after each probe.225 * decremented after each probe.
226 */226 */
227 int keep_data;227 int keep_data;
228 228
229 /* Prevent "aliased" accesses. */229 /* Prevent "aliased" accesses. */
230 int fd_ref;230 int fd_ref;
231 int fd_device;231 int fd_device;
232 unsigned long last_checked; /* when was the drive last checked for a disk 232 unsigned long last_checked; /* when was the drive last checked for a disk
233 * change? */233 * change? */
234 234
235 char *dmabuf;235 char *dmabuf;
236 int bufblocks;236 int bufblocks;
237};237};
@@ -255,7 +255,7 @@ enum reset_mode { · 17 unmodified lines
255/*255/*
256 * FDC state256 * FDC state
257 */257 */
258struct floppy_fdc_state { 258struct floppy_fdc_state {
259 int spec1; /* spec1 value last used */259 int spec1; /* spec1 value last used */
260 int spec2; /* spec2 value last used */260 int spec2; /* spec2 value last used */
261 int dtr;261 int dtr;
@@ -302,16 +302,16 @@ struct floppy_write_errors { · 40 unmodified lines
302 * to the user process are not counted.302 * to the user process are not counted.
303 */303 */
304 304
305 unsigned int write_errors; /* number of physical write errors 305 unsigned int write_errors; /* number of physical write errors
306 * encountered */306 * encountered */
307 307
308 /* position of first and last write errors */308 /* position of first and last write errors */
309 unsigned long first_error_sector;309 unsigned long first_error_sector;
310 int first_error_generation;310 int first_error_generation;
311 unsigned long last_error_sector;311 unsigned long last_error_sector;
312 int last_error_generation;312 int last_error_generation;
313 313
314 unsigned int badness; /* highest retry count for a read or write 314 unsigned int badness; /* highest retry count for a read or write
315 * operation */315 * operation */
316};316};
317 317
@@ -335,7 +335,7 @@ struct floppy_raw_cmd { · 17 unmodified lines
335#define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */335#define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */
336#define FD_RAW_INTR 8 /* wait for an interrupt */336#define FD_RAW_INTR 8 /* wait for an interrupt */
337#define FD_RAW_SPIN 0x10 /* spin up the disk for this command */337#define FD_RAW_SPIN 0x10 /* spin up the disk for this command */
338#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command 338#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command
339 * completion */339 * completion */
340#define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */340#define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */
341#define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */341#define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */
@@ -353,7 +353,7 @@ struct floppy_raw_cmd { · 11 unmodified lines
353 353
354 void __user *data;354 void __user *data;
355 char *kernel_data; /* location of data buffer in the kernel */355 char *kernel_data; /* location of data buffer in the kernel */
356 struct floppy_raw_cmd *next; /* used for chaining of raw cmd's 356 struct floppy_raw_cmd *next; /* used for chaining of raw cmd's
357 * within the kernel */357 * within the kernel */
358 long length; /* in: length of dma transfer. out: remaining bytes */358 long length; /* in: length of dma transfer. out: remaining bytes */
359 long phys_length; /* physical length, if different from dma length */359 long phys_length; /* physical length, if different from dma length */
include/uapi/linux/fuse.h+14−0
@@ -179,6 +179,8 @@ · 178 unmodified lines
179 * 7.33179 * 7.33
180 * - add FUSE_HANDLE_KILLPRIV_V2, FUSE_WRITE_KILL_SUIDGID, FATTR_KILL_SUIDGID180 * - add FUSE_HANDLE_KILLPRIV_V2, FUSE_WRITE_KILL_SUIDGID, FATTR_KILL_SUIDGID
181 * - add FUSE_OPEN_KILL_SUIDGID181 * - add FUSE_OPEN_KILL_SUIDGID
182 * - extend fuse_setxattr_in, add FUSE_SETXATTR_EXT
183 * - add FUSE_SETXATTR_ACL_KILL_SGID
182 */184 */
183 185
184#ifndef _LINUX_FUSE_H186#ifndef _LINUX_FUSE_H
@@ -330,6 +332,7 @@ struct fuse_file_lock { · 145 unmodified lines
330 * does not have CAP_FSETID. Additionally upon332 * does not have CAP_FSETID. Additionally upon
331 * write/truncate sgid is killed only if file has group333 * write/truncate sgid is killed only if file has group
332 * execute permission. (Same as Linux VFS behavior).334 * execute permission. (Same as Linux VFS behavior).
335 * FUSE_SETXATTR_EXT: Server supports extended struct fuse_setxattr_in
333 */336 */
334#define FUSE_ASYNC_READ (1 << 0)337#define FUSE_ASYNC_READ (1 << 0)
335#define FUSE_POSIX_LOCKS (1 << 1)338#define FUSE_POSIX_LOCKS (1 << 1)
@@ -360,6 +363,7 @@ struct fuse_file_lock { · 24 unmodified lines
360#define FUSE_MAP_ALIGNMENT (1 << 26)363#define FUSE_MAP_ALIGNMENT (1 << 26)
361#define FUSE_SUBMOUNTS (1 << 27)364#define FUSE_SUBMOUNTS (1 << 27)
362#define FUSE_HANDLE_KILLPRIV_V2 (1 << 28)365#define FUSE_HANDLE_KILLPRIV_V2 (1 << 28)
366#define FUSE_SETXATTR_EXT (1 << 29)
363 367
364/**368/**
365 * CUSE INIT request/reply flags369 * CUSE INIT request/reply flags
@@ -451,6 +455,12 @@ struct fuse_file_lock { · 85 unmodified lines
451 */455 */
452#define FUSE_OPEN_KILL_SUIDGID (1 << 0)456#define FUSE_OPEN_KILL_SUIDGID (1 << 0)
453 457
458/**
459 * setxattr flags
460 * FUSE_SETXATTR_ACL_KILL_SGID: Clear SGID when system.posix_acl_access is set
461 */
462#define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0)
463
454enum fuse_opcode {464enum fuse_opcode {
455 FUSE_LOOKUP = 1,465 FUSE_LOOKUP = 1,
456 FUSE_FORGET = 2, /* no reply */466 FUSE_FORGET = 2, /* no reply */
@@ -681,9 +691,13 @@ struct fuse_fsync_in { · 224 unmodified lines
681 uint32_t padding;691 uint32_t padding;
682};692};
683 693
694#define FUSE_COMPAT_SETXATTR_IN_SIZE 8
695
684struct fuse_setxattr_in {696struct fuse_setxattr_in {
685 uint32_t size;697 uint32_t size;
686 uint32_t flags;698 uint32_t flags;
699 uint32_t setxattr_flags;
700 uint32_t padding;
687};701};
688 702
689struct fuse_getxattr_in {703struct fuse_getxattr_in {
include/uapi/linux/icmp.h+42−0
@@ -20,6 +20,9 @@ · 19 unmodified lines
20 20
21#include <linux/types.h>21#include <linux/types.h>
22#include <asm/byteorder.h>22#include <asm/byteorder.h>
23#include <linux/in.h>
24#include <linux/if.h>
25#include <linux/in6.h>
23 26
24#define ICMP_ECHOREPLY 0 /* Echo Reply */27#define ICMP_ECHOREPLY 0 /* Echo Reply */
25#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */28#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
@@ -66,6 +69,23 @@ · 40 unmodified lines
66#define ICMP_EXC_TTL 0 /* TTL count exceeded */69#define ICMP_EXC_TTL 0 /* TTL count exceeded */
67#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */70#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */
68 71
72/* Codes for EXT_ECHO (PROBE) */
73#define ICMP_EXT_ECHO 42
74#define ICMP_EXT_ECHOREPLY 43
75#define ICMP_EXT_CODE_MAL_QUERY 1 /* Malformed Query */
76#define ICMP_EXT_CODE_NO_IF 2 /* No such Interface */
77#define ICMP_EXT_CODE_NO_TABLE_ENT 3 /* No such Table Entry */
78#define ICMP_EXT_CODE_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */
79
80/* Constants for EXT_ECHO (PROBE) */
81#define ICMP_EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply message */
82#define ICMP_EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply message */
83#define ICMP_EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply message */
84#define ICMP_EXT_ECHO_CTYPE_NAME 1
85#define ICMP_EXT_ECHO_CTYPE_INDEX 2
86#define ICMP_EXT_ECHO_CTYPE_ADDR 3
87#define ICMP_AFI_IP 1 /* Address Family Identifier for ipv4 */
88#define ICMP_AFI_IP6 2 /* Address Family Identifier for ipv6 */
69 89
70struct icmphdr {90struct icmphdr {
71 __u8 type;91 __u8 type;
@@ -118,4 +138,26 @@ struct icmp_extobj_hdr { · 46 unmodified lines
118 __u8 class_type;138 __u8 class_type;
119};139};
120 140
141/* RFC 8335: 2.1 Header for c-type 3 payload */
142struct icmp_ext_echo_ctype3_hdr {
143 __be16 afi;
144 __u8 addrlen;
145 __u8 reserved;
146};
147
148/* RFC 8335: 2.1 Interface Identification Object */
149struct icmp_ext_echo_iio {
150 struct icmp_extobj_hdr extobj_hdr;
151 union {
152 char name[IFNAMSIZ];
153 __be32 ifindex;
154 struct {
155 struct icmp_ext_echo_ctype3_hdr ctype3_hdr;
156 union {
157 struct in_addr ipv4_addr;
158 struct in6_addr ipv6_addr;
159 } ip_addr;
160 } addr;
161 } ident;
162};
121#endif /* _UAPI_LINUX_ICMP_H */163#endif /* _UAPI_LINUX_ICMP_H */
include/uapi/linux/icmpv6.h+3−0
@@ -140,6 +140,9 @@ struct icmp6hdr { · 139 unmodified lines
140#define ICMPV6_UNK_OPTION 2140#define ICMPV6_UNK_OPTION 2
141#define ICMPV6_HDR_INCOMP 3141#define ICMPV6_HDR_INCOMP 3
142 142
143/* Codes for EXT_ECHO (PROBE) */
144#define ICMPV6_EXT_ECHO_REQUEST 160
145#define ICMPV6_EXT_ECHO_REPLY 161
143/*146/*
144 * constants for (set|get)sockopt147 * constants for (set|get)sockopt
145 */148 */
include/uapi/linux/idxd.h+2−2
@@ -247,8 +247,8 @@ struct dsa_completion_record { · 246 unmodified lines
247 uint32_t rsvd2:8;247 uint32_t rsvd2:8;
248 };248 };
249 249
250 uint16_t delta_rec_size;250 uint32_t delta_rec_size;
251 uint16_t crc_val;251 uint32_t crc_val;
252 252
253 /* DIF check & strip */253 /* DIF check & strip */
254 struct {254 struct {
include/uapi/linux/if_bonding.h+0−11
@@ -153,14 +153,3 @@ enum { · 152 unmodified lines
153#define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1)153#define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1)
154 154
155#endif /* _LINUX_IF_BONDING_H */155#endif /* _LINUX_IF_BONDING_H */
156
157/*
158 * Local variables:
159 * version-control: t
160 * kept-new-versions: 5
161 * c-indent-level: 8
162 * c-basic-offset: 8
163 * tab-width: 8
164 * End:
165 */
166
include/uapi/linux/if_fddi.h+1−1
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 * Version: @(#)if_fddi.h 1.0.3 Oct 6 20189 * Version: @(#)if_fddi.h 1.0.3 Oct 6 2018
10 *10 *
11 * Author: Lawrence V. Stefani, <stefani@yahoo.com>11 * Author: Lawrence V. Stefani, <stefani@yahoo.com>
12 * Maintainer: Maciej W. Rozycki, <macro@linux-mips.org>12 * Maintainer: Maciej W. Rozycki, <macro@orcam.me.uk>
13 *13 *
14 * if_fddi.h is based on previous if_ether.h and if_tr.h work by14 * if_fddi.h is based on previous if_ether.h and if_tr.h work by
15 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>15 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
include/uapi/linux/if_link.h+1−0
@@ -614,6 +614,7 @@ enum macvlan_macaddr_mode { · 613 unmodified lines
614};614};
615 615
616#define MACVLAN_FLAG_NOPROMISC 1616#define MACVLAN_FLAG_NOPROMISC 1
617#define MACVLAN_FLAG_NODST 2 /* skip dst macvlan if matching src macvlan */
617 618
618/* VRF section */619/* VRF section */
619enum {620enum {
include/uapi/linux/iio/buffer.h+10−0
@@ -0,0 +1,10 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* industrial I/O buffer definitions needed both in and out of kernel
3 */
4
5#ifndef _UAPI_IIO_BUFFER_H_
6#define _UAPI_IIO_BUFFER_H_
7
8#define IIO_BUFFER_GET_FD_IOCTL _IOWR('i', 0x91, int)
9
10#endif /* _UAPI_IIO_BUFFER_H_ */
include/uapi/linux/io_uring.h+40−0
@@ -159,6 +159,21 @@ enum { · 158 unmodified lines
159 */159 */
160#define SPLICE_F_FD_IN_FIXED (1U << 31) /* the last bit of __u32 */160#define SPLICE_F_FD_IN_FIXED (1U << 31) /* the last bit of __u32 */
161 161
162/*
163 * POLL_ADD flags. Note that since sqe->poll_events is the flag space, the
164 * command flags for POLL_ADD are stored in sqe->len.
165 *
166 * IORING_POLL_ADD_MULTI Multishot poll. Sets IORING_CQE_F_MORE if
167 * the poll handler will continue to report
168 * CQEs on behalf of the same SQE.
169 *
170 * IORING_POLL_UPDATE Update existing poll request, matching
171 * sqe->addr as the old user_data field.
172 */
173#define IORING_POLL_ADD_MULTI (1U << 0)
174#define IORING_POLL_UPDATE_EVENTS (1U << 1)
175#define IORING_POLL_UPDATE_USER_DATA (1U << 2)
176
162/*177/*
163 * IO completion data structure (Completion Queue Entry)178 * IO completion data structure (Completion Queue Entry)
164 */179 */
@@ -172,8 +187,10 @@ struct io_uring_cqe { · 7 unmodified lines
172 * cqe->flags187 * cqe->flags
173 *188 *
174 * IORING_CQE_F_BUFFER If set, the upper 16 bits are the buffer ID189 * IORING_CQE_F_BUFFER If set, the upper 16 bits are the buffer ID
190 * IORING_CQE_F_MORE If set, parent SQE will generate more CQE entries
175 */191 */
176#define IORING_CQE_F_BUFFER (1U << 0)192#define IORING_CQE_F_BUFFER (1U << 0)
193#define IORING_CQE_F_MORE (1U << 1)
177 194
178enum {195enum {
179 IORING_CQE_BUFFER_SHIFT = 16,196 IORING_CQE_BUFFER_SHIFT = 16,
@@ -281,6 +298,8 @@ enum { · 101 unmodified lines
281 IORING_UNREGISTER_PERSONALITY = 10,298 IORING_UNREGISTER_PERSONALITY = 10,
282 IORING_REGISTER_RESTRICTIONS = 11,299 IORING_REGISTER_RESTRICTIONS = 11,
283 IORING_REGISTER_ENABLE_RINGS = 12,300 IORING_REGISTER_ENABLE_RINGS = 12,
301 IORING_REGISTER_RSRC = 13,
302 IORING_REGISTER_RSRC_UPDATE = 14,
284 303
285 /* this goes last */304 /* this goes last */
286 IORING_REGISTER_LAST305 IORING_REGISTER_LAST
@@ -293,12 +312,33 @@ struct io_uring_files_update { · 6 unmodified lines
293 __aligned_u64 /* __s32 * */ fds;312 __aligned_u64 /* __s32 * */ fds;
294};313};
295 314
315enum {
316 IORING_RSRC_FILE = 0,
317 IORING_RSRC_BUFFER = 1,
318};
319
320struct io_uring_rsrc_register {
321 __u32 type;
322 __u32 nr;
323 __aligned_u64 data;
324 __aligned_u64 tags;
325};
326
296struct io_uring_rsrc_update {327struct io_uring_rsrc_update {
297 __u32 offset;328 __u32 offset;
298 __u32 resv;329 __u32 resv;
299 __aligned_u64 data;330 __aligned_u64 data;
300};331};
301 332
333struct io_uring_rsrc_update2 {
334 __u32 offset;
335 __u32 resv;
336 __aligned_u64 data;
337 __aligned_u64 tags;
338 __u32 type;
339 __u32 nr;
340};
341
302/* Skip updating fd indexes set to this value in the fd table */342/* Skip updating fd indexes set to this value in the fd table */
303#define IORING_REGISTER_FILES_SKIP (-2)343#define IORING_REGISTER_FILES_SKIP (-2)
304 344
include/uapi/linux/iommu.h+2−1
@@ -288,7 +288,8 @@ struct iommu_gpasid_bind_data_vtd { · 287 unmodified lines
288#define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */288#define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */
289#define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */289#define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */
290#define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */290#define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */
291#define IOMMU_SVA_VTD_GPASID_LAST (1 << 6)291#define IOMMU_SVA_VTD_GPASID_WPE (1 << 6) /* Write protect enable */
292#define IOMMU_SVA_VTD_GPASID_LAST (1 << 7)
292 __u64 flags;293 __u64 flags;
293 __u32 pat;294 __u32 pat;
294 __u32 emt;295 __u32 emt;
include/uapi/linux/kexec.h+1−0
@@ -42,6 +42,7 @@ · 41 unmodified lines
42#define KEXEC_ARCH_MIPS_LE (10 << 16)42#define KEXEC_ARCH_MIPS_LE (10 << 16)
43#define KEXEC_ARCH_MIPS ( 8 << 16)43#define KEXEC_ARCH_MIPS ( 8 << 16)
44#define KEXEC_ARCH_AARCH64 (183 << 16)44#define KEXEC_ARCH_AARCH64 (183 << 16)
45#define KEXEC_ARCH_RISCV (243 << 16)
45 46
46/* The artificial cap on the number of segments passed to kexec_load. */47/* The artificial cap on the number of segments passed to kexec_load. */
47#define KEXEC_SEGMENT_MAX 1648#define KEXEC_SEGMENT_MAX 16
include/uapi/linux/kvm.h+45−0
@@ -1078,6 +1078,10 @@ struct kvm_ppc_resize_hpt { · 1077 unmodified lines
1078#define KVM_CAP_DIRTY_LOG_RING 1921078#define KVM_CAP_DIRTY_LOG_RING 192
1079#define KVM_CAP_X86_BUS_LOCK_EXIT 1931079#define KVM_CAP_X86_BUS_LOCK_EXIT 193
1080#define KVM_CAP_PPC_DAWR1 1941080#define KVM_CAP_PPC_DAWR1 194
1081#define KVM_CAP_SET_GUEST_DEBUG2 195
1082#define KVM_CAP_SGX_ATTRIBUTE 196
1083#define KVM_CAP_VM_COPY_ENC_CONTEXT_FROM 197
1084#define KVM_CAP_PTP_KVM 198
1081 1085
1082#ifdef KVM_CAP_IRQ_ROUTING1086#ifdef KVM_CAP_IRQ_ROUTING
1083 1087
@@ -1671,6 +1675,8 @@ enum sev_cmd_id { · 587 unmodified lines
1671 KVM_SEV_CERT_EXPORT,1675 KVM_SEV_CERT_EXPORT,
1672 /* Attestation report */1676 /* Attestation report */
1673 KVM_SEV_GET_ATTESTATION_REPORT,1677 KVM_SEV_GET_ATTESTATION_REPORT,
1678 /* Guest Migration Extension */
1679 KVM_SEV_SEND_CANCEL,
1674 1680
1675 KVM_SEV_NR_MAX,1681 KVM_SEV_NR_MAX,
1676};1682};
@@ -1729,6 +1735,45 @@ struct kvm_sev_attestation_report { · 52 unmodified lines
1729 __u32 len;1735 __u32 len;
1730};1736};
1731 1737
1738struct kvm_sev_send_start {
1739 __u32 policy;
1740 __u64 pdh_cert_uaddr;
1741 __u32 pdh_cert_len;
1742 __u64 plat_certs_uaddr;
1743 __u32 plat_certs_len;
1744 __u64 amd_certs_uaddr;
1745 __u32 amd_certs_len;
1746 __u64 session_uaddr;
1747 __u32 session_len;
1748};
1749
1750struct kvm_sev_send_update_data {
1751 __u64 hdr_uaddr;
1752 __u32 hdr_len;
1753 __u64 guest_uaddr;
1754 __u32 guest_len;
1755 __u64 trans_uaddr;
1756 __u32 trans_len;
1757};
1758
1759struct kvm_sev_receive_start {
1760 __u32 handle;
1761 __u32 policy;
1762 __u64 pdh_uaddr;
1763 __u32 pdh_len;
1764 __u64 session_uaddr;
1765 __u32 session_len;
1766};
1767
1768struct kvm_sev_receive_update_data {
1769 __u64 hdr_uaddr;
1770 __u32 hdr_len;
1771 __u64 guest_uaddr;
1772 __u32 guest_len;
1773 __u64 trans_uaddr;
1774 __u32 trans_len;
1775};
1776
1732#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)1777#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
1733#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)1778#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
1734#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)1779#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)
include/uapi/linux/landlock.h+137−0
@@ -0,0 +1,137 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Landlock - User space API
4 *
5 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
6 * Copyright © 2018-2020 ANSSI
7 */
8
9#ifndef _UAPI_LINUX_LANDLOCK_H
10#define _UAPI_LINUX_LANDLOCK_H
11
12#include <linux/types.h>
13
14/**
15 * struct landlock_ruleset_attr - Ruleset definition
16 *
17 * Argument of sys_landlock_create_ruleset(). This structure can grow in
18 * future versions.
19 */
20struct landlock_ruleset_attr {
21 /**
22 * @handled_access_fs: Bitmask of actions (cf. `Filesystem flags`_)
23 * that is handled by this ruleset and should then be forbidden if no
24 * rule explicitly allow them. This is needed for backward
25 * compatibility reasons.
26 */
27 __u64 handled_access_fs;
28};
29
30/*
31 * sys_landlock_create_ruleset() flags:
32 *
33 * - %LANDLOCK_CREATE_RULESET_VERSION: Get the highest supported Landlock ABI
34 * version.
35 */
36#define LANDLOCK_CREATE_RULESET_VERSION (1U << 0)
37
38/**
39 * enum landlock_rule_type - Landlock rule type
40 *
41 * Argument of sys_landlock_add_rule().
42 */
43enum landlock_rule_type {
44 /**
45 * @LANDLOCK_RULE_PATH_BENEATH: Type of a &struct
46 * landlock_path_beneath_attr .
47 */
48 LANDLOCK_RULE_PATH_BENEATH = 1,
49};
50
51/**
52 * struct landlock_path_beneath_attr - Path hierarchy definition
53 *
54 * Argument of sys_landlock_add_rule().
55 */
56struct landlock_path_beneath_attr {
57 /**
58 * @allowed_access: Bitmask of allowed actions for this file hierarchy
59 * (cf. `Filesystem flags`_).
60 */
61 __u64 allowed_access;
62 /**
63 * @parent_fd: File descriptor, open with ``O_PATH``, which identifies
64 * the parent directory of a file hierarchy, or just a file.
65 */
66 __s32 parent_fd;
67 /*
68 * This struct is packed to avoid trailing reserved members.
69 * Cf. security/landlock/syscalls.c:build_check_abi()
70 */
71} __attribute__((packed));
72
73/**
74 * DOC: fs_access
75 *
76 * A set of actions on kernel objects may be defined by an attribute (e.g.
77 * &struct landlock_path_beneath_attr) including a bitmask of access.
78 *
79 * Filesystem flags
80 * ~~~~~~~~~~~~~~~~
81 *
82 * These flags enable to restrict a sandboxed process to a set of actions on
83 * files and directories. Files or directories opened before the sandboxing
84 * are not subject to these restrictions.
85 *
86 * A file can only receive these access rights:
87 *
88 * - %LANDLOCK_ACCESS_FS_EXECUTE: Execute a file.
89 * - %LANDLOCK_ACCESS_FS_WRITE_FILE: Open a file with write access.
90 * - %LANDLOCK_ACCESS_FS_READ_FILE: Open a file with read access.
91 *
92 * A directory can receive access rights related to files or directories. The
93 * following access right is applied to the directory itself, and the
94 * directories beneath it:
95 *
96 * - %LANDLOCK_ACCESS_FS_READ_DIR: Open a directory or list its content.
97 *
98 * However, the following access rights only apply to the content of a
99 * directory, not the directory itself:
100 *
101 * - %LANDLOCK_ACCESS_FS_REMOVE_DIR: Remove an empty directory or rename one.
102 * - %LANDLOCK_ACCESS_FS_REMOVE_FILE: Unlink (or rename) a file.
103 * - %LANDLOCK_ACCESS_FS_MAKE_CHAR: Create (or rename or link) a character
104 * device.
105 * - %LANDLOCK_ACCESS_FS_MAKE_DIR: Create (or rename) a directory.
106 * - %LANDLOCK_ACCESS_FS_MAKE_REG: Create (or rename or link) a regular file.
107 * - %LANDLOCK_ACCESS_FS_MAKE_SOCK: Create (or rename or link) a UNIX domain
108 * socket.
109 * - %LANDLOCK_ACCESS_FS_MAKE_FIFO: Create (or rename or link) a named pipe.
110 * - %LANDLOCK_ACCESS_FS_MAKE_BLOCK: Create (or rename or link) a block device.
111 * - %LANDLOCK_ACCESS_FS_MAKE_SYM: Create (or rename or link) a symbolic link.
112 *
113 * .. warning::
114 *
115 * It is currently not possible to restrict some file-related actions
116 * accessible through these syscall families: :manpage:`chdir(2)`,
117 * :manpage:`truncate(2)`, :manpage:`stat(2)`, :manpage:`flock(2)`,
118 * :manpage:`chmod(2)`, :manpage:`chown(2)`, :manpage:`setxattr(2)`,
119 * :manpage:`utime(2)`, :manpage:`ioctl(2)`, :manpage:`fcntl(2)`,
120 * :manpage:`access(2)`.
121 * Future Landlock evolutions will enable to restrict them.
122 */
123#define LANDLOCK_ACCESS_FS_EXECUTE (1ULL << 0)
124#define LANDLOCK_ACCESS_FS_WRITE_FILE (1ULL << 1)
125#define LANDLOCK_ACCESS_FS_READ_FILE (1ULL << 2)
126#define LANDLOCK_ACCESS_FS_READ_DIR (1ULL << 3)
127#define LANDLOCK_ACCESS_FS_REMOVE_DIR (1ULL << 4)
128#define LANDLOCK_ACCESS_FS_REMOVE_FILE (1ULL << 5)
129#define LANDLOCK_ACCESS_FS_MAKE_CHAR (1ULL << 6)
130#define LANDLOCK_ACCESS_FS_MAKE_DIR (1ULL << 7)
131#define LANDLOCK_ACCESS_FS_MAKE_REG (1ULL << 8)
132#define LANDLOCK_ACCESS_FS_MAKE_SOCK (1ULL << 9)
133#define LANDLOCK_ACCESS_FS_MAKE_FIFO (1ULL << 10)
134#define LANDLOCK_ACCESS_FS_MAKE_BLOCK (1ULL << 11)
135#define LANDLOCK_ACCESS_FS_MAKE_SYM (1ULL << 12)
136
137#endif /* _UAPI_LINUX_LANDLOCK_H */
include/uapi/linux/lightnvm.h+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
22 22
23#ifdef __KERNEL__23#ifdef __KERNEL__
24#include <linux/const.h>24#include <linux/const.h>
25#include <linux/ioctl.h>
26#else /* __KERNEL__ */25#else /* __KERNEL__ */
27#include <stdio.h>26#include <stdio.h>
28#include <sys/ioctl.h>27#include <sys/ioctl.h>
include/uapi/linux/major.h+0−2
@@ -34,8 +34,6 @@ · 33 unmodified lines
34#define GOLDSTAR_CDROM_MAJOR 1634#define GOLDSTAR_CDROM_MAJOR 16
35#define OPTICS_CDROM_MAJOR 1735#define OPTICS_CDROM_MAJOR 17
36#define SANYO_CDROM_MAJOR 1836#define SANYO_CDROM_MAJOR 18
37#define CYCLADES_MAJOR 19
38#define CYCLADESAUX_MAJOR 20
39#define MITSUMI_X_CDROM_MAJOR 2037#define MITSUMI_X_CDROM_MAJOR 20
40#define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */38#define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */
41#define SCSI_GENERIC_MAJOR 2139#define SCSI_GENERIC_MAJOR 21
include/uapi/linux/map_to_7segment.h+0−14
@@ -1,20 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2/*2/*
3 * Copyright (c) 2005 Henk Vergonet <Henk.Vergonet@gmail.com>3 * Copyright (c) 2005 Henk Vergonet <Henk.Vergonet@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */4 */
19 5
20#ifndef MAP_TO_7SEGMENT_H6#ifndef MAP_TO_7SEGMENT_H
include/uapi/linux/mdio.h+2−0
@@ -120,6 +120,8 @@ · 119 unmodified lines
120#define MDIO_PMA_SPEED_100 0x0020 /* 100M capable */120#define MDIO_PMA_SPEED_100 0x0020 /* 100M capable */
121#define MDIO_PMA_SPEED_10 0x0040 /* 10M capable */121#define MDIO_PMA_SPEED_10 0x0040 /* 10M capable */
122#define MDIO_PCS_SPEED_10P2B 0x0002 /* 10PASS-TS/2BASE-TL capable */122#define MDIO_PCS_SPEED_10P2B 0x0002 /* 10PASS-TS/2BASE-TL capable */
123#define MDIO_PCS_SPEED_2_5G 0x0040 /* 2.5G capable */
124#define MDIO_PCS_SPEED_5G 0x0080 /* 5G capable */
123 125
124/* Device present registers. */126/* Device present registers. */
125#define MDIO_DEVS_PRESENT(devad) (1 << (devad))127#define MDIO_DEVS_PRESENT(devad) (1 << (devad))
include/uapi/linux/mempolicy.h+7−0
@@ -64,5 +64,12 @@ enum { · 63 unmodified lines
64#define MPOL_F_MOF (1 << 3) /* this policy wants migrate on fault */64#define MPOL_F_MOF (1 << 3) /* this policy wants migrate on fault */
65#define MPOL_F_MORON (1 << 4) /* Migrate On protnone Reference On Node */65#define MPOL_F_MORON (1 << 4) /* Migrate On protnone Reference On Node */
66 66
67/*
68 * These bit locations are exposed in the vm.zone_reclaim_mode sysctl
69 * ABI. New bits are OK, but existing bits can never change.
70 */
71#define RECLAIM_ZONE (1<<0) /* Run shrink_inactive_list on the zone */
72#define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */
73#define RECLAIM_UNMAP (1<<2) /* Unmap pages during reclaim */
67 74
68#endif /* _UAPI_LINUX_MEMPOLICY_H */75#endif /* _UAPI_LINUX_MEMPOLICY_H */
include/uapi/linux/mptcp.h+11−0
@@ -174,10 +174,21 @@ enum mptcp_event_attr { · 173 unmodified lines
174 MPTCP_ATTR_FLAGS, /* u16 */174 MPTCP_ATTR_FLAGS, /* u16 */
175 MPTCP_ATTR_TIMEOUT, /* u32 */175 MPTCP_ATTR_TIMEOUT, /* u32 */
176 MPTCP_ATTR_IF_IDX, /* s32 */176 MPTCP_ATTR_IF_IDX, /* s32 */
177 MPTCP_ATTR_RESET_REASON,/* u32 */
178 MPTCP_ATTR_RESET_FLAGS, /* u32 */
177 179
178 __MPTCP_ATTR_AFTER_LAST180 __MPTCP_ATTR_AFTER_LAST
179};181};
180 182
181#define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1)183#define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1)
182 184
185/* MPTCP Reset reason codes, rfc8684 */
186#define MPTCP_RST_EUNSPEC 0
187#define MPTCP_RST_EMPTCP 1
188#define MPTCP_RST_ERESOURCE 2
189#define MPTCP_RST_EPROHIBIT 3
190#define MPTCP_RST_EWQ2BIG 4
191#define MPTCP_RST_EBADPERF 5
192#define MPTCP_RST_EMIDDLEBOX 6
193
183#endif /* _UAPI_MPTCP_H */194#endif /* _UAPI_MPTCP_H */
include/uapi/linux/netfilter/nf_tables.h+6−0
@@ -398,9 +398,11 @@ enum nft_set_attributes { · 397 unmodified lines
398 * enum nft_set_elem_flags - nf_tables set element flags398 * enum nft_set_elem_flags - nf_tables set element flags
399 *399 *
400 * @NFT_SET_ELEM_INTERVAL_END: element ends the previous interval400 * @NFT_SET_ELEM_INTERVAL_END: element ends the previous interval
401 * @NFT_SET_ELEM_CATCHALL: special catch-all element
401 */402 */
402enum nft_set_elem_flags {403enum nft_set_elem_flags {
403 NFT_SET_ELEM_INTERVAL_END = 0x1,404 NFT_SET_ELEM_INTERVAL_END = 0x1,
405 NFT_SET_ELEM_CATCHALL = 0x2,
404};406};
405 407
406/**408/**
@@ -1014,11 +1016,13 @@ enum nft_rt_attributes { · 607 unmodified lines
1014 *1016 *
1015 * @NFTA_SOCKET_KEY: socket key to match1017 * @NFTA_SOCKET_KEY: socket key to match
1016 * @NFTA_SOCKET_DREG: destination register1018 * @NFTA_SOCKET_DREG: destination register
1019 * @NFTA_SOCKET_LEVEL: cgroups2 ancestor level (only for cgroupsv2)
1017 */1020 */
1018enum nft_socket_attributes {1021enum nft_socket_attributes {
1019 NFTA_SOCKET_UNSPEC,1022 NFTA_SOCKET_UNSPEC,
1020 NFTA_SOCKET_KEY,1023 NFTA_SOCKET_KEY,
1021 NFTA_SOCKET_DREG,1024 NFTA_SOCKET_DREG,
1025 NFTA_SOCKET_LEVEL,
1022 __NFTA_SOCKET_MAX1026 __NFTA_SOCKET_MAX
1023};1027};
1024#define NFTA_SOCKET_MAX (__NFTA_SOCKET_MAX - 1)1028#define NFTA_SOCKET_MAX (__NFTA_SOCKET_MAX - 1)
@@ -1029,11 +1033,13 @@ enum nft_socket_attributes { · 4 unmodified lines
1029 * @NFT_SOCKET_TRANSPARENT: Value of the IP(V6)_TRANSPARENT socket option1033 * @NFT_SOCKET_TRANSPARENT: Value of the IP(V6)_TRANSPARENT socket option
1030 * @NFT_SOCKET_MARK: Value of the socket mark1034 * @NFT_SOCKET_MARK: Value of the socket mark
1031 * @NFT_SOCKET_WILDCARD: Whether the socket is zero-bound (e.g. 0.0.0.0 or ::0)1035 * @NFT_SOCKET_WILDCARD: Whether the socket is zero-bound (e.g. 0.0.0.0 or ::0)
1036 * @NFT_SOCKET_CGROUPV2: Match on cgroups version 2
1032 */1037 */
1033enum nft_socket_keys {1038enum nft_socket_keys {
1034 NFT_SOCKET_TRANSPARENT,1039 NFT_SOCKET_TRANSPARENT,
1035 NFT_SOCKET_MARK,1040 NFT_SOCKET_MARK,
1036 NFT_SOCKET_WILDCARD,1041 NFT_SOCKET_WILDCARD,
1042 NFT_SOCKET_CGROUPV2,
1037 __NFT_SOCKET_MAX1043 __NFT_SOCKET_MAX
1038};1044};
1039#define NFT_SOCKET_MAX (__NFT_SOCKET_MAX - 1)1045#define NFT_SOCKET_MAX (__NFT_SOCKET_MAX - 1)
include/uapi/linux/netfilter/xt_SECMARK.h+6−0
@@ -20,4 +20,10 @@ struct xt_secmark_target_info { · 19 unmodified lines
20 char secctx[SECMARK_SECCTX_MAX];20 char secctx[SECMARK_SECCTX_MAX];
21};21};
22 22
23struct xt_secmark_target_info_v1 {
24 __u8 mode;
25 char secctx[SECMARK_SECCTX_MAX];
26 __u32 secid;
27};
28
23#endif /*_XT_SECMARK_H_target */29#endif /*_XT_SECMARK_H_target */
include/uapi/linux/nexthop.h+46−1
@@ -21,7 +21,10 @@ struct nexthop_grp { · 20 unmodified lines
21};21};
22 22
23enum {23enum {
24 NEXTHOP_GRP_TYPE_MPATH, /* default type if not specified */24 NEXTHOP_GRP_TYPE_MPATH, /* hash-threshold nexthop group
25 * default type if not specified
26 */
27 NEXTHOP_GRP_TYPE_RES, /* resilient nexthop group */
25 __NEXTHOP_GRP_TYPE_MAX,28 __NEXTHOP_GRP_TYPE_MAX,
26};29};
27 30
@@ -52,8 +55,50 @@ enum { · 24 unmodified lines
52 NHA_FDB, /* flag; nexthop belongs to a bridge fdb */55 NHA_FDB, /* flag; nexthop belongs to a bridge fdb */
53 /* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */56 /* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */
54 57
58 /* nested; resilient nexthop group attributes */
59 NHA_RES_GROUP,
60 /* nested; nexthop bucket attributes */
61 NHA_RES_BUCKET,
62
55 __NHA_MAX,63 __NHA_MAX,
56};64};
57 65
58#define NHA_MAX (__NHA_MAX - 1)66#define NHA_MAX (__NHA_MAX - 1)
67
68enum {
69 NHA_RES_GROUP_UNSPEC,
70 /* Pad attribute for 64-bit alignment. */
71 NHA_RES_GROUP_PAD = NHA_RES_GROUP_UNSPEC,
72
73 /* u16; number of nexthop buckets in a resilient nexthop group */
74 NHA_RES_GROUP_BUCKETS,
75 /* clock_t as u32; nexthop bucket idle timer (per-group) */
76 NHA_RES_GROUP_IDLE_TIMER,
77 /* clock_t as u32; nexthop unbalanced timer */
78 NHA_RES_GROUP_UNBALANCED_TIMER,
79 /* clock_t as u64; nexthop unbalanced time */
80 NHA_RES_GROUP_UNBALANCED_TIME,
81
82 __NHA_RES_GROUP_MAX,
83};
84
85#define NHA_RES_GROUP_MAX (__NHA_RES_GROUP_MAX - 1)
86
87enum {
88 NHA_RES_BUCKET_UNSPEC,
89 /* Pad attribute for 64-bit alignment. */
90 NHA_RES_BUCKET_PAD = NHA_RES_BUCKET_UNSPEC,
91
92 /* u16; nexthop bucket index */
93 NHA_RES_BUCKET_INDEX,
94 /* clock_t as u64; nexthop bucket idle time */
95 NHA_RES_BUCKET_IDLE_TIME,
96 /* u32; nexthop id assigned to the nexthop bucket */
97 NHA_RES_BUCKET_NH_ID,
98
99 __NHA_RES_BUCKET_MAX,
100};
101
102#define NHA_RES_BUCKET_MAX (__NHA_RES_BUCKET_MAX - 1)
103
59#endif104#endif
include/uapi/linux/nfs4.h+0−6
@@ -178,9 +178,3 @@ · 177 unmodified lines
178#define NFS4_MAX_BACK_CHANNEL_OPS 2178#define NFS4_MAX_BACK_CHANNEL_OPS 2
179 179
180#endif /* _UAPI_LINUX_NFS4_H */180#endif /* _UAPI_LINUX_NFS4_H */
181
182/*
183 * Local variables:
184 * c-basic-offset: 8
185 * End:
186 */
include/uapi/linux/nfsd/nfsfh.h+19−8
@@ -64,13 +64,24 @@ struct nfs_fhbase_old { · 63 unmodified lines
64 * in include/linux/exportfs.h for currently registered values.64 * in include/linux/exportfs.h for currently registered values.
65 */65 */
66struct nfs_fhbase_new {66struct nfs_fhbase_new {
67 __u8 fb_version; /* == 1, even => nfs_fhbase_old */67 union {
68 __u8 fb_auth_type;68 struct {
69 __u8 fb_fsid_type;69 __u8 fb_version_aux; /* == 1, even => nfs_fhbase_old */
70 __u8 fb_fileid_type;70 __u8 fb_auth_type_aux;
71 __u32 fb_auth[1];71 __u8 fb_fsid_type_aux;
72/* __u32 fb_fsid[0]; floating */72 __u8 fb_fileid_type_aux;
73/* __u32 fb_fileid[0]; floating */73 __u32 fb_auth[1];
74 /* __u32 fb_fsid[0]; floating */
75 /* __u32 fb_fileid[0]; floating */
76 };
77 struct {
78 __u8 fb_version; /* == 1, even => nfs_fhbase_old */
79 __u8 fb_auth_type;
80 __u8 fb_fsid_type;
81 __u8 fb_fileid_type;
82 __u32 fb_auth_flex[]; /* flexible-array member */
83 };
84 };
74};85};
75 86
76struct knfsd_fh {87struct knfsd_fh {
@@ -97,7 +108,7 @@ struct knfsd_fh { · 20 unmodified lines
97#define fh_fsid_type fh_base.fh_new.fb_fsid_type108#define fh_fsid_type fh_base.fh_new.fb_fsid_type
98#define fh_auth_type fh_base.fh_new.fb_auth_type109#define fh_auth_type fh_base.fh_new.fb_auth_type
99#define fh_fileid_type fh_base.fh_new.fb_fileid_type110#define fh_fileid_type fh_base.fh_new.fb_fileid_type
100#define fh_fsid fh_base.fh_new.fb_auth111#define fh_fsid fh_base.fh_new.fb_auth_flex
101 112
102/* Do not use, provided for userspace compatiblity. */113/* Do not use, provided for userspace compatiblity. */
103#define fh_auth fh_base.fh_new.fb_auth114#define fh_auth fh_base.fh_new.fb_auth
include/uapi/linux/nl80211.h+22−0
@@ -655,6 +655,9 @@ · 654 unmodified lines
655 * When a security association was established on an 802.1X network using655 * When a security association was established on an 802.1X network using
656 * fast transition, this event should be followed by an656 * fast transition, this event should be followed by an
657 * %NL80211_CMD_PORT_AUTHORIZED event.657 * %NL80211_CMD_PORT_AUTHORIZED event.
658 * Following a %NL80211_CMD_ROAM event userspace can issue
659 * %NL80211_CMD_GET_SCAN in order to obtain the scan information for the
660 * new BSS the card/driver roamed to.
658 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify661 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
659 * userspace that a connection was dropped by the AP or due to other662 * userspace that a connection was dropped by the AP or due to other
660 * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and663 * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
@@ -5937,6 +5940,16 @@ enum nl80211_feature_flags { · 5276 unmodified lines
5937 * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate5940 * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
5938 * configuration (AP/mesh) with HE rates.5941 * configuration (AP/mesh) with HE rates.
5939 *5942 *
5943 * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement
5944 * exchange protocol.
5945 *
5946 * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement
5947 * exchange protocol.
5948 *
5949 * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management
5950 * frame protection for all management frames exchanged during the
5951 * negotiation and range measurement procedure.
5952 *
5940 * @NUM_NL80211_EXT_FEATURES: number of extended features.5953 * @NUM_NL80211_EXT_FEATURES: number of extended features.
5941 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.5954 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
5942 */5955 */
@@ -5998,6 +6011,9 @@ enum nl80211_ext_feature_index { · 55 unmodified lines
5998 NL80211_EXT_FEATURE_FILS_DISCOVERY,6011 NL80211_EXT_FEATURE_FILS_DISCOVERY,
5999 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,6012 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
6000 NL80211_EXT_FEATURE_BEACON_RATE_HE,6013 NL80211_EXT_FEATURE_BEACON_RATE_HE,
6014 NL80211_EXT_FEATURE_SECURE_LTF,
6015 NL80211_EXT_FEATURE_SECURE_RTT,
6016 NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
6001 6017
6002 /* add new features before the definition below */6018 /* add new features before the definition below */
6003 NUM_NL80211_EXT_FEATURES,6019 NUM_NL80211_EXT_FEATURES,
@@ -6295,11 +6311,13 @@ struct nl80211_vendor_cmd_info { · 291 unmodified lines
6295 * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.6311 * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
6296 * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.6312 * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
6297 * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.6313 * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
6314 * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable.
6298 */6315 */
6299enum nl80211_tdls_peer_capability {6316enum nl80211_tdls_peer_capability {
6300 NL80211_TDLS_PEER_HT = 1<<0,6317 NL80211_TDLS_PEER_HT = 1<<0,
6301 NL80211_TDLS_PEER_VHT = 1<<1,6318 NL80211_TDLS_PEER_VHT = 1<<1,
6302 NL80211_TDLS_PEER_WMM = 1<<2,6319 NL80211_TDLS_PEER_WMM = 1<<2,
6320 NL80211_TDLS_PEER_HE = 1<<3,
6303};6321};
6304 6322
6305/**6323/**
@@ -6891,6 +6909,9 @@ enum nl80211_peer_measurement_ftm_capa { · 585 unmodified lines
6891 * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor6909 * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
6892 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based6910 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
6893 * ranging will be used.6911 * ranging will be used.
6912 * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only
6913 * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or
6914 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
6894 *6915 *
6895 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal6916 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
6896 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number6917 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
@@ -6909,6 +6930,7 @@ enum nl80211_peer_measurement_ftm_req { · 12 unmodified lines
6909 NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,6930 NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
6910 NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,6931 NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
6911 NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,6932 NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
6933 NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
6912 6934
6913 /* keep last */6935 /* keep last */
6914 NUM_NL80211_PMSR_FTM_REQ_ATTR,6936 NUM_NL80211_PMSR_FTM_REQ_ATTR,
include/uapi/linux/perf_event.h+36−5
@@ -37,6 +37,21 @@ enum perf_type_id { · 36 unmodified lines
37 PERF_TYPE_MAX, /* non-ABI */37 PERF_TYPE_MAX, /* non-ABI */
38};38};
39 39
40/*
41 * attr.config layout for type PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE
42 * PERF_TYPE_HARDWARE: 0xEEEEEEEE000000AA
43 * AA: hardware event ID
44 * EEEEEEEE: PMU type ID
45 * PERF_TYPE_HW_CACHE: 0xEEEEEEEE00DDCCBB
46 * BB: hardware cache ID
47 * CC: hardware cache op ID
48 * DD: hardware cache op result ID
49 * EEEEEEEE: PMU type ID
50 * If the PMU type ID is 0, the PERF_TYPE_RAW will be applied.
51 */
52#define PERF_PMU_TYPE_SHIFT 32
53#define PERF_HW_EVENT_MASK 0xffffffff
54
40/*55/*
41 * Generalized performance event event_id types, used by the56 * Generalized performance event event_id types, used by the
42 * attr.event_id parameter of the sys_perf_event_open()57 * attr.event_id parameter of the sys_perf_event_open()
@@ -112,6 +127,7 @@ enum perf_sw_ids { · 69 unmodified lines
112 PERF_COUNT_SW_EMULATION_FAULTS = 8,127 PERF_COUNT_SW_EMULATION_FAULTS = 8,
113 PERF_COUNT_SW_DUMMY = 9,128 PERF_COUNT_SW_DUMMY = 9,
114 PERF_COUNT_SW_BPF_OUTPUT = 10,129 PERF_COUNT_SW_BPF_OUTPUT = 10,
130 PERF_COUNT_SW_CGROUP_SWITCHES = 11,
115 131
116 PERF_COUNT_SW_MAX, /* non-ABI */132 PERF_COUNT_SW_MAX, /* non-ABI */
117};133};
@@ -311,6 +327,7 @@ enum perf_event_read_format { · 193 unmodified lines
311#define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */327#define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */
312#define PERF_ATTR_SIZE_VER5 112 /* add: aux_watermark */328#define PERF_ATTR_SIZE_VER5 112 /* add: aux_watermark */
313#define PERF_ATTR_SIZE_VER6 120 /* add: aux_sample_size */329#define PERF_ATTR_SIZE_VER6 120 /* add: aux_sample_size */
330#define PERF_ATTR_SIZE_VER7 128 /* add: sig_data */
314 331
315/*332/*
316 * Hardware event_id to monitor via a performance monitoring event:333 * Hardware event_id to monitor via a performance monitoring event:
@@ -389,7 +406,10 @@ struct perf_event_attr { · 72 unmodified lines
389 cgroup : 1, /* include cgroup events */406 cgroup : 1, /* include cgroup events */
390 text_poke : 1, /* include text poke events */407 text_poke : 1, /* include text poke events */
391 build_id : 1, /* use build id in mmap2 events */408 build_id : 1, /* use build id in mmap2 events */
392 __reserved_1 : 29;409 inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */
410 remove_on_exec : 1, /* event is removed from task on exec */
411 sigtrap : 1, /* send synchronous SIGTRAP on event */
412 __reserved_1 : 26;
393 413
394 union {414 union {
395 __u32 wakeup_events; /* wakeup every n events */415 __u32 wakeup_events; /* wakeup every n events */
@@ -441,6 +461,12 @@ struct perf_event_attr { · 45 unmodified lines
441 __u16 __reserved_2;461 __u16 __reserved_2;
442 __u32 aux_sample_size;462 __u32 aux_sample_size;
443 __u32 __reserved_3;463 __u32 __reserved_3;
464
465 /*
466 * User provided data if sigtrap=1, passed back to user via
467 * siginfo_t::si_perf, e.g. to permit user to identify the event.
468 */
469 __u64 sig_data;
444};470};
445 471
446/*472/*
@@ -1156,10 +1182,15 @@ enum perf_callchain_context { · 709 unmodified lines
1156/**1182/**
1157 * PERF_RECORD_AUX::flags bits1183 * PERF_RECORD_AUX::flags bits
1158 */1184 */
1159#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */1185#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */
1160#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */1186#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */
1161#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */1187#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */
1162#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */1188#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */
1189#define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 /* PMU specific trace format type */
1190
1191/* CoreSight PMU AUX buffer formats */
1192#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */
1193#define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 /* Raw format of the source */
1163 1194
1164#define PERF_FLAG_FD_NO_GROUP (1UL << 0)1195#define PERF_FLAG_FD_NO_GROUP (1UL << 0)
1165#define PERF_FLAG_FD_OUTPUT (1UL << 1)1196#define PERF_FLAG_FD_OUTPUT (1UL << 1)
include/uapi/linux/pkt_cls.h+2−0
@@ -190,6 +190,8 @@ enum { · 189 unmodified lines
190 TCA_POLICE_PAD,190 TCA_POLICE_PAD,
191 TCA_POLICE_RATE64,191 TCA_POLICE_RATE64,
192 TCA_POLICE_PEAKRATE64,192 TCA_POLICE_PEAKRATE64,
193 TCA_POLICE_PKTRATE64,
194 TCA_POLICE_PKTBURST64,
193 __TCA_POLICE_MAX195 __TCA_POLICE_MAX
194#define TCA_POLICE_RESULT TCA_POLICE_RESULT196#define TCA_POLICE_RESULT TCA_POLICE_RESULT
195};197};
include/uapi/linux/prctl.h+4−0
@@ -255,4 +255,8 @@ struct prctl_mm_map { · 254 unmodified lines
255# define SYSCALL_DISPATCH_FILTER_ALLOW 0255# define SYSCALL_DISPATCH_FILTER_ALLOW 0
256# define SYSCALL_DISPATCH_FILTER_BLOCK 1256# define SYSCALL_DISPATCH_FILTER_BLOCK 1
257 257
258/* Set/get enabled arm64 pointer authentication keys */
259#define PR_PAC_SET_ENABLED_KEYS 60
260#define PR_PAC_GET_ENABLED_KEYS 61
261
258#endif /* _LINUX_PRCTL_H */262#endif /* _LINUX_PRCTL_H */
include/uapi/linux/psample.h+7−0
@@ -13,6 +13,13 @@ enum { · 12 unmodified lines
13 PSAMPLE_ATTR_GROUP_REFCOUNT,13 PSAMPLE_ATTR_GROUP_REFCOUNT,
14 PSAMPLE_ATTR_TUNNEL,14 PSAMPLE_ATTR_TUNNEL,
15 15
16 PSAMPLE_ATTR_PAD,
17 PSAMPLE_ATTR_OUT_TC, /* u16 */
18 PSAMPLE_ATTR_OUT_TC_OCC, /* u64, bytes */
19 PSAMPLE_ATTR_LATENCY, /* u64, nanoseconds */
20 PSAMPLE_ATTR_TIMESTAMP, /* u64, nanoseconds */
21 PSAMPLE_ATTR_PROTO, /* u16 */
22
16 __PSAMPLE_ATTR_MAX23 __PSAMPLE_ATTR_MAX
17};24};
18 25
include/uapi/linux/ptrace.h+10−0
@@ -102,6 +102,16 @@ struct ptrace_syscall_info { · 101 unmodified lines
102 };102 };
103};103};
104 104
105#define PTRACE_GET_RSEQ_CONFIGURATION 0x420f
106
107struct ptrace_rseq_configuration {
108 __u64 rseq_abi_pointer;
109 __u32 rseq_abi_size;
110 __u32 signature;
111 __u32 flags;
112 __u32 pad;
113};
114
105/*115/*
106 * These values are stored in task->ptrace_message116 * These values are stored in task->ptrace_message
107 * by tracehook_report_syscall_* to describe the current syscall-stop.117 * by tracehook_report_syscall_* to describe the current syscall-stop.
include/uapi/linux/rkisp1-config.h+8−8
@@ -15,7 +15,7 @@ · 14 unmodified lines
15#define RKISP1_CIF_ISP_MODULE_BLS (1U << 1)15#define RKISP1_CIF_ISP_MODULE_BLS (1U << 1)
16/* Sensor De-gamma */16/* Sensor De-gamma */
17#define RKISP1_CIF_ISP_MODULE_SDG (1U << 2)17#define RKISP1_CIF_ISP_MODULE_SDG (1U << 2)
18/* Histogram */18/* Histogram statistics configuration */
19#define RKISP1_CIF_ISP_MODULE_HST (1U << 3)19#define RKISP1_CIF_ISP_MODULE_HST (1U << 3)
20/* Lens Shade Control */20/* Lens Shade Control */
21#define RKISP1_CIF_ISP_MODULE_LSC (1U << 4)21#define RKISP1_CIF_ISP_MODULE_LSC (1U << 4)
@@ -31,13 +31,13 @@ · 9 unmodified lines
31#define RKISP1_CIF_ISP_MODULE_GOC (1U << 9)31#define RKISP1_CIF_ISP_MODULE_GOC (1U << 9)
32/* Color Processing */32/* Color Processing */
33#define RKISP1_CIF_ISP_MODULE_CPROC (1U << 10)33#define RKISP1_CIF_ISP_MODULE_CPROC (1U << 10)
34/* Auto Focus Control */34/* Auto Focus Control statistics configuration */
35#define RKISP1_CIF_ISP_MODULE_AFC (1U << 11)35#define RKISP1_CIF_ISP_MODULE_AFC (1U << 11)
36/* Auto White Balancing */36/* Auto White Balancing statistics configuration */
37#define RKISP1_CIF_ISP_MODULE_AWB (1U << 12)37#define RKISP1_CIF_ISP_MODULE_AWB (1U << 12)
38/* Image Effect */38/* Image Effect */
39#define RKISP1_CIF_ISP_MODULE_IE (1U << 13)39#define RKISP1_CIF_ISP_MODULE_IE (1U << 13)
40/* Auto Exposure Control */40/* Auto Exposure Control statistics configuration */
41#define RKISP1_CIF_ISP_MODULE_AEC (1U << 14)41#define RKISP1_CIF_ISP_MODULE_AEC (1U << 14)
42/* Wide Dynamic Range */42/* Wide Dynamic Range */
43#define RKISP1_CIF_ISP_MODULE_WDR (1U << 15)43#define RKISP1_CIF_ISP_MODULE_WDR (1U << 15)
@@ -411,7 +411,7 @@ struct rkisp1_cif_isp_cproc_config { · 367 unmodified lines
411};411};
412 412
413/**413/**
414 * struct rkisp1_cif_isp_awb_meas_config - Configuration used by auto white balance414 * struct rkisp1_cif_isp_awb_meas_config - Configuration for the AWB statistics
415 *415 *
416 * @awb_mode: the awb meas mode. From enum rkisp1_cif_isp_awb_mode_type.416 * @awb_mode: the awb meas mode. From enum rkisp1_cif_isp_awb_mode_type.
417 * @awb_wnd: white balance measurement window (in pixels)417 * @awb_wnd: white balance measurement window (in pixels)
@@ -550,7 +550,7 @@ struct rkisp1_cif_isp_goc_config { · 132 unmodified lines
550};550};
551 551
552/**552/**
553 * struct rkisp1_cif_isp_hst_config - Configuration used by Histogram553 * struct rkisp1_cif_isp_hst_config - Configuration for Histogram statistics
554 *554 *
555 * @mode: histogram mode (from enum rkisp1_cif_isp_histogram_mode)555 * @mode: histogram mode (from enum rkisp1_cif_isp_histogram_mode)
556 * @histogram_predivider: process every stepsize pixel, all other pixels are556 * @histogram_predivider: process every stepsize pixel, all other pixels are
@@ -575,7 +575,7 @@ struct rkisp1_cif_isp_hst_config { · 18 unmodified lines
575};575};
576 576
577/**577/**
578 * struct rkisp1_cif_isp_aec_config - Configuration used by Auto Exposure Control578 * struct rkisp1_cif_isp_aec_config - Configuration for Auto Exposure statistics
579 *579 *
580 * @mode: Exposure measure mode (from enum rkisp1_cif_isp_exp_meas_mode)580 * @mode: Exposure measure mode (from enum rkisp1_cif_isp_exp_meas_mode)
581 * @autostop: stop mode (from enum rkisp1_cif_isp_exp_ctrl_autostop)581 * @autostop: stop mode (from enum rkisp1_cif_isp_exp_ctrl_autostop)
@@ -588,7 +588,7 @@ struct rkisp1_cif_isp_aec_config { · 6 unmodified lines
588};588};
589 589
590/**590/**
591 * struct rkisp1_cif_isp_afc_config - Configuration used by Auto Focus Control591 * struct rkisp1_cif_isp_afc_config - Configuration for the Auto Focus statistics
592 *592 *
593 * @num_afm_win: max RKISP1_CIF_ISP_AFM_MAX_WINDOWS593 * @num_afm_win: max RKISP1_CIF_ISP_AFM_MAX_WINDOWS
594 * @afm_win: coordinates of the meas window594 * @afm_win: coordinates of the meas window
include/uapi/linux/rpmsg.h+11−2
@@ -9,11 +9,13 @@ · 8 unmodified lines
9#include <linux/ioctl.h>9#include <linux/ioctl.h>
10#include <linux/types.h>10#include <linux/types.h>
11 11
12#define RPMSG_ADDR_ANY 0xFFFFFFFF
13
12/**14/**
13 * struct rpmsg_endpoint_info - endpoint info representation15 * struct rpmsg_endpoint_info - endpoint info representation
14 * @name: name of service16 * @name: name of service
15 * @src: local address17 * @src: local address. To set to RPMSG_ADDR_ANY if not used.
16 * @dst: destination address18 * @dst: destination address. To set to RPMSG_ADDR_ANY if not used.
17 */19 */
18struct rpmsg_endpoint_info {20struct rpmsg_endpoint_info {
19 char name[32];21 char name[32];
@@ -21,7 +23,14 @@ struct rpmsg_endpoint_info { · 1 unmodified line
21 __u32 dst;23 __u32 dst;
22};24};
23 25
26/**
27 * Instantiate a new rmpsg char device endpoint.
28 */
24#define RPMSG_CREATE_EPT_IOCTL _IOW(0xb5, 0x1, struct rpmsg_endpoint_info)29#define RPMSG_CREATE_EPT_IOCTL _IOW(0xb5, 0x1, struct rpmsg_endpoint_info)
30
31/**
32 * Destroy a rpmsg char device endpoint created by the RPMSG_CREATE_EPT_IOCTL.
33 */
25#define RPMSG_DESTROY_EPT_IOCTL _IO(0xb5, 0x2)34#define RPMSG_DESTROY_EPT_IOCTL _IO(0xb5, 0x2)
26 35
27#endif36#endif
include/uapi/linux/rtnetlink.h+8−0
@@ -178,6 +178,13 @@ enum { · 177 unmodified lines
178 RTM_GETVLAN,178 RTM_GETVLAN,
179#define RTM_GETVLAN RTM_GETVLAN179#define RTM_GETVLAN RTM_GETVLAN
180 180
181 RTM_NEWNEXTHOPBUCKET = 116,
182#define RTM_NEWNEXTHOPBUCKET RTM_NEWNEXTHOPBUCKET
183 RTM_DELNEXTHOPBUCKET,
184#define RTM_DELNEXTHOPBUCKET RTM_DELNEXTHOPBUCKET
185 RTM_GETNEXTHOPBUCKET,
186#define RTM_GETNEXTHOPBUCKET RTM_GETNEXTHOPBUCKET
187
181 __RTM_MAX,188 __RTM_MAX,
182#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)189#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
183};190};
@@ -283,6 +290,7 @@ enum { · 99 unmodified lines
283#define RTPROT_MROUTED 17 /* Multicast daemon */290#define RTPROT_MROUTED 17 /* Multicast daemon */
284#define RTPROT_KEEPALIVED 18 /* Keepalived daemon */291#define RTPROT_KEEPALIVED 18 /* Keepalived daemon */
285#define RTPROT_BABEL 42 /* Babel daemon */292#define RTPROT_BABEL 42 /* Babel daemon */
293#define RTPROT_OPENR 99 /* Open Routing (Open/R) Routes */
286#define RTPROT_BGP 186 /* BGP Routes */294#define RTPROT_BGP 186 /* BGP Routes */
287#define RTPROT_ISIS 187 /* ISIS Routes */295#define RTPROT_ISIS 187 /* ISIS Routes */
288#define RTPROT_OSPF 188 /* OSPF Routes */296#define RTPROT_OSPF 188 /* OSPF Routes */
include/uapi/linux/seg6_local.h+30−0
@@ -27,6 +27,7 @@ enum { · 26 unmodified lines
27 SEG6_LOCAL_OIF,27 SEG6_LOCAL_OIF,
28 SEG6_LOCAL_BPF,28 SEG6_LOCAL_BPF,
29 SEG6_LOCAL_VRFTABLE,29 SEG6_LOCAL_VRFTABLE,
30 SEG6_LOCAL_COUNTERS,
30 __SEG6_LOCAL_MAX,31 __SEG6_LOCAL_MAX,
31};32};
32#define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)33#define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
@@ -78,4 +79,33 @@ enum { · 45 unmodified lines
78 79
79#define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)80#define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
80 81
82/* SRv6 Behavior counters are encoded as netlink attributes guaranteeing the
83 * correct alignment.
84 * Each counter is identified by a different attribute type (i.e.
85 * SEG6_LOCAL_CNT_PACKETS).
86 *
87 * - SEG6_LOCAL_CNT_PACKETS: identifies a counter that counts the number of
88 * packets that have been CORRECTLY processed by an SRv6 Behavior instance
89 * (i.e., packets that generate errors or are dropped are NOT counted).
90 *
91 * - SEG6_LOCAL_CNT_BYTES: identifies a counter that counts the total amount
92 * of traffic in bytes of all packets that have been CORRECTLY processed by
93 * an SRv6 Behavior instance (i.e., packets that generate errors or are
94 * dropped are NOT counted).
95 *
96 * - SEG6_LOCAL_CNT_ERRORS: identifies a counter that counts the number of
97 * packets that have NOT been properly processed by an SRv6 Behavior instance
98 * (i.e., packets that generate errors or are dropped).
99 */
100enum {
101 SEG6_LOCAL_CNT_UNSPEC,
102 SEG6_LOCAL_CNT_PAD, /* pad for 64 bits values */
103 SEG6_LOCAL_CNT_PACKETS,
104 SEG6_LOCAL_CNT_BYTES,
105 SEG6_LOCAL_CNT_ERRORS,
106 __SEG6_LOCAL_CNT_MAX,
107};
108
109#define SEG6_LOCAL_CNT_MAX (__SEG6_LOCAL_CNT_MAX - 1)
110
81#endif111#endif
include/uapi/linux/serial.h+2−2
@@ -52,11 +52,11 @@ struct serial_struct { · 51 unmodified lines
52#define PORT_16450 252#define PORT_16450 2
53#define PORT_16550 353#define PORT_16550 3
54#define PORT_16550A 454#define PORT_16550A 4
55#define PORT_CIRRUS 5 /* usurped by cyclades.c */55#define PORT_CIRRUS 5
56#define PORT_16650 656#define PORT_16650 6
57#define PORT_16650V2 757#define PORT_16650V2 7
58#define PORT_16750 858#define PORT_16750 8
59#define PORT_STARTECH 9 /* usurped by cyclades.c */59#define PORT_STARTECH 9
60#define PORT_16C950 10 /* Oxford Semiconductor */60#define PORT_16C950 10 /* Oxford Semiconductor */
61#define PORT_16654 1161#define PORT_16654 11
62#define PORT_16850 1262#define PORT_16850 12
include/uapi/linux/signalfd.h+3−1
@@ -39,6 +39,8 @@ struct signalfd_siginfo { · 38 unmodified lines
39 __s32 ssi_syscall;39 __s32 ssi_syscall;
40 __u64 ssi_call_addr;40 __u64 ssi_call_addr;
41 __u32 ssi_arch;41 __u32 ssi_arch;
42 __u32 __pad3;
43 __u64 ssi_perf;
42 44
43 /*45 /*
44 * Pad strcture to 128 bytes. Remember to update the46 * Pad strcture to 128 bytes. Remember to update the
@@ -49,7 +51,7 @@ struct signalfd_siginfo { · 4 unmodified lines
49 * comes out of a read(2) and we really don't want to have51 * comes out of a read(2) and we really don't want to have
50 * a compat on read(2).52 * a compat on read(2).
51 */53 */
52 __u8 __pad[28];54 __u8 __pad[16];
53};55};
54 56
55 57
include/uapi/linux/surface_aggregator/dtx.h+146−0
@@ -0,0 +1,146 @@
1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2/*
3 * Surface DTX (clipboard detachment system driver) user-space interface.
4 *
5 * Definitions, structs, and IOCTLs for the /dev/surface/dtx misc device. This
6 * device allows user-space to control the clipboard detachment process on
7 * Surface Book series devices.
8 *
9 * Copyright (C) 2020-2021 Maximilian Luz <luzmaximilian@gmail.com>
10 */
11
12#ifndef _UAPI_LINUX_SURFACE_AGGREGATOR_DTX_H
13#define _UAPI_LINUX_SURFACE_AGGREGATOR_DTX_H
14
15#include <linux/ioctl.h>
16#include <linux/types.h>
17
18/* Status/error categories */
19#define SDTX_CATEGORY_STATUS 0x0000
20#define SDTX_CATEGORY_RUNTIME_ERROR 0x1000
21#define SDTX_CATEGORY_HARDWARE_ERROR 0x2000
22#define SDTX_CATEGORY_UNKNOWN 0xf000
23
24#define SDTX_CATEGORY_MASK 0xf000
25#define SDTX_CATEGORY(value) ((value) & SDTX_CATEGORY_MASK)
26
27#define SDTX_STATUS(code) ((code) | SDTX_CATEGORY_STATUS)
28#define SDTX_ERR_RT(code) ((code) | SDTX_CATEGORY_RUNTIME_ERROR)
29#define SDTX_ERR_HW(code) ((code) | SDTX_CATEGORY_HARDWARE_ERROR)
30#define SDTX_UNKNOWN(code) ((code) | SDTX_CATEGORY_UNKNOWN)
31
32#define SDTX_SUCCESS(value) (SDTX_CATEGORY(value) == SDTX_CATEGORY_STATUS)
33
34/* Latch status values */
35#define SDTX_LATCH_CLOSED SDTX_STATUS(0x00)
36#define SDTX_LATCH_OPENED SDTX_STATUS(0x01)
37
38/* Base state values */
39#define SDTX_BASE_DETACHED SDTX_STATUS(0x00)
40#define SDTX_BASE_ATTACHED SDTX_STATUS(0x01)
41
42/* Runtime errors (non-critical) */
43#define SDTX_DETACH_NOT_FEASIBLE SDTX_ERR_RT(0x01)
44#define SDTX_DETACH_TIMEDOUT SDTX_ERR_RT(0x02)
45
46/* Hardware errors (critical) */
47#define SDTX_ERR_FAILED_TO_OPEN SDTX_ERR_HW(0x01)
48#define SDTX_ERR_FAILED_TO_REMAIN_OPEN SDTX_ERR_HW(0x02)
49#define SDTX_ERR_FAILED_TO_CLOSE SDTX_ERR_HW(0x03)
50
51/* Base types */
52#define SDTX_DEVICE_TYPE_HID 0x0100
53#define SDTX_DEVICE_TYPE_SSH 0x0200
54
55#define SDTX_DEVICE_TYPE_MASK 0x0f00
56#define SDTX_DEVICE_TYPE(value) ((value) & SDTX_DEVICE_TYPE_MASK)
57
58#define SDTX_BASE_TYPE_HID(id) ((id) | SDTX_DEVICE_TYPE_HID)
59#define SDTX_BASE_TYPE_SSH(id) ((id) | SDTX_DEVICE_TYPE_SSH)
60
61/**
62 * enum sdtx_device_mode - Mode describing how (and if) the clipboard is
63 * attached to the base of the device.
64 * @SDTX_DEVICE_MODE_TABLET: The clipboard is detached from the base and the
65 * device operates as tablet.
66 * @SDTX_DEVICE_MODE_LAPTOP: The clipboard is attached normally to the base
67 * and the device operates as laptop.
68 * @SDTX_DEVICE_MODE_STUDIO: The clipboard is attached to the base in reverse.
69 * The device operates as tablet with keyboard and
70 * touchpad deactivated, however, the base battery
71 * and, if present in the specific device model, dGPU
72 * are available to the system.
73 */
74enum sdtx_device_mode {
75 SDTX_DEVICE_MODE_TABLET = 0x00,
76 SDTX_DEVICE_MODE_LAPTOP = 0x01,
77 SDTX_DEVICE_MODE_STUDIO = 0x02,
78};
79
80/**
81 * struct sdtx_event - Event provided by reading from the DTX device file.
82 * @length: Length of the event payload, in bytes.
83 * @code: Event code, detailing what type of event this is.
84 * @data: Payload of the event, containing @length bytes.
85 *
86 * See &enum sdtx_event_code for currently valid event codes.
87 */
88struct sdtx_event {
89 __u16 length;
90 __u16 code;
91 __u8 data[];
92} __attribute__((__packed__));
93
94/**
95 * enum sdtx_event_code - Code describing the type of an event.
96 * @SDTX_EVENT_REQUEST: Detachment request event type.
97 * @SDTX_EVENT_CANCEL: Cancel detachment process event type.
98 * @SDTX_EVENT_BASE_CONNECTION: Base/clipboard connection change event type.
99 * @SDTX_EVENT_LATCH_STATUS: Latch status change event type.
100 * @SDTX_EVENT_DEVICE_MODE: Device mode change event type.
101 *
102 * Used in &struct sdtx_event to describe the type of the event. Further event
103 * codes are reserved for future use. Any event parser should be able to
104 * gracefully handle unknown events, i.e. by simply skipping them.
105 *
106 * Consult the DTX user-space interface documentation for details regarding
107 * the individual event types.
108 */
109enum sdtx_event_code {
110 SDTX_EVENT_REQUEST = 1,
111 SDTX_EVENT_CANCEL = 2,
112 SDTX_EVENT_BASE_CONNECTION = 3,
113 SDTX_EVENT_LATCH_STATUS = 4,
114 SDTX_EVENT_DEVICE_MODE = 5,
115};
116
117/**
118 * struct sdtx_base_info - Describes if and what type of base is connected.
119 * @state: The state of the connection. Valid values are %SDTX_BASE_DETACHED,
120 * %SDTX_BASE_ATTACHED, and %SDTX_DETACH_NOT_FEASIBLE (in case a base
121 * is attached but low clipboard battery prevents detachment). Other
122 * values are currently reserved.
123 * @base_id: The type of base connected. Zero if no base is connected.
124 */
125struct sdtx_base_info {
126 __u16 state;
127 __u16 base_id;
128} __attribute__((__packed__));
129
130/* IOCTLs */
131#define SDTX_IOCTL_EVENTS_ENABLE _IO(0xa5, 0x21)
132#define SDTX_IOCTL_EVENTS_DISABLE _IO(0xa5, 0x22)
133
134#define SDTX_IOCTL_LATCH_LOCK _IO(0xa5, 0x23)
135#define SDTX_IOCTL_LATCH_UNLOCK _IO(0xa5, 0x24)
136
137#define SDTX_IOCTL_LATCH_REQUEST _IO(0xa5, 0x25)
138#define SDTX_IOCTL_LATCH_CONFIRM _IO(0xa5, 0x26)
139#define SDTX_IOCTL_LATCH_HEARTBEAT _IO(0xa5, 0x27)
140#define SDTX_IOCTL_LATCH_CANCEL _IO(0xa5, 0x28)
141
142#define SDTX_IOCTL_GET_BASE_INFO _IOR(0xa5, 0x29, struct sdtx_base_info)
143#define SDTX_IOCTL_GET_DEVICE_MODE _IOR(0xa5, 0x2a, __u16)
144#define SDTX_IOCTL_GET_LATCH_STATUS _IOR(0xa5, 0x2b, __u16)
145
146#endif /* _UAPI_LINUX_SURFACE_AGGREGATOR_DTX_H */
include/uapi/linux/thermal.h+1−1
@@ -60,7 +60,7 @@ enum thermal_genl_event { · 59 unmodified lines
60 THERMAL_GENL_EVENT_UNSPEC,60 THERMAL_GENL_EVENT_UNSPEC,
61 THERMAL_GENL_EVENT_TZ_CREATE, /* Thermal zone creation */61 THERMAL_GENL_EVENT_TZ_CREATE, /* Thermal zone creation */
62 THERMAL_GENL_EVENT_TZ_DELETE, /* Thermal zone deletion */62 THERMAL_GENL_EVENT_TZ_DELETE, /* Thermal zone deletion */
63 THERMAL_GENL_EVENT_TZ_DISABLE, /* Thermal zone disabed */63 THERMAL_GENL_EVENT_TZ_DISABLE, /* Thermal zone disabled */
64 THERMAL_GENL_EVENT_TZ_ENABLE, /* Thermal zone enabled */64 THERMAL_GENL_EVENT_TZ_ENABLE, /* Thermal zone enabled */
65 THERMAL_GENL_EVENT_TZ_TRIP_UP, /* Trip point crossed the way up */65 THERMAL_GENL_EVENT_TZ_TRIP_UP, /* Trip point crossed the way up */
66 THERMAL_GENL_EVENT_TZ_TRIP_DOWN, /* Trip point crossed the way down */66 THERMAL_GENL_EVENT_TZ_TRIP_DOWN, /* Trip point crossed the way down */
include/uapi/linux/tty_flags.h+4−4
@@ -39,7 +39,7 @@ · 38 unmodified lines
39 * WARNING: These flags are no longer used and have been superceded by the39 * WARNING: These flags are no longer used and have been superceded by the
40 * TTY_PORT_ flags in the iflags field (and not userspace-visible)40 * TTY_PORT_ flags in the iflags field (and not userspace-visible)
41 */41 */
42#ifndef _KERNEL_42#ifndef __KERNEL__
43#define ASYNCB_INITIALIZED 31 /* Serial port was initialized */43#define ASYNCB_INITIALIZED 31 /* Serial port was initialized */
44#define ASYNCB_SUSPENDED 30 /* Serial port is suspended */44#define ASYNCB_SUSPENDED 30 /* Serial port is suspended */
45#define ASYNCB_NORMAL_ACTIVE 29 /* Normal device is active */45#define ASYNCB_NORMAL_ACTIVE 29 /* Normal device is active */
@@ -73,15 +73,15 @@ · 27 unmodified lines
73#define ASYNC_MAGIC_MULTIPLIER (1U << ASYNCB_MAGIC_MULTIPLIER)73#define ASYNC_MAGIC_MULTIPLIER (1U << ASYNCB_MAGIC_MULTIPLIER)
74 74
75#define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1)75#define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1)
76#define ASYNC_DEPRECATED (ASYNC_SESSION_LOCKOUT | ASYNC_PGRP_LOCKOUT | \76#define ASYNC_DEPRECATED (ASYNC_SPLIT_TERMIOS | ASYNC_SESSION_LOCKOUT | \
77 ASYNC_CALLOUT_NOHUP | ASYNC_AUTOPROBE)77 ASYNC_PGRP_LOCKOUT | ASYNC_CALLOUT_NOHUP | ASYNC_AUTOPROBE)
78#define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \78#define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \
79 ASYNC_LOW_LATENCY)79 ASYNC_LOW_LATENCY)
80#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI)80#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI)
81#define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI)81#define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI)
82#define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)82#define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
83 83
84#ifndef _KERNEL_84#ifndef __KERNEL__
85/* These flags are no longer used (and were always masked from userspace) */85/* These flags are no longer used (and were always masked from userspace) */
86#define ASYNC_INITIALIZED (1U << ASYNCB_INITIALIZED)86#define ASYNC_INITIALIZED (1U << ASYNCB_INITIALIZED)
87#define ASYNC_NORMAL_ACTIVE (1U << ASYNCB_NORMAL_ACTIVE)87#define ASYNC_NORMAL_ACTIVE (1U << ASYNCB_NORMAL_ACTIVE)
include/uapi/linux/usb/video.h+2−1
@@ -302,9 +302,10 @@ struct uvc_processing_unit_descriptor { · 301 unmodified lines
302 __u8 bControlSize;302 __u8 bControlSize;
303 __u8 bmControls[2];303 __u8 bmControls[2];
304 __u8 iProcessing;304 __u8 iProcessing;
305 __u8 bmVideoStandards;
305} __attribute__((__packed__));306} __attribute__((__packed__));
306 307
307#define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n))308#define UVC_DT_PROCESSING_UNIT_SIZE(n) (10+(n))
308 309
309/* 3.7.2.6. Extension Unit Descriptor */310/* 3.7.2.6. Extension Unit Descriptor */
310struct uvc_extension_unit_descriptor {311struct uvc_extension_unit_descriptor {
include/uapi/linux/userfaultfd.h+32−4
@@ -19,15 +19,19 @@ · 18 unmodified lines
19 * means the userland is reading).19 * means the userland is reading).
20 */20 */
21#define UFFD_API ((__u64)0xAA)21#define UFFD_API ((__u64)0xAA)
22#define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | \
23 UFFDIO_REGISTER_MODE_WP | \
24 UFFDIO_REGISTER_MODE_MINOR)
22#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \25#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \
23 UFFD_FEATURE_EVENT_FORK | \26 UFFD_FEATURE_EVENT_FORK | \
24 UFFD_FEATURE_EVENT_REMAP | \27 UFFD_FEATURE_EVENT_REMAP | \
25 UFFD_FEATURE_EVENT_REMOVE | \28 UFFD_FEATURE_EVENT_REMOVE | \
26 UFFD_FEATURE_EVENT_UNMAP | \29 UFFD_FEATURE_EVENT_UNMAP | \
27 UFFD_FEATURE_MISSING_HUGETLBFS | \30 UFFD_FEATURE_MISSING_HUGETLBFS | \
28 UFFD_FEATURE_MISSING_SHMEM | \31 UFFD_FEATURE_MISSING_SHMEM | \
29 UFFD_FEATURE_SIGBUS | \32 UFFD_FEATURE_SIGBUS | \
30 UFFD_FEATURE_THREAD_ID)33 UFFD_FEATURE_THREAD_ID | \
34 UFFD_FEATURE_MINOR_HUGETLBFS)
31#define UFFD_API_IOCTLS \35#define UFFD_API_IOCTLS \
32 ((__u64)1 << _UFFDIO_REGISTER | \36 ((__u64)1 << _UFFDIO_REGISTER | \
33 (__u64)1 << _UFFDIO_UNREGISTER | \37 (__u64)1 << _UFFDIO_UNREGISTER | \
@@ -36,10 +40,12 @@ · 2 unmodified lines
36 ((__u64)1 << _UFFDIO_WAKE | \40 ((__u64)1 << _UFFDIO_WAKE | \
37 (__u64)1 << _UFFDIO_COPY | \41 (__u64)1 << _UFFDIO_COPY | \
38 (__u64)1 << _UFFDIO_ZEROPAGE | \42 (__u64)1 << _UFFDIO_ZEROPAGE | \
39 (__u64)1 << _UFFDIO_WRITEPROTECT)43 (__u64)1 << _UFFDIO_WRITEPROTECT | \
44 (__u64)1 << _UFFDIO_CONTINUE)
40#define UFFD_API_RANGE_IOCTLS_BASIC \45#define UFFD_API_RANGE_IOCTLS_BASIC \
41 ((__u64)1 << _UFFDIO_WAKE | \46 ((__u64)1 << _UFFDIO_WAKE | \
42 (__u64)1 << _UFFDIO_COPY)47 (__u64)1 << _UFFDIO_COPY | \
48 (__u64)1 << _UFFDIO_CONTINUE)
43 49
44/*50/*
45 * Valid ioctl command number range with this API is from 0x00 to51 * Valid ioctl command number range with this API is from 0x00 to
@@ -55,6 +61,7 @@ · 9 unmodified lines
55#define _UFFDIO_COPY (0x03)61#define _UFFDIO_COPY (0x03)
56#define _UFFDIO_ZEROPAGE (0x04)62#define _UFFDIO_ZEROPAGE (0x04)
57#define _UFFDIO_WRITEPROTECT (0x06)63#define _UFFDIO_WRITEPROTECT (0x06)
64#define _UFFDIO_CONTINUE (0x07)
58#define _UFFDIO_API (0x3F)65#define _UFFDIO_API (0x3F)
59 66
60/* userfaultfd ioctl ids */67/* userfaultfd ioctl ids */
@@ -73,6 +80,8 @@ · 12 unmodified lines
73 struct uffdio_zeropage)80 struct uffdio_zeropage)
74#define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \81#define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \
75 struct uffdio_writeprotect)82 struct uffdio_writeprotect)
83#define UFFDIO_CONTINUE _IOR(UFFDIO, _UFFDIO_CONTINUE, \
84 struct uffdio_continue)
76 85
77/* read() structure */86/* read() structure */
78struct uffd_msg {87struct uffd_msg {
@@ -127,6 +136,7 @@ struct uffd_msg { · 48 unmodified lines
127/* flags for UFFD_EVENT_PAGEFAULT */136/* flags for UFFD_EVENT_PAGEFAULT */
128#define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */137#define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */
129#define UFFD_PAGEFAULT_FLAG_WP (1<<1) /* If reason is VM_UFFD_WP */138#define UFFD_PAGEFAULT_FLAG_WP (1<<1) /* If reason is VM_UFFD_WP */
139#define UFFD_PAGEFAULT_FLAG_MINOR (1<<2) /* If reason is VM_UFFD_MINOR */
130 140
131struct uffdio_api {141struct uffdio_api {
132 /* userland asks for an API number and the features to enable */142 /* userland asks for an API number and the features to enable */
@@ -171,6 +181,10 @@ struct uffdio_api { · 38 unmodified lines
171 *181 *
172 * UFFD_FEATURE_THREAD_ID pid of the page faulted task_struct will182 * UFFD_FEATURE_THREAD_ID pid of the page faulted task_struct will
173 * be returned, if feature is not requested 0 will be returned.183 * be returned, if feature is not requested 0 will be returned.
184 *
185 * UFFD_FEATURE_MINOR_HUGETLBFS indicates that minor faults
186 * can be intercepted (via REGISTER_MODE_MINOR) for
187 * hugetlbfs-backed pages.
174 */188 */
175#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)189#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)
176#define UFFD_FEATURE_EVENT_FORK (1<<1)190#define UFFD_FEATURE_EVENT_FORK (1<<1)
@@ -181,6 +195,7 @@ struct uffdio_api { · 4 unmodified lines
181#define UFFD_FEATURE_EVENT_UNMAP (1<<6)195#define UFFD_FEATURE_EVENT_UNMAP (1<<6)
182#define UFFD_FEATURE_SIGBUS (1<<7)196#define UFFD_FEATURE_SIGBUS (1<<7)
183#define UFFD_FEATURE_THREAD_ID (1<<8)197#define UFFD_FEATURE_THREAD_ID (1<<8)
198#define UFFD_FEATURE_MINOR_HUGETLBFS (1<<9)
184 __u64 features;199 __u64 features;
185 200
186 __u64 ioctls;201 __u64 ioctls;
@@ -195,6 +210,7 @@ struct uffdio_register { · 8 unmodified lines
195 struct uffdio_range range;210 struct uffdio_range range;
196#define UFFDIO_REGISTER_MODE_MISSING ((__u64)1<<0)211#define UFFDIO_REGISTER_MODE_MISSING ((__u64)1<<0)
197#define UFFDIO_REGISTER_MODE_WP ((__u64)1<<1)212#define UFFDIO_REGISTER_MODE_WP ((__u64)1<<1)
213#define UFFDIO_REGISTER_MODE_MINOR ((__u64)1<<2)
198 __u64 mode;214 __u64 mode;
199 215
200 /*216 /*
@@ -257,6 +273,18 @@ struct uffdio_writeprotect { · 56 unmodified lines
257 __u64 mode;273 __u64 mode;
258};274};
259 275
276struct uffdio_continue {
277 struct uffdio_range range;
278#define UFFDIO_CONTINUE_MODE_DONTWAKE ((__u64)1<<0)
279 __u64 mode;
280
281 /*
282 * Fields below here are written by the ioctl and must be at the end:
283 * the copy_from_user will not read past here.
284 */
285 __s64 mapped;
286};
287
260/*288/*
261 * Flags for the userfaultfd(2) system call itself.289 * Flags for the userfaultfd(2) system call itself.
262 */290 */
include/uapi/linux/uvcvideo.h+5−5
@@ -76,11 +76,11 @@ struct uvc_xu_control_query { · 75 unmodified lines
76 76
77/**77/**
78 * struct uvc_meta_buf - metadata buffer building block78 * struct uvc_meta_buf - metadata buffer building block
79 * @ns - system timestamp of the payload in nanoseconds79 * @ns: system timestamp of the payload in nanoseconds
80 * @sof - USB Frame Number80 * @sof: USB Frame Number
81 * @length - length of the payload header81 * @length: length of the payload header
82 * @flags - payload header flags82 * @flags: payload header flags
83 * @buf - optional device-specific header data83 * @buf: optional device-specific header data
84 *84 *
85 * UVC metadata nodes fill buffers with possibly multiple instances of this85 * UVC metadata nodes fill buffers with possibly multiple instances of this
86 * struct. The first two fields are added by the driver, they can be used for86 * struct. The first two fields are added by the driver, they can be used for
include/uapi/linux/v4l2-controls.h+240−1
@@ -66,6 +66,7 @@ · 65 unmodified lines
66#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */66#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */
67#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */67#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */
68#define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */68#define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */
69#define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 /* Colorimetry controls */
69 70
70/* User-class control IDs */71/* User-class control IDs */
71 72
@@ -428,6 +429,11 @@ enum v4l2_mpeg_video_multi_slice_mode { · 356 unmodified lines
428#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_CODEC_BASE+228)429#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_CODEC_BASE+228)
429#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_CODEC_BASE+229)430#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_CODEC_BASE+229)
430#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE+230)431#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE+230)
432#define V4L2_CID_MPEG_VIDEO_AU_DELIMITER (V4L2_CID_CODEC_BASE+231)
433#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE+232)
434#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE+233)
435#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE+234)
436#define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE+235)
431 437
432/* CIDs for the MPEG-2 Part 2 (H.262) codec */438/* CIDs for the MPEG-2 Part 2 (H.262) codec */
433#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270)439#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270)
@@ -797,6 +803,9 @@ enum v4l2_mpeg_video_frame_skip_mode { · 363 unmodified lines
797#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 651)803#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 651)
798#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 652)804#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 652)
799 805
806#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (V4L2_CID_CODEC_BASE + 653)
807#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_BASE + 654)
808
800/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */809/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
801#define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000)810#define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000)
802#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE+0)811#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE+0)
@@ -1329,7 +1338,7 @@ struct v4l2_ctrl_h264_sps { · 526 unmodified lines
1329 * struct v4l2_ctrl_h264_pps - H264 picture parameter set1338 * struct v4l2_ctrl_h264_pps - H264 picture parameter set
1330 *1339 *
1331 * Except where noted, all the members on this picture parameter set1340 * Except where noted, all the members on this picture parameter set
1332 * structure match the sequence parameter set syntax as specified1341 * structure match the picture parameter set syntax as specified
1333 * by the H264 specification.1342 * by the H264 specification.
1334 *1343 *
1335 * In particular, V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag1344 * In particular, V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag
@@ -1657,6 +1666,236 @@ struct v4l2_ctrl_fwht_params { · 321 unmodified lines
1657 __u32 quantization;1666 __u32 quantization;
1658};1667};
1659 1668
1669/* Stateless VP8 control */
1670
1671#define V4L2_VP8_SEGMENT_FLAG_ENABLED 0x01
1672#define V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP 0x02
1673#define V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA 0x04
1674#define V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE 0x08
1675
1676/**
1677 * struct v4l2_vp8_segment - VP8 segment-based adjustments parameters
1678 *
1679 * @quant_update: update values for the segment quantizer.
1680 * @lf_update: update values for the loop filter level.
1681 * @segment_probs: branch probabilities of the segment_id decoding tree.
1682 * @padding: padding field. Should be zeroed by applications.
1683 * @flags: see V4L2_VP8_SEGMENT_FLAG_{}.
1684 *
1685 * This structure contains segment-based adjustments related parameters.
1686 * See the 'update_segmentation()' part of the frame header syntax,
1687 * and section '9.3. Segment-Based Adjustments' of the VP8 specification
1688 * for more details.
1689 */
1690struct v4l2_vp8_segment {
1691 __s8 quant_update[4];
1692 __s8 lf_update[4];
1693 __u8 segment_probs[3];
1694 __u8 padding;
1695 __u32 flags;
1696};
1697
1698#define V4L2_VP8_LF_ADJ_ENABLE 0x01
1699#define V4L2_VP8_LF_DELTA_UPDATE 0x02
1700#define V4L2_VP8_LF_FILTER_TYPE_SIMPLE 0x04
1701
1702/**
1703 * struct v4l2_vp8_loop_filter - VP8 loop filter parameters
1704 *
1705 * @ref_frm_delta: Reference frame signed delta values.
1706 * @mb_mode_delta: MB prediction mode signed delta values.
1707 * @sharpness_level: matches sharpness_level syntax element.
1708 * @level: matches loop_filter_level syntax element.
1709 * @padding: padding field. Should be zeroed by applications.
1710 * @flags: see V4L2_VP8_LF_FLAG_{}.
1711 *
1712 * This structure contains loop filter related parameters.
1713 * See the 'mb_lf_adjustments()' part of the frame header syntax,
1714 * and section '9.4. Loop Filter Type and Levels' of the VP8 specification
1715 * for more details.
1716 */
1717struct v4l2_vp8_loop_filter {
1718 __s8 ref_frm_delta[4];
1719 __s8 mb_mode_delta[4];
1720 __u8 sharpness_level;
1721 __u8 level;
1722 __u16 padding;
1723 __u32 flags;
1724};
1725
1726/**
1727 * struct v4l2_vp8_quantization - VP8 quantizattion indices
1728 *
1729 * @y_ac_qi: luma AC coefficient table index.
1730 * @y_dc_delta: luma DC delta vaue.
1731 * @y2_dc_delta: y2 block DC delta value.
1732 * @y2_ac_delta: y2 block AC delta value.
1733 * @uv_dc_delta: chroma DC delta value.
1734 * @uv_ac_delta: chroma AC delta value.
1735 * @padding: padding field. Should be zeroed by applications.
1736 *
1737 * This structure contains the quantization indices present
1738 * in 'quant_indices()' part of the frame header syntax.
1739 * See section '9.6. Dequantization Indices' of the VP8 specification
1740 * for more details.
1741 */
1742struct v4l2_vp8_quantization {
1743 __u8 y_ac_qi;
1744 __s8 y_dc_delta;
1745 __s8 y2_dc_delta;
1746 __s8 y2_ac_delta;
1747 __s8 uv_dc_delta;
1748 __s8 uv_ac_delta;
1749 __u16 padding;
1750};
1751
1752#define V4L2_VP8_COEFF_PROB_CNT 11
1753#define V4L2_VP8_MV_PROB_CNT 19
1754
1755/**
1756 * struct v4l2_vp8_entropy - VP8 update probabilities
1757 *
1758 * @coeff_probs: coefficient probability update values.
1759 * @y_mode_probs: luma intra-prediction probabilities.
1760 * @uv_mode_probs: chroma intra-prediction probabilities.
1761 * @mv_probs: mv decoding probability.
1762 * @padding: padding field. Should be zeroed by applications.
1763 *
1764 * This structure contains the update probabilities present in
1765 * 'token_prob_update()' and 'mv_prob_update()' part of the frame header.
1766 * See section '17.2. Probability Updates' of the VP8 specification
1767 * for more details.
1768 */
1769struct v4l2_vp8_entropy {
1770 __u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT];
1771 __u8 y_mode_probs[4];
1772 __u8 uv_mode_probs[3];
1773 __u8 mv_probs[2][V4L2_VP8_MV_PROB_CNT];
1774 __u8 padding[3];
1775};
1776
1777/**
1778 * struct v4l2_vp8_entropy_coder_state - VP8 boolean coder state
1779 *
1780 * @range: coder state value for "Range"
1781 * @value: coder state value for "Value"
1782 * @bit_count: number of bits left in range "Value".
1783 * @padding: padding field. Should be zeroed by applications.
1784 *
1785 * This structure contains the state for the boolean coder, as
1786 * explained in section '7. Boolean Entropy Decoder' of the VP8 specification.
1787 */
1788struct v4l2_vp8_entropy_coder_state {
1789 __u8 range;
1790 __u8 value;
1791 __u8 bit_count;
1792 __u8 padding;
1793};
1794
1795#define V4L2_VP8_FRAME_FLAG_KEY_FRAME 0x01
1796#define V4L2_VP8_FRAME_FLAG_EXPERIMENTAL 0x02
1797#define V4L2_VP8_FRAME_FLAG_SHOW_FRAME 0x04
1798#define V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF 0x08
1799#define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN 0x10
1800#define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT 0x20
1801
1802#define V4L2_VP8_FRAME_IS_KEY_FRAME(hdr) \
1803 (!!((hdr)->flags & V4L2_VP8_FRAME_FLAG_KEY_FRAME))
1804
1805#define V4L2_CID_STATELESS_VP8_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 200)
1806/**
1807 * struct v4l2_ctrl_vp8_frame - VP8 frame parameters
1808 *
1809 * @segment: segmentation parameters. See &v4l2_vp8_segment for more details
1810 * @lf: loop filter parameters. See &v4l2_vp8_loop_filter for more details
1811 * @quant: quantization parameters. See &v4l2_vp8_quantization for more details
1812 * @entropy: update probabilities. See &v4l2_vp8_entropy for more details
1813 * @coder_state: boolean coder state. See &v4l2_vp8_entropy_coder_state for more details
1814 * @width: frame width.
1815 * @height: frame height.
1816 * @horizontal_scale: horizontal scaling factor.
1817 * @vertical_scale: vertical scaling factor.
1818 * @version: bitstream version.
1819 * @prob_skip_false: frame header syntax element.
1820 * @prob_intra: frame header syntax element.
1821 * @prob_last: frame header syntax element.
1822 * @prob_gf: frame header syntax element.
1823 * @num_dct_parts: number of DCT coefficients partitions.
1824 * @first_part_size: size of the first partition, i.e. the control partition.
1825 * @first_part_header_bits: size in bits of the first partition header portion.
1826 * @dct_part_sizes: DCT coefficients sizes.
1827 * @last_frame_ts: "last" reference buffer timestamp.
1828 * The timestamp refers to the timestamp field in struct v4l2_buffer.
1829 * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.
1830 * @golden_frame_ts: "golden" reference buffer timestamp.
1831 * @alt_frame_ts: "alt" reference buffer timestamp.
1832 * @flags: see V4L2_VP8_FRAME_FLAG_{}.
1833 */
1834struct v4l2_ctrl_vp8_frame {
1835 struct v4l2_vp8_segment segment;
1836 struct v4l2_vp8_loop_filter lf;
1837 struct v4l2_vp8_quantization quant;
1838 struct v4l2_vp8_entropy entropy;
1839 struct v4l2_vp8_entropy_coder_state coder_state;
1840
1841 __u16 width;
1842 __u16 height;
1843
1844 __u8 horizontal_scale;
1845 __u8 vertical_scale;
1846
1847 __u8 version;
1848 __u8 prob_skip_false;
1849 __u8 prob_intra;
1850 __u8 prob_last;
1851 __u8 prob_gf;
1852 __u8 num_dct_parts;
1853
1854 __u32 first_part_size;
1855 __u32 first_part_header_bits;
1856 __u32 dct_part_sizes[8];
1857
1858 __u64 last_frame_ts;
1859 __u64 golden_frame_ts;
1860 __u64 alt_frame_ts;
1861
1862 __u64 flags;
1863};
1864
1865#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
1866#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
1867
1868#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
1869
1870struct v4l2_ctrl_hdr10_cll_info {
1871 __u16 max_content_light_level;
1872 __u16 max_pic_average_light_level;
1873};
1874
1875#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
1876
1877#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5
1878#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000
1879#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5
1880#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000
1881#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
1882#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000
1883#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
1884#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000
1885#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000
1886#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000
1887#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1
1888#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000
1889
1890struct v4l2_ctrl_hdr10_mastering_display {
1891 __u16 display_primaries_x[3];
1892 __u16 display_primaries_y[3];
1893 __u16 white_point_x;
1894 __u16 white_point_y;
1895 __u32 max_display_mastering_luminance;
1896 __u32 min_display_mastering_luminance;
1897};
1898
1660/* MPEG-compression definitions kept for backwards compatibility */1899/* MPEG-compression definitions kept for backwards compatibility */
1661#ifndef __KERNEL__1900#ifndef __KERNEL__
1662#define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC1901#define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC
include/uapi/linux/v4l2-subdev.h+11−1
@@ -44,6 +44,7 @@ enum v4l2_subdev_format_whence { · 43 unmodified lines
44 * @which: format type (from enum v4l2_subdev_format_whence)44 * @which: format type (from enum v4l2_subdev_format_whence)
45 * @pad: pad number, as reported by the media API45 * @pad: pad number, as reported by the media API
46 * @format: media bus format (format code and frame size)46 * @format: media bus format (format code and frame size)
47 * @reserved: drivers and applications must zero this array
47 */48 */
48struct v4l2_subdev_format {49struct v4l2_subdev_format {
49 __u32 which;50 __u32 which;
@@ -57,6 +58,7 @@ struct v4l2_subdev_format { · 7 unmodified lines
57 * @which: format type (from enum v4l2_subdev_format_whence)58 * @which: format type (from enum v4l2_subdev_format_whence)
58 * @pad: pad number, as reported by the media API59 * @pad: pad number, as reported by the media API
59 * @rect: pad crop rectangle boundaries60 * @rect: pad crop rectangle boundaries
61 * @reserved: drivers and applications must zero this array
60 */62 */
61struct v4l2_subdev_crop {63struct v4l2_subdev_crop {
62 __u32 which;64 __u32 which;
@@ -78,6 +80,7 @@ struct v4l2_subdev_crop { · 15 unmodified lines
78 * @code: format code (MEDIA_BUS_FMT_ definitions)80 * @code: format code (MEDIA_BUS_FMT_ definitions)
79 * @which: format type (from enum v4l2_subdev_format_whence)81 * @which: format type (from enum v4l2_subdev_format_whence)
80 * @flags: flags set by the driver, (V4L2_SUBDEV_MBUS_CODE_*)82 * @flags: flags set by the driver, (V4L2_SUBDEV_MBUS_CODE_*)
83 * @reserved: drivers and applications must zero this array
81 */84 */
82struct v4l2_subdev_mbus_code_enum {85struct v4l2_subdev_mbus_code_enum {
83 __u32 pad;86 __u32 pad;
@@ -90,10 +93,15 @@ struct v4l2_subdev_mbus_code_enum { · 6 unmodified lines
90 93
91/**94/**
92 * struct v4l2_subdev_frame_size_enum - Media bus format enumeration95 * struct v4l2_subdev_frame_size_enum - Media bus format enumeration
93 * @pad: pad number, as reported by the media API
94 * @index: format index during enumeration96 * @index: format index during enumeration
97 * @pad: pad number, as reported by the media API
95 * @code: format code (MEDIA_BUS_FMT_ definitions)98 * @code: format code (MEDIA_BUS_FMT_ definitions)
99 * @min_width: minimum frame width, in pixels
100 * @max_width: maximum frame width, in pixels
101 * @min_height: minimum frame height, in pixels
102 * @max_height: maximum frame height, in pixels
96 * @which: format type (from enum v4l2_subdev_format_whence)103 * @which: format type (from enum v4l2_subdev_format_whence)
104 * @reserved: drivers and applications must zero this array
97 */105 */
98struct v4l2_subdev_frame_size_enum {106struct v4l2_subdev_frame_size_enum {
99 __u32 index;107 __u32 index;
@@ -111,6 +119,7 @@ struct v4l2_subdev_frame_size_enum { · 11 unmodified lines
111 * struct v4l2_subdev_frame_interval - Pad-level frame rate119 * struct v4l2_subdev_frame_interval - Pad-level frame rate
112 * @pad: pad number, as reported by the media API120 * @pad: pad number, as reported by the media API
113 * @interval: frame interval in seconds121 * @interval: frame interval in seconds
122 * @reserved: drivers and applications must zero this array
114 */123 */
115struct v4l2_subdev_frame_interval {124struct v4l2_subdev_frame_interval {
116 __u32 pad;125 __u32 pad;
@@ -127,6 +136,7 @@ struct v4l2_subdev_frame_interval { · 10 unmodified lines
127 * @height: frame height in pixels136 * @height: frame height in pixels
128 * @interval: frame interval in seconds137 * @interval: frame interval in seconds
129 * @which: format type (from enum v4l2_subdev_format_whence)138 * @which: format type (from enum v4l2_subdev_format_whence)
139 * @reserved: drivers and applications must zero this array
130 */140 */
131struct v4l2_subdev_frame_interval_enum {141struct v4l2_subdev_frame_interval_enum {
132 __u32 index;142 __u32 index;
include/uapi/linux/vfio.h+8−0
@@ -335,6 +335,8 @@ struct vfio_region_info_cap_type { · 334 unmodified lines
335/* 10de vendor PCI sub-types */335/* 10de vendor PCI sub-types */
336/*336/*
337 * NVIDIA GPU NVlink2 RAM is coherent RAM mapped onto the host address space.337 * NVIDIA GPU NVlink2 RAM is coherent RAM mapped onto the host address space.
338 *
339 * Deprecated, region no longer provided
338 */340 */
339#define VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM (1)341#define VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM (1)
340 342
@@ -342,6 +344,8 @@ struct vfio_region_info_cap_type { · 1 unmodified line
342/*344/*
343 * IBM NPU NVlink2 ATSD (Address Translation Shootdown) register of NPU345 * IBM NPU NVlink2 ATSD (Address Translation Shootdown) register of NPU
344 * to do TLB invalidation on a GPU.346 * to do TLB invalidation on a GPU.
347 *
348 * Deprecated, region no longer provided
345 */349 */
346#define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1)350#define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1)
347 351
@@ -641,6 +645,8 @@ struct vfio_device_migration_info { · 293 unmodified lines
641 * Capability with compressed real address (aka SSA - small system address)645 * Capability with compressed real address (aka SSA - small system address)
642 * where GPU RAM is mapped on a system bus. Used by a GPU for DMA routing646 * where GPU RAM is mapped on a system bus. Used by a GPU for DMA routing
643 * and by the userspace to associate a NVLink bridge with a GPU.647 * and by the userspace to associate a NVLink bridge with a GPU.
648 *
649 * Deprecated, capability no longer provided
644 */650 */
645#define VFIO_REGION_INFO_CAP_NVLINK2_SSATGT 4651#define VFIO_REGION_INFO_CAP_NVLINK2_SSATGT 4
646 652
@@ -655,6 +661,8 @@ struct vfio_region_info_cap_nvlink2_ssatgt { · 8 unmodified lines
655 * property in the device tree. The value is fixed in the hardware661 * property in the device tree. The value is fixed in the hardware
656 * and failing to provide the correct value results in the link662 * and failing to provide the correct value results in the link
657 * not working with no indication from the driver why.663 * not working with no indication from the driver why.
664 *
665 * Deprecated, capability no longer provided
658 */666 */
659#define VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD 5667#define VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD 5
660 668
include/uapi/linux/videodev2.h+22−1
@@ -586,6 +586,7 @@ struct v4l2_pix_format { · 585 unmodified lines
586#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */586#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */
587#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */587#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
588#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */588#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
589#define V4L2_PIX_FMT_YUV24 v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */
589#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */590#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
590#define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */591#define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */
591#define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */592#define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */
@@ -694,6 +695,7 @@ struct v4l2_pix_format { · 102 unmodified lines
694#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */695#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
695#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */696#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
696#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */697#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
698#define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */
697#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */699#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */
698#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */700#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */
699#define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */701#define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */
@@ -975,8 +977,10 @@ struct v4l2_requestbuffers { · 275 unmodified lines
975 * pointing to this plane977 * pointing to this plane
976 * @fd: when memory is V4L2_MEMORY_DMABUF, a userspace file978 * @fd: when memory is V4L2_MEMORY_DMABUF, a userspace file
977 * descriptor associated with this plane979 * descriptor associated with this plane
980 * @m: union of @mem_offset, @userptr and @fd
978 * @data_offset: offset in the plane to the start of data; usually 0,981 * @data_offset: offset in the plane to the start of data; usually 0,
979 * unless there is a header in front of the data982 * unless there is a header in front of the data
983 * @reserved: drivers and applications must zero this array
980 *984 *
981 * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer985 * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer
982 * with two planes can have one plane for Y, and another for interleaved CbCr986 * with two planes can have one plane for Y, and another for interleaved CbCr
@@ -1018,10 +1022,14 @@ struct v4l2_plane { · 35 unmodified lines
1018 * a userspace file descriptor associated with this buffer1022 * a userspace file descriptor associated with this buffer
1019 * @planes: for multiplanar buffers; userspace pointer to the array of plane1023 * @planes: for multiplanar buffers; userspace pointer to the array of plane
1020 * info structs for this buffer1024 * info structs for this buffer
1025 * @m: union of @offset, @userptr, @planes and @fd
1021 * @length: size in bytes of the buffer (NOT its payload) for single-plane1026 * @length: size in bytes of the buffer (NOT its payload) for single-plane
1022 * buffers (when type != *_MPLANE); number of elements in the1027 * buffers (when type != *_MPLANE); number of elements in the
1023 * planes array for multi-plane buffers1028 * planes array for multi-plane buffers
1029 * @reserved2: drivers and applications must zero this field
1024 * @request_fd: fd of the request that this buffer should use1030 * @request_fd: fd of the request that this buffer should use
1031 * @reserved: for backwards compatibility with applications that do not know
1032 * about @request_fd
1025 *1033 *
1026 * Contains data exchanged by application and driver using one of the Streaming1034 * Contains data exchanged by application and driver using one of the Streaming
1027 * I/O methods.1035 * I/O methods.
@@ -1059,7 +1067,7 @@ struct v4l2_buffer { · 31 unmodified lines
1059#ifndef __KERNEL__1067#ifndef __KERNEL__
1060/**1068/**
1061 * v4l2_timeval_to_ns - Convert timeval to nanoseconds1069 * v4l2_timeval_to_ns - Convert timeval to nanoseconds
1062 * @ts: pointer to the timeval variable to be converted1070 * @tv: pointer to the timeval variable to be converted
1063 *1071 *
1064 * Returns the scalar nanosecond representation of the timeval1072 * Returns the scalar nanosecond representation of the timeval
1065 * parameter.1073 * parameter.
@@ -1120,6 +1128,7 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv) · 54 unmodified lines
1120 * @flags: flags for newly created file, currently only O_CLOEXEC is1128 * @flags: flags for newly created file, currently only O_CLOEXEC is
1121 * supported, refer to manual of open syscall for more details1129 * supported, refer to manual of open syscall for more details
1122 * @fd: file descriptor associated with DMABUF (set by driver)1130 * @fd: file descriptor associated with DMABUF (set by driver)
1131 * @reserved: drivers and applications must zero this array
1123 *1132 *
1124 * Contains data used for exporting a video buffer as DMABUF file descriptor.1133 * Contains data used for exporting a video buffer as DMABUF file descriptor.
1125 * The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF1134 * The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF
@@ -1737,6 +1746,7 @@ struct v4l2_ext_control { · 611 unmodified lines
1737 struct v4l2_ctrl_h264_slice_params __user *p_h264_slice_params;1746 struct v4l2_ctrl_h264_slice_params __user *p_h264_slice_params;
1738 struct v4l2_ctrl_h264_decode_params __user *p_h264_decode_params;1747 struct v4l2_ctrl_h264_decode_params __user *p_h264_decode_params;
1739 struct v4l2_ctrl_fwht_params __user *p_fwht_params;1748 struct v4l2_ctrl_fwht_params __user *p_fwht_params;
1749 struct v4l2_ctrl_vp8_frame __user *p_vp8_frame;
1740 void __user *ptr;1750 void __user *ptr;
1741 };1751 };
1742} __attribute__ ((packed));1752} __attribute__ ((packed));
@@ -1784,6 +1794,9 @@ enum v4l2_ctrl_type { · 41 unmodified lines
1784 V4L2_CTRL_TYPE_U32 = 0x0102,1794 V4L2_CTRL_TYPE_U32 = 0x0102,
1785 V4L2_CTRL_TYPE_AREA = 0x0106,1795 V4L2_CTRL_TYPE_AREA = 0x0106,
1786 1796
1797 V4L2_CTRL_TYPE_HDR10_CLL_INFO = 0x0110,
1798 V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY = 0x0111,
1799
1787 V4L2_CTRL_TYPE_H264_SPS = 0x0200,1800 V4L2_CTRL_TYPE_H264_SPS = 0x0200,
1788 V4L2_CTRL_TYPE_H264_PPS = 0x0201,1801 V4L2_CTRL_TYPE_H264_PPS = 0x0201,
1789 V4L2_CTRL_TYPE_H264_SCALING_MATRIX = 0x0202,1802 V4L2_CTRL_TYPE_H264_SCALING_MATRIX = 0x0202,
@@ -1792,6 +1805,8 @@ enum v4l2_ctrl_type { · 2 unmodified lines
1792 V4L2_CTRL_TYPE_H264_PRED_WEIGHTS = 0x0205,1805 V4L2_CTRL_TYPE_H264_PRED_WEIGHTS = 0x0205,
1793 1806
1794 V4L2_CTRL_TYPE_FWHT_PARAMS = 0x0220,1807 V4L2_CTRL_TYPE_FWHT_PARAMS = 0x0220,
1808
1809 V4L2_CTRL_TYPE_VP8_FRAME = 0x0240,
1795};1810};
1796 1811
1797/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */1812/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
@@ -2229,6 +2244,7 @@ struct v4l2_mpeg_vbi_fmt_ivtv { · 431 unmodified lines
2229 * this plane will be used2244 * this plane will be used
2230 * @bytesperline: distance in bytes between the leftmost pixels in two2245 * @bytesperline: distance in bytes between the leftmost pixels in two
2231 * adjacent lines2246 * adjacent lines
2247 * @reserved: drivers and applications must zero this array
2232 */2248 */
2233struct v4l2_plane_pix_format {2249struct v4l2_plane_pix_format {
2234 __u32 sizeimage;2250 __u32 sizeimage;
@@ -2247,8 +2263,10 @@ struct v4l2_plane_pix_format { · 12 unmodified lines
2247 * @num_planes: number of planes for this format2263 * @num_planes: number of planes for this format
2248 * @flags: format flags (V4L2_PIX_FMT_FLAG_*)2264 * @flags: format flags (V4L2_PIX_FMT_FLAG_*)
2249 * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding2265 * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding
2266 * @hsv_enc: enum v4l2_hsv_encoding, HSV encoding
2250 * @quantization: enum v4l2_quantization, colorspace quantization2267 * @quantization: enum v4l2_quantization, colorspace quantization
2251 * @xfer_func: enum v4l2_xfer_func, colorspace transfer function2268 * @xfer_func: enum v4l2_xfer_func, colorspace transfer function
2269 * @reserved: drivers and applications must zero this array
2252 */2270 */
2253struct v4l2_pix_format_mplane {2271struct v4l2_pix_format_mplane {
2254 __u32 width;2272 __u32 width;
@@ -2273,6 +2291,7 @@ struct v4l2_pix_format_mplane { · 18 unmodified lines
2273 * struct v4l2_sdr_format - SDR format definition2291 * struct v4l2_sdr_format - SDR format definition
2274 * @pixelformat: little endian four character code (fourcc)2292 * @pixelformat: little endian four character code (fourcc)
2275 * @buffersize: maximum size in bytes required for data2293 * @buffersize: maximum size in bytes required for data
2294 * @reserved: drivers and applications must zero this array
2276 */2295 */
2277struct v4l2_sdr_format {2296struct v4l2_sdr_format {
2278 __u32 pixelformat;2297 __u32 pixelformat;
@@ -2299,6 +2318,8 @@ struct v4l2_meta_format { · 20 unmodified lines
2299 * @vbi: raw VBI capture or output parameters2318 * @vbi: raw VBI capture or output parameters
2300 * @sliced: sliced VBI capture or output parameters2319 * @sliced: sliced VBI capture or output parameters
2301 * @raw_data: placeholder for future extensions and custom formats2320 * @raw_data: placeholder for future extensions and custom formats
2321 * @fmt: union of @pix, @pix_mp, @win, @vbi, @sliced, @sdr, @meta
2322 * and @raw_data
2302 */2323 */
2303struct v4l2_format {2324struct v4l2_format {
2304 __u32 type;2325 __u32 type;
include/uapi/linux/virtio_bt.h+31−0
@@ -0,0 +1,31 @@
1/* SPDX-License-Identifier: BSD-3-Clause */
2
3#ifndef _UAPI_LINUX_VIRTIO_BT_H
4#define _UAPI_LINUX_VIRTIO_BT_H
5
6#include <linux/virtio_types.h>
7
8/* Feature bits */
9#define VIRTIO_BT_F_VND_HCI 0 /* Indicates vendor command support */
10#define VIRTIO_BT_F_MSFT_EXT 1 /* Indicates MSFT vendor support */
11#define VIRTIO_BT_F_AOSP_EXT 2 /* Indicates AOSP vendor support */
12
13enum virtio_bt_config_type {
14 VIRTIO_BT_CONFIG_TYPE_PRIMARY = 0,
15 VIRTIO_BT_CONFIG_TYPE_AMP = 1,
16};
17
18enum virtio_bt_config_vendor {
19 VIRTIO_BT_CONFIG_VENDOR_NONE = 0,
20 VIRTIO_BT_CONFIG_VENDOR_ZEPHYR = 1,
21 VIRTIO_BT_CONFIG_VENDOR_INTEL = 2,
22 VIRTIO_BT_CONFIG_VENDOR_REALTEK = 3,
23};
24
25struct virtio_bt_config {
26 __u8 type;
27 __u16 vendor;
28 __u16 msft_opcode;
29} __attribute__((packed));
30
31#endif /* _UAPI_LINUX_VIRTIO_BT_H */
include/uapi/linux/virtio_ids.h+2−0
@@ -51,8 +51,10 @@ · 50 unmodified lines
51#define VIRTIO_ID_PSTORE 22 /* virtio pstore device */51#define VIRTIO_ID_PSTORE 22 /* virtio pstore device */
52#define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */52#define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */
53#define VIRTIO_ID_MEM 24 /* virtio mem */53#define VIRTIO_ID_MEM 24 /* virtio mem */
54#define VIRTIO_ID_SOUND 25 /* virtio sound */
54#define VIRTIO_ID_FS 26 /* virtio filesystem */55#define VIRTIO_ID_FS 26 /* virtio filesystem */
55#define VIRTIO_ID_PMEM 27 /* virtio pmem */56#define VIRTIO_ID_PMEM 27 /* virtio pmem */
57#define VIRTIO_ID_BT 28 /* virtio bluetooth */
56#define VIRTIO_ID_MAC80211_HWSIM 29 /* virtio mac80211-hwsim */58#define VIRTIO_ID_MAC80211_HWSIM 29 /* virtio mac80211-hwsim */
57 59
58#endif /* _LINUX_VIRTIO_IDS_H */60#endif /* _LINUX_VIRTIO_IDS_H */
include/uapi/linux/virtio_snd.h+334−0
@@ -0,0 +1,334 @@
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright (C) 2021 OpenSynergy GmbH
4 */
5#ifndef VIRTIO_SND_IF_H
6#define VIRTIO_SND_IF_H
7
8#include <linux/virtio_types.h>
9
10/*******************************************************************************
11 * CONFIGURATION SPACE
12 */
13struct virtio_snd_config {
14 /* # of available physical jacks */
15 __le32 jacks;
16 /* # of available PCM streams */
17 __le32 streams;
18 /* # of available channel maps */
19 __le32 chmaps;
20};
21
22enum {
23 /* device virtqueue indexes */
24 VIRTIO_SND_VQ_CONTROL = 0,
25 VIRTIO_SND_VQ_EVENT,
26 VIRTIO_SND_VQ_TX,
27 VIRTIO_SND_VQ_RX,
28 /* # of device virtqueues */
29 VIRTIO_SND_VQ_MAX
30};
31
32/*******************************************************************************
33 * COMMON DEFINITIONS
34 */
35
36/* supported dataflow directions */
37enum {
38 VIRTIO_SND_D_OUTPUT = 0,
39 VIRTIO_SND_D_INPUT
40};
41
42enum {
43 /* jack control request types */
44 VIRTIO_SND_R_JACK_INFO = 1,
45 VIRTIO_SND_R_JACK_REMAP,
46
47 /* PCM control request types */
48 VIRTIO_SND_R_PCM_INFO = 0x0100,
49 VIRTIO_SND_R_PCM_SET_PARAMS,
50 VIRTIO_SND_R_PCM_PREPARE,
51 VIRTIO_SND_R_PCM_RELEASE,
52 VIRTIO_SND_R_PCM_START,
53 VIRTIO_SND_R_PCM_STOP,
54
55 /* channel map control request types */
56 VIRTIO_SND_R_CHMAP_INFO = 0x0200,
57
58 /* jack event types */
59 VIRTIO_SND_EVT_JACK_CONNECTED = 0x1000,
60 VIRTIO_SND_EVT_JACK_DISCONNECTED,
61
62 /* PCM event types */
63 VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED = 0x1100,
64 VIRTIO_SND_EVT_PCM_XRUN,
65
66 /* common status codes */
67 VIRTIO_SND_S_OK = 0x8000,
68 VIRTIO_SND_S_BAD_MSG,
69 VIRTIO_SND_S_NOT_SUPP,
70 VIRTIO_SND_S_IO_ERR
71};
72
73/* common header */
74struct virtio_snd_hdr {
75 __le32 code;
76};
77
78/* event notification */
79struct virtio_snd_event {
80 /* VIRTIO_SND_EVT_XXX */
81 struct virtio_snd_hdr hdr;
82 /* optional event data */
83 __le32 data;
84};
85
86/* common control request to query an item information */
87struct virtio_snd_query_info {
88 /* VIRTIO_SND_R_XXX_INFO */
89 struct virtio_snd_hdr hdr;
90 /* item start identifier */
91 __le32 start_id;
92 /* item count to query */
93 __le32 count;
94 /* item information size in bytes */
95 __le32 size;
96};
97
98/* common item information header */
99struct virtio_snd_info {
100 /* function group node id (High Definition Audio Specification 7.1.2) */
101 __le32 hda_fn_nid;
102};
103
104/*******************************************************************************
105 * JACK CONTROL MESSAGES
106 */
107struct virtio_snd_jack_hdr {
108 /* VIRTIO_SND_R_JACK_XXX */
109 struct virtio_snd_hdr hdr;
110 /* 0 ... virtio_snd_config::jacks - 1 */
111 __le32 jack_id;
112};
113
114/* supported jack features */
115enum {
116 VIRTIO_SND_JACK_F_REMAP = 0
117};
118
119struct virtio_snd_jack_info {
120 /* common header */
121 struct virtio_snd_info hdr;
122 /* supported feature bit map (1 << VIRTIO_SND_JACK_F_XXX) */
123 __le32 features;
124 /* pin configuration (High Definition Audio Specification 7.3.3.31) */
125 __le32 hda_reg_defconf;
126 /* pin capabilities (High Definition Audio Specification 7.3.4.9) */
127 __le32 hda_reg_caps;
128 /* current jack connection status (0: disconnected, 1: connected) */
129 __u8 connected;
130
131 __u8 padding[7];
132};
133
134/* jack remapping control request */
135struct virtio_snd_jack_remap {
136 /* .code = VIRTIO_SND_R_JACK_REMAP */
137 struct virtio_snd_jack_hdr hdr;
138 /* selected association number */
139 __le32 association;
140 /* selected sequence number */
141 __le32 sequence;
142};
143
144/*******************************************************************************
145 * PCM CONTROL MESSAGES
146 */
147struct virtio_snd_pcm_hdr {
148 /* VIRTIO_SND_R_PCM_XXX */
149 struct virtio_snd_hdr hdr;
150 /* 0 ... virtio_snd_config::streams - 1 */
151 __le32 stream_id;
152};
153
154/* supported PCM stream features */
155enum {
156 VIRTIO_SND_PCM_F_SHMEM_HOST = 0,
157 VIRTIO_SND_PCM_F_SHMEM_GUEST,
158 VIRTIO_SND_PCM_F_MSG_POLLING,
159 VIRTIO_SND_PCM_F_EVT_SHMEM_PERIODS,
160 VIRTIO_SND_PCM_F_EVT_XRUNS
161};
162
163/* supported PCM sample formats */
164enum {
165 /* analog formats (width / physical width) */
166 VIRTIO_SND_PCM_FMT_IMA_ADPCM = 0, /* 4 / 4 bits */
167 VIRTIO_SND_PCM_FMT_MU_LAW, /* 8 / 8 bits */
168 VIRTIO_SND_PCM_FMT_A_LAW, /* 8 / 8 bits */
169 VIRTIO_SND_PCM_FMT_S8, /* 8 / 8 bits */
170 VIRTIO_SND_PCM_FMT_U8, /* 8 / 8 bits */
171 VIRTIO_SND_PCM_FMT_S16, /* 16 / 16 bits */
172 VIRTIO_SND_PCM_FMT_U16, /* 16 / 16 bits */
173 VIRTIO_SND_PCM_FMT_S18_3, /* 18 / 24 bits */
174 VIRTIO_SND_PCM_FMT_U18_3, /* 18 / 24 bits */
175 VIRTIO_SND_PCM_FMT_S20_3, /* 20 / 24 bits */
176 VIRTIO_SND_PCM_FMT_U20_3, /* 20 / 24 bits */
177 VIRTIO_SND_PCM_FMT_S24_3, /* 24 / 24 bits */
178 VIRTIO_SND_PCM_FMT_U24_3, /* 24 / 24 bits */
179 VIRTIO_SND_PCM_FMT_S20, /* 20 / 32 bits */
180 VIRTIO_SND_PCM_FMT_U20, /* 20 / 32 bits */
181 VIRTIO_SND_PCM_FMT_S24, /* 24 / 32 bits */
182 VIRTIO_SND_PCM_FMT_U24, /* 24 / 32 bits */
183 VIRTIO_SND_PCM_FMT_S32, /* 32 / 32 bits */
184 VIRTIO_SND_PCM_FMT_U32, /* 32 / 32 bits */
185 VIRTIO_SND_PCM_FMT_FLOAT, /* 32 / 32 bits */
186 VIRTIO_SND_PCM_FMT_FLOAT64, /* 64 / 64 bits */
187 /* digital formats (width / physical width) */
188 VIRTIO_SND_PCM_FMT_DSD_U8, /* 8 / 8 bits */
189 VIRTIO_SND_PCM_FMT_DSD_U16, /* 16 / 16 bits */
190 VIRTIO_SND_PCM_FMT_DSD_U32, /* 32 / 32 bits */
191 VIRTIO_SND_PCM_FMT_IEC958_SUBFRAME /* 32 / 32 bits */
192};
193
194/* supported PCM frame rates */
195enum {
196 VIRTIO_SND_PCM_RATE_5512 = 0,
197 VIRTIO_SND_PCM_RATE_8000,
198 VIRTIO_SND_PCM_RATE_11025,
199 VIRTIO_SND_PCM_RATE_16000,
200 VIRTIO_SND_PCM_RATE_22050,
201 VIRTIO_SND_PCM_RATE_32000,
202 VIRTIO_SND_PCM_RATE_44100,
203 VIRTIO_SND_PCM_RATE_48000,
204 VIRTIO_SND_PCM_RATE_64000,
205 VIRTIO_SND_PCM_RATE_88200,
206 VIRTIO_SND_PCM_RATE_96000,
207 VIRTIO_SND_PCM_RATE_176400,
208 VIRTIO_SND_PCM_RATE_192000,
209 VIRTIO_SND_PCM_RATE_384000
210};
211
212struct virtio_snd_pcm_info {
213 /* common header */
214 struct virtio_snd_info hdr;
215 /* supported feature bit map (1 << VIRTIO_SND_PCM_F_XXX) */
216 __le32 features;
217 /* supported sample format bit map (1 << VIRTIO_SND_PCM_FMT_XXX) */
218 __le64 formats;
219 /* supported frame rate bit map (1 << VIRTIO_SND_PCM_RATE_XXX) */
220 __le64 rates;
221 /* dataflow direction (VIRTIO_SND_D_XXX) */
222 __u8 direction;
223 /* minimum # of supported channels */
224 __u8 channels_min;
225 /* maximum # of supported channels */
226 __u8 channels_max;
227
228 __u8 padding[5];
229};
230
231/* set PCM stream format */
232struct virtio_snd_pcm_set_params {
233 /* .code = VIRTIO_SND_R_PCM_SET_PARAMS */
234 struct virtio_snd_pcm_hdr hdr;
235 /* size of the hardware buffer */
236 __le32 buffer_bytes;
237 /* size of the hardware period */
238 __le32 period_bytes;
239 /* selected feature bit map (1 << VIRTIO_SND_PCM_F_XXX) */
240 __le32 features;
241 /* selected # of channels */
242 __u8 channels;
243 /* selected sample format (VIRTIO_SND_PCM_FMT_XXX) */
244 __u8 format;
245 /* selected frame rate (VIRTIO_SND_PCM_RATE_XXX) */
246 __u8 rate;
247
248 __u8 padding;
249};
250
251/*******************************************************************************
252 * PCM I/O MESSAGES
253 */
254
255/* I/O request header */
256struct virtio_snd_pcm_xfer {
257 /* 0 ... virtio_snd_config::streams - 1 */
258 __le32 stream_id;
259};
260
261/* I/O request status */
262struct virtio_snd_pcm_status {
263 /* VIRTIO_SND_S_XXX */
264 __le32 status;
265 /* current device latency */
266 __le32 latency_bytes;
267};
268
269/*******************************************************************************
270 * CHANNEL MAP CONTROL MESSAGES
271 */
272struct virtio_snd_chmap_hdr {
273 /* VIRTIO_SND_R_CHMAP_XXX */
274 struct virtio_snd_hdr hdr;
275 /* 0 ... virtio_snd_config::chmaps - 1 */
276 __le32 chmap_id;
277};
278
279/* standard channel position definition */
280enum {
281 VIRTIO_SND_CHMAP_NONE = 0, /* undefined */
282 VIRTIO_SND_CHMAP_NA, /* silent */
283 VIRTIO_SND_CHMAP_MONO, /* mono stream */
284 VIRTIO_SND_CHMAP_FL, /* front left */
285 VIRTIO_SND_CHMAP_FR, /* front right */
286 VIRTIO_SND_CHMAP_RL, /* rear left */
287 VIRTIO_SND_CHMAP_RR, /* rear right */
288 VIRTIO_SND_CHMAP_FC, /* front center */
289 VIRTIO_SND_CHMAP_LFE, /* low frequency (LFE) */
290 VIRTIO_SND_CHMAP_SL, /* side left */
291 VIRTIO_SND_CHMAP_SR, /* side right */
292 VIRTIO_SND_CHMAP_RC, /* rear center */
293 VIRTIO_SND_CHMAP_FLC, /* front left center */
294 VIRTIO_SND_CHMAP_FRC, /* front right center */
295 VIRTIO_SND_CHMAP_RLC, /* rear left center */
296 VIRTIO_SND_CHMAP_RRC, /* rear right center */
297 VIRTIO_SND_CHMAP_FLW, /* front left wide */
298 VIRTIO_SND_CHMAP_FRW, /* front right wide */
299 VIRTIO_SND_CHMAP_FLH, /* front left high */
300 VIRTIO_SND_CHMAP_FCH, /* front center high */
301 VIRTIO_SND_CHMAP_FRH, /* front right high */
302 VIRTIO_SND_CHMAP_TC, /* top center */
303 VIRTIO_SND_CHMAP_TFL, /* top front left */
304 VIRTIO_SND_CHMAP_TFR, /* top front right */
305 VIRTIO_SND_CHMAP_TFC, /* top front center */
306 VIRTIO_SND_CHMAP_TRL, /* top rear left */
307 VIRTIO_SND_CHMAP_TRR, /* top rear right */
308 VIRTIO_SND_CHMAP_TRC, /* top rear center */
309 VIRTIO_SND_CHMAP_TFLC, /* top front left center */
310 VIRTIO_SND_CHMAP_TFRC, /* top front right center */
311 VIRTIO_SND_CHMAP_TSL, /* top side left */
312 VIRTIO_SND_CHMAP_TSR, /* top side right */
313 VIRTIO_SND_CHMAP_LLFE, /* left LFE */
314 VIRTIO_SND_CHMAP_RLFE, /* right LFE */
315 VIRTIO_SND_CHMAP_BC, /* bottom center */
316 VIRTIO_SND_CHMAP_BLC, /* bottom left center */
317 VIRTIO_SND_CHMAP_BRC /* bottom right center */
318};
319
320/* maximum possible number of channels */
321#define VIRTIO_SND_CHMAP_MAX_SIZE 18
322
323struct virtio_snd_chmap_info {
324 /* common header */
325 struct virtio_snd_info hdr;
326 /* dataflow direction (VIRTIO_SND_D_XXX) */
327 __u8 direction;
328 /* # of valid channel position values */
329 __u8 channels;
330 /* channel position values (VIRTIO_SND_CHMAP_XXX) */
331 __u8 positions[VIRTIO_SND_CHMAP_MAX_SIZE];
332};
333
334#endif /* VIRTIO_SND_IF_H */
include/uapi/misc/habanalabs.h+57−20
@@ -297,6 +297,7 @@ enum hl_device_status { · 296 unmodified lines
297#define HL_INFO_SYNC_MANAGER 14297#define HL_INFO_SYNC_MANAGER 14
298#define HL_INFO_TOTAL_ENERGY 15298#define HL_INFO_TOTAL_ENERGY 15
299#define HL_INFO_PLL_FREQUENCY 16299#define HL_INFO_PLL_FREQUENCY 16
300#define HL_INFO_POWER 17
300 301
301#define HL_INFO_VERSION_MAX_LEN 128302#define HL_INFO_VERSION_MAX_LEN 128
302#define HL_INFO_CARD_NAME_MAX_LEN 16303#define HL_INFO_CARD_NAME_MAX_LEN 16
@@ -410,6 +411,14 @@ struct hl_pll_frequency_info { · 107 unmodified lines
410 __u16 output[HL_PLL_NUM_OUTPUTS];411 __u16 output[HL_PLL_NUM_OUTPUTS];
411};412};
412 413
414/**
415 * struct hl_power_info - power information
416 * @power: power consumption
417 */
418struct hl_power_info {
419 __u64 power;
420};
421
413/**422/**
414 * struct hl_info_sync_manager - sync manager information423 * struct hl_info_sync_manager - sync manager information
415 * @first_available_sync_object: first available sob424 * @first_available_sync_object: first available sob
@@ -621,6 +630,7 @@ struct hl_cs_chunk { · 205 unmodified lines
621#define HL_CS_FLAGS_STAGED_SUBMISSION 0x40630#define HL_CS_FLAGS_STAGED_SUBMISSION 0x40
622#define HL_CS_FLAGS_STAGED_SUBMISSION_FIRST 0x80631#define HL_CS_FLAGS_STAGED_SUBMISSION_FIRST 0x80
623#define HL_CS_FLAGS_STAGED_SUBMISSION_LAST 0x100632#define HL_CS_FLAGS_STAGED_SUBMISSION_LAST 0x100
633#define HL_CS_FLAGS_CUSTOM_TIMEOUT 0x200
624 634
625#define HL_CS_STATUS_SUCCESS 0635#define HL_CS_STATUS_SUCCESS 0
626 636
@@ -634,17 +644,10 @@ struct hl_cs_in { · 7 unmodified lines
634 /* holds address of array of hl_cs_chunk for execution phase */644 /* holds address of array of hl_cs_chunk for execution phase */
635 __u64 chunks_execute;645 __u64 chunks_execute;
636 646
637 union {647 /* Sequence number of a staged submission CS
638 /* this holds address of array of hl_cs_chunk for store phase -648 * valid only if HL_CS_FLAGS_STAGED_SUBMISSION is set
639 * Currently not in use649 */
640 */650 __u64 seq;
641 __u64 chunks_store;
642
643 /* Sequence number of a staged submission CS
644 * valid only if HL_CS_FLAGS_STAGED_SUBMISSION is set
645 */
646 __u64 seq;
647 };
648 651
649 /* Number of chunks in restore phase array. Maximum number is652 /* Number of chunks in restore phase array. Maximum number is
650 * HL_MAX_JOBS_PER_CS653 * HL_MAX_JOBS_PER_CS
@@ -656,8 +659,10 @@ struct hl_cs_in { · 5 unmodified lines
656 */659 */
657 __u32 num_chunks_execute;660 __u32 num_chunks_execute;
658 661
659 /* Number of chunks in restore phase array - Currently not in use */662 /* timeout in seconds - valid only if HL_CS_FLAGS_CUSTOM_TIMEOUT
660 __u32 num_chunks_store;663 * is set
664 */
665 __u32 timeout;
661 666
662 /* HL_CS_FLAGS_* */667 /* HL_CS_FLAGS_* */
663 __u32 cs_flags;668 __u32 cs_flags;
@@ -682,14 +687,46 @@ union hl_cs_args { · 18 unmodified lines
682 struct hl_cs_out out;687 struct hl_cs_out out;
683};688};
684 689
690#define HL_WAIT_CS_FLAGS_INTERRUPT 0x2
691#define HL_WAIT_CS_FLAGS_INTERRUPT_MASK 0xFFF00000
692
685struct hl_wait_cs_in {693struct hl_wait_cs_in {
686 /* Command submission sequence number */694 union {
687 __u64 seq;695 struct {
688 /* Absolute timeout to wait in microseconds */696 /* Command submission sequence number */
689 __u64 timeout_us;697 __u64 seq;
698 /* Absolute timeout to wait for command submission
699 * in microseconds
700 */
701 __u64 timeout_us;
702 };
703
704 struct {
705 /* User address for completion comparison.
706 * upon interrupt, driver will compare the value pointed
707 * by this address with the supplied target value.
708 * in order not to perform any comparison, set address
709 * to all 1s.
710 * Relevant only when HL_WAIT_CS_FLAGS_INTERRUPT is set
711 */
712 __u64 addr;
713 /* Target value for completion comparison */
714 __u32 target;
715 /* Absolute timeout to wait for interrupt
716 * in microseconds
717 */
718 __u32 interrupt_timeout_us;
719 };
720 };
721
690 /* Context ID - Currently not in use */722 /* Context ID - Currently not in use */
691 __u32 ctx_id;723 __u32 ctx_id;
692 __u32 pad;724 /* HL_WAIT_CS_FLAGS_*
725 * If HL_WAIT_CS_FLAGS_INTERRUPT is set, this field should include
726 * interrupt id according to HL_WAIT_CS_FLAGS_INTERRUPT_MASK, in order
727 * not to specify an interrupt id ,set mask to all 1s.
728 */
729 __u32 flags;
693};730};
694 731
695#define HL_WAIT_CS_STATUS_COMPLETED 0732#define HL_WAIT_CS_STATUS_COMPLETED 0
@@ -999,8 +1036,8 @@ struct hl_debug_args { · 303 unmodified lines
999 * Each JOB will be enqueued on a specific queue, according to the user's input.1036 * Each JOB will be enqueued on a specific queue, according to the user's input.
1000 * There can be more then one JOB per queue.1037 * There can be more then one JOB per queue.
1001 *1038 *
1002 * The CS IOCTL will receive three sets of JOBS. One set is for "restore" phase,1039 * The CS IOCTL will receive two sets of JOBS. One set is for "restore" phase
1003 * a second set is for "execution" phase and a third set is for "store" phase.1040 * and a second set is for "execution" phase.
1004 * The JOBS on the "restore" phase are enqueued only after context-switch1041 * The JOBS on the "restore" phase are enqueued only after context-switch
1005 * (or if its the first CS for this context). The user can also order the1042 * (or if its the first CS for this context). The user can also order the
1006 * driver to run the "restore" phase explicitly1043 * driver to run the "restore" phase explicitly
include/uapi/misc/uacce/hisi_qm.h+1−0
@@ -16,6 +16,7 @@ struct hisi_qp_ctx { · 15 unmodified lines
16 16
17#define HISI_QM_API_VER_BASE "hisi_qm_v1"17#define HISI_QM_API_VER_BASE "hisi_qm_v1"
18#define HISI_QM_API_VER2_BASE "hisi_qm_v2"18#define HISI_QM_API_VER2_BASE "hisi_qm_v2"
19#define HISI_QM_API_VER3_BASE "hisi_qm_v3"
19 20
20/* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */21/* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */
21#define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx)22#define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx)
include/uapi/mtd/mtd-abi.h+2−0
@@ -205,6 +205,8 @@ struct otp_info { · 204 unmodified lines
205 * without OOB, e.g., NOR flash.205 * without OOB, e.g., NOR flash.
206 */206 */
207#define MEMWRITE _IOWR('M', 24, struct mtd_write_req)207#define MEMWRITE _IOWR('M', 24, struct mtd_write_req)
208/* Erase a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
209#define OTPERASE _IOW('M', 25, struct otp_info)
208 210
209/*211/*
210 * Obsolete legacy interface. Keep it in order not to break userspace212 * Obsolete legacy interface. Keep it in order not to break userspace
include/uapi/rdma/hns-abi.h+2−0
@@ -86,6 +86,8 @@ struct hns_roce_ib_create_qp_resp { · 85 unmodified lines
86struct hns_roce_ib_alloc_ucontext_resp {86struct hns_roce_ib_alloc_ucontext_resp {
87 __u32 qp_tab_size;87 __u32 qp_tab_size;
88 __u32 cqe_size;88 __u32 cqe_size;
89 __u32 srq_tab_size;
90 __u32 reserved;
89};91};
90 92
91struct hns_roce_ib_alloc_pd_resp {93struct hns_roce_ib_alloc_pd_resp {
include/uapi/rdma/mlx5_user_ioctl_cmds.h+29−0
@@ -41,6 +41,25 @@ enum mlx5_ib_create_flow_action_attrs { · 40 unmodified lines
41 MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT),41 MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
42};42};
43 43
44enum mlx5_ib_dm_methods {
45 MLX5_IB_METHOD_DM_MAP_OP_ADDR = (1U << UVERBS_ID_NS_SHIFT),
46 MLX5_IB_METHOD_DM_QUERY,
47};
48
49enum mlx5_ib_dm_map_op_addr_attrs {
50 MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
51 MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_OP,
52 MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_START_OFFSET,
53 MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_PAGE_INDEX,
54};
55
56enum mlx5_ib_query_dm_attrs {
57 MLX5_IB_ATTR_QUERY_DM_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
58 MLX5_IB_ATTR_QUERY_DM_RESP_START_OFFSET,
59 MLX5_IB_ATTR_QUERY_DM_RESP_PAGE_INDEX,
60 MLX5_IB_ATTR_QUERY_DM_RESP_LENGTH,
61};
62
44enum mlx5_ib_alloc_dm_attrs {63enum mlx5_ib_alloc_dm_attrs {
45 MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT),64 MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT),
46 MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX,65 MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX,
@@ -154,6 +173,7 @@ enum mlx5_ib_devx_umem_reg_attrs { · 107 unmodified lines
154 MLX5_IB_ATTR_DEVX_UMEM_REG_LEN,173 MLX5_IB_ATTR_DEVX_UMEM_REG_LEN,
155 MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS,174 MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS,
156 MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID,175 MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID,
176 MLX5_IB_ATTR_DEVX_UMEM_REG_PGSZ_BITMAP,
157};177};
158 178
159enum mlx5_ib_devx_umem_dereg_attrs {179enum mlx5_ib_devx_umem_dereg_attrs {
@@ -300,4 +320,13 @@ enum mlx5_ib_pd_methods { · 140 unmodified lines
300 320
301};321};
302 322
323enum mlx5_ib_device_methods {
324 MLX5_IB_METHOD_QUERY_PORT = (1U << UVERBS_ID_NS_SHIFT),
325};
326
327enum mlx5_ib_query_port_attrs {
328 MLX5_IB_ATTR_QUERY_PORT_PORT_NUM = (1U << UVERBS_ID_NS_SHIFT),
329 MLX5_IB_ATTR_QUERY_PORT,
330};
331
303#endif332#endif
include/uapi/rdma/mlx5_user_ioctl_verbs.h+25−0
@@ -83,5 +83,30 @@ enum mlx5_ib_uapi_uar_alloc_type { · 82 unmodified lines
83 MLX5_IB_UAPI_UAR_ALLOC_TYPE_NC = 0x1,83 MLX5_IB_UAPI_UAR_ALLOC_TYPE_NC = 0x1,
84};84};
85 85
86enum mlx5_ib_uapi_query_port_flags {
87 MLX5_IB_UAPI_QUERY_PORT_VPORT = 1 << 0,
88 MLX5_IB_UAPI_QUERY_PORT_VPORT_VHCA_ID = 1 << 1,
89 MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_RX = 1 << 2,
90 MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_TX = 1 << 3,
91 MLX5_IB_UAPI_QUERY_PORT_VPORT_REG_C0 = 1 << 4,
92 MLX5_IB_UAPI_QUERY_PORT_ESW_OWNER_VHCA_ID = 1 << 5,
93};
94
95struct mlx5_ib_uapi_reg {
96 __u32 value;
97 __u32 mask;
98};
99
100struct mlx5_ib_uapi_query_port {
101 __aligned_u64 flags;
102 __u16 vport;
103 __u16 vport_vhca_id;
104 __u16 esw_owner_vhca_id;
105 __u16 rsvd0;
106 __aligned_u64 vport_steering_icm_rx;
107 __aligned_u64 vport_steering_icm_tx;
108 struct mlx5_ib_uapi_reg reg_c0;
109};
110
86#endif111#endif
87 112
include/uapi/rdma/rdma_netlink.h+16−0
@@ -293,6 +293,10 @@ enum rdma_nldev_command { · 292 unmodified lines
293 293
294 RDMA_NLDEV_CMD_RES_MR_GET_RAW,294 RDMA_NLDEV_CMD_RES_MR_GET_RAW,
295 295
296 RDMA_NLDEV_CMD_RES_CTX_GET, /* can dump */
297
298 RDMA_NLDEV_CMD_RES_SRQ_GET, /* can dump */
299
296 RDMA_NLDEV_NUM_OPS300 RDMA_NLDEV_NUM_OPS
297};301};
298 302
@@ -533,6 +537,18 @@ enum rdma_nldev_attr { · 234 unmodified lines
533 537
534 RDMA_NLDEV_ATTR_RES_RAW, /* binary */538 RDMA_NLDEV_ATTR_RES_RAW, /* binary */
535 539
540 RDMA_NLDEV_ATTR_RES_CTX, /* nested table */
541 RDMA_NLDEV_ATTR_RES_CTX_ENTRY, /* nested table */
542
543 RDMA_NLDEV_ATTR_RES_SRQ, /* nested table */
544 RDMA_NLDEV_ATTR_RES_SRQ_ENTRY, /* nested table */
545 RDMA_NLDEV_ATTR_RES_SRQN, /* u32 */
546
547 RDMA_NLDEV_ATTR_MIN_RANGE, /* u32 */
548 RDMA_NLDEV_ATTR_MAX_RANGE, /* u32 */
549
550 RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK, /* u8 */
551
536 /*552 /*
537 * Always the end553 * Always the end
538 */554 */