@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
@@ -11,7 +11,7 @@
11
11
  * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
12
12
  * Copyright 2008 Colin McCabe <colin@cozybit.com>
13
13
  * Copyright 2015-2017 Intel Deutschland GmbH
14
- * Copyright (C) 2018-2025 Intel Corporation
14
+ * Copyright (C) 2018-2026 Intel Corporation
15
15
  *
16
16
  * Permission to use, copy, modify, and/or distribute this software for any
17
17
  * purpose with or without fee is hereby granted, provided that the above
@@ -2974,6 +2974,16 @@ enum nl80211_commands {
2974
2974
  * primary channel is 2 MHz wide, and the control channel designates
2975
2975
  * the 1 MHz primary subchannel within that 2 MHz primary.
2976
2976
  *
2977
+ * @NL80211_ATTR_EPP_PEER: A flag attribute to indicate if the peer is an EPP
2978
+ * STA. Used with %NL80211_CMD_NEW_STA and %NL80211_CMD_ADD_LINK_STA
2979
+ *
2980
+ * @NL80211_ATTR_UHR_CAPABILITY: UHR Capability information element (from
2981
+ * association request when used with NL80211_CMD_NEW_STATION). Can be set
2982
+ * only if HE/EHT are also available.
2983
+ * @NL80211_ATTR_DISABLE_UHR: Force UHR capable interfaces to disable
2984
+ * this feature during association. This is a flag attribute.
2985
+ * Currently only supported in mac80211 drivers.
2986
+ *
2977
2987
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
2978
2988
  * @NL80211_ATTR_MAX: highest attribute number currently defined
2979
2989
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3542,6 +3552,11 @@ enum nl80211_attrs {
3542
3552
 
3543
3553
  NL80211_ATTR_S1G_PRIMARY_2MHZ,
3544
3554
 
3555
+ NL80211_ATTR_EPP_PEER,
3556
+
3557
+ NL80211_ATTR_UHR_CAPABILITY,
3558
+ NL80211_ATTR_DISABLE_UHR,
3559
+
3545
3560
  /* add attributes here, update the policy in nl80211.c */
3546
3561
 
3547
3562
  __NL80211_ATTR_AFTER_LAST,
@@ -3894,6 +3909,12 @@ enum nl80211_eht_ru_alloc {
3894
3909
  * @NL80211_RATE_INFO_4_MHZ_WIDTH: 4 MHz S1G rate
3895
3910
  * @NL80211_RATE_INFO_8_MHZ_WIDTH: 8 MHz S1G rate
3896
3911
  * @NL80211_RATE_INFO_16_MHZ_WIDTH: 16 MHz S1G rate
3912
+ * @NL80211_RATE_INFO_UHR_MCS: UHR MCS index (u8, 0-15, 17, 19, 20, 23)
3913
+ * Note that the other EHT attributes (such as @NL80211_RATE_INFO_EHT_NSS)
3914
+ * are used in conjunction with this where applicable
3915
+ * @NL80211_RATE_INFO_UHR_ELR: UHR ELR flag, which restricts NSS to 1,
3916
+ * MCS to 0 or 1, and GI to %NL80211_RATE_INFO_EHT_GI_1_6.
3917
+ * @NL80211_RATE_INFO_UHR_IM: UHR Interference Mitigation flag
3897
3918
  * @__NL80211_RATE_INFO_AFTER_LAST: internal use
3898
3919
  */
3899
3920
  enum nl80211_rate_info {
@@ -3927,6 +3948,9 @@ enum nl80211_rate_info {
3927
3948
  NL80211_RATE_INFO_4_MHZ_WIDTH,
3928
3949
  NL80211_RATE_INFO_8_MHZ_WIDTH,
3929
3950
  NL80211_RATE_INFO_16_MHZ_WIDTH,
3951
+ NL80211_RATE_INFO_UHR_MCS,
3952
+ NL80211_RATE_INFO_UHR_ELR,
3953
+ NL80211_RATE_INFO_UHR_IM,
3930
3954
 
3931
3955
  /* keep last */
3932
3956
  __NL80211_RATE_INFO_AFTER_LAST,
@@ -4249,6 +4273,10 @@ enum nl80211_mpath_info {
4249
4273
  * capabilities element
4250
4274
  * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE: EHT PPE thresholds information as
4251
4275
  * defined in EHT capabilities element
4276
+ * @NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC: UHR MAC capabilities as in UHR
4277
+ * capabilities element
4278
+ * @NL80211_BAND_IFTYPE_ATTR_UHR_CAP_PHY: UHR PHY capabilities as in UHR
4279
+ * capabilities element
4252
4280
  * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
4253
4281
  * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined
4254
4282
  */
@@ -4266,6 +4294,8 @@ enum nl80211_band_iftype_attr {
4266
4294
  NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY,
4267
4295
  NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET,
4268
4296
  NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE,
4297
+ NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC,
4298
+ NL80211_BAND_IFTYPE_ATTR_UHR_CAP_PHY,
4269
4299
 
4270
4300
  /* keep last */
4271
4301
  __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
@@ -4445,6 +4475,11 @@ enum nl80211_wmm_rule {
4445
4475
  * channel in current regulatory domain.
4446
4476
  * @NL80211_FREQUENCY_ATTR_NO_16MHZ: 16 MHz operation is not allowed on this
4447
4477
  * channel in current regulatory domain.
4478
+ * @NL80211_FREQUENCY_ATTR_S1G_NO_PRIMARY: Channel is not permitted for use
4479
+ * as a primary channel. Does not prevent the channel from existing
4480
+ * as a non-primary subchannel. Only applicable to S1G channels.
4481
+ * @NL80211_FREQUENCY_ATTR_NO_UHR: UHR operation is not allowed on this channel
4482
+ * in current regulatory domain.
4448
4483
  * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
4449
4484
  * currently defined
4450
4485
  * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -4493,6 +4528,8 @@ enum nl80211_frequency_attr {
4493
4528
  NL80211_FREQUENCY_ATTR_NO_4MHZ,
4494
4529
  NL80211_FREQUENCY_ATTR_NO_8MHZ,
4495
4530
  NL80211_FREQUENCY_ATTR_NO_16MHZ,
4531
+ NL80211_FREQUENCY_ATTR_S1G_NO_PRIMARY,
4532
+ NL80211_FREQUENCY_ATTR_NO_UHR,
4496
4533
 
4497
4534
  /* keep last */
4498
4535
  __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -4706,6 +4743,7 @@ enum nl80211_sched_scan_match_attr {
4706
4743
  * despite NO_IR configuration.
4707
4744
  * @NL80211_RRF_ALLOW_20MHZ_ACTIVITY: Allow activity in 20 MHz bandwidth,
4708
4745
  * despite NO_IR configuration.
4746
+ * @NL80211_RRF_NO_UHR: UHR operation not allowed
4709
4747
  */
4710
4748
  enum nl80211_reg_rule_flags {
4711
4749
  NL80211_RRF_NO_OFDM = 1 << 0,
@@ -4732,6 +4770,7 @@ enum nl80211_reg_rule_flags {
4732
4770
  NL80211_RRF_NO_6GHZ_AFC_CLIENT = 1 << 23,
4733
4771
  NL80211_RRF_ALLOW_6GHZ_VLP_AP = 1 << 24,
4734
4772
  NL80211_RRF_ALLOW_20MHZ_ACTIVITY = 1 << 25,
4773
+ NL80211_RRF_NO_UHR = 1 << 26,
4735
4774
  };
4736
4775
 
4737
4776
  #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
@@ -5426,6 +5465,7 @@ enum nl80211_bss_status {
5426
5465
  * @NL80211_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key
5427
5466
  * @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
5428
5467
  * @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
5468
+ * @NL80211_AUTHTYPE_EPPKE: Enhanced Privacy Protection Key Exchange
5429
5469
  * @__NL80211_AUTHTYPE_NUM: internal
5430
5470
  * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
5431
5471
  * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
@@ -5441,6 +5481,7 @@ enum nl80211_auth_type {
5441
5481
  NL80211_AUTHTYPE_FILS_SK,
5442
5482
  NL80211_AUTHTYPE_FILS_SK_PFS,
5443
5483
  NL80211_AUTHTYPE_FILS_PK,
5484
+ NL80211_AUTHTYPE_EPPKE,
5444
5485
 
5445
5486
  /* keep last */
5446
5487
  __NL80211_AUTHTYPE_NUM,
@@ -6745,6 +6786,15 @@ enum nl80211_feature_flags {
6745
6786
  * @NL80211_EXT_FEATURE_BEACON_RATE_EHT: Driver supports beacon rate
6746
6787
  * configuration (AP/mesh) with EHT rates.
6747
6788
  *
6789
+ * @NL80211_EXT_FEATURE_EPPKE: Driver supports Enhanced Privacy Protection
6790
+ * Key Exchange (EPPKE) with user space SME (NL80211_CMD_AUTHENTICATE)
6791
+ * in non-AP STA mode.
6792
+ *
6793
+ * @NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION: This specifies that the
6794
+ * driver supports encryption of (Re)Association Request and Response
6795
+ * frames in both non‑AP STA and AP mode as specified in
6796
+ * "IEEE P802.11bi/D3.0, 12.16.6".
6797
+ *
6748
6798
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
6749
6799
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
6750
6800
  */
@@ -6821,6 +6871,8 @@ enum nl80211_ext_feature_index {
6821
6871
  NL80211_EXT_FEATURE_DFS_CONCURRENT,
6822
6872
  NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,
6823
6873
  NL80211_EXT_FEATURE_BEACON_RATE_EHT,
6874
+ NL80211_EXT_FEATURE_EPPKE,
6875
+ NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION,
6824
6876
 
6825
6877
  /* add new features before the definition below */
6826
6878
  NUM_NL80211_EXT_FEATURES,
@@ -7433,6 +7485,8 @@ enum nl80211_nan_band_conf_attributes {
7433
7485
  * address that can take values from 50-6F-9A-01-00-00 to
7434
7486
  * 50-6F-9A-01-FF-FF. This attribute is optional. If not present,
7435
7487
  * a random Cluster ID will be chosen.
7488
+ * This attribute will be ignored in NL80211_CMD_CHANGE_NAN_CONFIG
7489
+ * since after NAN was started, the cluster ID can no longer change.
7436
7490
  * @NL80211_NAN_CONF_EXTRA_ATTRS: Additional NAN attributes to be
7437
7491
  * published in the beacons. This is an optional byte array.
7438
7492
  * @NL80211_NAN_CONF_VENDOR_ELEMS: Vendor-specific elements that will
@@ -7767,6 +7821,30 @@ enum nl80211_peer_measurement_attrs {
7767
7821
  * trigger based ranging measurement is supported
7768
7822
  * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating
7769
7823
  * if non-trigger-based ranging measurement is supported
7824
+ * @NL80211_PMSR_FTM_CAPA_ATTR_6GHZ_SUPPORT: flag attribute indicating if
7825
+ * ranging on the 6 GHz band is supported
7826
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_LTF_REP: u32 attribute indicating
7827
+ * the maximum number of LTF repetitions the device can transmit in the
7828
+ * preamble of the ranging NDP (zero means only one LTF, no repetitions)
7829
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_LTF_REP: u32 attribute indicating
7830
+ * the maximum number of LTF repetitions the device can receive in the
7831
+ * preamble of the ranging NDP (zero means only one LTF, no repetitions)
7832
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_STS: u32 attribute indicating
7833
+ * the maximum number of space-time streams supported for ranging NDP TX
7834
+ * (zero-based)
7835
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_STS: u32 attribute indicating
7836
+ * the maximum number of space-time streams supported for ranging NDP RX
7837
+ * (zero-based)
7838
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX: u32 attribute indicating the
7839
+ * maximum total number of LTFs the device can transmit. The total number
7840
+ * of LTFs is (number of LTF repetitions) * (number of space-time streams).
7841
+ * This limits the allowed combinations of LTF repetitions and STS.
7842
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX: u32 attribute indicating the
7843
+ * maximum total number of LTFs the device can receive. The total number
7844
+ * of LTFs is (number of LTF repetitions) * (number of space-time streams).
7845
+ * This limits the allowed combinations of LTF repetitions and STS.
7846
+ * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT: flag attribute indicating the
7847
+ * device supports operating as the RSTA in PMSR FTM request
7770
7848
  *
7771
7849
  * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
7772
7850
  * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
@@ -7784,6 +7862,14 @@ enum nl80211_peer_measurement_ftm_capa {
7784
7862
  NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST,
7785
7863
  NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED,
7786
7864
  NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED,
7865
+ NL80211_PMSR_FTM_CAPA_ATTR_6GHZ_SUPPORT,
7866
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_LTF_REP,
7867
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_LTF_REP,
7868
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_STS,
7869
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_STS,
7870
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX,
7871
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX,
7872
+ NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT,
7787
7873
 
7788
7874
  /* keep last */
7789
7875
  NUM_NL80211_PMSR_FTM_CAPA_ATTR,
@@ -7799,12 +7885,15 @@ enum nl80211_peer_measurement_ftm_capa {
7799
7885
  * &enum nl80211_preamble), optional for DMG (u32)
7800
7886
  * @NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP: number of bursts exponent as in
7801
7887
  * 802.11-2016 9.4.2.168 "Fine Timing Measurement Parameters element"
7802
- * (u8, 0-15, optional with default 15 i.e. "no preference")
7888
+ * (u8, 0-15, optional with default 15 i.e. "no preference". No limit for
7889
+ * non-EDCA ranging)
7803
7890
  * @NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD: interval between bursts in units
7804
7891
  * of 100ms (u16, optional with default 0)
7805
7892
  * @NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION: burst duration, as in 802.11-2016
7806
7893
  * Table 9-257 "Burst Duration field encoding" (u8, 0-15, optional with
7807
- * default 15 i.e. "no preference")
7894
+ * default 15 i.e. "no preference"). For non-EDCA ranging, this is the
7895
+ * burst duration in milliseconds (optional with default 0, i.e. let the
7896
+ * device decide).
7808
7897
  * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames
7809
7898
  * requested per burst
7810
7899
  * (u8, 0-31, optional with default 0 i.e. "no preference")
@@ -7833,6 +7922,14 @@ enum nl80211_peer_measurement_ftm_capa {
7833
7922
  * @NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR: optional. The BSS color of the
7834
7923
  * responder. Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
7835
7924
  * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED is set.
7925
+ * @NL80211_PMSR_FTM_REQ_ATTR_RSTA: optional. Request to perform the measurement
7926
+ * as the RSTA (flag). When set, the device is expected to dwell on the
7927
+ * channel specified in %NL80211_PMSR_PEER_ATTR_CHAN until it receives the
7928
+ * FTM request from the peer or the timeout specified by
7929
+ * %NL80211_ATTR_TIMEOUT has expired.
7930
+ * Only valid if %NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK is set (so the
7931
+ * RSTA will have the measurement results to report back in the FTM
7932
+ * response).
7836
7933
  *
7837
7934
  * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
7838
7935
  * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
@@ -7853,6 +7950,7 @@ enum nl80211_peer_measurement_ftm_req {
7853
7950
  NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
7854
7951
  NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
7855
7952
  NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,
7953
+ NL80211_PMSR_FTM_REQ_ATTR_RSTA,
7856
7954
 
7857
7955
  /* keep last */
7858
7956
  NUM_NL80211_PMSR_FTM_REQ_ATTR,
@@ -7937,6 +8035,8 @@ enum nl80211_peer_measurement_ftm_failure_reasons {
7937
8035
  * 9.4.2.22.1) starting with the Measurement Token, with Measurement
7938
8036
  * Type 11.
7939
8037
  * @NL80211_PMSR_FTM_RESP_ATTR_PAD: ignore, for u64/s64 padding only
8038
+ * @NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD: actual burst period used by
8039
+ * the responder (similar to request, u16)
7940
8040
  *
7941
8041
  * @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal
7942
8042
  * @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number
@@ -7965,6 +8065,7 @@ enum nl80211_peer_measurement_ftm_resp {
7965
8065
  NL80211_PMSR_FTM_RESP_ATTR_LCI,
7966
8066
  NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
7967
8067
  NL80211_PMSR_FTM_RESP_ATTR_PAD,
8068
+ NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD,
7968
8069
 
7969
8070
  /* keep last */
7970
8071
  NUM_NL80211_PMSR_FTM_RESP_ATTR,
@@ -39,4 +39,11 @@
39
39
  #define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */
40
40
  #define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */
41
41
 
42
+ enum pci_hotplug_event {
43
+ PCI_HOTPLUG_LINK_UP,
44
+ PCI_HOTPLUG_LINK_DOWN,
45
+ PCI_HOTPLUG_CARD_PRESENT,
46
+ PCI_HOTPLUG_CARD_NOT_PRESENT,
47
+ };
48
+
42
49
  #endif /* LINUX_PCI_H */
@@ -132,6 +132,11 @@
132
132
  #define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */
133
133
  #define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */
134
134
  #define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */
135
+ /* Masks for dword-sized processing of Bus Number and Sec Latency Timer fields */
136
+ #define PCI_PRIMARY_BUS_MASK 0x000000ff
137
+ #define PCI_SECONDARY_BUS_MASK 0x0000ff00
138
+ #define PCI_SUBORDINATE_BUS_MASK 0x00ff0000
139
+ #define PCI_SEC_LATENCY_TIMER_MASK 0xff000000
135
140
  #define PCI_IO_BASE 0x1c /* I/O range behind the bridge */
136
141
  #define PCI_IO_LIMIT 0x1d
137
142
  #define PCI_IO_RANGE_TYPE_MASK 0x0fUL /* I/O bridging type */
@@ -707,7 +712,7 @@
707
712
  #define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */
708
713
  #define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */
709
714
  #define PCI_EXP_LNKSTA2_FLIT 0x0400 /* Flit Mode Status */
710
- #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */
715
+ #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x34 /* end of v2 EPs w/ link */
711
716
  #define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */
712
717
  #define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */
713
718
  #define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */
@@ -1253,11 +1258,6 @@
1253
1258
  #define PCI_DEV3_STA 0x0c /* Device 3 Status Register */
1254
1259
  #define PCI_DEV3_STA_SEGMENT 0x8 /* Segment Captured (end-to-end flit-mode detected) */
1255
1260
 
1256
- /* Compute Express Link (CXL r3.1, sec 8.1.5) */
1257
- #define PCI_DVSEC_CXL_PORT 3
1258
- #define PCI_DVSEC_CXL_PORT_CTL 0x0c
1259
- #define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001
1260
-
1261
1261
  /* Integrity and Data Encryption Extended Capability */
1262
1262
  #define PCI_IDE_CAP 0x04
1263
1263
  #define PCI_IDE_CAP_LINK 0x1 /* Link IDE Stream Supported */
@@ -1338,4 +1338,63 @@
1338
1338
  #define PCI_IDE_SEL_ADDR_3(x) (28 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
1339
1339
  #define PCI_IDE_SEL_BLOCK_SIZE(nr_assoc) (20 + PCI_IDE_SEL_ADDR_BLOCK_SIZE * (nr_assoc))
1340
1340
 
1341
+ /*
1342
+ * Compute Express Link (CXL r4.0, sec 8.1)
1343
+ *
1344
+ * Note that CXL DVSEC id 3 and 7 to be ignored when the CXL link state
1345
+ * is "disconnected" (CXL r4.0, sec 9.12.3). Re-enumerate these
1346
+ * registers on downstream link-up events.
1347
+ */
1348
+
1349
+ /* CXL r4.0, 8.1.3: PCIe DVSEC for CXL Device */
1350
+ #define PCI_DVSEC_CXL_DEVICE 0
1351
+ #define PCI_DVSEC_CXL_CAP 0xA
1352
+ #define PCI_DVSEC_CXL_MEM_CAPABLE _BITUL(2)
1353
+ #define PCI_DVSEC_CXL_HDM_COUNT __GENMASK(5, 4)
1354
+ #define PCI_DVSEC_CXL_CTRL 0xC
1355
+ #define PCI_DVSEC_CXL_MEM_ENABLE _BITUL(2)
1356
+ #define PCI_DVSEC_CXL_RANGE_SIZE_HIGH(i) (0x18 + (i * 0x10))
1357
+ #define PCI_DVSEC_CXL_RANGE_SIZE_LOW(i) (0x1C + (i * 0x10))
1358
+ #define PCI_DVSEC_CXL_MEM_INFO_VALID _BITUL(0)
1359
+ #define PCI_DVSEC_CXL_MEM_ACTIVE _BITUL(1)
1360
+ #define PCI_DVSEC_CXL_MEM_SIZE_LOW __GENMASK(31, 28)
1361
+ #define PCI_DVSEC_CXL_RANGE_BASE_HIGH(i) (0x20 + (i * 0x10))
1362
+ #define PCI_DVSEC_CXL_RANGE_BASE_LOW(i) (0x24 + (i * 0x10))
1363
+ #define PCI_DVSEC_CXL_MEM_BASE_LOW __GENMASK(31, 28)
1364
+
1365
+ #define CXL_DVSEC_RANGE_MAX 2
1366
+
1367
+ /* CXL r4.0, 8.1.4: Non-CXL Function Map DVSEC */
1368
+ #define PCI_DVSEC_CXL_FUNCTION_MAP 2
1369
+
1370
+ /* CXL r4.0, 8.1.5: Extensions DVSEC for Ports */
1371
+ #define PCI_DVSEC_CXL_PORT 3
1372
+ #define PCI_DVSEC_CXL_PORT_CTL 0x0c
1373
+ #define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001
1374
+
1375
+ /* CXL r4.0, 8.1.6: GPF DVSEC for CXL Port */
1376
+ #define PCI_DVSEC_CXL_PORT_GPF 4
1377
+ #define PCI_DVSEC_CXL_PORT_GPF_PHASE_1_CONTROL 0x0C
1378
+ #define PCI_DVSEC_CXL_PORT_GPF_PHASE_1_TMO_BASE __GENMASK(3, 0)
1379
+ #define PCI_DVSEC_CXL_PORT_GPF_PHASE_1_TMO_SCALE __GENMASK(11, 8)
1380
+ #define PCI_DVSEC_CXL_PORT_GPF_PHASE_2_CONTROL 0xE
1381
+ #define PCI_DVSEC_CXL_PORT_GPF_PHASE_2_TMO_BASE __GENMASK(3, 0)
1382
+ #define PCI_DVSEC_CXL_PORT_GPF_PHASE_2_TMO_SCALE __GENMASK(11, 8)
1383
+
1384
+ /* CXL r4.0, 8.1.7: GPF DVSEC for CXL Device */
1385
+ #define PCI_DVSEC_CXL_DEVICE_GPF 5
1386
+
1387
+ /* CXL r4.0, 8.1.8: Flex Bus DVSEC */
1388
+ #define PCI_DVSEC_CXL_FLEXBUS_PORT 7
1389
+ #define PCI_DVSEC_CXL_FLEXBUS_PORT_STATUS 0xE
1390
+ #define PCI_DVSEC_CXL_FLEXBUS_PORT_STATUS_CACHE _BITUL(0)
1391
+ #define PCI_DVSEC_CXL_FLEXBUS_PORT_STATUS_MEM _BITUL(2)
1392
+
1393
+ /* CXL r4.0, 8.1.9: Register Locator DVSEC */
1394
+ #define PCI_DVSEC_CXL_REG_LOCATOR 8
1395
+ #define PCI_DVSEC_CXL_REG_LOCATOR_BLOCK1 0xC
1396
+ #define PCI_DVSEC_CXL_REG_LOCATOR_BIR __GENMASK(2, 0)
1397
+ #define PCI_DVSEC_CXL_REG_LOCATOR_BLOCK_ID __GENMASK(15, 8)
1398
+ #define PCI_DVSEC_CXL_REG_LOCATOR_BLOCK_OFF_LOW __GENMASK(31, 16)
1399
+
1341
1400
  #endif /* LINUX_PCI_REGS_H */
@@ -22,6 +22,7 @@
22
22
  #define PCITEST_GET_IRQTYPE _IO('P', 0x9)
23
23
  #define PCITEST_BARS _IO('P', 0xa)
24
24
  #define PCITEST_DOORBELL _IO('P', 0xb)
25
+ #define PCITEST_BAR_SUBRANGE _IO('P', 0xc)
25
26
  #define PCITEST_CLEAR_IRQ _IO('P', 0x10)
26
27
 
27
28
  #define PCITEST_IRQ_TYPE_UNDEFINED -1
@@ -1330,14 +1330,16 @@ union perf_mem_data_src {
1330
1330
  mem_snoopx : 2, /* Snoop mode, ext */
1331
1331
  mem_blk : 3, /* Access blocked */
1332
1332
  mem_hops : 3, /* Hop level */
1333
- mem_rsvd : 18;
1333
+ mem_region : 5, /* cache/memory regions */
1334
+ mem_rsvd : 13;
1334
1335
  };
1335
1336
  };
1336
1337
  #elif defined(__BIG_ENDIAN_BITFIELD)
1337
1338
  union perf_mem_data_src {
1338
1339
  __u64 val;
1339
1340
  struct {
1340
- __u64 mem_rsvd : 18,
1341
+ __u64 mem_rsvd : 13,
1342
+ mem_region : 5, /* cache/memory regions */
1341
1343
  mem_hops : 3, /* Hop level */
1342
1344
  mem_blk : 3, /* Access blocked */
1343
1345
  mem_snoopx : 2, /* Snoop mode, ext */
@@ -1394,7 +1396,7 @@ union perf_mem_data_src {
1394
1396
  #define PERF_MEM_LVLNUM_L4 0x0004 /* L4 */
1395
1397
  #define PERF_MEM_LVLNUM_L2_MHB 0x0005 /* L2 Miss Handling Buffer */
1396
1398
  #define PERF_MEM_LVLNUM_MSC 0x0006 /* Memory-side Cache */
1397
- /* 0x007 available */
1399
+ #define PERF_MEM_LVLNUM_L0 0x0007 /* L0 */
1398
1400
  #define PERF_MEM_LVLNUM_UNC 0x0008 /* Uncached */
1399
1401
  #define PERF_MEM_LVLNUM_CXL 0x0009 /* CXL */
1400
1402
  #define PERF_MEM_LVLNUM_IO 0x000a /* I/O */
@@ -1447,6 +1449,25 @@ union perf_mem_data_src {
1447
1449
  /* 5-7 available */
1448
1450
  #define PERF_MEM_HOPS_SHIFT 43
1449
1451
 
1452
+ /* Cache/Memory region */
1453
+ #define PERF_MEM_REGION_NA 0x0 /* Invalid */
1454
+ #define PERF_MEM_REGION_RSVD 0x01 /* Reserved */
1455
+ #define PERF_MEM_REGION_L_SHARE 0x02 /* Local CA shared cache */
1456
+ #define PERF_MEM_REGION_L_NON_SHARE 0x03 /* Local CA non-shared cache */
1457
+ #define PERF_MEM_REGION_O_IO 0x04 /* Other CA IO agent */
1458
+ #define PERF_MEM_REGION_O_SHARE 0x05 /* Other CA shared cache */
1459
+ #define PERF_MEM_REGION_O_NON_SHARE 0x06 /* Other CA non-shared cache */
1460
+ #define PERF_MEM_REGION_MMIO 0x07 /* MMIO */
1461
+ #define PERF_MEM_REGION_MEM0 0x08 /* Memory region 0 */
1462
+ #define PERF_MEM_REGION_MEM1 0x09 /* Memory region 1 */
1463
+ #define PERF_MEM_REGION_MEM2 0x0a /* Memory region 2 */
1464
+ #define PERF_MEM_REGION_MEM3 0x0b /* Memory region 3 */
1465
+ #define PERF_MEM_REGION_MEM4 0x0c /* Memory region 4 */
1466
+ #define PERF_MEM_REGION_MEM5 0x0d /* Memory region 5 */
1467
+ #define PERF_MEM_REGION_MEM6 0x0e /* Memory region 6 */
1468
+ #define PERF_MEM_REGION_MEM7 0x0f /* Memory region 7 */
1469
+ #define PERF_MEM_REGION_SHIFT 46
1470
+
1450
1471
  #define PERF_MEM_S(a, s) \
1451
1472
  (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
1452
1473
 
@@ -1036,6 +1036,7 @@ enum {
1036
1036
  TCA_CAKE_STATS_DROP_NEXT_US,
1037
1037
  TCA_CAKE_STATS_P_DROP,
1038
1038
  TCA_CAKE_STATS_BLUE_TIMER_US,
1039
+ TCA_CAKE_STATS_ACTIVE_QUEUES,
1039
1040
  __TCA_CAKE_STATS_MAX
1040
1041
  };
1041
1042
  #define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1)
@@ -386,4 +386,34 @@ struct prctl_mm_map {
386
386
  # define PR_FUTEX_HASH_SET_SLOTS 1
387
387
  # define PR_FUTEX_HASH_GET_SLOTS 2
388
388
 
389
+ /* RSEQ time slice extensions */
390
+ #define PR_RSEQ_SLICE_EXTENSION 79
391
+ # define PR_RSEQ_SLICE_EXTENSION_GET 1
392
+ # define PR_RSEQ_SLICE_EXTENSION_SET 2
393
+ /*
394
+ * Bits for RSEQ_SLICE_EXTENSION_GET/SET
395
+ * PR_RSEQ_SLICE_EXT_ENABLE: Enable
396
+ */
397
+ # define PR_RSEQ_SLICE_EXT_ENABLE 0x01
398
+
399
+ /*
400
+ * Get or set the control flow integrity (CFI) configuration for the
401
+ * current thread.
402
+ *
403
+ * Some per-thread control flow integrity settings are not yet
404
+ * controlled through this prctl(); see for example
405
+ * PR_{GET,SET,LOCK}_SHADOW_STACK_STATUS
406
+ */
407
+ #define PR_GET_CFI 80
408
+ #define PR_SET_CFI 81
409
+ /*
410
+ * Forward-edge CFI variants (excluding ARM64 BTI, which has its own
411
+ * prctl()s).
412
+ */
413
+ #define PR_CFI_BRANCH_LANDING_PADS 0
414
+ /* Return and control values for PR_{GET,SET}_CFI */
415
+ # define PR_CFI_ENABLE _BITUL(0)
416
+ # define PR_CFI_DISABLE _BITUL(1)
417
+ # define PR_CFI_LOCK _BITUL(2)
418
+
389
419
  #endif /* _LINUX_PRCTL_H */
@@ -19,13 +19,20 @@ enum rseq_cpu_id_state {
19
19
  };
20
20
 
21
21
  enum rseq_flags {
22
- RSEQ_FLAG_UNREGISTER = (1 << 0),
22
+ RSEQ_FLAG_UNREGISTER = (1 << 0),
23
+ RSEQ_FLAG_SLICE_EXT_DEFAULT_ON = (1 << 1),
23
24
  };
24
25
 
25
26
  enum rseq_cs_flags_bit {
27
+ /* Historical and unsupported bits */
26
28
  RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,
27
29
  RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,
28
30
  RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2,
31
+ /* (3) Intentional gap to put new bits into a separate byte */
32
+
33
+ /* User read only feature flags */
34
+ RSEQ_CS_FLAG_SLICE_EXT_AVAILABLE_BIT = 4,
35
+ RSEQ_CS_FLAG_SLICE_EXT_ENABLED_BIT = 5,
29
36
  };
30
37
 
31
38
  enum rseq_cs_flags {
@@ -35,6 +42,11 @@ enum rseq_cs_flags {
35
42
  (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT),
36
43
  RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE =
37
44
  (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT),
45
+
46
+ RSEQ_CS_FLAG_SLICE_EXT_AVAILABLE =
47
+ (1U << RSEQ_CS_FLAG_SLICE_EXT_AVAILABLE_BIT),
48
+ RSEQ_CS_FLAG_SLICE_EXT_ENABLED =
49
+ (1U << RSEQ_CS_FLAG_SLICE_EXT_ENABLED_BIT),
38
50
  };
39
51
 
40
52
  /*
@@ -53,11 +65,39 @@ struct rseq_cs {
53
65
  __u64 abort_ip;
54
66
  } __attribute__((aligned(4 * sizeof(__u64))));
55
67
 
68
+ /**
69
+ * rseq_slice_ctrl - Time slice extension control structure
70
+ * @all: Compound value
71
+ * @request: Request for a time slice extension
72
+ * @granted: Granted time slice extension
73
+ *
74
+ * @request is set by user space and can be cleared by user space or kernel
75
+ * space. @granted is set and cleared by the kernel and must only be read
76
+ * by user space.
77
+ */
78
+ struct rseq_slice_ctrl {
79
+ union {
80
+ __u32 all;
81
+ struct {
82
+ __u8 request;
83
+ __u8 granted;
84
+ __u16 __reserved;
85
+ };
86
+ };
87
+ };
88
+
56
89
  /*
57
- * struct rseq is aligned on 4 * 8 bytes to ensure it is always
58
- * contained within a single cache-line.
90
+ * The original size and alignment of the allocation for struct rseq is
91
+ * 32 bytes.
92
+ *
93
+ * The allocation size needs to be greater or equal to
94
+ * max(getauxval(AT_RSEQ_FEATURE_SIZE), 32), and the allocation needs to
95
+ * be aligned on max(getauxval(AT_RSEQ_ALIGN), 32).
96
+ *
97
+ * As an alternative, userspace is allowed to use both the original size
98
+ * and alignment of 32 bytes for backward compatibility.
59
99
  *
60
- * A single struct rseq per thread is allowed.
100
+ * A single active struct rseq registration per thread is allowed.
61
101
  */
62
102
  struct rseq {
63
103
  /*
@@ -141,10 +181,27 @@ struct rseq {
141
181
  */
142
182
  __u32 mm_cid;
143
183
 
184
+ /*
185
+ * Time slice extension control structure. CPU local updates from
186
+ * kernel and user space.
187
+ */
188
+ struct rseq_slice_ctrl slice_ctrl;
189
+
190
+ /*
191
+ * Before rseq became extensible, its original size was 32 bytes even
192
+ * though the active rseq area was only 20 bytes.
193
+ * Exposing a 32 bytes feature size would make life needlessly painful
194
+ * for userspace. Therefore, add a reserved byte after byte 32
195
+ * to bump the rseq feature size from 32 to 33.
196
+ * The next field to be added to the rseq area will be larger
197
+ * than one byte, and will replace this reserved byte.
198
+ */
199
+ __u8 __reserved;
200
+
144
201
  /*
145
202
  * Flexible array member at end of structure, after last feature field.
146
203
  */
147
204
  char end[];
148
- } __attribute__((aligned(4 * sizeof(__u64))));
205
+ } __attribute__((aligned(32)));
149
206
 
150
207
  #endif /* _LINUX_RSEQ_H */
@@ -5,7 +5,6 @@
5
5
  #include <linux/ipc.h>
6
6
  #include <linux/errno.h>
7
7
  #include <asm-generic/hugetlb_encode.h>
8
- #include <unistd.h>
9
8
 
10
9
  /*
11
10
  * SHMMNI, SHMMAX and SHMALL are default upper limits which can be
@@ -69,6 +69,10 @@
69
69
  #define __counted_by_be(m)
70
70
  #endif
71
71
 
72
+ #ifndef __counted_by_ptr
73
+ #define __counted_by_ptr(m)
74
+ #endif
75
+
72
76
  #define __kernel_nonstring
73
77
 
74
78
  #endif /* _LINUX_STDDEF_H */
@@ -92,7 +92,6 @@ enum
92
92
  KERN_DOMAINNAME=8, /* string: domainname */
93
93
 
94
94
  KERN_PANIC=15, /* int: panic timeout */
95
- KERN_REALROOTDEV=16, /* real root device to mount after initrd */
96
95
 
97
96
  KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
98
97
  KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
@@ -183,7 +182,7 @@ enum
183
182
  VM_LOWMEM_RESERVE_RATIO=20,/* reservation ratio for lower memory zones */
184
183
  VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */
185
184
  VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */
186
- VM_LAPTOP_MODE=23, /* vm laptop mode */
185
+
187
186
  VM_BLOCK_DUMP=24, /* block dump mode */
188
187
  VM_HUGETLB_GROUP=25, /* permitted hugetlb group */
189
188
  VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */
@@ -18,6 +18,7 @@
18
18
  #define _LINUX_TASKSTATS_H
19
19
 
20
20
  #include <linux/types.h>
21
+ #include <linux/time_types.h>
21
22
 
22
23
  /* Format for per-task data returned to userland when
23
24
  * - a task exits
@@ -34,7 +35,7 @@
34
35
  */
35
36
 
36
37
 
37
- #define TASKSTATS_VERSION 16
38
+ #define TASKSTATS_VERSION 17
38
39
  #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
39
40
  * in linux/sched.h */
40
41
 
@@ -230,6 +231,16 @@ struct taskstats {
230
231
 
231
232
  __u64 irq_delay_max;
232
233
  __u64 irq_delay_min;
234
+
235
+ /*v17: delay max timestamp record*/
236
+ struct __kernel_timespec cpu_delay_max_ts;
237
+ struct __kernel_timespec blkio_delay_max_ts;
238
+ struct __kernel_timespec swapin_delay_max_ts;
239
+ struct __kernel_timespec freepages_delay_max_ts;
240
+ struct __kernel_timespec thrashing_delay_max_ts;
241
+ struct __kernel_timespec compact_delay_max_ts;
242
+ struct __kernel_timespec wpcopy_delay_max_ts;
243
+ struct __kernel_timespec irq_delay_max_ts;
233
244
  };
234
245
 
235
246