authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-22 16:32:24+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-22 16:32:24+02:00
log8a113f83d4e11403f51a67c84a451c9d8592e231
treef6d986d83bc6f0fdcaf0bd402c27610570f2ca47
parent73c51c142c93a7545fabec16932b0463792e57b3
parentb98540456956d4da0ae6276f67e8c3e68a78b9cf

Merge pull request 'Linux 7.0 headers + syscalls' (#32019) from alexrp/zig:linux-7.0 into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32019

113 files changed, 1830 insertions(+), 580 deletions(-)

lib/libc/include/aarch64-linux-any/asm/hwcap.h+1
......@@ -146,5 +146,6 @@
146146#define HWCAP3_MTE_FAR (1UL << 0)
147147#define HWCAP3_MTE_STORE_ONLY (1UL << 1)
148148#define HWCAP3_LSFE (1UL << 2)
149#define HWCAP3_LS64 (1UL << 3)
149150
150151#endif /* __ASM_HWCAP_H */
\ No newline at end of file
lib/libc/include/aarch64-linux-any/asm/unistd_64.h+1
......@@ -327,6 +327,7 @@
327327#define __NR_file_getattr 468
328328#define __NR_file_setattr 469
329329#define __NR_listns 470
330#define __NR_rseq_slice_yield 471
330331
331332
332333#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/errno.h+2
......@@ -55,6 +55,7 @@
5555#define EMULTIHOP 72 /* Multihop attempted */
5656#define EDOTDOT 73 /* RFS specific error */
5757#define EBADMSG 74 /* Not a data message */
58#define EFSBADCRC EBADMSG /* Bad CRC detected */
5859#define EOVERFLOW 75 /* Value too large for defined data type */
5960#define ENOTUNIQ 76 /* Name not unique on network */
6061#define EBADFD 77 /* File descriptor in bad state */
......@@ -98,6 +99,7 @@
9899#define EINPROGRESS 115 /* Operation now in progress */
99100#define ESTALE 116 /* Stale file handle */
100101#define EUCLEAN 117 /* Structure needs cleaning */
102#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
101103#define ENOTNAM 118 /* Not a XENIX named type file */
102104#define ENAVAIL 119 /* No XENIX semaphores available */
103105#define EISNAM 120 /* Is a named type file */
lib/libc/include/any-linux-any/asm-generic/unistd.h+4-1
......@@ -860,8 +860,11 @@ __SYSCALL(__NR_file_setattr, sys_file_setattr)
860860#define __NR_listns 470
861861__SYSCALL(__NR_listns, sys_listns)
862862
863#define __NR_rseq_slice_yield 471
864__SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield)
865
863866#undef __NR_syscalls
864#define __NR_syscalls 471
867#define __NR_syscalls 472
865868
866869/*
867870 * 32 bit systems traditionally used different
lib/libc/include/any-linux-any/drm/amdgpu_drm.h+20-6
......@@ -105,8 +105,6 @@ extern "C" {
105105 *
106106 * %AMDGPU_GEM_DOMAIN_DOORBELL Doorbell. It is an MMIO region for
107107 * signalling user mode queues.
108 *
109 * %AMDGPU_GEM_DOMAIN_MMIO_REMAP MMIO remap page (special mapping for HDP flushing).
110108 */
111109#define AMDGPU_GEM_DOMAIN_CPU 0x1
112110#define AMDGPU_GEM_DOMAIN_GTT 0x2
......@@ -115,15 +113,13 @@ extern "C" {
115113#define AMDGPU_GEM_DOMAIN_GWS 0x10
116114#define AMDGPU_GEM_DOMAIN_OA 0x20
117115#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40
118#define AMDGPU_GEM_DOMAIN_MMIO_REMAP 0x80
119116#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
120117 AMDGPU_GEM_DOMAIN_GTT | \
121118 AMDGPU_GEM_DOMAIN_VRAM | \
122119 AMDGPU_GEM_DOMAIN_GDS | \
123120 AMDGPU_GEM_DOMAIN_GWS | \
124121 AMDGPU_GEM_DOMAIN_OA | \
125 AMDGPU_GEM_DOMAIN_DOORBELL | \
126 AMDGPU_GEM_DOMAIN_MMIO_REMAP)
122 AMDGPU_GEM_DOMAIN_DOORBELL)
127123
128124/* Flag that CPU access will be required for the case of VRAM domain */
129125#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
......@@ -883,7 +879,7 @@ struct drm_amdgpu_gem_list_handles_entry {
883879#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)
884880/* executable mapping, new for VI */
885881#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)
886/* partially resident texture */
882/* unmapped page of partially resident textures */
887883#define AMDGPU_VM_PAGE_PRT (1 << 4)
888884/* MTYPE flags use bit 5 to 8 */
889885#define AMDGPU_VM_MTYPE_MASK (0xf << 5)
......@@ -1427,6 +1423,7 @@ struct drm_amdgpu_info_vbios {
14271423#define AMDGPU_VRAM_TYPE_LPDDR4 11
14281424#define AMDGPU_VRAM_TYPE_LPDDR5 12
14291425#define AMDGPU_VRAM_TYPE_HBM3E 13
1426#define AMDGPU_VRAM_TYPE_HBM4 14
14301427
14311428struct drm_amdgpu_info_device {
14321429 /** PCI Device ID */
......@@ -1629,9 +1626,25 @@ struct drm_amdgpu_info_uq_metadata_gfx {
16291626 __u32 csa_alignment;
16301627};
16311628
1629struct drm_amdgpu_info_uq_metadata_compute {
1630 /* EOP size for gfx11 */
1631 __u32 eop_size;
1632 /* EOP base virtual alignment for gfx11 */
1633 __u32 eop_alignment;
1634};
1635
1636struct drm_amdgpu_info_uq_metadata_sdma {
1637 /* context save area size for sdma6 */
1638 __u32 csa_size;
1639 /* context save area base virtual alignment for sdma6 */
1640 __u32 csa_alignment;
1641};
1642
16321643struct drm_amdgpu_info_uq_metadata {
16331644 union {
16341645 struct drm_amdgpu_info_uq_metadata_gfx gfx;
1646 struct drm_amdgpu_info_uq_metadata_compute compute;
1647 struct drm_amdgpu_info_uq_metadata_sdma sdma;
16351648 };
16361649};
16371650
......@@ -1654,6 +1667,7 @@ struct drm_amdgpu_info_uq_metadata {
16541667#define AMDGPU_FAMILY_GC_10_3_6 149 /* GC 10.3.6 */
16551668#define AMDGPU_FAMILY_GC_10_3_7 151 /* GC 10.3.7 */
16561669#define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */
1670#define AMDGPU_FAMILY_GC_11_5_4 154 /* GC 11.5.4 */
16571671#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
16581672
16591673#if defined(__cplusplus)
lib/libc/include/any-linux-any/drm/amdxdna_accel.h+8
......@@ -19,6 +19,14 @@ extern "C" {
1919#define AMDXDNA_INVALID_BO_HANDLE 0
2020#define AMDXDNA_INVALID_FENCE_HANDLE 0
2121
22/*
23 * Define hardware context priority
24 */
25#define AMDXDNA_QOS_REALTIME_PRIORITY 0x100
26#define AMDXDNA_QOS_HIGH_PRIORITY 0x180
27#define AMDXDNA_QOS_NORMAL_PRIORITY 0x200
28#define AMDXDNA_QOS_LOW_PRIORITY 0x280
29
2230enum amdxdna_device_type {
2331 AMDXDNA_DEV_TYPE_UNKNOWN = -1,
2432 AMDXDNA_DEV_TYPE_KMQ,
lib/libc/include/any-linux-any/drm/drm_fourcc.h+6-6
......@@ -401,8 +401,8 @@ extern "C" {
401401 * implementation can multiply the values by 2^6=64. For that reason the padding
402402 * must only contain zeros.
403403 * index 0 = Y plane, [15:0] z:Y [6:10] little endian
404 * index 1 = Cr plane, [15:0] z:Cr [6:10] little endian
405 * index 2 = Cb plane, [15:0] z:Cb [6:10] little endian
404 * index 1 = Cb plane, [15:0] z:Cb [6:10] little endian
405 * index 2 = Cr plane, [15:0] z:Cr [6:10] little endian
406406 */
407407#define DRM_FORMAT_S010 fourcc_code('S', '0', '1', '0') /* 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel */
408408#define DRM_FORMAT_S210 fourcc_code('S', '2', '1', '0') /* 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel */
......@@ -414,8 +414,8 @@ extern "C" {
414414 * implementation can multiply the values by 2^4=16. For that reason the padding
415415 * must only contain zeros.
416416 * index 0 = Y plane, [15:0] z:Y [4:12] little endian
417 * index 1 = Cr plane, [15:0] z:Cr [4:12] little endian
418 * index 2 = Cb plane, [15:0] z:Cb [4:12] little endian
417 * index 1 = Cb plane, [15:0] z:Cb [4:12] little endian
418 * index 2 = Cr plane, [15:0] z:Cr [4:12] little endian
419419 */
420420#define DRM_FORMAT_S012 fourcc_code('S', '0', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel */
421421#define DRM_FORMAT_S212 fourcc_code('S', '2', '1', '2') /* 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel */
......@@ -424,8 +424,8 @@ extern "C" {
424424/*
425425 * 3 plane YCbCr
426426 * index 0 = Y plane, [15:0] Y little endian
427 * index 1 = Cr plane, [15:0] Cr little endian
428 * index 2 = Cb plane, [15:0] Cb little endian
427 * index 1 = Cb plane, [15:0] Cb little endian
428 * index 2 = Cr plane, [15:0] Cr little endian
429429 */
430430#define DRM_FORMAT_S016 fourcc_code('S', '0', '1', '6') /* 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel */
431431#define DRM_FORMAT_S216 fourcc_code('S', '2', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel */
lib/libc/include/any-linux-any/drm/panfrost_drm.h+75-1
......@@ -24,6 +24,8 @@ extern "C" {
2424#define DRM_PANFROST_SET_LABEL_BO 0x09
2525#define DRM_PANFROST_JM_CTX_CREATE 0x0a
2626#define DRM_PANFROST_JM_CTX_DESTROY 0x0b
27#define DRM_PANFROST_SYNC_BO 0x0c
28#define DRM_PANFROST_QUERY_BO_INFO 0x0d
2729
2830#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
2931#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
......@@ -35,6 +37,8 @@ extern "C" {
3537#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
3638#define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create)
3739#define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy)
40#define DRM_IOCTL_PANFROST_SYNC_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SYNC_BO, struct drm_panfrost_sync_bo)
41#define DRM_IOCTL_PANFROST_QUERY_BO_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_QUERY_BO_INFO, struct drm_panfrost_query_bo_info)
3842
3943/*
4044 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
......@@ -120,9 +124,12 @@ struct drm_panfrost_wait_bo {
120124 __s64 timeout_ns;
121125};
122126
123/* Valid flags to pass to drm_panfrost_create_bo */
127/* Valid flags to pass to drm_panfrost_create_bo.
128 * PANFROST_BO_WB_MMAP can't be set if PANFROST_BO_HEAP is.
129 */
124130#define PANFROST_BO_NOEXEC 1
125131#define PANFROST_BO_HEAP 2
132#define PANFROST_BO_WB_MMAP 4
126133
127134/**
128135 * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
......@@ -228,6 +235,13 @@ enum drm_panfrost_param {
228235 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,
229236 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,
230237 DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,
238 DRM_PANFROST_PARAM_SELECTED_COHERENCY,
239};
240
241enum drm_panfrost_gpu_coherency {
242 DRM_PANFROST_GPU_COHERENCY_ACE_LITE = 0,
243 DRM_PANFROST_GPU_COHERENCY_ACE = 1,
244 DRM_PANFROST_GPU_COHERENCY_NONE = 31,
231245};
232246
233247struct drm_panfrost_get_param {
......@@ -301,6 +315,66 @@ struct drm_panfrost_set_label_bo {
301315 __u64 label;
302316};
303317
318/* Valid flags to pass to drm_panfrost_bo_sync_op */
319#define PANFROST_BO_SYNC_CPU_CACHE_FLUSH 0
320#define PANFROST_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE 1
321
322/**
323 * struct drm_panthor_bo_flush_map_op - BO map sync op
324 */
325struct drm_panfrost_bo_sync_op {
326 /** @handle: Handle of the buffer object to sync. */
327 __u32 handle;
328
329 /** @type: Type of sync operation. */
330 __u32 type;
331
332 /**
333 * @offset: Offset into the BO at which the sync range starts.
334 *
335 * This will be rounded down to the nearest cache line as needed.
336 */
337 __u32 offset;
338
339 /**
340 * @size: Size of the range to sync
341 *
342 * @size + @offset will be rounded up to the nearest cache line as
343 * needed.
344 */
345 __u32 size;
346};
347
348/**
349 * struct drm_panfrost_sync_bo - ioctl argument for syncing BO maps
350 */
351struct drm_panfrost_sync_bo {
352 /** Array of struct drm_panfrost_bo_sync_op */
353 __u64 ops;
354
355 /** Number of BO sync ops */
356 __u32 op_count;
357
358 __u32 pad;
359};
360
361/** BO comes from a different subsystem. */
362#define DRM_PANFROST_BO_IS_IMPORTED (1 << 0)
363
364struct drm_panfrost_query_bo_info {
365 /** Handle of the object being queried. */
366 __u32 handle;
367
368 /** Extra flags that are not coming from the BO_CREATE ioctl(). */
369 __u32 extra_flags;
370
371 /** Flags passed at creation time. */
372 __u32 create_flags;
373
374 /** Will be zero on return. */
375 __u32 pad;
376};
377
304378/* Definitions for coredump decoding in user space */
305379#define PANFROSTDUMP_MAJOR 1
306380#define PANFROSTDUMP_MINOR 0
lib/libc/include/any-linux-any/drm/panthor_drm.h+154-3
......@@ -144,6 +144,16 @@ enum drm_panthor_ioctl_id {
144144 * pgoff_t size.
145145 */
146146 DRM_PANTHOR_SET_USER_MMIO_OFFSET,
147
148 /** @DRM_PANTHOR_BO_SYNC: Sync BO data to/from the device */
149 DRM_PANTHOR_BO_SYNC,
150
151 /**
152 * @DRM_PANTHOR_BO_QUERY_INFO: Query information about a BO.
153 *
154 * This is useful for imported BOs.
155 */
156 DRM_PANTHOR_BO_QUERY_INFO,
147157};
148158
149159/**
......@@ -245,6 +255,26 @@ enum drm_panthor_dev_query_type {
245255 DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,
246256};
247257
258/**
259 * enum drm_panthor_gpu_coherency: Type of GPU coherency
260 */
261enum drm_panthor_gpu_coherency {
262 /**
263 * @DRM_PANTHOR_GPU_COHERENCY_ACE_LITE: ACE Lite coherency.
264 */
265 DRM_PANTHOR_GPU_COHERENCY_ACE_LITE = 0,
266
267 /**
268 * @DRM_PANTHOR_GPU_COHERENCY_ACE: ACE coherency.
269 */
270 DRM_PANTHOR_GPU_COHERENCY_ACE = 1,
271
272 /**
273 * @DRM_PANTHOR_GPU_COHERENCY_NONE: No coherency.
274 */
275 DRM_PANTHOR_GPU_COHERENCY_NONE = 31,
276};
277
248278/**
249279 * struct drm_panthor_gpu_info - GPU information
250280 *
......@@ -301,7 +331,16 @@ struct drm_panthor_gpu_info {
301331 */
302332 __u32 thread_max_barrier_size;
303333
304 /** @coherency_features: Coherency features. */
334 /**
335 * @coherency_features: Coherency features.
336 *
337 * Combination of drm_panthor_gpu_coherency flags.
338 *
339 * Note that this is just what the coherency protocols supported by the
340 * GPU, but the actual coherency in place depends on the SoC
341 * integration and is reflected by
342 * drm_panthor_gpu_info::selected_coherency.
343 */
305344 __u32 coherency_features;
306345
307346 /** @texture_features: Texture features. */
......@@ -310,8 +349,12 @@ struct drm_panthor_gpu_info {
310349 /** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */
311350 __u32 as_present;
312351
313 /** @pad0: MBZ. */
314 __u32 pad0;
352 /**
353 * @selected_coherency: Coherency selected for this device.
354 *
355 * One of drm_panthor_gpu_coherency.
356 */
357 __u32 selected_coherency;
315358
316359 /** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */
317360 __u64 shader_present;
......@@ -638,6 +681,15 @@ struct drm_panthor_vm_get_state {
638681enum drm_panthor_bo_flags {
639682 /** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */
640683 DRM_PANTHOR_BO_NO_MMAP = (1 << 0),
684
685 /**
686 * @DRM_PANTHOR_BO_WB_MMAP: Force "Write-Back Cacheable" CPU mapping.
687 *
688 * CPU map the buffer object in userspace by forcing the "Write-Back
689 * Cacheable" cacheability attribute. The mapping otherwise uses the
690 * "Non-Cacheable" attribute if the GPU is not IO coherent.
691 */
692 DRM_PANTHOR_BO_WB_MMAP = (1 << 1),
641693};
642694
643695/**
......@@ -1040,6 +1092,101 @@ struct drm_panthor_set_user_mmio_offset {
10401092 __u64 offset;
10411093};
10421094
1095/**
1096 * enum drm_panthor_bo_sync_op_type - BO sync type
1097 */
1098enum drm_panthor_bo_sync_op_type {
1099 /** @DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH: Flush CPU caches. */
1100 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH = 0,
1101
1102 /** @DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE: Flush and invalidate CPU caches. */
1103 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE = 1,
1104};
1105
1106/**
1107 * struct drm_panthor_bo_sync_op - BO map sync op
1108 */
1109struct drm_panthor_bo_sync_op {
1110 /** @handle: Handle of the buffer object to sync. */
1111 __u32 handle;
1112
1113 /** @type: Type of operation. */
1114 __u32 type;
1115
1116 /**
1117 * @offset: Offset into the BO at which the sync range starts.
1118 *
1119 * This will be rounded down to the nearest cache line as needed.
1120 */
1121 __u64 offset;
1122
1123 /**
1124 * @size: Size of the range to sync
1125 *
1126 * @size + @offset will be rounded up to the nearest cache line as
1127 * needed.
1128 */
1129 __u64 size;
1130};
1131
1132/**
1133 * struct drm_panthor_bo_sync - BO map sync request
1134 */
1135struct drm_panthor_bo_sync {
1136 /**
1137 * @ops: Array of struct drm_panthor_bo_sync_op sync operations.
1138 */
1139 struct drm_panthor_obj_array ops;
1140};
1141
1142/**
1143 * enum drm_panthor_bo_extra_flags - Set of flags returned on a BO_QUERY_INFO request
1144 *
1145 * Those are flags reflecting BO properties that are not directly coming from the flags
1146 * passed are creation time, or information on BOs that were imported from other drivers.
1147 */
1148enum drm_panthor_bo_extra_flags {
1149 /**
1150 * @DRM_PANTHOR_BO_IS_IMPORTED: BO has been imported from an external driver.
1151 *
1152 * Note that imported dma-buf handles are not flagged as imported if they
1153 * where exported by panthor. Only buffers that are coming from other drivers
1154 * (dma heaps, other GPUs, display controllers, V4L, ...).
1155 *
1156 * It's also important to note that all imported BOs are mapped cached and can't
1157 * be considered IO-coherent even if the GPU is. This means they require explicit
1158 * syncs that must go through the DRM_PANTHOR_BO_SYNC ioctl (userland cache
1159 * maintenance is not allowed in that case, because extra operations might be
1160 * needed to make changes visible to the CPU/device, like buffer migration when the
1161 * exporter is a GPU with its own VRAM).
1162 */
1163 DRM_PANTHOR_BO_IS_IMPORTED = (1 << 0),
1164};
1165
1166/**
1167 * struct drm_panthor_bo_query_info - Query BO info
1168 */
1169struct drm_panthor_bo_query_info {
1170 /** @handle: Handle of the buffer object to query flags on. */
1171 __u32 handle;
1172
1173 /**
1174 * @extra_flags: Combination of enum drm_panthor_bo_extra_flags flags.
1175 */
1176 __u32 extra_flags;
1177
1178 /**
1179 * @create_flags: Flags passed at creation time.
1180 *
1181 * Combination of enum drm_panthor_bo_flags flags.
1182 * Will be zero if the buffer comes from a different driver.
1183 */
1184 __u32 create_flags;
1185
1186 /** @pad: Will be zero on return. */
1187 __u32 pad;
1188};
1189
10431190/**
10441191 * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number
10451192 * @__access: Access type. Must be R, W or RW.
......@@ -1086,6 +1233,10 @@ enum {
10861233 DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),
10871234 DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET =
10881235 DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset),
1236 DRM_IOCTL_PANTHOR_BO_SYNC =
1237 DRM_IOCTL_PANTHOR(WR, BO_SYNC, bo_sync),
1238 DRM_IOCTL_PANTHOR_BO_QUERY_INFO =
1239 DRM_IOCTL_PANTHOR(WR, BO_QUERY_INFO, bo_query_info),
10891240};
10901241
10911242#if defined(__cplusplus)
lib/libc/include/any-linux-any/drm/rocket_accel.h+74-24
......@@ -26,20 +26,27 @@ extern "C" {
2626 *
2727 */
2828struct drm_rocket_create_bo {
29 /** Input: Size of the requested BO. */
29 /**
30 * @size: Input: Size of the requested BO.
31 */
3032 __u32 size;
3133
32 /** Output: GEM handle for the BO. */
34 /**
35 * @handle: Output: GEM handle for the BO.
36 */
3337 __u32 handle;
3438
3539 /**
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.
3943 */
4044 __u64 dma_address;
4145
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 */
4350 __u64 offset;
4451};
4552
......@@ -50,13 +57,19 @@ struct drm_rocket_create_bo {
5057 * synchronization.
5158 */
5259struct drm_rocket_prep_bo {
53 /** Input: GEM handle of the buffer object. */
60 /**
61 * @handle: Input: GEM handle of the buffer object.
62 */
5463 __u32 handle;
5564
56 /** Reserved, must be zero. */
65 /**
66 * @reserved: Reserved, must be zero.
67 */
5768 __u32 reserved;
5869
59 /** Input: Amount of time to wait for NPU jobs. */
70 /**
71 * @timeout_ns: Input: Amount of time to wait for NPU jobs.
72 */
6073 __s64 timeout_ns;
6174};
6275
......@@ -66,10 +79,14 @@ struct drm_rocket_prep_bo {
6679 * Synchronize caches for NPU access.
6780 */
6881struct drm_rocket_fini_bo {
69 /** Input: GEM handle of the buffer object. */
82 /**
83 * @handle: Input: GEM handle of the buffer object.
84 */
7085 __u32 handle;
7186
72 /** Reserved, must be zero. */
87 /**
88 * @reserved: Reserved, must be zero.
89 */
7390 __u32 reserved;
7491};
7592
......@@ -79,10 +96,15 @@ struct drm_rocket_fini_bo {
7996 * A task is the smallest unit of work that can be run on the NPU.
8097 */
8198struct 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 */
83102 __u32 regcmd;
84103
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 */
86108 __u32 regcmd_count;
87109};
88110
......@@ -94,25 +116,44 @@ struct drm_rocket_task {
94116 * sequentially on the same core, to benefit from memory residency in SRAM.
95117 */
96118struct 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 */
98122 __u64 tasks;
99123
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 */
101128 __u64 in_bo_handles;
102129
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 */
104134 __u64 out_bo_handles;
105135
106 /** Input: Number of tasks passed in. */
136 /**
137 * @task_count: Input: Number of tasks passed in.
138 */
107139 __u32 task_count;
108140
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 */
110145 __u32 task_struct_size;
111146
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 */
113151 __u32 in_bo_handle_count;
114152
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 */
116157 __u32 out_bo_handle_count;
117158};
118159
......@@ -122,16 +163,25 @@ struct drm_rocket_job {
122163 * The kernel will schedule the execution of these jobs in dependency order.
123164 */
124165struct 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 */
126169 __u64 jobs;
127170
128 /** Input: Number of jobs passed in. */
171 /**
172 * @job_count: Input: Number of jobs passed in.
173 */
129174 __u32 job_count;
130175
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 */
132180 __u32 job_struct_size;
133181
134 /** Reserved, must be zero. */
182 /**
183 * @reserved: Reserved, must be zero.
184 */
135185 __u64 reserved;
136186};
137187
lib/libc/include/any-linux-any/drm/xe_drm.h+89-6
......@@ -106,6 +106,7 @@ extern "C" {
106106#define DRM_XE_OBSERVATION 0x0b
107107#define DRM_XE_MADVISE 0x0c
108108#define DRM_XE_VM_QUERY_MEM_RANGE_ATTRS 0x0d
109#define DRM_XE_EXEC_QUEUE_SET_PROPERTY 0x0e
109110
110111/* Must be kept compact -- no holes */
111112
......@@ -123,6 +124,7 @@ extern "C" {
123124#define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)
124125#define DRM_IOCTL_XE_MADVISE DRM_IOW(DRM_COMMAND_BASE + DRM_XE_MADVISE, struct drm_xe_madvise)
125126#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)
126128
127129/**
128130 * DOC: Xe IOCTL Extensions
......@@ -210,8 +212,12 @@ struct drm_xe_ext_set_property {
210212 /** @pad: MBZ */
211213 __u32 pad;
212214
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 };
215221
216222 /** @reserved: Reserved */
217223 __u64 reserved[2];
......@@ -403,6 +409,9 @@ struct drm_xe_query_mem_regions {
403409 * has low latency hint support
404410 * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR - Flag is set if the
405411 * 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+.
406415 * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
407416 * required by this device, typically SZ_4K or SZ_64K
408417 * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address
......@@ -421,6 +430,7 @@ struct drm_xe_query_config {
421430 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM (1 << 0)
422431 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY (1 << 1)
423432 #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)
424434#define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT 2
425435#define DRM_XE_QUERY_CONFIG_VA_BITS 3
426436#define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 4
......@@ -791,6 +801,17 @@ struct drm_xe_device_query {
791801 * need to use VRAM for display surfaces, therefore the kernel requires
792802 * setting this flag for such objects, otherwise an error is thrown on
793803 * 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.
794815 *
795816 * @cpu_caching supports the following values:
796817 * - %DRM_XE_GEM_CPU_CACHING_WB - Allocate the pages with write-back
......@@ -837,6 +858,7 @@ struct drm_xe_gem_create {
837858#define DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING (1 << 0)
838859#define DRM_XE_GEM_CREATE_FLAG_SCANOUT (1 << 1)
839860#define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2)
861#define DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION (1 << 3)
840862 /**
841863 * @flags: Flags, currently a mask of memory instances of where BO can
842864 * be placed
......@@ -1252,6 +1274,17 @@ struct drm_xe_vm_bind {
12521274 * Given that going into a power-saving state kills PXP HWDRM sessions,
12531275 * runtime PM will be blocked while queues of this type are alive.
12541276 * 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.
12551288 *
12561289 * The example below shows how to use @drm_xe_exec_queue_create to create
12571290 * a simple exec_queue (no parallel submission) of class
......@@ -1292,6 +1325,10 @@ struct drm_xe_exec_queue_create {
12921325#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY 0
12931326#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE 1
12941327#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
12951332 /** @extensions: Pointer to the first extension struct, if any */
12961333 __u64 extensions;
12971334
......@@ -1655,6 +1692,9 @@ enum drm_xe_oa_unit_type {
16551692
16561693 /** @DRM_XE_OA_UNIT_TYPE_OAM_SAG: OAM_SAG OA unit */
16571694 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,
16581698};
16591699
16601700/**
......@@ -1677,12 +1717,19 @@ struct drm_xe_oa_unit {
16771717#define DRM_XE_OA_CAPS_OA_BUFFER_SIZE (1 << 2)
16781718#define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS (1 << 3)
16791719#define DRM_XE_OA_CAPS_OAM (1 << 4)
1720#define DRM_XE_OA_CAPS_OA_UNIT_GT_ID (1 << 5)
16801721
16811722 /** @oa_timestamp_freq: OA timestamp freq */
16821723 __u64 oa_timestamp_freq;
16831724
1725 /** @gt_id: gt id for this OA unit */
1726 __u16 gt_id;
1727
1728 /** @reserved1: MBZ */
1729 __u16 reserved1[3];
1730
16841731 /** @reserved: MBZ */
1685 __u64 reserved[4];
1732 __u64 reserved[3];
16861733
16871734 /** @num_engines: number of engines in @eci array */
16881735 __u64 num_engines;
......@@ -2072,7 +2119,13 @@ struct drm_xe_madvise {
20722119 struct {
20732120#define DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE 0
20742121#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 */
20762129 __u32 devmem_fd;
20772130
20782131#define DRM_XE_MIGRATE_ALL_PAGES 0
......@@ -2080,8 +2133,14 @@ struct drm_xe_madvise {
20802133 /** @preferred_mem_loc.migration_policy: Page migration policy */
20812134 __u16 migration_policy;
20822135
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;
20852144
20862145 /** @preferred_mem_loc.reserved : Reserved */
20872146 __u64 reserved;
......@@ -2274,6 +2333,30 @@ struct drm_xe_vm_query_mem_range_attr {
22742333
22752334};
22762335
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 */
2343struct 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
22772360#if defined(__cplusplus)
22782361}
22792362#endif
lib/libc/include/any-linux-any/linux/android/binder.h+1-1
......@@ -278,7 +278,7 @@ enum {
278278 * NOTE: Two special error codes you should check for when calling
279279 * in to the driver are:
280280 *
281 * EINTR -- The operation has been interupted. This should be
281 * EINTR -- The operation has been interrupted. This should be
282282 * handled by retrying the ioctl() until a different error code
283283 * is returned.
284284 *
lib/libc/include/any-linux-any/linux/bpf.h+28
......@@ -119,6 +119,14 @@ enum bpf_cgroup_iter_order {
119119 BPF_CGROUP_ITER_DESCENDANTS_PRE, /* walk descendants in pre-order. */
120120 BPF_CGROUP_ITER_DESCENDANTS_POST, /* walk descendants in post-order. */
121121 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,
122130};
123131
124132union bpf_iter_link_info {
......@@ -918,6 +926,16 @@ union bpf_iter_link_info {
918926 * Number of bytes read from the stream on success, or -1 if an
919927 * error occurred (in which case, *errno* is set appropriately).
920928 *
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 *
921939 * NOTES
922940 * eBPF objects (maps and programs) can be shared between processes.
923941 *
......@@ -974,6 +992,7 @@ enum bpf_cmd {
974992 BPF_PROG_BIND_MAP,
975993 BPF_TOKEN_CREATE,
976994 BPF_PROG_STREAM_READ_BY_FD,
995 BPF_PROG_ASSOC_STRUCT_OPS,
977996 __MAX_BPF_CMD,
978997};
979998
......@@ -1134,6 +1153,7 @@ enum bpf_attach_type {
11341153 BPF_NETKIT_PEER,
11351154 BPF_TRACE_KPROBE_SESSION,
11361155 BPF_TRACE_UPROBE_SESSION,
1156 BPF_TRACE_FSESSION,
11371157 __MAX_BPF_ATTACH_TYPE
11381158};
11391159
......@@ -1373,6 +1393,8 @@ enum {
13731393 BPF_NOEXIST = 1, /* create new element if it didn't exist */
13741394 BPF_EXIST = 2, /* update existing element */
13751395 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 */
13761398};
13771399
13781400/* flags for BPF_MAP_CREATE command */
......@@ -1894,6 +1916,12 @@ union bpf_attr {
18941916 __u32 prog_fd;
18951917 } prog_stream_read;
18961918
1919 struct {
1920 __u32 map_fd;
1921 __u32 prog_fd;
1922 __u32 flags;
1923 } prog_assoc_struct_ops;
1924
18971925} __attribute__((aligned(8)));
18981926
18991927/* The description below is an attempt at providing documentation to eBPF
lib/libc/include/any-linux-any/linux/btrfs.h+1
......@@ -334,6 +334,7 @@ struct btrfs_ioctl_fs_info_args {
334334#define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13)
335335#define BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE (1ULL << 14)
336336#define BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA (1ULL << 16)
337#define BTRFS_FEATURE_INCOMPAT_REMAP_TREE (1ULL << 17)
337338
338339struct btrfs_ioctl_feature_flags {
339340 __u64 compat_flags;
lib/libc/include/any-linux-any/linux/btrfs_tree.h+32-2
......@@ -72,6 +72,9 @@
7272/* Tracks RAID stripes in block groups. */
7373#define BTRFS_RAID_STRIPE_TREE_OBJECTID 12ULL
7474
75/* Holds details of remapped addresses after relocation. */
76#define BTRFS_REMAP_TREE_OBJECTID 13ULL
77
7578/* device stats in the device tree */
7679#define BTRFS_DEV_STATS_OBJECTID 0ULL
7780
......@@ -278,6 +281,10 @@
278281
279282#define BTRFS_RAID_STRIPE_KEY 230
280283
284#define BTRFS_IDENTITY_REMAP_KEY 234
285#define BTRFS_REMAP_KEY 235
286#define BTRFS_REMAP_BACKREF_KEY 236
287
281288/*
282289 * Records the overall state of the qgroups.
283290 * There's only one instance of this key present,
......@@ -710,9 +717,12 @@ struct btrfs_super_block {
710717 __u8 metadata_uuid[BTRFS_FSID_SIZE];
711718
712719 __u64 nr_global_roots;
720 __le64 remap_root;
721 __le64 remap_root_generation;
722 __u8 remap_root_level;
713723
714724 /* Future expansion */
715 __le64 reserved[27];
725 __u8 reserved[199];
716726 __u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
717727 struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];
718728
......@@ -1157,12 +1167,15 @@ struct btrfs_dev_replace_item {
11571167#define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8)
11581168#define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9)
11591169#define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10)
1170#define BTRFS_BLOCK_GROUP_REMAPPED (1ULL << 11)
1171#define BTRFS_BLOCK_GROUP_METADATA_REMAP (1ULL << 12)
11601172#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \
11611173 BTRFS_SPACE_INFO_GLOBAL_RSV)
11621174
11631175#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \
11641176 BTRFS_BLOCK_GROUP_SYSTEM | \
1165 BTRFS_BLOCK_GROUP_METADATA)
1177 BTRFS_BLOCK_GROUP_METADATA | \
1178 BTRFS_BLOCK_GROUP_METADATA_REMAP)
11661179
11671180#define BTRFS_BLOCK_GROUP_PROFILE_MASK (BTRFS_BLOCK_GROUP_RAID0 | \
11681181 BTRFS_BLOCK_GROUP_RAID1 | \
......@@ -1215,6 +1228,14 @@ struct btrfs_block_group_item {
12151228 __le64 flags;
12161229} __attribute__ ((__packed__));
12171230
1231struct 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
12181239struct btrfs_free_space_info {
12191240 __le32 extent_count;
12201241 __le32 flags;
......@@ -1319,4 +1340,13 @@ struct btrfs_verity_descriptor_item {
13191340 __u8 encryption;
13201341} __attribute__ ((__packed__));
13211342
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 */
1348struct btrfs_remap_item {
1349 __le64 address;
1350} __attribute__ ((__packed__));
1351
13221352#endif /* _BTRFS_CTREE_H_ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/dma-buf.h+1
......@@ -20,6 +20,7 @@
2020#ifndef _DMA_BUF_UAPI_H_
2121#define _DMA_BUF_UAPI_H_
2222
23#include <linux/ioctl.h>
2324#include <linux/types.h>
2425
2526/**
lib/libc/include/any-linux-any/linux/dpll.h+1
......@@ -253,6 +253,7 @@ enum dpll_a_pin {
253253 DPLL_A_PIN_ESYNC_PULSE,
254254 DPLL_A_PIN_REFERENCE_SYNC,
255255 DPLL_A_PIN_PHASE_ADJUST_GRAN,
256 DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT,
256257
257258 __DPLL_A_PIN_MAX,
258259 DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
lib/libc/include/any-linux-any/linux/elf.h+2
......@@ -545,6 +545,8 @@ typedef struct elf64_shdr {
545545#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
546546#define NN_RISCV_TAGGED_ADDR_CTRL "LINUX"
547547#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 */
548550#define NN_LOONGARCH_CPUCFG "LINUX"
549551#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
550552#define NN_LOONGARCH_CSR "LINUX"
lib/libc/include/any-linux-any/linux/ethtool.h+21-5
......@@ -15,11 +15,10 @@
1515#define _LINUX_ETHTOOL_H
1616
1717#include <linux/const.h>
18#include <linux/typelimits.h>
1819#include <linux/types.h>
1920#include <linux/if_ether.h>
2021
21#include <limits.h> /* for INT_MAX */
22
2322/* All structures exposed to userland should be defined such that they
2423 * have the same layout for 32-bit and 64-bit userland.
2524 */
......@@ -601,6 +600,8 @@ enum ethtool_link_ext_state {
601600 ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
602601 ETHTOOL_LINK_EXT_STATE_OVERHEAT,
603602 ETHTOOL_LINK_EXT_STATE_MODULE,
603 ETHTOOL_LINK_EXT_STATE_OTP_SPEED_VIOLATION,
604 ETHTOOL_LINK_EXT_STATE_BMC_REQUEST_DOWN,
604605};
605606
606607/* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */
......@@ -1092,13 +1093,20 @@ enum ethtool_module_fw_flash_status {
10921093 * struct ethtool_gstrings - string set for data tagging
10931094 * @cmd: Command number = %ETHTOOL_GSTRINGS
10941095 * @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
10961097 * @data: Buffer for strings. Each string is null-padded to a size of
10971098 * %ETH_GSTRING_LEN.
10981099 *
10991100 * Users must use %ETHTOOL_GSSET_INFO to find the number of strings in
11001101 * the string set. They must allocate a buffer of the appropriate
11011102 * 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.
11021110 */
11031111struct ethtool_gstrings {
11041112 __u32 cmd;
......@@ -1175,13 +1183,20 @@ struct ethtool_test {
11751183/**
11761184 * struct ethtool_stats - device-specific statistics
11771185 * @cmd: Command number = %ETHTOOL_GSTATS
1178 * @n_stats: On return, the number of statistics
1186 * @n_stats: Number of statistics
11791187 * @data: Array of statistics
11801188 *
11811189 * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the
11821190 * number of statistics that will be returned. They must allocate a
11831191 * buffer of the appropriate size (8 * number of statistics)
11841192 * 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.
11851200 */
11861201struct ethtool_stats {
11871202 __u32 cmd;
......@@ -2188,6 +2203,7 @@ enum ethtool_link_mode_bit_indices {
21882203#define SPEED_40000 40000
21892204#define SPEED_50000 50000
21902205#define SPEED_56000 56000
2206#define SPEED_80000 80000
21912207#define SPEED_100000 100000
21922208#define SPEED_200000 200000
21932209#define SPEED_400000 400000
......@@ -2198,7 +2214,7 @@ enum ethtool_link_mode_bit_indices {
21982214
21992215static __inline__ int ethtool_validate_speed(__u32 speed)
22002216{
2201 return speed <= INT_MAX || speed == (__u32)SPEED_UNKNOWN;
2217 return speed <= __KERNEL_INT_MAX || speed == (__u32)SPEED_UNKNOWN;
22022218}
22032219
22042220/* Duplex, half or full. */
lib/libc/include/any-linux-any/linux/fs.h+1
......@@ -249,6 +249,7 @@ struct file_attr {
249249#define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */
250250#define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */
251251#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */
252#define FS_XFLAG_VERITY 0x00020000 /* fs-verity enabled */
252253#define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
253254
254255/* the read-only stuff doesn't really belong here, but any other place is
lib/libc/include/any-linux-any/linux/hyperv.h+1-1
......@@ -362,7 +362,7 @@ struct hv_kvp_exchg_msg_value {
362362 __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
363363 __u32 value_u32;
364364 __u64 value_u64;
365 };
365 } __attribute__((packed));
366366} __attribute__((packed));
367367
368368struct hv_kvp_msg_enumerate {
lib/libc/include/any-linux-any/linux/idxd.h+134-134
......@@ -3,7 +3,7 @@
33#ifndef _USR_IDXD_H_
44#define _USR_IDXD_H_
55
6#include <stdint.h>
6#include <linux/types.h>
77
88/* Driver command error status */
99enum idxd_scmd_stat {
......@@ -172,132 +172,132 @@ enum iax_completion_status {
172172#define DSA_COMP_STATUS(status) ((status) & DSA_COMP_STATUS_MASK)
173173
174174struct dsa_hw_desc {
175 uint32_t pasid:20;
176 uint32_t rsvd:11;
177 uint32_t priv:1;
178 uint32_t flags:24;
179 uint32_t opcode:8;
180 uint64_t completion_addr;
175 __u32 pasid:20;
176 __u32 rsvd:11;
177 __u32 priv:1;
178 __u32 flags:24;
179 __u32 opcode:8;
180 __u64 completion_addr;
181181 union {
182 uint64_t src_addr;
183 uint64_t rdback_addr;
184 uint64_t pattern;
185 uint64_t desc_list_addr;
186 uint64_t pattern_lower;
187 uint64_t transl_fetch_addr;
182 __u64 src_addr;
183 __u64 rdback_addr;
184 __u64 pattern;
185 __u64 desc_list_addr;
186 __u64 pattern_lower;
187 __u64 transl_fetch_addr;
188188 };
189189 union {
190 uint64_t dst_addr;
191 uint64_t rdback_addr2;
192 uint64_t src2_addr;
193 uint64_t comp_pattern;
190 __u64 dst_addr;
191 __u64 rdback_addr2;
192 __u64 src2_addr;
193 __u64 comp_pattern;
194194 };
195195 union {
196 uint32_t xfer_size;
197 uint32_t desc_count;
198 uint32_t region_size;
196 __u32 xfer_size;
197 __u32 desc_count;
198 __u32 region_size;
199199 };
200 uint16_t int_handle;
201 uint16_t rsvd1;
200 __u16 int_handle;
201 __u16 rsvd1;
202202 union {
203 uint8_t expected_res;
203 __u8 expected_res;
204204 /* create delta record */
205205 struct {
206 uint64_t delta_addr;
207 uint32_t max_delta_size;
208 uint32_t delt_rsvd;
209 uint8_t expected_res_mask;
206 __u64 delta_addr;
207 __u32 max_delta_size;
208 __u32 delt_rsvd;
209 __u8 expected_res_mask;
210210 };
211 uint32_t delta_rec_size;
212 uint64_t dest2;
211 __u32 delta_rec_size;
212 __u64 dest2;
213213 /* CRC */
214214 struct {
215 uint32_t crc_seed;
216 uint32_t crc_rsvd;
217 uint64_t seed_addr;
215 __u32 crc_seed;
216 __u32 crc_rsvd;
217 __u64 seed_addr;
218218 };
219219 /* DIF check or strip */
220220 struct {
221 uint8_t src_dif_flags;
222 uint8_t dif_chk_res;
223 uint8_t dif_chk_flags;
224 uint8_t dif_chk_res2[5];
225 uint32_t chk_ref_tag_seed;
226 uint16_t chk_app_tag_mask;
227 uint16_t chk_app_tag_seed;
221 __u8 src_dif_flags;
222 __u8 dif_chk_res;
223 __u8 dif_chk_flags;
224 __u8 dif_chk_res2[5];
225 __u32 chk_ref_tag_seed;
226 __u16 chk_app_tag_mask;
227 __u16 chk_app_tag_seed;
228228 };
229229 /* DIF insert */
230230 struct {
231 uint8_t dif_ins_res;
232 uint8_t dest_dif_flag;
233 uint8_t dif_ins_flags;
234 uint8_t dif_ins_res2[13];
235 uint32_t ins_ref_tag_seed;
236 uint16_t ins_app_tag_mask;
237 uint16_t ins_app_tag_seed;
231 __u8 dif_ins_res;
232 __u8 dest_dif_flag;
233 __u8 dif_ins_flags;
234 __u8 dif_ins_res2[13];
235 __u32 ins_ref_tag_seed;
236 __u16 ins_app_tag_mask;
237 __u16 ins_app_tag_seed;
238238 };
239239 /* DIF update */
240240 struct {
241 uint8_t src_upd_flags;
242 uint8_t upd_dest_flags;
243 uint8_t dif_upd_flags;
244 uint8_t dif_upd_res[5];
245 uint32_t src_ref_tag_seed;
246 uint16_t src_app_tag_mask;
247 uint16_t src_app_tag_seed;
248 uint32_t dest_ref_tag_seed;
249 uint16_t dest_app_tag_mask;
250 uint16_t dest_app_tag_seed;
241 __u8 src_upd_flags;
242 __u8 upd_dest_flags;
243 __u8 dif_upd_flags;
244 __u8 dif_upd_res[5];
245 __u32 src_ref_tag_seed;
246 __u16 src_app_tag_mask;
247 __u16 src_app_tag_seed;
248 __u32 dest_ref_tag_seed;
249 __u16 dest_app_tag_mask;
250 __u16 dest_app_tag_seed;
251251 };
252252
253253 /* Fill */
254 uint64_t pattern_upper;
254 __u64 pattern_upper;
255255
256256 /* Translation fetch */
257257 struct {
258 uint64_t transl_fetch_res;
259 uint32_t region_stride;
258 __u64 transl_fetch_res;
259 __u32 region_stride;
260260 };
261261
262262 /* DIX generate */
263263 struct {
264 uint8_t dix_gen_res;
265 uint8_t dest_dif_flags;
266 uint8_t dif_flags;
267 uint8_t dix_gen_res2[13];
268 uint32_t ref_tag_seed;
269 uint16_t app_tag_mask;
270 uint16_t app_tag_seed;
264 __u8 dix_gen_res;
265 __u8 dest_dif_flags;
266 __u8 dif_flags;
267 __u8 dix_gen_res2[13];
268 __u32 ref_tag_seed;
269 __u16 app_tag_mask;
270 __u16 app_tag_seed;
271271 };
272272
273 uint8_t op_specific[24];
273 __u8 op_specific[24];
274274 };
275275} __attribute__((packed));
276276
277277struct iax_hw_desc {
278 uint32_t pasid:20;
279 uint32_t rsvd:11;
280 uint32_t priv:1;
281 uint32_t flags:24;
282 uint32_t opcode:8;
283 uint64_t completion_addr;
284 uint64_t src1_addr;
285 uint64_t dst_addr;
286 uint32_t src1_size;
287 uint16_t int_handle;
278 __u32 pasid:20;
279 __u32 rsvd:11;
280 __u32 priv:1;
281 __u32 flags:24;
282 __u32 opcode:8;
283 __u64 completion_addr;
284 __u64 src1_addr;
285 __u64 dst_addr;
286 __u32 src1_size;
287 __u16 int_handle;
288288 union {
289 uint16_t compr_flags;
290 uint16_t decompr_flags;
289 __u16 compr_flags;
290 __u16 decompr_flags;
291291 };
292 uint64_t src2_addr;
293 uint32_t max_dst_size;
294 uint32_t src2_size;
295 uint32_t filter_flags;
296 uint32_t num_inputs;
292 __u64 src2_addr;
293 __u32 max_dst_size;
294 __u32 src2_size;
295 __u32 filter_flags;
296 __u32 num_inputs;
297297} __attribute__((packed));
298298
299299struct dsa_raw_desc {
300 uint64_t field[8];
300 __u64 field[8];
301301} __attribute__((packed));
302302
303303/*
......@@ -305,91 +305,91 @@ struct dsa_raw_desc {
305305 * __volatile__ and prevent the compiler from optimize the read.
306306 */
307307struct dsa_completion_record {
308 __volatile__ uint8_t status;
308 __volatile__ __u8 status;
309309 union {
310 uint8_t result;
311 uint8_t dif_status;
310 __u8 result;
311 __u8 dif_status;
312312 };
313 uint8_t fault_info;
314 uint8_t rsvd;
313 __u8 fault_info;
314 __u8 rsvd;
315315 union {
316 uint32_t bytes_completed;
317 uint32_t descs_completed;
316 __u32 bytes_completed;
317 __u32 descs_completed;
318318 };
319 uint64_t fault_addr;
319 __u64 fault_addr;
320320 union {
321321 /* common record */
322322 struct {
323 uint32_t invalid_flags:24;
324 uint32_t rsvd2:8;
323 __u32 invalid_flags:24;
324 __u32 rsvd2:8;
325325 };
326326
327 uint32_t delta_rec_size;
328 uint64_t crc_val;
327 __u32 delta_rec_size;
328 __u64 crc_val;
329329
330330 /* DIF check & strip */
331331 struct {
332 uint32_t dif_chk_ref_tag;
333 uint16_t dif_chk_app_tag_mask;
334 uint16_t dif_chk_app_tag;
332 __u32 dif_chk_ref_tag;
333 __u16 dif_chk_app_tag_mask;
334 __u16 dif_chk_app_tag;
335335 };
336336
337337 /* DIF insert */
338338 struct {
339 uint64_t dif_ins_res;
340 uint32_t dif_ins_ref_tag;
341 uint16_t dif_ins_app_tag_mask;
342 uint16_t dif_ins_app_tag;
339 __u64 dif_ins_res;
340 __u32 dif_ins_ref_tag;
341 __u16 dif_ins_app_tag_mask;
342 __u16 dif_ins_app_tag;
343343 };
344344
345345 /* DIF update */
346346 struct {
347 uint32_t dif_upd_src_ref_tag;
348 uint16_t dif_upd_src_app_tag_mask;
349 uint16_t dif_upd_src_app_tag;
350 uint32_t dif_upd_dest_ref_tag;
351 uint16_t dif_upd_dest_app_tag_mask;
352 uint16_t dif_upd_dest_app_tag;
347 __u32 dif_upd_src_ref_tag;
348 __u16 dif_upd_src_app_tag_mask;
349 __u16 dif_upd_src_app_tag;
350 __u32 dif_upd_dest_ref_tag;
351 __u16 dif_upd_dest_app_tag_mask;
352 __u16 dif_upd_dest_app_tag;
353353 };
354354
355355 /* DIX generate */
356356 struct {
357 uint64_t dix_gen_res;
358 uint32_t dix_ref_tag;
359 uint16_t dix_app_tag_mask;
360 uint16_t dix_app_tag;
357 __u64 dix_gen_res;
358 __u32 dix_ref_tag;
359 __u16 dix_app_tag_mask;
360 __u16 dix_app_tag;
361361 };
362362
363 uint8_t op_specific[16];
363 __u8 op_specific[16];
364364 };
365365} __attribute__((packed));
366366
367367struct dsa_raw_completion_record {
368 uint64_t field[4];
368 __u64 field[4];
369369} __attribute__((packed));
370370
371371struct iax_completion_record {
372 __volatile__ uint8_t status;
373 uint8_t error_code;
374 uint8_t fault_info;
375 uint8_t rsvd;
376 uint32_t bytes_completed;
377 uint64_t fault_addr;
378 uint32_t invalid_flags;
379 uint32_t rsvd2;
380 uint32_t output_size;
381 uint8_t output_bits;
382 uint8_t rsvd3;
383 uint16_t xor_csum;
384 uint32_t crc;
385 uint32_t min;
386 uint32_t max;
387 uint32_t sum;
388 uint64_t rsvd4[2];
372 __volatile__ __u8 status;
373 __u8 error_code;
374 __u8 fault_info;
375 __u8 rsvd;
376 __u32 bytes_completed;
377 __u64 fault_addr;
378 __u32 invalid_flags;
379 __u32 rsvd2;
380 __u32 output_size;
381 __u8 output_bits;
382 __u8 rsvd3;
383 __u16 xor_csum;
384 __u32 crc;
385 __u32 min;
386 __u32 max;
387 __u32 sum;
388 __u64 rsvd4[2];
389389} __attribute__((packed));
390390
391391struct iax_raw_completion_record {
392 uint64_t field[8];
392 __u64 field[8];
393393} __attribute__((packed));
394394
395395#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/if_alg.h+1-1
......@@ -42,7 +42,7 @@ struct sockaddr_alg_new {
4242
4343struct af_alg_iv {
4444 __u32 ivlen;
45 __u8 iv[];
45 __u8 iv[] __counted_by(ivlen);
4646};
4747
4848/* Socket options */
lib/libc/include/any-linux-any/linux/if_link.h+1
......@@ -1441,6 +1441,7 @@ enum {
14411441 IFLA_GENEVE_DF,
14421442 IFLA_GENEVE_INNER_PROTO_INHERIT,
14431443 IFLA_GENEVE_PORT_RANGE,
1444 IFLA_GENEVE_GRO_HINT,
14441445 __IFLA_GENEVE_MAX
14451446};
14461447#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
lib/libc/include/any-linux-any/linux/input-event-codes.h+4
......@@ -643,6 +643,10 @@
643643#define KEY_EPRIVACY_SCREEN_ON 0x252
644644#define KEY_EPRIVACY_SCREEN_OFF 0x253
645645
646#define KEY_ACTION_ON_SELECTION 0x254 /* AL Action on Selection (HUTRR119) */
647#define KEY_CONTEXTUAL_INSERT 0x255 /* AL Contextual Insertion (HUTRR119) */
648#define KEY_CONTEXTUAL_QUERY 0x256 /* AL Contextual Query (HUTRR119) */
649
646650#define KEY_KBDINPUTASSIST_PREV 0x260
647651#define KEY_KBDINPUTASSIST_NEXT 0x261
648652#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
lib/libc/include/any-linux-any/linux/io_uring.h+33-2
......@@ -188,7 +188,8 @@ enum io_uring_sqe_flags_bit {
188188/*
189189 * If COOP_TASKRUN is set, get notified if task work is available for
190190 * running and a kernel transition would be needed to run it. This sets
191 * IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.
191 * IORING_SQ_TASKRUN in the sq ring flags. Not valid without COOP_TASKRUN
192 * or DEFER_TASKRUN.
192193 */
193194#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
194195#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
......@@ -237,6 +238,18 @@ enum io_uring_sqe_flags_bit {
237238 */
238239#define IORING_SETUP_SQE_MIXED (1U << 19)
239240
241/*
242 * When set, io_uring ignores SQ head and tail and fetches SQEs to submit
243 * starting from index 0 instead from the index stored in the head pointer.
244 * IOW, the user should place all SQE at the beginning of the SQ memory
245 * before issuing a submission syscall.
246 *
247 * It requires IORING_SETUP_NO_SQARRAY and is incompatible with
248 * IORING_SETUP_SQPOLL. The user must also never change the SQ head and tail
249 * values and keep it set to 0. Any other value is undefined behaviour.
250 */
251#define IORING_SETUP_SQ_REWIND (1U << 20)
252
240253enum io_uring_op {
241254 IORING_OP_NOP,
242255 IORING_OP_READV,
......@@ -700,6 +713,9 @@ enum io_uring_register_op {
700713 /* auxiliary zcrx configuration, see enum zcrx_ctrl_op */
701714 IORING_REGISTER_ZCRX_CTRL = 36,
702715
716 /* register bpf filtering programs */
717 IORING_REGISTER_BPF_FILTER = 37,
718
703719 /* this goes last */
704720 IORING_REGISTER_LAST,
705721
......@@ -805,6 +821,13 @@ struct io_uring_restriction {
805821 __u32 resv2[3];
806822};
807823
824struct io_uring_task_restriction {
825 __u16 flags;
826 __u16 nr_res;
827 __u32 resv[3];
828 __DECLARE_FLEX_ARRAY(struct io_uring_restriction, restrictions);
829};
830
808831struct io_uring_clock_register {
809832 __u32 clockid;
810833 __u32 __resv[3];
......@@ -1068,6 +1091,14 @@ enum zcrx_reg_flags {
10681091 ZCRX_REG_IMPORT = 1,
10691092};
10701093
1094enum zcrx_features {
1095 /*
1096 * The user can ask for the desired rx page size by passing the
1097 * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
1098 */
1099 ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
1100};
1101
10711102/*
10721103 * Argument for IORING_REGISTER_ZCRX_IFQ
10731104 */
......@@ -1082,7 +1113,7 @@ struct io_uring_zcrx_ifq_reg {
10821113
10831114 struct io_uring_zcrx_offsets offsets;
10841115 __u32 zcrx_id;
1085 __u32 __resv2;
1116 __u32 rx_buf_len;
10861117 __u64 __resv[3];
10871118};
10881119
lib/libc/include/any-linux-any/linux/io_uring/bpf_filter.h created+68
......@@ -0,0 +1,68 @@
1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
2/*
3 * Header file for the io_uring BPF filters.
4 */
5#ifndef LINUX_IO_URING_BPF_FILTER_H
6#define LINUX_IO_URING_BPF_FILTER_H
7
8#include <linux/types.h>
9
10/*
11 * Struct passed to filters.
12 */
13struct io_uring_bpf_ctx {
14 __u64 user_data;
15 __u8 opcode;
16 __u8 sqe_flags;
17 __u8 pdu_size; /* size of aux data for filter */
18 __u8 pad[5];
19 union {
20 struct {
21 __u32 family;
22 __u32 type;
23 __u32 protocol;
24 } socket;
25 struct {
26 __u64 flags;
27 __u64 mode;
28 __u64 resolve;
29 } open;
30 };
31};
32
33enum {
34 /*
35 * If set, any currently unset opcode will have a deny filter attached
36 */
37 IO_URING_BPF_FILTER_DENY_REST = 1,
38 /*
39 * If set, if kernel and application don't agree on pdu_size for
40 * the given opcode, fail the registration of the filter.
41 */
42 IO_URING_BPF_FILTER_SZ_STRICT = 2,
43};
44
45struct io_uring_bpf_filter {
46 __u32 opcode; /* io_uring opcode to filter */
47 __u32 flags;
48 __u32 filter_len; /* number of BPF instructions */
49 __u8 pdu_size; /* expected pdu size for opcode */
50 __u8 resv[3];
51 __u64 filter_ptr; /* pointer to BPF filter */
52 __u64 resv2[5];
53};
54
55enum {
56 IO_URING_BPF_CMD_FILTER = 1,
57};
58
59struct io_uring_bpf {
60 __u16 cmd_type; /* IO_URING_BPF_* values */
61 __u16 cmd_flags; /* none so far */
62 __u32 resv;
63 union {
64 struct io_uring_bpf_filter filter;
65 };
66};
67
68#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/io_uring/query.h+5-1
......@@ -1,6 +1,9 @@
11/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
22/*
33 * Header file for the io_uring query interface.
4 *
5 * Copyright (C) 2026 Pavel Begunkov <asml.silence@gmail.com>
6 * Copyright (C) Meta Platforms, Inc.
47 */
58#ifndef LINUX_IO_URING_QUERY_H
69#define LINUX_IO_URING_QUERY_H
......@@ -50,7 +53,8 @@ struct io_uring_query_zcrx {
5053 __u64 area_flags;
5154 /* The number of supported ZCRX_CTRL_* opcodes */
5255 __u32 nr_ctrl_opcodes;
53 __u32 __resv1;
56 /* Bitmask of ZCRX_FEATURE_* indicating which features are available */
57 __u32 features;
5458 /* The refill ring header size */
5559 __u32 rq_hdr_size;
5660 /* The alignment for the header */
lib/libc/include/any-linux-any/linux/iommufd.h+39
......@@ -465,16 +465,27 @@ struct iommu_hwpt_arm_smmuv3 {
465465 __aligned_le64 ste[2];
466466};
467467
468/**
469 * struct iommu_hwpt_amd_guest - AMD IOMMU guest I/O page table data
470 * (IOMMU_HWPT_DATA_AMD_GUEST)
471 * @dte: Guest Device Table Entry (DTE)
472 */
473struct iommu_hwpt_amd_guest {
474 __aligned_u64 dte[4];
475};
476
468477/**
469478 * enum iommu_hwpt_data_type - IOMMU HWPT Data Type
470479 * @IOMMU_HWPT_DATA_NONE: no data
471480 * @IOMMU_HWPT_DATA_VTD_S1: Intel VT-d stage-1 page table
472481 * @IOMMU_HWPT_DATA_ARM_SMMUV3: ARM SMMUv3 Context Descriptor Table
482 * @IOMMU_HWPT_DATA_AMD_GUEST: AMD IOMMU guest page table
473483 */
474484enum iommu_hwpt_data_type {
475485 IOMMU_HWPT_DATA_NONE = 0,
476486 IOMMU_HWPT_DATA_VTD_S1 = 1,
477487 IOMMU_HWPT_DATA_ARM_SMMUV3 = 2,
488 IOMMU_HWPT_DATA_AMD_GUEST = 3,
478489};
479490
480491/**
......@@ -623,6 +634,32 @@ struct iommu_hw_info_tegra241_cmdqv {
623634 __u8 __reserved;
624635};
625636
637/**
638 * struct iommu_hw_info_amd - AMD IOMMU device info
639 *
640 * @efr : Value of AMD IOMMU Extended Feature Register (EFR)
641 * @efr2: Value of AMD IOMMU Extended Feature 2 Register (EFR2)
642 *
643 * Please See description of these registers in the following sections of
644 * the AMD I/O Virtualization Technology (IOMMU) Specification.
645 * (https://docs.amd.com/v/u/en-US/48882_3.10_PUB)
646 *
647 * - MMIO Offset 0030h IOMMU Extended Feature Register
648 * - MMIO Offset 01A0h IOMMU Extended Feature 2 Register
649 *
650 * Note: The EFR and EFR2 are raw values reported by hardware.
651 * VMM is responsible to determine the appropriate flags to be exposed to
652 * the VM since cetertain features are not currently supported by the kernel
653 * for HW-vIOMMU.
654 *
655 * Current VMM-allowed list of feature flags are:
656 * - EFR[GTSup, GASup, GioSup, PPRSup, EPHSup, GATS, GLX, PASmax]
657 */
658struct iommu_hw_info_amd {
659 __aligned_u64 efr;
660 __aligned_u64 efr2;
661};
662
626663/**
627664 * enum iommu_hw_info_type - IOMMU Hardware Info Types
628665 * @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not report hardware
......@@ -632,6 +669,7 @@ struct iommu_hw_info_tegra241_cmdqv {
632669 * @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type
633670 * @IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM
634671 * SMMUv3) info type
672 * @IOMMU_HW_INFO_TYPE_AMD: AMD IOMMU info type
635673 */
636674enum iommu_hw_info_type {
637675 IOMMU_HW_INFO_TYPE_NONE = 0,
......@@ -639,6 +677,7 @@ enum iommu_hw_info_type {
639677 IOMMU_HW_INFO_TYPE_INTEL_VTD = 1,
640678 IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2,
641679 IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV = 3,
680 IOMMU_HW_INFO_TYPE_AMD = 4,
642681};
643682
644683/**
lib/libc/include/any-linux-any/linux/kfd_ioctl.h+13-3
......@@ -44,9 +44,13 @@
4444 * - 1.16 - Add contiguous VRAM allocation flag
4545 * - 1.17 - Add SDMA queue creation with target SDMA engine ID
4646 * - 1.18 - Rename pad in set_memory_policy_args to misc_process_flag
47 * - 1.19 - Add a new ioctl to craete secondary kfd processes
48 * - 1.20 - Trap handler support for expert scheduling mode available
49 * - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions
50 * - 1.22 - Add queue creation with metadata ring base address
4751 */
4852#define KFD_IOCTL_MAJOR_VERSION 1
49#define KFD_IOCTL_MINOR_VERSION 18
53#define KFD_IOCTL_MINOR_VERSION 22
5054
5155struct kfd_ioctl_get_version_args {
5256 __u32 major_version; /* from KFD */
......@@ -84,7 +88,7 @@ struct kfd_ioctl_create_queue_args {
8488 __u32 ctx_save_restore_size; /* to KFD */
8589 __u32 ctl_stack_size; /* to KFD */
8690 __u32 sdma_engine_id; /* to KFD */
87 __u32 pad;
91 __u32 metadata_ring_size; /* to KFD */
8892};
8993
9094struct kfd_ioctl_destroy_queue_args {
......@@ -145,6 +149,8 @@ struct kfd_dbg_device_info_entry {
145149 __u32 num_xcc;
146150 __u32 capability;
147151 __u32 debug_prop;
152 __u32 capability2;
153 __u32 pad;
148154};
149155
150156/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
......@@ -945,6 +951,7 @@ enum kfd_dbg_trap_address_watch_mode {
945951enum kfd_dbg_trap_flags {
946952 KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP = 1,
947953 KFD_DBG_TRAP_FLAG_SINGLE_ALU_OP = 2,
954 KFD_DBG_TRAP_FLAG_LDS_OUT_OF_ADDR_RANGE = 4
948955};
949956
950957/* Trap exceptions */
......@@ -1671,7 +1678,10 @@ struct kfd_ioctl_dbg_trap_args {
16711678#define AMDKFD_IOC_DBG_TRAP \
16721679 AMDKFD_IOWR(0x26, struct kfd_ioctl_dbg_trap_args)
16731680
1681#define AMDKFD_IOC_CREATE_PROCESS \
1682 AMDKFD_IO(0x27)
1683
16741684#define AMDKFD_COMMAND_START 0x01
1675#define AMDKFD_COMMAND_END 0x27
1685#define AMDKFD_COMMAND_END 0x28
16761686
16771687#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/kfd_sysfs.h+2-1
......@@ -64,7 +64,8 @@
6464#define HSA_CAP_RESERVED 0x000f8000
6565
6666#define HSA_CAP2_PER_SDMA_QUEUE_RESET_SUPPORTED 0x00000001
67#define HSA_CAP2_RESERVED 0xfffffffe
67#define HSA_CAP2_TRAP_DEBUG_LDS_OUT_OF_ADDR_RANGE_SUPPORTED 0x00000002
68#define HSA_CAP2_RESERVED 0xfffffffc
6869
6970/* debug_prop bits in node properties */
7071#define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f
lib/libc/include/any-linux-any/linux/kvm.h+30-6
......@@ -11,9 +11,11 @@
1111#include <linux/const.h>
1212#include <linux/types.h>
1313
14#include <linux/stddef.h>
1415#include <linux/ioctl.h>
1516#include <asm/kvm.h>
1617
18
1719#define KVM_API_VERSION 12
1820
1921/*
......@@ -135,6 +137,12 @@ struct kvm_xen_exit {
135137 } u;
136138};
137139
140struct kvm_exit_snp_req_certs {
141 __u64 gpa;
142 __u64 npages;
143 __u64 ret;
144};
145
138146#define KVM_S390_GET_SKEYS_NONE 1
139147#define KVM_S390_SKEYS_MAX 1048576
140148
......@@ -180,6 +188,8 @@ struct kvm_xen_exit {
180188#define KVM_EXIT_MEMORY_FAULT 39
181189#define KVM_EXIT_TDX 40
182190#define KVM_EXIT_ARM_SEA 41
191#define KVM_EXIT_ARM_LDST64B 42
192#define KVM_EXIT_SNP_REQ_CERTS 43
183193
184194/* For KVM_EXIT_INTERNAL_ERROR */
185195/* Emulate instruction failed. */
......@@ -394,7 +404,7 @@ struct kvm_run {
394404 } eoi;
395405 /* KVM_EXIT_HYPERV */
396406 struct kvm_hyperv_exit hyperv;
397 /* KVM_EXIT_ARM_NISV */
407 /* KVM_EXIT_ARM_NISV / KVM_EXIT_ARM_LDST64B */
398408 struct {
399409 __u64 esr_iss;
400410 __u64 fault_ipa;
......@@ -474,6 +484,8 @@ struct kvm_run {
474484 __u64 gva;
475485 __u64 gpa;
476486 } arm_sea;
487 /* KVM_EXIT_SNP_REQ_CERTS */
488 struct kvm_exit_snp_req_certs snp_req_certs;
477489 /* Fix the size of the union. */
478490 char padding[256];
479491 };
......@@ -520,7 +532,7 @@ struct kvm_coalesced_mmio {
520532
521533struct kvm_coalesced_mmio_ring {
522534 __u32 first, last;
523 struct kvm_coalesced_mmio coalesced_mmio[];
535 __DECLARE_FLEX_ARRAY(struct kvm_coalesced_mmio, coalesced_mmio);
524536};
525537
526538#define KVM_COALESCED_MMIO_MAX \
......@@ -570,7 +582,7 @@ struct kvm_clear_dirty_log {
570582/* for KVM_SET_SIGNAL_MASK */
571583struct kvm_signal_mask {
572584 __u32 len;
573 __u8 sigset[];
585 __DECLARE_FLEX_ARRAY(__u8, sigset);
574586};
575587
576588/* for KVM_TPR_ACCESS_REPORTING */
......@@ -966,6 +978,7 @@ struct kvm_enable_cap {
966978#define KVM_CAP_GUEST_MEMFD_FLAGS 244
967979#define KVM_CAP_ARM_SEA_TO_USER 245
968980#define KVM_CAP_S390_USER_OPEREXEC 246
981#define KVM_CAP_S390_KEYOP 247
969982
970983struct kvm_irq_routing_irqchip {
971984 __u32 irqchip;
......@@ -1028,7 +1041,7 @@ struct kvm_irq_routing_entry {
10281041struct kvm_irq_routing {
10291042 __u32 nr;
10301043 __u32 flags;
1031 struct kvm_irq_routing_entry entries[];
1044 __DECLARE_FLEX_ARRAY(struct kvm_irq_routing_entry, entries);
10321045};
10331046
10341047#define KVM_IRQFD_FLAG_DEASSIGN (1 << 0)
......@@ -1119,7 +1132,7 @@ struct kvm_dirty_tlb {
11191132
11201133struct kvm_reg_list {
11211134 __u64 n; /* number of regs */
1122 __u64 reg[];
1135 __DECLARE_FLEX_ARRAY(__u64, reg);
11231136};
11241137
11251138struct kvm_one_reg {
......@@ -1211,6 +1224,16 @@ struct kvm_vfio_spapr_tce {
12111224 __s32 tablefd;
12121225};
12131226
1227#define KVM_S390_KEYOP_ISKE 0x01
1228#define KVM_S390_KEYOP_RRBE 0x02
1229#define KVM_S390_KEYOP_SSKE 0x03
1230struct kvm_s390_keyop {
1231 __u64 guest_addr;
1232 __u8 key;
1233 __u8 operation;
1234 __u8 pad[6];
1235};
1236
12141237/*
12151238 * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns
12161239 * a vcpu fd.
......@@ -1230,6 +1253,7 @@ struct kvm_vfio_spapr_tce {
12301253#define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)
12311254#define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)
12321255#define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long)
1256#define KVM_S390_KEYOP _IOWR(KVMIO, 0x53, struct kvm_s390_keyop)
12331257
12341258/* Device model IOC */
12351259#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
......@@ -1571,7 +1595,7 @@ struct kvm_stats_desc {
15711595 __u16 size;
15721596 __u32 offset;
15731597 __u32 bucket_size;
1574 char name[];
1598 __DECLARE_FLEX_ARRAY(char, name);
15751599};
15761600
15771601#define KVM_GET_STATS_FD _IO(KVMIO, 0xce)
lib/libc/include/any-linux-any/linux/landlock.h+22-8
......@@ -117,11 +117,24 @@ struct landlock_ruleset_attr {
117117 * future nested domains, not the one being created. It can also be used
118118 * with a @ruleset_fd value of -1 to mute subdomain logs without creating a
119119 * domain.
120 *
121 * The following flag supports policy enforcement in multithreaded processes:
122 *
123 * %LANDLOCK_RESTRICT_SELF_TSYNC
124 * Applies the new Landlock configuration atomically to all threads of the
125 * current process, including the Landlock domain and logging
126 * configuration. This overrides the Landlock configuration of sibling
127 * threads, irrespective of previously established Landlock domains and
128 * logging configurations on these threads.
129 *
130 * If the calling thread is running with no_new_privs, this operation
131 * enables no_new_privs on the sibling threads as well.
120132 */
121133/* clang-format off */
122134#define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)
123135#define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON (1U << 1)
124136#define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF (1U << 2)
137#define LANDLOCK_RESTRICT_SELF_TSYNC (1U << 3)
125138/* clang-format on */
126139
127140/**
......@@ -182,11 +195,13 @@ struct landlock_net_port_attr {
182195 * It should be noted that port 0 passed to :manpage:`bind(2)` will bind
183196 * to an available port from the ephemeral port range. This can be
184197 * configured with the ``/proc/sys/net/ipv4/ip_local_port_range`` sysctl
185 * (also used for IPv6).
198 * (also used for IPv6), and within that range, on a per-socket basis
199 * with ``setsockopt(IP_LOCAL_PORT_RANGE)``.
186200 *
187 * A Landlock rule with port 0 and the ``LANDLOCK_ACCESS_NET_BIND_TCP``
201 * A Landlock rule with port 0 and the %LANDLOCK_ACCESS_NET_BIND_TCP
188202 * right means that requesting to bind on port 0 is allowed and it will
189 * automatically translate to binding on the related port range.
203 * automatically translate to binding on a kernel-assigned ephemeral
204 * port.
190205 */
191206 __u64 port;
192207};
......@@ -329,13 +344,12 @@ struct landlock_net_port_attr {
329344 * These flags enable to restrict a sandboxed process to a set of network
330345 * actions.
331346 *
332 * This is supported since Landlock ABI version 4.
333 *
334347 * The following access rights apply to TCP port numbers:
335348 *
336 * - %LANDLOCK_ACCESS_NET_BIND_TCP: Bind a TCP socket to a local port.
337 * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect an active TCP socket to
338 * a remote port.
349 * - %LANDLOCK_ACCESS_NET_BIND_TCP: Bind TCP sockets to the given local
350 * port. Support added in Landlock ABI version 4.
351 * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect TCP sockets to the given
352 * remote port. Support added in Landlock ABI version 4.
339353 */
340354/* clang-format off */
341355#define LANDLOCK_ACCESS_NET_BIND_TCP (1ULL << 0)
lib/libc/include/any-linux-any/linux/magic.h+1
......@@ -104,5 +104,6 @@
104104#define SECRETMEM_MAGIC 0x5345434d /* "SECM" */
105105#define PID_FS_MAGIC 0x50494446 /* "PIDF" */
106106#define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */
107#define NULL_FS_MAGIC 0x4E554C4C /* "NULL" */
107108
108109#endif /* __LINUX_MAGIC_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/mempolicy.h+3
......@@ -39,6 +39,9 @@ enum {
3939#define MPOL_MODE_FLAGS \
4040 (MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES | MPOL_F_NUMA_BALANCING)
4141
42/* Whether the nodemask is specified by users */
43#define MPOL_USER_NODEMASK_FLAGS (MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES)
44
4245/* Flags for get_mempolicy */
4346#define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */
4447#define MPOL_F_ADDR (1<<1) /* look up vma using address */
lib/libc/include/any-linux-any/linux/mount.h+11-2
......@@ -61,7 +61,8 @@
6161/*
6262 * open_tree() flags.
6363 */
64#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
64#define OPEN_TREE_CLONE (1 << 0) /* Clone the target tree and attach the clone */
65#define OPEN_TREE_NAMESPACE (1 << 1) /* Clone the target tree into a new mount namespace */
6566#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
6667
6768/*
......@@ -197,7 +198,10 @@ struct statmount {
197198 */
198199struct mnt_id_req {
199200 __u32 size;
200 __u32 mnt_ns_fd;
201 union {
202 __u32 mnt_ns_fd;
203 __u32 mnt_fd;
204 };
201205 __u64 mnt_id;
202206 __u64 param;
203207 __u64 mnt_ns_id;
......@@ -232,4 +236,9 @@ struct mnt_id_req {
232236#define LSMT_ROOT 0xffffffffffffffff /* root mount */
233237#define LISTMOUNT_REVERSE (1 << 0) /* List later mounts first */
234238
239/*
240 * @flag bits for statmount(2)
241 */
242#define STATMOUNT_BY_FD 0x00000001U /* want mountinfo for given fd */
243
235244#endif /* _LINUX_MOUNT_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/mptcp_pm.h+1-1
......@@ -11,7 +11,7 @@
1111#define MPTCP_PM_VER 1
1212
1313/**
14 * enum mptcp_event_type
14 * enum mptcp_event_type - Netlink MPTCP event types
1515 * @MPTCP_EVENT_UNSPEC: unused event
1616 * @MPTCP_EVENT_CREATED: A new MPTCP connection has been created. It is the
1717 * good time to allocate memory and send ADD_ADDR if needed. Depending on the
lib/libc/include/any-linux-any/linux/mshv.h+2
......@@ -27,6 +27,8 @@ enum {
2727 MSHV_PT_BIT_X2APIC,
2828 MSHV_PT_BIT_GPA_SUPER_PAGES,
2929 MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,
30 MSHV_PT_BIT_NESTED_VIRTUALIZATION,
31 MSHV_PT_BIT_SMT_ENABLED_GUEST,
3032 MSHV_PT_BIT_COUNT,
3133};
3234
lib/libc/include/any-linux-any/linux/netfilter_bridge.h+5-4
......@@ -5,13 +5,14 @@
55/* bridge-specific defines for netfilter.
66 */
77
8#include <netinet/if_ether.h> /* for __UAPI_DEF_ETHHDR if defined */
9
810#include <linux/in.h>
911#include <linux/netfilter.h>
1012#include <linux/if_ether.h>
1113#include <linux/if_vlan.h>
1214#include <linux/if_pppox.h>
13
14#include <limits.h> /* for INT_MIN, INT_MAX */
15#include <linux/typelimits.h>
1516
1617/* Bridge Hooks */
1718/* After promisc drops, checksum checks. */
......@@ -29,14 +30,14 @@
2930#define NF_BR_NUMHOOKS 6
3031
3132enum nf_br_hook_priorities {
32 NF_BR_PRI_FIRST = INT_MIN,
33 NF_BR_PRI_FIRST = __KERNEL_INT_MIN,
3334 NF_BR_PRI_NAT_DST_BRIDGED = -300,
3435 NF_BR_PRI_FILTER_BRIDGED = -200,
3536 NF_BR_PRI_BRNF = 0,
3637 NF_BR_PRI_NAT_DST_OTHER = 100,
3738 NF_BR_PRI_FILTER_OTHER = 200,
3839 NF_BR_PRI_NAT_SRC = 300,
39 NF_BR_PRI_LAST = INT_MAX,
40 NF_BR_PRI_LAST = __KERNEL_INT_MAX,
4041};
4142
4243#endif /* __LINUX_BRIDGE_NETFILTER_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/netfilter_ipv4.h+4-5
......@@ -7,11 +7,10 @@
77
88
99#include <linux/netfilter.h>
10#include <linux/typelimits.h>
1011
1112/* only for userspace compatibility */
1213
13#include <limits.h> /* for INT_MIN, INT_MAX */
14
1514/* IP Hooks */
1615/* After promisc drops, checksum checks. */
1716#define NF_IP_PRE_ROUTING 0
......@@ -26,7 +25,7 @@
2625#define NF_IP_NUMHOOKS 5
2726
2827enum nf_ip_hook_priorities {
29 NF_IP_PRI_FIRST = INT_MIN,
28 NF_IP_PRI_FIRST = __KERNEL_INT_MIN,
3029 NF_IP_PRI_RAW_BEFORE_DEFRAG = -450,
3130 NF_IP_PRI_CONNTRACK_DEFRAG = -400,
3231 NF_IP_PRI_RAW = -300,
......@@ -39,8 +38,8 @@ enum nf_ip_hook_priorities {
3938 NF_IP_PRI_NAT_SRC = 100,
4039 NF_IP_PRI_SELINUX_LAST = 225,
4140 NF_IP_PRI_CONNTRACK_HELPER = 300,
42 NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
43 NF_IP_PRI_LAST = INT_MAX,
41 NF_IP_PRI_CONNTRACK_CONFIRM = __KERNEL_INT_MAX,
42 NF_IP_PRI_LAST = __KERNEL_INT_MAX,
4443};
4544
4645/* Arguments for setsockopt SOL_IP: */
lib/libc/include/any-linux-any/linux/netfilter_ipv6.h+3-4
......@@ -10,11 +10,10 @@
1010
1111
1212#include <linux/netfilter.h>
13#include <linux/typelimits.h>
1314
1415/* only for userspace compatibility */
1516
16#include <limits.h> /* for INT_MIN, INT_MAX */
17
1817/* IP6 Hooks */
1918/* After promisc drops, checksum checks. */
2019#define NF_IP6_PRE_ROUTING 0
......@@ -30,7 +29,7 @@
3029
3130
3231enum nf_ip6_hook_priorities {
33 NF_IP6_PRI_FIRST = INT_MIN,
32 NF_IP6_PRI_FIRST = __KERNEL_INT_MIN,
3433 NF_IP6_PRI_RAW_BEFORE_DEFRAG = -450,
3534 NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
3635 NF_IP6_PRI_RAW = -300,
......@@ -43,7 +42,7 @@ enum nf_ip6_hook_priorities {
4342 NF_IP6_PRI_NAT_SRC = 100,
4443 NF_IP6_PRI_SELINUX_LAST = 225,
4544 NF_IP6_PRI_CONNTRACK_HELPER = 300,
46 NF_IP6_PRI_LAST = INT_MAX,
45 NF_IP6_PRI_LAST = __KERNEL_INT_MAX,
4746};
4847
4948
lib/libc/include/any-linux-any/linux/nfs.h+1-1
......@@ -55,7 +55,7 @@
5555 NFSERR_NODEV = 19, /* v2 v3 v4 */
5656 NFSERR_NOTDIR = 20, /* v2 v3 v4 */
5757 NFSERR_ISDIR = 21, /* v2 v3 v4 */
58 NFSERR_INVAL = 22, /* v2 v3 v4 */
58 NFSERR_INVAL = 22, /* v3 v4 */
5959 NFSERR_FBIG = 27, /* v2 v3 v4 */
6060 NFSERR_NOSPC = 28, /* v2 v3 v4 */
6161 NFSERR_ROFS = 30, /* v2 v3 v4 */
lib/libc/include/any-linux-any/linux/nfsd_netlink.h+1
......@@ -35,6 +35,7 @@ enum {
3535 NFSD_A_SERVER_GRACETIME,
3636 NFSD_A_SERVER_LEASETIME,
3737 NFSD_A_SERVER_SCOPE,
38 NFSD_A_SERVER_MIN_THREADS,
3839
3940 __NFSD_A_SERVER_MAX,
4041 NFSD_A_SERVER_MAX = (__NFSD_A_SERVER_MAX - 1)
lib/libc/include/any-linux-any/linux/nilfs2_api.h+2-2
......@@ -58,7 +58,7 @@ NILFS_CPINFO_FNS(INVALID, invalid)
5858NILFS_CPINFO_FNS(MINOR, minor)
5959
6060/**
61 * nilfs_suinfo - segment usage information
61 * struct nilfs_suinfo - segment usage information
6262 * @sui_lastmod: timestamp of last modification
6363 * @sui_nblocks: number of written blocks in segment
6464 * @sui_flags: segment usage flags
......@@ -93,7 +93,7 @@ static __inline__ int nilfs_suinfo_clean(const struct nilfs_suinfo *si)
9393}
9494
9595/**
96 * nilfs_suinfo_update - segment usage information update
96 * struct nilfs_suinfo_update - segment usage information update
9797 * @sup_segnum: segment number
9898 * @sup_flags: flags for which fields are active in sup_sui
9999 * @sup_reserved: reserved necessary for alignment
lib/libc/include/any-linux-any/linux/nilfs2_ondisk.h+97-66
......@@ -133,73 +133,104 @@ struct nilfs_super_root {
133133
134134/**
135135 * struct nilfs_super_block - structure of super block on disk
136 * @s_rev_level: Revision level
137 * @s_minor_rev_level: minor revision level
138 * @s_magic: Magic signature
139 * @s_bytes: Bytes count of CRC calculation for
140 * this structure. s_reserved is excluded.
141 * @s_flags: flags
142 * @s_crc_seed: Seed value of CRC calculation
143 * @s_sum: Check sum of super block
144 * @s_log_block_size: Block size represented as follows:
145 * blocksize = 1 << (s_log_block_size + 10)
146 * @s_nsegments: Number of segments in filesystem
147 * @s_dev_size: block device size in bytes
148 * @s_first_data_block: 1st seg disk block number
149 * @s_blocks_per_segment: number of blocks per full segment
150 * @s_r_segments_percentage: Reserved segments percentage
151 * @s_last_cno: Last checkpoint number
152 * @s_last_pseg: disk block addr pseg written last
153 * @s_last_seq: seq. number of seg written last
154 * @s_free_blocks_count: Free blocks count
155 * @s_ctime: Creation time (execution time of newfs)
156 * @s_mtime: Mount time
157 * @s_wtime: Write time
158 * @s_mnt_count: Mount count
159 * @s_max_mnt_count: Maximal mount count
160 * @s_state: File system state
161 * @s_errors: Behaviour when detecting errors
162 * @s_lastcheck: time of last check
163 * @s_checkinterval: max. time between checks
164 * @s_creator_os: OS
165 * @s_def_resuid: Default uid for reserved blocks
166 * @s_def_resgid: Default gid for reserved blocks
167 * @s_first_ino: First non-reserved inode
168 * @s_inode_size: Size of an inode
169 * @s_dat_entry_size: Size of a dat entry
170 * @s_checkpoint_size: Size of a checkpoint
171 * @s_segment_usage_size: Size of a segment usage
172 * @s_uuid: 128-bit uuid for volume
173 * @s_volume_name: volume name
174 * @s_c_interval: Commit interval of segment
175 * @s_c_block_max: Threshold of data amount for the
176 * segment construction
177 * @s_feature_compat: Compatible feature set
178 * @s_feature_compat_ro: Read-only compatible feature set
179 * @s_feature_incompat: Incompatible feature set
180 * @s_reserved: padding to the end of the block
136181 */
137182struct nilfs_super_block {
138/*00*/ __le32 s_rev_level; /* Revision level */
139 __le16 s_minor_rev_level; /* minor revision level */
140 __le16 s_magic; /* Magic signature */
141
142 __le16 s_bytes; /*
143 * Bytes count of CRC calculation
144 * for this structure. s_reserved
145 * is excluded.
146 */
147 __le16 s_flags; /* flags */
148 __le32 s_crc_seed; /* Seed value of CRC calculation */
149/*10*/ __le32 s_sum; /* Check sum of super block */
150
151 __le32 s_log_block_size; /*
152 * Block size represented as follows
153 * blocksize =
154 * 1 << (s_log_block_size + 10)
155 */
156 __le64 s_nsegments; /* Number of segments in filesystem */
157/*20*/ __le64 s_dev_size; /* block device size in bytes */
158 __le64 s_first_data_block; /* 1st seg disk block number */
159/*30*/ __le32 s_blocks_per_segment; /* number of blocks per full segment */
160 __le32 s_r_segments_percentage; /* Reserved segments percentage */
161
162 __le64 s_last_cno; /* Last checkpoint number */
163/*40*/ __le64 s_last_pseg; /* disk block addr pseg written last */
164 __le64 s_last_seq; /* seq. number of seg written last */
165/*50*/ __le64 s_free_blocks_count; /* Free blocks count */
166
167 __le64 s_ctime; /*
168 * Creation time (execution time of
169 * newfs)
170 */
171/*60*/ __le64 s_mtime; /* Mount time */
172 __le64 s_wtime; /* Write time */
173/*70*/ __le16 s_mnt_count; /* Mount count */
174 __le16 s_max_mnt_count; /* Maximal mount count */
175 __le16 s_state; /* File system state */
176 __le16 s_errors; /* Behaviour when detecting errors */
177 __le64 s_lastcheck; /* time of last check */
178
179/*80*/ __le32 s_checkinterval; /* max. time between checks */
180 __le32 s_creator_os; /* OS */
181 __le16 s_def_resuid; /* Default uid for reserved blocks */
182 __le16 s_def_resgid; /* Default gid for reserved blocks */
183 __le32 s_first_ino; /* First non-reserved inode */
184
185/*90*/ __le16 s_inode_size; /* Size of an inode */
186 __le16 s_dat_entry_size; /* Size of a dat entry */
187 __le16 s_checkpoint_size; /* Size of a checkpoint */
188 __le16 s_segment_usage_size; /* Size of a segment usage */
189
190/*98*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */
191/*A8*/ char s_volume_name[80] /* volume name */
192 __kernel_nonstring;
193
194/*F8*/ __le32 s_c_interval; /* Commit interval of segment */
195 __le32 s_c_block_max; /*
196 * Threshold of data amount for
197 * the segment construction
198 */
199/*100*/ __le64 s_feature_compat; /* Compatible feature set */
200 __le64 s_feature_compat_ro; /* Read-only compatible feature set */
201 __le64 s_feature_incompat; /* Incompatible feature set */
202 __u32 s_reserved[186]; /* padding to the end of the block */
183/*00*/ __le32 s_rev_level;
184 __le16 s_minor_rev_level;
185 __le16 s_magic;
186
187 __le16 s_bytes;
188 __le16 s_flags;
189 __le32 s_crc_seed;
190/*10*/ __le32 s_sum;
191
192 __le32 s_log_block_size;
193 __le64 s_nsegments;
194/*20*/ __le64 s_dev_size;
195 __le64 s_first_data_block;
196/*30*/ __le32 s_blocks_per_segment;
197 __le32 s_r_segments_percentage;
198
199 __le64 s_last_cno;
200/*40*/ __le64 s_last_pseg;
201 __le64 s_last_seq;
202/*50*/ __le64 s_free_blocks_count;
203
204 __le64 s_ctime;
205/*60*/ __le64 s_mtime;
206 __le64 s_wtime;
207/*70*/ __le16 s_mnt_count;
208 __le16 s_max_mnt_count;
209 __le16 s_state;
210 __le16 s_errors;
211 __le64 s_lastcheck;
212
213/*80*/ __le32 s_checkinterval;
214 __le32 s_creator_os;
215 __le16 s_def_resuid;
216 __le16 s_def_resgid;
217 __le32 s_first_ino;
218
219/*90*/ __le16 s_inode_size;
220 __le16 s_dat_entry_size;
221 __le16 s_checkpoint_size;
222 __le16 s_segment_usage_size;
223
224/*98*/ __u8 s_uuid[16];
225/*A8*/ char s_volume_name[80] __kernel_nonstring;
226
227/*F8*/ __le32 s_c_interval;
228 __le32 s_c_block_max;
229
230/*100*/ __le64 s_feature_compat;
231 __le64 s_feature_compat_ro;
232 __le64 s_feature_incompat;
233 __u32 s_reserved[186];
203234};
204235
205236/*
......@@ -449,7 +480,7 @@ struct nilfs_btree_node {
449480/**
450481 * struct nilfs_direct_node - header of built-in bmap array
451482 * @dn_flags: flags
452 * @dn_pad: padding
483 * @pad: padding
453484 */
454485struct nilfs_direct_node {
455486 __u8 dn_flags;
lib/libc/include/any-linux-any/linux/nl80211.h+104-3
......@@ -11,7 +11,7 @@
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-2025 Intel Corporation
14 * Copyright (C) 2018-2026 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
......@@ -2974,6 +2974,16 @@ enum nl80211_commands {
29742974 * primary channel is 2 MHz wide, and the control channel designates
29752975 * the 1 MHz primary subchannel within that 2 MHz primary.
29762976 *
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 *
29772987 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
29782988 * @NL80211_ATTR_MAX: highest attribute number currently defined
29792989 * @__NL80211_ATTR_AFTER_LAST: internal use
......@@ -3542,6 +3552,11 @@ enum nl80211_attrs {
35423552
35433553 NL80211_ATTR_S1G_PRIMARY_2MHZ,
35443554
3555 NL80211_ATTR_EPP_PEER,
3556
3557 NL80211_ATTR_UHR_CAPABILITY,
3558 NL80211_ATTR_DISABLE_UHR,
3559
35453560 /* add attributes here, update the policy in nl80211.c */
35463561
35473562 __NL80211_ATTR_AFTER_LAST,
......@@ -3894,6 +3909,12 @@ enum nl80211_eht_ru_alloc {
38943909 * @NL80211_RATE_INFO_4_MHZ_WIDTH: 4 MHz S1G rate
38953910 * @NL80211_RATE_INFO_8_MHZ_WIDTH: 8 MHz S1G rate
38963911 * @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
38973918 * @__NL80211_RATE_INFO_AFTER_LAST: internal use
38983919 */
38993920enum nl80211_rate_info {
......@@ -3927,6 +3948,9 @@ enum nl80211_rate_info {
39273948 NL80211_RATE_INFO_4_MHZ_WIDTH,
39283949 NL80211_RATE_INFO_8_MHZ_WIDTH,
39293950 NL80211_RATE_INFO_16_MHZ_WIDTH,
3951 NL80211_RATE_INFO_UHR_MCS,
3952 NL80211_RATE_INFO_UHR_ELR,
3953 NL80211_RATE_INFO_UHR_IM,
39303954
39313955 /* keep last */
39323956 __NL80211_RATE_INFO_AFTER_LAST,
......@@ -4249,6 +4273,10 @@ enum nl80211_mpath_info {
42494273 * capabilities element
42504274 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE: EHT PPE thresholds information as
42514275 * 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
42524280 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
42534281 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined
42544282 */
......@@ -4266,6 +4294,8 @@ enum nl80211_band_iftype_attr {
42664294 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY,
42674295 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET,
42684296 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE,
4297 NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC,
4298 NL80211_BAND_IFTYPE_ATTR_UHR_CAP_PHY,
42694299
42704300 /* keep last */
42714301 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
......@@ -4445,6 +4475,11 @@ enum nl80211_wmm_rule {
44454475 * channel in current regulatory domain.
44464476 * @NL80211_FREQUENCY_ATTR_NO_16MHZ: 16 MHz operation is not allowed on this
44474477 * 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.
44484483 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
44494484 * currently defined
44504485 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
......@@ -4493,6 +4528,8 @@ enum nl80211_frequency_attr {
44934528 NL80211_FREQUENCY_ATTR_NO_4MHZ,
44944529 NL80211_FREQUENCY_ATTR_NO_8MHZ,
44954530 NL80211_FREQUENCY_ATTR_NO_16MHZ,
4531 NL80211_FREQUENCY_ATTR_S1G_NO_PRIMARY,
4532 NL80211_FREQUENCY_ATTR_NO_UHR,
44964533
44974534 /* keep last */
44984535 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
......@@ -4706,6 +4743,7 @@ enum nl80211_sched_scan_match_attr {
47064743 * despite NO_IR configuration.
47074744 * @NL80211_RRF_ALLOW_20MHZ_ACTIVITY: Allow activity in 20 MHz bandwidth,
47084745 * despite NO_IR configuration.
4746 * @NL80211_RRF_NO_UHR: UHR operation not allowed
47094747 */
47104748enum nl80211_reg_rule_flags {
47114749 NL80211_RRF_NO_OFDM = 1 << 0,
......@@ -4732,6 +4770,7 @@ enum nl80211_reg_rule_flags {
47324770 NL80211_RRF_NO_6GHZ_AFC_CLIENT = 1 << 23,
47334771 NL80211_RRF_ALLOW_6GHZ_VLP_AP = 1 << 24,
47344772 NL80211_RRF_ALLOW_20MHZ_ACTIVITY = 1 << 25,
4773 NL80211_RRF_NO_UHR = 1 << 26,
47354774};
47364775
47374776#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
......@@ -5426,6 +5465,7 @@ enum nl80211_bss_status {
54265465 * @NL80211_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key
54275466 * @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
54285467 * @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
5468 * @NL80211_AUTHTYPE_EPPKE: Enhanced Privacy Protection Key Exchange
54295469 * @__NL80211_AUTHTYPE_NUM: internal
54305470 * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
54315471 * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
......@@ -5441,6 +5481,7 @@ enum nl80211_auth_type {
54415481 NL80211_AUTHTYPE_FILS_SK,
54425482 NL80211_AUTHTYPE_FILS_SK_PFS,
54435483 NL80211_AUTHTYPE_FILS_PK,
5484 NL80211_AUTHTYPE_EPPKE,
54445485
54455486 /* keep last */
54465487 __NL80211_AUTHTYPE_NUM,
......@@ -6745,6 +6786,15 @@ enum nl80211_feature_flags {
67456786 * @NL80211_EXT_FEATURE_BEACON_RATE_EHT: Driver supports beacon rate
67466787 * configuration (AP/mesh) with EHT rates.
67476788 *
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 *
67486798 * @NUM_NL80211_EXT_FEATURES: number of extended features.
67496799 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
67506800 */
......@@ -6821,6 +6871,8 @@ enum nl80211_ext_feature_index {
68216871 NL80211_EXT_FEATURE_DFS_CONCURRENT,
68226872 NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,
68236873 NL80211_EXT_FEATURE_BEACON_RATE_EHT,
6874 NL80211_EXT_FEATURE_EPPKE,
6875 NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION,
68246876
68256877 /* add new features before the definition below */
68266878 NUM_NL80211_EXT_FEATURES,
......@@ -7433,6 +7485,8 @@ enum nl80211_nan_band_conf_attributes {
74337485 * address that can take values from 50-6F-9A-01-00-00 to
74347486 * 50-6F-9A-01-FF-FF. This attribute is optional. If not present,
74357487 * 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.
74367490 * @NL80211_NAN_CONF_EXTRA_ATTRS: Additional NAN attributes to be
74377491 * published in the beacons. This is an optional byte array.
74387492 * @NL80211_NAN_CONF_VENDOR_ELEMS: Vendor-specific elements that will
......@@ -7767,6 +7821,30 @@ enum nl80211_peer_measurement_attrs {
77677821 * trigger based ranging measurement is supported
77687822 * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating
77697823 * 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
77707848 *
77717849 * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
77727850 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
......@@ -7784,6 +7862,14 @@ enum nl80211_peer_measurement_ftm_capa {
77847862 NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST,
77857863 NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED,
77867864 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,
77877873
77887874 /* keep last */
77897875 NUM_NL80211_PMSR_FTM_CAPA_ATTR,
......@@ -7799,12 +7885,15 @@ enum nl80211_peer_measurement_ftm_capa {
77997885 * &enum nl80211_preamble), optional for DMG (u32)
78007886 * @NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP: number of bursts exponent as in
78017887 * 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)
78037890 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD: interval between bursts in units
78047891 * of 100ms (u16, optional with default 0)
78057892 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION: burst duration, as in 802.11-2016
78067893 * 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).
78087897 * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames
78097898 * requested per burst
78107899 * (u8, 0-31, optional with default 0 i.e. "no preference")
......@@ -7833,6 +7922,14 @@ enum nl80211_peer_measurement_ftm_capa {
78337922 * @NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR: optional. The BSS color of the
78347923 * responder. Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
78357924 * 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).
78367933 *
78377934 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
78387935 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
......@@ -7853,6 +7950,7 @@ enum nl80211_peer_measurement_ftm_req {
78537950 NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
78547951 NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
78557952 NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,
7953 NL80211_PMSR_FTM_REQ_ATTR_RSTA,
78567954
78577955 /* keep last */
78587956 NUM_NL80211_PMSR_FTM_REQ_ATTR,
......@@ -7937,6 +8035,8 @@ enum nl80211_peer_measurement_ftm_failure_reasons {
79378035 * 9.4.2.22.1) starting with the Measurement Token, with Measurement
79388036 * Type 11.
79398037 * @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)
79408040 *
79418041 * @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal
79428042 * @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number
......@@ -7965,6 +8065,7 @@ enum nl80211_peer_measurement_ftm_resp {
79658065 NL80211_PMSR_FTM_RESP_ATTR_LCI,
79668066 NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
79678067 NL80211_PMSR_FTM_RESP_ATTR_PAD,
8068 NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD,
79688069
79698070 /* keep last */
79708071 NUM_NL80211_PMSR_FTM_RESP_ATTR,
lib/libc/include/any-linux-any/linux/pci.h+7
......@@ -39,4 +39,11 @@
3939#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */
4040#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */
4141
42enum 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
4249#endif /* LINUX_PCI_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/pci_regs.h+65-6
......@@ -132,6 +132,11 @@
132132#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */
133133#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */
134134#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
135140#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */
136141#define PCI_IO_LIMIT 0x1d
137142#define PCI_IO_RANGE_TYPE_MASK 0x0fUL /* I/O bridging type */
......@@ -707,7 +712,7 @@
707712#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */
708713#define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */
709714#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 */
711716#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */
712717#define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */
713718#define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */
......@@ -1253,11 +1258,6 @@
12531258#define PCI_DEV3_STA 0x0c /* Device 3 Status Register */
12541259#define PCI_DEV3_STA_SEGMENT 0x8 /* Segment Captured (end-to-end flit-mode detected) */
12551260
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
12611261/* Integrity and Data Encryption Extended Capability */
12621262#define PCI_IDE_CAP 0x04
12631263#define PCI_IDE_CAP_LINK 0x1 /* Link IDE Stream Supported */
......@@ -1338,4 +1338,63 @@
13381338#define PCI_IDE_SEL_ADDR_3(x) (28 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
13391339#define PCI_IDE_SEL_BLOCK_SIZE(nr_assoc) (20 + PCI_IDE_SEL_ADDR_BLOCK_SIZE * (nr_assoc))
13401340
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
13411400#endif /* LINUX_PCI_REGS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/pcitest.h+1
......@@ -22,6 +22,7 @@
2222#define PCITEST_GET_IRQTYPE _IO('P', 0x9)
2323#define PCITEST_BARS _IO('P', 0xa)
2424#define PCITEST_DOORBELL _IO('P', 0xb)
25#define PCITEST_BAR_SUBRANGE _IO('P', 0xc)
2526#define PCITEST_CLEAR_IRQ _IO('P', 0x10)
2627
2728#define PCITEST_IRQ_TYPE_UNDEFINED -1
lib/libc/include/any-linux-any/linux/perf_event.h+24-3
......@@ -1330,14 +1330,16 @@ union perf_mem_data_src {
13301330 mem_snoopx : 2, /* Snoop mode, ext */
13311331 mem_blk : 3, /* Access blocked */
13321332 mem_hops : 3, /* Hop level */
1333 mem_rsvd : 18;
1333 mem_region : 5, /* cache/memory regions */
1334 mem_rsvd : 13;
13341335 };
13351336};
13361337#elif defined(__BIG_ENDIAN_BITFIELD)
13371338union perf_mem_data_src {
13381339 __u64 val;
13391340 struct {
1340 __u64 mem_rsvd : 18,
1341 __u64 mem_rsvd : 13,
1342 mem_region : 5, /* cache/memory regions */
13411343 mem_hops : 3, /* Hop level */
13421344 mem_blk : 3, /* Access blocked */
13431345 mem_snoopx : 2, /* Snoop mode, ext */
......@@ -1394,7 +1396,7 @@ union perf_mem_data_src {
13941396#define PERF_MEM_LVLNUM_L4 0x0004 /* L4 */
13951397#define PERF_MEM_LVLNUM_L2_MHB 0x0005 /* L2 Miss Handling Buffer */
13961398#define PERF_MEM_LVLNUM_MSC 0x0006 /* Memory-side Cache */
1397/* 0x007 available */
1399#define PERF_MEM_LVLNUM_L0 0x0007 /* L0 */
13981400#define PERF_MEM_LVLNUM_UNC 0x0008 /* Uncached */
13991401#define PERF_MEM_LVLNUM_CXL 0x0009 /* CXL */
14001402#define PERF_MEM_LVLNUM_IO 0x000a /* I/O */
......@@ -1447,6 +1449,25 @@ union perf_mem_data_src {
14471449/* 5-7 available */
14481450#define PERF_MEM_HOPS_SHIFT 43
14491451
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
14501471#define PERF_MEM_S(a, s) \
14511472 (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
14521473
lib/libc/include/any-linux-any/linux/pkt_sched.h+1
......@@ -1036,6 +1036,7 @@ enum {
10361036 TCA_CAKE_STATS_DROP_NEXT_US,
10371037 TCA_CAKE_STATS_P_DROP,
10381038 TCA_CAKE_STATS_BLUE_TIMER_US,
1039 TCA_CAKE_STATS_ACTIVE_QUEUES,
10391040 __TCA_CAKE_STATS_MAX
10401041};
10411042#define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1)
lib/libc/include/any-linux-any/linux/prctl.h+30
......@@ -386,4 +386,34 @@ struct prctl_mm_map {
386386# define PR_FUTEX_HASH_SET_SLOTS 1
387387# define PR_FUTEX_HASH_GET_SLOTS 2
388388
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
389419#endif /* _LINUX_PRCTL_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/rseq.h+62-5
......@@ -19,13 +19,20 @@ enum rseq_cpu_id_state {
1919};
2020
2121enum rseq_flags {
22 RSEQ_FLAG_UNREGISTER = (1 << 0),
22 RSEQ_FLAG_UNREGISTER = (1 << 0),
23 RSEQ_FLAG_SLICE_EXT_DEFAULT_ON = (1 << 1),
2324};
2425
2526enum rseq_cs_flags_bit {
27 /* Historical and unsupported bits */
2628 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,
2729 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,
2830 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,
2936};
3037
3138enum rseq_cs_flags {
......@@ -35,6 +42,11 @@ enum rseq_cs_flags {
3542 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT),
3643 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE =
3744 (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),
3850};
3951
4052/*
......@@ -53,11 +65,39 @@ struct rseq_cs {
5365 __u64 abort_ip;
5466} __attribute__((aligned(4 * sizeof(__u64))));
5567
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 */
78struct rseq_slice_ctrl {
79 union {
80 __u32 all;
81 struct {
82 __u8 request;
83 __u8 granted;
84 __u16 __reserved;
85 };
86 };
87};
88
5689/*
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.
5999 *
60 * A single struct rseq per thread is allowed.
100 * A single active struct rseq registration per thread is allowed.
61101 */
62102struct rseq {
63103 /*
......@@ -141,10 +181,27 @@ struct rseq {
141181 */
142182 __u32 mm_cid;
143183
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
144201 /*
145202 * Flexible array member at end of structure, after last feature field.
146203 */
147204 char end[];
148} __attribute__((aligned(4 * sizeof(__u64))));
205} __attribute__((aligned(32)));
149206
150207#endif /* _LINUX_RSEQ_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/shm.h-1
......@@ -5,7 +5,6 @@
55#include <linux/ipc.h>
66#include <linux/errno.h>
77#include <asm-generic/hugetlb_encode.h>
8#include <unistd.h>
98
109/*
1110 * SHMMNI, SHMMAX and SHMALL are default upper limits which can be
lib/libc/include/any-linux-any/linux/stddef.h+4
......@@ -69,6 +69,10 @@
6969#define __counted_by_be(m)
7070#endif
7171
72#ifndef __counted_by_ptr
73#define __counted_by_ptr(m)
74#endif
75
7276#define __kernel_nonstring
7377
7478#endif /* _LINUX_STDDEF_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/sysctl.h+1-2
......@@ -92,7 +92,6 @@ enum
9292 KERN_DOMAINNAME=8, /* string: domainname */
9393
9494 KERN_PANIC=15, /* int: panic timeout */
95 KERN_REALROOTDEV=16, /* real root device to mount after initrd */
9695
9796 KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
9897 KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
......@@ -183,7 +182,7 @@ enum
183182 VM_LOWMEM_RESERVE_RATIO=20,/* reservation ratio for lower memory zones */
184183 VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */
185184 VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */
186 VM_LAPTOP_MODE=23, /* vm laptop mode */
185
187186 VM_BLOCK_DUMP=24, /* block dump mode */
188187 VM_HUGETLB_GROUP=25, /* permitted hugetlb group */
189188 VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */
lib/libc/include/any-linux-any/linux/taskstats.h+12-1
......@@ -18,6 +18,7 @@
1818#define _LINUX_TASKSTATS_H
1919
2020#include <linux/types.h>
21#include <linux/time_types.h>
2122
2223/* Format for per-task data returned to userland when
2324 * - a task exits
......@@ -34,7 +35,7 @@
3435 */
3536
3637
37#define TASKSTATS_VERSION 16
38#define TASKSTATS_VERSION 17
3839#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
3940 * in linux/sched.h */
4041
......@@ -230,6 +231,16 @@ struct taskstats {
230231
231232 __u64 irq_delay_max;
232233 __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;
233244};
234245
235246
lib/libc/include/any-linux-any/linux/tcp.h+23-3
......@@ -226,6 +226,24 @@ enum tcp_ca_state {
226226#define TCPF_CA_Loss (1<<TCP_CA_Loss)
227227};
228228
229/* Values for tcpi_ecn_mode after negotiation */
230#define TCPI_ECN_MODE_DISABLED 0x0
231#define TCPI_ECN_MODE_RFC3168 0x1
232#define TCPI_ECN_MODE_ACCECN 0x2
233#define TCPI_ECN_MODE_PENDING 0x3
234
235/* Values for accecn_opt_seen */
236#define TCP_ACCECN_OPT_NOT_SEEN 0x0
237#define TCP_ACCECN_OPT_EMPTY_SEEN 0x1
238#define TCP_ACCECN_OPT_COUNTER_SEEN 0x2
239#define TCP_ACCECN_OPT_FAIL_SEEN 0x3
240
241/* Values for accecn_fail_mode */
242#define TCP_ACCECN_ACE_FAIL_SEND BIT(0)
243#define TCP_ACCECN_ACE_FAIL_RECV BIT(1)
244#define TCP_ACCECN_OPT_FAIL_SEND BIT(2)
245#define TCP_ACCECN_OPT_FAIL_RECV BIT(3)
246
229247struct tcp_info {
230248 __u8 tcpi_state;
231249 __u8 tcpi_ca_state;
......@@ -316,15 +334,17 @@ struct tcp_info {
316334 * in milliseconds, including any
317335 * unfinished recovery.
318336 */
319 __u32 tcpi_received_ce; /* # of CE marks received */
337 __u32 tcpi_received_ce; /* # of CE marked segments received */
320338 __u32 tcpi_delivered_e1_bytes; /* Accurate ECN byte counters */
321339 __u32 tcpi_delivered_e0_bytes;
322340 __u32 tcpi_delivered_ce_bytes;
323341 __u32 tcpi_received_e1_bytes;
324342 __u32 tcpi_received_e0_bytes;
325343 __u32 tcpi_received_ce_bytes;
326 __u16 tcpi_accecn_fail_mode;
327 __u16 tcpi_accecn_opt_seen;
344 __u32 tcpi_ecn_mode:2,
345 tcpi_accecn_opt_seen:2,
346 tcpi_accecn_fail_mode:4,
347 tcpi_options2:24;
328348};
329349
330350/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
lib/libc/include/any-linux-any/linux/typelimits.h created+8
......@@ -0,0 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _LINUX_TYPELIMITS_H
3#define _LINUX_TYPELIMITS_H
4
5#define __KERNEL_INT_MAX ((int)(~0U >> 1))
6#define __KERNEL_INT_MIN (-__KERNEL_INT_MAX - 1)
7
8#endif /* _LINUX_TYPELIMITS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/ublk_cmd.h+120-1
......@@ -55,7 +55,8 @@
5555 _IOWR('u', 0x15, struct ublksrv_ctrl_cmd)
5656#define UBLK_U_CMD_QUIESCE_DEV \
5757 _IOWR('u', 0x16, struct ublksrv_ctrl_cmd)
58
58#define UBLK_U_CMD_TRY_STOP_DEV \
59 _IOWR('u', 0x17, struct ublksrv_ctrl_cmd)
5960/*
6061 * 64bits are enough now, and it should be easy to extend in case of
6162 * running out of feature flags
......@@ -103,6 +104,30 @@
103104#define UBLK_U_IO_UNREGISTER_IO_BUF \
104105 _IOWR('u', 0x24, struct ublksrv_io_cmd)
105106
107/*
108 * return 0 if the command is run successfully, otherwise failure code
109 * is returned
110 */
111#define UBLK_U_IO_PREP_IO_CMDS \
112 _IOWR('u', 0x25, struct ublk_batch_io)
113/*
114 * If failure code is returned, nothing in the command buffer is handled.
115 * Otherwise, the returned value means how many bytes in command buffer
116 * are handled actually, then number of handled IOs can be calculated with
117 * `elem_bytes` for each IO. IOs in the remained bytes are not committed,
118 * userspace has to check return value for dealing with partial committing
119 * correctly.
120 */
121#define UBLK_U_IO_COMMIT_IO_CMDS \
122 _IOWR('u', 0x26, struct ublk_batch_io)
123
124/*
125 * Fetch io commands to provided buffer in multishot style,
126 * `IORING_URING_CMD_MULTISHOT` is required for this command.
127 */
128#define UBLK_U_IO_FETCH_IO_CMDS \
129 _IOWR('u', 0x27, struct ublk_batch_io)
130
106131/* only ABORT means that no re-fetch */
107132#define UBLK_IO_RES_OK 0
108133#define UBLK_IO_RES_NEED_GET_DATA 1
......@@ -134,6 +159,10 @@
134159#define UBLKSRV_IO_BUF_TOTAL_BITS (UBLK_QID_OFF + UBLK_QID_BITS)
135160#define UBLKSRV_IO_BUF_TOTAL_SIZE (1ULL << UBLKSRV_IO_BUF_TOTAL_BITS)
136161
162/* Copy to/from request integrity buffer instead of data buffer */
163#define UBLK_INTEGRITY_FLAG_OFF 62
164#define UBLKSRV_IO_INTEGRITY_FLAG (1ULL << UBLK_INTEGRITY_FLAG_OFF)
165
137166/*
138167 * ublk server can register data buffers for incoming I/O requests with a sparse
139168 * io_uring buffer table. The request buffer can then be used as the data buffer
......@@ -311,6 +340,36 @@
311340 */
312341#define UBLK_F_BUF_REG_OFF_DAEMON (1ULL << 14)
313342
343/*
344 * Support the following commands for delivering & committing io command
345 * in batch.
346 *
347 * - UBLK_U_IO_PREP_IO_CMDS
348 * - UBLK_U_IO_COMMIT_IO_CMDS
349 * - UBLK_U_IO_FETCH_IO_CMDS
350 * - UBLK_U_IO_REGISTER_IO_BUF
351 * - UBLK_U_IO_UNREGISTER_IO_BUF
352 *
353 * The existing UBLK_U_IO_FETCH_REQ, UBLK_U_IO_COMMIT_AND_FETCH_REQ and
354 * UBLK_U_IO_NEED_GET_DATA uring_cmd are not supported for this feature.
355 */
356#define UBLK_F_BATCH_IO (1ULL << 15)
357
358/*
359 * ublk device supports requests with integrity/metadata buffer.
360 * Requires UBLK_F_USER_COPY.
361 */
362#define UBLK_F_INTEGRITY (1ULL << 16)
363
364/*
365 * The device supports the UBLK_CMD_TRY_STOP_DEV command, which
366 * allows stopping the device only if there are no openers.
367 */
368#define UBLK_F_SAFE_STOP_DEV (1ULL << 17)
369
370/* Disable automatic partition scanning when device is started */
371#define UBLK_F_NO_AUTO_PART_SCAN (1ULL << 18)
372
314373/* device state */
315374#define UBLK_S_DEV_DEAD 0
316375#define UBLK_S_DEV_LIVE 1
......@@ -408,6 +467,8 @@ struct ublksrv_ctrl_dev_info {
408467 * passed in.
409468 */
410469#define UBLK_IO_F_NEED_REG_BUF (1U << 17)
470/* Request has an integrity data buffer */
471#define UBLK_IO_F_INTEGRITY (1UL << 18)
411472
412473/*
413474 * io cmd is described by this structure, and stored in share memory, indexed
......@@ -525,6 +586,51 @@ struct ublksrv_io_cmd {
525586 };
526587};
527588
589struct ublk_elem_header {
590 __u16 tag; /* IO tag */
591
592 /*
593 * Buffer index for incoming io command, only valid iff
594 * UBLK_F_AUTO_BUF_REG is set
595 */
596 __u16 buf_index;
597 __s32 result; /* I/O completion result (commit only) */
598};
599
600/*
601 * uring_cmd buffer structure for batch commands
602 *
603 * buffer includes multiple elements, which number is specified by
604 * `nr_elem`. Each element buffer is organized in the following order:
605 *
606 * struct ublk_elem_buffer {
607 * // Mandatory fields (8 bytes)
608 * struct ublk_elem_header header;
609 *
610 * // Optional fields (8 bytes each, included based on flags)
611 *
612 * // Buffer address (if UBLK_BATCH_F_HAS_BUF_ADDR) for copying data
613 * // between ublk request and ublk server buffer
614 * __u64 buf_addr;
615 *
616 * // returned Zone append LBA (if UBLK_BATCH_F_HAS_ZONE_LBA)
617 * __u64 zone_lba;
618 * }
619 *
620 * Used for `UBLK_U_IO_PREP_IO_CMDS` and `UBLK_U_IO_COMMIT_IO_CMDS`
621 */
622struct ublk_batch_io {
623 __u16 q_id;
624#define UBLK_BATCH_F_HAS_ZONE_LBA (1 << 0)
625#define UBLK_BATCH_F_HAS_BUF_ADDR (1 << 1)
626#define UBLK_BATCH_F_AUTO_BUF_REG_FALLBACK (1 << 2)
627 __u16 flags;
628 __u16 nr_elem;
629 __u8 elem_bytes;
630 __u8 reserved;
631 __u64 reserved2;
632};
633
528634struct ublk_param_basic {
529635#define UBLK_ATTR_READ_ONLY (1 << 0)
530636#define UBLK_ATTR_ROTATIONAL (1 << 1)
......@@ -600,6 +706,17 @@ struct ublk_param_segment {
600706 __u8 pad[2];
601707};
602708
709struct ublk_param_integrity {
710 __u32 flags; /* LBMD_PI_CAP_* from linux/fs.h */
711 __u16 max_integrity_segments; /* 0 means no limit */
712 __u8 interval_exp;
713 __u8 metadata_size; /* UBLK_PARAM_TYPE_INTEGRITY requires nonzero */
714 __u8 pi_offset;
715 __u8 csum_type; /* LBMD_PI_CSUM_* from linux/fs.h */
716 __u8 tag_size;
717 __u8 pad[5];
718};
719
603720struct ublk_params {
604721 /*
605722 * Total length of parameters, userspace has to set 'len' for both
......@@ -614,6 +731,7 @@ struct ublk_params {
614731#define UBLK_PARAM_TYPE_ZONED (1 << 3)
615732#define UBLK_PARAM_TYPE_DMA_ALIGN (1 << 4)
616733#define UBLK_PARAM_TYPE_SEGMENT (1 << 5)
734#define UBLK_PARAM_TYPE_INTEGRITY (1 << 6) /* requires UBLK_F_INTEGRITY */
617735 __u32 types; /* types of parameter included */
618736
619737 struct ublk_param_basic basic;
......@@ -622,6 +740,7 @@ struct ublk_params {
622740 struct ublk_param_zoned zoned;
623741 struct ublk_param_dma_align dma;
624742 struct ublk_param_segment seg;
743 struct ublk_param_integrity integrity;
625744};
626745
627746#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/v4l2-controls.h+63
......@@ -1188,6 +1188,8 @@ enum v4l2_flash_strobe_source {
11881188
11891189#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
11901190#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
1191#define V4L2_CID_FLASH_DURATION (V4L2_CID_FLASH_CLASS_BASE + 13)
1192#define V4L2_CID_FLASH_STROBE_OE (V4L2_CID_FLASH_CLASS_BASE + 14)
11911193
11921194
11931195/* JPEG-class control IDs */
......@@ -2095,6 +2097,8 @@ struct v4l2_ctrl_mpeg2_quantisation {
20952097#define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405)
20962098#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406)
20972099#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407)
2100#define V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS (V4L2_CID_CODEC_STATELESS_BASE + 408)
2101#define V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS (V4L2_CID_CODEC_STATELESS_BASE + 409)
20982102
20992103enum v4l2_stateless_hevc_decode_mode {
21002104 V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,
......@@ -2550,6 +2554,65 @@ struct v4l2_ctrl_hevc_scaling_matrix {
25502554 __u8 scaling_list_dc_coef_32x32[2];
25512555};
25522556
2557#define V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED 0x1
2558
2559/*
2560 * struct v4l2_ctrl_hevc_ext_sps_st_rps - HEVC short term RPS parameters
2561 *
2562 * Dynamic size 1-dimension array for short term RPS. The number of elements
2563 * is v4l2_ctrl_hevc_sps::num_short_term_ref_pic_sets. It can contain up to 65 elements.
2564 *
2565 * @delta_idx_minus1: Specifies the delta compare to the index. See details in section 7.4.8
2566 * "Short-term reference picture set semantics" of the specification.
2567 * @delta_rps_sign: Sign of the delta as specified in section 7.4.8 "Short-term reference picture
2568 * set semantics" of the specification.
2569 * @abs_delta_rps_minus1: Absolute delta RPS as specified in section 7.4.8 "Short-term reference
2570 * picture set semantics" of the specification.
2571 * @num_negative_pics: Number of short-term RPS entries that have picture order count values less
2572 * than the picture order count value of the current picture.
2573 * @num_positive_pics: Number of short-term RPS entries that have picture order count values
2574 * greater than the picture order count value of the current picture.
2575 * @used_by_curr_pic: Bit j specifies if short-term RPS j is used by the current picture.
2576 * @use_delta_flag: Bit j equals to 1 specifies that the j-th entry in the source candidate
2577 * short-term RPS is included in this candidate short-term RPS.
2578 * @delta_poc_s0_minus1: Specifies the negative picture order count delta for the i-th entry in
2579 * the short-term RPS. See details in section 7.4.8 "Short-term reference
2580 * picture set semantics" of the specification.
2581 * @delta_poc_s1_minus1: Specifies the positive picture order count delta for the i-th entry in
2582 * the short-term RPS. See details in section 7.4.8 "Short-term reference
2583 * picture set semantics" of the specification.
2584 * @flags: See V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_{}
2585 */
2586struct v4l2_ctrl_hevc_ext_sps_st_rps {
2587 __u8 delta_idx_minus1;
2588 __u8 delta_rps_sign;
2589 __u8 num_negative_pics;
2590 __u8 num_positive_pics;
2591 __u32 used_by_curr_pic;
2592 __u32 use_delta_flag;
2593 __u16 abs_delta_rps_minus1;
2594 __u16 delta_poc_s0_minus1[16];
2595 __u16 delta_poc_s1_minus1[16];
2596 __u16 flags;
2597};
2598
2599#define V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT 0x1
2600
2601/*
2602 * struct v4l2_ctrl_hevc_ext_sps_lt_rps - HEVC long term RPS parameters
2603 *
2604 * Dynamic size 1-dimension array for long term RPS. The number of elements
2605 * is v4l2_ctrl_hevc_sps::num_long_term_ref_pics_sps. It can contain up to 65 elements.
2606 *
2607 * @lt_ref_pic_poc_lsb_sps: picture order count modulo MaxPicOrderCntLsb of the i-th candidate
2608 * long-term reference picture.
2609 * @flags: See V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_{}
2610 */
2611struct v4l2_ctrl_hevc_ext_sps_lt_rps {
2612 __u16 lt_ref_pic_poc_lsb_sps;
2613 __u16 flags;
2614};
2615
25532616/* Stateless VP9 controls */
25542617
25552618#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1
lib/libc/include/any-linux-any/linux/vbox_vmmdev_types.h+2-2
......@@ -236,7 +236,7 @@ struct vmmdev_hgcm_function_parameter32 {
236236 /** Relative to the request header. */
237237 __u32 offset;
238238 } page_list;
239 } u;
239 } __attribute__((packed)) u;
240240} __attribute__((packed));
241241VMMDEV_ASSERT_SIZE(vmmdev_hgcm_function_parameter32, 4 + 8);
242242
......@@ -251,7 +251,7 @@ struct vmmdev_hgcm_function_parameter64 {
251251 union {
252252 __u64 phys_addr;
253253 __u64 linear_addr;
254 } u;
254 } __attribute__((packed)) u;
255255 } __attribute__((packed)) pointer;
256256 struct {
257257 /** Size of the buffer described by the page list. */
lib/libc/include/any-linux-any/linux/vduse.h+80-5
......@@ -10,6 +10,10 @@
1010
1111#define VDUSE_API_VERSION 0
1212
13/* VQ groups and ASID support */
14
15#define VDUSE_API_VERSION_1 1
16
1317/*
1418 * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).
1519 * This is used for future extension.
......@@ -27,6 +31,8 @@
2731 * @features: virtio features
2832 * @vq_num: the number of virtqueues
2933 * @vq_align: the allocation alignment of virtqueue's metadata
34 * @ngroups: number of vq groups that VDUSE device declares
35 * @nas: number of address spaces that VDUSE device declares
3036 * @reserved: for future use, needs to be initialized to zero
3137 * @config_size: the size of the configuration space
3238 * @config: the buffer of the configuration space
......@@ -41,7 +47,9 @@ struct vduse_dev_config {
4147 __u64 features;
4248 __u32 vq_num;
4349 __u32 vq_align;
44 __u32 reserved[13];
50 __u32 ngroups; /* if VDUSE_API_VERSION >= 1 */
51 __u32 nas; /* if VDUSE_API_VERSION >= 1 */
52 __u32 reserved[11];
4553 __u32 config_size;
4654 __u8 config[];
4755};
......@@ -118,14 +126,18 @@ struct vduse_config_data {
118126 * struct vduse_vq_config - basic configuration of a virtqueue
119127 * @index: virtqueue index
120128 * @max_size: the max size of virtqueue
121 * @reserved: for future use, needs to be initialized to zero
129 * @reserved1: for future use, needs to be initialized to zero
130 * @group: virtqueue group
131 * @reserved2: for future use, needs to be initialized to zero
122132 *
123133 * Structure used by VDUSE_VQ_SETUP ioctl to setup a virtqueue.
124134 */
125135struct vduse_vq_config {
126136 __u32 index;
127137 __u16 max_size;
128 __u16 reserved[13];
138 __u16 reserved1;
139 __u32 group;
140 __u16 reserved2[10];
129141};
130142
131143/*
......@@ -156,6 +168,16 @@ struct vduse_vq_state_packed {
156168 __u16 last_used_idx;
157169};
158170
171/**
172 * struct vduse_vq_group_asid - virtqueue group ASID
173 * @group: Index of the virtqueue group
174 * @asid: Address space ID of the group
175 */
176struct vduse_vq_group_asid {
177 __u32 group;
178 __u32 asid;
179};
180
159181/**
160182 * struct vduse_vq_info - information of a virtqueue
161183 * @index: virtqueue index
......@@ -215,6 +237,7 @@ struct vduse_vq_eventfd {
215237 * @uaddr: start address of userspace memory, it must be aligned to page size
216238 * @iova: start of the IOVA region
217239 * @size: size of the IOVA region
240 * @asid: Address space ID of the IOVA region
218241 * @reserved: for future use, needs to be initialized to zero
219242 *
220243 * Structure used by VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM
......@@ -224,7 +247,8 @@ struct vduse_iova_umem {
224247 __u64 uaddr;
225248 __u64 iova;
226249 __u64 size;
227 __u64 reserved[3];
250 __u32 asid;
251 __u32 reserved[5];
228252};
229253
230254/* Register userspace memory for IOVA regions */
......@@ -238,6 +262,7 @@ struct vduse_iova_umem {
238262 * @start: start of the IOVA region
239263 * @last: last of the IOVA region
240264 * @capability: capability of the IOVA region
265 * @asid: Address space ID of the IOVA region, only if device API version >= 1
241266 * @reserved: for future use, needs to be initialized to zero
242267 *
243268 * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of
......@@ -248,7 +273,8 @@ struct vduse_iova_info {
248273 __u64 last;
249274#define VDUSE_IOVA_CAP_UMEM (1 << 0)
250275 __u64 capability;
251 __u64 reserved[3];
276 __u32 asid; /* Only if device API version >= 1 */
277 __u32 reserved[5];
252278};
253279
254280/*
......@@ -257,6 +283,32 @@ struct vduse_iova_info {
257283 */
258284#define VDUSE_IOTLB_GET_INFO _IOWR(VDUSE_BASE, 0x1a, struct vduse_iova_info)
259285
286/**
287 * struct vduse_iotlb_entry_v2 - entry of IOTLB to describe one IOVA region
288 *
289 * @v1: the original vduse_iotlb_entry
290 * @asid: address space ID of the IOVA region
291 * @reserved: for future use, needs to be initialized to zero
292 *
293 * Structure used by VDUSE_IOTLB_GET_FD2 ioctl to find an overlapped IOVA region.
294 */
295struct vduse_iotlb_entry_v2 {
296 __u64 offset;
297 __u64 start;
298 __u64 last;
299 __u8 perm;
300 __u8 padding[7];
301 __u32 asid;
302 __u32 reserved[11];
303};
304
305/*
306 * Same as VDUSE_IOTLB_GET_FD but with vduse_iotlb_entry_v2 argument that
307 * support extra fields.
308 */
309#define VDUSE_IOTLB_GET_FD2 _IOWR(VDUSE_BASE, 0x1b, struct vduse_iotlb_entry_v2)
310
311
260312/* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */
261313
262314/**
......@@ -265,11 +317,14 @@ struct vduse_iova_info {
265317 * @VDUSE_SET_STATUS: set the device status
266318 * @VDUSE_UPDATE_IOTLB: Notify userspace to update the memory mapping for
267319 * specified IOVA range via VDUSE_IOTLB_GET_FD ioctl
320 * @VDUSE_SET_VQ_GROUP_ASID: Notify userspace to update the address space of a
321 * virtqueue group.
268322 */
269323enum vduse_req_type {
270324 VDUSE_GET_VQ_STATE,
271325 VDUSE_SET_STATUS,
272326 VDUSE_UPDATE_IOTLB,
327 VDUSE_SET_VQ_GROUP_ASID,
273328};
274329
275330/**
......@@ -304,6 +359,19 @@ struct vduse_iova_range {
304359 __u64 last;
305360};
306361
362/**
363 * struct vduse_iova_range_v2 - IOVA range [start, last] if API_VERSION >= 1
364 * @start: start of the IOVA range
365 * @last: last of the IOVA range
366 * @asid: address space ID of the IOVA range
367 */
368struct vduse_iova_range_v2 {
369 __u64 start;
370 __u64 last;
371 __u32 asid;
372 __u32 padding;
373};
374
307375/**
308376 * struct vduse_dev_request - control request
309377 * @type: request type
......@@ -312,6 +380,8 @@ struct vduse_iova_range {
312380 * @vq_state: virtqueue state, only index field is available
313381 * @s: device status
314382 * @iova: IOVA range for updating
383 * @iova_v2: IOVA range for updating if API_VERSION >= 1
384 * @vq_group_asid: ASID of a virtqueue group
315385 * @padding: padding
316386 *
317387 * Structure used by read(2) on /dev/vduse/$NAME.
......@@ -324,6 +394,11 @@ struct vduse_dev_request {
324394 struct vduse_vq_state vq_state;
325395 struct vduse_dev_status s;
326396 struct vduse_iova_range iova;
397 /* Following members but padding exist only if vduse api
398 * version >= 1
399 */
400 struct vduse_iova_range_v2 iova_v2;
401 struct vduse_vq_group_asid vq_group_asid;
327402 __u32 padding[32];
328403 };
329404};
lib/libc/include/any-linux-any/linux/version.h+3-3
......@@ -1,5 +1,5 @@
1#define LINUX_VERSION_CODE 398080
1#define LINUX_VERSION_CODE 458752
22#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
3#define LINUX_VERSION_MAJOR 6
4#define LINUX_VERSION_PATCHLEVEL 19
3#define LINUX_VERSION_MAJOR 7
4#define LINUX_VERSION_PATCHLEVEL 0
55#define LINUX_VERSION_SUBLEVEL 0
\ No newline at end of file
lib/libc/include/any-linux-any/linux/vfio.h+4
......@@ -964,6 +964,10 @@ struct vfio_device_bind_iommufd {
964964 * hwpt corresponding to the given pt_id.
965965 *
966966 * Return: 0 on success, -errno on failure.
967 *
968 * When a device is resetting, -EBUSY will be returned to reject any concurrent
969 * attachment to the resetting device itself or any sibling device in the IOMMU
970 * group having the resetting device.
967971 */
968972struct vfio_device_attach_iommufd_pt {
969973 __u32 argsz;
lib/libc/include/any-linux-any/linux/videodev2.h+3
......@@ -748,6 +748,7 @@ struct v4l2_pix_format {
748748#define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */
749749#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */
750750#define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */
751#define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '0', '1') /* AV1 */
751752#define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */
752753#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */
753754#define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */
......@@ -1916,6 +1917,8 @@ enum v4l2_ctrl_type {
19161917 V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS = 0x0272,
19171918 V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX = 0x0273,
19181919 V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS = 0x0274,
1920 V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS = 0x0275,
1921 V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS = 0x0276,
19191922
19201923 V4L2_CTRL_TYPE_AV1_SEQUENCE = 0x280,
19211924 V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281,
lib/libc/include/any-linux-any/linux/virtio_ring.h+1-2
......@@ -31,7 +31,6 @@
3131 * SUCH DAMAGE.
3232 *
3333 * Copyright Rusty Russell IBM Corporation 2007. */
34#include <stdint.h>
3534#include <linux/types.h>
3635#include <linux/virtio_types.h>
3736
......@@ -200,7 +199,7 @@ static __inline__ void vring_init(struct vring *vr, unsigned int num, void *p,
200199 vr->num = num;
201200 vr->desc = p;
202201 vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct vring_desc));
203 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16)
202 vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__virtio16)
204203 + align-1) & ~(align - 1));
205204}
206205
lib/libc/include/any-linux-any/linux/vmclock-abi.h+20
......@@ -115,6 +115,17 @@ struct vmclock_abi {
115115 * bit again after the update, using the about-to-be-valid fields.
116116 */
117117#define VMCLOCK_FLAG_TIME_MONOTONIC (1 << 7)
118 /*
119 * If the VM_GEN_COUNTER_PRESENT flag is set, the hypervisor will
120 * bump the vm_generation_counter field every time the guest is
121 * loaded from some save state (restored from a snapshot).
122 */
123#define VMCLOCK_FLAG_VM_GEN_COUNTER_PRESENT (1 << 8)
124 /*
125 * If the NOTIFICATION_PRESENT flag is set, the hypervisor will send
126 * a notification every time it updates seq_count to a new even number.
127 */
128#define VMCLOCK_FLAG_NOTIFICATION_PRESENT (1 << 9)
118129
119130 __u8 pad[2];
120131 __u8 clock_status;
......@@ -177,6 +188,15 @@ struct vmclock_abi {
177188 __le64 time_frac_sec; /* Units of 1/2^64 of a second */
178189 __le64 time_esterror_nanosec;
179190 __le64 time_maxerror_nanosec;
191
192 /*
193 * This field changes to another non-repeating value when the guest
194 * has been loaded from a snapshot. In addition to handling a
195 * disruption in time (which will also be signalled through the
196 * disruption_marker field), a guest may wish to discard UUIDs,
197 * reset network connections, reseed entropy, etc.
198 */
199 __le64 vm_generation_counter;
180200};
181201
182202#endif /* __VMCLOCK_ABI_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/bnxt_re-abi.h+16
......@@ -56,6 +56,7 @@ enum {
5656 BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL,
5757 BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,
5858 BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,
59 BNXT_RE_UCNTX_CMASK_QP_RATE_LIMIT_ENABLED = 0x80ULL,
5960};
6061
6162enum bnxt_re_wqe_mode {
......@@ -215,4 +216,19 @@ enum bnxt_re_toggle_mem_methods {
215216 BNXT_RE_METHOD_GET_TOGGLE_MEM = (1U << UVERBS_ID_NS_SHIFT),
216217 BNXT_RE_METHOD_RELEASE_TOGGLE_MEM,
217218};
219
220struct bnxt_re_packet_pacing_caps {
221 __u32 qp_rate_limit_min;
222 __u32 qp_rate_limit_max; /* In kbps */
223 /* Corresponding bit will be set if qp type from
224 * 'enum ib_qp_type' is supported, e.g.
225 * supported_qpts |= 1 << IB_QPT_RC
226 */
227 __u32 supported_qpts;
228 __u32 reserved;
229};
230
231struct bnxt_re_query_device_ex_resp {
232 struct bnxt_re_packet_pacing_caps packet_pacing_caps;
233};
218234#endif /* __BNXT_RE_UVERBS_ABI_H__*/
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h+16
......@@ -56,6 +56,7 @@ enum uverbs_default_objects {
5656 UVERBS_OBJECT_COUNTERS,
5757 UVERBS_OBJECT_ASYNC_EVENT,
5858 UVERBS_OBJECT_DMAH,
59 UVERBS_OBJECT_DMABUF,
5960};
6061
6162enum {
......@@ -73,6 +74,7 @@ enum uverbs_methods_device {
7374 UVERBS_METHOD_QUERY_CONTEXT,
7475 UVERBS_METHOD_QUERY_GID_TABLE,
7576 UVERBS_METHOD_QUERY_GID_ENTRY,
77 UVERBS_METHOD_QUERY_PORT_SPEED,
7678};
7779
7880enum uverbs_attrs_invoke_write_cmd_attr_ids {
......@@ -86,6 +88,11 @@ enum uverbs_attrs_query_port_cmd_attr_ids {
8688 UVERBS_ATTR_QUERY_PORT_RESP,
8789};
8890
91enum uverbs_attrs_query_port_speed_cmd_attr_ids {
92 UVERBS_ATTR_QUERY_PORT_SPEED_PORT_NUM,
93 UVERBS_ATTR_QUERY_PORT_SPEED_RESP,
94};
95
8996enum uverbs_attrs_get_context_attr_ids {
9097 UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,
9198 UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,
......@@ -257,6 +264,15 @@ enum uverbs_methods_dmah {
257264 UVERBS_METHOD_DMAH_FREE,
258265};
259266
267enum uverbs_attrs_alloc_dmabuf_cmd_attr_ids {
268 UVERBS_ATTR_ALLOC_DMABUF_HANDLE,
269 UVERBS_ATTR_ALLOC_DMABUF_PGOFF,
270};
271
272enum uverbs_methods_dmabuf {
273 UVERBS_METHOD_DMABUF_ALLOC,
274};
275
260276enum uverbs_attrs_reg_dm_mr_cmd_attr_ids {
261277 UVERBS_ATTR_REG_DM_MR_HANDLE,
262278 UVERBS_ATTR_REG_DM_MR_OFFSET,
lib/libc/include/any-linux-any/rdma/mana-abi.h+3
......@@ -17,6 +17,9 @@
1717#define MANA_IB_UVERBS_ABI_VERSION 1
1818
1919enum mana_ib_create_cq_flags {
20 /* Reserved for backward compatibility. Legacy
21 * kernel versions use it to create CQs in RNIC
22 */
2023 MANA_IB_CREATE_RNIC_CQ = 1 << 0,
2124};
2225
lib/libc/include/any-linux-any/scsi/scsi_bsg_ufs.h+8-9
......@@ -94,16 +94,15 @@ struct utp_upiu_header {
9494};
9595
9696/**
97 * struct utp_upiu_query - upiu request buffer structure for
98 * query request.
99 * @opcode: command to perform B-0
100 * @idn: a value that indicates the particular type of data B-1
101 * @index: Index to further identify data B-2
102 * @selector: Index to further identify data B-3
97 * struct utp_upiu_query - QUERY REQUEST UPIU structure.
98 * @opcode: query function to perform B-0
99 * @idn: descriptor or attribute identification number B-1
100 * @index: Index that further identifies which data to access B-2
101 * @selector: Index that further identifies which data to access B-3
103102 * @reserved_osf: spec reserved field B-4,5
104 * @length: number of descriptor bytes to read/write B-6,7
105 * @value: Attribute value to be written DW-5
106 * @reserved: spec reserved DW-6,7
103 * @length: number of descriptor bytes to read or write B-6,7
104 * @value: if @opcode == UPIU_QUERY_OPCODE_WRITE_ATTR, the value to be written B-6,7
105 * @reserved: reserved for future use DW-6,7
107106 */
108107struct utp_upiu_query {
109108 __u8 opcode;
lib/libc/include/any-linux-any/sound/sof/tokens.h+6
......@@ -56,6 +56,9 @@
5656#define SOF_TKN_SCHED_LP_MODE 207
5757#define SOF_TKN_SCHED_MEM_USAGE 208
5858#define SOF_TKN_SCHED_USE_CHAIN_DMA 209
59#define SOF_TKN_SCHED_KCPS 210
60#define SOF_TKN_SCHED_DIRECTION 211
61#define SOF_TKN_SCHED_DIRECTION_VALID 212
5962
6063/* volume */
6164#define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250
......@@ -107,6 +110,9 @@
107110#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417
108111
109112#define SOF_TKN_COMP_SCHED_DOMAIN 418
113#define SOF_TKN_COMP_DOMAIN_ID 419
114#define SOF_TKN_COMP_HEAP_BYTES_REQUIREMENT 420
115#define SOF_TKN_COMP_STACK_BYTES_REQUIREMENT 421
110116
111117/* SSP */
112118#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
lib/libc/include/arc-linux-any/asm/swab.h-63
......@@ -19,9 +19,6 @@
1919
2020#include <linux/types.h>
2121
22/* Native single cycle endian swap insn */
23#ifdef CONFIG_ARC_HAS_SWAPE
24
2522#define __arch_swab32(x) \
2623({ \
2724 unsigned int tmp = x; \
......@@ -32,66 +29,6 @@
3229 tmp; \
3330})
3431
35#else
36
37/* Several ways of Endian-Swap Emulation for ARC
38 * 0: kernel generic
39 * 1: ARC optimised "C"
40 * 2: ARC Custom instruction
41 */
42#define ARC_BSWAP_TYPE 1
43
44#if (ARC_BSWAP_TYPE == 1) /******* Software only ********/
45
46/* The kernel default implementation of htonl is
47 * return x<<24 | x>>24 |
48 * (x & (__u32)0x0000ff00UL)<<8 | (x & (__u32)0x00ff0000UL)>>8;
49 *
50 * This generates 9 instructions on ARC (excluding the ld/st)
51 *
52 * 8051fd8c: ld r3,[r7,20] ; Mem op : Get the value to be swapped
53 * 8051fd98: asl r5,r3,24 ; get 3rd Byte
54 * 8051fd9c: lsr r2,r3,24 ; get 0th Byte
55 * 8051fda0: and r4,r3,0xff00
56 * 8051fda8: asl r4,r4,8 ; get 1st Byte
57 * 8051fdac: and r3,r3,0x00ff0000
58 * 8051fdb4: or r2,r2,r5 ; combine 0th and 3rd Bytes
59 * 8051fdb8: lsr r3,r3,8 ; 2nd Byte at correct place in Dst Reg
60 * 8051fdbc: or r2,r2,r4 ; combine 0,3 Bytes with 1st Byte
61 * 8051fdc0: or r2,r2,r3 ; combine 0,3,1 Bytes with 2nd Byte
62 * 8051fdc4: st r2,[r1,20] ; Mem op : save result back to mem
63 *
64 * Joern suggested a better "C" algorithm which is great since
65 * (1) It is portable to any architecture
66 * (2) At the same time it takes advantage of ARC ISA (rotate intrns)
67 */
68
69#define __arch_swab32(x) \
70({ unsigned long __in = (x), __tmp; \
71 __tmp = __in << 8 | __in >> 24; /* ror tmp,in,24 */ \
72 __in = __in << 24 | __in >> 8; /* ror in,in,8 */ \
73 __tmp ^= __in; \
74 __tmp &= 0xff00ff; \
75 __tmp ^ __in; \
76})
77
78#elif (ARC_BSWAP_TYPE == 2) /* Custom single cycle bswap instruction */
79
80#define __arch_swab32(x) \
81({ \
82 unsigned int tmp = x; \
83 __asm__( \
84 " .extInstruction bswap, 7, 0x00, SUFFIX_NONE, SYNTAX_2OP \n"\
85 " bswap %0, %1 \n"\
86 : "=r" (tmp) \
87 : "r" (tmp)); \
88 tmp; \
89})
90
91#endif /* ARC_BSWAP_TYPE=zzz */
92
93#endif /* CONFIG_ARC_HAS_SWAPE */
94
9532#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
9633#define __SWAB_64_THRU_32__
9734#endif
lib/libc/include/arc-linux-any/asm/unistd_32.h+1
......@@ -351,6 +351,7 @@
351351#define __NR_file_getattr 468
352352#define __NR_file_setattr 469
353353#define __NR_listns 470
354#define __NR_rseq_slice_yield 471
354355
355356
356357#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/arm-linux-any/asm/ptrace.h-9
......@@ -89,15 +89,6 @@
8989#define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */
9090#define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */
9191
92/*
93 * Default endianness state
94 */
95#ifdef CONFIG_CPU_ENDIAN_BE8
96#define PSR_ENDSTATE PSR_E_BIT
97#else
98#define PSR_ENDSTATE 0
99#endif
100
10192/*
10293 * These are 'magic' values for PTRACE_PEEKUSR that return info about where a
10394 * process is located in memory.
lib/libc/include/arm-linux-any/asm/unistd-eabi.h+1
......@@ -424,5 +424,6 @@
424424#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)
425425#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
426426#define __NR_listns (__NR_SYSCALL_BASE + 470)
427#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
427428
428429#endif /* _ASM_UNISTD_EABI_H */
\ No newline at end of file
lib/libc/include/arm-linux-any/asm/unistd-oabi.h+1
......@@ -436,5 +436,6 @@
436436#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)
437437#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
438438#define __NR_listns (__NR_SYSCALL_BASE + 470)
439#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
439440
440441#endif /* _ASM_UNISTD_OABI_H */
\ No newline at end of file
lib/libc/include/csky-linux-any/asm/unistd_32.h+1
......@@ -347,6 +347,7 @@
347347#define __NR_file_getattr 468
348348#define __NR_file_setattr 469
349349#define __NR_listns 470
350#define __NR_rseq_slice_yield 471
350351
351352
352353#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/hexagon-linux-any/asm/signal.h deleted-29
......@@ -1,29 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 and
7 * only version 2 as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301, USA.
18 */
19
20#ifndef _ASM_SIGNAL_H
21#define _ASM_SIGNAL_H
22
23extern unsigned long __rt_sigtramp_template[2];
24
25void do_signal(struct pt_regs *regs);
26
27#include <asm-generic/signal.h>
28
29#endif
\ No newline at end of file
lib/libc/include/hexagon-linux-any/asm/unistd_32.h+1
......@@ -346,6 +346,7 @@
346346#define __NR_file_getattr 468
347347#define __NR_file_setattr 469
348348#define __NR_listns 470
349#define __NR_rseq_slice_yield 471
349350
350351
351352#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/hwcap.h+1
......@@ -18,5 +18,6 @@
1818#define HWCAP_LOONGARCH_LBT_MIPS (1 << 12)
1919#define HWCAP_LOONGARCH_PTW (1 << 13)
2020#define HWCAP_LOONGARCH_LSPW (1 << 14)
21#define HWCAP_LOONGARCH_SCQ (1 << 15)
2122
2223#endif /* _ASM_HWCAP_H */
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/kvm.h+1
......@@ -105,6 +105,7 @@ struct kvm_fpu {
105105#define KVM_LOONGARCH_VM_FEAT_PV_STEALTIME 7
106106#define KVM_LOONGARCH_VM_FEAT_PTW 8
107107#define KVM_LOONGARCH_VM_FEAT_MSGINT 9
108#define KVM_LOONGARCH_VM_FEAT_PV_PREEMPT 10
108109
109110/* Device Control API on vcpu fd */
110111#define KVM_LOONGARCH_VCPU_CPUCFG 0
lib/libc/include/loongarch-linux-any/asm/kvm_para.h+1
......@@ -15,6 +15,7 @@
1515#define CPUCFG_KVM_FEATURE (CPUCFG_KVM_BASE + 4)
1616#define KVM_FEATURE_IPI 1
1717#define KVM_FEATURE_STEAL_TIME 2
18#define KVM_FEATURE_PREEMPT 3
1819/* BIT 24 - 31 are features configurable by user space vmm */
1920#define KVM_FEATURE_VIRT_EXTIOI 24
2021#define KVM_FEATURE_USER_HCALL 25
lib/libc/include/loongarch-linux-any/asm/unistd_32.h+2
......@@ -292,6 +292,7 @@
292292#define __NR_landlock_create_ruleset 444
293293#define __NR_landlock_add_rule 445
294294#define __NR_landlock_restrict_self 446
295#define __NR_memfd_secret 447
295296#define __NR_process_mrelease 448
296297#define __NR_futex_waitv 449
297298#define __NR_set_mempolicy_home_node 450
......@@ -315,6 +316,7 @@
315316#define __NR_file_getattr 468
316317#define __NR_file_setattr 469
317318#define __NR_listns 470
319#define __NR_rseq_slice_yield 471
318320
319321
320322#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/unistd_64.h+2
......@@ -300,6 +300,7 @@
300300#define __NR_landlock_create_ruleset 444
301301#define __NR_landlock_add_rule 445
302302#define __NR_landlock_restrict_self 446
303#define __NR_memfd_secret 447
303304#define __NR_process_mrelease 448
304305#define __NR_futex_waitv 449
305306#define __NR_set_mempolicy_home_node 450
......@@ -323,6 +324,7 @@
323324#define __NR_file_getattr 468
324325#define __NR_file_setattr 469
325326#define __NR_listns 470
327#define __NR_rseq_slice_yield 471
326328
327329
328330#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/m68k-linux-any/asm/unistd_32.h+1
......@@ -443,6 +443,7 @@
443443#define __NR_file_getattr 468
444444#define __NR_file_setattr 469
445445#define __NR_listns 470
446#define __NR_rseq_slice_yield 471
446447
447448
448449#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/errno.h+2
......@@ -50,6 +50,7 @@
5050#define EDOTDOT 73 /* RFS specific error */
5151#define EMULTIHOP 74 /* Multihop attempted */
5252#define EBADMSG 77 /* Not a data message */
53#define EFSBADCRC EBADMSG /* Bad CRC detected */
5354#define ENAMETOOLONG 78 /* File name too long */
5455#define EOVERFLOW 79 /* Value too large for defined data type */
5556#define ENOTUNIQ 80 /* Name not unique on network */
......@@ -88,6 +89,7 @@
8889#define EISCONN 133 /* Transport endpoint is already connected */
8990#define ENOTCONN 134 /* Transport endpoint is not connected */
9091#define EUCLEAN 135 /* Structure needs cleaning */
92#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
9193#define ENOTNAM 137 /* Not a XENIX named type file */
9294#define ENAVAIL 138 /* No XENIX semaphores available */
9395#define EISNAM 139 /* Is a named type file */
lib/libc/include/mips-linux-any/asm/unistd_n32.h+1
......@@ -399,5 +399,6 @@
399399#define __NR_file_getattr (__NR_Linux + 468)
400400#define __NR_file_setattr (__NR_Linux + 469)
401401#define __NR_listns (__NR_Linux + 470)
402#define __NR_rseq_slice_yield (__NR_Linux + 471)
402403
403404#endif /* _ASM_UNISTD_N32_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/unistd_n64.h+1
......@@ -375,5 +375,6 @@
375375#define __NR_file_getattr (__NR_Linux + 468)
376376#define __NR_file_setattr (__NR_Linux + 469)
377377#define __NR_listns (__NR_Linux + 470)
378#define __NR_rseq_slice_yield (__NR_Linux + 471)
378379
379380#endif /* _ASM_UNISTD_N64_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/unistd_o32.h+1
......@@ -445,5 +445,6 @@
445445#define __NR_file_getattr (__NR_Linux + 468)
446446#define __NR_file_setattr (__NR_Linux + 469)
447447#define __NR_listns (__NR_Linux + 470)
448#define __NR_rseq_slice_yield (__NR_Linux + 471)
448449
449450#endif /* _ASM_UNISTD_O32_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/unistd_32.h+1
......@@ -452,6 +452,7 @@
452452#define __NR_file_getattr 468
453453#define __NR_file_setattr 469
454454#define __NR_listns 470
455#define __NR_rseq_slice_yield 471
455456
456457
457458#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/unistd_64.h+1
......@@ -424,6 +424,7 @@
424424#define __NR_file_getattr 468
425425#define __NR_file_setattr 469
426426#define __NR_listns 470
427#define __NR_rseq_slice_yield 471
427428
428429
429430#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/hwprobe.h+4
......@@ -86,6 +86,7 @@ struct riscv_hwprobe {
8686#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)
8787#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)
8888#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)
89#define RISCV_HWPROBE_EXT_ZICFILP (1ULL << 63)
8990
9091#define RISCV_HWPROBE_KEY_CPUPERF_0 5
9192#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
......@@ -113,6 +114,9 @@ struct riscv_hwprobe {
113114#define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 13
114115#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14
115116#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15
117#define RISCV_HWPROBE_KEY_IMA_EXT_1 16
118#define RISCV_HWPROBE_EXT_ZICFISS (1ULL << 0)
119
116120/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
117121
118122/* Flags */
lib/libc/include/riscv-linux-any/asm/kvm.h+3
......@@ -192,6 +192,9 @@ enum KVM_RISCV_ISA_EXT_ID {
192192 KVM_RISCV_ISA_EXT_ZFBFMIN,
193193 KVM_RISCV_ISA_EXT_ZVFBFMIN,
194194 KVM_RISCV_ISA_EXT_ZVFBFWMA,
195 KVM_RISCV_ISA_EXT_ZCLSD,
196 KVM_RISCV_ISA_EXT_ZILSD,
197 KVM_RISCV_ISA_EXT_ZALASR,
195198 KVM_RISCV_ISA_EXT_MAX,
196199};
197200
lib/libc/include/riscv-linux-any/asm/ptrace.h+37
......@@ -9,6 +9,7 @@
99#ifndef __ASSEMBLER__
1010
1111#include <linux/types.h>
12#include <linux/const.h>
1213
1314#define PTRACE_GETFDPIC 33
1415
......@@ -127,6 +128,42 @@ struct __riscv_v_regset_state {
127128 */
128129#define RISCV_MAX_VLENB (8192)
129130
131struct __sc_riscv_cfi_state {
132 unsigned long ss_ptr; /* shadow stack pointer */
133};
134
135#define PTRACE_CFI_BRANCH_LANDING_PAD_EN_BIT 0
136#define PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_BIT 1
137#define PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_BIT 2
138#define PTRACE_CFI_SHADOW_STACK_EN_BIT 3
139#define PTRACE_CFI_SHADOW_STACK_LOCK_BIT 4
140#define PTRACE_CFI_SHADOW_STACK_PTR_BIT 5
141
142#define PTRACE_CFI_BRANCH_LANDING_PAD_EN_STATE _BITUL(PTRACE_CFI_BRANCH_LANDING_PAD_EN_BIT)
143#define PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_STATE \
144 _BITUL(PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_BIT)
145#define PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_STATE \
146 _BITUL(PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_BIT)
147#define PTRACE_CFI_SHADOW_STACK_EN_STATE _BITUL(PTRACE_CFI_SHADOW_STACK_EN_BIT)
148#define PTRACE_CFI_SHADOW_STACK_LOCK_STATE _BITUL(PTRACE_CFI_SHADOW_STACK_LOCK_BIT)
149#define PTRACE_CFI_SHADOW_STACK_PTR_STATE _BITUL(PTRACE_CFI_SHADOW_STACK_PTR_BIT)
150
151#define PTRACE_CFI_STATE_INVALID_MASK ~(PTRACE_CFI_BRANCH_LANDING_PAD_EN_STATE | \
152 PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_STATE | \
153 PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_STATE | \
154 PTRACE_CFI_SHADOW_STACK_EN_STATE | \
155 PTRACE_CFI_SHADOW_STACK_LOCK_STATE | \
156 PTRACE_CFI_SHADOW_STACK_PTR_STATE)
157
158struct __cfi_status {
159 __u64 cfi_state;
160};
161
162struct user_cfi_state {
163 struct __cfi_status cfi_status;
164 __u64 shstk_ptr;
165};
166
130167#endif /* __ASSEMBLER__ */
131168
132169#endif /* _ASM_RISCV_PTRACE_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/sigcontext.h+1
......@@ -10,6 +10,7 @@
1010
1111/* The Magic number for signal context frame header. */
1212#define RISCV_V_MAGIC 0x53465457
13#define RISCV_ZICFISS_MAGIC 0x9487
1314#define END_MAGIC 0x0
1415
1516/* The size of END signal context header. */
lib/libc/include/riscv-linux-any/asm/unistd_32.h+1
......@@ -318,6 +318,7 @@
318318#define __NR_file_getattr 468
319319#define __NR_file_setattr 469
320320#define __NR_listns 470
321#define __NR_rseq_slice_yield 471
321322
322323
323324#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/unistd_64.h+1
......@@ -328,6 +328,7 @@
328328#define __NR_file_getattr 468
329329#define __NR_file_setattr 469
330330#define __NR_listns 470
331#define __NR_rseq_slice_yield 471
331332
332333
333334#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/s390x-linux-any/asm/tape390.h deleted-103
......@@ -1,103 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*************************************************************************
3 *
4 * enables user programs to display messages and control encryption
5 * on s390 tape devices
6 *
7 * Copyright IBM Corp. 2001, 2006
8 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
9 *
10 *************************************************************************/
11
12#ifndef _TAPE390_H
13#define _TAPE390_H
14
15#define TAPE390_DISPLAY _IOW('d', 1, struct display_struct)
16
17/*
18 * The TAPE390_DISPLAY ioctl calls the Load Display command
19 * which transfers 17 bytes of data from the channel to the subsystem:
20 * - 1 format control byte, and
21 * - two 8-byte messages
22 *
23 * Format control byte:
24 * 0-2: New Message Overlay
25 * 3: Alternate Messages
26 * 4: Blink Message
27 * 5: Display Low/High Message
28 * 6: Reserved
29 * 7: Automatic Load Request
30 *
31 */
32
33typedef struct display_struct {
34 char cntrl;
35 char message1[8];
36 char message2[8];
37} display_struct;
38
39/*
40 * Tape encryption support
41 */
42
43struct tape390_crypt_info {
44 char capability;
45 char status;
46 char medium_status;
47} __attribute__ ((packed));
48
49
50/* Macros for "capable" field */
51#define TAPE390_CRYPT_SUPPORTED_MASK 0x01
52#define TAPE390_CRYPT_SUPPORTED(x) \
53 ((x.capability & TAPE390_CRYPT_SUPPORTED_MASK))
54
55/* Macros for "status" field */
56#define TAPE390_CRYPT_ON_MASK 0x01
57#define TAPE390_CRYPT_ON(x) (((x.status) & TAPE390_CRYPT_ON_MASK))
58
59/* Macros for "medium status" field */
60#define TAPE390_MEDIUM_LOADED_MASK 0x01
61#define TAPE390_MEDIUM_ENCRYPTED_MASK 0x02
62#define TAPE390_MEDIUM_ENCRYPTED(x) \
63 (((x.medium_status) & TAPE390_MEDIUM_ENCRYPTED_MASK))
64#define TAPE390_MEDIUM_LOADED(x) \
65 (((x.medium_status) & TAPE390_MEDIUM_LOADED_MASK))
66
67/*
68 * The TAPE390_CRYPT_SET ioctl is used to switch on/off encryption.
69 * The "encryption_capable" and "tape_status" fields are ignored for this ioctl!
70 */
71#define TAPE390_CRYPT_SET _IOW('d', 2, struct tape390_crypt_info)
72
73/*
74 * The TAPE390_CRYPT_QUERY ioctl is used to query the encryption state.
75 */
76#define TAPE390_CRYPT_QUERY _IOR('d', 3, struct tape390_crypt_info)
77
78/* Values for "kekl1/2_type" and "kekl1/2_type_on_tape" fields */
79#define TAPE390_KEKL_TYPE_NONE 0
80#define TAPE390_KEKL_TYPE_LABEL 1
81#define TAPE390_KEKL_TYPE_HASH 2
82
83struct tape390_kekl {
84 unsigned char type;
85 unsigned char type_on_tape;
86 char label[65];
87} __attribute__ ((packed));
88
89struct tape390_kekl_pair {
90 struct tape390_kekl kekl[2];
91} __attribute__ ((packed));
92
93/*
94 * The TAPE390_KEKL_SET ioctl is used to set Key Encrypting Key labels.
95 */
96#define TAPE390_KEKL_SET _IOW('d', 4, struct tape390_kekl_pair)
97
98/*
99 * The TAPE390_KEKL_QUERY ioctl is used to query Key Encrypting Key labels.
100 */
101#define TAPE390_KEKL_QUERY _IOR('d', 5, struct tape390_kekl_pair)
102
103#endif
\ No newline at end of file
lib/libc/include/s390x-linux-any/asm/unistd_64.h+1
......@@ -390,6 +390,7 @@
390390#define __NR_file_getattr 468
391391#define __NR_file_setattr 469
392392#define __NR_listns 470
393#define __NR_rseq_slice_yield 471
393394
394395
395396#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/errno.h+2
......@@ -48,6 +48,7 @@
4848#define ENOSR 74 /* Out of streams resources */
4949#define ENOMSG 75 /* No message of desired type */
5050#define EBADMSG 76 /* Not a data message */
51#define EFSBADCRC EBADMSG /* Bad CRC detected */
5152#define EIDRM 77 /* Identifier removed */
5253#define EDEADLK 78 /* Resource deadlock would occur */
5354#define ENOLCK 79 /* No record locks available */
......@@ -91,6 +92,7 @@
9192#define ENOTUNIQ 115 /* Name not unique on network */
9293#define ERESTART 116 /* Interrupted syscall should be restarted */
9394#define EUCLEAN 117 /* Structure needs cleaning */
95#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
9496#define ENOTNAM 118 /* Not a XENIX named type file */
9597#define ENAVAIL 119 /* No XENIX semaphores available */
9698#define EISNAM 120 /* Is a named type file */
lib/libc/include/sparc-linux-any/asm/ioctls.h+4-4
......@@ -5,10 +5,10 @@
55#include <asm/ioctl.h>
66
77/* Big T */
8#define TCGETA _IOR('T', 1, struct termio)
9#define TCSETA _IOW('T', 2, struct termio)
10#define TCSETAW _IOW('T', 3, struct termio)
11#define TCSETAF _IOW('T', 4, struct termio)
8#define TCGETA 0x40125401 /* _IOR('T', 1, struct termio) */
9#define TCSETA 0x80125402 /* _IOW('T', 2, struct termio) */
10#define TCSETAW 0x80125403 /* _IOW('T', 3, struct termio) */
11#define TCSETAF 0x80125404 /* _IOW('T', 4, struct termio) */
1212#define TCSBRK _IO('T', 5)
1313#define TCXONC _IO('T', 6)
1414#define TCFLSH _IO('T', 7)
lib/libc/include/sparc-linux-any/asm/unistd_32.h+2
......@@ -406,6 +406,7 @@
406406#define __NR_fsmount 432
407407#define __NR_fspick 433
408408#define __NR_pidfd_open 434
409#define __NR_clone3 435
409410#define __NR_close_range 436
410411#define __NR_openat2 437
411412#define __NR_pidfd_getfd 438
......@@ -440,6 +441,7 @@
440441#define __NR_file_getattr 468
441442#define __NR_file_setattr 469
442443#define __NR_listns 470
444#define __NR_rseq_slice_yield 471
443445
444446
445447#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/unistd_64.h+2
......@@ -369,6 +369,7 @@
369369#define __NR_fsmount 432
370370#define __NR_fspick 433
371371#define __NR_pidfd_open 434
372#define __NR_clone3 435
372373#define __NR_close_range 436
373374#define __NR_openat2 437
374375#define __NR_pidfd_getfd 438
......@@ -403,6 +404,7 @@
403404#define __NR_file_getattr 468
404405#define __NR_file_setattr 469
405406#define __NR_listns 470
407#define __NR_rseq_slice_yield 471
406408
407409
408410#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/auxvec.h-4
......@@ -11,10 +11,6 @@
1111#define AT_SYSINFO_EHDR 33
1212
1313/* entries in ARCH_DLINFO: */
14#if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64)
15# define AT_VECTOR_SIZE_ARCH 3
16#else /* else it's non-compat x86-64 */
1714# define AT_VECTOR_SIZE_ARCH 2
18#endif
1915
2016#endif /* _ASM_X86_AUXVEC_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/kvm.h+13-8
......@@ -197,13 +197,13 @@ struct kvm_msrs {
197197 __u32 nmsrs; /* number of msrs in entries */
198198 __u32 pad;
199199
200 struct kvm_msr_entry entries[];
200 __DECLARE_FLEX_ARRAY(struct kvm_msr_entry, entries);
201201};
202202
203203/* for KVM_GET_MSR_INDEX_LIST */
204204struct kvm_msr_list {
205205 __u32 nmsrs; /* number of msrs in entries */
206 __u32 indices[];
206 __DECLARE_FLEX_ARRAY(__u32, indices);
207207};
208208
209209/* Maximum size of any access bitmap in bytes */
......@@ -243,7 +243,7 @@ struct kvm_cpuid_entry {
243243struct kvm_cpuid {
244244 __u32 nent;
245245 __u32 padding;
246 struct kvm_cpuid_entry entries[];
246 __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry, entries);
247247};
248248
249249struct kvm_cpuid_entry2 {
......@@ -265,7 +265,7 @@ struct kvm_cpuid_entry2 {
265265struct kvm_cpuid2 {
266266 __u32 nent;
267267 __u32 padding;
268 struct kvm_cpuid_entry2 entries[];
268 __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry2, entries);
269269};
270270
271271/* for KVM_GET_PIT and KVM_SET_PIT */
......@@ -396,7 +396,7 @@ struct kvm_xsave {
396396 * the contents of CPUID leaf 0xD on the host.
397397 */
398398 __u32 region[1024];
399 __u32 extra[];
399 __DECLARE_FLEX_ARRAY(__u32, extra);
400400};
401401
402402#define KVM_MAX_XCRS 16
......@@ -474,6 +474,7 @@ struct kvm_sync_regs {
474474#define KVM_X86_QUIRK_SLOT_ZAP_ALL (1 << 7)
475475#define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8)
476476#define KVM_X86_QUIRK_IGNORE_GUEST_PAT (1 << 9)
477#define KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM (1 << 10)
477478
478479#define KVM_STATE_NESTED_FORMAT_VMX 0
479480#define KVM_STATE_NESTED_FORMAT_SVM 1
......@@ -501,6 +502,7 @@ struct kvm_sync_regs {
501502#define KVM_X86_GRP_SEV 1
502503# define KVM_X86_SEV_VMSA_FEATURES 0
503504# define KVM_X86_SNP_POLICY_BITS 1
505# define KVM_X86_SEV_SNP_REQ_CERTS 2
504506
505507struct kvm_vmx_nested_state_data {
506508 __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
......@@ -562,7 +564,7 @@ struct kvm_pmu_event_filter {
562564 __u32 fixed_counter_bitmap;
563565 __u32 flags;
564566 __u32 pad[4];
565 __u64 events[];
567 __DECLARE_FLEX_ARRAY(__u64, events);
566568};
567569
568570#define KVM_PMU_EVENT_ALLOW 0
......@@ -741,6 +743,7 @@ enum sev_cmd_id {
741743 KVM_SEV_SNP_LAUNCH_START = 100,
742744 KVM_SEV_SNP_LAUNCH_UPDATE,
743745 KVM_SEV_SNP_LAUNCH_FINISH,
746 KVM_SEV_SNP_ENABLE_REQ_CERTS,
744747
745748 KVM_SEV_NR_MAX,
746749};
......@@ -912,8 +915,10 @@ struct kvm_sev_snp_launch_finish {
912915 __u64 pad1[4];
913916};
914917
915#define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0)
916#define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1)
918#define KVM_X2APIC_API_USE_32BIT_IDS _BITULL(0)
919#define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK _BITULL(1)
920#define KVM_X2APIC_ENABLE_SUPPRESS_EOI_BROADCAST _BITULL(2)
921#define KVM_X2APIC_DISABLE_SUPPRESS_EOI_BROADCAST _BITULL(3)
917922
918923struct kvm_hyperv_eventfd {
919924 __u32 conn_id;
lib/libc/include/x86-linux-any/asm/svm.h+16-16
......@@ -103,38 +103,38 @@
103103#define SVM_EXIT_VMGEXIT 0x403
104104
105105/* SEV-ES software-defined VMGEXIT events */
106#define SVM_VMGEXIT_MMIO_READ 0x80000001
107#define SVM_VMGEXIT_MMIO_WRITE 0x80000002
108#define SVM_VMGEXIT_NMI_COMPLETE 0x80000003
109#define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004
110#define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005
106#define SVM_VMGEXIT_MMIO_READ 0x80000001ull
107#define SVM_VMGEXIT_MMIO_WRITE 0x80000002ull
108#define SVM_VMGEXIT_NMI_COMPLETE 0x80000003ull
109#define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004ull
110#define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005ull
111111#define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0
112112#define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1
113#define SVM_VMGEXIT_PSC 0x80000010
114#define SVM_VMGEXIT_GUEST_REQUEST 0x80000011
115#define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012
116#define SVM_VMGEXIT_AP_CREATION 0x80000013
113#define SVM_VMGEXIT_PSC 0x80000010ull
114#define SVM_VMGEXIT_GUEST_REQUEST 0x80000011ull
115#define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012ull
116#define SVM_VMGEXIT_AP_CREATION 0x80000013ull
117117#define SVM_VMGEXIT_AP_CREATE_ON_INIT 0
118118#define SVM_VMGEXIT_AP_CREATE 1
119119#define SVM_VMGEXIT_AP_DESTROY 2
120#define SVM_VMGEXIT_SNP_RUN_VMPL 0x80000018
121#define SVM_VMGEXIT_SAVIC 0x8000001a
120#define SVM_VMGEXIT_SNP_RUN_VMPL 0x80000018ull
121#define SVM_VMGEXIT_SAVIC 0x8000001aull
122122#define SVM_VMGEXIT_SAVIC_REGISTER_GPA 0
123123#define SVM_VMGEXIT_SAVIC_UNREGISTER_GPA 1
124124#define SVM_VMGEXIT_SAVIC_SELF_GPA ~0ULL
125#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd
126#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe
125#define SVM_VMGEXIT_HV_FEATURES 0x8000fffdull
126#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffeull
127127#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \
128128 /* SW_EXITINFO1[3:0] */ \
129129 (((((u64)reason_set) & 0xf)) | \
130130 /* SW_EXITINFO1[11:4] */ \
131131 ((((u64)reason_code) & 0xff) << 4))
132#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff
132#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffffull
133133
134134/* Exit code reserved for hypervisor/software use */
135#define SVM_EXIT_SW 0xf0000000
135#define SVM_EXIT_SW 0xf0000000ull
136136
137#define SVM_EXIT_ERR -1
137#define SVM_EXIT_ERR -1ull
138138
139139#define SVM_EXIT_REASONS \
140140 { SVM_EXIT_READ_CR0, "read_cr0" }, \
lib/libc/include/x86-linux-any/asm/unistd_32.h+1
......@@ -461,6 +461,7 @@
461461#define __NR_file_getattr 468
462462#define __NR_file_setattr 469
463463#define __NR_listns 470
464#define __NR_rseq_slice_yield 471
464465
465466
466467#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/unistd_64.h+1
......@@ -385,6 +385,7 @@
385385#define __NR_file_getattr 468
386386#define __NR_file_setattr 469
387387#define __NR_listns 470
388#define __NR_rseq_slice_yield 471
388389
389390
390391#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/unistd_x32.h+1
......@@ -338,6 +338,7 @@
338338#define __NR_file_getattr (__X32_SYSCALL_BIT + 468)
339339#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)
340340#define __NR_listns (__X32_SYSCALL_BIT + 470)
341#define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471)
341342#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
342343#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
343344#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
lib/libc/include/xtensa-linux-any/asm/unistd_32.h+1
......@@ -417,6 +417,7 @@
417417#define __NR_file_getattr 468
418418#define __NR_file_setattr 469
419419#define __NR_listns 470
420#define __NR_rseq_slice_yield 471
420421
421422
422423#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/std/os/linux/syscalls.zig+26-1
......@@ -1,5 +1,5 @@
11// This file is automatically generated by tools/generate_linux_syscalls.zig
2// This list current as of kernel: 6.19.0
2// This list current as of kernel: 7.0.0
33
44pub const X86 = enum(usize) {
55 restart_syscall = 0,
......@@ -462,6 +462,7 @@ pub const X86 = enum(usize) {
462462 file_getattr = 468,
463463 file_setattr = 469,
464464 listns = 470,
465 rseq_slice_yield = 471,
465466};
466467
467468pub const X64 = enum(usize) {
......@@ -849,6 +850,7 @@ pub const X64 = enum(usize) {
849850 file_getattr = 468,
850851 file_setattr = 469,
851852 listns = 470,
853 rseq_slice_yield = 471,
852854};
853855
854856pub const X32 = enum(usize) {
......@@ -1189,6 +1191,7 @@ pub const X32 = enum(usize) {
11891191 file_getattr = 1073742292,
11901192 file_setattr = 1073742293,
11911193 listns = 1073742294,
1194 rseq_slice_yield = 1073742295,
11921195 rt_sigaction = 1073742336,
11931196 rt_sigreturn = 1073742337,
11941197 ioctl = 1073742338,
......@@ -1653,6 +1656,7 @@ pub const Arm = enum(usize) {
16531656 file_getattr = 468,
16541657 file_setattr = 469,
16551658 listns = 470,
1659 rseq_slice_yield = 471,
16561660
16571661 breakpoint = arm_base + 1,
16581662 cacheflush = arm_base + 2,
......@@ -2068,6 +2072,7 @@ pub const Sparc = enum(usize) {
20682072 fsmount = 432,
20692073 fspick = 433,
20702074 pidfd_open = 434,
2075 clone3 = 435,
20712076 close_range = 436,
20722077 openat2 = 437,
20732078 pidfd_getfd = 438,
......@@ -2102,6 +2107,7 @@ pub const Sparc = enum(usize) {
21022107 file_getattr = 468,
21032108 file_setattr = 469,
21042109 listns = 470,
2110 rseq_slice_yield = 471,
21052111};
21062112
21072113pub const Sparc64 = enum(usize) {
......@@ -2473,6 +2479,7 @@ pub const Sparc64 = enum(usize) {
24732479 fsmount = 432,
24742480 fspick = 433,
24752481 pidfd_open = 434,
2482 clone3 = 435,
24762483 close_range = 436,
24772484 openat2 = 437,
24782485 pidfd_getfd = 438,
......@@ -2507,6 +2514,7 @@ pub const Sparc64 = enum(usize) {
25072514 file_getattr = 468,
25082515 file_setattr = 469,
25092516 listns = 470,
2517 rseq_slice_yield = 471,
25102518};
25112519
25122520pub const M68k = enum(usize) {
......@@ -2952,6 +2960,7 @@ pub const M68k = enum(usize) {
29522960 file_getattr = 468,
29532961 file_setattr = 469,
29542962 listns = 470,
2963 rseq_slice_yield = 471,
29552964};
29562965
29572966pub const MipsO32 = enum(usize) {
......@@ -3391,6 +3400,7 @@ pub const MipsO32 = enum(usize) {
33913400 file_getattr = 4468,
33923401 file_setattr = 4469,
33933402 listns = 4470,
3403 rseq_slice_yield = 4471,
33943404};
33953405
33963406pub const MipsN64 = enum(usize) {
......@@ -3766,6 +3776,7 @@ pub const MipsN64 = enum(usize) {
37663776 file_getattr = 5468,
37673777 file_setattr = 5469,
37683778 listns = 5470,
3779 rseq_slice_yield = 5471,
37693780};
37703781
37713782pub const MipsN32 = enum(usize) {
......@@ -4165,6 +4176,7 @@ pub const MipsN32 = enum(usize) {
41654176 file_getattr = 6468,
41664177 file_setattr = 6469,
41674178 listns = 6470,
4179 rseq_slice_yield = 6471,
41684180};
41694181
41704182pub const PowerPC = enum(usize) {
......@@ -4619,6 +4631,7 @@ pub const PowerPC = enum(usize) {
46194631 file_getattr = 468,
46204632 file_setattr = 469,
46214633 listns = 470,
4634 rseq_slice_yield = 471,
46224635};
46234636
46244637pub const PowerPC64 = enum(usize) {
......@@ -5045,6 +5058,7 @@ pub const PowerPC64 = enum(usize) {
50455058 file_getattr = 468,
50465059 file_setattr = 469,
50475060 listns = 470,
5061 rseq_slice_yield = 471,
50485062};
50495063
50505064pub const S390x = enum(usize) {
......@@ -5437,6 +5451,7 @@ pub const S390x = enum(usize) {
54375451 file_getattr = 468,
54385452 file_setattr = 469,
54395453 listns = 470,
5454 rseq_slice_yield = 471,
54405455};
54415456
54425457pub const Xtensa = enum(usize) {
......@@ -5833,6 +5848,7 @@ pub const Xtensa = enum(usize) {
58335848 file_getattr = 468,
58345849 file_setattr = 469,
58355850 listns = 470,
5851 rseq_slice_yield = 471,
58365852};
58375853
58385854pub const Arm64 = enum(usize) {
......@@ -6162,6 +6178,7 @@ pub const Arm64 = enum(usize) {
61626178 file_getattr = 468,
61636179 file_setattr = 469,
61646180 listns = 470,
6181 rseq_slice_yield = 471,
61656182};
61666183
61676184pub const RiscV32 = enum(usize) {
......@@ -6482,6 +6499,7 @@ pub const RiscV32 = enum(usize) {
64826499 file_getattr = 468,
64836500 file_setattr = 469,
64846501 listns = 470,
6502 rseq_slice_yield = 471,
64856503};
64866504
64876505pub const RiscV64 = enum(usize) {
......@@ -6812,6 +6830,7 @@ pub const RiscV64 = enum(usize) {
68126830 file_getattr = 468,
68136831 file_setattr = 469,
68146832 listns = 470,
6833 rseq_slice_yield = 471,
68156834};
68166835
68176836pub const LoongArch32 = enum(usize) {
......@@ -7129,6 +7148,7 @@ pub const LoongArch32 = enum(usize) {
71297148 file_getattr = 468,
71307149 file_setattr = 469,
71317150 listns = 470,
7151 rseq_slice_yield = 471,
71327152};
71337153
71347154pub const LoongArch64 = enum(usize) {
......@@ -7454,6 +7474,7 @@ pub const LoongArch64 = enum(usize) {
74547474 file_getattr = 468,
74557475 file_setattr = 469,
74567476 listns = 470,
7477 rseq_slice_yield = 471,
74577478};
74587479
74597480pub const Arc = enum(usize) {
......@@ -7807,6 +7828,7 @@ pub const Arc = enum(usize) {
78077828 file_getattr = 468,
78087829 file_setattr = 469,
78097830 listns = 470,
7831 rseq_slice_yield = 471,
78107832};
78117833
78127834pub const CSky = enum(usize) {
......@@ -8156,6 +8178,7 @@ pub const CSky = enum(usize) {
81568178 file_getattr = 468,
81578179 file_setattr = 469,
81588180 listns = 470,
8181 rseq_slice_yield = 471,
81598182};
81608183
81618184pub const Hexagon = enum(usize) {
......@@ -8504,6 +8527,7 @@ pub const Hexagon = enum(usize) {
85048527 file_getattr = 468,
85058528 file_setattr = 469,
85068529 listns = 470,
8530 rseq_slice_yield = 471,
85078531};
85088532
85098533pub const OpenRisc = enum(usize) {
......@@ -8853,4 +8877,5 @@ pub const OpenRisc = enum(usize) {
88538877 file_getattr = 468,
88548878 file_setattr = 469,
88558879 listns = 470,
8880 rseq_slice_yield = 471,
88568881};