@zigc/lib 0.16.0 → 0.17.0-dev.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/c/fcntl.zig +6 -1
  2. package/c/inttypes.zig +0 -10
  3. package/c/math.zig +46 -122
  4. package/c/pthread.zig +57 -0
  5. package/c/search.zig +1 -27
  6. package/c/stdlib/drand48.zig +0 -57
  7. package/c/stdlib.zig +0 -100
  8. package/c/string.zig +20 -7
  9. package/c/strings.zig +0 -38
  10. package/c/unistd.zig +27 -26
  11. package/c/wchar.zig +10 -0
  12. package/c.zig +2 -2
  13. package/compiler/aro/aro/CodeGen.zig +5 -6
  14. package/compiler/aro/aro/Compilation.zig +17 -14
  15. package/compiler/aro/aro/Driver.zig +14 -13
  16. package/compiler/aro/aro/Parser.zig +20 -15
  17. package/compiler/aro/aro/Pragma.zig +3 -2
  18. package/compiler/aro/aro/Preprocessor.zig +9 -6
  19. package/compiler/aro/aro/pragmas/message.zig +3 -2
  20. package/compiler/aro/aro/text_literal.zig +3 -2
  21. package/compiler/aro/assembly_backend/x86_64.zig +4 -4
  22. package/compiler/build_runner.zig +0 -2
  23. package/compiler/reduce/Walk.zig +7 -7
  24. package/compiler/test_runner.zig +2 -2
  25. package/compiler/translate-c/Translator.zig +6 -2
  26. package/compiler/translate-c/main.zig +1 -1
  27. package/compiler_rt/cos.zig +0 -2
  28. package/compiler_rt/divmodei4.zig +40 -17
  29. package/compiler_rt/exp.zig +1 -6
  30. package/compiler_rt/exp2.zig +1 -6
  31. package/compiler_rt/exp_f128.zig +377 -0
  32. package/compiler_rt/fabs.zig +0 -2
  33. package/compiler_rt/fma.zig +0 -2
  34. package/compiler_rt/fmax.zig +0 -2
  35. package/compiler_rt/fmin.zig +0 -2
  36. package/compiler_rt/fmod.zig +0 -2
  37. package/compiler_rt/limb64.zig +876 -15
  38. package/compiler_rt/log.zig +0 -2
  39. package/compiler_rt/log10.zig +0 -2
  40. package/compiler_rt/log2.zig +0 -2
  41. package/compiler_rt/mulXi3.zig +1 -1
  42. package/compiler_rt/round.zig +0 -2
  43. package/compiler_rt/sin.zig +0 -2
  44. package/compiler_rt/sincos.zig +0 -2
  45. package/compiler_rt/sqrt.zig +0 -2
  46. package/compiler_rt/ssp.zig +1 -1
  47. package/compiler_rt/tan.zig +0 -2
  48. package/compiler_rt/trunc.zig +0 -2
  49. package/compiler_rt/udivmodei4.zig +28 -0
  50. package/fuzzer.zig +2 -0
  51. package/libc/include/aarch64-linux-any/asm/hwcap.h +1 -0
  52. package/libc/include/aarch64-linux-any/asm/unistd_64.h +1 -0
  53. package/libc/include/any-linux-any/asm-generic/errno.h +2 -0
  54. package/libc/include/any-linux-any/asm-generic/unistd.h +4 -1
  55. package/libc/include/any-linux-any/drm/amdgpu_drm.h +20 -6
  56. package/libc/include/any-linux-any/drm/amdxdna_accel.h +8 -0
  57. package/libc/include/any-linux-any/drm/drm_fourcc.h +6 -6
  58. package/libc/include/any-linux-any/drm/panfrost_drm.h +75 -1
  59. package/libc/include/any-linux-any/drm/panthor_drm.h +154 -3
  60. package/libc/include/any-linux-any/drm/rocket_accel.h +74 -24
  61. package/libc/include/any-linux-any/drm/xe_drm.h +89 -6
  62. package/libc/include/any-linux-any/linux/android/binder.h +1 -1
  63. package/libc/include/any-linux-any/linux/bpf.h +28 -0
  64. package/libc/include/any-linux-any/linux/btrfs.h +1 -0
  65. package/libc/include/any-linux-any/linux/btrfs_tree.h +32 -2
  66. package/libc/include/any-linux-any/linux/dma-buf.h +1 -0
  67. package/libc/include/any-linux-any/linux/dpll.h +1 -0
  68. package/libc/include/any-linux-any/linux/elf.h +2 -0
  69. package/libc/include/any-linux-any/linux/ethtool.h +21 -5
  70. package/libc/include/any-linux-any/linux/fs.h +1 -0
  71. package/libc/include/any-linux-any/linux/hyperv.h +1 -1
  72. package/libc/include/any-linux-any/linux/idxd.h +134 -134
  73. package/libc/include/any-linux-any/linux/if_alg.h +1 -1
  74. package/libc/include/any-linux-any/linux/if_link.h +1 -0
  75. package/libc/include/any-linux-any/linux/input-event-codes.h +4 -0
  76. package/libc/include/any-linux-any/linux/io_uring/bpf_filter.h +68 -0
  77. package/libc/include/any-linux-any/linux/io_uring/query.h +5 -1
  78. package/libc/include/any-linux-any/linux/io_uring.h +33 -2
  79. package/libc/include/any-linux-any/linux/iommufd.h +39 -0
  80. package/libc/include/any-linux-any/linux/kfd_ioctl.h +13 -3
  81. package/libc/include/any-linux-any/linux/kfd_sysfs.h +2 -1
  82. package/libc/include/any-linux-any/linux/kvm.h +30 -6
  83. package/libc/include/any-linux-any/linux/landlock.h +22 -8
  84. package/libc/include/any-linux-any/linux/magic.h +1 -0
  85. package/libc/include/any-linux-any/linux/mempolicy.h +3 -0
  86. package/libc/include/any-linux-any/linux/mount.h +11 -2
  87. package/libc/include/any-linux-any/linux/mptcp_pm.h +1 -1
  88. package/libc/include/any-linux-any/linux/mshv.h +2 -0
  89. package/libc/include/any-linux-any/linux/netfilter_bridge.h +5 -4
  90. package/libc/include/any-linux-any/linux/netfilter_ipv4.h +4 -5
  91. package/libc/include/any-linux-any/linux/netfilter_ipv6.h +3 -4
  92. package/libc/include/any-linux-any/linux/nfs.h +1 -1
  93. package/libc/include/any-linux-any/linux/nfsd_netlink.h +1 -0
  94. package/libc/include/any-linux-any/linux/nilfs2_api.h +2 -2
  95. package/libc/include/any-linux-any/linux/nilfs2_ondisk.h +97 -66
  96. package/libc/include/any-linux-any/linux/nl80211.h +104 -3
  97. package/libc/include/any-linux-any/linux/pci.h +7 -0
  98. package/libc/include/any-linux-any/linux/pci_regs.h +65 -6
  99. package/libc/include/any-linux-any/linux/pcitest.h +1 -0
  100. package/libc/include/any-linux-any/linux/perf_event.h +24 -3
  101. package/libc/include/any-linux-any/linux/pkt_sched.h +1 -0
  102. package/libc/include/any-linux-any/linux/prctl.h +30 -0
  103. package/libc/include/any-linux-any/linux/rseq.h +62 -5
  104. package/libc/include/any-linux-any/linux/shm.h +0 -1
  105. package/libc/include/any-linux-any/linux/stddef.h +4 -0
  106. package/libc/include/any-linux-any/linux/sysctl.h +1 -2
  107. package/libc/include/any-linux-any/linux/taskstats.h +12 -1
  108. package/libc/include/any-linux-any/linux/tcp.h +23 -3
  109. package/libc/include/any-linux-any/linux/typelimits.h +8 -0
  110. package/libc/include/any-linux-any/linux/ublk_cmd.h +120 -1
  111. package/libc/include/any-linux-any/linux/v4l2-controls.h +63 -0
  112. package/libc/include/any-linux-any/linux/vbox_vmmdev_types.h +2 -2
  113. package/libc/include/any-linux-any/linux/vduse.h +80 -5
  114. package/libc/include/any-linux-any/linux/version.h +3 -3
  115. package/libc/include/any-linux-any/linux/vfio.h +4 -0
  116. package/libc/include/any-linux-any/linux/videodev2.h +3 -0
  117. package/libc/include/any-linux-any/linux/virtio_ring.h +1 -2
  118. package/libc/include/any-linux-any/linux/vmclock-abi.h +20 -0
  119. package/libc/include/any-linux-any/rdma/bnxt_re-abi.h +16 -0
  120. package/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h +16 -0
  121. package/libc/include/any-linux-any/rdma/mana-abi.h +3 -0
  122. package/libc/include/any-linux-any/scsi/scsi_bsg_ufs.h +8 -9
  123. package/libc/include/any-linux-any/sound/sof/tokens.h +6 -0
  124. package/libc/include/arc-linux-any/asm/swab.h +0 -63
  125. package/libc/include/arc-linux-any/asm/unistd_32.h +1 -0
  126. package/libc/include/arm-linux-any/asm/ptrace.h +0 -9
  127. package/libc/include/arm-linux-any/asm/unistd-eabi.h +1 -0
  128. package/libc/include/arm-linux-any/asm/unistd-oabi.h +1 -0
  129. package/libc/include/csky-linux-any/asm/unistd_32.h +1 -0
  130. package/libc/include/hexagon-linux-any/asm/unistd_32.h +1 -0
  131. package/libc/include/loongarch-linux-any/asm/hwcap.h +1 -0
  132. package/libc/include/loongarch-linux-any/asm/kvm.h +1 -0
  133. package/libc/include/loongarch-linux-any/asm/kvm_para.h +1 -0
  134. package/libc/include/loongarch-linux-any/asm/unistd_32.h +2 -0
  135. package/libc/include/loongarch-linux-any/asm/unistd_64.h +2 -0
  136. package/libc/include/m68k-linux-any/asm/unistd_32.h +1 -0
  137. package/libc/include/mips-linux-any/asm/errno.h +2 -0
  138. package/libc/include/mips-linux-any/asm/unistd_n32.h +1 -0
  139. package/libc/include/mips-linux-any/asm/unistd_n64.h +1 -0
  140. package/libc/include/mips-linux-any/asm/unistd_o32.h +1 -0
  141. package/libc/include/powerpc-linux-any/asm/unistd_32.h +1 -0
  142. package/libc/include/powerpc-linux-any/asm/unistd_64.h +1 -0
  143. package/libc/include/riscv-linux-any/asm/hwprobe.h +4 -0
  144. package/libc/include/riscv-linux-any/asm/kvm.h +3 -0
  145. package/libc/include/riscv-linux-any/asm/ptrace.h +37 -0
  146. package/libc/include/riscv-linux-any/asm/sigcontext.h +1 -0
  147. package/libc/include/riscv-linux-any/asm/unistd_32.h +1 -0
  148. package/libc/include/riscv-linux-any/asm/unistd_64.h +1 -0
  149. package/libc/include/s390x-linux-any/asm/unistd_64.h +1 -0
  150. package/libc/include/sparc-linux-any/asm/errno.h +2 -0
  151. package/libc/include/sparc-linux-any/asm/ioctls.h +4 -4
  152. package/libc/include/sparc-linux-any/asm/unistd_32.h +2 -0
  153. package/libc/include/sparc-linux-any/asm/unistd_64.h +2 -0
  154. package/libc/include/x86-linux-any/asm/auxvec.h +0 -4
  155. package/libc/include/x86-linux-any/asm/kvm.h +13 -8
  156. package/libc/include/x86-linux-any/asm/svm.h +16 -16
  157. package/libc/include/x86-linux-any/asm/unistd_32.h +1 -0
  158. package/libc/include/x86-linux-any/asm/unistd_64.h +1 -0
  159. package/libc/include/x86-linux-any/asm/unistd_x32.h +1 -0
  160. package/libc/include/xtensa-linux-any/asm/unistd_32.h +1 -0
  161. package/libc/musl/arch/mipsn32/syscall_arch.h +35 -32
  162. package/package.json +1 -1
  163. package/std/Build/Cache.zig +6 -6
  164. package/std/Build/Step/Compile.zig +0 -1
  165. package/std/Build/Step/Run.zig +2 -2
  166. package/std/Build/Step.zig +2 -4
  167. package/std/Build/WebServer.zig +2 -2
  168. package/std/Build.zig +0 -3
  169. package/std/Io/Dir.zig +7 -2
  170. package/std/Io/Dispatch.zig +3 -13
  171. package/std/Io/File/Writer.zig +8 -6
  172. package/std/Io/Reader.zig +8 -9
  173. package/std/Io/Semaphore.zig +112 -17
  174. package/std/Io/Terminal.zig +1 -1
  175. package/std/Io/Threaded.zig +171 -37
  176. package/std/Io/Uring.zig +13 -15
  177. package/std/Io/Writer.zig +46 -42
  178. package/std/Io/net.zig +11 -11
  179. package/std/Io.zig +90 -26
  180. package/std/SemanticVersion.zig +1 -1
  181. package/std/Target/Query.zig +2 -2
  182. package/std/Target.zig +50 -5
  183. package/std/array_hash_map.zig +9 -18
  184. package/std/builtin.zig +4 -0
  185. package/std/c/haiku.zig +3 -0
  186. package/std/c/serenity.zig +1 -6
  187. package/std/c.zig +89 -7
  188. package/std/compress/flate/Decompress.zig +2 -3
  189. package/std/compress/zstd/Decompress.zig +2 -4
  190. package/std/crypto/Certificate.zig +13 -1
  191. package/std/crypto/ascon.zig +75 -33
  192. package/std/crypto/codecs/asn1/Oid.zig +12 -1
  193. package/std/crypto/codecs/base64_hex_ct.zig +2 -4
  194. package/std/crypto/ml_kem.zig +2 -9
  195. package/std/crypto/tls/Client.zig +79 -4
  196. package/std/crypto/tls.zig +1 -1
  197. package/std/crypto.zig +1 -0
  198. package/std/debug/Pdb.zig +1 -1
  199. package/std/debug.zig +4 -3
  200. package/std/fmt.zig +8 -3
  201. package/std/fs/path.zig +6 -4
  202. package/std/heap/BufferFirstAllocator.zig +165 -0
  203. package/std/heap.zig +2 -126
  204. package/std/http/Client.zig +21 -24
  205. package/std/http.zig +3 -4
  206. package/std/json/Scanner.zig +2 -2
  207. package/std/os/emscripten.zig +1 -1
  208. package/std/os/linux/IoUring.zig +2 -0
  209. package/std/os/linux/aarch64.zig +41 -12
  210. package/std/os/linux/arc.zig +173 -0
  211. package/std/os/linux/arm.zig +41 -12
  212. package/std/os/linux/hexagon.zig +33 -11
  213. package/std/os/linux/loongarch32.zig +41 -13
  214. package/std/os/linux/loongarch64.zig +41 -12
  215. package/std/os/linux/m68k.zig +41 -13
  216. package/std/os/linux/mips.zig +67 -36
  217. package/std/os/linux/mips64.zig +60 -29
  218. package/std/os/linux/mipsn32.zig +60 -29
  219. package/std/os/linux/or1k.zig +41 -12
  220. package/std/os/linux/powerpc.zig +41 -12
  221. package/std/os/linux/powerpc64.zig +41 -12
  222. package/std/os/linux/riscv32.zig +41 -12
  223. package/std/os/linux/riscv64.zig +41 -12
  224. package/std/os/linux/s390x.zig +44 -7
  225. package/std/os/linux/sparc64.zig +83 -52
  226. package/std/os/linux/syscalls.zig +26 -1
  227. package/std/os/linux/thumb.zig +52 -36
  228. package/std/os/linux/x32.zig +41 -12
  229. package/std/os/linux/x86.zig +42 -13
  230. package/std/os/linux/x86_64.zig +41 -12
  231. package/std/os/linux.zig +412 -436
  232. package/std/os/uefi/tables/boot_services.zig +9 -8
  233. package/std/os.zig +41 -0
  234. package/std/process.zig +1 -1
  235. package/std/sort.zig +3 -3
  236. package/std/zig/Ast/Render.zig +3 -3
  237. package/std/zig/AstGen.zig +44 -98
  238. package/std/zig/AstRlAnnotate.zig +0 -11
  239. package/std/zig/BuiltinFn.zig +0 -32
  240. package/std/zig/LibCInstallation.zig +4 -3
  241. package/std/zig/Parse.zig +7 -7
  242. package/std/zig/WindowsSdk.zig +13 -13
  243. package/std/zig/Zir.zig +50 -63
  244. package/std/zig/ZonGen.zig +6 -5
  245. package/std/zig/llvm/Builder.zig +12 -12
  246. package/std/zig.zig +1 -10
  247. package/std/zip.zig +5 -5
  248. package/zig.h +340 -1
  249. package/libc/include/hexagon-linux-any/asm/signal.h +0 -29
  250. package/libc/include/s390x-linux-any/asm/tape390.h +0 -103
  251. package/libc/mingw/math/fdiml.c +0 -24
  252. package/libc/mingw/winpthreads/spinlock.c +0 -82
  253. package/libc/musl/src/linux/tee.c +0 -8
  254. package/libc/musl/src/math/fdimf.c +0 -10
  255. package/libc/musl/src/math/fdiml.c +0 -18
  256. package/libc/musl/src/string/strdup.c +0 -10
  257. package/libc/musl/src/string/strndup.c +0 -12
  258. package/libc/musl/src/string/wcsdup.c +0 -10
  259. package/libc/musl/src/thread/pthread_spin_destroy.c +0 -6
  260. package/libc/musl/src/thread/pthread_spin_init.c +0 -6
  261. package/libc/musl/src/thread/pthread_spin_lock.c +0 -8
  262. package/libc/musl/src/thread/pthread_spin_trylock.c +0 -7
  263. package/libc/musl/src/thread/pthread_spin_unlock.c +0 -7
  264. package/libc/musl/src/unistd/dup2.c +0 -20
  265. package/libc/musl/src/unistd/dup3.c +0 -26
  266. package/libc/wasi/thread-stub/pthread_spin_lock.c +0 -8
  267. package/libc/wasi/thread-stub/pthread_spin_trylock.c +0 -8
  268. package/libc/wasi/thread-stub/pthread_spin_unlock.c +0 -7
@@ -26,20 +26,27 @@ extern "C" {
26
26
  *
27
27
  */
28
28
  struct drm_rocket_create_bo {
29
- /** Input: Size of the requested BO. */
29
+ /**
30
+ * @size: Input: Size of the requested BO.
31
+ */
30
32
  __u32 size;
31
33
 
32
- /** Output: GEM handle for the BO. */
34
+ /**
35
+ * @handle: Output: GEM handle for the BO.
36
+ */
33
37
  __u32 handle;
34
38
 
35
39
  /**
36
- * Output: DMA address for the BO in the NPU address space. This address
37
- * is private to the DRM fd and is valid for the lifetime of the GEM
38
- * handle.
40
+ * @dma_address: Output: DMA address for the BO in the NPU address
41
+ * space. This address is private to the DRM fd and is valid for
42
+ * the lifetime of the GEM handle.
39
43
  */
40
44
  __u64 dma_address;
41
45
 
42
- /** Output: Offset into the drm node to use for subsequent mmap call. */
46
+ /**
47
+ * @offset: Output: Offset into the drm node to use for subsequent
48
+ * mmap call.
49
+ */
43
50
  __u64 offset;
44
51
  };
45
52
 
@@ -50,13 +57,19 @@ struct drm_rocket_create_bo {
50
57
  * synchronization.
51
58
  */
52
59
  struct drm_rocket_prep_bo {
53
- /** Input: GEM handle of the buffer object. */
60
+ /**
61
+ * @handle: Input: GEM handle of the buffer object.
62
+ */
54
63
  __u32 handle;
55
64
 
56
- /** Reserved, must be zero. */
65
+ /**
66
+ * @reserved: Reserved, must be zero.
67
+ */
57
68
  __u32 reserved;
58
69
 
59
- /** Input: Amount of time to wait for NPU jobs. */
70
+ /**
71
+ * @timeout_ns: Input: Amount of time to wait for NPU jobs.
72
+ */
60
73
  __s64 timeout_ns;
61
74
  };
62
75
 
@@ -66,10 +79,14 @@ struct drm_rocket_prep_bo {
66
79
  * Synchronize caches for NPU access.
67
80
  */
68
81
  struct drm_rocket_fini_bo {
69
- /** Input: GEM handle of the buffer object. */
82
+ /**
83
+ * @handle: Input: GEM handle of the buffer object.
84
+ */
70
85
  __u32 handle;
71
86
 
72
- /** Reserved, must be zero. */
87
+ /**
88
+ * @reserved: Reserved, must be zero.
89
+ */
73
90
  __u32 reserved;
74
91
  };
75
92
 
@@ -79,10 +96,15 @@ struct drm_rocket_fini_bo {
79
96
  * A task is the smallest unit of work that can be run on the NPU.
80
97
  */
81
98
  struct drm_rocket_task {
82
- /** Input: DMA address to NPU mapping of register command buffer */
99
+ /**
100
+ * @regcmd: Input: DMA address to NPU mapping of register command buffer
101
+ */
83
102
  __u32 regcmd;
84
103
 
85
- /** Input: Number of commands in the register command buffer */
104
+ /**
105
+ * @regcmd_count: Input: Number of commands in the register command
106
+ * buffer
107
+ */
86
108
  __u32 regcmd_count;
87
109
  };
88
110
 
@@ -94,25 +116,44 @@ struct drm_rocket_task {
94
116
  * sequentially on the same core, to benefit from memory residency in SRAM.
95
117
  */
96
118
  struct drm_rocket_job {
97
- /** Input: Pointer to an array of struct drm_rocket_task. */
119
+ /**
120
+ * @tasks: Input: Pointer to an array of struct drm_rocket_task.
121
+ */
98
122
  __u64 tasks;
99
123
 
100
- /** Input: Pointer to a u32 array of the BOs that are read by the job. */
124
+ /**
125
+ * @in_bo_handles: Input: Pointer to a u32 array of the BOs that
126
+ * are read by the job.
127
+ */
101
128
  __u64 in_bo_handles;
102
129
 
103
- /** Input: Pointer to a u32 array of the BOs that are written to by the job. */
130
+ /**
131
+ * @out_bo_handles: Input: Pointer to a u32 array of the BOs that
132
+ * are written to by the job.
133
+ */
104
134
  __u64 out_bo_handles;
105
135
 
106
- /** Input: Number of tasks passed in. */
136
+ /**
137
+ * @task_count: Input: Number of tasks passed in.
138
+ */
107
139
  __u32 task_count;
108
140
 
109
- /** Input: Size in bytes of the structs in the @tasks field. */
141
+ /**
142
+ * @task_struct_size: Input: Size in bytes of the structs in the
143
+ * @tasks field.
144
+ */
110
145
  __u32 task_struct_size;
111
146
 
112
- /** Input: Number of input BO handles passed in (size is that times 4). */
147
+ /**
148
+ * @in_bo_handle_count: Input: Number of input BO handles passed in
149
+ * (size is that times 4).
150
+ */
113
151
  __u32 in_bo_handle_count;
114
152
 
115
- /** Input: Number of output BO handles passed in (size is that times 4). */
153
+ /**
154
+ * @out_bo_handle_count: Input: Number of output BO handles passed in
155
+ * (size is that times 4).
156
+ */
116
157
  __u32 out_bo_handle_count;
117
158
  };
118
159
 
@@ -122,16 +163,25 @@ struct drm_rocket_job {
122
163
  * The kernel will schedule the execution of these jobs in dependency order.
123
164
  */
124
165
  struct drm_rocket_submit {
125
- /** Input: Pointer to an array of struct drm_rocket_job. */
166
+ /**
167
+ * @jobs: Input: Pointer to an array of struct drm_rocket_job.
168
+ */
126
169
  __u64 jobs;
127
170
 
128
- /** Input: Number of jobs passed in. */
171
+ /**
172
+ * @job_count: Input: Number of jobs passed in.
173
+ */
129
174
  __u32 job_count;
130
175
 
131
- /** Input: Size in bytes of the structs in the @jobs field. */
176
+ /**
177
+ * @job_struct_size: Input: Size in bytes of the structs in the
178
+ * @jobs field.
179
+ */
132
180
  __u32 job_struct_size;
133
181
 
134
- /** Reserved, must be zero. */
182
+ /**
183
+ * @reserved: Reserved, must be zero.
184
+ */
135
185
  __u64 reserved;
136
186
  };
137
187
 
@@ -106,6 +106,7 @@ extern "C" {
106
106
  #define DRM_XE_OBSERVATION 0x0b
107
107
  #define DRM_XE_MADVISE 0x0c
108
108
  #define DRM_XE_VM_QUERY_MEM_RANGE_ATTRS 0x0d
109
+ #define DRM_XE_EXEC_QUEUE_SET_PROPERTY 0x0e
109
110
 
110
111
  /* Must be kept compact -- no holes */
111
112
 
@@ -123,6 +124,7 @@ extern "C" {
123
124
  #define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)
124
125
  #define DRM_IOCTL_XE_MADVISE DRM_IOW(DRM_COMMAND_BASE + DRM_XE_MADVISE, struct drm_xe_madvise)
125
126
  #define DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_QUERY_MEM_RANGE_ATTRS, struct drm_xe_vm_query_mem_range_attr)
127
+ #define DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_SET_PROPERTY, struct drm_xe_exec_queue_set_property)
126
128
 
127
129
  /**
128
130
  * DOC: Xe IOCTL Extensions
@@ -210,8 +212,12 @@ struct drm_xe_ext_set_property {
210
212
  /** @pad: MBZ */
211
213
  __u32 pad;
212
214
 
213
- /** @value: property value */
214
- __u64 value;
215
+ union {
216
+ /** @value: property value */
217
+ __u64 value;
218
+ /** @ptr: pointer to user value */
219
+ __u64 ptr;
220
+ };
215
221
 
216
222
  /** @reserved: Reserved */
217
223
  __u64 reserved[2];
@@ -403,6 +409,9 @@ struct drm_xe_query_mem_regions {
403
409
  * has low latency hint support
404
410
  * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR - Flag is set if the
405
411
  * device has CPU address mirroring support
412
+ * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_NO_COMPRESSION_HINT - Flag is set if the
413
+ * device supports the userspace hint %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION.
414
+ * This is exposed only on Xe2+.
406
415
  * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
407
416
  * required by this device, typically SZ_4K or SZ_64K
408
417
  * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address
@@ -421,6 +430,7 @@ struct drm_xe_query_config {
421
430
  #define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM (1 << 0)
422
431
  #define DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY (1 << 1)
423
432
  #define DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR (1 << 2)
433
+ #define DRM_XE_QUERY_CONFIG_FLAG_HAS_NO_COMPRESSION_HINT (1 << 3)
424
434
  #define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT 2
425
435
  #define DRM_XE_QUERY_CONFIG_VA_BITS 3
426
436
  #define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 4
@@ -791,6 +801,17 @@ struct drm_xe_device_query {
791
801
  * need to use VRAM for display surfaces, therefore the kernel requires
792
802
  * setting this flag for such objects, otherwise an error is thrown on
793
803
  * small-bar systems.
804
+ * - %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION - Allows userspace to
805
+ * hint that compression (CCS) should be disabled for the buffer being
806
+ * created. This can avoid unnecessary memory operations and CCS state
807
+ * management.
808
+ * On pre-Xe2 platforms, this flag is currently rejected as compression
809
+ * control is not supported via PAT index. On Xe2+ platforms, compression
810
+ * is controlled via PAT entries. If this flag is set, the driver will reject
811
+ * any VM bind that requests a PAT index enabling compression for this BO.
812
+ * Note: On dGPU platforms, there is currently no change in behavior with
813
+ * this flag, but future improvements may leverage it. The current benefit is
814
+ * primarily applicable to iGPU platforms.
794
815
  *
795
816
  * @cpu_caching supports the following values:
796
817
  * - %DRM_XE_GEM_CPU_CACHING_WB - Allocate the pages with write-back
@@ -837,6 +858,7 @@ struct drm_xe_gem_create {
837
858
  #define DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING (1 << 0)
838
859
  #define DRM_XE_GEM_CREATE_FLAG_SCANOUT (1 << 1)
839
860
  #define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2)
861
+ #define DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION (1 << 3)
840
862
  /**
841
863
  * @flags: Flags, currently a mask of memory instances of where BO can
842
864
  * be placed
@@ -1252,6 +1274,17 @@ struct drm_xe_vm_bind {
1252
1274
  * Given that going into a power-saving state kills PXP HWDRM sessions,
1253
1275
  * runtime PM will be blocked while queues of this type are alive.
1254
1276
  * All PXP queues will be killed if a PXP invalidation event occurs.
1277
+ * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP - Create a multi-queue group
1278
+ * or add secondary queues to a multi-queue group.
1279
+ * If the extension's 'value' field has %DRM_XE_MULTI_GROUP_CREATE flag set,
1280
+ * then a new multi-queue group is created with this queue as the primary queue
1281
+ * (Q0). Otherwise, the queue gets added to the multi-queue group whose primary
1282
+ * queue's exec_queue_id is specified in the lower 32 bits of the 'value' field.
1283
+ * All the other non-relevant bits of extension's 'value' field while adding the
1284
+ * primary or the secondary queues of the group must be set to 0.
1285
+ * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY - Set the queue
1286
+ * priority within the multi-queue group. Current valid priority values are 0–2
1287
+ * (default is 1), with higher values indicating higher priority.
1255
1288
  *
1256
1289
  * The example below shows how to use @drm_xe_exec_queue_create to create
1257
1290
  * a simple exec_queue (no parallel submission) of class
@@ -1292,6 +1325,10 @@ struct drm_xe_exec_queue_create {
1292
1325
  #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY 0
1293
1326
  #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE 1
1294
1327
  #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE 2
1328
+ #define DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE 3
1329
+ #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP 4
1330
+ #define DRM_XE_MULTI_GROUP_CREATE (1ull << 63)
1331
+ #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY 5
1295
1332
  /** @extensions: Pointer to the first extension struct, if any */
1296
1333
  __u64 extensions;
1297
1334
 
@@ -1655,6 +1692,9 @@ enum drm_xe_oa_unit_type {
1655
1692
 
1656
1693
  /** @DRM_XE_OA_UNIT_TYPE_OAM_SAG: OAM_SAG OA unit */
1657
1694
  DRM_XE_OA_UNIT_TYPE_OAM_SAG,
1695
+
1696
+ /** @DRM_XE_OA_UNIT_TYPE_MERT: MERT OA unit */
1697
+ DRM_XE_OA_UNIT_TYPE_MERT,
1658
1698
  };
1659
1699
 
1660
1700
  /**
@@ -1677,12 +1717,19 @@ struct drm_xe_oa_unit {
1677
1717
  #define DRM_XE_OA_CAPS_OA_BUFFER_SIZE (1 << 2)
1678
1718
  #define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS (1 << 3)
1679
1719
  #define DRM_XE_OA_CAPS_OAM (1 << 4)
1720
+ #define DRM_XE_OA_CAPS_OA_UNIT_GT_ID (1 << 5)
1680
1721
 
1681
1722
  /** @oa_timestamp_freq: OA timestamp freq */
1682
1723
  __u64 oa_timestamp_freq;
1683
1724
 
1725
+ /** @gt_id: gt id for this OA unit */
1726
+ __u16 gt_id;
1727
+
1728
+ /** @reserved1: MBZ */
1729
+ __u16 reserved1[3];
1730
+
1684
1731
  /** @reserved: MBZ */
1685
- __u64 reserved[4];
1732
+ __u64 reserved[3];
1686
1733
 
1687
1734
  /** @num_engines: number of engines in @eci array */
1688
1735
  __u64 num_engines;
@@ -2072,7 +2119,13 @@ struct drm_xe_madvise {
2072
2119
  struct {
2073
2120
  #define DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE 0
2074
2121
  #define DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM -1
2075
- /** @preferred_mem_loc.devmem_fd: fd for preferred loc */
2122
+ /**
2123
+ * @preferred_mem_loc.devmem_fd:
2124
+ * Device file-descriptor of the device where the
2125
+ * preferred memory is located, or one of the
2126
+ * above special values. Please also see
2127
+ * @preferred_mem_loc.region_instance below.
2128
+ */
2076
2129
  __u32 devmem_fd;
2077
2130
 
2078
2131
  #define DRM_XE_MIGRATE_ALL_PAGES 0
@@ -2080,8 +2133,14 @@ struct drm_xe_madvise {
2080
2133
  /** @preferred_mem_loc.migration_policy: Page migration policy */
2081
2134
  __u16 migration_policy;
2082
2135
 
2083
- /** @preferred_mem_loc.pad : MBZ */
2084
- __u16 pad;
2136
+ /**
2137
+ * @preferred_mem_loc.region_instance : Region instance.
2138
+ * MBZ if @devmem_fd <= &DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE.
2139
+ * Otherwise should point to the desired device
2140
+ * VRAM instance of the device indicated by
2141
+ * @preferred_mem_loc.devmem_fd.
2142
+ */
2143
+ __u16 region_instance;
2085
2144
 
2086
2145
  /** @preferred_mem_loc.reserved : Reserved */
2087
2146
  __u64 reserved;
@@ -2274,6 +2333,30 @@ struct drm_xe_vm_query_mem_range_attr {
2274
2333
 
2275
2334
  };
2276
2335
 
2336
+ /**
2337
+ * struct drm_xe_exec_queue_set_property - exec queue set property
2338
+ *
2339
+ * Sets execution queue properties dynamically.
2340
+ * Currently only %DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY
2341
+ * property can be dynamically set.
2342
+ */
2343
+ struct drm_xe_exec_queue_set_property {
2344
+ /** @extensions: Pointer to the first extension struct, if any */
2345
+ __u64 extensions;
2346
+
2347
+ /** @exec_queue_id: Exec queue ID */
2348
+ __u32 exec_queue_id;
2349
+
2350
+ /** @property: property to set */
2351
+ __u32 property;
2352
+
2353
+ /** @value: property value */
2354
+ __u64 value;
2355
+
2356
+ /** @reserved: Reserved */
2357
+ __u64 reserved[2];
2358
+ };
2359
+
2277
2360
  #if defined(__cplusplus)
2278
2361
  }
2279
2362
  #endif
@@ -278,7 +278,7 @@ enum {
278
278
  * NOTE: Two special error codes you should check for when calling
279
279
  * in to the driver are:
280
280
  *
281
- * EINTR -- The operation has been interupted. This should be
281
+ * EINTR -- The operation has been interrupted. This should be
282
282
  * handled by retrying the ioctl() until a different error code
283
283
  * is returned.
284
284
  *
@@ -119,6 +119,14 @@ enum bpf_cgroup_iter_order {
119
119
  BPF_CGROUP_ITER_DESCENDANTS_PRE, /* walk descendants in pre-order. */
120
120
  BPF_CGROUP_ITER_DESCENDANTS_POST, /* walk descendants in post-order. */
121
121
  BPF_CGROUP_ITER_ANCESTORS_UP, /* walk ancestors upward. */
122
+ /*
123
+ * Walks the immediate children of the specified parent
124
+ * cgroup_subsys_state. Unlike BPF_CGROUP_ITER_DESCENDANTS_PRE,
125
+ * BPF_CGROUP_ITER_DESCENDANTS_POST, and BPF_CGROUP_ITER_ANCESTORS_UP
126
+ * the iterator does not include the specified parent as one of the
127
+ * returned iterator elements.
128
+ */
129
+ BPF_CGROUP_ITER_CHILDREN,
122
130
  };
123
131
 
124
132
  union bpf_iter_link_info {
@@ -918,6 +926,16 @@ union bpf_iter_link_info {
918
926
  * Number of bytes read from the stream on success, or -1 if an
919
927
  * error occurred (in which case, *errno* is set appropriately).
920
928
  *
929
+ * BPF_PROG_ASSOC_STRUCT_OPS
930
+ * Description
931
+ * Associate a BPF program with a struct_ops map. The struct_ops
932
+ * map is identified by *map_fd* and the BPF program is
933
+ * identified by *prog_fd*.
934
+ *
935
+ * Return
936
+ * 0 on success or -1 if an error occurred (in which case,
937
+ * *errno* is set appropriately).
938
+ *
921
939
  * NOTES
922
940
  * eBPF objects (maps and programs) can be shared between processes.
923
941
  *
@@ -974,6 +992,7 @@ enum bpf_cmd {
974
992
  BPF_PROG_BIND_MAP,
975
993
  BPF_TOKEN_CREATE,
976
994
  BPF_PROG_STREAM_READ_BY_FD,
995
+ BPF_PROG_ASSOC_STRUCT_OPS,
977
996
  __MAX_BPF_CMD,
978
997
  };
979
998
 
@@ -1134,6 +1153,7 @@ enum bpf_attach_type {
1134
1153
  BPF_NETKIT_PEER,
1135
1154
  BPF_TRACE_KPROBE_SESSION,
1136
1155
  BPF_TRACE_UPROBE_SESSION,
1156
+ BPF_TRACE_FSESSION,
1137
1157
  __MAX_BPF_ATTACH_TYPE
1138
1158
  };
1139
1159
 
@@ -1373,6 +1393,8 @@ enum {
1373
1393
  BPF_NOEXIST = 1, /* create new element if it didn't exist */
1374
1394
  BPF_EXIST = 2, /* update existing element */
1375
1395
  BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */
1396
+ BPF_F_CPU = 8, /* cpu flag for percpu maps, upper 32-bit of flags is a cpu number */
1397
+ BPF_F_ALL_CPUS = 16, /* update value across all CPUs for percpu maps */
1376
1398
  };
1377
1399
 
1378
1400
  /* flags for BPF_MAP_CREATE command */
@@ -1894,6 +1916,12 @@ union bpf_attr {
1894
1916
  __u32 prog_fd;
1895
1917
  } prog_stream_read;
1896
1918
 
1919
+ struct {
1920
+ __u32 map_fd;
1921
+ __u32 prog_fd;
1922
+ __u32 flags;
1923
+ } prog_assoc_struct_ops;
1924
+
1897
1925
  } __attribute__((aligned(8)));
1898
1926
 
1899
1927
  /* The description below is an attempt at providing documentation to eBPF
@@ -334,6 +334,7 @@ struct btrfs_ioctl_fs_info_args {
334
334
  #define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13)
335
335
  #define BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE (1ULL << 14)
336
336
  #define BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA (1ULL << 16)
337
+ #define BTRFS_FEATURE_INCOMPAT_REMAP_TREE (1ULL << 17)
337
338
 
338
339
  struct btrfs_ioctl_feature_flags {
339
340
  __u64 compat_flags;
@@ -72,6 +72,9 @@
72
72
  /* Tracks RAID stripes in block groups. */
73
73
  #define BTRFS_RAID_STRIPE_TREE_OBJECTID 12ULL
74
74
 
75
+ /* Holds details of remapped addresses after relocation. */
76
+ #define BTRFS_REMAP_TREE_OBJECTID 13ULL
77
+
75
78
  /* device stats in the device tree */
76
79
  #define BTRFS_DEV_STATS_OBJECTID 0ULL
77
80
 
@@ -278,6 +281,10 @@
278
281
 
279
282
  #define BTRFS_RAID_STRIPE_KEY 230
280
283
 
284
+ #define BTRFS_IDENTITY_REMAP_KEY 234
285
+ #define BTRFS_REMAP_KEY 235
286
+ #define BTRFS_REMAP_BACKREF_KEY 236
287
+
281
288
  /*
282
289
  * Records the overall state of the qgroups.
283
290
  * There's only one instance of this key present,
@@ -710,9 +717,12 @@ struct btrfs_super_block {
710
717
  __u8 metadata_uuid[BTRFS_FSID_SIZE];
711
718
 
712
719
  __u64 nr_global_roots;
720
+ __le64 remap_root;
721
+ __le64 remap_root_generation;
722
+ __u8 remap_root_level;
713
723
 
714
724
  /* Future expansion */
715
- __le64 reserved[27];
725
+ __u8 reserved[199];
716
726
  __u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
717
727
  struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];
718
728
 
@@ -1157,12 +1167,15 @@ struct btrfs_dev_replace_item {
1157
1167
  #define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8)
1158
1168
  #define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9)
1159
1169
  #define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10)
1170
+ #define BTRFS_BLOCK_GROUP_REMAPPED (1ULL << 11)
1171
+ #define BTRFS_BLOCK_GROUP_METADATA_REMAP (1ULL << 12)
1160
1172
  #define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \
1161
1173
  BTRFS_SPACE_INFO_GLOBAL_RSV)
1162
1174
 
1163
1175
  #define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \
1164
1176
  BTRFS_BLOCK_GROUP_SYSTEM | \
1165
- BTRFS_BLOCK_GROUP_METADATA)
1177
+ BTRFS_BLOCK_GROUP_METADATA | \
1178
+ BTRFS_BLOCK_GROUP_METADATA_REMAP)
1166
1179
 
1167
1180
  #define BTRFS_BLOCK_GROUP_PROFILE_MASK (BTRFS_BLOCK_GROUP_RAID0 | \
1168
1181
  BTRFS_BLOCK_GROUP_RAID1 | \
@@ -1215,6 +1228,14 @@ struct btrfs_block_group_item {
1215
1228
  __le64 flags;
1216
1229
  } __attribute__ ((__packed__));
1217
1230
 
1231
+ struct btrfs_block_group_item_v2 {
1232
+ __le64 used;
1233
+ __le64 chunk_objectid;
1234
+ __le64 flags;
1235
+ __le64 remap_bytes;
1236
+ __le32 identity_remap_count;
1237
+ } __attribute__ ((__packed__));
1238
+
1218
1239
  struct btrfs_free_space_info {
1219
1240
  __le32 extent_count;
1220
1241
  __le32 flags;
@@ -1319,4 +1340,13 @@ struct btrfs_verity_descriptor_item {
1319
1340
  __u8 encryption;
1320
1341
  } __attribute__ ((__packed__));
1321
1342
 
1343
+ /*
1344
+ * For a range identified by a BTRFS_REMAP_KEY item in the remap tree, gives
1345
+ * the address that the start of the range will get remapped to. This
1346
+ * structure is also shared by BTRFS_REMAP_BACKREF_KEY.
1347
+ */
1348
+ struct btrfs_remap_item {
1349
+ __le64 address;
1350
+ } __attribute__ ((__packed__));
1351
+
1322
1352
  #endif /* _BTRFS_CTREE_H_ */
@@ -20,6 +20,7 @@
20
20
  #ifndef _DMA_BUF_UAPI_H_
21
21
  #define _DMA_BUF_UAPI_H_
22
22
 
23
+ #include <linux/ioctl.h>
23
24
  #include <linux/types.h>
24
25
 
25
26
  /**
@@ -253,6 +253,7 @@ enum dpll_a_pin {
253
253
  DPLL_A_PIN_ESYNC_PULSE,
254
254
  DPLL_A_PIN_REFERENCE_SYNC,
255
255
  DPLL_A_PIN_PHASE_ADJUST_GRAN,
256
+ DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT,
256
257
 
257
258
  __DPLL_A_PIN_MAX,
258
259
  DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
@@ -545,6 +545,8 @@ typedef struct elf64_shdr {
545
545
  #define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
546
546
  #define NN_RISCV_TAGGED_ADDR_CTRL "LINUX"
547
547
  #define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */
548
+ #define NN_RISCV_USER_CFI "LINUX"
549
+ #define NT_RISCV_USER_CFI 0x903 /* RISC-V shadow stack state */
548
550
  #define NN_LOONGARCH_CPUCFG "LINUX"
549
551
  #define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
550
552
  #define NN_LOONGARCH_CSR "LINUX"
@@ -15,11 +15,10 @@
15
15
  #define _LINUX_ETHTOOL_H
16
16
 
17
17
  #include <linux/const.h>
18
+ #include <linux/typelimits.h>
18
19
  #include <linux/types.h>
19
20
  #include <linux/if_ether.h>
20
21
 
21
- #include <limits.h> /* for INT_MAX */
22
-
23
22
  /* All structures exposed to userland should be defined such that they
24
23
  * have the same layout for 32-bit and 64-bit userland.
25
24
  */
@@ -601,6 +600,8 @@ enum ethtool_link_ext_state {
601
600
  ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
602
601
  ETHTOOL_LINK_EXT_STATE_OVERHEAT,
603
602
  ETHTOOL_LINK_EXT_STATE_MODULE,
603
+ ETHTOOL_LINK_EXT_STATE_OTP_SPEED_VIOLATION,
604
+ ETHTOOL_LINK_EXT_STATE_BMC_REQUEST_DOWN,
604
605
  };
605
606
 
606
607
  /* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */
@@ -1092,13 +1093,20 @@ enum ethtool_module_fw_flash_status {
1092
1093
  * struct ethtool_gstrings - string set for data tagging
1093
1094
  * @cmd: Command number = %ETHTOOL_GSTRINGS
1094
1095
  * @string_set: String set ID; one of &enum ethtool_stringset
1095
- * @len: On return, the number of strings in the string set
1096
+ * @len: Number of strings in the string set
1096
1097
  * @data: Buffer for strings. Each string is null-padded to a size of
1097
1098
  * %ETH_GSTRING_LEN.
1098
1099
  *
1099
1100
  * Users must use %ETHTOOL_GSSET_INFO to find the number of strings in
1100
1101
  * the string set. They must allocate a buffer of the appropriate
1101
1102
  * size immediately following this structure.
1103
+ *
1104
+ * Setting @len on input is optional (though preferred), but must be zeroed
1105
+ * otherwise.
1106
+ * When set, @len will return the requested count if it matches the actual
1107
+ * count; otherwise, it will be zero.
1108
+ * This prevents issues when the number of strings is different than the
1109
+ * userspace allocation.
1102
1110
  */
1103
1111
  struct ethtool_gstrings {
1104
1112
  __u32 cmd;
@@ -1175,13 +1183,20 @@ struct ethtool_test {
1175
1183
  /**
1176
1184
  * struct ethtool_stats - device-specific statistics
1177
1185
  * @cmd: Command number = %ETHTOOL_GSTATS
1178
- * @n_stats: On return, the number of statistics
1186
+ * @n_stats: Number of statistics
1179
1187
  * @data: Array of statistics
1180
1188
  *
1181
1189
  * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the
1182
1190
  * number of statistics that will be returned. They must allocate a
1183
1191
  * buffer of the appropriate size (8 * number of statistics)
1184
1192
  * immediately following this structure.
1193
+ *
1194
+ * Setting @n_stats on input is optional (though preferred), but must be zeroed
1195
+ * otherwise.
1196
+ * When set, @n_stats will return the requested count if it matches the actual
1197
+ * count; otherwise, it will be zero.
1198
+ * This prevents issues when the number of stats is different than the
1199
+ * userspace allocation.
1185
1200
  */
1186
1201
  struct ethtool_stats {
1187
1202
  __u32 cmd;
@@ -2188,6 +2203,7 @@ enum ethtool_link_mode_bit_indices {
2188
2203
  #define SPEED_40000 40000
2189
2204
  #define SPEED_50000 50000
2190
2205
  #define SPEED_56000 56000
2206
+ #define SPEED_80000 80000
2191
2207
  #define SPEED_100000 100000
2192
2208
  #define SPEED_200000 200000
2193
2209
  #define SPEED_400000 400000
@@ -2198,7 +2214,7 @@ enum ethtool_link_mode_bit_indices {
2198
2214
 
2199
2215
  static __inline__ int ethtool_validate_speed(__u32 speed)
2200
2216
  {
2201
- return speed <= INT_MAX || speed == (__u32)SPEED_UNKNOWN;
2217
+ return speed <= __KERNEL_INT_MAX || speed == (__u32)SPEED_UNKNOWN;
2202
2218
  }
2203
2219
 
2204
2220
  /* Duplex, half or full. */
@@ -249,6 +249,7 @@ struct file_attr {
249
249
  #define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */
250
250
  #define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */
251
251
  #define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */
252
+ #define FS_XFLAG_VERITY 0x00020000 /* fs-verity enabled */
252
253
  #define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
253
254
 
254
255
  /* the read-only stuff doesn't really belong here, but any other place is
@@ -362,7 +362,7 @@ struct hv_kvp_exchg_msg_value {
362
362
  __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
363
363
  __u32 value_u32;
364
364
  __u64 value_u64;
365
- };
365
+ } __attribute__((packed));
366
366
  } __attribute__((packed));
367
367
 
368
368
  struct hv_kvp_msg_enumerate {