History

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

Backmerging 5.2-rc1 to -misc-next for robher

Sean Paul committed 7 years ago

Commit 374ed542 parents 270afb3 a18833910984 files · +473676 −302814Browse files

Showing the changes to include/uapi (67 of 10984 files). Show all

Unified · Split

67 files
  1. include/uapi/asm-generic/sockios.h +2 −2
  2. include/uapi/asm-generic/unistd.h +13 −1
  3. include/uapi/linux/aspeed-p2a-ctrl.h +62 −0
  4. include/uapi/linux/audit.h +14 −0
  5. include/uapi/linux/batadv_packet.h +0 −12
  6. include/uapi/linux/batman_adv.h +7 −18
  7. include/uapi/linux/bpf.h +323 −41
  8. include/uapi/linux/btf.h +28 −4
  9. include/uapi/linux/btrfs_tree.h +2 −0
  10. include/uapi/linux/elf-em.h +6 −0
  11. include/uapi/linux/ethtool.h +11 −0
  12. include/uapi/linux/fcntl.h +2 −0
  13. include/uapi/linux/fou.h +6 −0
  14. include/uapi/linux/fs.h +3 −0
  15. include/uapi/linux/fuse.h +20 −2
  16. include/uapi/linux/icmpv6.h +4 −0
  17. include/uapi/linux/if_ether.h +1 −0
  18. include/uapi/linux/if_tun.h +1 −0
  19. include/uapi/linux/if_vlan.h +5 −4
  20. include/uapi/linux/input-event-codes.h +5 −2
  21. include/uapi/linux/io_uring.h +5 −0
  22. include/uapi/linux/ip_vs.h +11 −0
  23. include/uapi/linux/kvm.h +13 −2
  24. include/uapi/linux/lirc.h +2 −0
  25. include/uapi/linux/media-bus-format.h +2 −1
  26. include/uapi/linux/media.h +15 −10
  27. include/uapi/linux/mei.h +3 −64
  28. include/uapi/linux/mount.h +62 −0
  29. include/uapi/linux/netfilter/nf_tables.h +9 −3
  30. include/uapi/linux/nfs_mount.h +0 −9
  31. include/uapi/linux/nfsd/cld.h +1 −0
  32. include/uapi/linux/nl80211.h +84 −2
  33. include/uapi/linux/openvswitch.h +46 −0
  34. include/uapi/linux/pci_regs.h +71 −67
  35. include/uapi/linux/pkt_sched.h +13 −0
  36. include/uapi/linux/psci.h +7 −0
  37. include/uapi/linux/psp-sev.h +14 −4
  38. include/uapi/linux/sched.h +1 −0
  39. include/uapi/linux/sed-opal.h +1 −10
  40. include/uapi/linux/serial_core.h +6 −0
  41. include/uapi/linux/sockios.h +21 −0
  42. include/uapi/linux/spi/spidev.h +5 −1
  43. include/uapi/linux/switchtec_ioctl.h +12 −1
  44. include/uapi/linux/tcp.h +27 −0
  45. include/uapi/linux/tipc.h +1 −0
  46. include/uapi/linux/tipc_netlink.h +2 −0
  47. include/uapi/linux/tls.h +15 −0
  48. include/uapi/linux/v4l2-controls.h +8 −0
  49. include/uapi/linux/vfio.h +4 −0
  50. include/uapi/linux/vfio_ccw.h +12 −0
  51. include/uapi/linux/videodev2.h +17 −0
  52. include/uapi/misc/habanalabs.h +149 −12
  53. include/uapi/rdma/efa-abi.h +101 −0
  54. include/uapi/rdma/mlx5-abi.h +3 −0
  55. include/uapi/rdma/mlx5_user_ioctl_cmds.h +2 −0
  56. include/uapi/rdma/mlx5_user_ioctl_verbs.h +7 −0
  57. include/uapi/rdma/rdma_netlink.h +19 −12
  58. include/uapi/rdma/rdma_user_ioctl_cmds.h +1 −0
  59. include/uapi/scsi/fc/fc_els.h +33 −0
  60. include/uapi/sound/sof/abi.h +62 −0
  61. include/uapi/sound/sof/eq.h +172 −0
  62. include/uapi/sound/sof/fw.h +78 −0
  63. include/uapi/sound/sof/header.h +27 −0
  64. include/uapi/sound/sof/manifest.h +188 −0
  65. include/uapi/sound/sof/tokens.h +107 −0
  66. include/uapi/sound/sof/tone.h +21 −0
  67. include/uapi/sound/sof/trace.h +66 −0
include/uapi/asm-generic/sockios.h+2−2
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 #define FIOGETOWN 0x8903
99 #define SIOCGPGRP 0x8904
1010 #define SIOCATMARK 0x8905
11−#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
12−#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
11+#define SIOCGSTAMP_OLD 0x8906 /* Get stamp (timeval) */
12+#define SIOCGSTAMPNS_OLD 0x8907 /* Get stamp (timespec) */
1313
1414 #endif /* __ASM_GENERIC_SOCKIOS_H */
include/uapi/asm-generic/unistd.h+13−1
@@ -832,9 +832,21 @@ __SYSCALL(__NR_io_uring_setup, sys_io_uring_setup) · 831 unmodified lines
832832 __SYSCALL(__NR_io_uring_enter, sys_io_uring_enter)
833833 #define __NR_io_uring_register 427
834834 __SYSCALL(__NR_io_uring_register, sys_io_uring_register)
835+#define __NR_open_tree 428
836+__SYSCALL(__NR_open_tree, sys_open_tree)
837+#define __NR_move_mount 429
838+__SYSCALL(__NR_move_mount, sys_move_mount)
839+#define __NR_fsopen 430
840+__SYSCALL(__NR_fsopen, sys_fsopen)
841+#define __NR_fsconfig 431
842+__SYSCALL(__NR_fsconfig, sys_fsconfig)
843+#define __NR_fsmount 432
844+__SYSCALL(__NR_fsmount, sys_fsmount)
845+#define __NR_fspick 433
846+__SYSCALL(__NR_fspick, sys_fspick)
835847
836848 #undef __NR_syscalls
837−#define __NR_syscalls 428
849+#define __NR_syscalls 434
838850
839851 /*
840852 * 32 bit systems traditionally used different
include/uapi/linux/aspeed-p2a-ctrl.h+62−0
@@ -0,0 +1,62 @@
1+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2+/*
3+ * Copyright 2019 Google Inc
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
7+ * as published by the Free Software Foundation; either version
8+ * 2 of the License, or (at your option) any later version.
9+ *
10+ * Provides a simple driver to control the ASPEED P2A interface which allows
11+ * the host to read and write to various regions of the BMC's memory.
12+ */
13+
14+#ifndef _UAPI_LINUX_ASPEED_P2A_CTRL_H
15+#define _UAPI_LINUX_ASPEED_P2A_CTRL_H
16+
17+#include <linux/ioctl.h>
18+#include <linux/types.h>
19+
20+#define ASPEED_P2A_CTRL_READ_ONLY 0
21+#define ASPEED_P2A_CTRL_READWRITE 1
22+
23+/*
24+ * This driver provides a mechanism for enabling or disabling the read-write
25+ * property of specific windows into the ASPEED BMC's memory.
26+ *
27+ * A user can map a region of the BMC's memory as read-only or read-write, with
28+ * the caveat that once any region is mapped, all regions are unlocked for
29+ * reading.
30+ */
31+
32+/*
33+ * Unlock a region of BMC physical memory for access from the host.
34+ *
35+ * Also used to read back the optional memory-region configuration for the
36+ * driver.
37+ */
38+struct aspeed_p2a_ctrl_mapping {
39+ __u64 addr;
40+ __u32 length;
41+ __u32 flags;
42+};
43+
44+#define __ASPEED_P2A_CTRL_IOCTL_MAGIC 0xb3
45+
46+/*
47+ * This IOCTL is meant to configure a region or regions of memory given a
48+ * starting address and length to be readable by the host, or
49+ * readable-writeable.
50+ */
51+#define ASPEED_P2A_CTRL_IOCTL_SET_WINDOW _IOW(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
52+ 0x00, struct aspeed_p2a_ctrl_mapping)
53+
54+/*
55+ * This IOCTL is meant to read back to the user the base address and length of
56+ * the memory-region specified to the driver for use with mmap.
57+ */
58+#define ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG \
59+ _IOWR(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
60+ 0x01, struct aspeed_p2a_ctrl_mapping)
61+
62+#endif /* _UAPI_LINUX_ASPEED_P2A_CTRL_H */
include/uapi/linux/audit.h+14−0
@@ -114,6 +114,8 @@ · 113 unmodified lines
114114 #define AUDIT_REPLACE 1329 /* Replace auditd if this packet unanswerd */
115115 #define AUDIT_KERN_MODULE 1330 /* Kernel Module events */
116116 #define AUDIT_FANOTIFY 1331 /* Fanotify access decision */
117+#define AUDIT_TIME_INJOFFSET 1332 /* Timekeeping offset injected */
118+#define AUDIT_TIME_ADJNTPVAL 1333 /* NTP value adjustment */
117119
118120 #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
119121 #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
@@ -375,11 +377,19 @@ enum { · 255 unmodified lines
375377
376378 #define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
377379 #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
380+#define AUDIT_ARCH_ARCOMPACT (EM_ARCOMPACT|__AUDIT_ARCH_LE)
381+#define AUDIT_ARCH_ARCOMPACTBE (EM_ARCOMPACT)
382+#define AUDIT_ARCH_ARCV2 (EM_ARCV2|__AUDIT_ARCH_LE)
383+#define AUDIT_ARCH_ARCV2BE (EM_ARCV2)
378384 #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
379385 #define AUDIT_ARCH_ARMEB (EM_ARM)
386+#define AUDIT_ARCH_C6X (EM_TI_C6000|__AUDIT_ARCH_LE)
387+#define AUDIT_ARCH_C6XBE (EM_TI_C6000)
380388 #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)
381389 #define AUDIT_ARCH_CSKY (EM_CSKY|__AUDIT_ARCH_LE)
382390 #define AUDIT_ARCH_FRV (EM_FRV)
391+#define AUDIT_ARCH_H8300 (EM_H8_300)
392+#define AUDIT_ARCH_HEXAGON (EM_HEXAGON)
383393 #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
384394 #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
385395 #define AUDIT_ARCH_M32R (EM_M32R)
@@ -393,6 +403,9 @@ enum { · 7 unmodified lines
393403 #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
394404 #define AUDIT_ARCH_MIPSEL64N32 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE|\
395405 __AUDIT_ARCH_CONVENTION_MIPS64_N32)
406+#define AUDIT_ARCH_NDS32 (EM_NDS32|__AUDIT_ARCH_LE)
407+#define AUDIT_ARCH_NDS32BE (EM_NDS32)
408+#define AUDIT_ARCH_NIOS2 (EM_ALTERA_NIOS2|__AUDIT_ARCH_LE)
396409 #define AUDIT_ARCH_OPENRISC (EM_OPENRISC)
397410 #define AUDIT_ARCH_PARISC (EM_PARISC)
398411 #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT)
@@ -413,6 +426,7 @@ enum { · 14 unmodified lines
413426 #define AUDIT_ARCH_TILEGX (EM_TILEGX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
414427 #define AUDIT_ARCH_TILEGX32 (EM_TILEGX|__AUDIT_ARCH_LE)
415428 #define AUDIT_ARCH_TILEPRO (EM_TILEPRO|__AUDIT_ARCH_LE)
429+#define AUDIT_ARCH_UNICORE (EM_UNICORE|__AUDIT_ARCH_LE)
416430 #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
417431 #define AUDIT_ARCH_XTENSA (EM_XTENSA)
418432
include/uapi/linux/batadv_packet.h+0−12
@@ -2,18 +2,6 @@ · 1 unmodified line
22 /* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors:
33 *
44 * Marek Lindner, Simon Wunderlich
5− *
6− * This program is free software; you can redistribute it and/or
7− * modify it under the terms of version 2 of the GNU General Public
8− * License as published by the Free Software Foundation.
9− *
10− * This program is distributed in the hope that it will be useful, but
11− * WITHOUT ANY WARRANTY; without even the implied warranty of
12− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13− * 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, see <http://www.gnu.org/licenses/>.
175 */
186
197 #ifndef _UAPI_LINUX_BATADV_PACKET_H_
include/uapi/linux/batman_adv.h+7−18
@@ -2,24 +2,6 @@ · 1 unmodified line
22 /* Copyright (C) 2016-2019 B.A.T.M.A.N. contributors:
33 *
44 * Matthias Schiffer
5− *
6− * Permission is hereby granted, free of charge, to any person obtaining a
7− * copy of this software and associated documentation files (the "Software"),
8− * to deal in the Software without restriction, including without limitation
9− * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10− * and/or sell copies of the Software, and to permit persons to whom the
11− * Software is furnished to do so, subject to the following conditions:
12− *
13− * The above copyright notice and this permission notice shall be included in
14− * all copies or substantial portions of the Software.
15− *
16− * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17− * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18− * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19− * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20− * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21− * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22− * DEALINGS IN THE SOFTWARE.
235 */
246
257 #ifndef _UAPI_LINUX_BATMAN_ADV_H_
@@ -491,6 +473,13 @@ enum batadv_nl_attrs { · 465 unmodified lines
491473 */
492474 BATADV_ATTR_THROUGHPUT_OVERRIDE,
493475
476+ /**
477+ * @BATADV_ATTR_MULTICAST_FANOUT: defines the maximum number of packet
478+ * copies that may be generated for a multicast-to-unicast conversion.
479+ * Once this limit is exceeded distribution will fall back to broadcast.
480+ */
481+ BATADV_ATTR_MULTICAST_FANOUT,
482+
494483 /* add attributes above here, update the policy in netlink.c */
495484
496485 /**
include/uapi/linux/bpf.h+323−41
@@ -105,6 +105,7 @@ enum bpf_cmd { · 104 unmodified lines
105105 BPF_BTF_GET_FD_BY_ID,
106106 BPF_TASK_FD_QUERY,
107107 BPF_MAP_LOOKUP_AND_DELETE_ELEM,
108+ BPF_MAP_FREEZE,
108109 };
109110
110111 enum bpf_map_type {
@@ -132,6 +133,7 @@ enum bpf_map_type { · 21 unmodified lines
132133 BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,
133134 BPF_MAP_TYPE_QUEUE,
134135 BPF_MAP_TYPE_STACK,
136+ BPF_MAP_TYPE_SK_STORAGE,
135137 };
136138
137139 /* Note that tracing related programs such as
@@ -166,6 +168,8 @@ enum bpf_prog_type { · 28 unmodified lines
166168 BPF_PROG_TYPE_LIRC_MODE2,
167169 BPF_PROG_TYPE_SK_REUSEPORT,
168170 BPF_PROG_TYPE_FLOW_DISSECTOR,
171+ BPF_PROG_TYPE_CGROUP_SYSCTL,
172+ BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
169173 };
170174
171175 enum bpf_attach_type {
@@ -187,6 +191,7 @@ enum bpf_attach_type { · 15 unmodified lines
187191 BPF_CGROUP_UDP6_SENDMSG,
188192 BPF_LIRC_MODE2,
189193 BPF_FLOW_DISSECTOR,
194+ BPF_CGROUP_SYSCTL,
190195 __MAX_BPF_ATTACH_TYPE
191196 };
192197
@@ -255,8 +260,19 @@ enum bpf_attach_type { · 62 unmodified lines
255260 */
256261 #define BPF_F_ANY_ALIGNMENT (1U << 1)
257262
258−/* when bpf_ldimm64->src_reg == BPF_PSEUDO_MAP_FD, bpf_ldimm64->imm == fd */
263+/* When BPF ldimm64's insn[0].src_reg != 0 then this can have
264+ * two extensions:
265+ *
266+ * insn[0].src_reg: BPF_PSEUDO_MAP_FD BPF_PSEUDO_MAP_VALUE
267+ * insn[0].imm: map fd map fd
268+ * insn[1].imm: 0 offset into value
269+ * insn[0].off: 0 0
270+ * insn[1].off: 0 0
271+ * ldimm64 rewrite: address of map address of map[0]+offset
272+ * verifier type: CONST_PTR_TO_MAP PTR_TO_MAP_VALUE
273+ */
259274 #define BPF_PSEUDO_MAP_FD 1
275+#define BPF_PSEUDO_MAP_VALUE 2
260276
261277 /* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
262278 * offset to another bpf function
@@ -283,7 +299,7 @@ enum bpf_attach_type { · 20 unmodified lines
283299
284300 #define BPF_OBJ_NAME_LEN 16U
285301
286−/* Flags for accessing BPF object */
302+/* Flags for accessing BPF object from syscall side. */
287303 #define BPF_F_RDONLY (1U << 3)
288304 #define BPF_F_WRONLY (1U << 4)
289305
@@ -293,6 +309,10 @@ enum bpf_attach_type { · 3 unmodified lines
293309 /* Zero-initialize hash function seed. This should only be used for testing. */
294310 #define BPF_F_ZERO_SEED (1U << 6)
295311
312+/* Flags for accessing BPF object from program side. */
313+#define BPF_F_RDONLY_PROG (1U << 7)
314+#define BPF_F_WRONLY_PROG (1U << 8)
315+
296316 /* flags for BPF_PROG_QUERY */
297317 #define BPF_F_QUERY_EFFECTIVE (1U << 0)
298318
@@ -396,6 +416,13 @@ union bpf_attr { · 97 unmodified lines
396416 __aligned_u64 data_out;
397417 __u32 repeat;
398418 __u32 duration;
419+ __u32 ctx_size_in; /* input: len of ctx_in */
420+ __u32 ctx_size_out; /* input/output: len of ctx_out
421+ * returns ENOSPC if ctx_out
422+ * is too small.
423+ */
424+ __aligned_u64 ctx_in;
425+ __aligned_u64 ctx_out;
399426 } test;
400427
401428 struct { /* anonymous struct used by BPF_*_GET_*_ID */
@@ -602,7 +629,7 @@ union bpf_attr { · 200 unmodified lines
602629 * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\
603630 * **->swhash** and *skb*\ **->l4hash** to 0).
604631 *
605− * A call to this helper is susceptible to change the underlaying
632+ * A call to this helper is susceptible to change the underlying
606633 * packet buffer. Therefore, at load time, all checks on pointers
607634 * previously done by the verifier are invalidated and must be
608635 * performed again, if the helper is used in combination with
@@ -627,7 +654,7 @@ union bpf_attr { · 18 unmodified lines
627654 * flexibility and can handle sizes larger than 2 or 4 for the
628655 * checksum to update.
629656 *
630− * A call to this helper is susceptible to change the underlaying
657+ * A call to this helper is susceptible to change the underlying
631658 * packet buffer. Therefore, at load time, all checks on pointers
632659 * previously done by the verifier are invalidated and must be
633660 * performed again, if the helper is used in combination with
@@ -659,7 +686,7 @@ union bpf_attr { · 25 unmodified lines
659686 * flexibility and can handle sizes larger than 2 or 4 for the
660687 * checksum to update.
661688 *
662− * A call to this helper is susceptible to change the underlaying
689+ * A call to this helper is susceptible to change the underlying
663690 * packet buffer. Therefore, at load time, all checks on pointers
664691 * previously done by the verifier are invalidated and must be
665692 * performed again, if the helper is used in combination with
@@ -714,7 +741,7 @@ union bpf_attr { · 48 unmodified lines
714741 * efficient, but it is handled through an action code where the
715742 * redirection happens only after the eBPF program has returned.
716743 *
717− * A call to this helper is susceptible to change the underlaying
744+ * A call to this helper is susceptible to change the underlying
718745 * packet buffer. Therefore, at load time, all checks on pointers
719746 * previously done by the verifier are invalidated and must be
720747 * performed again, if the helper is used in combination with
@@ -779,7 +806,7 @@ union bpf_attr { · 58 unmodified lines
779806 * **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to
780807 * be **ETH_P_8021Q**.
781808 *
782− * A call to this helper is susceptible to change the underlaying
809+ * A call to this helper is susceptible to change the underlying
783810 * packet buffer. Therefore, at load time, all checks on pointers
784811 * previously done by the verifier are invalidated and must be
785812 * performed again, if the helper is used in combination with
@@ -791,7 +818,7 @@ union bpf_attr { · 5 unmodified lines
791818 * Description
792819 * Pop a VLAN header from the packet associated to *skb*.
793820 *
794− * A call to this helper is susceptible to change the underlaying
821+ * A call to this helper is susceptible to change the underlying
795822 * packet buffer. Therefore, at load time, all checks on pointers
796823 * previously done by the verifier are invalidated and must be
797824 * performed again, if the helper is used in combination with
@@ -1141,7 +1168,7 @@ union bpf_attr { · 343 unmodified lines
11411168 * All values for *flags* are reserved for future usage, and must
11421169 * be left at zero.
11431170 *
1144− * A call to this helper is susceptible to change the underlaying
1171+ * A call to this helper is susceptible to change the underlying
11451172 * packet buffer. Therefore, at load time, all checks on pointers
11461173 * previously done by the verifier are invalidated and must be
11471174 * performed again, if the helper is used in combination with
@@ -1254,7 +1281,7 @@ union bpf_attr { · 106 unmodified lines
12541281 * implicitly linearizes, unclones and drops offloads from the
12551282 * *skb*.
12561283 *
1257− * A call to this helper is susceptible to change the underlaying
1284+ * A call to this helper is susceptible to change the underlying
12581285 * packet buffer. Therefore, at load time, all checks on pointers
12591286 * previously done by the verifier are invalidated and must be
12601287 * performed again, if the helper is used in combination with
@@ -1290,7 +1317,7 @@ union bpf_attr { · 29 unmodified lines
12901317 * **bpf_skb_pull_data()** to effectively unclone the *skb* from
12911318 * the very beginning in case it is indeed cloned.
12921319 *
1293− * A call to this helper is susceptible to change the underlaying
1320+ * A call to this helper is susceptible to change the underlying
12941321 * packet buffer. Therefore, at load time, all checks on pointers
12951322 * previously done by the verifier are invalidated and must be
12961323 * performed again, if the helper is used in combination with
@@ -1342,7 +1369,7 @@ union bpf_attr { · 45 unmodified lines
13421369 * All values for *flags* are reserved for future usage, and must
13431370 * be left at zero.
13441371 *
1345− * A call to this helper is susceptible to change the underlaying
1372+ * A call to this helper is susceptible to change the underlying
13461373 * packet buffer. Therefore, at load time, all checks on pointers
13471374 * previously done by the verifier are invalidated and must be
13481375 * performed again, if the helper is used in combination with
@@ -1357,7 +1384,7 @@ union bpf_attr { · 8 unmodified lines
13571384 * can be used to prepare the packet for pushing or popping
13581385 * headers.
13591386 *
1360− * A call to this helper is susceptible to change the underlaying
1387+ * A call to this helper is susceptible to change the underlying
13611388 * packet buffer. Therefore, at load time, all checks on pointers
13621389 * previously done by the verifier are invalidated and must be
13631390 * performed again, if the helper is used in combination with
@@ -1478,15 +1505,33 @@ union bpf_attr { · 114 unmodified lines
14781505 * Grow or shrink the room for data in the packet associated to
14791506 * *skb* by *len_diff*, and according to the selected *mode*.
14801507 *
1481− * There is a single supported mode at this time:
1508+ * There are two supported modes at this time:
1509+ *
1510+ * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer
1511+ * (room space is added or removed below the layer 2 header).
14821512 *
14831513 * * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer
14841514 * (room space is added or removed below the layer 3 header).
14851515 *
1486− * All values for *flags* are reserved for future usage, and must
1487− * be left at zero.
1516+ * The following flags are supported at this time:
1517+ *
1518+ * * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size.
1519+ * Adjusting mss in this way is not allowed for datagrams.
1520+ *
1521+ * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4**,
1522+ * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6**:
1523+ * Any new space is reserved to hold a tunnel header.
1524+ * Configure skb offsets and other fields accordingly.
1525+ *
1526+ * * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE**,
1527+ * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP**:
1528+ * Use with ENCAP_L3 flags to further specify the tunnel type.
1529+ *
1530+ * * **BPF_F_ADJ_ROOM_ENCAP_L2**\ (*len*):
1531+ * Use with ENCAP_L3/L4 flags to further specify the tunnel
1532+ * type; *len* is the length of the inner MAC header.
14881533 *
1489− * A call to this helper is susceptible to change the underlaying
1534+ * A call to this helper is susceptible to change the underlying
14901535 * packet buffer. Therefore, at load time, all checks on pointers
14911536 * previously done by the verifier are invalidated and must be
14921537 * performed again, if the helper is used in combination with
@@ -1565,7 +1610,7 @@ union bpf_attr { · 72 unmodified lines
15651610 * more flexibility as the user is free to store whatever meta
15661611 * data they need.
15671612 *
1568− * A call to this helper is susceptible to change the underlaying
1613+ * A call to this helper is susceptible to change the underlying
15691614 * packet buffer. Therefore, at load time, all checks on pointers
15701615 * previously done by the verifier are invalidated and must be
15711616 * performed again, if the helper is used in combination with
@@ -1694,12 +1739,19 @@ union bpf_attr { · 122 unmodified lines
16941739 * error if an eBPF program tries to set a callback that is not
16951740 * supported in the current kernel.
16961741 *
1697− * The supported callback values that *argval* can combine are:
1742+ * *argval* is a flag array which can combine these flags:
16981743 *
16991744 * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out)
17001745 * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission)
17011746 * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change)
17021747 *
1748+ * Therefore, this function can be used to clear a callback flag by
1749+ * setting the appropriate bit to zero. e.g. to disable the RTO
1750+ * callback:
1751+ *
1752+ * **bpf_sock_ops_cb_flags_set(bpf_sock,**
1753+ * **bpf_sock->bpf_sock_ops_cb_flags & ~BPF_SOCK_OPS_RTO_CB_FLAG)**
1754+ *
17031755 * Here are some examples of where one could call such eBPF
17041756 * program:
17051757 *
@@ -1800,7 +1852,7 @@ union bpf_attr { · 94 unmodified lines
18001852 * copied if necessary (i.e. if data was not linear and if start
18011853 * and end pointers do not point to the same chunk).
18021854 *
1803− * A call to this helper is susceptible to change the underlaying
1855+ * A call to this helper is susceptible to change the underlying
18041856 * packet buffer. Therefore, at load time, all checks on pointers
18051857 * previously done by the verifier are invalidated and must be
18061858 * performed again, if the helper is used in combination with
@@ -1834,7 +1886,7 @@ union bpf_attr { · 27 unmodified lines
18341886 * only possible to shrink the packet as of this writing,
18351887 * therefore *delta* must be a negative integer.
18361888 *
1837− * A call to this helper is susceptible to change the underlaying
1889+ * A call to this helper is susceptible to change the underlying
18381890 * packet buffer. Therefore, at load time, all checks on pointers
18391891 * previously done by the verifier are invalidated and must be
18401892 * performed again, if the helper is used in combination with
@@ -2009,18 +2061,18 @@ union bpf_attr { · 168 unmodified lines
20092061 * **BPF_LWT_ENCAP_IP**
20102062 * IP encapsulation (GRE/GUE/IPIP/etc). The outer header
20112063 * must be IPv4 or IPv6, followed by zero or more
2012− * additional headers, up to LWT_BPF_MAX_HEADROOM total
2013− * bytes in all prepended headers. Please note that
2014− * if skb_is_gso(skb) is true, no more than two headers
2015− * can be prepended, and the inner header, if present,
2016− * should be either GRE or UDP/GUE.
2017− *
2018− * BPF_LWT_ENCAP_SEG6*** types can be called by bpf programs of
2019− * type BPF_PROG_TYPE_LWT_IN; BPF_LWT_ENCAP_IP type can be called
2020− * by bpf programs of types BPF_PROG_TYPE_LWT_IN and
2021− * BPF_PROG_TYPE_LWT_XMIT.
2022− *
2023− * A call to this helper is susceptible to change the underlaying
2064+ * additional headers, up to **LWT_BPF_MAX_HEADROOM**
2065+ * total bytes in all prepended headers. Please note that
2066+ * if **skb_is_gso**\ (*skb*) is true, no more than two
2067+ * headers can be prepended, and the inner header, if
2068+ * present, should be either GRE or UDP/GUE.
2069+ *
2070+ * **BPF_LWT_ENCAP_SEG6**\ \* types can be called by BPF programs
2071+ * of type **BPF_PROG_TYPE_LWT_IN**; **BPF_LWT_ENCAP_IP** type can
2072+ * be called by bpf programs of types **BPF_PROG_TYPE_LWT_IN** and
2073+ * **BPF_PROG_TYPE_LWT_XMIT**.
2074+ *
2075+ * A call to this helper is susceptible to change the underlying
20242076 * packet buffer. Therefore, at load time, all checks on pointers
20252077 * previously done by the verifier are invalidated and must be
20262078 * performed again, if the helper is used in combination with
@@ -2035,7 +2087,7 @@ union bpf_attr { · 8 unmodified lines
20352087 * inside the outermost IPv6 Segment Routing Header can be
20362088 * modified through this helper.
20372089 *
2038− * A call to this helper is susceptible to change the underlaying
2090+ * A call to this helper is susceptible to change the underlying
20392091 * packet buffer. Therefore, at load time, all checks on pointers
20402092 * previously done by the verifier are invalidated and must be
20412093 * performed again, if the helper is used in combination with
@@ -2051,7 +2103,7 @@ union bpf_attr { · 9 unmodified lines
20512103 * after the segments are accepted. *delta* can be as well
20522104 * positive (growing) as negative (shrinking).
20532105 *
2054− * A call to this helper is susceptible to change the underlaying
2106+ * A call to this helper is susceptible to change the underlying
20552107 * packet buffer. Therefore, at load time, all checks on pointers
20562108 * previously done by the verifier are invalidated and must be
20572109 * performed again, if the helper is used in combination with
@@ -2074,13 +2126,13 @@ union bpf_attr { · 16 unmodified lines
20742126 * Type of *param*: **int**.
20752127 * **SEG6_LOCAL_ACTION_END_B6**
20762128 * End.B6 action: Endpoint bound to an SRv6 policy.
2077− * Type of param: **struct ipv6_sr_hdr**.
2129+ * Type of *param*: **struct ipv6_sr_hdr**.
20782130 * **SEG6_LOCAL_ACTION_END_B6_ENCAP**
20792131 * End.B6.Encap action: Endpoint bound to an SRv6
20802132 * encapsulation policy.
2081− * Type of param: **struct ipv6_sr_hdr**.
2133+ * Type of *param*: **struct ipv6_sr_hdr**.
20822134 *
2083− * A call to this helper is susceptible to change the underlaying
2135+ * A call to this helper is susceptible to change the underlying
20842136 * packet buffer. Therefore, at load time, all checks on pointers
20852137 * previously done by the verifier are invalidated and must be
20862138 * performed again, if the helper is used in combination with
@@ -2233,7 +2285,8 @@ union bpf_attr { · 146 unmodified lines
22332285 * Return
22342286 * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
22352287 * For sockets with reuseport option, the **struct bpf_sock**
2236− * result is from **reuse->socks**\ [] using the hash of the tuple.
2288+ * result is from *reuse*\ **->socks**\ [] using the hash of the
2289+ * tuple.
22372290 *
22382291 * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
22392292 * Description
@@ -2269,7 +2322,8 @@ union bpf_attr { · 29 unmodified lines
22692322 * Return
22702323 * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
22712324 * For sockets with reuseport option, the **struct bpf_sock**
2272− * result is from **reuse->socks**\ [] using the hash of the tuple.
2325+ * result is from *reuse*\ **->socks**\ [] using the hash of the
2326+ * tuple.
22732327 *
22742328 * int bpf_sk_release(struct bpf_sock *sock)
22752329 * Description
@@ -2431,6 +2485,193 @@ union bpf_attr { · 155 unmodified lines
24312485 * Return
24322486 * A **struct bpf_sock** pointer on success, or **NULL** in
24332487 * case of failure.
2488+ *
2489+ * struct bpf_sock *bpf_skc_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2490+ * Description
2491+ * Look for TCP socket matching *tuple*, optionally in a child
2492+ * network namespace *netns*. The return value must be checked,
2493+ * and if non-**NULL**, released via **bpf_sk_release**\ ().
2494+ *
2495+ * This function is identical to **bpf_sk_lookup_tcp**\ (), except
2496+ * that it also returns timewait or request sockets. Use
2497+ * **bpf_sk_fullsock**\ () or **bpf_tcp_sock**\ () to access the
2498+ * full structure.
2499+ *
2500+ * This helper is available only if the kernel was compiled with
2501+ * **CONFIG_NET** configuration option.
2502+ * Return
2503+ * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
2504+ * For sockets with reuseport option, the **struct bpf_sock**
2505+ * result is from *reuse*\ **->socks**\ [] using the hash of the
2506+ * tuple.
2507+ *
2508+ * int bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
2509+ * Description
2510+ * Check whether *iph* and *th* contain a valid SYN cookie ACK for
2511+ * the listening socket in *sk*.
2512+ *
2513+ * *iph* points to the start of the IPv4 or IPv6 header, while
2514+ * *iph_len* contains **sizeof**\ (**struct iphdr**) or
2515+ * **sizeof**\ (**struct ip6hdr**).
2516+ *
2517+ * *th* points to the start of the TCP header, while *th_len*
2518+ * contains **sizeof**\ (**struct tcphdr**).
2519+ *
2520+ * Return
2521+ * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative
2522+ * error otherwise.
2523+ *
2524+ * int bpf_sysctl_get_name(struct bpf_sysctl *ctx, char *buf, size_t buf_len, u64 flags)
2525+ * Description
2526+ * Get name of sysctl in /proc/sys/ and copy it into provided by
2527+ * program buffer *buf* of size *buf_len*.
2528+ *
2529+ * The buffer is always NUL terminated, unless it's zero-sized.
2530+ *
2531+ * If *flags* is zero, full name (e.g. "net/ipv4/tcp_mem") is
2532+ * copied. Use **BPF_F_SYSCTL_BASE_NAME** flag to copy base name
2533+ * only (e.g. "tcp_mem").
2534+ * Return
2535+ * Number of character copied (not including the trailing NUL).
2536+ *
2537+ * **-E2BIG** if the buffer wasn't big enough (*buf* will contain
2538+ * truncated name in this case).
2539+ *
2540+ * int bpf_sysctl_get_current_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)
2541+ * Description
2542+ * Get current value of sysctl as it is presented in /proc/sys
2543+ * (incl. newline, etc), and copy it as a string into provided
2544+ * by program buffer *buf* of size *buf_len*.
2545+ *
2546+ * The whole value is copied, no matter what file position user
2547+ * space issued e.g. sys_read at.
2548+ *
2549+ * The buffer is always NUL terminated, unless it's zero-sized.
2550+ * Return
2551+ * Number of character copied (not including the trailing NUL).
2552+ *
2553+ * **-E2BIG** if the buffer wasn't big enough (*buf* will contain
2554+ * truncated name in this case).
2555+ *
2556+ * **-EINVAL** if current value was unavailable, e.g. because
2557+ * sysctl is uninitialized and read returns -EIO for it.
2558+ *
2559+ * int bpf_sysctl_get_new_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)
2560+ * Description
2561+ * Get new value being written by user space to sysctl (before
2562+ * the actual write happens) and copy it as a string into
2563+ * provided by program buffer *buf* of size *buf_len*.
2564+ *
2565+ * User space may write new value at file position > 0.
2566+ *
2567+ * The buffer is always NUL terminated, unless it's zero-sized.
2568+ * Return
2569+ * Number of character copied (not including the trailing NUL).
2570+ *
2571+ * **-E2BIG** if the buffer wasn't big enough (*buf* will contain
2572+ * truncated name in this case).
2573+ *
2574+ * **-EINVAL** if sysctl is being read.
2575+ *
2576+ * int bpf_sysctl_set_new_value(struct bpf_sysctl *ctx, const char *buf, size_t buf_len)
2577+ * Description
2578+ * Override new value being written by user space to sysctl with
2579+ * value provided by program in buffer *buf* of size *buf_len*.
2580+ *
2581+ * *buf* should contain a string in same form as provided by user
2582+ * space on sysctl write.
2583+ *
2584+ * User space may write new value at file position > 0. To override
2585+ * the whole sysctl value file position should be set to zero.
2586+ * Return
2587+ * 0 on success.
2588+ *
2589+ * **-E2BIG** if the *buf_len* is too big.
2590+ *
2591+ * **-EINVAL** if sysctl is being read.
2592+ *
2593+ * int bpf_strtol(const char *buf, size_t buf_len, u64 flags, long *res)
2594+ * Description
2595+ * Convert the initial part of the string from buffer *buf* of
2596+ * size *buf_len* to a long integer according to the given base
2597+ * and save the result in *res*.
2598+ *
2599+ * The string may begin with an arbitrary amount of white space
2600+ * (as determined by **isspace**\ (3)) followed by a single
2601+ * optional '**-**' sign.
2602+ *
2603+ * Five least significant bits of *flags* encode base, other bits
2604+ * are currently unused.
2605+ *
2606+ * Base must be either 8, 10, 16 or 0 to detect it automatically
2607+ * similar to user space **strtol**\ (3).
2608+ * Return
2609+ * Number of characters consumed on success. Must be positive but
2610+ * no more than *buf_len*.
2611+ *
2612+ * **-EINVAL** if no valid digits were found or unsupported base
2613+ * was provided.
2614+ *
2615+ * **-ERANGE** if resulting value was out of range.
2616+ *
2617+ * int bpf_strtoul(const char *buf, size_t buf_len, u64 flags, unsigned long *res)
2618+ * Description
2619+ * Convert the initial part of the string from buffer *buf* of
2620+ * size *buf_len* to an unsigned long integer according to the
2621+ * given base and save the result in *res*.
2622+ *
2623+ * The string may begin with an arbitrary amount of white space
2624+ * (as determined by **isspace**\ (3)).
2625+ *
2626+ * Five least significant bits of *flags* encode base, other bits
2627+ * are currently unused.
2628+ *
2629+ * Base must be either 8, 10, 16 or 0 to detect it automatically
2630+ * similar to user space **strtoul**\ (3).
2631+ * Return
2632+ * Number of characters consumed on success. Must be positive but
2633+ * no more than *buf_len*.
2634+ *
2635+ * **-EINVAL** if no valid digits were found or unsupported base
2636+ * was provided.
2637+ *
2638+ * **-ERANGE** if resulting value was out of range.
2639+ *
2640+ * void *bpf_sk_storage_get(struct bpf_map *map, struct bpf_sock *sk, void *value, u64 flags)
2641+ * Description
2642+ * Get a bpf-local-storage from a *sk*.
2643+ *
2644+ * Logically, it could be thought of getting the value from
2645+ * a *map* with *sk* as the **key**. From this
2646+ * perspective, the usage is not much different from
2647+ * **bpf_map_lookup_elem**\ (*map*, **&**\ *sk*) except this
2648+ * helper enforces the key must be a full socket and the map must
2649+ * be a **BPF_MAP_TYPE_SK_STORAGE** also.
2650+ *
2651+ * Underneath, the value is stored locally at *sk* instead of
2652+ * the *map*. The *map* is used as the bpf-local-storage
2653+ * "type". The bpf-local-storage "type" (i.e. the *map*) is
2654+ * searched against all bpf-local-storages residing at *sk*.
2655+ *
2656+ * An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be
2657+ * used such that a new bpf-local-storage will be
2658+ * created if one does not exist. *value* can be used
2659+ * together with **BPF_SK_STORAGE_GET_F_CREATE** to specify
2660+ * the initial value of a bpf-local-storage. If *value* is
2661+ * **NULL**, the new bpf-local-storage will be zero initialized.
2662+ * Return
2663+ * A bpf-local-storage pointer is returned on success.
2664+ *
2665+ * **NULL** if not found or there was an error in adding
2666+ * a new bpf-local-storage.
2667+ *
2668+ * int bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk)
2669+ * Description
2670+ * Delete a bpf-local-storage from a *sk*.
2671+ * Return
2672+ * 0 on success.
2673+ *
2674+ * **-ENOENT** if the bpf-local-storage cannot be found.
24342675 */
24352676 #define __BPF_FUNC_MAPPER(FN) \
24362677 FN(unspec), \
@@ -2531,7 +2772,17 @@ union bpf_attr { · 94 unmodified lines
25312772 FN(sk_fullsock), \
25322773 FN(tcp_sock), \
25332774 FN(skb_ecn_set_ce), \
2534− FN(get_listener_sock),
2775+ FN(get_listener_sock), \
2776+ FN(skc_lookup_tcp), \
2777+ FN(tcp_check_syncookie), \
2778+ FN(sysctl_get_name), \
2779+ FN(sysctl_get_current_value), \
2780+ FN(sysctl_get_new_value), \
2781+ FN(sysctl_set_new_value), \
2782+ FN(strtol), \
2783+ FN(strtoul), \
2784+ FN(sk_storage_get), \
2785+ FN(sk_storage_delete),
25352786
25362787 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
25372788 * function eBPF program intends to call
@@ -2590,9 +2841,30 @@ enum bpf_func_id { · 52 unmodified lines
25902841 /* Current network namespace */
25912842 #define BPF_F_CURRENT_NETNS (-1L)
25922843
2844+/* BPF_FUNC_skb_adjust_room flags. */
2845+#define BPF_F_ADJ_ROOM_FIXED_GSO (1ULL << 0)
2846+
2847+#define BPF_ADJ_ROOM_ENCAP_L2_MASK 0xff
2848+#define BPF_ADJ_ROOM_ENCAP_L2_SHIFT 56
2849+
2850+#define BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 (1ULL << 1)
2851+#define BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 (1ULL << 2)
2852+#define BPF_F_ADJ_ROOM_ENCAP_L4_GRE (1ULL << 3)
2853+#define BPF_F_ADJ_ROOM_ENCAP_L4_UDP (1ULL << 4)
2854+#define BPF_F_ADJ_ROOM_ENCAP_L2(len) (((__u64)len & \
2855+ BPF_ADJ_ROOM_ENCAP_L2_MASK) \
2856+ << BPF_ADJ_ROOM_ENCAP_L2_SHIFT)
2857+
2858+/* BPF_FUNC_sysctl_get_name flags. */
2859+#define BPF_F_SYSCTL_BASE_NAME (1ULL << 0)
2860+
2861+/* BPF_FUNC_sk_storage_get flags */
2862+#define BPF_SK_STORAGE_GET_F_CREATE (1ULL << 0)
2863+
25932864 /* Mode for BPF_FUNC_skb_adjust_room helper. */
25942865 enum bpf_adj_room_mode {
25952866 BPF_ADJ_ROOM_NET,
2867+ BPF_ADJ_ROOM_MAC,
25962868 };
25972869
25982870 /* Mode for BPF_FUNC_skb_load_bytes_relative helper. */
@@ -3218,4 +3490,14 @@ struct bpf_line_info { · 619 unmodified lines
32183490 struct bpf_spin_lock {
32193491 __u32 val;
32203492 };
3493+
3494+struct bpf_sysctl {
3495+ __u32 write; /* Sysctl is being read (= 0) or written (= 1).
3496+ * Allows 1,2,4-byte read, but no write.
3497+ */
3498+ __u32 file_pos; /* Sysctl file position to read from, write to.
3499+ * Allows 1,2,4-byte read an 4-byte write.
3500+ */
3501+};
3502+
32213503 #endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/btf.h+28−4
@@ -39,11 +39,11 @@ struct btf_type { · 38 unmodified lines
3939 * struct, union and fwd
4040 */
4141 __u32 info;
42− /* "size" is used by INT, ENUM, STRUCT and UNION.
42+ /* "size" is used by INT, ENUM, STRUCT, UNION and DATASEC.
4343 * "size" tells the size of the type it is describing.
4444 *
4545 * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
46− * FUNC and FUNC_PROTO.
46+ * FUNC, FUNC_PROTO and VAR.
4747 * "type" is a type_id referring to another type.
4848 */
4949 union {
@@ -70,8 +70,10 @@ struct btf_type { · 20 unmodified lines
7070 #define BTF_KIND_RESTRICT 11 /* Restrict */
7171 #define BTF_KIND_FUNC 12 /* Function */
7272 #define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
73−#define BTF_KIND_MAX 13
74−#define NR_BTF_KINDS 14
73+#define BTF_KIND_VAR 14 /* Variable */
74+#define BTF_KIND_DATASEC 15 /* Section */
75+#define BTF_KIND_MAX BTF_KIND_DATASEC
76+#define NR_BTF_KINDS (BTF_KIND_MAX + 1)
7577
7678 /* For some specific BTF_KIND, "struct btf_type" is immediately
7779 * followed by extra data.
@@ -138,4 +140,26 @@ struct btf_param { · 60 unmodified lines
138140 __u32 type;
139141 };
140142
143+enum {
144+ BTF_VAR_STATIC = 0,
145+ BTF_VAR_GLOBAL_ALLOCATED,
146+};
147+
148+/* BTF_KIND_VAR is followed by a single "struct btf_var" to describe
149+ * additional information related to the variable such as its linkage.
150+ */
151+struct btf_var {
152+ __u32 linkage;
153+};
154+
155+/* BTF_KIND_DATASEC is followed by multiple "struct btf_var_secinfo"
156+ * to describe all BTF_KIND_VAR types it contains along with it's
157+ * in-section offset as well as size.
158+ */
159+struct btf_var_secinfo {
160+ __u32 type;
161+ __u32 offset;
162+ __u32 size;
163+};
164+
141165 #endif /* _UAPI__LINUX_BTF_H__ */
include/uapi/linux/btrfs_tree.h+2−0
@@ -307,6 +307,8 @@ · 306 unmodified lines
307307 *
308308 * Used by:
309309 * struct btrfs_dir_item.type
310+ *
311+ * Values 0..7 must match common file type values in fs_types.h.
310312 */
311313 #define BTRFS_FT_UNKNOWN 0
312314 #define BTRFS_FT_REG_FILE 1
include/uapi/linux/elf-em.h+6−0
@@ -34,14 +34,20 @@ · 33 unmodified lines
3434 #define EM_M32R 88 /* Renesas M32R */
3535 #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */
3636 #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
37+#define EM_ARCOMPACT 93 /* ARCompact processor */
3738 #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
3839 #define EM_BLACKFIN 106 /* ADI Blackfin Processor */
40+#define EM_UNICORE 110 /* UniCore-32 */
3941 #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
4042 #define EM_TI_C6000 140 /* TI C6X DSPs */
43+#define EM_HEXAGON 164 /* QUALCOMM Hexagon */
44+#define EM_NDS32 167 /* Andes Technology compact code size
45+ embedded RISC processor family */
4146 #define EM_AARCH64 183 /* ARM 64 bit */
4247 #define EM_TILEPRO 188 /* Tilera TILEPro */
4348 #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
4449 #define EM_TILEGX 191 /* Tilera TILE-Gx */
50+#define EM_ARCV2 195 /* ARCv2 Cores */
4551 #define EM_RISCV 243 /* RISC-V */
4652 #define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */
4753 #define EM_CSKY 252 /* C-SKY */
include/uapi/linux/ethtool.h+11−0
@@ -252,9 +252,17 @@ struct ethtool_tunable { · 251 unmodified lines
252252 #define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff
253253 #define DOWNSHIFT_DEV_DISABLE 0
254254
255+/* Time in msecs after which link is reported as down
256+ * 0 = lowest time supported by the PHY
257+ * 0xff = off, link down detection according to standard
258+ */
259+#define ETHTOOL_PHY_FAST_LINK_DOWN_ON 0
260+#define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff
261+
255262 enum phy_tunable_id {
256263 ETHTOOL_PHY_ID_UNSPEC,
257264 ETHTOOL_PHY_DOWNSHIFT,
265+ ETHTOOL_PHY_FAST_LINK_DOWN,
258266 /*
259267 * Add your fresh new phy tunable attribute above and remember to update
260268 * phy_tunable_strings[] in net/core/ethtool.c
@@ -1704,6 +1712,9 @@ static inline int ethtool_validate_duplex(__u8 duplex) · 1443 unmodified lines
17041712 #define ETH_MODULE_SFF_8436 0x4
17051713 #define ETH_MODULE_SFF_8436_LEN 256
17061714
1715+#define ETH_MODULE_SFF_8636_MAX_LEN 640
1716+#define ETH_MODULE_SFF_8436_MAX_LEN 640
1717+
17071718 /* Reset flags */
17081719 /* The reset() operation must clear the flags for the components which
17091720 * were actually reset. On successful return, the flags indicate the
include/uapi/linux/fcntl.h+2−0
@@ -91,5 +91,7 @@ · 90 unmodified lines
9191 #define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */
9292 #define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */
9393
94+#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */
95+
9496
9597 #endif /* _UAPI_LINUX_FCNTL_H */
include/uapi/linux/fou.h+6−0
@@ -16,6 +16,12 @@ enum { · 15 unmodified lines
1616 FOU_ATTR_IPPROTO, /* u8 */
1717 FOU_ATTR_TYPE, /* u8 */
1818 FOU_ATTR_REMCSUM_NOPARTIAL, /* flag */
19+ FOU_ATTR_LOCAL_V4, /* u32 */
20+ FOU_ATTR_LOCAL_V6, /* in6_addr */
21+ FOU_ATTR_PEER_V4, /* u32 */
22+ FOU_ATTR_PEER_V6, /* in6_addr */
23+ FOU_ATTR_PEER_PORT, /* u16 */
24+ FOU_ATTR_IFINDEX, /* s32 */
1925
2026 __FOU_ATTR_MAX,
2127 };
include/uapi/linux/fs.h+3−0
@@ -320,6 +320,9 @@ struct fscrypt_key { · 319 unmodified lines
320320 #define SYNC_FILE_RANGE_WAIT_BEFORE 1
321321 #define SYNC_FILE_RANGE_WRITE 2
322322 #define SYNC_FILE_RANGE_WAIT_AFTER 4
323+#define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE | \
324+ SYNC_FILE_RANGE_WAIT_BEFORE | \
325+ SYNC_FILE_RANGE_WAIT_AFTER)
323326
324327 /*
325328 * Flags for preadv2/pwritev2:
include/uapi/linux/fuse.h+20−2
@@ -44,6 +44,7 @@ · 43 unmodified lines
4444 * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in
4545 * - add blksize field to fuse_attr
4646 * - add file flags field to fuse_read_in and fuse_write_in
47+ * - Add ATIME_NOW and MTIME_NOW flags to fuse_setattr_in
4748 *
4849 * 7.10
4950 * - add nonseekable open flag
@@ -54,7 +55,7 @@ · 4 unmodified lines
5455 * - add POLL message and NOTIFY_POLL notification
5556 *
5657 * 7.12
57− * - add umask flag to input argument of open, mknod and mkdir
58+ * - add umask flag to input argument of create, mknod and mkdir
5859 * - add notification messages for invalidation of inodes and
5960 * directory entries
6061 *
@@ -125,6 +126,10 @@ · 64 unmodified lines
125126 *
126127 * 7.29
127128 * - add FUSE_NO_OPENDIR_SUPPORT flag
129+ *
130+ * 7.30
131+ * - add FUSE_EXPLICIT_INVAL_DATA
132+ * - add FUSE_IOCTL_COMPAT_X32
128133 */
129134
130135 #ifndef _LINUX_FUSE_H
@@ -160,7 +165,7 @@ · 29 unmodified lines
160165 #define FUSE_KERNEL_VERSION 7
161166
162167 /** Minor version number of this interface */
163−#define FUSE_KERNEL_MINOR_VERSION 29
168+#define FUSE_KERNEL_MINOR_VERSION 30
164169
165170 /** The node ID of the root inode */
166171 #define FUSE_ROOT_ID 1
@@ -229,11 +234,13 @@ struct fuse_file_lock { · 62 unmodified lines
229234 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open
230235 * FOPEN_NONSEEKABLE: the file is not seekable
231236 * FOPEN_CACHE_DIR: allow caching this directory
237+ * FOPEN_STREAM: the file is stream-like (no file position at all)
232238 */
233239 #define FOPEN_DIRECT_IO (1 << 0)
234240 #define FOPEN_KEEP_CACHE (1 << 1)
235241 #define FOPEN_NONSEEKABLE (1 << 2)
236242 #define FOPEN_CACHE_DIR (1 << 3)
243+#define FOPEN_STREAM (1 << 4)
237244
238245 /**
239246 * INIT request/reply flags
@@ -263,6 +270,7 @@ struct fuse_file_lock { · 23 unmodified lines
263270 * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages
264271 * FUSE_CACHE_SYMLINKS: cache READLINK responses
265272 * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
273+ * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
266274 */
267275 #define FUSE_ASYNC_READ (1 << 0)
268276 #define FUSE_POSIX_LOCKS (1 << 1)
@@ -289,6 +297,7 @@ struct fuse_file_lock { · 20 unmodified lines
289297 #define FUSE_MAX_PAGES (1 << 22)
290298 #define FUSE_CACHE_SYMLINKS (1 << 23)
291299 #define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
300+#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
292301
293302 /**
294303 * CUSE INIT request/reply flags
@@ -335,6 +344,7 @@ struct fuse_file_lock { · 40 unmodified lines
335344 * FUSE_IOCTL_RETRY: retry with new iovecs
336345 * FUSE_IOCTL_32BIT: 32bit ioctl
337346 * FUSE_IOCTL_DIR: is a directory
347+ * FUSE_IOCTL_COMPAT_X32: x32 compat ioctl on 64bit machine (64bit time_t)
338348 *
339349 * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs
340350 */
@@ -343,6 +353,7 @@ struct fuse_file_lock { · 2 unmodified lines
343353 #define FUSE_IOCTL_RETRY (1 << 2)
344354 #define FUSE_IOCTL_32BIT (1 << 3)
345355 #define FUSE_IOCTL_DIR (1 << 4)
356+#define FUSE_IOCTL_COMPAT_X32 (1 << 5)
346357
347358 #define FUSE_IOCTL_MAX_IOV 256
348359
@@ -353,6 +364,13 @@ struct fuse_file_lock { · 4 unmodified lines
353364 */
354365 #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
355366
367+/**
368+ * Fsync flags
369+ *
370+ * FUSE_FSYNC_FDATASYNC: Sync data only, not metadata
371+ */
372+#define FUSE_FSYNC_FDATASYNC (1 << 0)
373+
356374 enum fuse_opcode {
357375 FUSE_LOOKUP = 1,
358376 FUSE_FORGET = 2, /* no reply */
include/uapi/linux/icmpv6.h+4−0
@@ -90,6 +90,8 @@ struct icmp6hdr { · 89 unmodified lines
9090 #define ICMPV6_TIME_EXCEED 3
9191 #define ICMPV6_PARAMPROB 4
9292
93+#define ICMPV6_ERRMSG_MAX 127
94+
9395 #define ICMPV6_INFOMSG_MASK 0x80
9496
9597 #define ICMPV6_ECHO_REQUEST 128
@@ -110,6 +112,8 @@ struct icmp6hdr { · 14 unmodified lines
110112
111113 #define ICMPV6_MRDISC_ADV 151
112114
115+#define ICMPV6_MSG_MAX 255
116+
113117 /*
114118 * Codes for Destination Unreachable
115119 */
include/uapi/linux/if_ether.h+1−0
@@ -109,6 +109,7 @@ · 108 unmodified lines
109109 #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
110110 #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
111111 #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
112+#define ETH_P_DSA_8021Q 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
112113 #define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */
113114 #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
114115
include/uapi/linux/if_tun.h+1−0
@@ -60,6 +60,7 @@ · 59 unmodified lines
6060 #define TUNSETSTEERINGEBPF _IOR('T', 224, int)
6161 #define TUNSETFILTEREBPF _IOR('T', 225, int)
6262 #define TUNSETCARRIER _IOW('T', 226, int)
63+#define TUNGETDEVNETNS _IO('T', 227)
6364
6465 /* TUNSETIFF ifr flags */
6566 #define IFF_TUN 0x0001
include/uapi/linux/if_vlan.h+5−4
@@ -32,10 +32,11 @@ enum vlan_ioctl_cmds { · 31 unmodified lines
3232 };
3333
3434 enum vlan_flags {
35− VLAN_FLAG_REORDER_HDR = 0x1,
36− VLAN_FLAG_GVRP = 0x2,
37− VLAN_FLAG_LOOSE_BINDING = 0x4,
38− VLAN_FLAG_MVRP = 0x8,
35+ VLAN_FLAG_REORDER_HDR = 0x1,
36+ VLAN_FLAG_GVRP = 0x2,
37+ VLAN_FLAG_LOOSE_BINDING = 0x4,
38+ VLAN_FLAG_MVRP = 0x8,
39+ VLAN_FLAG_BRIDGE_BINDING = 0x10,
3940 };
4041
4142 enum vlan_name_types {
include/uapi/linux/input-event-codes.h+5−2
@@ -439,10 +439,12 @@ · 438 unmodified lines
439439 #define KEY_TITLE 0x171
440440 #define KEY_SUBTITLE 0x172
441441 #define KEY_ANGLE 0x173
442−#define KEY_ZOOM 0x174
442+#define KEY_FULL_SCREEN 0x174 /* AC View Toggle */
443+#define KEY_ZOOM KEY_FULL_SCREEN
443444 #define KEY_MODE 0x175
444445 #define KEY_KEYBOARD 0x176
445−#define KEY_SCREEN 0x177
446+#define KEY_ASPECT_RATIO 0x177 /* HUTRR37: Aspect */
447+#define KEY_SCREEN KEY_ASPECT_RATIO
446448 #define KEY_PC 0x178 /* Media Select Computer */
447449 #define KEY_TV 0x179 /* Media Select TV */
448450 #define KEY_TV2 0x17a /* Media Select Cable */
@@ -604,6 +606,7 @@ · 155 unmodified lines
604606 #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */
605607 #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */
606608 #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */
609+#define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */
607610
608611 #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
609612 #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
include/uapi/linux/io_uring.h+5−0
@@ -26,6 +26,7 @@ struct io_uring_sqe { · 25 unmodified lines
2626 __kernel_rwf_t rw_flags;
2727 __u32 fsync_flags;
2828 __u16 poll_events;
29+ __u32 sync_range_flags;
2930 };
3031 __u64 user_data; /* data to be passed back at completion time */
3132 union {
@@ -38,6 +39,7 @@ struct io_uring_sqe { · 6 unmodified lines
3839 * sqe->flags
3940 */
4041 #define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */
42+#define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */
4143
4244 /*
4345 * io_uring_setup() flags
@@ -54,6 +56,7 @@ struct io_uring_sqe { · 10 unmodified lines
5456 #define IORING_OP_WRITE_FIXED 5
5557 #define IORING_OP_POLL_ADD 6
5658 #define IORING_OP_POLL_REMOVE 7
59+#define IORING_OP_SYNC_FILE_RANGE 8
5760
5861 /*
5962 * sqe->fsync_flags
@@ -133,5 +136,7 @@ struct io_uring_params { · 73 unmodified lines
133136 #define IORING_UNREGISTER_BUFFERS 1
134137 #define IORING_REGISTER_FILES 2
135138 #define IORING_UNREGISTER_FILES 3
139+#define IORING_REGISTER_EVENTFD 4
140+#define IORING_UNREGISTER_EVENTFD 5
136141
137142 #endif
include/uapi/linux/ip_vs.h+11−0
@@ -124,6 +124,13 @@ · 123 unmodified lines
124124
125125 #define IP_VS_PEDATA_MAXLEN 255
126126
127+/* Tunnel types */
128+enum {
129+ IP_VS_CONN_F_TUNNEL_TYPE_IPIP = 0, /* IPIP */
130+ IP_VS_CONN_F_TUNNEL_TYPE_GUE, /* GUE */
131+ IP_VS_CONN_F_TUNNEL_TYPE_MAX,
132+};
133+
127134 /*
128135 * The struct ip_vs_service_user and struct ip_vs_dest_user are
129136 * used to set IPVS rules through setsockopt.
@@ -392,6 +399,10 @@ enum { · 262 unmodified lines
392399
393400 IPVS_DEST_ATTR_STATS64, /* nested attribute for dest stats */
394401
402+ IPVS_DEST_ATTR_TUN_TYPE, /* tunnel type */
403+
404+ IPVS_DEST_ATTR_TUN_PORT, /* tunnel port */
405+
395406 __IPVS_DEST_ATTR_MAX,
396407 };
397408
include/uapi/linux/kvm.h+13−2
@@ -986,8 +986,13 @@ struct kvm_ppc_resize_hpt { · 985 unmodified lines
986986 #define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163
987987 #define KVM_CAP_EXCEPTION_PAYLOAD 164
988988 #define KVM_CAP_ARM_VM_IPA_SIZE 165
989−#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166
989+#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 /* Obsolete */
990990 #define KVM_CAP_HYPERV_CPUID 167
991+#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 168
992+#define KVM_CAP_PPC_IRQ_XIVE 169
993+#define KVM_CAP_ARM_SVE 170
994+#define KVM_CAP_ARM_PTRAUTH_ADDRESS 171
995+#define KVM_CAP_ARM_PTRAUTH_GENERIC 172
991996
992997 #ifdef KVM_CAP_IRQ_ROUTING
993998
@@ -1145,6 +1150,7 @@ struct kvm_dirty_tlb { · 151 unmodified lines
11451150 #define KVM_REG_SIZE_U256 0x0050000000000000ULL
11461151 #define KVM_REG_SIZE_U512 0x0060000000000000ULL
11471152 #define KVM_REG_SIZE_U1024 0x0070000000000000ULL
1153+#define KVM_REG_SIZE_U2048 0x0080000000000000ULL
11481154
11491155 struct kvm_reg_list {
11501156 __u64 n; /* number of regs */
@@ -1211,6 +1217,8 @@ enum kvm_device_type { · 60 unmodified lines
12111217 #define KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_V3
12121218 KVM_DEV_TYPE_ARM_VGIC_ITS,
12131219 #define KVM_DEV_TYPE_ARM_VGIC_ITS KVM_DEV_TYPE_ARM_VGIC_ITS
1220+ KVM_DEV_TYPE_XIVE,
1221+#define KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_XIVE
12141222 KVM_DEV_TYPE_MAX,
12151223 };
12161224
@@ -1434,12 +1442,15 @@ struct kvm_enc_region { · 217 unmodified lines
14341442 #define KVM_GET_NESTED_STATE _IOWR(KVMIO, 0xbe, struct kvm_nested_state)
14351443 #define KVM_SET_NESTED_STATE _IOW(KVMIO, 0xbf, struct kvm_nested_state)
14361444
1437−/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT */
1445+/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */
14381446 #define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log)
14391447
14401448 /* Available with KVM_CAP_HYPERV_CPUID */
14411449 #define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2)
14421450
1451+/* Available with KVM_CAP_ARM_SVE */
1452+#define KVM_ARM_VCPU_FINALIZE _IOW(KVMIO, 0xc2, int)
1453+
14431454 /* Secure Encrypted Virtualization command */
14441455 enum sev_cmd_id {
14451456 /* Guest initialization commands */
include/uapi/linux/lirc.h+2−0
@@ -195,6 +195,7 @@ struct lirc_scancode { · 194 unmodified lines
195195 * @RC_PROTO_RCMM12: RC-MM protocol 12 bits
196196 * @RC_PROTO_RCMM24: RC-MM protocol 24 bits
197197 * @RC_PROTO_RCMM32: RC-MM protocol 32 bits
198+ * @RC_PROTO_XBOX_DVD: Xbox DVD Movie Playback Kit protocol
198199 */
199200 enum rc_proto {
200201 RC_PROTO_UNKNOWN = 0,
@@ -224,6 +225,7 @@ enum rc_proto { · 23 unmodified lines
224225 RC_PROTO_RCMM12 = 24,
225226 RC_PROTO_RCMM24 = 25,
226227 RC_PROTO_RCMM32 = 26,
228+ RC_PROTO_XBOX_DVD = 27,
227229 };
228230
229231 #endif
include/uapi/linux/media-bus-format.h+2−1
@@ -34,7 +34,7 @@ · 33 unmodified lines
3434
3535 #define MEDIA_BUS_FMT_FIXED 0x0001
3636
37−/* RGB - next is 0x101b */
37+/* RGB - next is 0x101c */
3838 #define MEDIA_BUS_FMT_RGB444_1X12 0x1016
3939 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
4040 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
@@ -50,6 +50,7 @@ · 9 unmodified lines
5050 #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
5151 #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
5252 #define MEDIA_BUS_FMT_BGR888_1X24 0x1013
53+#define MEDIA_BUS_FMT_BGR888_3X8 0x101b
5354 #define MEDIA_BUS_FMT_GBR888_1X24 0x1014
5455 #define MEDIA_BUS_FMT_RGB888_1X24 0x100a
5556 #define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b
include/uapi/linux/media.h+15−10
@@ -262,6 +262,11 @@ struct media_links_enum { · 261 unmodified lines
262262 #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)
263263 #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5)
264264
265+#define MEDIA_INTF_T_ALSA_BASE 0x00000300
266+#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE)
267+#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1)
268+#define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2)
269+
265270 #if defined(__KERNEL__)
266271
267272 /*
@@ -413,19 +418,19 @@ struct media_v2_topology { · 145 unmodified lines
413418 #define MEDIA_ENT_F_DTV_DECODER MEDIA_ENT_F_DV_DECODER
414419
415420 /*
416− * There is still no ALSA support in the media controller. These
421+ * There is still no full ALSA support in the media controller. These
417422 * defines should not have been added and we leave them here only
418423 * in case some application tries to use these defines.
424+ *
425+ * The ALSA defines that are in use have been moved into __KERNEL__
426+ * scope. As support gets added to these interface types, they should
427+ * be moved into __KERNEL__ scope with the code that uses them.
419428 */
420−#define MEDIA_INTF_T_ALSA_BASE 0x00000300
421−#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE)
422−#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1)
423−#define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2)
424−#define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3)
425−#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)
426−#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)
427−#define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6)
428−#define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7)
429+#define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3)
430+#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)
431+#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)
432+#define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6)
433+#define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7)
429434
430435 /* Obsolete symbol for media_version, no longer used in the kernel */
431436 #define MEDIA_API_VERSION ((0 << 16) | (1 << 8) | 0)
include/uapi/linux/mei.h+3−64
@@ -1,70 +1,9 @@
11 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2−/******************************************************************************
2+/*
3+ * Copyright(c) 2003-2015 Intel Corporation. All rights reserved.
34 * Intel Management Engine Interface (Intel MEI) Linux driver
45 * Intel MEI Interface Header
5− *
6− * This file is provided under a dual BSD/GPLv2 license. When using or
7− * redistributing this file, you may do so under either license.
8− *
9− * GPL LICENSE SUMMARY
10− *
11− * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved.
12− *
13− * This program is free software; you can redistribute it and/or modify
14− * it under the terms of version 2 of the GNU General Public License as
15− * published by the Free Software Foundation.
16− *
17− * This program is distributed in the hope that it will be useful, but
18− * WITHOUT ANY WARRANTY; without even the implied warranty of
19− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20− * General Public License for more details.
21− *
22− * You should have received a copy of the GNU General Public License
23− * along with this program; if not, write to the Free Software
24− * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
25− * USA
26− *
27− * The full GNU General Public License is included in this distribution
28− * in the file called LICENSE.GPL.
29− *
30− * Contact Information:
31− * Intel Corporation.
32− * linux-mei@linux.intel.com
33− * http://www.intel.com
34− *
35− * BSD LICENSE
36− *
37− * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved.
38− * All rights reserved.
39− *
40− * Redistribution and use in source and binary forms, with or without
41− * modification, are permitted provided that the following conditions
42− * are met:
43− *
44− * * Redistributions of source code must retain the above copyright
45− * notice, this list of conditions and the following disclaimer.
46− * * Redistributions in binary form must reproduce the above copyright
47− * notice, this list of conditions and the following disclaimer in
48− * the documentation and/or other materials provided with the
49− * distribution.
50− * * Neither the name Intel Corporation nor the names of its
51− * contributors may be used to endorse or promote products derived
52− * from this software without specific prior written permission.
53− *
54− * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
55− * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
56− * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
57− * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
58− * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
59− * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
60− * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
61− * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
62− * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
63− * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
64− * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65− *
66− *****************************************************************************/
67−
6+ */
687 #ifndef _LINUX_MEI_H
698 #define _LINUX_MEI_H
709
include/uapi/linux/mount.h+62−0
@@ -55,4 +55,66 @@ · 54 unmodified lines
5555 #define MS_MGC_VAL 0xC0ED0000
5656 #define MS_MGC_MSK 0xffff0000
5757
58+/*
59+ * open_tree() flags.
60+ */
61+#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
62+#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
63+
64+/*
65+ * move_mount() flags.
66+ */
67+#define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */
68+#define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */
69+#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */
70+#define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */
71+#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */
72+#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
73+#define MOVE_MOUNT__MASK 0x00000077
74+
75+/*
76+ * fsopen() flags.
77+ */
78+#define FSOPEN_CLOEXEC 0x00000001
79+
80+/*
81+ * fspick() flags.
82+ */
83+#define FSPICK_CLOEXEC 0x00000001
84+#define FSPICK_SYMLINK_NOFOLLOW 0x00000002
85+#define FSPICK_NO_AUTOMOUNT 0x00000004
86+#define FSPICK_EMPTY_PATH 0x00000008
87+
88+/*
89+ * The type of fsconfig() call made.
90+ */
91+enum fsconfig_command {
92+ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
93+ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
94+ FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
95+ FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
96+ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
97+ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
98+ FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
99+ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
100+};
101+
102+/*
103+ * fsmount() flags.
104+ */
105+#define FSMOUNT_CLOEXEC 0x00000001
106+
107+/*
108+ * Mount attributes.
109+ */
110+#define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */
111+#define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits */
112+#define MOUNT_ATTR_NODEV 0x00000004 /* Disallow access to device special files */
113+#define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution */
114+#define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated */
115+#define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */
116+#define MOUNT_ATTR_NOATIME 0x00000010 /* - Do not update access times. */
117+#define MOUNT_ATTR_STRICTATIME 0x00000020 /* - Always perform atime updates */
118+#define MOUNT_ATTR_NODIRATIME 0x00000080 /* Do not update directory access times */
119+
58120 #endif /* _UAPI_LINUX_MOUNT_H */
include/uapi/linux/netfilter/nf_tables.h+9−3
@@ -966,7 +966,7 @@ enum nft_socket_keys { · 965 unmodified lines
966966 * @NFT_CT_DST_IP: conntrack layer 3 protocol destination (IPv4 address)
967967 * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address)
968968 * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address)
969− * @NFT_CT_TIMEOUT: connection tracking timeout policy assigned to conntrack
969+ * @NFT_CT_ID: conntrack id
970970 */
971971 enum nft_ct_keys {
972972 NFT_CT_STATE,
@@ -992,7 +992,7 @@ enum nft_ct_keys { · 19 unmodified lines
992992 NFT_CT_DST_IP,
993993 NFT_CT_SRC_IP6,
994994 NFT_CT_DST_IP6,
995− NFT_CT_TIMEOUT,
995+ NFT_CT_ID,
996996 __NFT_CT_MAX
997997 };
998998 #define NFT_CT_MAX (__NFT_CT_MAX - 1)
@@ -1136,7 +1136,7 @@ enum nft_log_level { · 137 unmodified lines
11361136 NFT_LOGLEVEL_AUDIT,
11371137 __NFT_LOGLEVEL_MAX
11381138 };
1139−#define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX + 1)
1139+#define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX - 1)
11401140
11411141 /**
11421142 * enum nft_queue_attributes - nf_tables queue expression netlink attributes
@@ -1522,15 +1522,21 @@ enum nft_flowtable_hook_attributes { · 379 unmodified lines
15221522 *
15231523 * @NFTA_OSF_DREG: destination register (NLA_U32: nft_registers)
15241524 * @NFTA_OSF_TTL: Value of the TTL osf option (NLA_U8)
1525+ * @NFTA_OSF_FLAGS: flags (NLA_U32)
15251526 */
15261527 enum nft_osf_attributes {
15271528 NFTA_OSF_UNSPEC,
15281529 NFTA_OSF_DREG,
15291530 NFTA_OSF_TTL,
1531+ NFTA_OSF_FLAGS,
15301532 __NFTA_OSF_MAX,
15311533 };
15321534 #define NFTA_OSF_MAX (__NFTA_OSF_MAX - 1)
15331535
1536+enum nft_osf_flags {
1537+ NFT_OSF_F_VERSION = (1 << 0),
1538+};
1539+
15341540 /**
15351541 * enum nft_device_attributes - nf_tables device netlink attributes
15361542 *
include/uapi/linux/nfs_mount.h+0−9
@@ -66,13 +66,4 @@ struct nfs_mount_data { · 65 unmodified lines
6666 #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */
6767 #define NFS_MOUNT_FLAGMASK 0xFFFF
6868
69−/* The following are for internal use only */
70−#define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000
71−#define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000
72−#define NFS_MOUNT_NORESVPORT 0x40000
73−#define NFS_MOUNT_LEGACY_INTERFACE 0x80000
74−
75−#define NFS_MOUNT_LOCAL_FLOCK 0x100000
76−#define NFS_MOUNT_LOCAL_FCNTL 0x200000
77−
7869 #endif
include/uapi/linux/nfsd/cld.h+1−0
@@ -36,6 +36,7 @@ enum cld_command { · 35 unmodified lines
3636 Cld_Remove, /* remove record of this cm_id */
3737 Cld_Check, /* is this cm_id allowed? */
3838 Cld_GraceDone, /* grace period is complete */
39+ Cld_GraceStart,
3940 };
4041
4142 /* representation of long-form NFSv4 client ID */
include/uapi/linux/nl80211.h+84−2
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
1212 * Copyright 2008 Colin McCabe <colin@cozybit.com>
1313 * Copyright 2015-2017 Intel Deutschland GmbH
14− * Copyright (C) 2018 Intel Corporation
14+ * Copyright (C) 2018-2019 Intel Corporation
1515 *
1616 * Permission to use, copy, modify, and/or distribute this software for any
1717 * purpose with or without fee is hereby granted, provided that the above
@@ -1065,6 +1065,26 @@ · 1047 unmodified lines
10651065 * indicated by %NL80211_ATTR_WIPHY_FREQ and other attributes
10661066 * determining the width and type.
10671067 *
1068+ * @NL80211_CMD_UPDATE_OWE_INFO: This interface allows the host driver to
1069+ * offload OWE processing to user space. This intends to support
1070+ * OWE AKM by the host drivers that implement SME but rely
1071+ * on the user space for the cryptographic/DH IE processing in AP mode.
1072+ *
1073+ * @NL80211_CMD_PROBE_MESH_LINK: The requirement for mesh link metric
1074+ * refreshing, is that from one mesh point we be able to send some data
1075+ * frames to other mesh points which are not currently selected as a
1076+ * primary traffic path, but which are only 1 hop away. The absence of
1077+ * the primary path to the chosen node makes it necessary to apply some
1078+ * form of marking on a chosen packet stream so that the packets can be
1079+ * properly steered to the selected node for testing, and not by the
1080+ * regular mesh path lookup. Further, the packets must be of type data
1081+ * so that the rate control (often embedded in firmware) is used for
1082+ * rate selection.
1083+ *
1084+ * Here attribute %NL80211_ATTR_MAC is used to specify connected mesh
1085+ * peer MAC address and %NL80211_ATTR_FRAME is used to specify the frame
1086+ * content. The frame is ethernet data.
1087+ *
10681088 * @NL80211_CMD_MAX: highest used command number
10691089 * @__NL80211_CMD_AFTER_LAST: internal use
10701090 */
@@ -1285,6 +1305,10 @@ enum nl80211_commands { · 214 unmodified lines
12851305
12861306 NL80211_CMD_NOTIFY_RADAR,
12871307
1308+ NL80211_CMD_UPDATE_OWE_INFO,
1309+
1310+ NL80211_CMD_PROBE_MESH_LINK,
1311+
12881312 /* add new commands above here */
12891313
12901314 /* used to define NL80211_CMD_MAX below */
@@ -2308,6 +2332,15 @@ enum nl80211_commands { · 1017 unmodified lines
23082332 * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime
23092333 * scheduler.
23102334 *
2335+ * @NL80211_ATTR_STA_TX_POWER_SETTING: Transmit power setting type (u8) for
2336+ * station associated with the AP. See &enum nl80211_tx_power_setting for
2337+ * possible values.
2338+ * @NL80211_ATTR_STA_TX_POWER: Transmit power level (s16) in dBm units. This
2339+ * allows to set Tx power for a station. If this attribute is not included,
2340+ * the default per-interface tx power setting will be overriding. Driver
2341+ * should be picking up the lowest tx power, either tx power per-interface
2342+ * or per-station.
2343+ *
23112344 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
23122345 * @NL80211_ATTR_MAX: highest attribute number currently defined
23132346 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2758,6 +2791,8 @@ enum nl80211_attrs { · 444 unmodified lines
27582791 NL80211_ATTR_PEER_MEASUREMENTS,
27592792
27602793 NL80211_ATTR_AIRTIME_WEIGHT,
2794+ NL80211_ATTR_STA_TX_POWER_SETTING,
2795+ NL80211_ATTR_STA_TX_POWER,
27612796
27622797 /* add attributes here, update the policy in nl80211.c */
27632798
@@ -2802,7 +2837,7 @@ enum nl80211_attrs { · 38 unmodified lines
28022837
28032838 #define NL80211_MAX_SUPP_RATES 32
28042839 #define NL80211_MAX_SUPP_HT_RATES 77
2805−#define NL80211_MAX_SUPP_REG_RULES 64
2840+#define NL80211_MAX_SUPP_REG_RULES 128
28062841 #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0
28072842 #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
28082843 #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
@@ -3139,6 +3174,7 @@ enum nl80211_sta_bss_param { · 330 unmodified lines
31393174 * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames
31403175 * sent to the station (u64, usec)
31413176 * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16)
3177+ * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station
31423178 * @__NL80211_STA_INFO_AFTER_LAST: internal
31433179 * @NL80211_STA_INFO_MAX: highest possible station info attribute
31443180 */
@@ -3184,6 +3220,7 @@ enum nl80211_sta_info { · 39 unmodified lines
31843220 NL80211_STA_INFO_CONNECTED_TO_GATE,
31853221 NL80211_STA_INFO_TX_DURATION,
31863222 NL80211_STA_INFO_AIRTIME_WEIGHT,
3223+ NL80211_STA_INFO_AIRTIME_LINK_METRIC,
31873224
31883225 /* keep last */
31893226 __NL80211_STA_INFO_AFTER_LAST,
@@ -3638,6 +3675,14 @@ enum nl80211_reg_rule_attr { · 448 unmodified lines
36383675 * value as specified by &struct nl80211_bss_select_rssi_adjust.
36393676 * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching
36403677 * (this cannot be used together with SSID).
3678+ * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Nested attribute that carries the
3679+ * band specific minimum rssi thresholds for the bands defined in
3680+ * enum nl80211_band. The minimum rssi threshold value(s32) specific to a
3681+ * band shall be encapsulated in attribute with type value equals to one
3682+ * of the NL80211_BAND_* defined in enum nl80211_band. For example, the
3683+ * minimum rssi threshold value for 2.4GHZ band shall be encapsulated
3684+ * within an attribute of type NL80211_BAND_2GHZ. And one or more of such
3685+ * attributes will be nested within this attribute.
36413686 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
36423687 * attribute number currently defined
36433688 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
@@ -3650,6 +3695,7 @@ enum nl80211_sched_scan_match_attr { · 6 unmodified lines
36503695 NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
36513696 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
36523697 NL80211_SCHED_SCAN_MATCH_ATTR_BSSID,
3698+ NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI,
36533699
36543700 /* keep last */
36553701 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
@@ -4134,6 +4180,27 @@ enum nl80211_channel_type { · 478 unmodified lines
41344180 NL80211_CHAN_HT40PLUS
41354181 };
41364182
4183+/**
4184+ * enum nl80211_key_mode - Key mode
4185+ *
4186+ * @NL80211_KEY_RX_TX: (Default)
4187+ * Key can be used for Rx and Tx immediately
4188+ *
4189+ * The following modes can only be selected for unicast keys and when the
4190+ * driver supports @NL80211_EXT_FEATURE_EXT_KEY_ID:
4191+ *
4192+ * @NL80211_KEY_NO_TX: Only allowed in combination with @NL80211_CMD_NEW_KEY:
4193+ * Unicast key can only be used for Rx, Tx not allowed, yet
4194+ * @NL80211_KEY_SET_TX: Only allowed in combination with @NL80211_CMD_SET_KEY:
4195+ * The unicast key identified by idx and mac is cleared for Tx and becomes
4196+ * the preferred Tx key for the station.
4197+ */
4198+enum nl80211_key_mode {
4199+ NL80211_KEY_RX_TX,
4200+ NL80211_KEY_NO_TX,
4201+ NL80211_KEY_SET_TX
4202+};
4203+
41374204 /**
41384205 * enum nl80211_chan_width - channel width definitions
41394206 *
@@ -4377,6 +4444,9 @@ enum nl80211_key_default_types { · 237 unmodified lines
43774444 * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags
43784445 * attributes, specifying what a key should be set as default as.
43794446 * See &enum nl80211_key_default_types.
4447+ * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
4448+ * Defaults to @NL80211_KEY_RX_TX.
4449+ *
43804450 * @__NL80211_KEY_AFTER_LAST: internal
43814451 * @NL80211_KEY_MAX: highest key attribute
43824452 */
@@ -4390,6 +4460,7 @@ enum nl80211_key_attributes { · 7 unmodified lines
43904460 NL80211_KEY_DEFAULT_MGMT,
43914461 NL80211_KEY_TYPE,
43924462 NL80211_KEY_DEFAULT_TYPES,
4463+ NL80211_KEY_MODE,
43934464
43944465 /* keep last */
43954466 __NL80211_KEY_AFTER_LAST,
@@ -5335,6 +5406,8 @@ enum nl80211_feature_flags { · 939 unmodified lines
53355406 * able to rekey an in-use key correctly. Userspace must not rekey PTK keys
53365407 * if this flag is not set. Ignoring this can leak clear text packets and/or
53375408 * freeze the connection.
5409+ * @NL80211_EXT_FEATURE_EXT_KEY_ID: Driver supports "Extended Key ID for
5410+ * Individually Addressed Frames" from IEEE802.11-2016.
53385411 *
53395412 * @NL80211_EXT_FEATURE_AIRTIME_FAIRNESS: Driver supports getting airtime
53405413 * fairness for transmitted packets and has enabled airtime fairness
@@ -5343,6 +5416,12 @@ enum nl80211_feature_flags { · 2 unmodified lines
53435416 * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching
53445417 * (set/del PMKSA operations) in AP mode.
53455418 *
5419+ * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Driver supports
5420+ * filtering of sched scan results using band specific RSSI thresholds.
5421+ *
5422+ * @NL80211_EXT_FEATURE_STA_TX_PWR: This driver supports controlling tx power
5423+ * to a station.
5424+ *
53465425 * @NUM_NL80211_EXT_FEATURES: number of extended features.
53475426 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
53485427 */
@@ -5384,6 +5463,9 @@ enum nl80211_ext_feature_index { · 35 unmodified lines
53845463 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER,
53855464 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,
53865465 NL80211_EXT_FEATURE_AP_PMKSA_CACHING,
5466+ NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,
5467+ NL80211_EXT_FEATURE_EXT_KEY_ID,
5468+ NL80211_EXT_FEATURE_STA_TX_PWR,
53875469
53885470 /* add new features before the definition below */
53895471 NUM_NL80211_EXT_FEATURES,
include/uapi/linux/openvswitch.h+46−0
@@ -364,6 +364,7 @@ enum ovs_tunnel_key_attr { · 363 unmodified lines
364364 OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */
365365 OVS_TUNNEL_KEY_ATTR_PAD,
366366 OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */
367+ OVS_TUNNEL_KEY_ATTR_IPV4_INFO_BRIDGE, /* No argument. IPV4_INFO_BRIDGE mode.*/
367368 __OVS_TUNNEL_KEY_ATTR_MAX
368369 };
369370
@@ -734,6 +735,7 @@ struct ovs_action_hash { · 364 unmodified lines
734735 * be received on NFNLGRP_CONNTRACK_NEW and NFNLGRP_CONNTRACK_DESTROY groups,
735736 * respectively. Remaining bits control the changes for which an event is
736737 * delivered on the NFNLGRP_CONNTRACK_UPDATE group.
738+ * @OVS_CT_ATTR_TIMEOUT: Variable length string defining conntrack timeout.
737739 */
738740 enum ovs_ct_attr {
739741 OVS_CT_ATTR_UNSPEC,
@@ -746,6 +748,8 @@ enum ovs_ct_attr { · 6 unmodified lines
746748 OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */
747749 OVS_CT_ATTR_FORCE_COMMIT, /* No argument */
748750 OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */
751+ OVS_CT_ATTR_TIMEOUT, /* Associate timeout with this connection for
752+ * fine-grain timeout tuning. */
749753 __OVS_CT_ATTR_MAX
750754 };
751755
@@ -798,6 +802,44 @@ struct ovs_action_push_eth { · 46 unmodified lines
798802 struct ovs_key_ethernet addresses;
799803 };
800804
805+/*
806+ * enum ovs_check_pkt_len_attr - Attributes for %OVS_ACTION_ATTR_CHECK_PKT_LEN.
807+ *
808+ * @OVS_CHECK_PKT_LEN_ATTR_PKT_LEN: u16 Packet length to check for.
809+ * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER: Nested OVS_ACTION_ATTR_*
810+ * actions to apply if the packer length is greater than the specified
811+ * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN.
812+ * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL - Nested OVS_ACTION_ATTR_*
813+ * actions to apply if the packer length is lesser or equal to the specified
814+ * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN.
815+ */
816+enum ovs_check_pkt_len_attr {
817+ OVS_CHECK_PKT_LEN_ATTR_UNSPEC,
818+ OVS_CHECK_PKT_LEN_ATTR_PKT_LEN,
819+ OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER,
820+ OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL,
821+ __OVS_CHECK_PKT_LEN_ATTR_MAX,
822+
823+#ifdef __KERNEL__
824+ OVS_CHECK_PKT_LEN_ATTR_ARG /* struct check_pkt_len_arg */
825+#endif
826+};
827+
828+#define OVS_CHECK_PKT_LEN_ATTR_MAX (__OVS_CHECK_PKT_LEN_ATTR_MAX - 1)
829+
830+#ifdef __KERNEL__
831+struct check_pkt_len_arg {
832+ u16 pkt_len; /* Same value as OVS_CHECK_PKT_LEN_ATTR_PKT_LEN'. */
833+ bool exec_for_greater; /* When true, actions in IF_GREATER will
834+ * not change flow keys. False otherwise.
835+ */
836+ bool exec_for_lesser_equal; /* When true, actions in IF_LESS_EQUAL
837+ * will not change flow keys. False
838+ * otherwise.
839+ */
840+};
841+#endif
842+
801843 /**
802844 * enum ovs_action_attr - Action types.
803845 *
@@ -842,6 +884,9 @@ struct ovs_action_push_eth { · 38 unmodified lines
842884 * packet, or modify the packet (e.g., change the DSCP field).
843885 * @OVS_ACTION_ATTR_CLONE: make a copy of the packet and execute a list of
844886 * actions without affecting the original packet and key.
887+ * @OVS_ACTION_ATTR_CHECK_PKT_LEN: Check the packet length and execute a set
888+ * of actions if greater than the specified packet length, else execute
889+ * another set of actions.
845890 *
846891 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
847892 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
@@ -876,6 +921,7 @@ enum ovs_action_attr { · 28 unmodified lines
876921 OVS_ACTION_ATTR_POP_NSH, /* No argument. */
877922 OVS_ACTION_ATTR_METER, /* u32 meter ID. */
878923 OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */
924+ OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */
879925
880926 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
881927 * from userspace. */
include/uapi/linux/pci_regs.h+71−67
@@ -1,7 +1,5 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
3− * pci_regs.h
4− *
53 * PCI standard defines
64 * Copyright 1994, Drew Eckhardt
75 * Copyright 1997--1999 Martin Mares <mj@ucw.cz>
@@ -15,7 +13,7 @@ · 7 unmodified lines
1513 * PCI System Design Guide
1614 *
1715 * For HyperTransport information, please consult the following manuals
18− * from http://www.hypertransport.org
16+ * from http://www.hypertransport.org :
1917 *
2018 * The HyperTransport I/O Link Specification
2119 */
@@ -301,7 +299,7 @@ · 279 unmodified lines
301299 #define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */
302300 #define PCI_SID_CHASSIS_NR 3 /* Chassis Number */
303301
304−/* Message Signalled Interrupts registers */
302+/* Message Signalled Interrupt registers */
305303
306304 #define PCI_MSI_FLAGS 2 /* Message Control */
307305 #define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */
@@ -319,7 +317,7 @@ · 11 unmodified lines
319317 #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */
320318 #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */
321319
322−/* MSI-X registers */
320+/* MSI-X registers (in MSI-X capability) */
323321 #define PCI_MSIX_FLAGS 2 /* Message Control */
324322 #define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */
325323 #define PCI_MSIX_FLAGS_MASKALL 0x4000 /* Mask all vectors for this function */
@@ -333,13 +331,13 @@ · 7 unmodified lines
333331 #define PCI_MSIX_FLAGS_BIRMASK PCI_MSIX_PBA_BIR /* deprecated */
334332 #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */
335333
336−/* MSI-X Table entry format */
334+/* MSI-X Table entry format (in memory mapped by a BAR) */
337335 #define PCI_MSIX_ENTRY_SIZE 16
338−#define PCI_MSIX_ENTRY_LOWER_ADDR 0
339−#define PCI_MSIX_ENTRY_UPPER_ADDR 4
340−#define PCI_MSIX_ENTRY_DATA 8
341−#define PCI_MSIX_ENTRY_VECTOR_CTRL 12
342−#define PCI_MSIX_ENTRY_CTRL_MASKBIT 1
336+#define PCI_MSIX_ENTRY_LOWER_ADDR 0 /* Message Address */
337+#define PCI_MSIX_ENTRY_UPPER_ADDR 4 /* Message Upper Address */
338+#define PCI_MSIX_ENTRY_DATA 8 /* Message Data */
339+#define PCI_MSIX_ENTRY_VECTOR_CTRL 12 /* Vector Control */
340+#define PCI_MSIX_ENTRY_CTRL_MASKBIT 0x00000001
343341
344342 /* CompactPCI Hotswap Register */
345343
@@ -372,6 +370,12 @@ · 26 unmodified lines
372370 #define PCI_EA_FIRST_ENT_BRIDGE 8 /* First EA Entry for Bridges */
373371 #define PCI_EA_ES 0x00000007 /* Entry Size */
374372 #define PCI_EA_BEI 0x000000f0 /* BAR Equivalent Indicator */
373+
374+/* EA fixed Secondary and Subordinate bus numbers for Bridge */
375+#define PCI_EA_SEC_BUS_MASK 0xff
376+#define PCI_EA_SUB_BUS_MASK 0xff00
377+#define PCI_EA_SUB_BUS_SHIFT 8
378+
375379 /* 0-5 map to BARs 0-5 respectively */
376380 #define PCI_EA_BEI_BAR0 0
377381 #define PCI_EA_BEI_BAR5 5
@@ -465,19 +469,19 @@ · 87 unmodified lines
465469 /* PCI Express capability registers */
466470
467471 #define PCI_EXP_FLAGS 2 /* Capabilities register */
468−#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */
469−#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */
470−#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */
471−#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */
472−#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */
473−#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */
474−#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */
475−#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCIe to PCI/PCI-X Bridge */
476−#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIe Bridge */
477−#define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */
478−#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */
479−#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */
480−#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */
472+#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */
473+#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */
474+#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */
475+#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */
476+#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */
477+#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */
478+#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */
479+#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCIe to PCI/PCI-X Bridge */
480+#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIe Bridge */
481+#define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */
482+#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */
483+#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */
484+#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */
481485 #define PCI_EXP_DEVCAP 4 /* Device capabilities */
482486 #define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */
483487 #define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */
@@ -616,8 +620,8 @@ · 132 unmodified lines
616620 #define PCI_EXP_RTCAP 30 /* Root Capabilities */
617621 #define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */
618622 #define PCI_EXP_RTSTA 32 /* Root Status */
619−#define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */
620−#define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */
623+#define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */
624+#define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */
621625 /*
622626 * The Device Capabilities 2, Device Status 2, Device Control 2,
623627 * Link Capabilities 2, Link Status 2, Link Control 2,
@@ -637,13 +641,13 @@ · 13 unmodified lines
637641 #define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000 /* OBFF support mechanism */
638642 #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */
639643 #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */
640−#define PCI_EXP_DEVCAP2_EE_PREFIX 0x00200000 /* End-End TLP Prefix */
644+#define PCI_EXP_DEVCAP2_EE_PREFIX 0x00200000 /* End-End TLP Prefix */
641645 #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */
642646 #define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */
643647 #define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS 0x0010 /* Completion Timeout Disable */
644648 #define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */
645−#define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */
646−#define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK 0x0080 /* Block atomic egress */
649+#define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */
650+#define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK 0x0080 /* Block atomic egress */
647651 #define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */
648652 #define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */
649653 #define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */
@@ -659,11 +663,11 @@ · 9 unmodified lines
659663 #define PCI_EXP_LNKCAP2_SLS_16_0GB 0x00000010 /* Supported Speed 16GT/s */
660664 #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */
661665 #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */
662−#define PCI_EXP_LNKCTL2_TLS 0x000f
663−#define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */
664−#define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */
665−#define PCI_EXP_LNKCTL2_TLS_8_0GT 0x0003 /* Supported Speed 8GT/s */
666−#define PCI_EXP_LNKCTL2_TLS_16_0GT 0x0004 /* Supported Speed 16GT/s */
666+#define PCI_EXP_LNKCTL2_TLS 0x000f
667+#define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */
668+#define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */
669+#define PCI_EXP_LNKCTL2_TLS_8_0GT 0x0003 /* Supported Speed 8GT/s */
670+#define PCI_EXP_LNKCTL2_TLS_16_0GT 0x0004 /* Supported Speed 16GT/s */
667671 #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */
668672 #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */
669673 #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */
@@ -752,18 +756,18 @@ · 82 unmodified lines
752756 #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */
753757 #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */
754758 #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */
755−#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */
756−#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */
757−#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */
759+#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */
760+#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */
761+#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */
758762 #define PCI_ERR_ROOT_STATUS 48
759−#define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */
760−#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */
761−#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */
762−#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 /* Multiple FATAL/NONFATAL */
763−#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First UNC is Fatal */
764−#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */
765−#define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */
766−#define PCI_ERR_ROOT_AER_IRQ 0xf8000000 /* Advanced Error Interrupt Message Number */
763+#define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */
764+#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */
765+#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */
766+#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 /* Multiple FATAL/NONFATAL */
767+#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First UNC is Fatal */
768+#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */
769+#define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */
770+#define PCI_ERR_ROOT_AER_IRQ 0xf8000000 /* Advanced Error Interrupt Message Number */
767771 #define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */
768772
769773 /* Virtual Channel */
@@ -875,12 +879,12 @@ · 105 unmodified lines
875879
876880 /* Page Request Interface */
877881 #define PCI_PRI_CTRL 0x04 /* PRI control register */
878−#define PCI_PRI_CTRL_ENABLE 0x01 /* Enable */
879−#define PCI_PRI_CTRL_RESET 0x02 /* Reset */
882+#define PCI_PRI_CTRL_ENABLE 0x0001 /* Enable */
883+#define PCI_PRI_CTRL_RESET 0x0002 /* Reset */
880884 #define PCI_PRI_STATUS 0x06 /* PRI status register */
881−#define PCI_PRI_STATUS_RF 0x001 /* Response Failure */
882−#define PCI_PRI_STATUS_UPRGI 0x002 /* Unexpected PRG index */
883−#define PCI_PRI_STATUS_STOPPED 0x100 /* PRI Stopped */
885+#define PCI_PRI_STATUS_RF 0x0001 /* Response Failure */
886+#define PCI_PRI_STATUS_UPRGI 0x0002 /* Unexpected PRG index */
887+#define PCI_PRI_STATUS_STOPPED 0x0100 /* PRI Stopped */
884888 #define PCI_PRI_STATUS_PASID 0x8000 /* PRG Response PASID Required */
885889 #define PCI_PRI_MAX_REQ 0x08 /* PRI max reqs supported */
886890 #define PCI_PRI_ALLOC_REQ 0x0c /* PRI max reqs allowed */
@@ -898,16 +902,16 @@ · 11 unmodified lines
898902
899903 /* Single Root I/O Virtualization */
900904 #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */
901−#define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */
905+#define PCI_SRIOV_CAP_VFM 0x00000001 /* VF Migration Capable */
902906 #define PCI_SRIOV_CAP_INTR(x) ((x) >> 21) /* Interrupt Message Number */
903907 #define PCI_SRIOV_CTRL 0x08 /* SR-IOV Control */
904−#define PCI_SRIOV_CTRL_VFE 0x01 /* VF Enable */
905−#define PCI_SRIOV_CTRL_VFM 0x02 /* VF Migration Enable */
906−#define PCI_SRIOV_CTRL_INTR 0x04 /* VF Migration Interrupt Enable */
907−#define PCI_SRIOV_CTRL_MSE 0x08 /* VF Memory Space Enable */
908−#define PCI_SRIOV_CTRL_ARI 0x10 /* ARI Capable Hierarchy */
908+#define PCI_SRIOV_CTRL_VFE 0x0001 /* VF Enable */
909+#define PCI_SRIOV_CTRL_VFM 0x0002 /* VF Migration Enable */
910+#define PCI_SRIOV_CTRL_INTR 0x0004 /* VF Migration Interrupt Enable */
911+#define PCI_SRIOV_CTRL_MSE 0x0008 /* VF Memory Space Enable */
912+#define PCI_SRIOV_CTRL_ARI 0x0010 /* ARI Capable Hierarchy */
909913 #define PCI_SRIOV_STATUS 0x0a /* SR-IOV Status */
910−#define PCI_SRIOV_STATUS_VFM 0x01 /* VF Migration Status */
914+#define PCI_SRIOV_STATUS_VFM 0x0001 /* VF Migration Status */
911915 #define PCI_SRIOV_INITIAL_VF 0x0c /* Initial VFs */
912916 #define PCI_SRIOV_TOTAL_VF 0x0e /* Total VFs */
913917 #define PCI_SRIOV_NUM_VF 0x10 /* Number of VFs */
@@ -937,13 +941,13 @@ · 23 unmodified lines
937941
938942 /* Access Control Service */
939943 #define PCI_ACS_CAP 0x04 /* ACS Capability Register */
940−#define PCI_ACS_SV 0x01 /* Source Validation */
941−#define PCI_ACS_TB 0x02 /* Translation Blocking */
942−#define PCI_ACS_RR 0x04 /* P2P Request Redirect */
943−#define PCI_ACS_CR 0x08 /* P2P Completion Redirect */
944−#define PCI_ACS_UF 0x10 /* Upstream Forwarding */
945−#define PCI_ACS_EC 0x20 /* P2P Egress Control */
946−#define PCI_ACS_DT 0x40 /* Direct Translated P2P */
944+#define PCI_ACS_SV 0x0001 /* Source Validation */
945+#define PCI_ACS_TB 0x0002 /* Translation Blocking */
946+#define PCI_ACS_RR 0x0004 /* P2P Request Redirect */
947+#define PCI_ACS_CR 0x0008 /* P2P Completion Redirect */
948+#define PCI_ACS_UF 0x0010 /* Upstream Forwarding */
949+#define PCI_ACS_EC 0x0020 /* P2P Egress Control */
950+#define PCI_ACS_DT 0x0040 /* Direct Translated P2P */
947951 #define PCI_ACS_EGRESS_BITS 0x05 /* ACS Egress Control Vector Size */
948952 #define PCI_ACS_CTRL 0x06 /* ACS Control Register */
949953 #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */
@@ -993,9 +997,9 @@ · 43 unmodified lines
993997 #define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */
994998
995999 #define PCI_EXP_DPC_CTL 6 /* DPC control */
996−#define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */
997−#define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */
998−#define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */
1000+#define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */
1001+#define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */
1002+#define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */
9991003
10001004 #define PCI_EXP_DPC_STATUS 8 /* DPC Status */
10011005 #define PCI_EXP_DPC_STATUS_TRIGGER 0x0001 /* Trigger Status */
include/uapi/linux/pkt_sched.h+13−0
@@ -1148,6 +1148,16 @@ enum { · 1147 unmodified lines
11481148
11491149 #define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1)
11501150
1151+/* The format for the admin sched (dump only):
1152+ * [TCA_TAPRIO_SCHED_ADMIN_SCHED]
1153+ * [TCA_TAPRIO_ATTR_SCHED_BASE_TIME]
1154+ * [TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST]
1155+ * [TCA_TAPRIO_ATTR_SCHED_ENTRY]
1156+ * [TCA_TAPRIO_ATTR_SCHED_ENTRY_CMD]
1157+ * [TCA_TAPRIO_ATTR_SCHED_ENTRY_GATES]
1158+ * [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL]
1159+ */
1160+
11511161 enum {
11521162 TCA_TAPRIO_ATTR_UNSPEC,
11531163 TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */
@@ -1156,6 +1166,9 @@ enum { · 2 unmodified lines
11561166 TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */
11571167 TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */
11581168 TCA_TAPRIO_PAD,
1169+ TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */
1170+ TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */
1171+ TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */
11591172 __TCA_TAPRIO_ATTR_MAX,
11601173 };
11611174
include/uapi/linux/psci.h+7−0
@@ -49,8 +49,11 @@ · 48 unmodified lines
4949
5050 #define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10)
5151 #define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14)
52+#define PSCI_1_0_FN_SET_SUSPEND_MODE PSCI_0_2_FN(15)
53+#define PSCI_1_1_FN_SYSTEM_RESET2 PSCI_0_2_FN(18)
5254
5355 #define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14)
56+#define PSCI_1_1_FN64_SYSTEM_RESET2 PSCI_0_2_FN64(18)
5457
5558 /* PSCI v0.2 power state encoding for CPU_SUSPEND function */
5659 #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff
@@ -97,6 +100,10 @@ · 40 unmodified lines
97100 #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \
98101 (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT)
99102
103+#define PSCI_1_0_OS_INITIATED BIT(0)
104+#define PSCI_1_0_SUSPEND_MODE_PC 0
105+#define PSCI_1_0_SUSPEND_MODE_OSI 1
106+
100107 /* PSCI return values (inclusive of all PSCI versions) */
101108 #define PSCI_RET_SUCCESS 0
102109 #define PSCI_RET_NOT_SUPPORTED -1
include/uapi/linux/psp-sev.h+14−4
@@ -6,8 +6,7 @@ · 5 unmodified lines
66 *
77 * Author: Brijesh Singh <brijesh.singh@amd.com>
88 *
9− * SEV spec 0.14 is available at:
10− * http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf
9+ * SEV API specification is available at: https://developer.amd.com/sev/
1110 *
1211 * This program is free software; you can redistribute it and/or modify
1312 * it under the terms of the GNU General Public License version 2 as
@@ -30,7 +29,8 @@ enum { · 16 unmodified lines
3029 SEV_PDH_GEN,
3130 SEV_PDH_CERT_EXPORT,
3231 SEV_PEK_CERT_IMPORT,
33− SEV_GET_ID,
32+ SEV_GET_ID, /* This command is deprecated, use SEV_GET_ID2 */
33+ SEV_GET_ID2,
3434
3535 SEV_MAX,
3636 };
@@ -125,7 +125,7 @@ struct sev_user_data_pdh_cert_export { · 88 unmodified lines
125125 } __packed;
126126
127127 /**
128− * struct sev_user_data_get_id - GET_ID command parameters
128+ * struct sev_user_data_get_id - GET_ID command parameters (deprecated)
129129 *
130130 * @socket1: Buffer to pass unique ID of first socket
131131 * @socket2: Buffer to pass unique ID of second socket
@@ -135,6 +135,16 @@ struct sev_user_data_get_id { · 3 unmodified lines
135135 __u8 socket2[64]; /* Out */
136136 } __packed;
137137
138+/**
139+ * struct sev_user_data_get_id2 - GET_ID command parameters
140+ * @address: Buffer to store unique ID
141+ * @length: length of the unique ID
142+ */
143+struct sev_user_data_get_id2 {
144+ __u64 address; /* In */
145+ __u32 length; /* In/Out */
146+} __packed;
147+
138148 /**
139149 * struct sev_issue_cmd - SEV ioctl parameters
140150 *
include/uapi/linux/sched.h+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #define CLONE_FS 0x00000200 /* set if fs info shared between processes */
1111 #define CLONE_FILES 0x00000400 /* set if open files shared between processes */
1212 #define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */
13+#define CLONE_PIDFD 0x00001000 /* set if a pidfd should be placed in parent */
1314 #define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
1415 #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
1516 #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */
include/uapi/linux/sed-opal.h+1−10
@@ -5,15 +5,6 @@ · 4 unmodified lines
55 * Authors:
66 * Rafael Antognolli <rafael.antognolli@intel.com>
77 * Scott Bauer <scott.bauer@intel.com>
8− *
9− * This program is free software; you can redistribute it and/or modify it
10− * under the terms and conditions of the GNU General Public License,
11− * version 2, as published by the Free Software Foundation.
12− *
13− * This program is distributed in the hope it will be useful, but WITHOUT
14− * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15− * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16− * more details.
178 */
189
1910 #ifndef _UAPI_SED_OPAL_H
@@ -58,7 +49,7 @@ struct opal_key { · 38 unmodified lines
5849 struct opal_lr_act {
5950 struct opal_key key;
6051 __u32 sum;
61− __u8 num_lrs;
52+ __u8 num_lrs;
6253 __u8 lr[OPAL_MAX_LRS];
6354 __u8 align[2]; /* Align to 8 byte boundary */
6455 };
include/uapi/linux/serial_core.h+6−0
@@ -287,4 +287,10 @@ · 286 unmodified lines
287287 /* RDA UART */
288288 #define PORT_RDA 118
289289
290+/* Socionext Milbeaut UART */
291+#define PORT_MLB_USIO 119
292+
293+/* SiFive UART */
294+#define PORT_SIFIVE_V0 120
295+
290296 #endif /* _UAPILINUX_SERIAL_CORE_H */
include/uapi/linux/sockios.h+21−0
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 #ifndef _LINUX_SOCKIOS_H
2020 #define _LINUX_SOCKIOS_H
2121
22+#include <asm/bitsperlong.h>
2223 #include <asm/sockios.h>
2324
2425 /* Linux-specific socket ioctls */
@@ -27,6 +28,26 @@ · 2 unmodified lines
2728
2829 #define SOCK_IOC_TYPE 0x89
2930
31+/*
32+ * the timeval/timespec data structure layout is defined by libc,
33+ * so we need to cover both possible versions on 32-bit.
34+ */
35+/* Get stamp (timeval) */
36+#define SIOCGSTAMP_NEW _IOR(SOCK_IOC_TYPE, 0x06, long long[2])
37+/* Get stamp (timespec) */
38+#define SIOCGSTAMPNS_NEW _IOR(SOCK_IOC_TYPE, 0x07, long long[2])
39+
40+#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
41+/* on 64-bit and x32, avoid the ?: operator */
42+#define SIOCGSTAMP SIOCGSTAMP_OLD
43+#define SIOCGSTAMPNS SIOCGSTAMPNS_OLD
44+#else
45+#define SIOCGSTAMP ((sizeof(struct timeval)) == 8 ? \
46+ SIOCGSTAMP_OLD : SIOCGSTAMP_NEW)
47+#define SIOCGSTAMPNS ((sizeof(struct timespec)) == 8 ? \
48+ SIOCGSTAMPNS_OLD : SIOCGSTAMPNS_NEW)
49+#endif
50+
3051 /* Routing table calls. */
3152 #define SIOCADDRT 0x890B /* add routing table entry */
3253 #define SIOCDELRT 0x890C /* delete routing table entry */
include/uapi/linux/spi/spidev.h+5−1
@@ -66,6 +66,9 @@ · 65 unmodified lines
6666 * @delay_usecs: If nonzero, how long to delay after the last bit transfer
6767 * before optionally deselecting the device before the next transfer.
6868 * @cs_change: True to deselect device before starting the next transfer.
69+ * @word_delay_usecs: If nonzero, how long to wait between words within one
70+ * transfer. This property needs explicit support in the SPI controller,
71+ * otherwise it is silently ignored.
6972 *
7073 * This structure is mapped directly to the kernel spi_transfer structure;
7174 * the fields have the same meanings, except of course that the pointers
@@ -100,7 +103,8 @@ struct spi_ioc_transfer { · 28 unmodified lines
100103 __u8 cs_change;
101104 __u8 tx_nbits;
102105 __u8 rx_nbits;
103− __u16 pad;
106+ __u8 word_delay_usecs;
107+ __u8 pad;
104108
105109 /* If the contents of 'struct spi_ioc_transfer' ever change
106110 * incompatibly, then the ioctl number (currently 0) must change;
include/uapi/linux/switchtec_ioctl.h+12−1
@@ -50,7 +50,7 @@ struct switchtec_ioctl_flash_part_info { · 49 unmodified lines
5050 __u32 active;
5151 };
5252
53−struct switchtec_ioctl_event_summary {
53+struct switchtec_ioctl_event_summary_legacy {
5454 __u64 global;
5555 __u64 part_bitmap;
5656 __u32 local_part;
@@ -59,6 +59,15 @@ struct switchtec_ioctl_event_summary { · 2 unmodified lines
5959 __u32 pff[48];
6060 };
6161
62+struct switchtec_ioctl_event_summary {
63+ __u64 global;
64+ __u64 part_bitmap;
65+ __u32 local_part;
66+ __u32 padding;
67+ __u32 part[48];
68+ __u32 pff[255];
69+};
70+
6271 #define SWITCHTEC_IOCTL_EVENT_STACK_ERROR 0
6372 #define SWITCHTEC_IOCTL_EVENT_PPU_ERROR 1
6473 #define SWITCHTEC_IOCTL_EVENT_ISP_ERROR 2
@@ -127,6 +136,8 @@ struct switchtec_ioctl_pff_port { · 62 unmodified lines
127136 _IOWR('W', 0x41, struct switchtec_ioctl_flash_part_info)
128137 #define SWITCHTEC_IOCTL_EVENT_SUMMARY \
129138 _IOR('W', 0x42, struct switchtec_ioctl_event_summary)
139+#define SWITCHTEC_IOCTL_EVENT_SUMMARY_LEGACY \
140+ _IOR('W', 0x42, struct switchtec_ioctl_event_summary_legacy)
130141 #define SWITCHTEC_IOCTL_EVENT_CTL \
131142 _IOWR('W', 0x43, struct switchtec_ioctl_event_ctl)
132143 #define SWITCHTEC_IOCTL_PFF_TO_PORT \
include/uapi/linux/tcp.h+27−0
@@ -160,15 +160,42 @@ enum { · 159 unmodified lines
160160 #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
161161 #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
162162
163+/*
164+ * Sender's congestion state indicating normal or abnormal situations
165+ * in the last round of packets sent. The state is driven by the ACK
166+ * information and timer events.
167+ */
163168 enum tcp_ca_state {
169+ /*
170+ * Nothing bad has been observed recently.
171+ * No apparent reordering, packet loss, or ECN marks.
172+ */
164173 TCP_CA_Open = 0,
165174 #define TCPF_CA_Open (1<<TCP_CA_Open)
175+ /*
176+ * The sender enters disordered state when it has received DUPACKs or
177+ * SACKs in the last round of packets sent. This could be due to packet
178+ * loss or reordering but needs further information to confirm packets
179+ * have been lost.
180+ */
166181 TCP_CA_Disorder = 1,
167182 #define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
183+ /*
184+ * The sender enters Congestion Window Reduction (CWR) state when it
185+ * has received ACKs with ECN-ECE marks, or has experienced congestion
186+ * or packet discard on the sender host (e.g. qdisc).
187+ */
168188 TCP_CA_CWR = 2,
169189 #define TCPF_CA_CWR (1<<TCP_CA_CWR)
190+ /*
191+ * The sender is in fast recovery and retransmitting lost packets,
192+ * typically triggered by ACK events.
193+ */
170194 TCP_CA_Recovery = 3,
171195 #define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
196+ /*
197+ * The sender is in loss recovery triggered by retransmission timeout.
198+ */
172199 TCP_CA_Loss = 4
173200 #define TCPF_CA_Loss (1<<TCP_CA_Loss)
174201 };
include/uapi/linux/tipc.h+1−0
@@ -190,6 +190,7 @@ struct sockaddr_tipc { · 189 unmodified lines
190190 #define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */
191191 #define TIPC_GROUP_JOIN 135 /* Takes struct tipc_group_req* */
192192 #define TIPC_GROUP_LEAVE 136 /* No argument */
193+#define TIPC_SOCK_RECVQ_USED 137 /* Default: none (read only) */
193194
194195 /*
195196 * Flag values
include/uapi/linux/tipc_netlink.h+2−0
@@ -281,6 +281,8 @@ enum { · 280 unmodified lines
281281 TIPC_NLA_PROP_TOL, /* u32 */
282282 TIPC_NLA_PROP_WIN, /* u32 */
283283 TIPC_NLA_PROP_MTU, /* u32 */
284+ TIPC_NLA_PROP_BROADCAST, /* u32 */
285+ TIPC_NLA_PROP_BROADCAST_RATIO, /* u32 */
284286
285287 __TIPC_NLA_PROP_MAX,
286288 TIPC_NLA_PROP_MAX = __TIPC_NLA_PROP_MAX - 1
include/uapi/linux/tls.h+15−0
@@ -70,6 +70,13 @@ · 69 unmodified lines
7070 #define TLS_CIPHER_AES_GCM_256_TAG_SIZE 16
7171 #define TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE 8
7272
73+#define TLS_CIPHER_AES_CCM_128 53
74+#define TLS_CIPHER_AES_CCM_128_IV_SIZE 8
75+#define TLS_CIPHER_AES_CCM_128_KEY_SIZE 16
76+#define TLS_CIPHER_AES_CCM_128_SALT_SIZE 4
77+#define TLS_CIPHER_AES_CCM_128_TAG_SIZE 16
78+#define TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE 8
79+
7380 #define TLS_SET_RECORD_TYPE 1
7481 #define TLS_GET_RECORD_TYPE 2
7582
@@ -94,4 +101,12 @@ struct tls12_crypto_info_aes_gcm_256 { · 18 unmodified lines
94101 unsigned char rec_seq[TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE];
95102 };
96103
104+struct tls12_crypto_info_aes_ccm_128 {
105+ struct tls_crypto_info info;
106+ unsigned char iv[TLS_CIPHER_AES_CCM_128_IV_SIZE];
107+ unsigned char key[TLS_CIPHER_AES_CCM_128_KEY_SIZE];
108+ unsigned char salt[TLS_CIPHER_AES_CCM_128_SALT_SIZE];
109+ unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE];
110+};
111+
97112 #endif /* _UAPI_LINUX_TLS_H */
include/uapi/linux/v4l2-controls.h+8−0
@@ -404,6 +404,10 @@ enum v4l2_mpeg_video_multi_slice_mode { · 403 unmodified lines
404404 #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228)
405405 #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229)
406406
407+/* CIDs for the FWHT codec as used by the vicodec driver. */
408+#define V4L2_CID_FWHT_I_FRAME_QP (V4L2_CID_MPEG_BASE + 290)
409+#define V4L2_CID_FWHT_P_FRAME_QP (V4L2_CID_MPEG_BASE + 291)
410+
407411 #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
408412 #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
409413 #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302)
@@ -535,6 +539,10 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type { · 125 unmodified lines
535539 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382)
536540 #define V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (V4L2_CID_MPEG_BASE+383)
537541 #define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (V4L2_CID_MPEG_BASE+384)
542+#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (V4L2_CID_MPEG_BASE+385)
543+#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (V4L2_CID_MPEG_BASE+386)
544+#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (V4L2_CID_MPEG_BASE+387)
545+#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (V4L2_CID_MPEG_BASE+388)
538546 #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
539547 #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
540548 #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
include/uapi/linux/vfio.h+4−0
@@ -353,6 +353,10 @@ struct vfio_region_gfx_edid { · 352 unmodified lines
353353 #define VFIO_DEVICE_GFX_LINK_STATE_DOWN 2
354354 };
355355
356+#define VFIO_REGION_TYPE_CCW (2)
357+/* ccw sub-types */
358+#define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1)
359+
356360 /*
357361 * 10de vendor sub-type
358362 *
include/uapi/linux/vfio_ccw.h+12−0
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212
1313 #include <linux/types.h>
1414
15+/* used for START SUBCHANNEL, always present */
1516 struct ccw_io_region {
1617 #define ORB_AREA_SIZE 12
1718 __u8 orb_area[ORB_AREA_SIZE];
@@ -22,4 +23,15 @@ struct ccw_io_region { · 4 unmodified lines
2223 __u32 ret_code;
2324 } __packed;
2425
26+/*
27+ * used for processing commands that trigger asynchronous actions
28+ * Note: this is controlled by a capability
29+ */
30+#define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0)
31+#define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1)
32+struct ccw_cmd_region {
33+ __u32 command;
34+ __u32 ret_code;
35+} __packed;
36+
2537 #endif
include/uapi/linux/videodev2.h+17−0
@@ -514,9 +514,21 @@ struct v4l2_pix_format { · 513 unmodified lines
514514 #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */
515515 #define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */
516516 #define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */
517+#define V4L2_PIX_FMT_RGBA444 v4l2_fourcc('R', 'A', '1', '2') /* 16 rrrrgggg bbbbaaaa */
518+#define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */
519+#define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */
520+#define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */
521+#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('B', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */
522+#define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */
517523 #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
518524 #define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */
519525 #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */
526+#define V4L2_PIX_FMT_RGBA555 v4l2_fourcc('R', 'A', '1', '5') /* 16 RGBA-5-5-5-1 */
527+#define V4L2_PIX_FMT_RGBX555 v4l2_fourcc('R', 'X', '1', '5') /* 16 RGBX-5-5-5-1 */
528+#define V4L2_PIX_FMT_ABGR555 v4l2_fourcc('A', 'B', '1', '5') /* 16 ABGR-1-5-5-5 */
529+#define V4L2_PIX_FMT_XBGR555 v4l2_fourcc('X', 'B', '1', '5') /* 16 XBGR-1-5-5-5 */
530+#define V4L2_PIX_FMT_BGRA555 v4l2_fourcc('B', 'A', '1', '5') /* 16 BGRA-5-5-5-1 */
531+#define V4L2_PIX_FMT_BGRX555 v4l2_fourcc('B', 'X', '1', '5') /* 16 BGRX-5-5-5-1 */
520532 #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
521533 #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
522534 #define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */
@@ -528,7 +540,11 @@ struct v4l2_pix_format { · 5 unmodified lines
528540 #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
529541 #define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */
530542 #define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */
543+#define V4L2_PIX_FMT_BGRA32 v4l2_fourcc('R', 'A', '2', '4') /* 32 ABGR-8-8-8-8 */
544+#define V4L2_PIX_FMT_BGRX32 v4l2_fourcc('R', 'X', '2', '4') /* 32 XBGR-8-8-8-8 */
531545 #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
546+#define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4') /* 32 RGBA-8-8-8-8 */
547+#define V4L2_PIX_FMT_RGBX32 v4l2_fourcc('X', 'B', '2', '4') /* 32 RGBX-8-8-8-8 */
532548 #define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */
533549 #define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */
534550
@@ -669,6 +685,7 @@ struct v4l2_pix_format { · 134 unmodified lines
669685 #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */
670686 #define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */
671687 #define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */
688+#define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */
672689
673690 /* Vendor-specific formats */
674691 #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
include/uapi/misc/habanalabs.h+149−12
@@ -20,8 +20,8 @@ · 19 unmodified lines
2020 /*
2121 * Queue Numbering
2222 *
23− * The external queues (DMA channels + CPU) MUST be before the internal queues
24− * and each group (DMA channels + CPU and internal) must be contiguous inside
23+ * The external queues (PCI DMA channels) MUST be before the internal queues
24+ * and each group (PCI DMA channels and internal) must be contiguous inside
2525 * itself but there can be a gap between the two groups (although not
2626 * recommended)
2727 */
@@ -33,7 +33,7 @@ enum goya_queue_id { · 5 unmodified lines
3333 GOYA_QUEUE_ID_DMA_3,
3434 GOYA_QUEUE_ID_DMA_4,
3535 GOYA_QUEUE_ID_CPU_PQ,
36− GOYA_QUEUE_ID_MME,
36+ GOYA_QUEUE_ID_MME, /* Internal queues start here */
3737 GOYA_QUEUE_ID_TPC0,
3838 GOYA_QUEUE_ID_TPC1,
3939 GOYA_QUEUE_ID_TPC2,
@@ -45,11 +45,18 @@ enum goya_queue_id { · 5 unmodified lines
4545 GOYA_QUEUE_ID_SIZE
4646 };
4747
48+enum hl_device_status {
49+ HL_DEVICE_STATUS_OPERATIONAL,
50+ HL_DEVICE_STATUS_IN_RESET,
51+ HL_DEVICE_STATUS_MALFUNCTION
52+};
53+
4854 /* Opcode for management ioctl */
4955 #define HL_INFO_HW_IP_INFO 0
5056 #define HL_INFO_HW_EVENTS 1
5157 #define HL_INFO_DRAM_USAGE 2
5258 #define HL_INFO_HW_IDLE 3
59+#define HL_INFO_DEVICE_STATUS 4
5360
5461 #define HL_INFO_VERSION_MAX_LEN 128
5562
@@ -82,6 +89,11 @@ struct hl_info_hw_idle { · 26 unmodified lines
8289 __u32 pad;
8390 };
8491
92+struct hl_info_device_status {
93+ __u32 status;
94+ __u32 pad;
95+};
96+
8597 struct hl_info_args {
8698 /* Location of relevant struct in userspace */
8799 __u64 return_pointer;
@@ -181,7 +193,10 @@ struct hl_cs_in { · 93 unmodified lines
181193 };
182194
183195 struct hl_cs_out {
184− /* this holds the sequence number of the CS to pass to wait ioctl */
196+ /*
197+ * seq holds the sequence number of the CS to pass to wait ioctl. All
198+ * values are valid except for 0 and ULLONG_MAX
199+ */
185200 __u64 seq;
186201 /* HL_CS_STATUS_* */
187202 __u32 status;
@@ -320,6 +335,110 @@ union hl_mem_args { · 132 unmodified lines
320335 struct hl_mem_out out;
321336 };
322337
338+#define HL_DEBUG_MAX_AUX_VALUES 10
339+
340+struct hl_debug_params_etr {
341+ /* Address in memory to allocate buffer */
342+ __u64 buffer_address;
343+
344+ /* Size of buffer to allocate */
345+ __u64 buffer_size;
346+
347+ /* Sink operation mode: SW fifo, HW fifo, Circular buffer */
348+ __u32 sink_mode;
349+ __u32 pad;
350+};
351+
352+struct hl_debug_params_etf {
353+ /* Address in memory to allocate buffer */
354+ __u64 buffer_address;
355+
356+ /* Size of buffer to allocate */
357+ __u64 buffer_size;
358+
359+ /* Sink operation mode: SW fifo, HW fifo, Circular buffer */
360+ __u32 sink_mode;
361+ __u32 pad;
362+};
363+
364+struct hl_debug_params_stm {
365+ /* Two bit masks for HW event and Stimulus Port */
366+ __u64 he_mask;
367+ __u64 sp_mask;
368+
369+ /* Trace source ID */
370+ __u32 id;
371+
372+ /* Frequency for the timestamp register */
373+ __u32 frequency;
374+};
375+
376+struct hl_debug_params_bmon {
377+ /* Two address ranges that the user can request to filter */
378+ __u64 start_addr0;
379+ __u64 addr_mask0;
380+
381+ __u64 start_addr1;
382+ __u64 addr_mask1;
383+
384+ /* Capture window configuration */
385+ __u32 bw_win;
386+ __u32 win_capture;
387+
388+ /* Trace source ID */
389+ __u32 id;
390+ __u32 pad;
391+};
392+
393+struct hl_debug_params_spmu {
394+ /* Event types selection */
395+ __u64 event_types[HL_DEBUG_MAX_AUX_VALUES];
396+
397+ /* Number of event types selection */
398+ __u32 event_types_num;
399+ __u32 pad;
400+};
401+
402+/* Opcode for ETR component */
403+#define HL_DEBUG_OP_ETR 0
404+/* Opcode for ETF component */
405+#define HL_DEBUG_OP_ETF 1
406+/* Opcode for STM component */
407+#define HL_DEBUG_OP_STM 2
408+/* Opcode for FUNNEL component */
409+#define HL_DEBUG_OP_FUNNEL 3
410+/* Opcode for BMON component */
411+#define HL_DEBUG_OP_BMON 4
412+/* Opcode for SPMU component */
413+#define HL_DEBUG_OP_SPMU 5
414+/* Opcode for timestamp */
415+#define HL_DEBUG_OP_TIMESTAMP 6
416+
417+struct hl_debug_args {
418+ /*
419+ * Pointer to user input structure.
420+ * This field is relevant to specific opcodes.
421+ */
422+ __u64 input_ptr;
423+ /* Pointer to user output structure */
424+ __u64 output_ptr;
425+ /* Size of user input structure */
426+ __u32 input_size;
427+ /* Size of user output structure */
428+ __u32 output_size;
429+ /* HL_DEBUG_OP_* */
430+ __u32 op;
431+ /*
432+ * Register index in the component, taken from the debug_regs_index enum
433+ * in the various ASIC header files
434+ */
435+ __u32 reg_idx;
436+ /* Enable/disable */
437+ __u32 enable;
438+ /* Context ID - Currently not in use */
439+ __u32 ctx_id;
440+};
441+
323442 /*
324443 * Various information operations such as:
325444 * - H/W IP information
@@ -361,6 +480,12 @@ union hl_mem_args { · 35 unmodified lines
361480 * Each JOB will be enqueued on a specific queue, according to the user's input.
362481 * There can be more then one JOB per queue.
363482 *
483+ * The CS IOCTL will receive three sets of JOBS. One set is for "restore" phase,
484+ * a second set is for "execution" phase and a third set is for "store" phase.
485+ * The JOBS on the "restore" phase are enqueued only after context-switch
486+ * (or if its the first CS for this context). The user can also order the
487+ * driver to run the "restore" phase explicitly
488+ *
364489 * There are two types of queues - external and internal. External queues
365490 * are DMA queues which transfer data from/to the Host. All other queues are
366491 * internal. The driver will get completion notifications from the device only
@@ -377,19 +502,18 @@ union hl_mem_args { · 10 unmodified lines
377502 * relevant queues. Therefore, the user mustn't assume the CS has been completed
378503 * or has even started to execute.
379504 *
380− * Upon successful enqueue, the IOCTL returns an opaque handle which the user
505+ * Upon successful enqueue, the IOCTL returns a sequence number which the user
381506 * can use with the "Wait for CS" IOCTL to check whether the handle's CS
382507 * external JOBS have been completed. Note that if the CS has internal JOBS
383508 * which can execute AFTER the external JOBS have finished, the driver might
384509 * report that the CS has finished executing BEFORE the internal JOBS have
385510 * actually finish executing.
386511 *
387− * The CS IOCTL will receive three sets of JOBS. One set is for "restore" phase,
388− * a second set is for "execution" phase and a third set is for "store" phase.
389− * The JOBS on the "restore" phase are enqueued only after context-switch
390− * (or if its the first CS for this context). The user can also order the
391− * driver to run the "restore" phase explicitly
392− *
512+ * Even though the sequence number increments per CS, the user can NOT
513+ * automatically assume that if CS with sequence number N finished, then CS
514+ * with sequence number N-1 also finished. The user can make this assumption if
515+ * and only if CS N and CS N-1 are exactly the same (same CBs for the same
516+ * queues).
393517 */
394518 #define HL_IOCTL_CS \
395519 _IOWR('H', 0x03, union hl_cs_args)
@@ -444,7 +568,20 @@ union hl_mem_args { · 48 unmodified lines
444568 #define HL_IOCTL_MEMORY \
445569 _IOWR('H', 0x05, union hl_mem_args)
446570
571+/*
572+ * Debug
573+ * - Enable/disable the ETR/ETF/FUNNEL/STM/BMON/SPMU debug traces
574+ *
575+ * This IOCTL allows the user to get debug traces from the chip.
576+ *
577+ * The user needs to provide the register index and essential data such as
578+ * buffer address and size.
579+ *
580+ */
581+#define HL_IOCTL_DEBUG \
582+ _IOWR('H', 0x06, struct hl_debug_args)
583+
447584 #define HL_COMMAND_START 0x01
448−#define HL_COMMAND_END 0x06
585+#define HL_COMMAND_END 0x07
449586
450587 #endif /* HABANALABS_H_ */
include/uapi/rdma/efa-abi.h+101−0
@@ -0,0 +1,101 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
2+/*
3+ * Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All rights reserved.
4+ */
5+
6+#ifndef EFA_ABI_USER_H
7+#define EFA_ABI_USER_H
8+
9+#include <linux/types.h>
10+
11+/*
12+ * Increment this value if any changes that break userspace ABI
13+ * compatibility are made.
14+ */
15+#define EFA_UVERBS_ABI_VERSION 1
16+
17+/*
18+ * Keep structs aligned to 8 bytes.
19+ * Keep reserved fields as arrays of __u8 named reserved_XXX where XXX is the
20+ * hex bit offset of the field.
21+ */
22+
23+enum efa_ibv_user_cmds_supp_udata {
24+ EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0,
25+ EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1,
26+};
27+
28+struct efa_ibv_alloc_ucontext_resp {
29+ __u32 comp_mask;
30+ __u32 cmds_supp_udata_mask;
31+ __u16 sub_cqs_per_cq;
32+ __u16 inline_buf_size;
33+ __u32 max_llq_size; /* bytes */
34+};
35+
36+struct efa_ibv_alloc_pd_resp {
37+ __u32 comp_mask;
38+ __u16 pdn;
39+ __u8 reserved_30[2];
40+};
41+
42+struct efa_ibv_create_cq {
43+ __u32 comp_mask;
44+ __u32 cq_entry_size;
45+ __u16 num_sub_cqs;
46+ __u8 reserved_50[6];
47+};
48+
49+struct efa_ibv_create_cq_resp {
50+ __u32 comp_mask;
51+ __u8 reserved_20[4];
52+ __aligned_u64 q_mmap_key;
53+ __aligned_u64 q_mmap_size;
54+ __u16 cq_idx;
55+ __u8 reserved_d0[6];
56+};
57+
58+enum {
59+ EFA_QP_DRIVER_TYPE_SRD = 0,
60+};
61+
62+struct efa_ibv_create_qp {
63+ __u32 comp_mask;
64+ __u32 rq_ring_size; /* bytes */
65+ __u32 sq_ring_size; /* bytes */
66+ __u32 driver_qp_type;
67+};
68+
69+struct efa_ibv_create_qp_resp {
70+ __u32 comp_mask;
71+ /* the offset inside the page of the rq db */
72+ __u32 rq_db_offset;
73+ /* the offset inside the page of the sq db */
74+ __u32 sq_db_offset;
75+ /* the offset inside the page of descriptors buffer */
76+ __u32 llq_desc_offset;
77+ __aligned_u64 rq_mmap_key;
78+ __aligned_u64 rq_mmap_size;
79+ __aligned_u64 rq_db_mmap_key;
80+ __aligned_u64 sq_db_mmap_key;
81+ __aligned_u64 llq_desc_mmap_key;
82+ __u16 send_sub_cq_idx;
83+ __u16 recv_sub_cq_idx;
84+ __u8 reserved_1e0[4];
85+};
86+
87+struct efa_ibv_create_ah_resp {
88+ __u32 comp_mask;
89+ __u16 efa_address_handle;
90+ __u8 reserved_30[2];
91+};
92+
93+struct efa_ibv_ex_query_device_resp {
94+ __u32 comp_mask;
95+ __u32 max_sq_wr;
96+ __u32 max_rq_wr;
97+ __u16 max_sq_sge;
98+ __u16 max_rq_sge;
99+};
100+
101+#endif /* EFA_ABI_USER_H */
include/uapi/rdma/mlx5-abi.h+3−0
@@ -238,6 +238,7 @@ enum mlx5_ib_query_dev_resp_flags { · 237 unmodified lines
238238 MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0,
239239 MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1,
240240 MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE = 1 << 2,
241+ MLX5_IB_QUERY_DEV_RESP_FLAGS_SCAT2CQE_DCT = 1 << 3,
241242 };
242243
243244 enum mlx5_ib_tunnel_offloads {
@@ -359,6 +360,7 @@ enum mlx5_ib_create_qp_resp_mask { · 115 unmodified lines
359360 MLX5_IB_CREATE_QP_RESP_MASK_TISN = 1UL << 1,
360361 MLX5_IB_CREATE_QP_RESP_MASK_RQN = 1UL << 2,
361362 MLX5_IB_CREATE_QP_RESP_MASK_SQN = 1UL << 3,
363+ MLX5_IB_CREATE_QP_RESP_MASK_TIR_ICM_ADDR = 1UL << 4,
362364 };
363365
364366 struct mlx5_ib_create_qp_resp {
@@ -370,6 +372,7 @@ struct mlx5_ib_create_qp_resp { · 5 unmodified lines
370372 __u32 rqn;
371373 __u32 sqn;
372374 __u32 reserved1;
375+ __u64 tir_icm_addr;
373376 };
374377
375378 struct mlx5_ib_alloc_mw {
include/uapi/rdma/mlx5_user_ioctl_cmds.h+2−0
@@ -44,6 +44,7 @@ enum mlx5_ib_create_flow_action_attrs { · 43 unmodified lines
4444 enum mlx5_ib_alloc_dm_attrs {
4545 MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT),
4646 MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX,
47+ MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE,
4748 };
4849
4950 enum mlx5_ib_devx_methods {
@@ -144,6 +145,7 @@ enum mlx5_ib_flow_matcher_create_attrs { · 94 unmodified lines
144145 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE,
145146 MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA,
146147 MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS,
148+ MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE,
147149 };
148150
149151 enum mlx5_ib_flow_matcher_destroy_attrs {
include/uapi/rdma/mlx5_user_ioctl_verbs.h+7−0
@@ -42,6 +42,7 @@ enum mlx5_ib_uapi_flow_action_flags { · 41 unmodified lines
4242 enum mlx5_ib_uapi_flow_table_type {
4343 MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX = 0x0,
4444 MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1,
45+ MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB = 0x2,
4546 };
4647
4748 enum mlx5_ib_uapi_flow_action_packet_reformat_type {
@@ -56,5 +57,11 @@ struct mlx5_ib_uapi_devx_async_cmd_hdr { · 8 unmodified lines
5657 __u8 out_data[];
5758 };
5859
60+enum mlx5_ib_uapi_dm_type {
61+ MLX5_IB_UAPI_DM_TYPE_MEMIC,
62+ MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM,
63+ MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM,
64+};
65+
5966 #endif
6067
include/uapi/rdma/rdma_netlink.h+19−12
@@ -49,17 +49,6 @@ enum { · 48 unmodified lines
4949 RDMA_NL_IWPM_NUM_OPS
5050 };
5151
52−struct rdma_cm_id_stats {
53− __u32 qp_num;
54− __u32 bound_dev_if;
55− __u32 port_space;
56− __s32 pid;
57− __u8 cm_state;
58− __u8 node_type;
59− __u8 port_num;
60− __u8 qp_type;
61−};
62−
6352 enum {
6453 IWPM_NLA_REG_PID_UNSPEC = 0,
6554 IWPM_NLA_REG_PID_SEQ,
@@ -261,7 +250,10 @@ enum rdma_nldev_command { · 195 unmodified lines
261250
262251 RDMA_NLDEV_CMD_PORT_GET, /* can dump */
263252
264− /* 6 - 8 are free to use */
253+ RDMA_NLDEV_CMD_SYS_GET,
254+ RDMA_NLDEV_CMD_SYS_SET,
255+
256+ /* 8 is free to use */
265257
266258 RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */
267259
@@ -472,6 +464,21 @@ enum rdma_nldev_attr { · 204 unmodified lines
472464 */
473465 RDMA_NLDEV_ATTR_LINK_TYPE, /* string */
474466
467+ /*
468+ * net namespace mode for rdma subsystem:
469+ * either shared or exclusive among multiple net namespaces.
470+ */
471+ RDMA_NLDEV_SYS_ATTR_NETNS_MODE, /* u8 */
472+ /*
473+ * Device protocol, e.g. ib, iw, usnic, roce and opa
474+ */
475+ RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */
476+
477+ /*
478+ * File descriptor handle of the net namespace object
479+ */
480+ RDMA_NLDEV_NET_NS_FD, /* u32 */
481+
475482 /*
476483 * Always the end
477484 */
include/uapi/rdma/rdma_user_ioctl_cmds.h+1−0
@@ -102,6 +102,7 @@ enum rdma_driver_id { · 101 unmodified lines
102102 RDMA_DRIVER_RXE,
103103 RDMA_DRIVER_HFI1,
104104 RDMA_DRIVER_QIB,
105+ RDMA_DRIVER_EFA,
105106 };
106107
107108 #endif
include/uapi/scsi/fc/fc_els.h+33−0
@@ -52,6 +52,7 @@ enum fc_els_cmd { · 51 unmodified lines
5252 ELS_RRQ = 0x12, /* reinstate recovery qualifier */
5353 ELS_REC = 0x13, /* read exchange concise */
5454 ELS_SRR = 0x14, /* sequence retransmission request */
55+ ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */
5556 ELS_PRLI = 0x20, /* process login */
5657 ELS_PRLO = 0x21, /* process logout */
5758 ELS_SCN = 0x22, /* state change notification */
@@ -119,6 +120,7 @@ enum fc_els_cmd { · 61 unmodified lines
119120 [ELS_RRQ] = "RRQ", \
120121 [ELS_REC] = "REC", \
121122 [ELS_SRR] = "SRR", \
123+ [ELS_FPIN] = "FPIN", \
122124 [ELS_PRLI] = "PRLI", \
123125 [ELS_PRLO] = "PRLO", \
124126 [ELS_SCN] = "SCN", \
@@ -829,4 +831,35 @@ enum fc_els_clid_ic { · 704 unmodified lines
829831 ELS_CLID_IC_LIP = 8, /* receiving LIP */
830832 };
831833
834+
835+/*
836+ * Fabric Notification Descriptor Tag values
837+ */
838+enum fc_fn_dtag {
839+ ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001, /* Link Integrity */
840+ ELS_FN_DTAG_PEER_CONGEST = 0x00020003, /* Peer Congestion */
841+ ELS_FN_DTAG_CONGESTION = 0x00020004, /* Congestion */
842+};
843+
844+/*
845+ * Fabric Notification Descriptor
846+ */
847+struct fc_fn_desc {
848+ __be32 fn_desc_tag; /* Notification Descriptor Tag */
849+ __be32 fn_desc_value_len; /* Length of Descriptor Value field
850+ * (in bytes)
851+ */
852+ __u8 fn_desc_value[0]; /* Descriptor Value */
853+};
854+
855+/*
856+ * ELS_FPIN - Fabric Performance Impact Notification
857+ */
858+struct fc_els_fpin {
859+ __u8 fpin_cmd; /* command (0x16) */
860+ __u8 fpin_zero[3]; /* specified as zero - part of cmd */
861+ __be32 fpin_desc_cnt; /* count of descriptors */
862+ struct fc_fn_desc fpin_desc[0]; /* Descriptor list */
863+};
864+
832865 #endif /* _FC_ELS_H_ */
include/uapi/sound/sof/abi.h+62−0
@@ -0,0 +1,62 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * This file is provided under a dual BSD/GPLv2 license. When using or
4+ * redistributing this file, you may do so under either license.
5+ *
6+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
7+ */
8+
9+/**
10+ * SOF ABI versioning is based on Semantic Versioning where we have a given
11+ * MAJOR.MINOR.PATCH version number. See https://semver.org/
12+ *
13+ * Rules for incrementing or changing version :-
14+ *
15+ * 1) Increment MAJOR version if you make incompatible API changes. MINOR and
16+ * PATCH should be reset to 0.
17+ *
18+ * 2) Increment MINOR version if you add backwards compatible features or
19+ * changes. PATCH should be reset to 0.
20+ *
21+ * 3) Increment PATCH version if you add backwards compatible bug fixes.
22+ */
23+
24+#ifndef __INCLUDE_UAPI_SOUND_SOF_ABI_H__
25+#define __INCLUDE_UAPI_SOUND_SOF_ABI_H__
26+
27+/* SOF ABI version major, minor and patch numbers */
28+#define SOF_ABI_MAJOR 3
29+#define SOF_ABI_MINOR 4
30+#define SOF_ABI_PATCH 0
31+
32+/* SOF ABI version number. Format within 32bit word is MMmmmppp */
33+#define SOF_ABI_MAJOR_SHIFT 24
34+#define SOF_ABI_MAJOR_MASK 0xff
35+#define SOF_ABI_MINOR_SHIFT 12
36+#define SOF_ABI_MINOR_MASK 0xfff
37+#define SOF_ABI_PATCH_SHIFT 0
38+#define SOF_ABI_PATCH_MASK 0xfff
39+
40+#define SOF_ABI_VER(major, minor, patch) \
41+ (((major) << SOF_ABI_MAJOR_SHIFT) | \
42+ ((minor) << SOF_ABI_MINOR_SHIFT) | \
43+ ((patch) << SOF_ABI_PATCH_SHIFT))
44+
45+#define SOF_ABI_VERSION_MAJOR(version) \
46+ (((version) >> SOF_ABI_MAJOR_SHIFT) & SOF_ABI_MAJOR_MASK)
47+#define SOF_ABI_VERSION_MINOR(version) \
48+ (((version) >> SOF_ABI_MINOR_SHIFT) & SOF_ABI_MINOR_MASK)
49+#define SOF_ABI_VERSION_PATCH(version) \
50+ (((version) >> SOF_ABI_PATCH_SHIFT) & SOF_ABI_PATCH_MASK)
51+
52+#define SOF_ABI_VERSION_INCOMPATIBLE(sof_ver, client_ver) \
53+ (SOF_ABI_VERSION_MAJOR((sof_ver)) != \
54+ SOF_ABI_VERSION_MAJOR((client_ver)) \
55+ )
56+
57+#define SOF_ABI_VERSION SOF_ABI_VER(SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH)
58+
59+/* SOF ABI magic number "SOF\0". */
60+#define SOF_ABI_MAGIC 0x00464F53
61+
62+#endif
include/uapi/sound/sof/eq.h+172−0
@@ -0,0 +1,172 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * This file is provided under a dual BSD/GPLv2 license. When using or
4+ * redistributing this file, you may do so under either license.
5+ *
6+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
7+ */
8+
9+#ifndef __INCLUDE_UAPI_SOUND_SOF_USER_EQ_H__
10+#define __INCLUDE_UAPI_SOUND_SOF_USER_EQ_H__
11+
12+/* FIR EQ type */
13+
14+#define SOF_EQ_FIR_IDX_SWITCH 0
15+
16+#define SOF_EQ_FIR_MAX_SIZE 4096 /* Max size allowed for coef data in bytes */
17+
18+#define SOF_EQ_FIR_MAX_LENGTH 192 /* Max length for individual filter */
19+
20+#define SOF_EQ_FIR_MAX_RESPONSES 8 /* A blob can define max 8 FIR EQs */
21+
22+/*
23+ * eq_fir_configuration data structure contains this information
24+ * uint32_t size
25+ * This is the number of bytes need to store the received EQ
26+ * configuration.
27+ * uint16_t channels_in_config
28+ * This describes the number of channels in this EQ config data. It
29+ * can be different from PLATFORM_MAX_CHANNELS.
30+ * uint16_t number_of_responses
31+ * 0=no responses, 1=one response defined, 2=two responses defined, etc.
32+ * int16_t data[]
33+ * assign_response[channels_in_config]
34+ * 0 = use first response, 1 = use 2nd response, etc.
35+ * E.g. {0, 0, 0, 0, 1, 1, 1, 1} would apply to channels 0-3 the
36+ * same first defined response and for to channels 4-7 the second.
37+ * coef_data[]
38+ * Repeated data
39+ * { filter_length, output_shift, h[] }
40+ * for every EQ response defined where vector h has filter_length
41+ * number of coefficients. Coefficients in h[] are in Q1.15 format.
42+ * E.g. 16384 (Q1.15) = 0.5. The shifts are number of right shifts.
43+ *
44+ * NOTE: The channels_in_config must be even to have coef_data aligned to
45+ * 32 bit word in RAM. Therefore a mono EQ assign must be duplicated to 2ch
46+ * even if it would never used. Similarly a 5ch EQ assign must be increased
47+ * to 6ch. EQ init will return an error if this is not met.
48+ *
49+ * NOTE: The filter_length must be multiple of four. Therefore the filter must
50+ * be padded from the end with zeros have this condition met.
51+ */
52+
53+struct sof_eq_fir_config {
54+ uint32_t size;
55+ uint16_t channels_in_config;
56+ uint16_t number_of_responses;
57+
58+ /* reserved */
59+ uint32_t reserved[4];
60+
61+ int16_t data[];
62+} __packed;
63+
64+struct sof_eq_fir_coef_data {
65+ int16_t length; /* Number of FIR taps */
66+ int16_t out_shift; /* Amount of right shifts at output */
67+
68+ /* reserved */
69+ uint32_t reserved[4];
70+
71+ int16_t coef[]; /* FIR coefficients */
72+} __packed;
73+
74+/* In the struct above there's two 16 bit words (length, shift) and four
75+ * reserved 32 bit words before the actual FIR coefficients. This information
76+ * is used in parsing of the configuration blob.
77+ */
78+#define SOF_EQ_FIR_COEF_NHEADER \
79+ (sizeof(struct sof_eq_fir_coef_data) / sizeof(int16_t))
80+
81+/* IIR EQ type */
82+
83+#define SOF_EQ_IIR_IDX_SWITCH 0
84+
85+#define SOF_EQ_IIR_MAX_SIZE 1024 /* Max size allowed for coef data in bytes */
86+
87+#define SOF_EQ_IIR_MAX_RESPONSES 8 /* A blob can define max 8 IIR EQs */
88+
89+/* eq_iir_configuration
90+ * uint32_t channels_in_config
91+ * This describes the number of channels in this EQ config data. It
92+ * can be different from PLATFORM_MAX_CHANNELS.
93+ * uint32_t number_of_responses_defined
94+ * 0=no responses, 1=one response defined, 2=two responses defined, etc.
95+ * int32_t data[]
96+ * Data consist of two parts. First is the response assign vector that
97+ * has length of channels_in_config. The latter part is coefficient
98+ * data.
99+ * uint32_t assign_response[channels_in_config]
100+ * -1 = not defined, 0 = use first response, 1 = use 2nd, etc.
101+ * E.g. {0, 0, 0, 0, -1, -1, -1, -1} would apply to channels 0-3 the
102+ * same first defined response and leave channels 4-7 unequalized.
103+ * coefficient_data[]
104+ * <1st EQ>
105+ * uint32_t num_biquads
106+ * uint32_t num_biquads_in_series
107+ * <1st biquad>
108+ * int32_t coef_a2 Q2.30 format
109+ * int32_t coef_a1 Q2.30 format
110+ * int32_t coef_b2 Q2.30 format
111+ * int32_t coef_b1 Q2.30 format
112+ * int32_t coef_b0 Q2.30 format
113+ * int32_t output_shift number of shifts right, shift left is negative
114+ * int32_t output_gain Q2.14 format
115+ * <2nd biquad>
116+ * ...
117+ * <2nd EQ>
118+ *
119+ * Note: A flat response biquad can be made with a section set to
120+ * b0 = 1.0, gain = 1.0, and other parameters set to 0
121+ * {0, 0, 0, 0, 1073741824, 0, 16484}
122+ */
123+
124+struct sof_eq_iir_config {
125+ uint32_t size;
126+ uint32_t channels_in_config;
127+ uint32_t number_of_responses;
128+
129+ /* reserved */
130+ uint32_t reserved[4];
131+
132+ int32_t data[]; /* eq_assign[channels], eq 0, eq 1, ... */
133+} __packed;
134+
135+struct sof_eq_iir_header_df2t {
136+ uint32_t num_sections;
137+ uint32_t num_sections_in_series;
138+
139+ /* reserved */
140+ uint32_t reserved[4];
141+
142+ int32_t biquads[]; /* Repeated biquad coefficients */
143+} __packed;
144+
145+struct sof_eq_iir_biquad_df2t {
146+ int32_t a2; /* Q2.30 */
147+ int32_t a1; /* Q2.30 */
148+ int32_t b2; /* Q2.30 */
149+ int32_t b1; /* Q2.30 */
150+ int32_t b0; /* Q2.30 */
151+ int32_t output_shift; /* Number of right shifts */
152+ int32_t output_gain; /* Q2.14 */
153+} __packed;
154+
155+/* A full 22th order equalizer with 11 biquads cover octave bands 1-11 in
156+ * in the 0 - 20 kHz bandwidth.
157+ */
158+#define SOF_EQ_IIR_DF2T_BIQUADS_MAX 11
159+
160+/* The number of int32_t words in sof_eq_iir_header_df2t:
161+ * num_sections, num_sections_in_series, reserved[4]
162+ */
163+#define SOF_EQ_IIR_NHEADER_DF2T \
164+ (sizeof(struct sof_eq_iir_header_df2t) / sizeof(int32_t))
165+
166+/* The number of int32_t words in sof_eq_iir_biquad_df2t:
167+ * a2, a1, b2, b1, b0, output_shift, output_gain
168+ */
169+#define SOF_EQ_IIR_NBIQUAD_DF2T \
170+ (sizeof(struct sof_eq_iir_biquad_df2t) / sizeof(int32_t))
171+
172+#endif
include/uapi/sound/sof/fw.h+78−0
@@ -0,0 +1,78 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * This file is provided under a dual BSD/GPLv2 license. When using or
4+ * redistributing this file, you may do so under either license.
5+ *
6+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
7+ */
8+
9+/*
10+ * Firmware file format .
11+ */
12+
13+#ifndef __INCLUDE_UAPI_SOF_FW_H__
14+#define __INCLUDE_UAPI_SOF_FW_H__
15+
16+#define SND_SOF_FW_SIG_SIZE 4
17+#define SND_SOF_FW_ABI 1
18+#define SND_SOF_FW_SIG "Reef"
19+
20+/*
21+ * Firmware module is made up of 1 . N blocks of different types. The
22+ * Block header is used to determine where and how block is to be copied in the
23+ * DSP/host memory space.
24+ */
25+enum snd_sof_fw_blk_type {
26+ SOF_FW_BLK_TYPE_INVALID = -1,
27+ SOF_FW_BLK_TYPE_START = 0,
28+ SOF_FW_BLK_TYPE_RSRVD0 = SOF_FW_BLK_TYPE_START,
29+ SOF_FW_BLK_TYPE_IRAM = 1, /* local instruction RAM */
30+ SOF_FW_BLK_TYPE_DRAM = 2, /* local data RAM */
31+ SOF_FW_BLK_TYPE_SRAM = 3, /* system RAM */
32+ SOF_FW_BLK_TYPE_ROM = 4,
33+ SOF_FW_BLK_TYPE_IMR = 5,
34+ SOF_FW_BLK_TYPE_RSRVD6 = 6,
35+ SOF_FW_BLK_TYPE_RSRVD7 = 7,
36+ SOF_FW_BLK_TYPE_RSRVD8 = 8,
37+ SOF_FW_BLK_TYPE_RSRVD9 = 9,
38+ SOF_FW_BLK_TYPE_RSRVD10 = 10,
39+ SOF_FW_BLK_TYPE_RSRVD11 = 11,
40+ SOF_FW_BLK_TYPE_RSRVD12 = 12,
41+ SOF_FW_BLK_TYPE_RSRVD13 = 13,
42+ SOF_FW_BLK_TYPE_RSRVD14 = 14,
43+ /* use SOF_FW_BLK_TYPE_RSVRDX for new block types */
44+ SOF_FW_BLK_TYPE_NUM
45+};
46+
47+struct snd_sof_blk_hdr {
48+ enum snd_sof_fw_blk_type type;
49+ uint32_t size; /* bytes minus this header */
50+ uint32_t offset; /* offset from base */
51+} __packed;
52+
53+/*
54+ * Firmware file is made up of 1 .. N different modules types. The module
55+ * type is used to determine how to load and parse the module.
56+ */
57+enum snd_sof_fw_mod_type {
58+ SOF_FW_BASE = 0, /* base firmware image */
59+ SOF_FW_MODULE = 1, /* firmware module */
60+};
61+
62+struct snd_sof_mod_hdr {
63+ enum snd_sof_fw_mod_type type;
64+ uint32_t size; /* bytes minus this header */
65+ uint32_t num_blocks; /* number of blocks */
66+} __packed;
67+
68+/*
69+ * Firmware file header.
70+ */
71+struct snd_sof_fw_header {
72+ unsigned char sig[SND_SOF_FW_SIG_SIZE]; /* "Reef" */
73+ uint32_t file_size; /* size of file minus this header */
74+ uint32_t num_modules; /* number of modules */
75+ uint32_t abi; /* version of header format */
76+} __packed;
77+
78+#endif
include/uapi/sound/sof/header.h+27−0
@@ -0,0 +1,27 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * This file is provided under a dual BSD/GPLv2 license. When using or
4+ * redistributing this file, you may do so under either license.
5+ *
6+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
7+ */
8+
9+#ifndef __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__
10+#define __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__
11+
12+/*
13+ * Header for all non IPC ABI data.
14+ *
15+ * Identifies data type, size and ABI.
16+ * Used by any bespoke component data structures or binary blobs.
17+ */
18+struct sof_abi_hdr {
19+ uint32_t magic; /**< 'S', 'O', 'F', '\0' */
20+ uint32_t type; /**< component specific type */
21+ uint32_t size; /**< size in bytes of data excl. this struct */
22+ uint32_t abi; /**< SOF ABI version */
23+ uint32_t reserved[4]; /**< reserved for future use */
24+ uint32_t data[0]; /**< Component data - opaque to core */
25+} __packed;
26+
27+#endif
include/uapi/sound/sof/manifest.h+188−0
@@ -0,0 +1,188 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * This file is provided under a dual BSD/GPLv2 license. When using or
4+ * redistributing this file, you may do so under either license.
5+ *
6+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
7+ */
8+
9+#ifndef __INCLUDE_UAPI_SOUND_SOF_USER_MANIFEST_H__
10+#define __INCLUDE_UAPI_SOUND_SOF_USER_MANIFEST_H__
11+
12+/* start offset for base FW module */
13+#define SOF_MAN_ELF_TEXT_OFFSET 0x2000
14+
15+/* FW Extended Manifest Header id = $AE1 */
16+#define SOF_MAN_EXT_HEADER_MAGIC 0x31454124
17+
18+/* module type load type */
19+#define SOF_MAN_MOD_TYPE_BUILTIN 0
20+#define SOF_MAN_MOD_TYPE_MODULE 1
21+
22+struct sof_man_module_type {
23+ uint32_t load_type:4; /* SOF_MAN_MOD_TYPE_ */
24+ uint32_t auto_start:1;
25+ uint32_t domain_ll:1;
26+ uint32_t domain_dp:1;
27+ uint32_t rsvd_:25;
28+};
29+
30+/* segment flags.type */
31+#define SOF_MAN_SEGMENT_TEXT 0
32+#define SOF_MAN_SEGMENT_RODATA 1
33+#define SOF_MAN_SEGMENT_DATA 1
34+#define SOF_MAN_SEGMENT_BSS 2
35+#define SOF_MAN_SEGMENT_EMPTY 15
36+
37+union sof_man_segment_flags {
38+ uint32_t ul;
39+ struct {
40+ uint32_t contents:1;
41+ uint32_t alloc:1;
42+ uint32_t load:1;
43+ uint32_t readonly:1;
44+ uint32_t code:1;
45+ uint32_t data:1;
46+ uint32_t _rsvd0:2;
47+ uint32_t type:4; /* MAN_SEGMENT_ */
48+ uint32_t _rsvd1:4;
49+ uint32_t length:16; /* of segment in pages */
50+ } r;
51+} __packed;
52+
53+/*
54+ * Module segment descriptor. Used by ROM - Immutable.
55+ */
56+struct sof_man_segment_desc {
57+ union sof_man_segment_flags flags;
58+ uint32_t v_base_addr;
59+ uint32_t file_offset;
60+} __packed;
61+
62+/*
63+ * The firmware binary can be split into several modules.
64+ */
65+
66+#define SOF_MAN_MOD_ID_LEN 4
67+#define SOF_MAN_MOD_NAME_LEN 8
68+#define SOF_MAN_MOD_SHA256_LEN 32
69+#define SOF_MAN_MOD_ID {'$', 'A', 'M', 'E'}
70+
71+/*
72+ * Each module has an entry in the FW header. Used by ROM - Immutable.
73+ */
74+struct sof_man_module {
75+ uint8_t struct_id[SOF_MAN_MOD_ID_LEN]; /* SOF_MAN_MOD_ID */
76+ uint8_t name[SOF_MAN_MOD_NAME_LEN];
77+ uint8_t uuid[16];
78+ struct sof_man_module_type type;
79+ uint8_t hash[SOF_MAN_MOD_SHA256_LEN];
80+ uint32_t entry_point;
81+ uint16_t cfg_offset;
82+ uint16_t cfg_count;
83+ uint32_t affinity_mask;
84+ uint16_t instance_max_count; /* max number of instances */
85+ uint16_t instance_bss_size; /* instance (pages) */
86+ struct sof_man_segment_desc segment[3];
87+} __packed;
88+
89+/*
90+ * Each module has a configuration in the FW header. Used by ROM - Immutable.
91+ */
92+struct sof_man_mod_config {
93+ uint32_t par[4]; /* module parameters */
94+ uint32_t is_pages; /* actual size of instance .bss (pages) */
95+ uint32_t cps; /* cycles per second */
96+ uint32_t ibs; /* input buffer size (bytes) */
97+ uint32_t obs; /* output buffer size (bytes) */
98+ uint32_t module_flags; /* flags, reserved for future use */
99+ uint32_t cpc; /* cycles per single run */
100+ uint32_t obls; /* output block size, reserved for future use */
101+} __packed;
102+
103+/*
104+ * FW Manifest Header
105+ */
106+
107+#define SOF_MAN_FW_HDR_FW_NAME_LEN 8
108+#define SOF_MAN_FW_HDR_ID {'$', 'A', 'M', '1'}
109+#define SOF_MAN_FW_HDR_NAME "ADSPFW"
110+#define SOF_MAN_FW_HDR_FLAGS 0x0
111+#define SOF_MAN_FW_HDR_FEATURES 0xff
112+
113+/*
114+ * The firmware has a standard header that is checked by the ROM on firmware
115+ * loading. preload_page_count is used by DMA code loader and is entire
116+ * image size on CNL. i.e. CNL: total size of the binary’s .text and .rodata
117+ * Used by ROM - Immutable.
118+ */
119+struct sof_man_fw_header {
120+ uint8_t header_id[4];
121+ uint32_t header_len;
122+ uint8_t name[SOF_MAN_FW_HDR_FW_NAME_LEN];
123+ /* number of pages of preloaded image loaded by driver */
124+ uint32_t preload_page_count;
125+ uint32_t fw_image_flags;
126+ uint32_t feature_mask;
127+ uint16_t major_version;
128+ uint16_t minor_version;
129+ uint16_t hotfix_version;
130+ uint16_t build_version;
131+ uint32_t num_module_entries;
132+ uint32_t hw_buf_base_addr;
133+ uint32_t hw_buf_length;
134+ /* target address for binary loading as offset in IMR - must be == base offset */
135+ uint32_t load_offset;
136+} __packed;
137+
138+/*
139+ * Firmware manifest descriptor. This can contain N modules and N module
140+ * configs. Used by ROM - Immutable.
141+ */
142+struct sof_man_fw_desc {
143+ struct sof_man_fw_header header;
144+
145+ /* Warning - hack for module arrays. For some unknown reason the we
146+ * have a variable size array of struct man_module followed by a
147+ * variable size array of struct mod_config. These should have been
148+ * merged into a variable array of a parent structure. We have to hack
149+ * around this in many places....
150+ *
151+ * struct sof_man_module man_module[];
152+ * struct sof_man_mod_config mod_config[];
153+ */
154+
155+} __packed;
156+
157+/*
158+ * Component Descriptor. Used by ROM - Immutable.
159+ */
160+struct sof_man_component_desc {
161+ uint32_t reserved[2]; /* all 0 */
162+ uint32_t version;
163+ uint8_t hash[SOF_MAN_MOD_SHA256_LEN];
164+ uint32_t base_offset;
165+ uint32_t limit_offset;
166+ uint32_t attributes[4];
167+} __packed;
168+
169+/*
170+ * Audio DSP extended metadata. Used by ROM - Immutable.
171+ */
172+struct sof_man_adsp_meta_file_ext {
173+ uint32_t ext_type; /* always 17 for ADSP extension */
174+ uint32_t ext_len;
175+ uint32_t imr_type;
176+ uint8_t reserved[16]; /* all 0 */
177+ struct sof_man_component_desc comp_desc[1];
178+} __packed;
179+
180+/*
181+ * Module Manifest for rimage module metadata. Not used by ROM.
182+ */
183+struct sof_man_module_manifest {
184+ struct sof_man_module module;
185+ uint32_t text_size;
186+} __packed;
187+
188+#endif
include/uapi/sound/sof/tokens.h+107−0
@@ -0,0 +1,107 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * This file is provided under a dual BSD/GPLv2 license. When using or
4+ * redistributing this file, you may do so under either license.
5+ *
6+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
7+ * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
8+ * Keyon Jie <yang.jie@linux.intel.com>
9+ */
10+
11+/*
12+ * Topology IDs and tokens.
13+ *
14+ * ** MUST BE ALIGNED WITH TOPOLOGY CONFIGURATION TOKEN VALUES **
15+ */
16+
17+#ifndef __INCLUDE_UAPI_SOF_TOPOLOGY_H__
18+#define __INCLUDE_UAPI_SOF_TOPOLOGY_H__
19+
20+/*
21+ * Kcontrol IDs
22+ */
23+#define SOF_TPLG_KCTL_VOL_ID 256
24+#define SOF_TPLG_KCTL_ENUM_ID 257
25+#define SOF_TPLG_KCTL_BYTES_ID 258
26+#define SOF_TPLG_KCTL_SWITCH_ID 259
27+
28+/*
29+ * Tokens - must match values in topology configurations
30+ */
31+
32+/* buffers */
33+#define SOF_TKN_BUF_SIZE 100
34+#define SOF_TKN_BUF_CAPS 101
35+
36+/* DAI */
37+/* Token retired with ABI 3.2, do not use for new capabilities
38+ * #define SOF_TKN_DAI_DMAC_CONFIG 153
39+ */
40+#define SOF_TKN_DAI_TYPE 154
41+#define SOF_TKN_DAI_INDEX 155
42+#define SOF_TKN_DAI_DIRECTION 156
43+
44+/* scheduling */
45+#define SOF_TKN_SCHED_PERIOD 200
46+#define SOF_TKN_SCHED_PRIORITY 201
47+#define SOF_TKN_SCHED_MIPS 202
48+#define SOF_TKN_SCHED_CORE 203
49+#define SOF_TKN_SCHED_FRAMES 204
50+#define SOF_TKN_SCHED_TIME_DOMAIN 205
51+
52+/* volume */
53+#define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250
54+#define SOF_TKN_VOLUME_RAMP_STEP_MS 251
55+
56+/* SRC */
57+#define SOF_TKN_SRC_RATE_IN 300
58+#define SOF_TKN_SRC_RATE_OUT 301
59+
60+/* PCM */
61+#define SOF_TKN_PCM_DMAC_CONFIG 353
62+
63+/* Generic components */
64+#define SOF_TKN_COMP_PERIOD_SINK_COUNT 400
65+#define SOF_TKN_COMP_PERIOD_SOURCE_COUNT 401
66+#define SOF_TKN_COMP_FORMAT 402
67+/* Token retired with ABI 3.2, do not use for new capabilities
68+ * #define SOF_TKN_COMP_PRELOAD_COUNT 403
69+ */
70+
71+/* SSP */
72+#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
73+#define SOF_TKN_INTEL_SSP_MCLK_ID 501
74+#define SOF_TKN_INTEL_SSP_SAMPLE_BITS 502
75+#define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 503
76+#define SOF_TKN_INTEL_SSP_QUIRKS 504
77+#define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT 505
78+
79+/* DMIC */
80+#define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600
81+#define SOF_TKN_INTEL_DMIC_CLK_MIN 601
82+#define SOF_TKN_INTEL_DMIC_CLK_MAX 602
83+#define SOF_TKN_INTEL_DMIC_DUTY_MIN 603
84+#define SOF_TKN_INTEL_DMIC_DUTY_MAX 604
85+#define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE 605
86+#define SOF_TKN_INTEL_DMIC_SAMPLE_RATE 608
87+#define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH 609
88+
89+/* DMIC PDM */
90+#define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID 700
91+#define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable 701
92+#define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable 702
93+#define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A 703
94+#define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B 704
95+#define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE 705
96+#define SOF_TKN_INTEL_DMIC_PDM_SKEW 706
97+
98+/* Tone */
99+#define SOF_TKN_TONE_SAMPLE_RATE 800
100+
101+/* Processing Components */
102+#define SOF_TKN_PROCESS_TYPE 900
103+
104+/* for backward compatibility */
105+#define SOF_TKN_EFFECT_TYPE SOF_TKN_PROCESS_TYPE
106+
107+#endif
include/uapi/sound/sof/tone.h+21−0
@@ -0,0 +1,21 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+* This file is provided under a dual BSD/GPLv2 license. When using or
4+* redistributing this file, you may do so under either license.
5+*
6+* Copyright(c) 2018 Intel Corporation. All rights reserved.
7+*/
8+
9+#ifndef __INCLUDE_UAPI_SOUND_SOF_USER_TONE_H__
10+#define __INCLUDE_UAPI_SOUND_SOF_USER_TONE_H__
11+
12+#define SOF_TONE_IDX_FREQUENCY 0
13+#define SOF_TONE_IDX_AMPLITUDE 1
14+#define SOF_TONE_IDX_FREQ_MULT 2
15+#define SOF_TONE_IDX_AMPL_MULT 3
16+#define SOF_TONE_IDX_LENGTH 4
17+#define SOF_TONE_IDX_PERIOD 5
18+#define SOF_TONE_IDX_REPEATS 6
19+#define SOF_TONE_IDX_LIN_RAMP_STEP 7
20+
21+#endif
include/uapi/sound/sof/trace.h+66−0
@@ -0,0 +1,66 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * This file is provided under a dual BSD/GPLv2 license. When using or
4+ * redistributing this file, you may do so under either license.
5+ *
6+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
7+ */
8+
9+#ifndef __INCLUDE_UAPI_SOUND_SOF_USER_TRACE_H__
10+#define __INCLUDE_UAPI_SOUND_SOF_USER_TRACE_H__
11+
12+/*
13+ * Host system time.
14+ *
15+ * This property is used by the driver to pass down information about
16+ * current system time. It is expressed in us.
17+ * FW translates timestamps (in log entries, probe pockets) to this time
18+ * domain.
19+ *
20+ * (cavs: SystemTime).
21+ */
22+struct system_time {
23+ uint32_t val_l; /* Lower dword of current host time value */
24+ uint32_t val_u; /* Upper dword of current host time value */
25+} __packed;
26+
27+#define LOG_ENABLE 1 /* Enable logging */
28+#define LOG_DISABLE 0 /* Disable logging */
29+
30+#define LOG_LEVEL_CRITICAL 1 /* (FDK fatal) */
31+#define LOG_LEVEL_VERBOSE 2
32+
33+/*
34+ * Layout of a log fifo.
35+ */
36+struct log_buffer_layout {
37+ uint32_t read_ptr; /*read pointer */
38+ uint32_t write_ptr; /* write pointer */
39+ uint32_t buffer[0]; /* buffer */
40+} __packed;
41+
42+/*
43+ * Log buffer status reported by FW.
44+ */
45+struct log_buffer_status {
46+ uint32_t core_id; /* ID of core that logged to other half */
47+} __packed;
48+
49+#define TRACE_ID_LENGTH 12
50+
51+/*
52+ * Log entry header.
53+ *
54+ * The header is followed by an array of arguments (uint32_t[]).
55+ * Number of arguments is specified by the params_num field of log_entry
56+ */
57+struct log_entry_header {
58+ uint32_t id_0 : TRACE_ID_LENGTH; /* e.g. Pipeline ID */
59+ uint32_t id_1 : TRACE_ID_LENGTH; /* e.g. Component ID */
60+ uint32_t core_id : 8; /* Reporting core's id */
61+
62+ uint64_t timestamp; /* Timestamp (in dsp ticks) */
63+ uint32_t log_entry_address; /* Address of log entry in ELF */
64+} __packed;
65+
66+#endif