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 @@...@@ -146,5 +146,6 @@
146#define HWCAP3_MTE_FAR (1UL << 0)146#define HWCAP3_MTE_FAR (1UL << 0)
147#define HWCAP3_MTE_STORE_ONLY (1UL << 1)147#define HWCAP3_MTE_STORE_ONLY (1UL << 1)
148#define HWCAP3_LSFE (1UL << 2)148#define HWCAP3_LSFE (1UL << 2)
149#define HWCAP3_LS64 (1UL << 3)
149150
150#endif /* __ASM_HWCAP_H */151#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 @@...@@ -327,6 +327,7 @@
327#define __NR_file_getattr 468327#define __NR_file_getattr 468
328#define __NR_file_setattr 469328#define __NR_file_setattr 469
329#define __NR_listns 470329#define __NR_listns 470
330#define __NR_rseq_slice_yield 471
330331
331332
332#endif /* _ASM_UNISTD_64_H */333#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 @@...@@ -55,6 +55,7 @@
55#define EMULTIHOP 72 /* Multihop attempted */55#define EMULTIHOP 72 /* Multihop attempted */
56#define EDOTDOT 73 /* RFS specific error */56#define EDOTDOT 73 /* RFS specific error */
57#define EBADMSG 74 /* Not a data message */57#define EBADMSG 74 /* Not a data message */
58#define EFSBADCRC EBADMSG /* Bad CRC detected */
58#define EOVERFLOW 75 /* Value too large for defined data type */59#define EOVERFLOW 75 /* Value too large for defined data type */
59#define ENOTUNIQ 76 /* Name not unique on network */60#define ENOTUNIQ 76 /* Name not unique on network */
60#define EBADFD 77 /* File descriptor in bad state */61#define EBADFD 77 /* File descriptor in bad state */
...@@ -98,6 +99,7 @@...@@ -98,6 +99,7 @@
98#define EINPROGRESS 115 /* Operation now in progress */99#define EINPROGRESS 115 /* Operation now in progress */
99#define ESTALE 116 /* Stale file handle */100#define ESTALE 116 /* Stale file handle */
100#define EUCLEAN 117 /* Structure needs cleaning */101#define EUCLEAN 117 /* Structure needs cleaning */
102#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
101#define ENOTNAM 118 /* Not a XENIX named type file */103#define ENOTNAM 118 /* Not a XENIX named type file */
102#define ENAVAIL 119 /* No XENIX semaphores available */104#define ENAVAIL 119 /* No XENIX semaphores available */
103#define EISNAM 120 /* Is a named type file */105#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)...@@ -860,8 +860,11 @@ __SYSCALL(__NR_file_setattr, sys_file_setattr)
860#define __NR_listns 470860#define __NR_listns 470
861__SYSCALL(__NR_listns, sys_listns)861__SYSCALL(__NR_listns, sys_listns)
862862
863#define __NR_rseq_slice_yield 471
864__SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield)
865
863#undef __NR_syscalls866#undef __NR_syscalls
864#define __NR_syscalls 471867#define __NR_syscalls 472
865868
866/*869/*
867 * 32 bit systems traditionally used different870 * 32 bit systems traditionally used different
lib/libc/include/any-linux-any/drm/amdgpu_drm.h+20-6
...@@ -105,8 +105,6 @@ extern "C" {...@@ -105,8 +105,6 @@ extern "C" {
105 *105 *
106 * %AMDGPU_GEM_DOMAIN_DOORBELL Doorbell. It is an MMIO region for106 * %AMDGPU_GEM_DOMAIN_DOORBELL Doorbell. It is an MMIO region for
107 * signalling user mode queues.107 * signalling user mode queues.
108 *
109 * %AMDGPU_GEM_DOMAIN_MMIO_REMAP MMIO remap page (special mapping for HDP flushing).
110 */108 */
111#define AMDGPU_GEM_DOMAIN_CPU 0x1109#define AMDGPU_GEM_DOMAIN_CPU 0x1
112#define AMDGPU_GEM_DOMAIN_GTT 0x2110#define AMDGPU_GEM_DOMAIN_GTT 0x2
...@@ -115,15 +113,13 @@ extern "C" {...@@ -115,15 +113,13 @@ extern "C" {
115#define AMDGPU_GEM_DOMAIN_GWS 0x10113#define AMDGPU_GEM_DOMAIN_GWS 0x10
116#define AMDGPU_GEM_DOMAIN_OA 0x20114#define AMDGPU_GEM_DOMAIN_OA 0x20
117#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40115#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40
118#define AMDGPU_GEM_DOMAIN_MMIO_REMAP 0x80
119#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \116#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
120 AMDGPU_GEM_DOMAIN_GTT | \117 AMDGPU_GEM_DOMAIN_GTT | \
121 AMDGPU_GEM_DOMAIN_VRAM | \118 AMDGPU_GEM_DOMAIN_VRAM | \
122 AMDGPU_GEM_DOMAIN_GDS | \119 AMDGPU_GEM_DOMAIN_GDS | \
123 AMDGPU_GEM_DOMAIN_GWS | \120 AMDGPU_GEM_DOMAIN_GWS | \
124 AMDGPU_GEM_DOMAIN_OA | \121 AMDGPU_GEM_DOMAIN_OA | \
125 AMDGPU_GEM_DOMAIN_DOORBELL | \122 AMDGPU_GEM_DOMAIN_DOORBELL)
126 AMDGPU_GEM_DOMAIN_MMIO_REMAP)
127123
128/* Flag that CPU access will be required for the case of VRAM domain */124/* Flag that CPU access will be required for the case of VRAM domain */
129#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)125#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
...@@ -883,7 +879,7 @@ struct drm_amdgpu_gem_list_handles_entry {...@@ -883,7 +879,7 @@ struct drm_amdgpu_gem_list_handles_entry {
883#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)879#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)
884/* executable mapping, new for VI */880/* executable mapping, new for VI */
885#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)881#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)
886/* partially resident texture */882/* unmapped page of partially resident textures */
887#define AMDGPU_VM_PAGE_PRT (1 << 4)883#define AMDGPU_VM_PAGE_PRT (1 << 4)
888/* MTYPE flags use bit 5 to 8 */884/* MTYPE flags use bit 5 to 8 */
889#define AMDGPU_VM_MTYPE_MASK (0xf << 5)885#define AMDGPU_VM_MTYPE_MASK (0xf << 5)
...@@ -1427,6 +1423,7 @@ struct drm_amdgpu_info_vbios {...@@ -1427,6 +1423,7 @@ struct drm_amdgpu_info_vbios {
1427#define AMDGPU_VRAM_TYPE_LPDDR4 111423#define AMDGPU_VRAM_TYPE_LPDDR4 11
1428#define AMDGPU_VRAM_TYPE_LPDDR5 121424#define AMDGPU_VRAM_TYPE_LPDDR5 12
1429#define AMDGPU_VRAM_TYPE_HBM3E 131425#define AMDGPU_VRAM_TYPE_HBM3E 13
1426#define AMDGPU_VRAM_TYPE_HBM4 14
14301427
1431struct drm_amdgpu_info_device {1428struct drm_amdgpu_info_device {
1432 /** PCI Device ID */1429 /** PCI Device ID */
...@@ -1629,9 +1626,25 @@ struct drm_amdgpu_info_uq_metadata_gfx {...@@ -1629,9 +1626,25 @@ struct drm_amdgpu_info_uq_metadata_gfx {
1629 __u32 csa_alignment;1626 __u32 csa_alignment;
1630};1627};
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
1632struct drm_amdgpu_info_uq_metadata {1643struct drm_amdgpu_info_uq_metadata {
1633 union {1644 union {
1634 struct drm_amdgpu_info_uq_metadata_gfx gfx;1645 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;
1635 };1648 };
1636};1649};
16371650
...@@ -1654,6 +1667,7 @@ struct drm_amdgpu_info_uq_metadata {...@@ -1654,6 +1667,7 @@ struct drm_amdgpu_info_uq_metadata {
1654#define AMDGPU_FAMILY_GC_10_3_6 149 /* GC 10.3.6 */1667#define AMDGPU_FAMILY_GC_10_3_6 149 /* GC 10.3.6 */
1655#define AMDGPU_FAMILY_GC_10_3_7 151 /* GC 10.3.7 */1668#define AMDGPU_FAMILY_GC_10_3_7 151 /* GC 10.3.7 */
1656#define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */1669#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 */
1657#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */1671#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
16581672
1659#if defined(__cplusplus)1673#if defined(__cplusplus)
lib/libc/include/any-linux-any/drm/amdxdna_accel.h+8
...@@ -19,6 +19,14 @@ extern "C" {...@@ -19,6 +19,14 @@ extern "C" {
19#define AMDXDNA_INVALID_BO_HANDLE 019#define AMDXDNA_INVALID_BO_HANDLE 0
20#define AMDXDNA_INVALID_FENCE_HANDLE 020#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
22enum amdxdna_device_type {30enum amdxdna_device_type {
23 AMDXDNA_DEV_TYPE_UNKNOWN = -1,31 AMDXDNA_DEV_TYPE_UNKNOWN = -1,
24 AMDXDNA_DEV_TYPE_KMQ,32 AMDXDNA_DEV_TYPE_KMQ,
lib/libc/include/any-linux-any/drm/drm_fourcc.h+6-6
...@@ -401,8 +401,8 @@ extern "C" {...@@ -401,8 +401,8 @@ extern "C" {
401 * implementation can multiply the values by 2^6=64. For that reason the padding401 * implementation can multiply the values by 2^6=64. For that reason the padding
402 * must only contain zeros.402 * must only contain zeros.
403 * index 0 = Y plane, [15:0] z:Y [6:10] little endian403 * index 0 = Y plane, [15:0] z:Y [6:10] little endian
404 * index 1 = Cr plane, [15:0] z:Cr [6:10] little endian404 * index 1 = Cb plane, [15:0] z:Cb [6:10] little endian
405 * index 2 = Cb plane, [15:0] z:Cb [6:10] little endian405 * index 2 = Cr plane, [15:0] z:Cr [6:10] little endian
406 */406 */
407#define DRM_FORMAT_S010 fourcc_code('S', '0', '1', '0') /* 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel */407#define DRM_FORMAT_S010 fourcc_code('S', '0', '1', '0') /* 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel */
408#define DRM_FORMAT_S210 fourcc_code('S', '2', '1', '0') /* 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel */408#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" {...@@ -414,8 +414,8 @@ extern "C" {
414 * implementation can multiply the values by 2^4=16. For that reason the padding414 * implementation can multiply the values by 2^4=16. For that reason the padding
415 * must only contain zeros.415 * must only contain zeros.
416 * index 0 = Y plane, [15:0] z:Y [4:12] little endian416 * index 0 = Y plane, [15:0] z:Y [4:12] little endian
417 * index 1 = Cr plane, [15:0] z:Cr [4:12] little endian417 * index 1 = Cb plane, [15:0] z:Cb [4:12] little endian
418 * index 2 = Cb plane, [15:0] z:Cb [4:12] little endian418 * index 2 = Cr plane, [15:0] z:Cr [4:12] little endian
419 */419 */
420#define DRM_FORMAT_S012 fourcc_code('S', '0', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel */420#define DRM_FORMAT_S012 fourcc_code('S', '0', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel */
421#define DRM_FORMAT_S212 fourcc_code('S', '2', '1', '2') /* 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel */421#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" {...@@ -424,8 +424,8 @@ extern "C" {
424/*424/*
425 * 3 plane YCbCr425 * 3 plane YCbCr
426 * index 0 = Y plane, [15:0] Y little endian426 * index 0 = Y plane, [15:0] Y little endian
427 * index 1 = Cr plane, [15:0] Cr little endian427 * index 1 = Cb plane, [15:0] Cb little endian
428 * index 2 = Cb plane, [15:0] Cb little endian428 * index 2 = Cr plane, [15:0] Cr little endian
429 */429 */
430#define DRM_FORMAT_S016 fourcc_code('S', '0', '1', '6') /* 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel */430#define DRM_FORMAT_S016 fourcc_code('S', '0', '1', '6') /* 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel */
431#define DRM_FORMAT_S216 fourcc_code('S', '2', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel */431#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" {...@@ -24,6 +24,8 @@ extern "C" {
24#define DRM_PANFROST_SET_LABEL_BO 0x0924#define DRM_PANFROST_SET_LABEL_BO 0x09
25#define DRM_PANFROST_JM_CTX_CREATE 0x0a25#define DRM_PANFROST_JM_CTX_CREATE 0x0a
26#define DRM_PANFROST_JM_CTX_DESTROY 0x0b26#define DRM_PANFROST_JM_CTX_DESTROY 0x0b
27#define DRM_PANFROST_SYNC_BO 0x0c
28#define DRM_PANFROST_QUERY_BO_INFO 0x0d
2729
28#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)30#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
29#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)31#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" {...@@ -35,6 +37,8 @@ extern "C" {
35#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)37#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
36#define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create)38#define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create)
37#define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy)39#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
39/*43/*
40 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module44 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
...@@ -120,9 +124,12 @@ struct drm_panfrost_wait_bo {...@@ -120,9 +124,12 @@ struct drm_panfrost_wait_bo {
120 __s64 timeout_ns;124 __s64 timeout_ns;
121};125};
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 */
124#define PANFROST_BO_NOEXEC 1130#define PANFROST_BO_NOEXEC 1
125#define PANFROST_BO_HEAP 2131#define PANFROST_BO_HEAP 2
132#define PANFROST_BO_WB_MMAP 4
126133
127/**134/**
128 * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.135 * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
...@@ -228,6 +235,13 @@ enum drm_panfrost_param {...@@ -228,6 +235,13 @@ enum drm_panfrost_param {
228 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,235 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,
229 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,236 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,
230 DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,237 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,
231};245};
232246
233struct drm_panfrost_get_param {247struct drm_panfrost_get_param {
...@@ -301,6 +315,66 @@ struct drm_panfrost_set_label_bo {...@@ -301,6 +315,66 @@ struct drm_panfrost_set_label_bo {
301 __u64 label;315 __u64 label;
302};316};
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
304/* Definitions for coredump decoding in user space */378/* Definitions for coredump decoding in user space */
305#define PANFROSTDUMP_MAJOR 1379#define PANFROSTDUMP_MAJOR 1
306#define PANFROSTDUMP_MINOR 0380#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 {...@@ -144,6 +144,16 @@ enum drm_panthor_ioctl_id {
144 * pgoff_t size.144 * pgoff_t size.
145 */145 */
146 DRM_PANTHOR_SET_USER_MMIO_OFFSET,146 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,
147};157};
148158
149/**159/**
...@@ -245,6 +255,26 @@ enum drm_panthor_dev_query_type {...@@ -245,6 +255,26 @@ enum drm_panthor_dev_query_type {
245 DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,255 DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,
246};256};
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
248/**278/**
249 * struct drm_panthor_gpu_info - GPU information279 * struct drm_panthor_gpu_info - GPU information
250 *280 *
...@@ -301,7 +331,16 @@ struct drm_panthor_gpu_info {...@@ -301,7 +331,16 @@ struct drm_panthor_gpu_info {
301 */331 */
302 __u32 thread_max_barrier_size;332 __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 */
305 __u32 coherency_features;344 __u32 coherency_features;
306345
307 /** @texture_features: Texture features. */346 /** @texture_features: Texture features. */
...@@ -310,8 +349,12 @@ struct drm_panthor_gpu_info {...@@ -310,8 +349,12 @@ struct drm_panthor_gpu_info {
310 /** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */349 /** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */
311 __u32 as_present;350 __u32 as_present;
312351
313 /** @pad0: MBZ. */352 /**
314 __u32 pad0;353 * @selected_coherency: Coherency selected for this device.
354 *
355 * One of drm_panthor_gpu_coherency.
356 */
357 __u32 selected_coherency;
315358
316 /** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */359 /** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */
317 __u64 shader_present;360 __u64 shader_present;
...@@ -638,6 +681,15 @@ struct drm_panthor_vm_get_state {...@@ -638,6 +681,15 @@ struct drm_panthor_vm_get_state {
638enum drm_panthor_bo_flags {681enum drm_panthor_bo_flags {
639 /** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */682 /** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */
640 DRM_PANTHOR_BO_NO_MMAP = (1 << 0),683 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),
641};693};
642694
643/**695/**
...@@ -1040,6 +1092,101 @@ struct drm_panthor_set_user_mmio_offset {...@@ -1040,6 +1092,101 @@ struct drm_panthor_set_user_mmio_offset {
1040 __u64 offset;1092 __u64 offset;
1041};1093};
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
1043/**1190/**
1044 * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number1191 * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number
1045 * @__access: Access type. Must be R, W or RW.1192 * @__access: Access type. Must be R, W or RW.
...@@ -1086,6 +1233,10 @@ enum {...@@ -1086,6 +1233,10 @@ enum {
1086 DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),1233 DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),
1087 DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET =1234 DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET =
1088 DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset),1235 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),
1089};1240};
10901241
1091#if defined(__cplusplus)1242#if defined(__cplusplus)
lib/libc/include/any-linux-any/drm/rocket_accel.h+74-24
...@@ -26,20 +26,27 @@ extern "C" {...@@ -26,20 +26,27 @@ extern "C" {
26 *26 *
27 */27 */
28struct drm_rocket_create_bo {28struct drm_rocket_create_bo {
29 /** Input: Size of the requested BO. */29 /**
30 * @size: Input: Size of the requested BO.
31 */
30 __u32 size;32 __u32 size;
3133
32 /** Output: GEM handle for the BO. */34 /**
35 * @handle: Output: GEM handle for the BO.
36 */
33 __u32 handle;37 __u32 handle;
3438
35 /**39 /**
36 * Output: DMA address for the BO in the NPU address space. This address40 * @dma_address: Output: DMA address for the BO in the NPU address
37 * is private to the DRM fd and is valid for the lifetime of the GEM41 * space. This address is private to the DRM fd and is valid for
38 * handle.42 * the lifetime of the GEM handle.
39 */43 */
40 __u64 dma_address;44 __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 */
43 __u64 offset;50 __u64 offset;
44};51};
4552
...@@ -50,13 +57,19 @@ struct drm_rocket_create_bo {...@@ -50,13 +57,19 @@ struct drm_rocket_create_bo {
50 * synchronization.57 * synchronization.
51 */58 */
52struct drm_rocket_prep_bo {59struct drm_rocket_prep_bo {
53 /** Input: GEM handle of the buffer object. */60 /**
61 * @handle: Input: GEM handle of the buffer object.
62 */
54 __u32 handle;63 __u32 handle;
5564
56 /** Reserved, must be zero. */65 /**
66 * @reserved: Reserved, must be zero.
67 */
57 __u32 reserved;68 __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 */
60 __s64 timeout_ns;73 __s64 timeout_ns;
61};74};
6275
...@@ -66,10 +79,14 @@ struct drm_rocket_prep_bo {...@@ -66,10 +79,14 @@ struct drm_rocket_prep_bo {
66 * Synchronize caches for NPU access.79 * Synchronize caches for NPU access.
67 */80 */
68struct drm_rocket_fini_bo {81struct drm_rocket_fini_bo {
69 /** Input: GEM handle of the buffer object. */82 /**
83 * @handle: Input: GEM handle of the buffer object.
84 */
70 __u32 handle;85 __u32 handle;
7186
72 /** Reserved, must be zero. */87 /**
88 * @reserved: Reserved, must be zero.
89 */
73 __u32 reserved;90 __u32 reserved;
74};91};
7592
...@@ -79,10 +96,15 @@ struct drm_rocket_fini_bo {...@@ -79,10 +96,15 @@ struct drm_rocket_fini_bo {
79 * A task is the smallest unit of work that can be run on the NPU.96 * A task is the smallest unit of work that can be run on the NPU.
80 */97 */
81struct drm_rocket_task {98struct drm_rocket_task {
82 /** Input: DMA address to NPU mapping of register command buffer */99 /**
100 * @regcmd: Input: DMA address to NPU mapping of register command buffer
101 */
83 __u32 regcmd;102 __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 */
86 __u32 regcmd_count;108 __u32 regcmd_count;
87};109};
88110
...@@ -94,25 +116,44 @@ struct drm_rocket_task {...@@ -94,25 +116,44 @@ struct drm_rocket_task {
94 * sequentially on the same core, to benefit from memory residency in SRAM.116 * sequentially on the same core, to benefit from memory residency in SRAM.
95 */117 */
96struct drm_rocket_job {118struct drm_rocket_job {
97 /** Input: Pointer to an array of struct drm_rocket_task. */119 /**
120 * @tasks: Input: Pointer to an array of struct drm_rocket_task.
121 */
98 __u64 tasks;122 __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 */
101 __u64 in_bo_handles;128 __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 */
104 __u64 out_bo_handles;134 __u64 out_bo_handles;
105135
106 /** Input: Number of tasks passed in. */136 /**
137 * @task_count: Input: Number of tasks passed in.
138 */
107 __u32 task_count;139 __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 */
110 __u32 task_struct_size;145 __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 */
113 __u32 in_bo_handle_count;151 __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 */
116 __u32 out_bo_handle_count;157 __u32 out_bo_handle_count;
117};158};
118159
...@@ -122,16 +163,25 @@ struct drm_rocket_job {...@@ -122,16 +163,25 @@ struct drm_rocket_job {
122 * The kernel will schedule the execution of these jobs in dependency order.163 * The kernel will schedule the execution of these jobs in dependency order.
123 */164 */
124struct drm_rocket_submit {165struct drm_rocket_submit {
125 /** Input: Pointer to an array of struct drm_rocket_job. */166 /**
167 * @jobs: Input: Pointer to an array of struct drm_rocket_job.
168 */
126 __u64 jobs;169 __u64 jobs;
127170
128 /** Input: Number of jobs passed in. */171 /**
172 * @job_count: Input: Number of jobs passed in.
173 */
129 __u32 job_count;174 __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 */
132 __u32 job_struct_size;180 __u32 job_struct_size;
133181
134 /** Reserved, must be zero. */182 /**
183 * @reserved: Reserved, must be zero.
184 */
135 __u64 reserved;185 __u64 reserved;
136};186};
137187
lib/libc/include/any-linux-any/drm/xe_drm.h+89-6
...@@ -106,6 +106,7 @@ extern "C" {...@@ -106,6 +106,7 @@ extern "C" {
106#define DRM_XE_OBSERVATION 0x0b106#define DRM_XE_OBSERVATION 0x0b
107#define DRM_XE_MADVISE 0x0c107#define DRM_XE_MADVISE 0x0c
108#define DRM_XE_VM_QUERY_MEM_RANGE_ATTRS 0x0d108#define DRM_XE_VM_QUERY_MEM_RANGE_ATTRS 0x0d
109#define DRM_XE_EXEC_QUEUE_SET_PROPERTY 0x0e
109110
110/* Must be kept compact -- no holes */111/* Must be kept compact -- no holes */
111112
...@@ -123,6 +124,7 @@ extern "C" {...@@ -123,6 +124,7 @@ extern "C" {
123#define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)124#define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)
124#define DRM_IOCTL_XE_MADVISE DRM_IOW(DRM_COMMAND_BASE + DRM_XE_MADVISE, struct drm_xe_madvise)125#define DRM_IOCTL_XE_MADVISE DRM_IOW(DRM_COMMAND_BASE + DRM_XE_MADVISE, struct drm_xe_madvise)
125#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)126#define DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_QUERY_MEM_RANGE_ATTRS, struct drm_xe_vm_query_mem_range_attr)
127#define DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_SET_PROPERTY, struct drm_xe_exec_queue_set_property)
126128
127/**129/**
128 * DOC: Xe IOCTL Extensions130 * DOC: Xe IOCTL Extensions
...@@ -210,8 +212,12 @@ struct drm_xe_ext_set_property {...@@ -210,8 +212,12 @@ struct drm_xe_ext_set_property {
210 /** @pad: MBZ */212 /** @pad: MBZ */
211 __u32 pad;213 __u32 pad;
212214
213 /** @value: property value */215 union {
214 __u64 value;216 /** @value: property value */
217 __u64 value;
218 /** @ptr: pointer to user value */
219 __u64 ptr;
220 };
215221
216 /** @reserved: Reserved */222 /** @reserved: Reserved */
217 __u64 reserved[2];223 __u64 reserved[2];
...@@ -403,6 +409,9 @@ struct drm_xe_query_mem_regions {...@@ -403,6 +409,9 @@ struct drm_xe_query_mem_regions {
403 * has low latency hint support409 * has low latency hint support
404 * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR - Flag is set if the410 * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR - Flag is set if the
405 * device has CPU address mirroring support411 * device has CPU address mirroring support
412 * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_NO_COMPRESSION_HINT - Flag is set if the
413 * device supports the userspace hint %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION.
414 * This is exposed only on Xe2+.
406 * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment415 * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
407 * required by this device, typically SZ_4K or SZ_64K416 * required by this device, typically SZ_4K or SZ_64K
408 * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address417 * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address
...@@ -421,6 +430,7 @@ struct drm_xe_query_config {...@@ -421,6 +430,7 @@ struct drm_xe_query_config {
421 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM (1 << 0)430 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM (1 << 0)
422 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY (1 << 1)431 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY (1 << 1)
423 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR (1 << 2)432 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR (1 << 2)
433 #define DRM_XE_QUERY_CONFIG_FLAG_HAS_NO_COMPRESSION_HINT (1 << 3)
424#define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT 2434#define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT 2
425#define DRM_XE_QUERY_CONFIG_VA_BITS 3435#define DRM_XE_QUERY_CONFIG_VA_BITS 3
426#define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 4436#define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 4
...@@ -791,6 +801,17 @@ struct drm_xe_device_query {...@@ -791,6 +801,17 @@ struct drm_xe_device_query {
791 * need to use VRAM for display surfaces, therefore the kernel requires801 * need to use VRAM for display surfaces, therefore the kernel requires
792 * setting this flag for such objects, otherwise an error is thrown on802 * setting this flag for such objects, otherwise an error is thrown on
793 * small-bar systems.803 * small-bar systems.
804 * - %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION - Allows userspace to
805 * hint that compression (CCS) should be disabled for the buffer being
806 * created. This can avoid unnecessary memory operations and CCS state
807 * management.
808 * On pre-Xe2 platforms, this flag is currently rejected as compression
809 * control is not supported via PAT index. On Xe2+ platforms, compression
810 * is controlled via PAT entries. If this flag is set, the driver will reject
811 * any VM bind that requests a PAT index enabling compression for this BO.
812 * Note: On dGPU platforms, there is currently no change in behavior with
813 * this flag, but future improvements may leverage it. The current benefit is
814 * primarily applicable to iGPU platforms.
794 *815 *
795 * @cpu_caching supports the following values:816 * @cpu_caching supports the following values:
796 * - %DRM_XE_GEM_CPU_CACHING_WB - Allocate the pages with write-back817 * - %DRM_XE_GEM_CPU_CACHING_WB - Allocate the pages with write-back
...@@ -837,6 +858,7 @@ struct drm_xe_gem_create {...@@ -837,6 +858,7 @@ struct drm_xe_gem_create {
837#define DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING (1 << 0)858#define DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING (1 << 0)
838#define DRM_XE_GEM_CREATE_FLAG_SCANOUT (1 << 1)859#define DRM_XE_GEM_CREATE_FLAG_SCANOUT (1 << 1)
839#define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2)860#define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2)
861#define DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION (1 << 3)
840 /**862 /**
841 * @flags: Flags, currently a mask of memory instances of where BO can863 * @flags: Flags, currently a mask of memory instances of where BO can
842 * be placed864 * be placed
...@@ -1252,6 +1274,17 @@ struct drm_xe_vm_bind {...@@ -1252,6 +1274,17 @@ struct drm_xe_vm_bind {
1252 * Given that going into a power-saving state kills PXP HWDRM sessions,1274 * Given that going into a power-saving state kills PXP HWDRM sessions,
1253 * runtime PM will be blocked while queues of this type are alive.1275 * runtime PM will be blocked while queues of this type are alive.
1254 * All PXP queues will be killed if a PXP invalidation event occurs.1276 * All PXP queues will be killed if a PXP invalidation event occurs.
1277 * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP - Create a multi-queue group
1278 * or add secondary queues to a multi-queue group.
1279 * If the extension's 'value' field has %DRM_XE_MULTI_GROUP_CREATE flag set,
1280 * then a new multi-queue group is created with this queue as the primary queue
1281 * (Q0). Otherwise, the queue gets added to the multi-queue group whose primary
1282 * queue's exec_queue_id is specified in the lower 32 bits of the 'value' field.
1283 * All the other non-relevant bits of extension's 'value' field while adding the
1284 * primary or the secondary queues of the group must be set to 0.
1285 * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY - Set the queue
1286 * priority within the multi-queue group. Current valid priority values are 0–2
1287 * (default is 1), with higher values indicating higher priority.
1255 *1288 *
1256 * The example below shows how to use @drm_xe_exec_queue_create to create1289 * The example below shows how to use @drm_xe_exec_queue_create to create
1257 * a simple exec_queue (no parallel submission) of class1290 * a simple exec_queue (no parallel submission) of class
...@@ -1292,6 +1325,10 @@ struct drm_xe_exec_queue_create {...@@ -1292,6 +1325,10 @@ struct drm_xe_exec_queue_create {
1292#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY 01325#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY 0
1293#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE 11326#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE 1
1294#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE 21327#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE 2
1328#define DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE 3
1329#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP 4
1330#define DRM_XE_MULTI_GROUP_CREATE (1ull << 63)
1331#define DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY 5
1295 /** @extensions: Pointer to the first extension struct, if any */1332 /** @extensions: Pointer to the first extension struct, if any */
1296 __u64 extensions;1333 __u64 extensions;
12971334
...@@ -1655,6 +1692,9 @@ enum drm_xe_oa_unit_type {...@@ -1655,6 +1692,9 @@ enum drm_xe_oa_unit_type {
16551692
1656 /** @DRM_XE_OA_UNIT_TYPE_OAM_SAG: OAM_SAG OA unit */1693 /** @DRM_XE_OA_UNIT_TYPE_OAM_SAG: OAM_SAG OA unit */
1657 DRM_XE_OA_UNIT_TYPE_OAM_SAG,1694 DRM_XE_OA_UNIT_TYPE_OAM_SAG,
1695
1696 /** @DRM_XE_OA_UNIT_TYPE_MERT: MERT OA unit */
1697 DRM_XE_OA_UNIT_TYPE_MERT,
1658};1698};
16591699
1660/**1700/**
...@@ -1677,12 +1717,19 @@ struct drm_xe_oa_unit {...@@ -1677,12 +1717,19 @@ struct drm_xe_oa_unit {
1677#define DRM_XE_OA_CAPS_OA_BUFFER_SIZE (1 << 2)1717#define DRM_XE_OA_CAPS_OA_BUFFER_SIZE (1 << 2)
1678#define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS (1 << 3)1718#define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS (1 << 3)
1679#define DRM_XE_OA_CAPS_OAM (1 << 4)1719#define DRM_XE_OA_CAPS_OAM (1 << 4)
1720#define DRM_XE_OA_CAPS_OA_UNIT_GT_ID (1 << 5)
16801721
1681 /** @oa_timestamp_freq: OA timestamp freq */1722 /** @oa_timestamp_freq: OA timestamp freq */
1682 __u64 oa_timestamp_freq;1723 __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
1684 /** @reserved: MBZ */1731 /** @reserved: MBZ */
1685 __u64 reserved[4];1732 __u64 reserved[3];
16861733
1687 /** @num_engines: number of engines in @eci array */1734 /** @num_engines: number of engines in @eci array */
1688 __u64 num_engines;1735 __u64 num_engines;
...@@ -2072,7 +2119,13 @@ struct drm_xe_madvise {...@@ -2072,7 +2119,13 @@ struct drm_xe_madvise {
2072 struct {2119 struct {
2073#define DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE 02120#define DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE 0
2074#define DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM -12121#define DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM -1
2075 /** @preferred_mem_loc.devmem_fd: fd for preferred loc */2122 /**
2123 * @preferred_mem_loc.devmem_fd:
2124 * Device file-descriptor of the device where the
2125 * preferred memory is located, or one of the
2126 * above special values. Please also see
2127 * @preferred_mem_loc.region_instance below.
2128 */
2076 __u32 devmem_fd;2129 __u32 devmem_fd;
20772130
2078#define DRM_XE_MIGRATE_ALL_PAGES 02131#define DRM_XE_MIGRATE_ALL_PAGES 0
...@@ -2080,8 +2133,14 @@ struct drm_xe_madvise {...@@ -2080,8 +2133,14 @@ struct drm_xe_madvise {
2080 /** @preferred_mem_loc.migration_policy: Page migration policy */2133 /** @preferred_mem_loc.migration_policy: Page migration policy */
2081 __u16 migration_policy;2134 __u16 migration_policy;
20822135
2083 /** @preferred_mem_loc.pad : MBZ */2136 /**
2084 __u16 pad;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
2086 /** @preferred_mem_loc.reserved : Reserved */2145 /** @preferred_mem_loc.reserved : Reserved */
2087 __u64 reserved;2146 __u64 reserved;
...@@ -2274,6 +2333,30 @@ struct drm_xe_vm_query_mem_range_attr {...@@ -2274,6 +2333,30 @@ struct drm_xe_vm_query_mem_range_attr {
22742333
2275};2334};
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
2277#if defined(__cplusplus)2360#if defined(__cplusplus)
2278}2361}
2279#endif2362#endif
lib/libc/include/any-linux-any/linux/android/binder.h+1-1
...@@ -278,7 +278,7 @@ enum {...@@ -278,7 +278,7 @@ enum {
278 * NOTE: Two special error codes you should check for when calling278 * NOTE: Two special error codes you should check for when calling
279 * in to the driver are:279 * in to the driver are:
280 *280 *
281 * EINTR -- The operation has been interupted. This should be281 * EINTR -- The operation has been interrupted. This should be
282 * handled by retrying the ioctl() until a different error code282 * handled by retrying the ioctl() until a different error code
283 * is returned.283 * is returned.
284 *284 *
lib/libc/include/any-linux-any/linux/bpf.h+28
...@@ -119,6 +119,14 @@ enum bpf_cgroup_iter_order {...@@ -119,6 +119,14 @@ enum bpf_cgroup_iter_order {
119 BPF_CGROUP_ITER_DESCENDANTS_PRE, /* walk descendants in pre-order. */119 BPF_CGROUP_ITER_DESCENDANTS_PRE, /* walk descendants in pre-order. */
120 BPF_CGROUP_ITER_DESCENDANTS_POST, /* walk descendants in post-order. */120 BPF_CGROUP_ITER_DESCENDANTS_POST, /* walk descendants in post-order. */
121 BPF_CGROUP_ITER_ANCESTORS_UP, /* walk ancestors upward. */121 BPF_CGROUP_ITER_ANCESTORS_UP, /* walk ancestors upward. */
122 /*
123 * Walks the immediate children of the specified parent
124 * cgroup_subsys_state. Unlike BPF_CGROUP_ITER_DESCENDANTS_PRE,
125 * BPF_CGROUP_ITER_DESCENDANTS_POST, and BPF_CGROUP_ITER_ANCESTORS_UP
126 * the iterator does not include the specified parent as one of the
127 * returned iterator elements.
128 */
129 BPF_CGROUP_ITER_CHILDREN,
122};130};
123131
124union bpf_iter_link_info {132union bpf_iter_link_info {
...@@ -918,6 +926,16 @@ union bpf_iter_link_info {...@@ -918,6 +926,16 @@ union bpf_iter_link_info {
918 * Number of bytes read from the stream on success, or -1 if an926 * Number of bytes read from the stream on success, or -1 if an
919 * error occurred (in which case, *errno* is set appropriately).927 * error occurred (in which case, *errno* is set appropriately).
920 *928 *
929 * BPF_PROG_ASSOC_STRUCT_OPS
930 * Description
931 * Associate a BPF program with a struct_ops map. The struct_ops
932 * map is identified by *map_fd* and the BPF program is
933 * identified by *prog_fd*.
934 *
935 * Return
936 * 0 on success or -1 if an error occurred (in which case,
937 * *errno* is set appropriately).
938 *
921 * NOTES939 * NOTES
922 * eBPF objects (maps and programs) can be shared between processes.940 * eBPF objects (maps and programs) can be shared between processes.
923 *941 *
...@@ -974,6 +992,7 @@ enum bpf_cmd {...@@ -974,6 +992,7 @@ enum bpf_cmd {
974 BPF_PROG_BIND_MAP,992 BPF_PROG_BIND_MAP,
975 BPF_TOKEN_CREATE,993 BPF_TOKEN_CREATE,
976 BPF_PROG_STREAM_READ_BY_FD,994 BPF_PROG_STREAM_READ_BY_FD,
995 BPF_PROG_ASSOC_STRUCT_OPS,
977 __MAX_BPF_CMD,996 __MAX_BPF_CMD,
978};997};
979998
...@@ -1134,6 +1153,7 @@ enum bpf_attach_type {...@@ -1134,6 +1153,7 @@ enum bpf_attach_type {
1134 BPF_NETKIT_PEER,1153 BPF_NETKIT_PEER,
1135 BPF_TRACE_KPROBE_SESSION,1154 BPF_TRACE_KPROBE_SESSION,
1136 BPF_TRACE_UPROBE_SESSION,1155 BPF_TRACE_UPROBE_SESSION,
1156 BPF_TRACE_FSESSION,
1137 __MAX_BPF_ATTACH_TYPE1157 __MAX_BPF_ATTACH_TYPE
1138};1158};
11391159
...@@ -1373,6 +1393,8 @@ enum {...@@ -1373,6 +1393,8 @@ enum {
1373 BPF_NOEXIST = 1, /* create new element if it didn't exist */1393 BPF_NOEXIST = 1, /* create new element if it didn't exist */
1374 BPF_EXIST = 2, /* update existing element */1394 BPF_EXIST = 2, /* update existing element */
1375 BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */1395 BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */
1396 BPF_F_CPU = 8, /* cpu flag for percpu maps, upper 32-bit of flags is a cpu number */
1397 BPF_F_ALL_CPUS = 16, /* update value across all CPUs for percpu maps */
1376};1398};
13771399
1378/* flags for BPF_MAP_CREATE command */1400/* flags for BPF_MAP_CREATE command */
...@@ -1894,6 +1916,12 @@ union bpf_attr {...@@ -1894,6 +1916,12 @@ union bpf_attr {
1894 __u32 prog_fd;1916 __u32 prog_fd;
1895 } prog_stream_read;1917 } prog_stream_read;
18961918
1919 struct {
1920 __u32 map_fd;
1921 __u32 prog_fd;
1922 __u32 flags;
1923 } prog_assoc_struct_ops;
1924
1897} __attribute__((aligned(8)));1925} __attribute__((aligned(8)));
18981926
1899/* The description below is an attempt at providing documentation to eBPF1927/* 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 {...@@ -334,6 +334,7 @@ struct btrfs_ioctl_fs_info_args {
334#define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13)334#define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13)
335#define BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE (1ULL << 14)335#define BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE (1ULL << 14)
336#define BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA (1ULL << 16)336#define BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA (1ULL << 16)
337#define BTRFS_FEATURE_INCOMPAT_REMAP_TREE (1ULL << 17)
337338
338struct btrfs_ioctl_feature_flags {339struct btrfs_ioctl_feature_flags {
339 __u64 compat_flags;340 __u64 compat_flags;
lib/libc/include/any-linux-any/linux/btrfs_tree.h+32-2
...@@ -72,6 +72,9 @@...@@ -72,6 +72,9 @@
72/* Tracks RAID stripes in block groups. */72/* Tracks RAID stripes in block groups. */
73#define BTRFS_RAID_STRIPE_TREE_OBJECTID 12ULL73#define BTRFS_RAID_STRIPE_TREE_OBJECTID 12ULL
7474
75/* Holds details of remapped addresses after relocation. */
76#define BTRFS_REMAP_TREE_OBJECTID 13ULL
77
75/* device stats in the device tree */78/* device stats in the device tree */
76#define BTRFS_DEV_STATS_OBJECTID 0ULL79#define BTRFS_DEV_STATS_OBJECTID 0ULL
7780
...@@ -278,6 +281,10 @@...@@ -278,6 +281,10 @@
278281
279#define BTRFS_RAID_STRIPE_KEY 230282#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
281/*288/*
282 * Records the overall state of the qgroups.289 * Records the overall state of the qgroups.
283 * There's only one instance of this key present,290 * There's only one instance of this key present,
...@@ -710,9 +717,12 @@ struct btrfs_super_block {...@@ -710,9 +717,12 @@ struct btrfs_super_block {
710 __u8 metadata_uuid[BTRFS_FSID_SIZE];717 __u8 metadata_uuid[BTRFS_FSID_SIZE];
711718
712 __u64 nr_global_roots;719 __u64 nr_global_roots;
720 __le64 remap_root;
721 __le64 remap_root_generation;
722 __u8 remap_root_level;
713723
714 /* Future expansion */724 /* Future expansion */
715 __le64 reserved[27];725 __u8 reserved[199];
716 __u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];726 __u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
717 struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];727 struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];
718728
...@@ -1157,12 +1167,15 @@ struct btrfs_dev_replace_item {...@@ -1157,12 +1167,15 @@ struct btrfs_dev_replace_item {
1157#define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8)1167#define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8)
1158#define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9)1168#define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9)
1159#define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10)1169#define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10)
1170#define BTRFS_BLOCK_GROUP_REMAPPED (1ULL << 11)
1171#define BTRFS_BLOCK_GROUP_METADATA_REMAP (1ULL << 12)
1160#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \1172#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \
1161 BTRFS_SPACE_INFO_GLOBAL_RSV)1173 BTRFS_SPACE_INFO_GLOBAL_RSV)
11621174
1163#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \1175#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \
1164 BTRFS_BLOCK_GROUP_SYSTEM | \1176 BTRFS_BLOCK_GROUP_SYSTEM | \
1165 BTRFS_BLOCK_GROUP_METADATA)1177 BTRFS_BLOCK_GROUP_METADATA | \
1178 BTRFS_BLOCK_GROUP_METADATA_REMAP)
11661179
1167#define BTRFS_BLOCK_GROUP_PROFILE_MASK (BTRFS_BLOCK_GROUP_RAID0 | \1180#define BTRFS_BLOCK_GROUP_PROFILE_MASK (BTRFS_BLOCK_GROUP_RAID0 | \
1168 BTRFS_BLOCK_GROUP_RAID1 | \1181 BTRFS_BLOCK_GROUP_RAID1 | \
...@@ -1215,6 +1228,14 @@ struct btrfs_block_group_item {...@@ -1215,6 +1228,14 @@ struct btrfs_block_group_item {
1215 __le64 flags;1228 __le64 flags;
1216} __attribute__ ((__packed__));1229} __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
1218struct btrfs_free_space_info {1239struct btrfs_free_space_info {
1219 __le32 extent_count;1240 __le32 extent_count;
1220 __le32 flags;1241 __le32 flags;
...@@ -1319,4 +1340,13 @@ struct btrfs_verity_descriptor_item {...@@ -1319,4 +1340,13 @@ struct btrfs_verity_descriptor_item {
1319 __u8 encryption;1340 __u8 encryption;
1320} __attribute__ ((__packed__));1341} __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
1322#endif /* _BTRFS_CTREE_H_ */1352#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 @@...@@ -20,6 +20,7 @@
20#ifndef _DMA_BUF_UAPI_H_20#ifndef _DMA_BUF_UAPI_H_
21#define _DMA_BUF_UAPI_H_21#define _DMA_BUF_UAPI_H_
2222
23#include <linux/ioctl.h>
23#include <linux/types.h>24#include <linux/types.h>
2425
25/**26/**
lib/libc/include/any-linux-any/linux/dpll.h+1
...@@ -253,6 +253,7 @@ enum dpll_a_pin {...@@ -253,6 +253,7 @@ enum dpll_a_pin {
253 DPLL_A_PIN_ESYNC_PULSE,253 DPLL_A_PIN_ESYNC_PULSE,
254 DPLL_A_PIN_REFERENCE_SYNC,254 DPLL_A_PIN_REFERENCE_SYNC,
255 DPLL_A_PIN_PHASE_ADJUST_GRAN,255 DPLL_A_PIN_PHASE_ADJUST_GRAN,
256 DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT,
256257
257 __DPLL_A_PIN_MAX,258 __DPLL_A_PIN_MAX,
258 DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)259 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 {...@@ -545,6 +545,8 @@ typedef struct elf64_shdr {
545#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */545#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
546#define NN_RISCV_TAGGED_ADDR_CTRL "LINUX"546#define NN_RISCV_TAGGED_ADDR_CTRL "LINUX"
547#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */547#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */
548#define NN_RISCV_USER_CFI "LINUX"
549#define NT_RISCV_USER_CFI 0x903 /* RISC-V shadow stack state */
548#define NN_LOONGARCH_CPUCFG "LINUX"550#define NN_LOONGARCH_CPUCFG "LINUX"
549#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */551#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
550#define NN_LOONGARCH_CSR "LINUX"552#define NN_LOONGARCH_CSR "LINUX"
lib/libc/include/any-linux-any/linux/ethtool.h+21-5
...@@ -15,11 +15,10 @@...@@ -15,11 +15,10 @@
15#define _LINUX_ETHTOOL_H15#define _LINUX_ETHTOOL_H
1616
17#include <linux/const.h>17#include <linux/const.h>
18#include <linux/typelimits.h>
18#include <linux/types.h>19#include <linux/types.h>
19#include <linux/if_ether.h>20#include <linux/if_ether.h>
2021
21#include <limits.h> /* for INT_MAX */
22
23/* All structures exposed to userland should be defined such that they22/* All structures exposed to userland should be defined such that they
24 * have the same layout for 32-bit and 64-bit userland.23 * have the same layout for 32-bit and 64-bit userland.
25 */24 */
...@@ -601,6 +600,8 @@ enum ethtool_link_ext_state {...@@ -601,6 +600,8 @@ enum ethtool_link_ext_state {
601 ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,600 ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
602 ETHTOOL_LINK_EXT_STATE_OVERHEAT,601 ETHTOOL_LINK_EXT_STATE_OVERHEAT,
603 ETHTOOL_LINK_EXT_STATE_MODULE,602 ETHTOOL_LINK_EXT_STATE_MODULE,
603 ETHTOOL_LINK_EXT_STATE_OTP_SPEED_VIOLATION,
604 ETHTOOL_LINK_EXT_STATE_BMC_REQUEST_DOWN,
604};605};
605606
606/* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */607/* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */
...@@ -1092,13 +1093,20 @@ enum ethtool_module_fw_flash_status {...@@ -1092,13 +1093,20 @@ enum ethtool_module_fw_flash_status {
1092 * struct ethtool_gstrings - string set for data tagging1093 * struct ethtool_gstrings - string set for data tagging
1093 * @cmd: Command number = %ETHTOOL_GSTRINGS1094 * @cmd: Command number = %ETHTOOL_GSTRINGS
1094 * @string_set: String set ID; one of &enum ethtool_stringset1095 * @string_set: String set ID; one of &enum ethtool_stringset
1095 * @len: On return, the number of strings in the string set1096 * @len: Number of strings in the string set
1096 * @data: Buffer for strings. Each string is null-padded to a size of1097 * @data: Buffer for strings. Each string is null-padded to a size of
1097 * %ETH_GSTRING_LEN.1098 * %ETH_GSTRING_LEN.
1098 *1099 *
1099 * Users must use %ETHTOOL_GSSET_INFO to find the number of strings in1100 * Users must use %ETHTOOL_GSSET_INFO to find the number of strings in
1100 * the string set. They must allocate a buffer of the appropriate1101 * the string set. They must allocate a buffer of the appropriate
1101 * size immediately following this structure.1102 * size immediately following this structure.
1103 *
1104 * Setting @len on input is optional (though preferred), but must be zeroed
1105 * otherwise.
1106 * When set, @len will return the requested count if it matches the actual
1107 * count; otherwise, it will be zero.
1108 * This prevents issues when the number of strings is different than the
1109 * userspace allocation.
1102 */1110 */
1103struct ethtool_gstrings {1111struct ethtool_gstrings {
1104 __u32 cmd;1112 __u32 cmd;
...@@ -1175,13 +1183,20 @@ struct ethtool_test {...@@ -1175,13 +1183,20 @@ struct ethtool_test {
1175/**1183/**
1176 * struct ethtool_stats - device-specific statistics1184 * struct ethtool_stats - device-specific statistics
1177 * @cmd: Command number = %ETHTOOL_GSTATS1185 * @cmd: Command number = %ETHTOOL_GSTATS
1178 * @n_stats: On return, the number of statistics1186 * @n_stats: Number of statistics
1179 * @data: Array of statistics1187 * @data: Array of statistics
1180 *1188 *
1181 * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the1189 * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the
1182 * number of statistics that will be returned. They must allocate a1190 * number of statistics that will be returned. They must allocate a
1183 * buffer of the appropriate size (8 * number of statistics)1191 * buffer of the appropriate size (8 * number of statistics)
1184 * immediately following this structure.1192 * immediately following this structure.
1193 *
1194 * Setting @n_stats on input is optional (though preferred), but must be zeroed
1195 * otherwise.
1196 * When set, @n_stats will return the requested count if it matches the actual
1197 * count; otherwise, it will be zero.
1198 * This prevents issues when the number of stats is different than the
1199 * userspace allocation.
1185 */1200 */
1186struct ethtool_stats {1201struct ethtool_stats {
1187 __u32 cmd;1202 __u32 cmd;
...@@ -2188,6 +2203,7 @@ enum ethtool_link_mode_bit_indices {...@@ -2188,6 +2203,7 @@ enum ethtool_link_mode_bit_indices {
2188#define SPEED_40000 400002203#define SPEED_40000 40000
2189#define SPEED_50000 500002204#define SPEED_50000 50000
2190#define SPEED_56000 560002205#define SPEED_56000 56000
2206#define SPEED_80000 80000
2191#define SPEED_100000 1000002207#define SPEED_100000 100000
2192#define SPEED_200000 2000002208#define SPEED_200000 200000
2193#define SPEED_400000 4000002209#define SPEED_400000 400000
...@@ -2198,7 +2214,7 @@ enum ethtool_link_mode_bit_indices {...@@ -2198,7 +2214,7 @@ enum ethtool_link_mode_bit_indices {
21982214
2199static __inline__ int ethtool_validate_speed(__u32 speed)2215static __inline__ int ethtool_validate_speed(__u32 speed)
2200{2216{
2201 return speed <= INT_MAX || speed == (__u32)SPEED_UNKNOWN;2217 return speed <= __KERNEL_INT_MAX || speed == (__u32)SPEED_UNKNOWN;
2202}2218}
22032219
2204/* Duplex, half or full. */2220/* Duplex, half or full. */
lib/libc/include/any-linux-any/linux/fs.h+1
...@@ -249,6 +249,7 @@ struct file_attr {...@@ -249,6 +249,7 @@ struct file_attr {
249#define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */249#define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */
250#define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */250#define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */
251#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */251#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */
252#define FS_XFLAG_VERITY 0x00020000 /* fs-verity enabled */
252#define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */253#define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
253254
254/* the read-only stuff doesn't really belong here, but any other place is255/* 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 {...@@ -362,7 +362,7 @@ struct hv_kvp_exchg_msg_value {
362 __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];362 __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
363 __u32 value_u32;363 __u32 value_u32;
364 __u64 value_u64;364 __u64 value_u64;
365 };365 } __attribute__((packed));
366} __attribute__((packed));366} __attribute__((packed));
367367
368struct hv_kvp_msg_enumerate {368struct hv_kvp_msg_enumerate {
lib/libc/include/any-linux-any/linux/idxd.h+134-134
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3#ifndef _USR_IDXD_H_3#ifndef _USR_IDXD_H_
4#define _USR_IDXD_H_4#define _USR_IDXD_H_
55
6#include <stdint.h>6#include <linux/types.h>
77
8/* Driver command error status */8/* Driver command error status */
9enum idxd_scmd_stat {9enum idxd_scmd_stat {
...@@ -172,132 +172,132 @@ enum iax_completion_status {...@@ -172,132 +172,132 @@ enum iax_completion_status {
172#define DSA_COMP_STATUS(status) ((status) & DSA_COMP_STATUS_MASK)172#define DSA_COMP_STATUS(status) ((status) & DSA_COMP_STATUS_MASK)
173173
174struct dsa_hw_desc {174struct dsa_hw_desc {
175 uint32_t pasid:20;175 __u32 pasid:20;
176 uint32_t rsvd:11;176 __u32 rsvd:11;
177 uint32_t priv:1;177 __u32 priv:1;
178 uint32_t flags:24;178 __u32 flags:24;
179 uint32_t opcode:8;179 __u32 opcode:8;
180 uint64_t completion_addr;180 __u64 completion_addr;
181 union {181 union {
182 uint64_t src_addr;182 __u64 src_addr;
183 uint64_t rdback_addr;183 __u64 rdback_addr;
184 uint64_t pattern;184 __u64 pattern;
185 uint64_t desc_list_addr;185 __u64 desc_list_addr;
186 uint64_t pattern_lower;186 __u64 pattern_lower;
187 uint64_t transl_fetch_addr;187 __u64 transl_fetch_addr;
188 };188 };
189 union {189 union {
190 uint64_t dst_addr;190 __u64 dst_addr;
191 uint64_t rdback_addr2;191 __u64 rdback_addr2;
192 uint64_t src2_addr;192 __u64 src2_addr;
193 uint64_t comp_pattern;193 __u64 comp_pattern;
194 };194 };
195 union {195 union {
196 uint32_t xfer_size;196 __u32 xfer_size;
197 uint32_t desc_count;197 __u32 desc_count;
198 uint32_t region_size;198 __u32 region_size;
199 };199 };
200 uint16_t int_handle;200 __u16 int_handle;
201 uint16_t rsvd1;201 __u16 rsvd1;
202 union {202 union {
203 uint8_t expected_res;203 __u8 expected_res;
204 /* create delta record */204 /* create delta record */
205 struct {205 struct {
206 uint64_t delta_addr;206 __u64 delta_addr;
207 uint32_t max_delta_size;207 __u32 max_delta_size;
208 uint32_t delt_rsvd;208 __u32 delt_rsvd;
209 uint8_t expected_res_mask;209 __u8 expected_res_mask;
210 };210 };
211 uint32_t delta_rec_size;211 __u32 delta_rec_size;
212 uint64_t dest2;212 __u64 dest2;
213 /* CRC */213 /* CRC */
214 struct {214 struct {
215 uint32_t crc_seed;215 __u32 crc_seed;
216 uint32_t crc_rsvd;216 __u32 crc_rsvd;
217 uint64_t seed_addr;217 __u64 seed_addr;
218 };218 };
219 /* DIF check or strip */219 /* DIF check or strip */
220 struct {220 struct {
221 uint8_t src_dif_flags;221 __u8 src_dif_flags;
222 uint8_t dif_chk_res;222 __u8 dif_chk_res;
223 uint8_t dif_chk_flags;223 __u8 dif_chk_flags;
224 uint8_t dif_chk_res2[5];224 __u8 dif_chk_res2[5];
225 uint32_t chk_ref_tag_seed;225 __u32 chk_ref_tag_seed;
226 uint16_t chk_app_tag_mask;226 __u16 chk_app_tag_mask;
227 uint16_t chk_app_tag_seed;227 __u16 chk_app_tag_seed;
228 };228 };
229 /* DIF insert */229 /* DIF insert */
230 struct {230 struct {
231 uint8_t dif_ins_res;231 __u8 dif_ins_res;
232 uint8_t dest_dif_flag;232 __u8 dest_dif_flag;
233 uint8_t dif_ins_flags;233 __u8 dif_ins_flags;
234 uint8_t dif_ins_res2[13];234 __u8 dif_ins_res2[13];
235 uint32_t ins_ref_tag_seed;235 __u32 ins_ref_tag_seed;
236 uint16_t ins_app_tag_mask;236 __u16 ins_app_tag_mask;
237 uint16_t ins_app_tag_seed;237 __u16 ins_app_tag_seed;
238 };238 };
239 /* DIF update */239 /* DIF update */
240 struct {240 struct {
241 uint8_t src_upd_flags;241 __u8 src_upd_flags;
242 uint8_t upd_dest_flags;242 __u8 upd_dest_flags;
243 uint8_t dif_upd_flags;243 __u8 dif_upd_flags;
244 uint8_t dif_upd_res[5];244 __u8 dif_upd_res[5];
245 uint32_t src_ref_tag_seed;245 __u32 src_ref_tag_seed;
246 uint16_t src_app_tag_mask;246 __u16 src_app_tag_mask;
247 uint16_t src_app_tag_seed;247 __u16 src_app_tag_seed;
248 uint32_t dest_ref_tag_seed;248 __u32 dest_ref_tag_seed;
249 uint16_t dest_app_tag_mask;249 __u16 dest_app_tag_mask;
250 uint16_t dest_app_tag_seed;250 __u16 dest_app_tag_seed;
251 };251 };
252252
253 /* Fill */253 /* Fill */
254 uint64_t pattern_upper;254 __u64 pattern_upper;
255255
256 /* Translation fetch */256 /* Translation fetch */
257 struct {257 struct {
258 uint64_t transl_fetch_res;258 __u64 transl_fetch_res;
259 uint32_t region_stride;259 __u32 region_stride;
260 };260 };
261261
262 /* DIX generate */262 /* DIX generate */
263 struct {263 struct {
264 uint8_t dix_gen_res;264 __u8 dix_gen_res;
265 uint8_t dest_dif_flags;265 __u8 dest_dif_flags;
266 uint8_t dif_flags;266 __u8 dif_flags;
267 uint8_t dix_gen_res2[13];267 __u8 dix_gen_res2[13];
268 uint32_t ref_tag_seed;268 __u32 ref_tag_seed;
269 uint16_t app_tag_mask;269 __u16 app_tag_mask;
270 uint16_t app_tag_seed;270 __u16 app_tag_seed;
271 };271 };
272272
273 uint8_t op_specific[24];273 __u8 op_specific[24];
274 };274 };
275} __attribute__((packed));275} __attribute__((packed));
276276
277struct iax_hw_desc {277struct iax_hw_desc {
278 uint32_t pasid:20;278 __u32 pasid:20;
279 uint32_t rsvd:11;279 __u32 rsvd:11;
280 uint32_t priv:1;280 __u32 priv:1;
281 uint32_t flags:24;281 __u32 flags:24;
282 uint32_t opcode:8;282 __u32 opcode:8;
283 uint64_t completion_addr;283 __u64 completion_addr;
284 uint64_t src1_addr;284 __u64 src1_addr;
285 uint64_t dst_addr;285 __u64 dst_addr;
286 uint32_t src1_size;286 __u32 src1_size;
287 uint16_t int_handle;287 __u16 int_handle;
288 union {288 union {
289 uint16_t compr_flags;289 __u16 compr_flags;
290 uint16_t decompr_flags;290 __u16 decompr_flags;
291 };291 };
292 uint64_t src2_addr;292 __u64 src2_addr;
293 uint32_t max_dst_size;293 __u32 max_dst_size;
294 uint32_t src2_size;294 __u32 src2_size;
295 uint32_t filter_flags;295 __u32 filter_flags;
296 uint32_t num_inputs;296 __u32 num_inputs;
297} __attribute__((packed));297} __attribute__((packed));
298298
299struct dsa_raw_desc {299struct dsa_raw_desc {
300 uint64_t field[8];300 __u64 field[8];
301} __attribute__((packed));301} __attribute__((packed));
302302
303/*303/*
...@@ -305,91 +305,91 @@ struct dsa_raw_desc {...@@ -305,91 +305,91 @@ struct dsa_raw_desc {
305 * __volatile__ and prevent the compiler from optimize the read.305 * __volatile__ and prevent the compiler from optimize the read.
306 */306 */
307struct dsa_completion_record {307struct dsa_completion_record {
308 __volatile__ uint8_t status;308 __volatile__ __u8 status;
309 union {309 union {
310 uint8_t result;310 __u8 result;
311 uint8_t dif_status;311 __u8 dif_status;
312 };312 };
313 uint8_t fault_info;313 __u8 fault_info;
314 uint8_t rsvd;314 __u8 rsvd;
315 union {315 union {
316 uint32_t bytes_completed;316 __u32 bytes_completed;
317 uint32_t descs_completed;317 __u32 descs_completed;
318 };318 };
319 uint64_t fault_addr;319 __u64 fault_addr;
320 union {320 union {
321 /* common record */321 /* common record */
322 struct {322 struct {
323 uint32_t invalid_flags:24;323 __u32 invalid_flags:24;
324 uint32_t rsvd2:8;324 __u32 rsvd2:8;
325 };325 };
326326
327 uint32_t delta_rec_size;327 __u32 delta_rec_size;
328 uint64_t crc_val;328 __u64 crc_val;
329329
330 /* DIF check & strip */330 /* DIF check & strip */
331 struct {331 struct {
332 uint32_t dif_chk_ref_tag;332 __u32 dif_chk_ref_tag;
333 uint16_t dif_chk_app_tag_mask;333 __u16 dif_chk_app_tag_mask;
334 uint16_t dif_chk_app_tag;334 __u16 dif_chk_app_tag;
335 };335 };
336336
337 /* DIF insert */337 /* DIF insert */
338 struct {338 struct {
339 uint64_t dif_ins_res;339 __u64 dif_ins_res;
340 uint32_t dif_ins_ref_tag;340 __u32 dif_ins_ref_tag;
341 uint16_t dif_ins_app_tag_mask;341 __u16 dif_ins_app_tag_mask;
342 uint16_t dif_ins_app_tag;342 __u16 dif_ins_app_tag;
343 };343 };
344344
345 /* DIF update */345 /* DIF update */
346 struct {346 struct {
347 uint32_t dif_upd_src_ref_tag;347 __u32 dif_upd_src_ref_tag;
348 uint16_t dif_upd_src_app_tag_mask;348 __u16 dif_upd_src_app_tag_mask;
349 uint16_t dif_upd_src_app_tag;349 __u16 dif_upd_src_app_tag;
350 uint32_t dif_upd_dest_ref_tag;350 __u32 dif_upd_dest_ref_tag;
351 uint16_t dif_upd_dest_app_tag_mask;351 __u16 dif_upd_dest_app_tag_mask;
352 uint16_t dif_upd_dest_app_tag;352 __u16 dif_upd_dest_app_tag;
353 };353 };
354354
355 /* DIX generate */355 /* DIX generate */
356 struct {356 struct {
357 uint64_t dix_gen_res;357 __u64 dix_gen_res;
358 uint32_t dix_ref_tag;358 __u32 dix_ref_tag;
359 uint16_t dix_app_tag_mask;359 __u16 dix_app_tag_mask;
360 uint16_t dix_app_tag;360 __u16 dix_app_tag;
361 };361 };
362362
363 uint8_t op_specific[16];363 __u8 op_specific[16];
364 };364 };
365} __attribute__((packed));365} __attribute__((packed));
366366
367struct dsa_raw_completion_record {367struct dsa_raw_completion_record {
368 uint64_t field[4];368 __u64 field[4];
369} __attribute__((packed));369} __attribute__((packed));
370370
371struct iax_completion_record {371struct iax_completion_record {
372 __volatile__ uint8_t status;372 __volatile__ __u8 status;
373 uint8_t error_code;373 __u8 error_code;
374 uint8_t fault_info;374 __u8 fault_info;
375 uint8_t rsvd;375 __u8 rsvd;
376 uint32_t bytes_completed;376 __u32 bytes_completed;
377 uint64_t fault_addr;377 __u64 fault_addr;
378 uint32_t invalid_flags;378 __u32 invalid_flags;
379 uint32_t rsvd2;379 __u32 rsvd2;
380 uint32_t output_size;380 __u32 output_size;
381 uint8_t output_bits;381 __u8 output_bits;
382 uint8_t rsvd3;382 __u8 rsvd3;
383 uint16_t xor_csum;383 __u16 xor_csum;
384 uint32_t crc;384 __u32 crc;
385 uint32_t min;385 __u32 min;
386 uint32_t max;386 __u32 max;
387 uint32_t sum;387 __u32 sum;
388 uint64_t rsvd4[2];388 __u64 rsvd4[2];
389} __attribute__((packed));389} __attribute__((packed));
390390
391struct iax_raw_completion_record {391struct iax_raw_completion_record {
392 uint64_t field[8];392 __u64 field[8];
393} __attribute__((packed));393} __attribute__((packed));
394394
395#endif395#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 {...@@ -42,7 +42,7 @@ struct sockaddr_alg_new {
4242
43struct af_alg_iv {43struct af_alg_iv {
44 __u32 ivlen;44 __u32 ivlen;
45 __u8 iv[];45 __u8 iv[] __counted_by(ivlen);
46};46};
4747
48/* Socket options */48/* Socket options */
lib/libc/include/any-linux-any/linux/if_link.h+1
...@@ -1441,6 +1441,7 @@ enum {...@@ -1441,6 +1441,7 @@ enum {
1441 IFLA_GENEVE_DF,1441 IFLA_GENEVE_DF,
1442 IFLA_GENEVE_INNER_PROTO_INHERIT,1442 IFLA_GENEVE_INNER_PROTO_INHERIT,
1443 IFLA_GENEVE_PORT_RANGE,1443 IFLA_GENEVE_PORT_RANGE,
1444 IFLA_GENEVE_GRO_HINT,
1444 __IFLA_GENEVE_MAX1445 __IFLA_GENEVE_MAX
1445};1446};
1446#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)1447#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
lib/libc/include/any-linux-any/linux/input-event-codes.h+4
...@@ -643,6 +643,10 @@...@@ -643,6 +643,10 @@
643#define KEY_EPRIVACY_SCREEN_ON 0x252643#define KEY_EPRIVACY_SCREEN_ON 0x252
644#define KEY_EPRIVACY_SCREEN_OFF 0x253644#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
646#define KEY_KBDINPUTASSIST_PREV 0x260650#define KEY_KBDINPUTASSIST_PREV 0x260
647#define KEY_KBDINPUTASSIST_NEXT 0x261651#define KEY_KBDINPUTASSIST_NEXT 0x261
648#define KEY_KBDINPUTASSIST_PREVGROUP 0x262652#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 {...@@ -188,7 +188,8 @@ enum io_uring_sqe_flags_bit {
188/*188/*
189 * If COOP_TASKRUN is set, get notified if task work is available for189 * If COOP_TASKRUN is set, get notified if task work is available for
190 * running and a kernel transition would be needed to run it. This sets190 * 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.
192 */193 */
193#define IORING_SETUP_TASKRUN_FLAG (1U << 9)194#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
194#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */195#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
...@@ -237,6 +238,18 @@ enum io_uring_sqe_flags_bit {...@@ -237,6 +238,18 @@ enum io_uring_sqe_flags_bit {
237 */238 */
238#define IORING_SETUP_SQE_MIXED (1U << 19)239#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
240enum io_uring_op {253enum io_uring_op {
241 IORING_OP_NOP,254 IORING_OP_NOP,
242 IORING_OP_READV,255 IORING_OP_READV,
...@@ -700,6 +713,9 @@ enum io_uring_register_op {...@@ -700,6 +713,9 @@ enum io_uring_register_op {
700 /* auxiliary zcrx configuration, see enum zcrx_ctrl_op */713 /* auxiliary zcrx configuration, see enum zcrx_ctrl_op */
701 IORING_REGISTER_ZCRX_CTRL = 36,714 IORING_REGISTER_ZCRX_CTRL = 36,
702715
716 /* register bpf filtering programs */
717 IORING_REGISTER_BPF_FILTER = 37,
718
703 /* this goes last */719 /* this goes last */
704 IORING_REGISTER_LAST,720 IORING_REGISTER_LAST,
705721
...@@ -805,6 +821,13 @@ struct io_uring_restriction {...@@ -805,6 +821,13 @@ struct io_uring_restriction {
805 __u32 resv2[3];821 __u32 resv2[3];
806};822};
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
808struct io_uring_clock_register {831struct io_uring_clock_register {
809 __u32 clockid;832 __u32 clockid;
810 __u32 __resv[3];833 __u32 __resv[3];
...@@ -1068,6 +1091,14 @@ enum zcrx_reg_flags {...@@ -1068,6 +1091,14 @@ enum zcrx_reg_flags {
1068 ZCRX_REG_IMPORT = 1,1091 ZCRX_REG_IMPORT = 1,
1069};1092};
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
1071/*1102/*
1072 * Argument for IORING_REGISTER_ZCRX_IFQ1103 * Argument for IORING_REGISTER_ZCRX_IFQ
1073 */1104 */
...@@ -1082,7 +1113,7 @@ struct io_uring_zcrx_ifq_reg {...@@ -1082,7 +1113,7 @@ struct io_uring_zcrx_ifq_reg {
10821113
1083 struct io_uring_zcrx_offsets offsets;1114 struct io_uring_zcrx_offsets offsets;
1084 __u32 zcrx_id;1115 __u32 zcrx_id;
1085 __u32 __resv2;1116 __u32 rx_buf_len;
1086 __u64 __resv[3];1117 __u64 __resv[3];
1087};1118};
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 @@...@@ -1,6 +1,9 @@
1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
2/*2/*
3 * Header file for the io_uring query interface.3 * 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.
4 */7 */
5#ifndef LINUX_IO_URING_QUERY_H8#ifndef LINUX_IO_URING_QUERY_H
6#define LINUX_IO_URING_QUERY_H9#define LINUX_IO_URING_QUERY_H
...@@ -50,7 +53,8 @@ struct io_uring_query_zcrx {...@@ -50,7 +53,8 @@ struct io_uring_query_zcrx {
50 __u64 area_flags;53 __u64 area_flags;
51 /* The number of supported ZCRX_CTRL_* opcodes */54 /* The number of supported ZCRX_CTRL_* opcodes */
52 __u32 nr_ctrl_opcodes;55 __u32 nr_ctrl_opcodes;
53 __u32 __resv1;56 /* Bitmask of ZCRX_FEATURE_* indicating which features are available */
57 __u32 features;
54 /* The refill ring header size */58 /* The refill ring header size */
55 __u32 rq_hdr_size;59 __u32 rq_hdr_size;
56 /* The alignment for the header */60 /* The alignment for the header */
lib/libc/include/any-linux-any/linux/iommufd.h+39
...@@ -465,16 +465,27 @@ struct iommu_hwpt_arm_smmuv3 {...@@ -465,16 +465,27 @@ struct iommu_hwpt_arm_smmuv3 {
465 __aligned_le64 ste[2];465 __aligned_le64 ste[2];
466};466};
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
468/**477/**
469 * enum iommu_hwpt_data_type - IOMMU HWPT Data Type478 * enum iommu_hwpt_data_type - IOMMU HWPT Data Type
470 * @IOMMU_HWPT_DATA_NONE: no data479 * @IOMMU_HWPT_DATA_NONE: no data
471 * @IOMMU_HWPT_DATA_VTD_S1: Intel VT-d stage-1 page table480 * @IOMMU_HWPT_DATA_VTD_S1: Intel VT-d stage-1 page table
472 * @IOMMU_HWPT_DATA_ARM_SMMUV3: ARM SMMUv3 Context Descriptor Table481 * @IOMMU_HWPT_DATA_ARM_SMMUV3: ARM SMMUv3 Context Descriptor Table
482 * @IOMMU_HWPT_DATA_AMD_GUEST: AMD IOMMU guest page table
473 */483 */
474enum iommu_hwpt_data_type {484enum iommu_hwpt_data_type {
475 IOMMU_HWPT_DATA_NONE = 0,485 IOMMU_HWPT_DATA_NONE = 0,
476 IOMMU_HWPT_DATA_VTD_S1 = 1,486 IOMMU_HWPT_DATA_VTD_S1 = 1,
477 IOMMU_HWPT_DATA_ARM_SMMUV3 = 2,487 IOMMU_HWPT_DATA_ARM_SMMUV3 = 2,
488 IOMMU_HWPT_DATA_AMD_GUEST = 3,
478};489};
479490
480/**491/**
...@@ -623,6 +634,32 @@ struct iommu_hw_info_tegra241_cmdqv {...@@ -623,6 +634,32 @@ struct iommu_hw_info_tegra241_cmdqv {
623 __u8 __reserved;634 __u8 __reserved;
624};635};
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
626/**663/**
627 * enum iommu_hw_info_type - IOMMU Hardware Info Types664 * enum iommu_hw_info_type - IOMMU Hardware Info Types
628 * @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not report hardware665 * @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not report hardware
...@@ -632,6 +669,7 @@ struct iommu_hw_info_tegra241_cmdqv {...@@ -632,6 +669,7 @@ struct iommu_hw_info_tegra241_cmdqv {
632 * @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type669 * @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type
633 * @IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM670 * @IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM
634 * SMMUv3) info type671 * SMMUv3) info type
672 * @IOMMU_HW_INFO_TYPE_AMD: AMD IOMMU info type
635 */673 */
636enum iommu_hw_info_type {674enum iommu_hw_info_type {
637 IOMMU_HW_INFO_TYPE_NONE = 0,675 IOMMU_HW_INFO_TYPE_NONE = 0,
...@@ -639,6 +677,7 @@ enum iommu_hw_info_type {...@@ -639,6 +677,7 @@ enum iommu_hw_info_type {
639 IOMMU_HW_INFO_TYPE_INTEL_VTD = 1,677 IOMMU_HW_INFO_TYPE_INTEL_VTD = 1,
640 IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2,678 IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2,
641 IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV = 3,679 IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV = 3,
680 IOMMU_HW_INFO_TYPE_AMD = 4,
642};681};
643682
644/**683/**
lib/libc/include/any-linux-any/linux/kfd_ioctl.h+13-3
...@@ -44,9 +44,13 @@...@@ -44,9 +44,13 @@
44 * - 1.16 - Add contiguous VRAM allocation flag44 * - 1.16 - Add contiguous VRAM allocation flag
45 * - 1.17 - Add SDMA queue creation with target SDMA engine ID45 * - 1.17 - Add SDMA queue creation with target SDMA engine ID
46 * - 1.18 - Rename pad in set_memory_policy_args to misc_process_flag46 * - 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
47 */51 */
48#define KFD_IOCTL_MAJOR_VERSION 152#define KFD_IOCTL_MAJOR_VERSION 1
49#define KFD_IOCTL_MINOR_VERSION 1853#define KFD_IOCTL_MINOR_VERSION 22
5054
51struct kfd_ioctl_get_version_args {55struct kfd_ioctl_get_version_args {
52 __u32 major_version; /* from KFD */56 __u32 major_version; /* from KFD */
...@@ -84,7 +88,7 @@ struct kfd_ioctl_create_queue_args {...@@ -84,7 +88,7 @@ struct kfd_ioctl_create_queue_args {
84 __u32 ctx_save_restore_size; /* to KFD */88 __u32 ctx_save_restore_size; /* to KFD */
85 __u32 ctl_stack_size; /* to KFD */89 __u32 ctl_stack_size; /* to KFD */
86 __u32 sdma_engine_id; /* to KFD */90 __u32 sdma_engine_id; /* to KFD */
87 __u32 pad;91 __u32 metadata_ring_size; /* to KFD */
88};92};
8993
90struct kfd_ioctl_destroy_queue_args {94struct kfd_ioctl_destroy_queue_args {
...@@ -145,6 +149,8 @@ struct kfd_dbg_device_info_entry {...@@ -145,6 +149,8 @@ struct kfd_dbg_device_info_entry {
145 __u32 num_xcc;149 __u32 num_xcc;
146 __u32 capability;150 __u32 capability;
147 __u32 debug_prop;151 __u32 debug_prop;
152 __u32 capability2;
153 __u32 pad;
148};154};
149155
150/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */156/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
...@@ -945,6 +951,7 @@ enum kfd_dbg_trap_address_watch_mode {...@@ -945,6 +951,7 @@ enum kfd_dbg_trap_address_watch_mode {
945enum kfd_dbg_trap_flags {951enum kfd_dbg_trap_flags {
946 KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP = 1,952 KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP = 1,
947 KFD_DBG_TRAP_FLAG_SINGLE_ALU_OP = 2,953 KFD_DBG_TRAP_FLAG_SINGLE_ALU_OP = 2,
954 KFD_DBG_TRAP_FLAG_LDS_OUT_OF_ADDR_RANGE = 4
948};955};
949956
950/* Trap exceptions */957/* Trap exceptions */
...@@ -1671,7 +1678,10 @@ struct kfd_ioctl_dbg_trap_args {...@@ -1671,7 +1678,10 @@ struct kfd_ioctl_dbg_trap_args {
1671#define AMDKFD_IOC_DBG_TRAP \1678#define AMDKFD_IOC_DBG_TRAP \
1672 AMDKFD_IOWR(0x26, struct kfd_ioctl_dbg_trap_args)1679 AMDKFD_IOWR(0x26, struct kfd_ioctl_dbg_trap_args)
16731680
1681#define AMDKFD_IOC_CREATE_PROCESS \
1682 AMDKFD_IO(0x27)
1683
1674#define AMDKFD_COMMAND_START 0x011684#define AMDKFD_COMMAND_START 0x01
1675#define AMDKFD_COMMAND_END 0x271685#define AMDKFD_COMMAND_END 0x28
16761686
1677#endif1687#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/kfd_sysfs.h+2-1
...@@ -64,7 +64,8 @@...@@ -64,7 +64,8 @@
64#define HSA_CAP_RESERVED 0x000f800064#define HSA_CAP_RESERVED 0x000f8000
6565
66#define HSA_CAP2_PER_SDMA_QUEUE_RESET_SUPPORTED 0x0000000166#define HSA_CAP2_PER_SDMA_QUEUE_RESET_SUPPORTED 0x00000001
67#define HSA_CAP2_RESERVED 0xfffffffe67#define HSA_CAP2_TRAP_DEBUG_LDS_OUT_OF_ADDR_RANGE_SUPPORTED 0x00000002
68#define HSA_CAP2_RESERVED 0xfffffffc
6869
69/* debug_prop bits in node properties */70/* debug_prop bits in node properties */
70#define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f71#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 @@...@@ -11,9 +11,11 @@
11#include <linux/const.h>11#include <linux/const.h>
12#include <linux/types.h>12#include <linux/types.h>
1313
14#include <linux/stddef.h>
14#include <linux/ioctl.h>15#include <linux/ioctl.h>
15#include <asm/kvm.h>16#include <asm/kvm.h>
1617
18
17#define KVM_API_VERSION 1219#define KVM_API_VERSION 12
1820
19/*21/*
...@@ -135,6 +137,12 @@ struct kvm_xen_exit {...@@ -135,6 +137,12 @@ struct kvm_xen_exit {
135 } u;137 } u;
136};138};
137139
140struct kvm_exit_snp_req_certs {
141 __u64 gpa;
142 __u64 npages;
143 __u64 ret;
144};
145
138#define KVM_S390_GET_SKEYS_NONE 1146#define KVM_S390_GET_SKEYS_NONE 1
139#define KVM_S390_SKEYS_MAX 1048576147#define KVM_S390_SKEYS_MAX 1048576
140148
...@@ -180,6 +188,8 @@ struct kvm_xen_exit {...@@ -180,6 +188,8 @@ struct kvm_xen_exit {
180#define KVM_EXIT_MEMORY_FAULT 39188#define KVM_EXIT_MEMORY_FAULT 39
181#define KVM_EXIT_TDX 40189#define KVM_EXIT_TDX 40
182#define KVM_EXIT_ARM_SEA 41190#define KVM_EXIT_ARM_SEA 41
191#define KVM_EXIT_ARM_LDST64B 42
192#define KVM_EXIT_SNP_REQ_CERTS 43
183193
184/* For KVM_EXIT_INTERNAL_ERROR */194/* For KVM_EXIT_INTERNAL_ERROR */
185/* Emulate instruction failed. */195/* Emulate instruction failed. */
...@@ -394,7 +404,7 @@ struct kvm_run {...@@ -394,7 +404,7 @@ struct kvm_run {
394 } eoi;404 } eoi;
395 /* KVM_EXIT_HYPERV */405 /* KVM_EXIT_HYPERV */
396 struct kvm_hyperv_exit hyperv;406 struct kvm_hyperv_exit hyperv;
397 /* KVM_EXIT_ARM_NISV */407 /* KVM_EXIT_ARM_NISV / KVM_EXIT_ARM_LDST64B */
398 struct {408 struct {
399 __u64 esr_iss;409 __u64 esr_iss;
400 __u64 fault_ipa;410 __u64 fault_ipa;
...@@ -474,6 +484,8 @@ struct kvm_run {...@@ -474,6 +484,8 @@ struct kvm_run {
474 __u64 gva;484 __u64 gva;
475 __u64 gpa;485 __u64 gpa;
476 } arm_sea;486 } arm_sea;
487 /* KVM_EXIT_SNP_REQ_CERTS */
488 struct kvm_exit_snp_req_certs snp_req_certs;
477 /* Fix the size of the union. */489 /* Fix the size of the union. */
478 char padding[256];490 char padding[256];
479 };491 };
...@@ -520,7 +532,7 @@ struct kvm_coalesced_mmio {...@@ -520,7 +532,7 @@ struct kvm_coalesced_mmio {
520532
521struct kvm_coalesced_mmio_ring {533struct kvm_coalesced_mmio_ring {
522 __u32 first, last;534 __u32 first, last;
523 struct kvm_coalesced_mmio coalesced_mmio[];535 __DECLARE_FLEX_ARRAY(struct kvm_coalesced_mmio, coalesced_mmio);
524};536};
525537
526#define KVM_COALESCED_MMIO_MAX \538#define KVM_COALESCED_MMIO_MAX \
...@@ -570,7 +582,7 @@ struct kvm_clear_dirty_log {...@@ -570,7 +582,7 @@ struct kvm_clear_dirty_log {
570/* for KVM_SET_SIGNAL_MASK */582/* for KVM_SET_SIGNAL_MASK */
571struct kvm_signal_mask {583struct kvm_signal_mask {
572 __u32 len;584 __u32 len;
573 __u8 sigset[];585 __DECLARE_FLEX_ARRAY(__u8, sigset);
574};586};
575587
576/* for KVM_TPR_ACCESS_REPORTING */588/* for KVM_TPR_ACCESS_REPORTING */
...@@ -966,6 +978,7 @@ struct kvm_enable_cap {...@@ -966,6 +978,7 @@ struct kvm_enable_cap {
966#define KVM_CAP_GUEST_MEMFD_FLAGS 244978#define KVM_CAP_GUEST_MEMFD_FLAGS 244
967#define KVM_CAP_ARM_SEA_TO_USER 245979#define KVM_CAP_ARM_SEA_TO_USER 245
968#define KVM_CAP_S390_USER_OPEREXEC 246980#define KVM_CAP_S390_USER_OPEREXEC 246
981#define KVM_CAP_S390_KEYOP 247
969982
970struct kvm_irq_routing_irqchip {983struct kvm_irq_routing_irqchip {
971 __u32 irqchip;984 __u32 irqchip;
...@@ -1028,7 +1041,7 @@ struct kvm_irq_routing_entry {...@@ -1028,7 +1041,7 @@ struct kvm_irq_routing_entry {
1028struct kvm_irq_routing {1041struct kvm_irq_routing {
1029 __u32 nr;1042 __u32 nr;
1030 __u32 flags;1043 __u32 flags;
1031 struct kvm_irq_routing_entry entries[];1044 __DECLARE_FLEX_ARRAY(struct kvm_irq_routing_entry, entries);
1032};1045};
10331046
1034#define KVM_IRQFD_FLAG_DEASSIGN (1 << 0)1047#define KVM_IRQFD_FLAG_DEASSIGN (1 << 0)
...@@ -1119,7 +1132,7 @@ struct kvm_dirty_tlb {...@@ -1119,7 +1132,7 @@ struct kvm_dirty_tlb {
11191132
1120struct kvm_reg_list {1133struct kvm_reg_list {
1121 __u64 n; /* number of regs */1134 __u64 n; /* number of regs */
1122 __u64 reg[];1135 __DECLARE_FLEX_ARRAY(__u64, reg);
1123};1136};
11241137
1125struct kvm_one_reg {1138struct kvm_one_reg {
...@@ -1211,6 +1224,16 @@ struct kvm_vfio_spapr_tce {...@@ -1211,6 +1224,16 @@ struct kvm_vfio_spapr_tce {
1211 __s32 tablefd;1224 __s32 tablefd;
1212};1225};
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
1214/*1237/*
1215 * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns1238 * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns
1216 * a vcpu fd.1239 * a vcpu fd.
...@@ -1230,6 +1253,7 @@ struct kvm_vfio_spapr_tce {...@@ -1230,6 +1253,7 @@ struct kvm_vfio_spapr_tce {
1230#define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)1253#define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)
1231#define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)1254#define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)
1232#define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long)1255#define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long)
1256#define KVM_S390_KEYOP _IOWR(KVMIO, 0x53, struct kvm_s390_keyop)
12331257
1234/* Device model IOC */1258/* Device model IOC */
1235#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)1259#define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
...@@ -1571,7 +1595,7 @@ struct kvm_stats_desc {...@@ -1571,7 +1595,7 @@ struct kvm_stats_desc {
1571 __u16 size;1595 __u16 size;
1572 __u32 offset;1596 __u32 offset;
1573 __u32 bucket_size;1597 __u32 bucket_size;
1574 char name[];1598 __DECLARE_FLEX_ARRAY(char, name);
1575};1599};
15761600
1577#define KVM_GET_STATS_FD _IO(KVMIO, 0xce)1601#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 {...@@ -117,11 +117,24 @@ struct landlock_ruleset_attr {
117 * future nested domains, not the one being created. It can also be used117 * future nested domains, not the one being created. It can also be used
118 * with a @ruleset_fd value of -1 to mute subdomain logs without creating a118 * with a @ruleset_fd value of -1 to mute subdomain logs without creating a
119 * domain.119 * 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.
120 */132 */
121/* clang-format off */133/* clang-format off */
122#define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)134#define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)
123#define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON (1U << 1)135#define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON (1U << 1)
124#define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF (1U << 2)136#define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF (1U << 2)
137#define LANDLOCK_RESTRICT_SELF_TSYNC (1U << 3)
125/* clang-format on */138/* clang-format on */
126139
127/**140/**
...@@ -182,11 +195,13 @@ struct landlock_net_port_attr {...@@ -182,11 +195,13 @@ struct landlock_net_port_attr {
182 * It should be noted that port 0 passed to :manpage:`bind(2)` will bind195 * It should be noted that port 0 passed to :manpage:`bind(2)` will bind
183 * to an available port from the ephemeral port range. This can be196 * to an available port from the ephemeral port range. This can be
184 * configured with the ``/proc/sys/net/ipv4/ip_local_port_range`` sysctl197 * 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)``.
186 *200 *
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
188 * right means that requesting to bind on port 0 is allowed and it will202 * 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.
190 */205 */
191 __u64 port;206 __u64 port;
192};207};
...@@ -329,13 +344,12 @@ struct landlock_net_port_attr {...@@ -329,13 +344,12 @@ struct landlock_net_port_attr {
329 * These flags enable to restrict a sandboxed process to a set of network344 * These flags enable to restrict a sandboxed process to a set of network
330 * actions.345 * actions.
331 *346 *
332 * This is supported since Landlock ABI version 4.
333 *
334 * The following access rights apply to TCP port numbers:347 * The following access rights apply to TCP port numbers:
335 *348 *
336 * - %LANDLOCK_ACCESS_NET_BIND_TCP: Bind a TCP socket to a local port.349 * - %LANDLOCK_ACCESS_NET_BIND_TCP: Bind TCP sockets to the given local
337 * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect an active TCP socket to350 * port. Support added in Landlock ABI version 4.
338 * a remote port.351 * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect TCP sockets to the given
352 * remote port. Support added in Landlock ABI version 4.
339 */353 */
340/* clang-format off */354/* clang-format off */
341#define LANDLOCK_ACCESS_NET_BIND_TCP (1ULL << 0)355#define LANDLOCK_ACCESS_NET_BIND_TCP (1ULL << 0)
lib/libc/include/any-linux-any/linux/magic.h+1
...@@ -104,5 +104,6 @@...@@ -104,5 +104,6 @@
104#define SECRETMEM_MAGIC 0x5345434d /* "SECM" */104#define SECRETMEM_MAGIC 0x5345434d /* "SECM" */
105#define PID_FS_MAGIC 0x50494446 /* "PIDF" */105#define PID_FS_MAGIC 0x50494446 /* "PIDF" */
106#define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */106#define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */
107#define NULL_FS_MAGIC 0x4E554C4C /* "NULL" */
107108
108#endif /* __LINUX_MAGIC_H__ */109#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 {...@@ -39,6 +39,9 @@ enum {
39#define MPOL_MODE_FLAGS \39#define MPOL_MODE_FLAGS \
40 (MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES | MPOL_F_NUMA_BALANCING)40 (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
42/* Flags for get_mempolicy */45/* Flags for get_mempolicy */
43#define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */46#define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */
44#define MPOL_F_ADDR (1<<1) /* look up vma using address */47#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 @@...@@ -61,7 +61,8 @@
61/*61/*
62 * open_tree() flags.62 * open_tree() flags.
63 */63 */
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 */
65#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */66#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
6667
67/*68/*
...@@ -197,7 +198,10 @@ struct statmount {...@@ -197,7 +198,10 @@ struct statmount {
197 */198 */
198struct mnt_id_req {199struct mnt_id_req {
199 __u32 size;200 __u32 size;
200 __u32 mnt_ns_fd;201 union {
202 __u32 mnt_ns_fd;
203 __u32 mnt_fd;
204 };
201 __u64 mnt_id;205 __u64 mnt_id;
202 __u64 param;206 __u64 param;
203 __u64 mnt_ns_id;207 __u64 mnt_ns_id;
...@@ -232,4 +236,9 @@ struct mnt_id_req {...@@ -232,4 +236,9 @@ struct mnt_id_req {
232#define LSMT_ROOT 0xffffffffffffffff /* root mount */236#define LSMT_ROOT 0xffffffffffffffff /* root mount */
233#define LISTMOUNT_REVERSE (1 << 0) /* List later mounts first */237#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
235#endif /* _LINUX_MOUNT_H */244#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 @@...@@ -11,7 +11,7 @@
11#define MPTCP_PM_VER 111#define MPTCP_PM_VER 1
1212
13/**13/**
14 * enum mptcp_event_type14 * enum mptcp_event_type - Netlink MPTCP event types
15 * @MPTCP_EVENT_UNSPEC: unused event15 * @MPTCP_EVENT_UNSPEC: unused event
16 * @MPTCP_EVENT_CREATED: A new MPTCP connection has been created. It is the16 * @MPTCP_EVENT_CREATED: A new MPTCP connection has been created. It is the
17 * good time to allocate memory and send ADD_ADDR if needed. Depending on the17 * 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 {...@@ -27,6 +27,8 @@ enum {
27 MSHV_PT_BIT_X2APIC,27 MSHV_PT_BIT_X2APIC,
28 MSHV_PT_BIT_GPA_SUPER_PAGES,28 MSHV_PT_BIT_GPA_SUPER_PAGES,
29 MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,29 MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,
30 MSHV_PT_BIT_NESTED_VIRTUALIZATION,
31 MSHV_PT_BIT_SMT_ENABLED_GUEST,
30 MSHV_PT_BIT_COUNT,32 MSHV_PT_BIT_COUNT,
31};33};
3234
lib/libc/include/any-linux-any/linux/netfilter_bridge.h+5-4
...@@ -5,13 +5,14 @@...@@ -5,13 +5,14 @@
5/* bridge-specific defines for netfilter. 5/* bridge-specific defines for netfilter.
6 */6 */
77
8#include <netinet/if_ether.h> /* for __UAPI_DEF_ETHHDR if defined */
9
8#include <linux/in.h>10#include <linux/in.h>
9#include <linux/netfilter.h>11#include <linux/netfilter.h>
10#include <linux/if_ether.h>12#include <linux/if_ether.h>
11#include <linux/if_vlan.h>13#include <linux/if_vlan.h>
12#include <linux/if_pppox.h>14#include <linux/if_pppox.h>
1315#include <linux/typelimits.h>
14#include <limits.h> /* for INT_MIN, INT_MAX */
1516
16/* Bridge Hooks */17/* Bridge Hooks */
17/* After promisc drops, checksum checks. */18/* After promisc drops, checksum checks. */
...@@ -29,14 +30,14 @@...@@ -29,14 +30,14 @@
29#define NF_BR_NUMHOOKS 630#define NF_BR_NUMHOOKS 6
3031
31enum nf_br_hook_priorities {32enum nf_br_hook_priorities {
32 NF_BR_PRI_FIRST = INT_MIN,33 NF_BR_PRI_FIRST = __KERNEL_INT_MIN,
33 NF_BR_PRI_NAT_DST_BRIDGED = -300,34 NF_BR_PRI_NAT_DST_BRIDGED = -300,
34 NF_BR_PRI_FILTER_BRIDGED = -200,35 NF_BR_PRI_FILTER_BRIDGED = -200,
35 NF_BR_PRI_BRNF = 0,36 NF_BR_PRI_BRNF = 0,
36 NF_BR_PRI_NAT_DST_OTHER = 100,37 NF_BR_PRI_NAT_DST_OTHER = 100,
37 NF_BR_PRI_FILTER_OTHER = 200,38 NF_BR_PRI_FILTER_OTHER = 200,
38 NF_BR_PRI_NAT_SRC = 300,39 NF_BR_PRI_NAT_SRC = 300,
39 NF_BR_PRI_LAST = INT_MAX,40 NF_BR_PRI_LAST = __KERNEL_INT_MAX,
40};41};
4142
42#endif /* __LINUX_BRIDGE_NETFILTER_H */43#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 @@...@@ -7,11 +7,10 @@
77
88
9#include <linux/netfilter.h>9#include <linux/netfilter.h>
10#include <linux/typelimits.h>
1011
11/* only for userspace compatibility */12/* only for userspace compatibility */
1213
13#include <limits.h> /* for INT_MIN, INT_MAX */
14
15/* IP Hooks */14/* IP Hooks */
16/* After promisc drops, checksum checks. */15/* After promisc drops, checksum checks. */
17#define NF_IP_PRE_ROUTING 016#define NF_IP_PRE_ROUTING 0
...@@ -26,7 +25,7 @@...@@ -26,7 +25,7 @@
26#define NF_IP_NUMHOOKS 525#define NF_IP_NUMHOOKS 5
2726
28enum nf_ip_hook_priorities {27enum nf_ip_hook_priorities {
29 NF_IP_PRI_FIRST = INT_MIN,28 NF_IP_PRI_FIRST = __KERNEL_INT_MIN,
30 NF_IP_PRI_RAW_BEFORE_DEFRAG = -450,29 NF_IP_PRI_RAW_BEFORE_DEFRAG = -450,
31 NF_IP_PRI_CONNTRACK_DEFRAG = -400,30 NF_IP_PRI_CONNTRACK_DEFRAG = -400,
32 NF_IP_PRI_RAW = -300,31 NF_IP_PRI_RAW = -300,
...@@ -39,8 +38,8 @@ enum nf_ip_hook_priorities {...@@ -39,8 +38,8 @@ enum nf_ip_hook_priorities {
39 NF_IP_PRI_NAT_SRC = 100,38 NF_IP_PRI_NAT_SRC = 100,
40 NF_IP_PRI_SELINUX_LAST = 225,39 NF_IP_PRI_SELINUX_LAST = 225,
41 NF_IP_PRI_CONNTRACK_HELPER = 300,40 NF_IP_PRI_CONNTRACK_HELPER = 300,
42 NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,41 NF_IP_PRI_CONNTRACK_CONFIRM = __KERNEL_INT_MAX,
43 NF_IP_PRI_LAST = INT_MAX,42 NF_IP_PRI_LAST = __KERNEL_INT_MAX,
44};43};
4544
46/* Arguments for setsockopt SOL_IP: */45/* Arguments for setsockopt SOL_IP: */
lib/libc/include/any-linux-any/linux/netfilter_ipv6.h+3-4
...@@ -10,11 +10,10 @@...@@ -10,11 +10,10 @@
1010
1111
12#include <linux/netfilter.h>12#include <linux/netfilter.h>
13#include <linux/typelimits.h>
1314
14/* only for userspace compatibility */15/* only for userspace compatibility */
1516
16#include <limits.h> /* for INT_MIN, INT_MAX */
17
18/* IP6 Hooks */17/* IP6 Hooks */
19/* After promisc drops, checksum checks. */18/* After promisc drops, checksum checks. */
20#define NF_IP6_PRE_ROUTING 019#define NF_IP6_PRE_ROUTING 0
...@@ -30,7 +29,7 @@...@@ -30,7 +29,7 @@
3029
3130
32enum nf_ip6_hook_priorities {31enum nf_ip6_hook_priorities {
33 NF_IP6_PRI_FIRST = INT_MIN,32 NF_IP6_PRI_FIRST = __KERNEL_INT_MIN,
34 NF_IP6_PRI_RAW_BEFORE_DEFRAG = -450,33 NF_IP6_PRI_RAW_BEFORE_DEFRAG = -450,
35 NF_IP6_PRI_CONNTRACK_DEFRAG = -400,34 NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
36 NF_IP6_PRI_RAW = -300,35 NF_IP6_PRI_RAW = -300,
...@@ -43,7 +42,7 @@ enum nf_ip6_hook_priorities {...@@ -43,7 +42,7 @@ enum nf_ip6_hook_priorities {
43 NF_IP6_PRI_NAT_SRC = 100,42 NF_IP6_PRI_NAT_SRC = 100,
44 NF_IP6_PRI_SELINUX_LAST = 225,43 NF_IP6_PRI_SELINUX_LAST = 225,
45 NF_IP6_PRI_CONNTRACK_HELPER = 300,44 NF_IP6_PRI_CONNTRACK_HELPER = 300,
46 NF_IP6_PRI_LAST = INT_MAX,45 NF_IP6_PRI_LAST = __KERNEL_INT_MAX,
47};46};
4847
4948
lib/libc/include/any-linux-any/linux/nfs.h+1-1
...@@ -55,7 +55,7 @@...@@ -55,7 +55,7 @@
55 NFSERR_NODEV = 19, /* v2 v3 v4 */55 NFSERR_NODEV = 19, /* v2 v3 v4 */
56 NFSERR_NOTDIR = 20, /* v2 v3 v4 */56 NFSERR_NOTDIR = 20, /* v2 v3 v4 */
57 NFSERR_ISDIR = 21, /* v2 v3 v4 */57 NFSERR_ISDIR = 21, /* v2 v3 v4 */
58 NFSERR_INVAL = 22, /* v2 v3 v4 */58 NFSERR_INVAL = 22, /* v3 v4 */
59 NFSERR_FBIG = 27, /* v2 v3 v4 */59 NFSERR_FBIG = 27, /* v2 v3 v4 */
60 NFSERR_NOSPC = 28, /* v2 v3 v4 */60 NFSERR_NOSPC = 28, /* v2 v3 v4 */
61 NFSERR_ROFS = 30, /* v2 v3 v4 */61 NFSERR_ROFS = 30, /* v2 v3 v4 */
lib/libc/include/any-linux-any/linux/nfsd_netlink.h+1
...@@ -35,6 +35,7 @@ enum {...@@ -35,6 +35,7 @@ enum {
35 NFSD_A_SERVER_GRACETIME,35 NFSD_A_SERVER_GRACETIME,
36 NFSD_A_SERVER_LEASETIME,36 NFSD_A_SERVER_LEASETIME,
37 NFSD_A_SERVER_SCOPE,37 NFSD_A_SERVER_SCOPE,
38 NFSD_A_SERVER_MIN_THREADS,
3839
39 __NFSD_A_SERVER_MAX,40 __NFSD_A_SERVER_MAX,
40 NFSD_A_SERVER_MAX = (__NFSD_A_SERVER_MAX - 1)41 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)...@@ -58,7 +58,7 @@ NILFS_CPINFO_FNS(INVALID, invalid)
58NILFS_CPINFO_FNS(MINOR, minor)58NILFS_CPINFO_FNS(MINOR, minor)
5959
60/**60/**
61 * nilfs_suinfo - segment usage information61 * struct nilfs_suinfo - segment usage information
62 * @sui_lastmod: timestamp of last modification62 * @sui_lastmod: timestamp of last modification
63 * @sui_nblocks: number of written blocks in segment63 * @sui_nblocks: number of written blocks in segment
64 * @sui_flags: segment usage flags64 * @sui_flags: segment usage flags
...@@ -93,7 +93,7 @@ static __inline__ int nilfs_suinfo_clean(const struct nilfs_suinfo *si)...@@ -93,7 +93,7 @@ static __inline__ int nilfs_suinfo_clean(const struct nilfs_suinfo *si)
93}93}
9494
95/**95/**
96 * nilfs_suinfo_update - segment usage information update96 * struct nilfs_suinfo_update - segment usage information update
97 * @sup_segnum: segment number97 * @sup_segnum: segment number
98 * @sup_flags: flags for which fields are active in sup_sui98 * @sup_flags: flags for which fields are active in sup_sui
99 * @sup_reserved: reserved necessary for alignment99 * @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 {...@@ -133,73 +133,104 @@ struct nilfs_super_root {
133133
134/**134/**
135 * struct nilfs_super_block - structure of super block on disk135 * 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
136 */181 */
137struct nilfs_super_block {182struct nilfs_super_block {
138/*00*/ __le32 s_rev_level; /* Revision level */183/*00*/ __le32 s_rev_level;
139 __le16 s_minor_rev_level; /* minor revision level */184 __le16 s_minor_rev_level;
140 __le16 s_magic; /* Magic signature */185 __le16 s_magic;
141186
142 __le16 s_bytes; /*187 __le16 s_bytes;
143 * Bytes count of CRC calculation188 __le16 s_flags;
144 * for this structure. s_reserved189 __le32 s_crc_seed;
145 * is excluded.190/*10*/ __le32 s_sum;
146 */191
147 __le16 s_flags; /* flags */192 __le32 s_log_block_size;
148 __le32 s_crc_seed; /* Seed value of CRC calculation */193 __le64 s_nsegments;
149/*10*/ __le32 s_sum; /* Check sum of super block */194/*20*/ __le64 s_dev_size;
150195 __le64 s_first_data_block;
151 __le32 s_log_block_size; /*196/*30*/ __le32 s_blocks_per_segment;
152 * Block size represented as follows197 __le32 s_r_segments_percentage;
153 * blocksize =198
154 * 1 << (s_log_block_size + 10)199 __le64 s_last_cno;
155 */200/*40*/ __le64 s_last_pseg;
156 __le64 s_nsegments; /* Number of segments in filesystem */201 __le64 s_last_seq;
157/*20*/ __le64 s_dev_size; /* block device size in bytes */202/*50*/ __le64 s_free_blocks_count;
158 __le64 s_first_data_block; /* 1st seg disk block number */203
159/*30*/ __le32 s_blocks_per_segment; /* number of blocks per full segment */204 __le64 s_ctime;
160 __le32 s_r_segments_percentage; /* Reserved segments percentage */205/*60*/ __le64 s_mtime;
161206 __le64 s_wtime;
162 __le64 s_last_cno; /* Last checkpoint number */207/*70*/ __le16 s_mnt_count;
163/*40*/ __le64 s_last_pseg; /* disk block addr pseg written last */208 __le16 s_max_mnt_count;
164 __le64 s_last_seq; /* seq. number of seg written last */209 __le16 s_state;
165/*50*/ __le64 s_free_blocks_count; /* Free blocks count */210 __le16 s_errors;
166211 __le64 s_lastcheck;
167 __le64 s_ctime; /*212
168 * Creation time (execution time of213/*80*/ __le32 s_checkinterval;
169 * newfs)214 __le32 s_creator_os;
170 */215 __le16 s_def_resuid;
171/*60*/ __le64 s_mtime; /* Mount time */216 __le16 s_def_resgid;
172 __le64 s_wtime; /* Write time */217 __le32 s_first_ino;
173/*70*/ __le16 s_mnt_count; /* Mount count */218
174 __le16 s_max_mnt_count; /* Maximal mount count */219/*90*/ __le16 s_inode_size;
175 __le16 s_state; /* File system state */220 __le16 s_dat_entry_size;
176 __le16 s_errors; /* Behaviour when detecting errors */221 __le16 s_checkpoint_size;
177 __le64 s_lastcheck; /* time of last check */222 __le16 s_segment_usage_size;
178223
179/*80*/ __le32 s_checkinterval; /* max. time between checks */224/*98*/ __u8 s_uuid[16];
180 __le32 s_creator_os; /* OS */225/*A8*/ char s_volume_name[80] __kernel_nonstring;
181 __le16 s_def_resuid; /* Default uid for reserved blocks */226
182 __le16 s_def_resgid; /* Default gid for reserved blocks */227/*F8*/ __le32 s_c_interval;
183 __le32 s_first_ino; /* First non-reserved inode */228 __le32 s_c_block_max;
184229
185/*90*/ __le16 s_inode_size; /* Size of an inode */230/*100*/ __le64 s_feature_compat;
186 __le16 s_dat_entry_size; /* Size of a dat entry */231 __le64 s_feature_compat_ro;
187 __le16 s_checkpoint_size; /* Size of a checkpoint */232 __le64 s_feature_incompat;
188 __le16 s_segment_usage_size; /* Size of a segment usage */233 __u32 s_reserved[186];
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 */
203};234};
204235
205/*236/*
...@@ -449,7 +480,7 @@ struct nilfs_btree_node {...@@ -449,7 +480,7 @@ struct nilfs_btree_node {
449/**480/**
450 * struct nilfs_direct_node - header of built-in bmap array481 * struct nilfs_direct_node - header of built-in bmap array
451 * @dn_flags: flags482 * @dn_flags: flags
452 * @dn_pad: padding483 * @pad: padding
453 */484 */
454struct nilfs_direct_node {485struct nilfs_direct_node {
455 __u8 dn_flags;486 __u8 dn_flags;
lib/libc/include/any-linux-any/linux/nl80211.h+104-3
...@@ -11,7 +11,7 @@...@@ -11,7 +11,7 @@
11 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>11 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
12 * Copyright 2008 Colin McCabe <colin@cozybit.com>12 * Copyright 2008 Colin McCabe <colin@cozybit.com>
13 * Copyright 2015-2017 Intel Deutschland GmbH13 * Copyright 2015-2017 Intel Deutschland GmbH
14 * Copyright (C) 2018-2025 Intel Corporation14 * Copyright (C) 2018-2026 Intel Corporation
15 *15 *
16 * Permission to use, copy, modify, and/or distribute this software for any16 * Permission to use, copy, modify, and/or distribute this software for any
17 * purpose with or without fee is hereby granted, provided that the above17 * purpose with or without fee is hereby granted, provided that the above
...@@ -2974,6 +2974,16 @@ enum nl80211_commands {...@@ -2974,6 +2974,16 @@ enum nl80211_commands {
2974 * primary channel is 2 MHz wide, and the control channel designates2974 * primary channel is 2 MHz wide, and the control channel designates
2975 * the 1 MHz primary subchannel within that 2 MHz primary.2975 * the 1 MHz primary subchannel within that 2 MHz primary.
2976 *2976 *
2977 * @NL80211_ATTR_EPP_PEER: A flag attribute to indicate if the peer is an EPP
2978 * STA. Used with %NL80211_CMD_NEW_STA and %NL80211_CMD_ADD_LINK_STA
2979 *
2980 * @NL80211_ATTR_UHR_CAPABILITY: UHR Capability information element (from
2981 * association request when used with NL80211_CMD_NEW_STATION). Can be set
2982 * only if HE/EHT are also available.
2983 * @NL80211_ATTR_DISABLE_UHR: Force UHR capable interfaces to disable
2984 * this feature during association. This is a flag attribute.
2985 * Currently only supported in mac80211 drivers.
2986 *
2977 * @NUM_NL80211_ATTR: total number of nl80211_attrs available2987 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
2978 * @NL80211_ATTR_MAX: highest attribute number currently defined2988 * @NL80211_ATTR_MAX: highest attribute number currently defined
2979 * @__NL80211_ATTR_AFTER_LAST: internal use2989 * @__NL80211_ATTR_AFTER_LAST: internal use
...@@ -3542,6 +3552,11 @@ enum nl80211_attrs {...@@ -3542,6 +3552,11 @@ enum nl80211_attrs {
35423552
3543 NL80211_ATTR_S1G_PRIMARY_2MHZ,3553 NL80211_ATTR_S1G_PRIMARY_2MHZ,
35443554
3555 NL80211_ATTR_EPP_PEER,
3556
3557 NL80211_ATTR_UHR_CAPABILITY,
3558 NL80211_ATTR_DISABLE_UHR,
3559
3545 /* add attributes here, update the policy in nl80211.c */3560 /* add attributes here, update the policy in nl80211.c */
35463561
3547 __NL80211_ATTR_AFTER_LAST,3562 __NL80211_ATTR_AFTER_LAST,
...@@ -3894,6 +3909,12 @@ enum nl80211_eht_ru_alloc {...@@ -3894,6 +3909,12 @@ enum nl80211_eht_ru_alloc {
3894 * @NL80211_RATE_INFO_4_MHZ_WIDTH: 4 MHz S1G rate3909 * @NL80211_RATE_INFO_4_MHZ_WIDTH: 4 MHz S1G rate
3895 * @NL80211_RATE_INFO_8_MHZ_WIDTH: 8 MHz S1G rate3910 * @NL80211_RATE_INFO_8_MHZ_WIDTH: 8 MHz S1G rate
3896 * @NL80211_RATE_INFO_16_MHZ_WIDTH: 16 MHz S1G rate3911 * @NL80211_RATE_INFO_16_MHZ_WIDTH: 16 MHz S1G rate
3912 * @NL80211_RATE_INFO_UHR_MCS: UHR MCS index (u8, 0-15, 17, 19, 20, 23)
3913 * Note that the other EHT attributes (such as @NL80211_RATE_INFO_EHT_NSS)
3914 * are used in conjunction with this where applicable
3915 * @NL80211_RATE_INFO_UHR_ELR: UHR ELR flag, which restricts NSS to 1,
3916 * MCS to 0 or 1, and GI to %NL80211_RATE_INFO_EHT_GI_1_6.
3917 * @NL80211_RATE_INFO_UHR_IM: UHR Interference Mitigation flag
3897 * @__NL80211_RATE_INFO_AFTER_LAST: internal use3918 * @__NL80211_RATE_INFO_AFTER_LAST: internal use
3898 */3919 */
3899enum nl80211_rate_info {3920enum nl80211_rate_info {
...@@ -3927,6 +3948,9 @@ enum nl80211_rate_info {...@@ -3927,6 +3948,9 @@ enum nl80211_rate_info {
3927 NL80211_RATE_INFO_4_MHZ_WIDTH,3948 NL80211_RATE_INFO_4_MHZ_WIDTH,
3928 NL80211_RATE_INFO_8_MHZ_WIDTH,3949 NL80211_RATE_INFO_8_MHZ_WIDTH,
3929 NL80211_RATE_INFO_16_MHZ_WIDTH,3950 NL80211_RATE_INFO_16_MHZ_WIDTH,
3951 NL80211_RATE_INFO_UHR_MCS,
3952 NL80211_RATE_INFO_UHR_ELR,
3953 NL80211_RATE_INFO_UHR_IM,
39303954
3931 /* keep last */3955 /* keep last */
3932 __NL80211_RATE_INFO_AFTER_LAST,3956 __NL80211_RATE_INFO_AFTER_LAST,
...@@ -4249,6 +4273,10 @@ enum nl80211_mpath_info {...@@ -4249,6 +4273,10 @@ enum nl80211_mpath_info {
4249 * capabilities element4273 * capabilities element
4250 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE: EHT PPE thresholds information as4274 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE: EHT PPE thresholds information as
4251 * defined in EHT capabilities element4275 * defined in EHT capabilities element
4276 * @NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC: UHR MAC capabilities as in UHR
4277 * capabilities element
4278 * @NL80211_BAND_IFTYPE_ATTR_UHR_CAP_PHY: UHR PHY capabilities as in UHR
4279 * capabilities element
4252 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use4280 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
4253 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined4281 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined
4254 */4282 */
...@@ -4266,6 +4294,8 @@ enum nl80211_band_iftype_attr {...@@ -4266,6 +4294,8 @@ enum nl80211_band_iftype_attr {
4266 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY,4294 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY,
4267 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET,4295 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET,
4268 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE,4296 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE,
4297 NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC,
4298 NL80211_BAND_IFTYPE_ATTR_UHR_CAP_PHY,
42694299
4270 /* keep last */4300 /* keep last */
4271 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,4301 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
...@@ -4445,6 +4475,11 @@ enum nl80211_wmm_rule {...@@ -4445,6 +4475,11 @@ enum nl80211_wmm_rule {
4445 * channel in current regulatory domain.4475 * channel in current regulatory domain.
4446 * @NL80211_FREQUENCY_ATTR_NO_16MHZ: 16 MHz operation is not allowed on this4476 * @NL80211_FREQUENCY_ATTR_NO_16MHZ: 16 MHz operation is not allowed on this
4447 * channel in current regulatory domain.4477 * channel in current regulatory domain.
4478 * @NL80211_FREQUENCY_ATTR_S1G_NO_PRIMARY: Channel is not permitted for use
4479 * as a primary channel. Does not prevent the channel from existing
4480 * as a non-primary subchannel. Only applicable to S1G channels.
4481 * @NL80211_FREQUENCY_ATTR_NO_UHR: UHR operation is not allowed on this channel
4482 * in current regulatory domain.
4448 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number4483 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
4449 * currently defined4484 * currently defined
4450 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use4485 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
...@@ -4493,6 +4528,8 @@ enum nl80211_frequency_attr {...@@ -4493,6 +4528,8 @@ enum nl80211_frequency_attr {
4493 NL80211_FREQUENCY_ATTR_NO_4MHZ,4528 NL80211_FREQUENCY_ATTR_NO_4MHZ,
4494 NL80211_FREQUENCY_ATTR_NO_8MHZ,4529 NL80211_FREQUENCY_ATTR_NO_8MHZ,
4495 NL80211_FREQUENCY_ATTR_NO_16MHZ,4530 NL80211_FREQUENCY_ATTR_NO_16MHZ,
4531 NL80211_FREQUENCY_ATTR_S1G_NO_PRIMARY,
4532 NL80211_FREQUENCY_ATTR_NO_UHR,
44964533
4497 /* keep last */4534 /* keep last */
4498 __NL80211_FREQUENCY_ATTR_AFTER_LAST,4535 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
...@@ -4706,6 +4743,7 @@ enum nl80211_sched_scan_match_attr {...@@ -4706,6 +4743,7 @@ enum nl80211_sched_scan_match_attr {
4706 * despite NO_IR configuration.4743 * despite NO_IR configuration.
4707 * @NL80211_RRF_ALLOW_20MHZ_ACTIVITY: Allow activity in 20 MHz bandwidth,4744 * @NL80211_RRF_ALLOW_20MHZ_ACTIVITY: Allow activity in 20 MHz bandwidth,
4708 * despite NO_IR configuration.4745 * despite NO_IR configuration.
4746 * @NL80211_RRF_NO_UHR: UHR operation not allowed
4709 */4747 */
4710enum nl80211_reg_rule_flags {4748enum nl80211_reg_rule_flags {
4711 NL80211_RRF_NO_OFDM = 1 << 0,4749 NL80211_RRF_NO_OFDM = 1 << 0,
...@@ -4732,6 +4770,7 @@ enum nl80211_reg_rule_flags {...@@ -4732,6 +4770,7 @@ enum nl80211_reg_rule_flags {
4732 NL80211_RRF_NO_6GHZ_AFC_CLIENT = 1 << 23,4770 NL80211_RRF_NO_6GHZ_AFC_CLIENT = 1 << 23,
4733 NL80211_RRF_ALLOW_6GHZ_VLP_AP = 1 << 24,4771 NL80211_RRF_ALLOW_6GHZ_VLP_AP = 1 << 24,
4734 NL80211_RRF_ALLOW_20MHZ_ACTIVITY = 1 << 25,4772 NL80211_RRF_ALLOW_20MHZ_ACTIVITY = 1 << 25,
4773 NL80211_RRF_NO_UHR = 1 << 26,
4735};4774};
47364775
4737#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR4776#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
...@@ -5426,6 +5465,7 @@ enum nl80211_bss_status {...@@ -5426,6 +5465,7 @@ enum nl80211_bss_status {
5426 * @NL80211_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key5465 * @NL80211_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key
5427 * @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS5466 * @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
5428 * @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key5467 * @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
5468 * @NL80211_AUTHTYPE_EPPKE: Enhanced Privacy Protection Key Exchange
5429 * @__NL80211_AUTHTYPE_NUM: internal5469 * @__NL80211_AUTHTYPE_NUM: internal
5430 * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm5470 * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
5431 * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by5471 * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
...@@ -5441,6 +5481,7 @@ enum nl80211_auth_type {...@@ -5441,6 +5481,7 @@ enum nl80211_auth_type {
5441 NL80211_AUTHTYPE_FILS_SK,5481 NL80211_AUTHTYPE_FILS_SK,
5442 NL80211_AUTHTYPE_FILS_SK_PFS,5482 NL80211_AUTHTYPE_FILS_SK_PFS,
5443 NL80211_AUTHTYPE_FILS_PK,5483 NL80211_AUTHTYPE_FILS_PK,
5484 NL80211_AUTHTYPE_EPPKE,
54445485
5445 /* keep last */5486 /* keep last */
5446 __NL80211_AUTHTYPE_NUM,5487 __NL80211_AUTHTYPE_NUM,
...@@ -6745,6 +6786,15 @@ enum nl80211_feature_flags {...@@ -6745,6 +6786,15 @@ enum nl80211_feature_flags {
6745 * @NL80211_EXT_FEATURE_BEACON_RATE_EHT: Driver supports beacon rate6786 * @NL80211_EXT_FEATURE_BEACON_RATE_EHT: Driver supports beacon rate
6746 * configuration (AP/mesh) with EHT rates.6787 * configuration (AP/mesh) with EHT rates.
6747 *6788 *
6789 * @NL80211_EXT_FEATURE_EPPKE: Driver supports Enhanced Privacy Protection
6790 * Key Exchange (EPPKE) with user space SME (NL80211_CMD_AUTHENTICATE)
6791 * in non-AP STA mode.
6792 *
6793 * @NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION: This specifies that the
6794 * driver supports encryption of (Re)Association Request and Response
6795 * frames in both non‑AP STA and AP mode as specified in
6796 * "IEEE P802.11bi/D3.0, 12.16.6".
6797 *
6748 * @NUM_NL80211_EXT_FEATURES: number of extended features.6798 * @NUM_NL80211_EXT_FEATURES: number of extended features.
6749 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.6799 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
6750 */6800 */
...@@ -6821,6 +6871,8 @@ enum nl80211_ext_feature_index {...@@ -6821,6 +6871,8 @@ enum nl80211_ext_feature_index {
6821 NL80211_EXT_FEATURE_DFS_CONCURRENT,6871 NL80211_EXT_FEATURE_DFS_CONCURRENT,
6822 NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,6872 NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,
6823 NL80211_EXT_FEATURE_BEACON_RATE_EHT,6873 NL80211_EXT_FEATURE_BEACON_RATE_EHT,
6874 NL80211_EXT_FEATURE_EPPKE,
6875 NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION,
68246876
6825 /* add new features before the definition below */6877 /* add new features before the definition below */
6826 NUM_NL80211_EXT_FEATURES,6878 NUM_NL80211_EXT_FEATURES,
...@@ -7433,6 +7485,8 @@ enum nl80211_nan_band_conf_attributes {...@@ -7433,6 +7485,8 @@ enum nl80211_nan_band_conf_attributes {
7433 * address that can take values from 50-6F-9A-01-00-00 to7485 * address that can take values from 50-6F-9A-01-00-00 to
7434 * 50-6F-9A-01-FF-FF. This attribute is optional. If not present,7486 * 50-6F-9A-01-FF-FF. This attribute is optional. If not present,
7435 * a random Cluster ID will be chosen.7487 * a random Cluster ID will be chosen.
7488 * This attribute will be ignored in NL80211_CMD_CHANGE_NAN_CONFIG
7489 * since after NAN was started, the cluster ID can no longer change.
7436 * @NL80211_NAN_CONF_EXTRA_ATTRS: Additional NAN attributes to be7490 * @NL80211_NAN_CONF_EXTRA_ATTRS: Additional NAN attributes to be
7437 * published in the beacons. This is an optional byte array.7491 * published in the beacons. This is an optional byte array.
7438 * @NL80211_NAN_CONF_VENDOR_ELEMS: Vendor-specific elements that will7492 * @NL80211_NAN_CONF_VENDOR_ELEMS: Vendor-specific elements that will
...@@ -7767,6 +7821,30 @@ enum nl80211_peer_measurement_attrs {...@@ -7767,6 +7821,30 @@ enum nl80211_peer_measurement_attrs {
7767 * trigger based ranging measurement is supported7821 * trigger based ranging measurement is supported
7768 * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating7822 * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating
7769 * if non-trigger-based ranging measurement is supported7823 * if non-trigger-based ranging measurement is supported
7824 * @NL80211_PMSR_FTM_CAPA_ATTR_6GHZ_SUPPORT: flag attribute indicating if
7825 * ranging on the 6 GHz band is supported
7826 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_LTF_REP: u32 attribute indicating
7827 * the maximum number of LTF repetitions the device can transmit in the
7828 * preamble of the ranging NDP (zero means only one LTF, no repetitions)
7829 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_LTF_REP: u32 attribute indicating
7830 * the maximum number of LTF repetitions the device can receive in the
7831 * preamble of the ranging NDP (zero means only one LTF, no repetitions)
7832 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_STS: u32 attribute indicating
7833 * the maximum number of space-time streams supported for ranging NDP TX
7834 * (zero-based)
7835 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_STS: u32 attribute indicating
7836 * the maximum number of space-time streams supported for ranging NDP RX
7837 * (zero-based)
7838 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX: u32 attribute indicating the
7839 * maximum total number of LTFs the device can transmit. The total number
7840 * of LTFs is (number of LTF repetitions) * (number of space-time streams).
7841 * This limits the allowed combinations of LTF repetitions and STS.
7842 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX: u32 attribute indicating the
7843 * maximum total number of LTFs the device can receive. The total number
7844 * of LTFs is (number of LTF repetitions) * (number of space-time streams).
7845 * This limits the allowed combinations of LTF repetitions and STS.
7846 * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT: flag attribute indicating the
7847 * device supports operating as the RSTA in PMSR FTM request
7770 *7848 *
7771 * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal7849 * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
7772 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number7850 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
...@@ -7784,6 +7862,14 @@ enum nl80211_peer_measurement_ftm_capa {...@@ -7784,6 +7862,14 @@ enum nl80211_peer_measurement_ftm_capa {
7784 NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST,7862 NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST,
7785 NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED,7863 NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED,
7786 NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED,7864 NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED,
7865 NL80211_PMSR_FTM_CAPA_ATTR_6GHZ_SUPPORT,
7866 NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_LTF_REP,
7867 NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_LTF_REP,
7868 NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_STS,
7869 NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_STS,
7870 NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX,
7871 NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX,
7872 NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT,
77877873
7788 /* keep last */7874 /* keep last */
7789 NUM_NL80211_PMSR_FTM_CAPA_ATTR,7875 NUM_NL80211_PMSR_FTM_CAPA_ATTR,
...@@ -7799,12 +7885,15 @@ enum nl80211_peer_measurement_ftm_capa {...@@ -7799,12 +7885,15 @@ enum nl80211_peer_measurement_ftm_capa {
7799 * &enum nl80211_preamble), optional for DMG (u32)7885 * &enum nl80211_preamble), optional for DMG (u32)
7800 * @NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP: number of bursts exponent as in7886 * @NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP: number of bursts exponent as in
7801 * 802.11-2016 9.4.2.168 "Fine Timing Measurement Parameters element"7887 * 802.11-2016 9.4.2.168 "Fine Timing Measurement Parameters element"
7802 * (u8, 0-15, optional with default 15 i.e. "no preference")7888 * (u8, 0-15, optional with default 15 i.e. "no preference". No limit for
7889 * non-EDCA ranging)
7803 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD: interval between bursts in units7890 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD: interval between bursts in units
7804 * of 100ms (u16, optional with default 0)7891 * of 100ms (u16, optional with default 0)
7805 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION: burst duration, as in 802.11-20167892 * @NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION: burst duration, as in 802.11-2016
7806 * Table 9-257 "Burst Duration field encoding" (u8, 0-15, optional with7893 * Table 9-257 "Burst Duration field encoding" (u8, 0-15, optional with
7807 * default 15 i.e. "no preference")7894 * default 15 i.e. "no preference"). For non-EDCA ranging, this is the
7895 * burst duration in milliseconds (optional with default 0, i.e. let the
7896 * device decide).
7808 * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames7897 * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames
7809 * requested per burst7898 * requested per burst
7810 * (u8, 0-31, optional with default 0 i.e. "no preference")7899 * (u8, 0-31, optional with default 0 i.e. "no preference")
...@@ -7833,6 +7922,14 @@ enum nl80211_peer_measurement_ftm_capa {...@@ -7833,6 +7922,14 @@ enum nl80211_peer_measurement_ftm_capa {
7833 * @NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR: optional. The BSS color of the7922 * @NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR: optional. The BSS color of the
7834 * responder. Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED7923 * responder. Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
7835 * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED is set.7924 * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED is set.
7925 * @NL80211_PMSR_FTM_REQ_ATTR_RSTA: optional. Request to perform the measurement
7926 * as the RSTA (flag). When set, the device is expected to dwell on the
7927 * channel specified in %NL80211_PMSR_PEER_ATTR_CHAN until it receives the
7928 * FTM request from the peer or the timeout specified by
7929 * %NL80211_ATTR_TIMEOUT has expired.
7930 * Only valid if %NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK is set (so the
7931 * RSTA will have the measurement results to report back in the FTM
7932 * response).
7836 *7933 *
7837 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal7934 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
7838 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number7935 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
...@@ -7853,6 +7950,7 @@ enum nl80211_peer_measurement_ftm_req {...@@ -7853,6 +7950,7 @@ enum nl80211_peer_measurement_ftm_req {
7853 NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,7950 NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
7854 NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,7951 NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
7855 NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,7952 NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,
7953 NL80211_PMSR_FTM_REQ_ATTR_RSTA,
78567954
7857 /* keep last */7955 /* keep last */
7858 NUM_NL80211_PMSR_FTM_REQ_ATTR,7956 NUM_NL80211_PMSR_FTM_REQ_ATTR,
...@@ -7937,6 +8035,8 @@ enum nl80211_peer_measurement_ftm_failure_reasons {...@@ -7937,6 +8035,8 @@ enum nl80211_peer_measurement_ftm_failure_reasons {
7937 * 9.4.2.22.1) starting with the Measurement Token, with Measurement8035 * 9.4.2.22.1) starting with the Measurement Token, with Measurement
7938 * Type 11.8036 * Type 11.
7939 * @NL80211_PMSR_FTM_RESP_ATTR_PAD: ignore, for u64/s64 padding only8037 * @NL80211_PMSR_FTM_RESP_ATTR_PAD: ignore, for u64/s64 padding only
8038 * @NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD: actual burst period used by
8039 * the responder (similar to request, u16)
7940 *8040 *
7941 * @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal8041 * @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal
7942 * @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number8042 * @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number
...@@ -7965,6 +8065,7 @@ enum nl80211_peer_measurement_ftm_resp {...@@ -7965,6 +8065,7 @@ enum nl80211_peer_measurement_ftm_resp {
7965 NL80211_PMSR_FTM_RESP_ATTR_LCI,8065 NL80211_PMSR_FTM_RESP_ATTR_LCI,
7966 NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,8066 NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
7967 NL80211_PMSR_FTM_RESP_ATTR_PAD,8067 NL80211_PMSR_FTM_RESP_ATTR_PAD,
8068 NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD,
79688069
7969 /* keep last */8070 /* keep last */
7970 NUM_NL80211_PMSR_FTM_RESP_ATTR,8071 NUM_NL80211_PMSR_FTM_RESP_ATTR,
lib/libc/include/any-linux-any/linux/pci.h+7
...@@ -39,4 +39,11 @@...@@ -39,4 +39,11 @@
39#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */39#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */
40#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */40#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
42#endif /* LINUX_PCI_H */49#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 @@...@@ -132,6 +132,11 @@
132#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */132#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */
133#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */133#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */
134#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */134#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */
135/* Masks for dword-sized processing of Bus Number and Sec Latency Timer fields */
136#define PCI_PRIMARY_BUS_MASK 0x000000ff
137#define PCI_SECONDARY_BUS_MASK 0x0000ff00
138#define PCI_SUBORDINATE_BUS_MASK 0x00ff0000
139#define PCI_SEC_LATENCY_TIMER_MASK 0xff000000
135#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */140#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */
136#define PCI_IO_LIMIT 0x1d141#define PCI_IO_LIMIT 0x1d
137#define PCI_IO_RANGE_TYPE_MASK 0x0fUL /* I/O bridging type */142#define PCI_IO_RANGE_TYPE_MASK 0x0fUL /* I/O bridging type */
...@@ -707,7 +712,7 @@...@@ -707,7 +712,7 @@
707#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */712#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */
708#define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */713#define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */
709#define PCI_EXP_LNKSTA2_FLIT 0x0400 /* Flit Mode Status */714#define PCI_EXP_LNKSTA2_FLIT 0x0400 /* Flit Mode Status */
710#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */715#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x34 /* end of v2 EPs w/ link */
711#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */716#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */
712#define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */717#define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */
713#define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */718#define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */
...@@ -1253,11 +1258,6 @@...@@ -1253,11 +1258,6 @@
1253#define PCI_DEV3_STA 0x0c /* Device 3 Status Register */1258#define PCI_DEV3_STA 0x0c /* Device 3 Status Register */
1254#define PCI_DEV3_STA_SEGMENT 0x8 /* Segment Captured (end-to-end flit-mode detected) */1259#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
1261/* Integrity and Data Encryption Extended Capability */1261/* Integrity and Data Encryption Extended Capability */
1262#define PCI_IDE_CAP 0x041262#define PCI_IDE_CAP 0x04
1263#define PCI_IDE_CAP_LINK 0x1 /* Link IDE Stream Supported */1263#define PCI_IDE_CAP_LINK 0x1 /* Link IDE Stream Supported */
...@@ -1338,4 +1338,63 @@...@@ -1338,4 +1338,63 @@
1338#define PCI_IDE_SEL_ADDR_3(x) (28 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)1338#define PCI_IDE_SEL_ADDR_3(x) (28 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
1339#define PCI_IDE_SEL_BLOCK_SIZE(nr_assoc) (20 + PCI_IDE_SEL_ADDR_BLOCK_SIZE * (nr_assoc))1339#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
1341#endif /* LINUX_PCI_REGS_H */1400#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 @@...@@ -22,6 +22,7 @@
22#define PCITEST_GET_IRQTYPE _IO('P', 0x9)22#define PCITEST_GET_IRQTYPE _IO('P', 0x9)
23#define PCITEST_BARS _IO('P', 0xa)23#define PCITEST_BARS _IO('P', 0xa)
24#define PCITEST_DOORBELL _IO('P', 0xb)24#define PCITEST_DOORBELL _IO('P', 0xb)
25#define PCITEST_BAR_SUBRANGE _IO('P', 0xc)
25#define PCITEST_CLEAR_IRQ _IO('P', 0x10)26#define PCITEST_CLEAR_IRQ _IO('P', 0x10)
2627
27#define PCITEST_IRQ_TYPE_UNDEFINED -128#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 {...@@ -1330,14 +1330,16 @@ union perf_mem_data_src {
1330 mem_snoopx : 2, /* Snoop mode, ext */1330 mem_snoopx : 2, /* Snoop mode, ext */
1331 mem_blk : 3, /* Access blocked */1331 mem_blk : 3, /* Access blocked */
1332 mem_hops : 3, /* Hop level */1332 mem_hops : 3, /* Hop level */
1333 mem_rsvd : 18;1333 mem_region : 5, /* cache/memory regions */
1334 mem_rsvd : 13;
1334 };1335 };
1335};1336};
1336#elif defined(__BIG_ENDIAN_BITFIELD)1337#elif defined(__BIG_ENDIAN_BITFIELD)
1337union perf_mem_data_src {1338union perf_mem_data_src {
1338 __u64 val;1339 __u64 val;
1339 struct {1340 struct {
1340 __u64 mem_rsvd : 18,1341 __u64 mem_rsvd : 13,
1342 mem_region : 5, /* cache/memory regions */
1341 mem_hops : 3, /* Hop level */1343 mem_hops : 3, /* Hop level */
1342 mem_blk : 3, /* Access blocked */1344 mem_blk : 3, /* Access blocked */
1343 mem_snoopx : 2, /* Snoop mode, ext */1345 mem_snoopx : 2, /* Snoop mode, ext */
...@@ -1394,7 +1396,7 @@ union perf_mem_data_src {...@@ -1394,7 +1396,7 @@ union perf_mem_data_src {
1394#define PERF_MEM_LVLNUM_L4 0x0004 /* L4 */1396#define PERF_MEM_LVLNUM_L4 0x0004 /* L4 */
1395#define PERF_MEM_LVLNUM_L2_MHB 0x0005 /* L2 Miss Handling Buffer */1397#define PERF_MEM_LVLNUM_L2_MHB 0x0005 /* L2 Miss Handling Buffer */
1396#define PERF_MEM_LVLNUM_MSC 0x0006 /* Memory-side Cache */1398#define PERF_MEM_LVLNUM_MSC 0x0006 /* Memory-side Cache */
1397/* 0x007 available */1399#define PERF_MEM_LVLNUM_L0 0x0007 /* L0 */
1398#define PERF_MEM_LVLNUM_UNC 0x0008 /* Uncached */1400#define PERF_MEM_LVLNUM_UNC 0x0008 /* Uncached */
1399#define PERF_MEM_LVLNUM_CXL 0x0009 /* CXL */1401#define PERF_MEM_LVLNUM_CXL 0x0009 /* CXL */
1400#define PERF_MEM_LVLNUM_IO 0x000a /* I/O */1402#define PERF_MEM_LVLNUM_IO 0x000a /* I/O */
...@@ -1447,6 +1449,25 @@ union perf_mem_data_src {...@@ -1447,6 +1449,25 @@ union perf_mem_data_src {
1447/* 5-7 available */1449/* 5-7 available */
1448#define PERF_MEM_HOPS_SHIFT 431450#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
1450#define PERF_MEM_S(a, s) \1471#define PERF_MEM_S(a, s) \
1451 (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)1472 (((__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 {...@@ -1036,6 +1036,7 @@ enum {
1036 TCA_CAKE_STATS_DROP_NEXT_US,1036 TCA_CAKE_STATS_DROP_NEXT_US,
1037 TCA_CAKE_STATS_P_DROP,1037 TCA_CAKE_STATS_P_DROP,
1038 TCA_CAKE_STATS_BLUE_TIMER_US,1038 TCA_CAKE_STATS_BLUE_TIMER_US,
1039 TCA_CAKE_STATS_ACTIVE_QUEUES,
1039 __TCA_CAKE_STATS_MAX1040 __TCA_CAKE_STATS_MAX
1040};1041};
1041#define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1)1042#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 {...@@ -386,4 +386,34 @@ struct prctl_mm_map {
386# define PR_FUTEX_HASH_SET_SLOTS 1386# define PR_FUTEX_HASH_SET_SLOTS 1
387# define PR_FUTEX_HASH_GET_SLOTS 2387# 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
389#endif /* _LINUX_PRCTL_H */419#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 {...@@ -19,13 +19,20 @@ enum rseq_cpu_id_state {
19};19};
2020
21enum rseq_flags {21enum rseq_flags {
22 RSEQ_FLAG_UNREGISTER = (1 << 0),22 RSEQ_FLAG_UNREGISTER = (1 << 0),
23 RSEQ_FLAG_SLICE_EXT_DEFAULT_ON = (1 << 1),
23};24};
2425
25enum rseq_cs_flags_bit {26enum rseq_cs_flags_bit {
27 /* Historical and unsupported bits */
26 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,28 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,
27 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,29 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,
28 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2,30 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2,
31 /* (3) Intentional gap to put new bits into a separate byte */
32
33 /* User read only feature flags */
34 RSEQ_CS_FLAG_SLICE_EXT_AVAILABLE_BIT = 4,
35 RSEQ_CS_FLAG_SLICE_EXT_ENABLED_BIT = 5,
29};36};
3037
31enum rseq_cs_flags {38enum rseq_cs_flags {
...@@ -35,6 +42,11 @@ enum rseq_cs_flags {...@@ -35,6 +42,11 @@ enum rseq_cs_flags {
35 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT),42 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT),
36 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE =43 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE =
37 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT),44 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT),
45
46 RSEQ_CS_FLAG_SLICE_EXT_AVAILABLE =
47 (1U << RSEQ_CS_FLAG_SLICE_EXT_AVAILABLE_BIT),
48 RSEQ_CS_FLAG_SLICE_EXT_ENABLED =
49 (1U << RSEQ_CS_FLAG_SLICE_EXT_ENABLED_BIT),
38};50};
3951
40/*52/*
...@@ -53,11 +65,39 @@ struct rseq_cs {...@@ -53,11 +65,39 @@ struct rseq_cs {
53 __u64 abort_ip;65 __u64 abort_ip;
54} __attribute__((aligned(4 * sizeof(__u64))));66} __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
56/*89/*
57 * struct rseq is aligned on 4 * 8 bytes to ensure it is always90 * The original size and alignment of the allocation for struct rseq is
58 * contained within a single cache-line.91 * 32 bytes.
92 *
93 * The allocation size needs to be greater or equal to
94 * max(getauxval(AT_RSEQ_FEATURE_SIZE), 32), and the allocation needs to
95 * be aligned on max(getauxval(AT_RSEQ_ALIGN), 32).
96 *
97 * As an alternative, userspace is allowed to use both the original size
98 * and alignment of 32 bytes for backward compatibility.
59 *99 *
60 * A single struct rseq per thread is allowed.100 * A single active struct rseq registration per thread is allowed.
61 */101 */
62struct rseq {102struct rseq {
63 /*103 /*
...@@ -141,10 +181,27 @@ struct rseq {...@@ -141,10 +181,27 @@ struct rseq {
141 */181 */
142 __u32 mm_cid;182 __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
144 /*201 /*
145 * Flexible array member at end of structure, after last feature field.202 * Flexible array member at end of structure, after last feature field.
146 */203 */
147 char end[];204 char end[];
148} __attribute__((aligned(4 * sizeof(__u64))));205} __attribute__((aligned(32)));
149206
150#endif /* _LINUX_RSEQ_H */207#endif /* _LINUX_RSEQ_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/shm.h-1
...@@ -5,7 +5,6 @@...@@ -5,7 +5,6 @@
5#include <linux/ipc.h>5#include <linux/ipc.h>
6#include <linux/errno.h>6#include <linux/errno.h>
7#include <asm-generic/hugetlb_encode.h>7#include <asm-generic/hugetlb_encode.h>
8#include <unistd.h>
98
10/*9/*
11 * SHMMNI, SHMMAX and SHMALL are default upper limits which can be10 * 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 @@...@@ -69,6 +69,10 @@
69#define __counted_by_be(m)69#define __counted_by_be(m)
70#endif70#endif
7171
72#ifndef __counted_by_ptr
73#define __counted_by_ptr(m)
74#endif
75
72#define __kernel_nonstring76#define __kernel_nonstring
7377
74#endif /* _LINUX_STDDEF_H */78#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...@@ -92,7 +92,6 @@ enum
92 KERN_DOMAINNAME=8, /* string: domainname */92 KERN_DOMAINNAME=8, /* string: domainname */
9393
94 KERN_PANIC=15, /* int: panic timeout */94 KERN_PANIC=15, /* int: panic timeout */
95 KERN_REALROOTDEV=16, /* real root device to mount after initrd */
9695
97 KERN_SPARC_REBOOT=21, /* reboot command on Sparc */96 KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
98 KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */97 KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
...@@ -183,7 +182,7 @@ enum...@@ -183,7 +182,7 @@ enum
183 VM_LOWMEM_RESERVE_RATIO=20,/* reservation ratio for lower memory zones */182 VM_LOWMEM_RESERVE_RATIO=20,/* reservation ratio for lower memory zones */
184 VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */183 VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */
185 VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */184 VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */
186 VM_LAPTOP_MODE=23, /* vm laptop mode */185
187 VM_BLOCK_DUMP=24, /* block dump mode */186 VM_BLOCK_DUMP=24, /* block dump mode */
188 VM_HUGETLB_GROUP=25, /* permitted hugetlb group */187 VM_HUGETLB_GROUP=25, /* permitted hugetlb group */
189 VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */188 VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */
lib/libc/include/any-linux-any/linux/taskstats.h+12-1
...@@ -18,6 +18,7 @@...@@ -18,6 +18,7 @@
18#define _LINUX_TASKSTATS_H18#define _LINUX_TASKSTATS_H
1919
20#include <linux/types.h>20#include <linux/types.h>
21#include <linux/time_types.h>
2122
22/* Format for per-task data returned to userland when23/* Format for per-task data returned to userland when
23 * - a task exits24 * - a task exits
...@@ -34,7 +35,7 @@...@@ -34,7 +35,7 @@
34 */35 */
3536
3637
37#define TASKSTATS_VERSION 1638#define TASKSTATS_VERSION 17
38#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN39#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
39 * in linux/sched.h */40 * in linux/sched.h */
4041
...@@ -230,6 +231,16 @@ struct taskstats {...@@ -230,6 +231,16 @@ struct taskstats {
230231
231 __u64 irq_delay_max;232 __u64 irq_delay_max;
232 __u64 irq_delay_min;233 __u64 irq_delay_min;
234
235 /*v17: delay max timestamp record*/
236 struct __kernel_timespec cpu_delay_max_ts;
237 struct __kernel_timespec blkio_delay_max_ts;
238 struct __kernel_timespec swapin_delay_max_ts;
239 struct __kernel_timespec freepages_delay_max_ts;
240 struct __kernel_timespec thrashing_delay_max_ts;
241 struct __kernel_timespec compact_delay_max_ts;
242 struct __kernel_timespec wpcopy_delay_max_ts;
243 struct __kernel_timespec irq_delay_max_ts;
233};244};
234245
235246
lib/libc/include/any-linux-any/linux/tcp.h+23-3
...@@ -226,6 +226,24 @@ enum tcp_ca_state {...@@ -226,6 +226,24 @@ enum tcp_ca_state {
226#define TCPF_CA_Loss (1<<TCP_CA_Loss)226#define TCPF_CA_Loss (1<<TCP_CA_Loss)
227};227};
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
229struct tcp_info {247struct tcp_info {
230 __u8 tcpi_state;248 __u8 tcpi_state;
231 __u8 tcpi_ca_state;249 __u8 tcpi_ca_state;
...@@ -316,15 +334,17 @@ struct tcp_info {...@@ -316,15 +334,17 @@ struct tcp_info {
316 * in milliseconds, including any334 * in milliseconds, including any
317 * unfinished recovery.335 * unfinished recovery.
318 */336 */
319 __u32 tcpi_received_ce; /* # of CE marks received */337 __u32 tcpi_received_ce; /* # of CE marked segments received */
320 __u32 tcpi_delivered_e1_bytes; /* Accurate ECN byte counters */338 __u32 tcpi_delivered_e1_bytes; /* Accurate ECN byte counters */
321 __u32 tcpi_delivered_e0_bytes;339 __u32 tcpi_delivered_e0_bytes;
322 __u32 tcpi_delivered_ce_bytes;340 __u32 tcpi_delivered_ce_bytes;
323 __u32 tcpi_received_e1_bytes;341 __u32 tcpi_received_e1_bytes;
324 __u32 tcpi_received_e0_bytes;342 __u32 tcpi_received_e0_bytes;
325 __u32 tcpi_received_ce_bytes;343 __u32 tcpi_received_ce_bytes;
326 __u16 tcpi_accecn_fail_mode;344 __u32 tcpi_ecn_mode:2,
327 __u16 tcpi_accecn_opt_seen;345 tcpi_accecn_opt_seen:2,
346 tcpi_accecn_fail_mode:4,
347 tcpi_options2:24;
328};348};
329349
330/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */350/* 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 @@...@@ -55,7 +55,8 @@
55 _IOWR('u', 0x15, struct ublksrv_ctrl_cmd)55 _IOWR('u', 0x15, struct ublksrv_ctrl_cmd)
56#define UBLK_U_CMD_QUIESCE_DEV \56#define UBLK_U_CMD_QUIESCE_DEV \
57 _IOWR('u', 0x16, struct ublksrv_ctrl_cmd)57 _IOWR('u', 0x16, struct ublksrv_ctrl_cmd)
5858#define UBLK_U_CMD_TRY_STOP_DEV \
59 _IOWR('u', 0x17, struct ublksrv_ctrl_cmd)
59/*60/*
60 * 64bits are enough now, and it should be easy to extend in case of61 * 64bits are enough now, and it should be easy to extend in case of
61 * running out of feature flags62 * running out of feature flags
...@@ -103,6 +104,30 @@...@@ -103,6 +104,30 @@
103#define UBLK_U_IO_UNREGISTER_IO_BUF \104#define UBLK_U_IO_UNREGISTER_IO_BUF \
104 _IOWR('u', 0x24, struct ublksrv_io_cmd)105 _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
106/* only ABORT means that no re-fetch */131/* only ABORT means that no re-fetch */
107#define UBLK_IO_RES_OK 0132#define UBLK_IO_RES_OK 0
108#define UBLK_IO_RES_NEED_GET_DATA 1133#define UBLK_IO_RES_NEED_GET_DATA 1
...@@ -134,6 +159,10 @@...@@ -134,6 +159,10 @@
134#define UBLKSRV_IO_BUF_TOTAL_BITS (UBLK_QID_OFF + UBLK_QID_BITS)159#define UBLKSRV_IO_BUF_TOTAL_BITS (UBLK_QID_OFF + UBLK_QID_BITS)
135#define UBLKSRV_IO_BUF_TOTAL_SIZE (1ULL << UBLKSRV_IO_BUF_TOTAL_BITS)160#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
137/*166/*
138 * ublk server can register data buffers for incoming I/O requests with a sparse167 * ublk server can register data buffers for incoming I/O requests with a sparse
139 * io_uring buffer table. The request buffer can then be used as the data buffer168 * io_uring buffer table. The request buffer can then be used as the data buffer
...@@ -311,6 +340,36 @@...@@ -311,6 +340,36 @@
311 */340 */
312#define UBLK_F_BUF_REG_OFF_DAEMON (1ULL << 14)341#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
314/* device state */373/* device state */
315#define UBLK_S_DEV_DEAD 0374#define UBLK_S_DEV_DEAD 0
316#define UBLK_S_DEV_LIVE 1375#define UBLK_S_DEV_LIVE 1
...@@ -408,6 +467,8 @@ struct ublksrv_ctrl_dev_info {...@@ -408,6 +467,8 @@ struct ublksrv_ctrl_dev_info {
408 * passed in.467 * passed in.
409 */468 */
410#define UBLK_IO_F_NEED_REG_BUF (1U << 17)469#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
412/*473/*
413 * io cmd is described by this structure, and stored in share memory, indexed474 * io cmd is described by this structure, and stored in share memory, indexed
...@@ -525,6 +586,51 @@ struct ublksrv_io_cmd {...@@ -525,6 +586,51 @@ struct ublksrv_io_cmd {
525 };586 };
526};587};
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
528struct ublk_param_basic {634struct ublk_param_basic {
529#define UBLK_ATTR_READ_ONLY (1 << 0)635#define UBLK_ATTR_READ_ONLY (1 << 0)
530#define UBLK_ATTR_ROTATIONAL (1 << 1)636#define UBLK_ATTR_ROTATIONAL (1 << 1)
...@@ -600,6 +706,17 @@ struct ublk_param_segment {...@@ -600,6 +706,17 @@ struct ublk_param_segment {
600 __u8 pad[2];706 __u8 pad[2];
601};707};
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
603struct ublk_params {720struct ublk_params {
604 /*721 /*
605 * Total length of parameters, userspace has to set 'len' for both722 * Total length of parameters, userspace has to set 'len' for both
...@@ -614,6 +731,7 @@ struct ublk_params {...@@ -614,6 +731,7 @@ struct ublk_params {
614#define UBLK_PARAM_TYPE_ZONED (1 << 3)731#define UBLK_PARAM_TYPE_ZONED (1 << 3)
615#define UBLK_PARAM_TYPE_DMA_ALIGN (1 << 4)732#define UBLK_PARAM_TYPE_DMA_ALIGN (1 << 4)
616#define UBLK_PARAM_TYPE_SEGMENT (1 << 5)733#define UBLK_PARAM_TYPE_SEGMENT (1 << 5)
734#define UBLK_PARAM_TYPE_INTEGRITY (1 << 6) /* requires UBLK_F_INTEGRITY */
617 __u32 types; /* types of parameter included */735 __u32 types; /* types of parameter included */
618736
619 struct ublk_param_basic basic;737 struct ublk_param_basic basic;
...@@ -622,6 +740,7 @@ struct ublk_params {...@@ -622,6 +740,7 @@ struct ublk_params {
622 struct ublk_param_zoned zoned;740 struct ublk_param_zoned zoned;
623 struct ublk_param_dma_align dma;741 struct ublk_param_dma_align dma;
624 struct ublk_param_segment seg;742 struct ublk_param_segment seg;
743 struct ublk_param_integrity integrity;
625};744};
626745
627#endif746#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 {...@@ -1188,6 +1188,8 @@ enum v4l2_flash_strobe_source {
11881188
1189#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)1189#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
1190#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)1190#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
1193/* JPEG-class control IDs */1195/* JPEG-class control IDs */
...@@ -2095,6 +2097,8 @@ struct v4l2_ctrl_mpeg2_quantisation {...@@ -2095,6 +2097,8 @@ struct v4l2_ctrl_mpeg2_quantisation {
2095#define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405)2097#define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405)
2096#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406)2098#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406)
2097#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407)2099#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
2099enum v4l2_stateless_hevc_decode_mode {2103enum v4l2_stateless_hevc_decode_mode {
2100 V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,2104 V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,
...@@ -2550,6 +2554,65 @@ struct v4l2_ctrl_hevc_scaling_matrix {...@@ -2550,6 +2554,65 @@ struct v4l2_ctrl_hevc_scaling_matrix {
2550 __u8 scaling_list_dc_coef_32x32[2];2554 __u8 scaling_list_dc_coef_32x32[2];
2551};2555};
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
2553/* Stateless VP9 controls */2616/* Stateless VP9 controls */
25542617
2555#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x12618#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 {...@@ -236,7 +236,7 @@ struct vmmdev_hgcm_function_parameter32 {
236 /** Relative to the request header. */236 /** Relative to the request header. */
237 __u32 offset;237 __u32 offset;
238 } page_list;238 } page_list;
239 } u;239 } __attribute__((packed)) u;
240} __attribute__((packed));240} __attribute__((packed));
241VMMDEV_ASSERT_SIZE(vmmdev_hgcm_function_parameter32, 4 + 8);241VMMDEV_ASSERT_SIZE(vmmdev_hgcm_function_parameter32, 4 + 8);
242242
...@@ -251,7 +251,7 @@ struct vmmdev_hgcm_function_parameter64 {...@@ -251,7 +251,7 @@ struct vmmdev_hgcm_function_parameter64 {
251 union {251 union {
252 __u64 phys_addr;252 __u64 phys_addr;
253 __u64 linear_addr;253 __u64 linear_addr;
254 } u;254 } __attribute__((packed)) u;
255 } __attribute__((packed)) pointer;255 } __attribute__((packed)) pointer;
256 struct {256 struct {
257 /** Size of the buffer described by the page list. */257 /** Size of the buffer described by the page list. */
lib/libc/include/any-linux-any/linux/vduse.h+80-5
...@@ -10,6 +10,10 @@...@@ -10,6 +10,10 @@
1010
11#define VDUSE_API_VERSION 011#define VDUSE_API_VERSION 0
1212
13/* VQ groups and ASID support */
14
15#define VDUSE_API_VERSION_1 1
16
13/*17/*
14 * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).18 * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).
15 * This is used for future extension.19 * This is used for future extension.
...@@ -27,6 +31,8 @@...@@ -27,6 +31,8 @@
27 * @features: virtio features31 * @features: virtio features
28 * @vq_num: the number of virtqueues32 * @vq_num: the number of virtqueues
29 * @vq_align: the allocation alignment of virtqueue's metadata33 * @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
30 * @reserved: for future use, needs to be initialized to zero36 * @reserved: for future use, needs to be initialized to zero
31 * @config_size: the size of the configuration space37 * @config_size: the size of the configuration space
32 * @config: the buffer of the configuration space38 * @config: the buffer of the configuration space
...@@ -41,7 +47,9 @@ struct vduse_dev_config {...@@ -41,7 +47,9 @@ struct vduse_dev_config {
41 __u64 features;47 __u64 features;
42 __u32 vq_num;48 __u32 vq_num;
43 __u32 vq_align;49 __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];
45 __u32 config_size;53 __u32 config_size;
46 __u8 config[];54 __u8 config[];
47};55};
...@@ -118,14 +126,18 @@ struct vduse_config_data {...@@ -118,14 +126,18 @@ struct vduse_config_data {
118 * struct vduse_vq_config - basic configuration of a virtqueue126 * struct vduse_vq_config - basic configuration of a virtqueue
119 * @index: virtqueue index127 * @index: virtqueue index
120 * @max_size: the max size of virtqueue128 * @max_size: the max size of virtqueue
121 * @reserved: for future use, needs to be initialized to zero129 * @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
122 *132 *
123 * Structure used by VDUSE_VQ_SETUP ioctl to setup a virtqueue.133 * Structure used by VDUSE_VQ_SETUP ioctl to setup a virtqueue.
124 */134 */
125struct vduse_vq_config {135struct vduse_vq_config {
126 __u32 index;136 __u32 index;
127 __u16 max_size;137 __u16 max_size;
128 __u16 reserved[13];138 __u16 reserved1;
139 __u32 group;
140 __u16 reserved2[10];
129};141};
130142
131/*143/*
...@@ -156,6 +168,16 @@ struct vduse_vq_state_packed {...@@ -156,6 +168,16 @@ struct vduse_vq_state_packed {
156 __u16 last_used_idx;168 __u16 last_used_idx;
157};169};
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
159/**181/**
160 * struct vduse_vq_info - information of a virtqueue182 * struct vduse_vq_info - information of a virtqueue
161 * @index: virtqueue index183 * @index: virtqueue index
...@@ -215,6 +237,7 @@ struct vduse_vq_eventfd {...@@ -215,6 +237,7 @@ struct vduse_vq_eventfd {
215 * @uaddr: start address of userspace memory, it must be aligned to page size237 * @uaddr: start address of userspace memory, it must be aligned to page size
216 * @iova: start of the IOVA region238 * @iova: start of the IOVA region
217 * @size: size of the IOVA region239 * @size: size of the IOVA region
240 * @asid: Address space ID of the IOVA region
218 * @reserved: for future use, needs to be initialized to zero241 * @reserved: for future use, needs to be initialized to zero
219 *242 *
220 * Structure used by VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM243 * Structure used by VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM
...@@ -224,7 +247,8 @@ struct vduse_iova_umem {...@@ -224,7 +247,8 @@ struct vduse_iova_umem {
224 __u64 uaddr;247 __u64 uaddr;
225 __u64 iova;248 __u64 iova;
226 __u64 size;249 __u64 size;
227 __u64 reserved[3];250 __u32 asid;
251 __u32 reserved[5];
228};252};
229253
230/* Register userspace memory for IOVA regions */254/* Register userspace memory for IOVA regions */
...@@ -238,6 +262,7 @@ struct vduse_iova_umem {...@@ -238,6 +262,7 @@ struct vduse_iova_umem {
238 * @start: start of the IOVA region262 * @start: start of the IOVA region
239 * @last: last of the IOVA region263 * @last: last of the IOVA region
240 * @capability: capability of the IOVA region264 * @capability: capability of the IOVA region
265 * @asid: Address space ID of the IOVA region, only if device API version >= 1
241 * @reserved: for future use, needs to be initialized to zero266 * @reserved: for future use, needs to be initialized to zero
242 *267 *
243 * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of268 * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of
...@@ -248,7 +273,8 @@ struct vduse_iova_info {...@@ -248,7 +273,8 @@ struct vduse_iova_info {
248 __u64 last;273 __u64 last;
249#define VDUSE_IOVA_CAP_UMEM (1 << 0)274#define VDUSE_IOVA_CAP_UMEM (1 << 0)
250 __u64 capability;275 __u64 capability;
251 __u64 reserved[3];276 __u32 asid; /* Only if device API version >= 1 */
277 __u32 reserved[5];
252};278};
253279
254/*280/*
...@@ -257,6 +283,32 @@ struct vduse_iova_info {...@@ -257,6 +283,32 @@ struct vduse_iova_info {
257 */283 */
258#define VDUSE_IOTLB_GET_INFO _IOWR(VDUSE_BASE, 0x1a, struct vduse_iova_info)284#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
260/* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */312/* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */
261313
262/**314/**
...@@ -265,11 +317,14 @@ struct vduse_iova_info {...@@ -265,11 +317,14 @@ struct vduse_iova_info {
265 * @VDUSE_SET_STATUS: set the device status317 * @VDUSE_SET_STATUS: set the device status
266 * @VDUSE_UPDATE_IOTLB: Notify userspace to update the memory mapping for318 * @VDUSE_UPDATE_IOTLB: Notify userspace to update the memory mapping for
267 * specified IOVA range via VDUSE_IOTLB_GET_FD ioctl319 * 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.
268 */322 */
269enum vduse_req_type {323enum vduse_req_type {
270 VDUSE_GET_VQ_STATE,324 VDUSE_GET_VQ_STATE,
271 VDUSE_SET_STATUS,325 VDUSE_SET_STATUS,
272 VDUSE_UPDATE_IOTLB,326 VDUSE_UPDATE_IOTLB,
327 VDUSE_SET_VQ_GROUP_ASID,
273};328};
274329
275/**330/**
...@@ -304,6 +359,19 @@ struct vduse_iova_range {...@@ -304,6 +359,19 @@ struct vduse_iova_range {
304 __u64 last;359 __u64 last;
305};360};
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
307/**375/**
308 * struct vduse_dev_request - control request376 * struct vduse_dev_request - control request
309 * @type: request type377 * @type: request type
...@@ -312,6 +380,8 @@ struct vduse_iova_range {...@@ -312,6 +380,8 @@ struct vduse_iova_range {
312 * @vq_state: virtqueue state, only index field is available380 * @vq_state: virtqueue state, only index field is available
313 * @s: device status381 * @s: device status
314 * @iova: IOVA range for updating382 * @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
315 * @padding: padding385 * @padding: padding
316 *386 *
317 * Structure used by read(2) on /dev/vduse/$NAME.387 * Structure used by read(2) on /dev/vduse/$NAME.
...@@ -324,6 +394,11 @@ struct vduse_dev_request {...@@ -324,6 +394,11 @@ struct vduse_dev_request {
324 struct vduse_vq_state vq_state;394 struct vduse_vq_state vq_state;
325 struct vduse_dev_status s;395 struct vduse_dev_status s;
326 struct vduse_iova_range iova;396 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;
327 __u32 padding[32];402 __u32 padding[32];
328 };403 };
329};404};
lib/libc/include/any-linux-any/linux/version.h+3-3
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1#define LINUX_VERSION_CODE 3980801#define LINUX_VERSION_CODE 458752
2#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))2#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
3#define LINUX_VERSION_MAJOR 63#define LINUX_VERSION_MAJOR 7
4#define LINUX_VERSION_PATCHLEVEL 194#define LINUX_VERSION_PATCHLEVEL 0
5#define LINUX_VERSION_SUBLEVEL 05#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 {...@@ -964,6 +964,10 @@ struct vfio_device_bind_iommufd {
964 * hwpt corresponding to the given pt_id.964 * hwpt corresponding to the given pt_id.
965 *965 *
966 * Return: 0 on success, -errno on failure.966 * 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.
967 */971 */
968struct vfio_device_attach_iommufd_pt {972struct vfio_device_attach_iommufd_pt {
969 __u32 argsz;973 __u32 argsz;
lib/libc/include/any-linux-any/linux/videodev2.h+3
...@@ -748,6 +748,7 @@ struct v4l2_pix_format {...@@ -748,6 +748,7 @@ struct v4l2_pix_format {
748#define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */748#define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */
749#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */749#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */
750#define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */750#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 */
751#define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */752#define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */
752#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */753#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */
753#define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */754#define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */
...@@ -1916,6 +1917,8 @@ enum v4l2_ctrl_type {...@@ -1916,6 +1917,8 @@ enum v4l2_ctrl_type {
1916 V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS = 0x0272,1917 V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS = 0x0272,
1917 V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX = 0x0273,1918 V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX = 0x0273,
1918 V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS = 0x0274,1919 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
1920 V4L2_CTRL_TYPE_AV1_SEQUENCE = 0x280,1923 V4L2_CTRL_TYPE_AV1_SEQUENCE = 0x280,
1921 V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281,1924 V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281,
lib/libc/include/any-linux-any/linux/virtio_ring.h+1-2
...@@ -31,7 +31,6 @@...@@ -31,7 +31,6 @@
31 * SUCH DAMAGE.31 * SUCH DAMAGE.
32 *32 *
33 * Copyright Rusty Russell IBM Corporation 2007. */33 * Copyright Rusty Russell IBM Corporation 2007. */
34#include <stdint.h>
35#include <linux/types.h>34#include <linux/types.h>
36#include <linux/virtio_types.h>35#include <linux/virtio_types.h>
3736
...@@ -200,7 +199,7 @@ static __inline__ void vring_init(struct vring *vr, unsigned int num, void *p,...@@ -200,7 +199,7 @@ static __inline__ void vring_init(struct vring *vr, unsigned int num, void *p,
200 vr->num = num;199 vr->num = num;
201 vr->desc = p;200 vr->desc = p;
202 vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct vring_desc));201 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)
204 + align-1) & ~(align - 1));203 + align-1) & ~(align - 1));
205}204}
206205
lib/libc/include/any-linux-any/linux/vmclock-abi.h+20
...@@ -115,6 +115,17 @@ struct vmclock_abi {...@@ -115,6 +115,17 @@ struct vmclock_abi {
115 * bit again after the update, using the about-to-be-valid fields.115 * bit again after the update, using the about-to-be-valid fields.
116 */116 */
117#define VMCLOCK_FLAG_TIME_MONOTONIC (1 << 7)117#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
119 __u8 pad[2];130 __u8 pad[2];
120 __u8 clock_status;131 __u8 clock_status;
...@@ -177,6 +188,15 @@ struct vmclock_abi {...@@ -177,6 +188,15 @@ struct vmclock_abi {
177 __le64 time_frac_sec; /* Units of 1/2^64 of a second */188 __le64 time_frac_sec; /* Units of 1/2^64 of a second */
178 __le64 time_esterror_nanosec;189 __le64 time_esterror_nanosec;
179 __le64 time_maxerror_nanosec;190 __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;
180};200};
181201
182#endif /* __VMCLOCK_ABI_H__ */202#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 {...@@ -56,6 +56,7 @@ enum {
56 BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL,56 BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL,
57 BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,57 BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,
58 BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,58 BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,
59 BNXT_RE_UCNTX_CMASK_QP_RATE_LIMIT_ENABLED = 0x80ULL,
59};60};
6061
61enum bnxt_re_wqe_mode {62enum bnxt_re_wqe_mode {
...@@ -215,4 +216,19 @@ enum bnxt_re_toggle_mem_methods {...@@ -215,4 +216,19 @@ enum bnxt_re_toggle_mem_methods {
215 BNXT_RE_METHOD_GET_TOGGLE_MEM = (1U << UVERBS_ID_NS_SHIFT),216 BNXT_RE_METHOD_GET_TOGGLE_MEM = (1U << UVERBS_ID_NS_SHIFT),
216 BNXT_RE_METHOD_RELEASE_TOGGLE_MEM,217 BNXT_RE_METHOD_RELEASE_TOGGLE_MEM,
217};218};
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};
218#endif /* __BNXT_RE_UVERBS_ABI_H__*/234#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 {...@@ -56,6 +56,7 @@ enum uverbs_default_objects {
56 UVERBS_OBJECT_COUNTERS,56 UVERBS_OBJECT_COUNTERS,
57 UVERBS_OBJECT_ASYNC_EVENT,57 UVERBS_OBJECT_ASYNC_EVENT,
58 UVERBS_OBJECT_DMAH,58 UVERBS_OBJECT_DMAH,
59 UVERBS_OBJECT_DMABUF,
59};60};
6061
61enum {62enum {
...@@ -73,6 +74,7 @@ enum uverbs_methods_device {...@@ -73,6 +74,7 @@ enum uverbs_methods_device {
73 UVERBS_METHOD_QUERY_CONTEXT,74 UVERBS_METHOD_QUERY_CONTEXT,
74 UVERBS_METHOD_QUERY_GID_TABLE,75 UVERBS_METHOD_QUERY_GID_TABLE,
75 UVERBS_METHOD_QUERY_GID_ENTRY,76 UVERBS_METHOD_QUERY_GID_ENTRY,
77 UVERBS_METHOD_QUERY_PORT_SPEED,
76};78};
7779
78enum uverbs_attrs_invoke_write_cmd_attr_ids {80enum uverbs_attrs_invoke_write_cmd_attr_ids {
...@@ -86,6 +88,11 @@ enum uverbs_attrs_query_port_cmd_attr_ids {...@@ -86,6 +88,11 @@ enum uverbs_attrs_query_port_cmd_attr_ids {
86 UVERBS_ATTR_QUERY_PORT_RESP,88 UVERBS_ATTR_QUERY_PORT_RESP,
87};89};
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
89enum uverbs_attrs_get_context_attr_ids {96enum uverbs_attrs_get_context_attr_ids {
90 UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,97 UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,
91 UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,98 UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,
...@@ -257,6 +264,15 @@ enum uverbs_methods_dmah {...@@ -257,6 +264,15 @@ enum uverbs_methods_dmah {
257 UVERBS_METHOD_DMAH_FREE,264 UVERBS_METHOD_DMAH_FREE,
258};265};
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
260enum uverbs_attrs_reg_dm_mr_cmd_attr_ids {276enum uverbs_attrs_reg_dm_mr_cmd_attr_ids {
261 UVERBS_ATTR_REG_DM_MR_HANDLE,277 UVERBS_ATTR_REG_DM_MR_HANDLE,
262 UVERBS_ATTR_REG_DM_MR_OFFSET,278 UVERBS_ATTR_REG_DM_MR_OFFSET,
lib/libc/include/any-linux-any/rdma/mana-abi.h+3
...@@ -17,6 +17,9 @@...@@ -17,6 +17,9 @@
17#define MANA_IB_UVERBS_ABI_VERSION 117#define MANA_IB_UVERBS_ABI_VERSION 1
1818
19enum mana_ib_create_cq_flags {19enum mana_ib_create_cq_flags {
20 /* Reserved for backward compatibility. Legacy
21 * kernel versions use it to create CQs in RNIC
22 */
20 MANA_IB_CREATE_RNIC_CQ = 1 << 0,23 MANA_IB_CREATE_RNIC_CQ = 1 << 0,
21};24};
2225
lib/libc/include/any-linux-any/scsi/scsi_bsg_ufs.h+8-9
...@@ -94,16 +94,15 @@ struct utp_upiu_header {...@@ -94,16 +94,15 @@ struct utp_upiu_header {
94};94};
9595
96/**96/**
97 * struct utp_upiu_query - upiu request buffer structure for97 * struct utp_upiu_query - QUERY REQUEST UPIU structure.
98 * query request.98 * @opcode: query function to perform B-0
99 * @opcode: command to perform B-099 * @idn: descriptor or attribute identification number B-1
100 * @idn: a value that indicates the particular type of data B-1100 * @index: Index that further identifies which data to access B-2
101 * @index: Index to further identify data B-2101 * @selector: Index that further identifies which data to access B-3
102 * @selector: Index to further identify data B-3
103 * @reserved_osf: spec reserved field B-4,5102 * @reserved_osf: spec reserved field B-4,5
104 * @length: number of descriptor bytes to read/write B-6,7103 * @length: number of descriptor bytes to read or write B-6,7
105 * @value: Attribute value to be written DW-5104 * @value: if @opcode == UPIU_QUERY_OPCODE_WRITE_ATTR, the value to be written B-6,7
106 * @reserved: spec reserved DW-6,7105 * @reserved: reserved for future use DW-6,7
107 */106 */
108struct utp_upiu_query {107struct utp_upiu_query {
109 __u8 opcode;108 __u8 opcode;
lib/libc/include/any-linux-any/sound/sof/tokens.h+6
...@@ -56,6 +56,9 @@...@@ -56,6 +56,9 @@
56#define SOF_TKN_SCHED_LP_MODE 20756#define SOF_TKN_SCHED_LP_MODE 207
57#define SOF_TKN_SCHED_MEM_USAGE 20857#define SOF_TKN_SCHED_MEM_USAGE 208
58#define SOF_TKN_SCHED_USE_CHAIN_DMA 20958#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
60/* volume */63/* volume */
61#define SOF_TKN_VOLUME_RAMP_STEP_TYPE 25064#define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250
...@@ -107,6 +110,9 @@...@@ -107,6 +110,9 @@
107#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417110#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417
108111
109#define SOF_TKN_COMP_SCHED_DOMAIN 418112#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
111/* SSP */117/* SSP */
112#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500118#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
lib/libc/include/arc-linux-any/asm/swab.h-63
...@@ -19,9 +19,6 @@...@@ -19,9 +19,6 @@
1919
20#include <linux/types.h>20#include <linux/types.h>
2121
22/* Native single cycle endian swap insn */
23#ifdef CONFIG_ARC_HAS_SWAPE
24
25#define __arch_swab32(x) \22#define __arch_swab32(x) \
26({ \23({ \
27 unsigned int tmp = x; \24 unsigned int tmp = x; \
...@@ -32,66 +29,6 @@...@@ -32,66 +29,6 @@
32 tmp; \29 tmp; \
33})30})
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
95#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)32#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
96#define __SWAB_64_THRU_32__33#define __SWAB_64_THRU_32__
97#endif34#endif
lib/libc/include/arc-linux-any/asm/unistd_32.h+1
...@@ -351,6 +351,7 @@...@@ -351,6 +351,7 @@
351#define __NR_file_getattr 468351#define __NR_file_getattr 468
352#define __NR_file_setattr 469352#define __NR_file_setattr 469
353#define __NR_listns 470353#define __NR_listns 470
354#define __NR_rseq_slice_yield 471
354355
355356
356#endif /* _ASM_UNISTD_32_H */357#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 @@...@@ -89,15 +89,6 @@
89#define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */89#define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */
90#define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */90#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
101/* 92/*
102 * These are 'magic' values for PTRACE_PEEKUSR that return info about where a93 * These are 'magic' values for PTRACE_PEEKUSR that return info about where a
103 * process is located in memory.94 * process is located in memory.
lib/libc/include/arm-linux-any/asm/unistd-eabi.h+1
...@@ -424,5 +424,6 @@...@@ -424,5 +424,6 @@
424#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)424#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)
425#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)425#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
426#define __NR_listns (__NR_SYSCALL_BASE + 470)426#define __NR_listns (__NR_SYSCALL_BASE + 470)
427#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
427428
428#endif /* _ASM_UNISTD_EABI_H */429#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 @@...@@ -436,5 +436,6 @@
436#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)436#define __NR_file_getattr (__NR_SYSCALL_BASE + 468)
437#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)437#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
438#define __NR_listns (__NR_SYSCALL_BASE + 470)438#define __NR_listns (__NR_SYSCALL_BASE + 470)
439#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
439440
440#endif /* _ASM_UNISTD_OABI_H */441#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 @@...@@ -347,6 +347,7 @@
347#define __NR_file_getattr 468347#define __NR_file_getattr 468
348#define __NR_file_setattr 469348#define __NR_file_setattr 469
349#define __NR_listns 470349#define __NR_listns 470
350#define __NR_rseq_slice_yield 471
350351
351352
352#endif /* _ASM_UNISTD_32_H */353#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 @@...@@ -346,6 +346,7 @@
346#define __NR_file_getattr 468346#define __NR_file_getattr 468
347#define __NR_file_setattr 469347#define __NR_file_setattr 469
348#define __NR_listns 470348#define __NR_listns 470
349#define __NR_rseq_slice_yield 471
349350
350351
351#endif /* _ASM_UNISTD_32_H */352#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 @@...@@ -18,5 +18,6 @@
18#define HWCAP_LOONGARCH_LBT_MIPS (1 << 12)18#define HWCAP_LOONGARCH_LBT_MIPS (1 << 12)
19#define HWCAP_LOONGARCH_PTW (1 << 13)19#define HWCAP_LOONGARCH_PTW (1 << 13)
20#define HWCAP_LOONGARCH_LSPW (1 << 14)20#define HWCAP_LOONGARCH_LSPW (1 << 14)
21#define HWCAP_LOONGARCH_SCQ (1 << 15)
2122
22#endif /* _ASM_HWCAP_H */23#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 {...@@ -105,6 +105,7 @@ struct kvm_fpu {
105#define KVM_LOONGARCH_VM_FEAT_PV_STEALTIME 7105#define KVM_LOONGARCH_VM_FEAT_PV_STEALTIME 7
106#define KVM_LOONGARCH_VM_FEAT_PTW 8106#define KVM_LOONGARCH_VM_FEAT_PTW 8
107#define KVM_LOONGARCH_VM_FEAT_MSGINT 9107#define KVM_LOONGARCH_VM_FEAT_MSGINT 9
108#define KVM_LOONGARCH_VM_FEAT_PV_PREEMPT 10
108109
109/* Device Control API on vcpu fd */110/* Device Control API on vcpu fd */
110#define KVM_LOONGARCH_VCPU_CPUCFG 0111#define KVM_LOONGARCH_VCPU_CPUCFG 0
lib/libc/include/loongarch-linux-any/asm/kvm_para.h+1
...@@ -15,6 +15,7 @@...@@ -15,6 +15,7 @@
15#define CPUCFG_KVM_FEATURE (CPUCFG_KVM_BASE + 4)15#define CPUCFG_KVM_FEATURE (CPUCFG_KVM_BASE + 4)
16#define KVM_FEATURE_IPI 116#define KVM_FEATURE_IPI 1
17#define KVM_FEATURE_STEAL_TIME 217#define KVM_FEATURE_STEAL_TIME 2
18#define KVM_FEATURE_PREEMPT 3
18/* BIT 24 - 31 are features configurable by user space vmm */19/* BIT 24 - 31 are features configurable by user space vmm */
19#define KVM_FEATURE_VIRT_EXTIOI 2420#define KVM_FEATURE_VIRT_EXTIOI 24
20#define KVM_FEATURE_USER_HCALL 2521#define KVM_FEATURE_USER_HCALL 25
lib/libc/include/loongarch-linux-any/asm/unistd_32.h+2
...@@ -292,6 +292,7 @@...@@ -292,6 +292,7 @@
292#define __NR_landlock_create_ruleset 444292#define __NR_landlock_create_ruleset 444
293#define __NR_landlock_add_rule 445293#define __NR_landlock_add_rule 445
294#define __NR_landlock_restrict_self 446294#define __NR_landlock_restrict_self 446
295#define __NR_memfd_secret 447
295#define __NR_process_mrelease 448296#define __NR_process_mrelease 448
296#define __NR_futex_waitv 449297#define __NR_futex_waitv 449
297#define __NR_set_mempolicy_home_node 450298#define __NR_set_mempolicy_home_node 450
...@@ -315,6 +316,7 @@...@@ -315,6 +316,7 @@
315#define __NR_file_getattr 468316#define __NR_file_getattr 468
316#define __NR_file_setattr 469317#define __NR_file_setattr 469
317#define __NR_listns 470318#define __NR_listns 470
319#define __NR_rseq_slice_yield 471
318320
319321
320#endif /* _ASM_UNISTD_32_H */322#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 @@...@@ -300,6 +300,7 @@
300#define __NR_landlock_create_ruleset 444300#define __NR_landlock_create_ruleset 444
301#define __NR_landlock_add_rule 445301#define __NR_landlock_add_rule 445
302#define __NR_landlock_restrict_self 446302#define __NR_landlock_restrict_self 446
303#define __NR_memfd_secret 447
303#define __NR_process_mrelease 448304#define __NR_process_mrelease 448
304#define __NR_futex_waitv 449305#define __NR_futex_waitv 449
305#define __NR_set_mempolicy_home_node 450306#define __NR_set_mempolicy_home_node 450
...@@ -323,6 +324,7 @@...@@ -323,6 +324,7 @@
323#define __NR_file_getattr 468324#define __NR_file_getattr 468
324#define __NR_file_setattr 469325#define __NR_file_setattr 469
325#define __NR_listns 470326#define __NR_listns 470
327#define __NR_rseq_slice_yield 471
326328
327329
328#endif /* _ASM_UNISTD_64_H */330#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 @@...@@ -443,6 +443,7 @@
443#define __NR_file_getattr 468443#define __NR_file_getattr 468
444#define __NR_file_setattr 469444#define __NR_file_setattr 469
445#define __NR_listns 470445#define __NR_listns 470
446#define __NR_rseq_slice_yield 471
446447
447448
448#endif /* _ASM_UNISTD_32_H */449#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 @@...@@ -50,6 +50,7 @@
50#define EDOTDOT 73 /* RFS specific error */50#define EDOTDOT 73 /* RFS specific error */
51#define EMULTIHOP 74 /* Multihop attempted */51#define EMULTIHOP 74 /* Multihop attempted */
52#define EBADMSG 77 /* Not a data message */52#define EBADMSG 77 /* Not a data message */
53#define EFSBADCRC EBADMSG /* Bad CRC detected */
53#define ENAMETOOLONG 78 /* File name too long */54#define ENAMETOOLONG 78 /* File name too long */
54#define EOVERFLOW 79 /* Value too large for defined data type */55#define EOVERFLOW 79 /* Value too large for defined data type */
55#define ENOTUNIQ 80 /* Name not unique on network */56#define ENOTUNIQ 80 /* Name not unique on network */
...@@ -88,6 +89,7 @@...@@ -88,6 +89,7 @@
88#define EISCONN 133 /* Transport endpoint is already connected */89#define EISCONN 133 /* Transport endpoint is already connected */
89#define ENOTCONN 134 /* Transport endpoint is not connected */90#define ENOTCONN 134 /* Transport endpoint is not connected */
90#define EUCLEAN 135 /* Structure needs cleaning */91#define EUCLEAN 135 /* Structure needs cleaning */
92#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
91#define ENOTNAM 137 /* Not a XENIX named type file */93#define ENOTNAM 137 /* Not a XENIX named type file */
92#define ENAVAIL 138 /* No XENIX semaphores available */94#define ENAVAIL 138 /* No XENIX semaphores available */
93#define EISNAM 139 /* Is a named type file */95#define EISNAM 139 /* Is a named type file */
lib/libc/include/mips-linux-any/asm/unistd_n32.h+1
...@@ -399,5 +399,6 @@...@@ -399,5 +399,6 @@
399#define __NR_file_getattr (__NR_Linux + 468)399#define __NR_file_getattr (__NR_Linux + 468)
400#define __NR_file_setattr (__NR_Linux + 469)400#define __NR_file_setattr (__NR_Linux + 469)
401#define __NR_listns (__NR_Linux + 470)401#define __NR_listns (__NR_Linux + 470)
402#define __NR_rseq_slice_yield (__NR_Linux + 471)
402403
403#endif /* _ASM_UNISTD_N32_H */404#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 @@...@@ -375,5 +375,6 @@
375#define __NR_file_getattr (__NR_Linux + 468)375#define __NR_file_getattr (__NR_Linux + 468)
376#define __NR_file_setattr (__NR_Linux + 469)376#define __NR_file_setattr (__NR_Linux + 469)
377#define __NR_listns (__NR_Linux + 470)377#define __NR_listns (__NR_Linux + 470)
378#define __NR_rseq_slice_yield (__NR_Linux + 471)
378379
379#endif /* _ASM_UNISTD_N64_H */380#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 @@...@@ -445,5 +445,6 @@
445#define __NR_file_getattr (__NR_Linux + 468)445#define __NR_file_getattr (__NR_Linux + 468)
446#define __NR_file_setattr (__NR_Linux + 469)446#define __NR_file_setattr (__NR_Linux + 469)
447#define __NR_listns (__NR_Linux + 470)447#define __NR_listns (__NR_Linux + 470)
448#define __NR_rseq_slice_yield (__NR_Linux + 471)
448449
449#endif /* _ASM_UNISTD_O32_H */450#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 @@...@@ -452,6 +452,7 @@
452#define __NR_file_getattr 468452#define __NR_file_getattr 468
453#define __NR_file_setattr 469453#define __NR_file_setattr 469
454#define __NR_listns 470454#define __NR_listns 470
455#define __NR_rseq_slice_yield 471
455456
456457
457#endif /* _ASM_UNISTD_32_H */458#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 @@...@@ -424,6 +424,7 @@
424#define __NR_file_getattr 468424#define __NR_file_getattr 468
425#define __NR_file_setattr 469425#define __NR_file_setattr 469
426#define __NR_listns 470426#define __NR_listns 470
427#define __NR_rseq_slice_yield 471
427428
428429
429#endif /* _ASM_UNISTD_64_H */430#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 {...@@ -86,6 +86,7 @@ struct riscv_hwprobe {
86#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)86#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)
87#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)87#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)
88#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)88#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)
89#define RISCV_HWPROBE_EXT_ZICFILP (1ULL << 63)
8990
90#define RISCV_HWPROBE_KEY_CPUPERF_0 591#define RISCV_HWPROBE_KEY_CPUPERF_0 5
91#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)92#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
...@@ -113,6 +114,9 @@ struct riscv_hwprobe {...@@ -113,6 +114,9 @@ struct riscv_hwprobe {
113#define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 13114#define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 13
114#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14115#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14
115#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15116#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
116/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */120/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
117121
118/* Flags */122/* Flags */
lib/libc/include/riscv-linux-any/asm/kvm.h+3
...@@ -192,6 +192,9 @@ enum KVM_RISCV_ISA_EXT_ID {...@@ -192,6 +192,9 @@ enum KVM_RISCV_ISA_EXT_ID {
192 KVM_RISCV_ISA_EXT_ZFBFMIN,192 KVM_RISCV_ISA_EXT_ZFBFMIN,
193 KVM_RISCV_ISA_EXT_ZVFBFMIN,193 KVM_RISCV_ISA_EXT_ZVFBFMIN,
194 KVM_RISCV_ISA_EXT_ZVFBFWMA,194 KVM_RISCV_ISA_EXT_ZVFBFWMA,
195 KVM_RISCV_ISA_EXT_ZCLSD,
196 KVM_RISCV_ISA_EXT_ZILSD,
197 KVM_RISCV_ISA_EXT_ZALASR,
195 KVM_RISCV_ISA_EXT_MAX,198 KVM_RISCV_ISA_EXT_MAX,
196};199};
197200
lib/libc/include/riscv-linux-any/asm/ptrace.h+37
...@@ -9,6 +9,7 @@...@@ -9,6 +9,7 @@
9#ifndef __ASSEMBLER__9#ifndef __ASSEMBLER__
1010
11#include <linux/types.h>11#include <linux/types.h>
12#include <linux/const.h>
1213
13#define PTRACE_GETFDPIC 3314#define PTRACE_GETFDPIC 33
1415
...@@ -127,6 +128,42 @@ struct __riscv_v_regset_state {...@@ -127,6 +128,42 @@ struct __riscv_v_regset_state {
127 */128 */
128#define RISCV_MAX_VLENB (8192)129#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
130#endif /* __ASSEMBLER__ */167#endif /* __ASSEMBLER__ */
131168
132#endif /* _ASM_RISCV_PTRACE_H */169#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 @@...@@ -10,6 +10,7 @@
1010
11/* The Magic number for signal context frame header. */11/* The Magic number for signal context frame header. */
12#define RISCV_V_MAGIC 0x5346545712#define RISCV_V_MAGIC 0x53465457
13#define RISCV_ZICFISS_MAGIC 0x9487
13#define END_MAGIC 0x014#define END_MAGIC 0x0
1415
15/* The size of END signal context header. */16/* The size of END signal context header. */
lib/libc/include/riscv-linux-any/asm/unistd_32.h+1
...@@ -318,6 +318,7 @@...@@ -318,6 +318,7 @@
318#define __NR_file_getattr 468318#define __NR_file_getattr 468
319#define __NR_file_setattr 469319#define __NR_file_setattr 469
320#define __NR_listns 470320#define __NR_listns 470
321#define __NR_rseq_slice_yield 471
321322
322323
323#endif /* _ASM_UNISTD_32_H */324#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 @@...@@ -328,6 +328,7 @@
328#define __NR_file_getattr 468328#define __NR_file_getattr 468
329#define __NR_file_setattr 469329#define __NR_file_setattr 469
330#define __NR_listns 470330#define __NR_listns 470
331#define __NR_rseq_slice_yield 471
331332
332333
333#endif /* _ASM_UNISTD_64_H */334#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 @@...@@ -390,6 +390,7 @@
390#define __NR_file_getattr 468390#define __NR_file_getattr 468
391#define __NR_file_setattr 469391#define __NR_file_setattr 469
392#define __NR_listns 470392#define __NR_listns 470
393#define __NR_rseq_slice_yield 471
393394
394395
395#endif /* _ASM_UNISTD_64_H */396#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 @@...@@ -48,6 +48,7 @@
48#define ENOSR 74 /* Out of streams resources */48#define ENOSR 74 /* Out of streams resources */
49#define ENOMSG 75 /* No message of desired type */49#define ENOMSG 75 /* No message of desired type */
50#define EBADMSG 76 /* Not a data message */50#define EBADMSG 76 /* Not a data message */
51#define EFSBADCRC EBADMSG /* Bad CRC detected */
51#define EIDRM 77 /* Identifier removed */52#define EIDRM 77 /* Identifier removed */
52#define EDEADLK 78 /* Resource deadlock would occur */53#define EDEADLK 78 /* Resource deadlock would occur */
53#define ENOLCK 79 /* No record locks available */54#define ENOLCK 79 /* No record locks available */
...@@ -91,6 +92,7 @@...@@ -91,6 +92,7 @@
91#define ENOTUNIQ 115 /* Name not unique on network */92#define ENOTUNIQ 115 /* Name not unique on network */
92#define ERESTART 116 /* Interrupted syscall should be restarted */93#define ERESTART 116 /* Interrupted syscall should be restarted */
93#define EUCLEAN 117 /* Structure needs cleaning */94#define EUCLEAN 117 /* Structure needs cleaning */
95#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
94#define ENOTNAM 118 /* Not a XENIX named type file */96#define ENOTNAM 118 /* Not a XENIX named type file */
95#define ENAVAIL 119 /* No XENIX semaphores available */97#define ENAVAIL 119 /* No XENIX semaphores available */
96#define EISNAM 120 /* Is a named type file */98#define EISNAM 120 /* Is a named type file */
lib/libc/include/sparc-linux-any/asm/ioctls.h+4-4
...@@ -5,10 +5,10 @@...@@ -5,10 +5,10 @@
5#include <asm/ioctl.h>5#include <asm/ioctl.h>
66
7/* Big T */7/* Big T */
8#define TCGETA _IOR('T', 1, struct termio)8#define TCGETA 0x40125401 /* _IOR('T', 1, struct termio) */
9#define TCSETA _IOW('T', 2, struct termio)9#define TCSETA 0x80125402 /* _IOW('T', 2, struct termio) */
10#define TCSETAW _IOW('T', 3, struct termio)10#define TCSETAW 0x80125403 /* _IOW('T', 3, struct termio) */
11#define TCSETAF _IOW('T', 4, struct termio)11#define TCSETAF 0x80125404 /* _IOW('T', 4, struct termio) */
12#define TCSBRK _IO('T', 5)12#define TCSBRK _IO('T', 5)
13#define TCXONC _IO('T', 6)13#define TCXONC _IO('T', 6)
14#define TCFLSH _IO('T', 7)14#define TCFLSH _IO('T', 7)
lib/libc/include/sparc-linux-any/asm/unistd_32.h+2
...@@ -406,6 +406,7 @@...@@ -406,6 +406,7 @@
406#define __NR_fsmount 432406#define __NR_fsmount 432
407#define __NR_fspick 433407#define __NR_fspick 433
408#define __NR_pidfd_open 434408#define __NR_pidfd_open 434
409#define __NR_clone3 435
409#define __NR_close_range 436410#define __NR_close_range 436
410#define __NR_openat2 437411#define __NR_openat2 437
411#define __NR_pidfd_getfd 438412#define __NR_pidfd_getfd 438
...@@ -440,6 +441,7 @@...@@ -440,6 +441,7 @@
440#define __NR_file_getattr 468441#define __NR_file_getattr 468
441#define __NR_file_setattr 469442#define __NR_file_setattr 469
442#define __NR_listns 470443#define __NR_listns 470
444#define __NR_rseq_slice_yield 471
443445
444446
445#endif /* _ASM_UNISTD_32_H */447#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 @@...@@ -369,6 +369,7 @@
369#define __NR_fsmount 432369#define __NR_fsmount 432
370#define __NR_fspick 433370#define __NR_fspick 433
371#define __NR_pidfd_open 434371#define __NR_pidfd_open 434
372#define __NR_clone3 435
372#define __NR_close_range 436373#define __NR_close_range 436
373#define __NR_openat2 437374#define __NR_openat2 437
374#define __NR_pidfd_getfd 438375#define __NR_pidfd_getfd 438
...@@ -403,6 +404,7 @@...@@ -403,6 +404,7 @@
403#define __NR_file_getattr 468404#define __NR_file_getattr 468
404#define __NR_file_setattr 469405#define __NR_file_setattr 469
405#define __NR_listns 470406#define __NR_listns 470
407#define __NR_rseq_slice_yield 471
406408
407409
408#endif /* _ASM_UNISTD_64_H */410#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 @@...@@ -11,10 +11,6 @@
11#define AT_SYSINFO_EHDR 3311#define AT_SYSINFO_EHDR 33
1212
13/* entries in ARCH_DLINFO: */13/* 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 */
17# define AT_VECTOR_SIZE_ARCH 214# define AT_VECTOR_SIZE_ARCH 2
18#endif
1915
20#endif /* _ASM_X86_AUXVEC_H */16#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 {...@@ -197,13 +197,13 @@ struct kvm_msrs {
197 __u32 nmsrs; /* number of msrs in entries */197 __u32 nmsrs; /* number of msrs in entries */
198 __u32 pad;198 __u32 pad;
199199
200 struct kvm_msr_entry entries[];200 __DECLARE_FLEX_ARRAY(struct kvm_msr_entry, entries);
201};201};
202202
203/* for KVM_GET_MSR_INDEX_LIST */203/* for KVM_GET_MSR_INDEX_LIST */
204struct kvm_msr_list {204struct kvm_msr_list {
205 __u32 nmsrs; /* number of msrs in entries */205 __u32 nmsrs; /* number of msrs in entries */
206 __u32 indices[];206 __DECLARE_FLEX_ARRAY(__u32, indices);
207};207};
208208
209/* Maximum size of any access bitmap in bytes */209/* Maximum size of any access bitmap in bytes */
...@@ -243,7 +243,7 @@ struct kvm_cpuid_entry {...@@ -243,7 +243,7 @@ struct kvm_cpuid_entry {
243struct kvm_cpuid {243struct kvm_cpuid {
244 __u32 nent;244 __u32 nent;
245 __u32 padding;245 __u32 padding;
246 struct kvm_cpuid_entry entries[];246 __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry, entries);
247};247};
248248
249struct kvm_cpuid_entry2 {249struct kvm_cpuid_entry2 {
...@@ -265,7 +265,7 @@ struct kvm_cpuid_entry2 {...@@ -265,7 +265,7 @@ struct kvm_cpuid_entry2 {
265struct kvm_cpuid2 {265struct kvm_cpuid2 {
266 __u32 nent;266 __u32 nent;
267 __u32 padding;267 __u32 padding;
268 struct kvm_cpuid_entry2 entries[];268 __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry2, entries);
269};269};
270270
271/* for KVM_GET_PIT and KVM_SET_PIT */271/* for KVM_GET_PIT and KVM_SET_PIT */
...@@ -396,7 +396,7 @@ struct kvm_xsave {...@@ -396,7 +396,7 @@ struct kvm_xsave {
396 * the contents of CPUID leaf 0xD on the host.396 * the contents of CPUID leaf 0xD on the host.
397 */397 */
398 __u32 region[1024];398 __u32 region[1024];
399 __u32 extra[];399 __DECLARE_FLEX_ARRAY(__u32, extra);
400};400};
401401
402#define KVM_MAX_XCRS 16402#define KVM_MAX_XCRS 16
...@@ -474,6 +474,7 @@ struct kvm_sync_regs {...@@ -474,6 +474,7 @@ struct kvm_sync_regs {
474#define KVM_X86_QUIRK_SLOT_ZAP_ALL (1 << 7)474#define KVM_X86_QUIRK_SLOT_ZAP_ALL (1 << 7)
475#define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8)475#define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8)
476#define KVM_X86_QUIRK_IGNORE_GUEST_PAT (1 << 9)476#define KVM_X86_QUIRK_IGNORE_GUEST_PAT (1 << 9)
477#define KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM (1 << 10)
477478
478#define KVM_STATE_NESTED_FORMAT_VMX 0479#define KVM_STATE_NESTED_FORMAT_VMX 0
479#define KVM_STATE_NESTED_FORMAT_SVM 1480#define KVM_STATE_NESTED_FORMAT_SVM 1
...@@ -501,6 +502,7 @@ struct kvm_sync_regs {...@@ -501,6 +502,7 @@ struct kvm_sync_regs {
501#define KVM_X86_GRP_SEV 1502#define KVM_X86_GRP_SEV 1
502# define KVM_X86_SEV_VMSA_FEATURES 0503# define KVM_X86_SEV_VMSA_FEATURES 0
503# define KVM_X86_SNP_POLICY_BITS 1504# define KVM_X86_SNP_POLICY_BITS 1
505# define KVM_X86_SEV_SNP_REQ_CERTS 2
504506
505struct kvm_vmx_nested_state_data {507struct kvm_vmx_nested_state_data {
506 __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];508 __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
...@@ -562,7 +564,7 @@ struct kvm_pmu_event_filter {...@@ -562,7 +564,7 @@ struct kvm_pmu_event_filter {
562 __u32 fixed_counter_bitmap;564 __u32 fixed_counter_bitmap;
563 __u32 flags;565 __u32 flags;
564 __u32 pad[4];566 __u32 pad[4];
565 __u64 events[];567 __DECLARE_FLEX_ARRAY(__u64, events);
566};568};
567569
568#define KVM_PMU_EVENT_ALLOW 0570#define KVM_PMU_EVENT_ALLOW 0
...@@ -741,6 +743,7 @@ enum sev_cmd_id {...@@ -741,6 +743,7 @@ enum sev_cmd_id {
741 KVM_SEV_SNP_LAUNCH_START = 100,743 KVM_SEV_SNP_LAUNCH_START = 100,
742 KVM_SEV_SNP_LAUNCH_UPDATE,744 KVM_SEV_SNP_LAUNCH_UPDATE,
743 KVM_SEV_SNP_LAUNCH_FINISH,745 KVM_SEV_SNP_LAUNCH_FINISH,
746 KVM_SEV_SNP_ENABLE_REQ_CERTS,
744747
745 KVM_SEV_NR_MAX,748 KVM_SEV_NR_MAX,
746};749};
...@@ -912,8 +915,10 @@ struct kvm_sev_snp_launch_finish {...@@ -912,8 +915,10 @@ struct kvm_sev_snp_launch_finish {
912 __u64 pad1[4];915 __u64 pad1[4];
913};916};
914917
915#define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0)918#define KVM_X2APIC_API_USE_32BIT_IDS _BITULL(0)
916#define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1)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
918struct kvm_hyperv_eventfd {923struct kvm_hyperv_eventfd {
919 __u32 conn_id;924 __u32 conn_id;
lib/libc/include/x86-linux-any/asm/svm.h+16-16
...@@ -103,38 +103,38 @@...@@ -103,38 +103,38 @@
103#define SVM_EXIT_VMGEXIT 0x403103#define SVM_EXIT_VMGEXIT 0x403
104104
105/* SEV-ES software-defined VMGEXIT events */105/* SEV-ES software-defined VMGEXIT events */
106#define SVM_VMGEXIT_MMIO_READ 0x80000001106#define SVM_VMGEXIT_MMIO_READ 0x80000001ull
107#define SVM_VMGEXIT_MMIO_WRITE 0x80000002107#define SVM_VMGEXIT_MMIO_WRITE 0x80000002ull
108#define SVM_VMGEXIT_NMI_COMPLETE 0x80000003108#define SVM_VMGEXIT_NMI_COMPLETE 0x80000003ull
109#define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004109#define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004ull
110#define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005110#define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005ull
111#define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0111#define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0
112#define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1112#define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1
113#define SVM_VMGEXIT_PSC 0x80000010113#define SVM_VMGEXIT_PSC 0x80000010ull
114#define SVM_VMGEXIT_GUEST_REQUEST 0x80000011114#define SVM_VMGEXIT_GUEST_REQUEST 0x80000011ull
115#define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012115#define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012ull
116#define SVM_VMGEXIT_AP_CREATION 0x80000013116#define SVM_VMGEXIT_AP_CREATION 0x80000013ull
117#define SVM_VMGEXIT_AP_CREATE_ON_INIT 0117#define SVM_VMGEXIT_AP_CREATE_ON_INIT 0
118#define SVM_VMGEXIT_AP_CREATE 1118#define SVM_VMGEXIT_AP_CREATE 1
119#define SVM_VMGEXIT_AP_DESTROY 2119#define SVM_VMGEXIT_AP_DESTROY 2
120#define SVM_VMGEXIT_SNP_RUN_VMPL 0x80000018120#define SVM_VMGEXIT_SNP_RUN_VMPL 0x80000018ull
121#define SVM_VMGEXIT_SAVIC 0x8000001a121#define SVM_VMGEXIT_SAVIC 0x8000001aull
122#define SVM_VMGEXIT_SAVIC_REGISTER_GPA 0122#define SVM_VMGEXIT_SAVIC_REGISTER_GPA 0
123#define SVM_VMGEXIT_SAVIC_UNREGISTER_GPA 1123#define SVM_VMGEXIT_SAVIC_UNREGISTER_GPA 1
124#define SVM_VMGEXIT_SAVIC_SELF_GPA ~0ULL124#define SVM_VMGEXIT_SAVIC_SELF_GPA ~0ULL
125#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd125#define SVM_VMGEXIT_HV_FEATURES 0x8000fffdull
126#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe126#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffeull
127#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \127#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \
128 /* SW_EXITINFO1[3:0] */ \128 /* SW_EXITINFO1[3:0] */ \
129 (((((u64)reason_set) & 0xf)) | \129 (((((u64)reason_set) & 0xf)) | \
130 /* SW_EXITINFO1[11:4] */ \130 /* SW_EXITINFO1[11:4] */ \
131 ((((u64)reason_code) & 0xff) << 4))131 ((((u64)reason_code) & 0xff) << 4))
132#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff132#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffffull
133133
134/* Exit code reserved for hypervisor/software use */134/* Exit code reserved for hypervisor/software use */
135#define SVM_EXIT_SW 0xf0000000135#define SVM_EXIT_SW 0xf0000000ull
136136
137#define SVM_EXIT_ERR -1137#define SVM_EXIT_ERR -1ull
138138
139#define SVM_EXIT_REASONS \139#define SVM_EXIT_REASONS \
140 { SVM_EXIT_READ_CR0, "read_cr0" }, \140 { SVM_EXIT_READ_CR0, "read_cr0" }, \
lib/libc/include/x86-linux-any/asm/unistd_32.h+1
...@@ -461,6 +461,7 @@...@@ -461,6 +461,7 @@
461#define __NR_file_getattr 468461#define __NR_file_getattr 468
462#define __NR_file_setattr 469462#define __NR_file_setattr 469
463#define __NR_listns 470463#define __NR_listns 470
464#define __NR_rseq_slice_yield 471
464465
465466
466#endif /* _ASM_UNISTD_32_H */467#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 @@...@@ -385,6 +385,7 @@
385#define __NR_file_getattr 468385#define __NR_file_getattr 468
386#define __NR_file_setattr 469386#define __NR_file_setattr 469
387#define __NR_listns 470387#define __NR_listns 470
388#define __NR_rseq_slice_yield 471
388389
389390
390#endif /* _ASM_UNISTD_64_H */391#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 @@...@@ -338,6 +338,7 @@
338#define __NR_file_getattr (__X32_SYSCALL_BIT + 468)338#define __NR_file_getattr (__X32_SYSCALL_BIT + 468)
339#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)339#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)
340#define __NR_listns (__X32_SYSCALL_BIT + 470)340#define __NR_listns (__X32_SYSCALL_BIT + 470)
341#define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471)
341#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)342#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
342#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)343#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
343#define __NR_ioctl (__X32_SYSCALL_BIT + 514)344#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
lib/libc/include/xtensa-linux-any/asm/unistd_32.h+1
...@@ -417,6 +417,7 @@...@@ -417,6 +417,7 @@
417#define __NR_file_getattr 468417#define __NR_file_getattr 468
418#define __NR_file_setattr 469418#define __NR_file_setattr 469
419#define __NR_listns 470419#define __NR_listns 470
420#define __NR_rseq_slice_yield 471
420421
421422
422#endif /* _ASM_UNISTD_32_H */423#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/std/os/linux/syscalls.zig+26-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1// This file is automatically generated by tools/generate_linux_syscalls.zig1// This file is automatically generated by tools/generate_linux_syscalls.zig
2// This list current as of kernel: 6.19.02// This list current as of kernel: 7.0.0
33
4pub const X86 = enum(usize) {4pub const X86 = enum(usize) {
5 restart_syscall = 0,5 restart_syscall = 0,
...@@ -462,6 +462,7 @@ pub const X86 = enum(usize) {...@@ -462,6 +462,7 @@ pub const X86 = enum(usize) {
462 file_getattr = 468,462 file_getattr = 468,
463 file_setattr = 469,463 file_setattr = 469,
464 listns = 470,464 listns = 470,
465 rseq_slice_yield = 471,
465};466};
466467
467pub const X64 = enum(usize) {468pub const X64 = enum(usize) {
...@@ -849,6 +850,7 @@ pub const X64 = enum(usize) {...@@ -849,6 +850,7 @@ pub const X64 = enum(usize) {
849 file_getattr = 468,850 file_getattr = 468,
850 file_setattr = 469,851 file_setattr = 469,
851 listns = 470,852 listns = 470,
853 rseq_slice_yield = 471,
852};854};
853855
854pub const X32 = enum(usize) {856pub const X32 = enum(usize) {
...@@ -1189,6 +1191,7 @@ pub const X32 = enum(usize) {...@@ -1189,6 +1191,7 @@ pub const X32 = enum(usize) {
1189 file_getattr = 1073742292,1191 file_getattr = 1073742292,
1190 file_setattr = 1073742293,1192 file_setattr = 1073742293,
1191 listns = 1073742294,1193 listns = 1073742294,
1194 rseq_slice_yield = 1073742295,
1192 rt_sigaction = 1073742336,1195 rt_sigaction = 1073742336,
1193 rt_sigreturn = 1073742337,1196 rt_sigreturn = 1073742337,
1194 ioctl = 1073742338,1197 ioctl = 1073742338,
...@@ -1653,6 +1656,7 @@ pub const Arm = enum(usize) {...@@ -1653,6 +1656,7 @@ pub const Arm = enum(usize) {
1653 file_getattr = 468,1656 file_getattr = 468,
1654 file_setattr = 469,1657 file_setattr = 469,
1655 listns = 470,1658 listns = 470,
1659 rseq_slice_yield = 471,
16561660
1657 breakpoint = arm_base + 1,1661 breakpoint = arm_base + 1,
1658 cacheflush = arm_base + 2,1662 cacheflush = arm_base + 2,
...@@ -2068,6 +2072,7 @@ pub const Sparc = enum(usize) {...@@ -2068,6 +2072,7 @@ pub const Sparc = enum(usize) {
2068 fsmount = 432,2072 fsmount = 432,
2069 fspick = 433,2073 fspick = 433,
2070 pidfd_open = 434,2074 pidfd_open = 434,
2075 clone3 = 435,
2071 close_range = 436,2076 close_range = 436,
2072 openat2 = 437,2077 openat2 = 437,
2073 pidfd_getfd = 438,2078 pidfd_getfd = 438,
...@@ -2102,6 +2107,7 @@ pub const Sparc = enum(usize) {...@@ -2102,6 +2107,7 @@ pub const Sparc = enum(usize) {
2102 file_getattr = 468,2107 file_getattr = 468,
2103 file_setattr = 469,2108 file_setattr = 469,
2104 listns = 470,2109 listns = 470,
2110 rseq_slice_yield = 471,
2105};2111};
21062112
2107pub const Sparc64 = enum(usize) {2113pub const Sparc64 = enum(usize) {
...@@ -2473,6 +2479,7 @@ pub const Sparc64 = enum(usize) {...@@ -2473,6 +2479,7 @@ pub const Sparc64 = enum(usize) {
2473 fsmount = 432,2479 fsmount = 432,
2474 fspick = 433,2480 fspick = 433,
2475 pidfd_open = 434,2481 pidfd_open = 434,
2482 clone3 = 435,
2476 close_range = 436,2483 close_range = 436,
2477 openat2 = 437,2484 openat2 = 437,
2478 pidfd_getfd = 438,2485 pidfd_getfd = 438,
...@@ -2507,6 +2514,7 @@ pub const Sparc64 = enum(usize) {...@@ -2507,6 +2514,7 @@ pub const Sparc64 = enum(usize) {
2507 file_getattr = 468,2514 file_getattr = 468,
2508 file_setattr = 469,2515 file_setattr = 469,
2509 listns = 470,2516 listns = 470,
2517 rseq_slice_yield = 471,
2510};2518};
25112519
2512pub const M68k = enum(usize) {2520pub const M68k = enum(usize) {
...@@ -2952,6 +2960,7 @@ pub const M68k = enum(usize) {...@@ -2952,6 +2960,7 @@ pub const M68k = enum(usize) {
2952 file_getattr = 468,2960 file_getattr = 468,
2953 file_setattr = 469,2961 file_setattr = 469,
2954 listns = 470,2962 listns = 470,
2963 rseq_slice_yield = 471,
2955};2964};
29562965
2957pub const MipsO32 = enum(usize) {2966pub const MipsO32 = enum(usize) {
...@@ -3391,6 +3400,7 @@ pub const MipsO32 = enum(usize) {...@@ -3391,6 +3400,7 @@ pub const MipsO32 = enum(usize) {
3391 file_getattr = 4468,3400 file_getattr = 4468,
3392 file_setattr = 4469,3401 file_setattr = 4469,
3393 listns = 4470,3402 listns = 4470,
3403 rseq_slice_yield = 4471,
3394};3404};
33953405
3396pub const MipsN64 = enum(usize) {3406pub const MipsN64 = enum(usize) {
...@@ -3766,6 +3776,7 @@ pub const MipsN64 = enum(usize) {...@@ -3766,6 +3776,7 @@ pub const MipsN64 = enum(usize) {
3766 file_getattr = 5468,3776 file_getattr = 5468,
3767 file_setattr = 5469,3777 file_setattr = 5469,
3768 listns = 5470,3778 listns = 5470,
3779 rseq_slice_yield = 5471,
3769};3780};
37703781
3771pub const MipsN32 = enum(usize) {3782pub const MipsN32 = enum(usize) {
...@@ -4165,6 +4176,7 @@ pub const MipsN32 = enum(usize) {...@@ -4165,6 +4176,7 @@ pub const MipsN32 = enum(usize) {
4165 file_getattr = 6468,4176 file_getattr = 6468,
4166 file_setattr = 6469,4177 file_setattr = 6469,
4167 listns = 6470,4178 listns = 6470,
4179 rseq_slice_yield = 6471,
4168};4180};
41694181
4170pub const PowerPC = enum(usize) {4182pub const PowerPC = enum(usize) {
...@@ -4619,6 +4631,7 @@ pub const PowerPC = enum(usize) {...@@ -4619,6 +4631,7 @@ pub const PowerPC = enum(usize) {
4619 file_getattr = 468,4631 file_getattr = 468,
4620 file_setattr = 469,4632 file_setattr = 469,
4621 listns = 470,4633 listns = 470,
4634 rseq_slice_yield = 471,
4622};4635};
46234636
4624pub const PowerPC64 = enum(usize) {4637pub const PowerPC64 = enum(usize) {
...@@ -5045,6 +5058,7 @@ pub const PowerPC64 = enum(usize) {...@@ -5045,6 +5058,7 @@ pub const PowerPC64 = enum(usize) {
5045 file_getattr = 468,5058 file_getattr = 468,
5046 file_setattr = 469,5059 file_setattr = 469,
5047 listns = 470,5060 listns = 470,
5061 rseq_slice_yield = 471,
5048};5062};
50495063
5050pub const S390x = enum(usize) {5064pub const S390x = enum(usize) {
...@@ -5437,6 +5451,7 @@ pub const S390x = enum(usize) {...@@ -5437,6 +5451,7 @@ pub const S390x = enum(usize) {
5437 file_getattr = 468,5451 file_getattr = 468,
5438 file_setattr = 469,5452 file_setattr = 469,
5439 listns = 470,5453 listns = 470,
5454 rseq_slice_yield = 471,
5440};5455};
54415456
5442pub const Xtensa = enum(usize) {5457pub const Xtensa = enum(usize) {
...@@ -5833,6 +5848,7 @@ pub const Xtensa = enum(usize) {...@@ -5833,6 +5848,7 @@ pub const Xtensa = enum(usize) {
5833 file_getattr = 468,5848 file_getattr = 468,
5834 file_setattr = 469,5849 file_setattr = 469,
5835 listns = 470,5850 listns = 470,
5851 rseq_slice_yield = 471,
5836};5852};
58375853
5838pub const Arm64 = enum(usize) {5854pub const Arm64 = enum(usize) {
...@@ -6162,6 +6178,7 @@ pub const Arm64 = enum(usize) {...@@ -6162,6 +6178,7 @@ pub const Arm64 = enum(usize) {
6162 file_getattr = 468,6178 file_getattr = 468,
6163 file_setattr = 469,6179 file_setattr = 469,
6164 listns = 470,6180 listns = 470,
6181 rseq_slice_yield = 471,
6165};6182};
61666183
6167pub const RiscV32 = enum(usize) {6184pub const RiscV32 = enum(usize) {
...@@ -6482,6 +6499,7 @@ pub const RiscV32 = enum(usize) {...@@ -6482,6 +6499,7 @@ pub const RiscV32 = enum(usize) {
6482 file_getattr = 468,6499 file_getattr = 468,
6483 file_setattr = 469,6500 file_setattr = 469,
6484 listns = 470,6501 listns = 470,
6502 rseq_slice_yield = 471,
6485};6503};
64866504
6487pub const RiscV64 = enum(usize) {6505pub const RiscV64 = enum(usize) {
...@@ -6812,6 +6830,7 @@ pub const RiscV64 = enum(usize) {...@@ -6812,6 +6830,7 @@ pub const RiscV64 = enum(usize) {
6812 file_getattr = 468,6830 file_getattr = 468,
6813 file_setattr = 469,6831 file_setattr = 469,
6814 listns = 470,6832 listns = 470,
6833 rseq_slice_yield = 471,
6815};6834};
68166835
6817pub const LoongArch32 = enum(usize) {6836pub const LoongArch32 = enum(usize) {
...@@ -7129,6 +7148,7 @@ pub const LoongArch32 = enum(usize) {...@@ -7129,6 +7148,7 @@ pub const LoongArch32 = enum(usize) {
7129 file_getattr = 468,7148 file_getattr = 468,
7130 file_setattr = 469,7149 file_setattr = 469,
7131 listns = 470,7150 listns = 470,
7151 rseq_slice_yield = 471,
7132};7152};
71337153
7134pub const LoongArch64 = enum(usize) {7154pub const LoongArch64 = enum(usize) {
...@@ -7454,6 +7474,7 @@ pub const LoongArch64 = enum(usize) {...@@ -7454,6 +7474,7 @@ pub const LoongArch64 = enum(usize) {
7454 file_getattr = 468,7474 file_getattr = 468,
7455 file_setattr = 469,7475 file_setattr = 469,
7456 listns = 470,7476 listns = 470,
7477 rseq_slice_yield = 471,
7457};7478};
74587479
7459pub const Arc = enum(usize) {7480pub const Arc = enum(usize) {
...@@ -7807,6 +7828,7 @@ pub const Arc = enum(usize) {...@@ -7807,6 +7828,7 @@ pub const Arc = enum(usize) {
7807 file_getattr = 468,7828 file_getattr = 468,
7808 file_setattr = 469,7829 file_setattr = 469,
7809 listns = 470,7830 listns = 470,
7831 rseq_slice_yield = 471,
7810};7832};
78117833
7812pub const CSky = enum(usize) {7834pub const CSky = enum(usize) {
...@@ -8156,6 +8178,7 @@ pub const CSky = enum(usize) {...@@ -8156,6 +8178,7 @@ pub const CSky = enum(usize) {
8156 file_getattr = 468,8178 file_getattr = 468,
8157 file_setattr = 469,8179 file_setattr = 469,
8158 listns = 470,8180 listns = 470,
8181 rseq_slice_yield = 471,
8159};8182};
81608183
8161pub const Hexagon = enum(usize) {8184pub const Hexagon = enum(usize) {
...@@ -8504,6 +8527,7 @@ pub const Hexagon = enum(usize) {...@@ -8504,6 +8527,7 @@ pub const Hexagon = enum(usize) {
8504 file_getattr = 468,8527 file_getattr = 468,
8505 file_setattr = 469,8528 file_setattr = 469,
8506 listns = 470,8529 listns = 470,
8530 rseq_slice_yield = 471,
8507};8531};
85088532
8509pub const OpenRisc = enum(usize) {8533pub const OpenRisc = enum(usize) {
...@@ -8853,4 +8877,5 @@ pub const OpenRisc = enum(usize) {...@@ -8853,4 +8877,5 @@ pub const OpenRisc = enum(usize) {
8853 file_getattr = 468,8877 file_getattr = 468,
8854 file_setattr = 469,8878 file_setattr = 469,
8855 listns = 470,8879 listns = 470,
8880 rseq_slice_yield = 471,
8856};8881};