authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-02-09 23:36:43+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-02-09 23:54:30+01:00
log7af9882c6d32e5febd1320648131afbb0ced4f55
tree823aef8ef53afef3a81807b7cc8d1f68098b3ecb
parent80db2e0b8b4168b77e66c83ead3ad028340efb31
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

libc: update Linux headers to 6.19


183 files changed, 5923 insertions(+), 1465 deletions(-)

lib/libc/include/aarch64-linux-any/asm/hwcap.h+1
...@@ -145,5 +145,6 @@...@@ -145,5 +145,6 @@
145 */145 */
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)
148149
149#endif /* __ASM_HWCAP_H */150#endif /* __ASM_HWCAP_H */
\ No newline at end of file
lib/libc/include/aarch64-linux-any/asm/kvm.h+1-1
...@@ -31,7 +31,7 @@...@@ -31,7 +31,7 @@
31#define KVM_SPSR_FIQ 431#define KVM_SPSR_FIQ 4
32#define KVM_NR_SPSR 532#define KVM_NR_SPSR 5
3333
34#ifndef __ASSEMBLY__34#ifndef __ASSEMBLER__
35#include <linux/psci.h>35#include <linux/psci.h>
36#include <linux/types.h>36#include <linux/types.h>
37#include <asm/ptrace.h>37#include <asm/ptrace.h>
lib/libc/include/aarch64-linux-any/asm/ptrace.h+2-2
...@@ -80,7 +80,7 @@...@@ -80,7 +80,7 @@
80#define PTRACE_PEEKMTETAGS 3380#define PTRACE_PEEKMTETAGS 33
81#define PTRACE_POKEMTETAGS 3481#define PTRACE_POKEMTETAGS 34
8282
83#ifndef __ASSEMBLY__83#ifndef __ASSEMBLER__
8484
85/*85/*
86 * User structures for general purpose, floating point and debug registers.86 * User structures for general purpose, floating point and debug registers.
...@@ -332,6 +332,6 @@ struct user_gcs {...@@ -332,6 +332,6 @@ struct user_gcs {
332 __u64 gcspr_el0;332 __u64 gcspr_el0;
333};333};
334334
335#endif /* __ASSEMBLY__ */335#endif /* __ASSEMBLER__ */
336336
337#endif /* __ASM_PTRACE_H */337#endif /* __ASM_PTRACE_H */
\ No newline at end of file
lib/libc/include/aarch64-linux-any/asm/sigcontext.h+2-2
...@@ -17,7 +17,7 @@...@@ -17,7 +17,7 @@
17#ifndef __ASM_SIGCONTEXT_H17#ifndef __ASM_SIGCONTEXT_H
18#define __ASM_SIGCONTEXT_H18#define __ASM_SIGCONTEXT_H
1919
20#ifndef __ASSEMBLY__20#ifndef __ASSEMBLER__
2121
22#include <linux/types.h>22#include <linux/types.h>
2323
...@@ -192,7 +192,7 @@ struct gcs_context {...@@ -192,7 +192,7 @@ struct gcs_context {
192 __u64 reserved;192 __u64 reserved;
193};193};
194194
195#endif /* !__ASSEMBLY__ */195#endif /* !__ASSEMBLER__ */
196196
197#include <asm/sve_context.h>197#include <asm/sve_context.h>
198198
lib/libc/include/aarch64-linux-any/asm/unistd_64.h+1
...@@ -326,6 +326,7 @@...@@ -326,6 +326,7 @@
326#define __NR_open_tree_attr 467326#define __NR_open_tree_attr 467
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 470
329330
330331
331#endif /* _ASM_UNISTD_64_H */332#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/posix_types.h+1
...@@ -86,6 +86,7 @@ typedef struct {...@@ -86,6 +86,7 @@ typedef struct {
86 */86 */
87typedef __kernel_long_t __kernel_off_t;87typedef __kernel_long_t __kernel_off_t;
88typedef long long __kernel_loff_t;88typedef long long __kernel_loff_t;
89typedef unsigned long long __kernel_uoff_t;
89typedef __kernel_long_t __kernel_old_time_t;90typedef __kernel_long_t __kernel_old_time_t;
90typedef __kernel_long_t __kernel_time_t;91typedef __kernel_long_t __kernel_time_t;
91typedef long long __kernel_time64_t;92typedef long long __kernel_time64_t;
lib/libc/include/any-linux-any/asm-generic/unistd.h+3-1
...@@ -857,9 +857,11 @@ __SYSCALL(__NR_open_tree_attr, sys_open_tree_attr)...@@ -857,9 +857,11 @@ __SYSCALL(__NR_open_tree_attr, sys_open_tree_attr)
857__SYSCALL(__NR_file_getattr, sys_file_getattr)857__SYSCALL(__NR_file_getattr, sys_file_getattr)
858#define __NR_file_setattr 469858#define __NR_file_setattr 469
859__SYSCALL(__NR_file_setattr, sys_file_setattr)859__SYSCALL(__NR_file_setattr, sys_file_setattr)
860#define __NR_listns 470
861__SYSCALL(__NR_listns, sys_listns)
860862
861#undef __NR_syscalls863#undef __NR_syscalls
862#define __NR_syscalls 470864#define __NR_syscalls 471
863865
864/*866/*
865 * 32 bit systems traditionally used different867 * 32 bit systems traditionally used different
lib/libc/include/any-linux-any/drm/amdgpu_drm.h+65-37
...@@ -57,6 +57,7 @@ extern "C" {...@@ -57,6 +57,7 @@ extern "C" {
57#define DRM_AMDGPU_USERQ 0x1657#define DRM_AMDGPU_USERQ 0x16
58#define DRM_AMDGPU_USERQ_SIGNAL 0x1758#define DRM_AMDGPU_USERQ_SIGNAL 0x17
59#define DRM_AMDGPU_USERQ_WAIT 0x1859#define DRM_AMDGPU_USERQ_WAIT 0x18
60#define DRM_AMDGPU_GEM_LIST_HANDLES 0x19
6061
61#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)62#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
62#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)63#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
...@@ -77,6 +78,7 @@ extern "C" {...@@ -77,6 +78,7 @@ extern "C" {
77#define DRM_IOCTL_AMDGPU_USERQ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ, union drm_amdgpu_userq)78#define DRM_IOCTL_AMDGPU_USERQ DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ, union drm_amdgpu_userq)
78#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)79#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)
79#define DRM_IOCTL_AMDGPU_USERQ_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait)80#define DRM_IOCTL_AMDGPU_USERQ_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait)
81#define DRM_IOCTL_AMDGPU_GEM_LIST_HANDLES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_LIST_HANDLES, struct drm_amdgpu_gem_list_handles)
8082
81/**83/**
82 * DOC: memory domains84 * DOC: memory domains
...@@ -103,6 +105,8 @@ extern "C" {...@@ -103,6 +105,8 @@ extern "C" {
103 *105 *
104 * %AMDGPU_GEM_DOMAIN_DOORBELL Doorbell. It is an MMIO region for106 * %AMDGPU_GEM_DOMAIN_DOORBELL Doorbell. It is an MMIO region for
105 * signalling user mode queues.107 * signalling user mode queues.
108 *
109 * %AMDGPU_GEM_DOMAIN_MMIO_REMAP MMIO remap page (special mapping for HDP flushing).
106 */110 */
107#define AMDGPU_GEM_DOMAIN_CPU 0x1111#define AMDGPU_GEM_DOMAIN_CPU 0x1
108#define AMDGPU_GEM_DOMAIN_GTT 0x2112#define AMDGPU_GEM_DOMAIN_GTT 0x2
...@@ -111,13 +115,15 @@ extern "C" {...@@ -111,13 +115,15 @@ extern "C" {
111#define AMDGPU_GEM_DOMAIN_GWS 0x10115#define AMDGPU_GEM_DOMAIN_GWS 0x10
112#define AMDGPU_GEM_DOMAIN_OA 0x20116#define AMDGPU_GEM_DOMAIN_OA 0x20
113#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40117#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40
118#define AMDGPU_GEM_DOMAIN_MMIO_REMAP 0x80
114#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \119#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
115 AMDGPU_GEM_DOMAIN_GTT | \120 AMDGPU_GEM_DOMAIN_GTT | \
116 AMDGPU_GEM_DOMAIN_VRAM | \121 AMDGPU_GEM_DOMAIN_VRAM | \
117 AMDGPU_GEM_DOMAIN_GDS | \122 AMDGPU_GEM_DOMAIN_GDS | \
118 AMDGPU_GEM_DOMAIN_GWS | \123 AMDGPU_GEM_DOMAIN_GWS | \
119 AMDGPU_GEM_DOMAIN_OA | \124 AMDGPU_GEM_DOMAIN_OA | \
120 AMDGPU_GEM_DOMAIN_DOORBELL)125 AMDGPU_GEM_DOMAIN_DOORBELL | \
126 AMDGPU_GEM_DOMAIN_MMIO_REMAP)
121127
122/* Flag that CPU access will be required for the case of VRAM domain */128/* Flag that CPU access will be required for the case of VRAM domain */
123#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)129#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
...@@ -800,6 +806,21 @@ union drm_amdgpu_wait_fences {...@@ -800,6 +806,21 @@ union drm_amdgpu_wait_fences {
800806
801#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0807#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0
802#define AMDGPU_GEM_OP_SET_PLACEMENT 1808#define AMDGPU_GEM_OP_SET_PLACEMENT 1
809#define AMDGPU_GEM_OP_GET_MAPPING_INFO 2
810
811struct drm_amdgpu_gem_vm_entry {
812 /* Start of mapping (in bytes) */
813 __u64 addr;
814
815 /* Size of mapping (in bytes) */
816 __u64 size;
817
818 /* Mapping offset */
819 __u64 offset;
820
821 /* flags needed to recreate mapping */
822 __u64 flags;
823};
803824
804/* Sets or returns a value associated with a buffer. */825/* Sets or returns a value associated with a buffer. */
805struct drm_amdgpu_gem_op {826struct drm_amdgpu_gem_op {
...@@ -807,8 +828,44 @@ struct drm_amdgpu_gem_op {...@@ -807,8 +828,44 @@ struct drm_amdgpu_gem_op {
807 __u32 handle;828 __u32 handle;
808 /** AMDGPU_GEM_OP_* */829 /** AMDGPU_GEM_OP_* */
809 __u32 op;830 __u32 op;
810 /** Input or return value */831 /** Input or return value. For MAPPING_INFO op: pointer to array of struct drm_amdgpu_gem_vm_entry */
811 __u64 value;832 __u64 value;
833 /** For MAPPING_INFO op: number of mappings (in/out) */
834 __u32 num_entries;
835
836 __u32 padding;
837};
838
839#define AMDGPU_GEM_LIST_HANDLES_FLAG_IS_IMPORT (1 << 0)
840
841struct drm_amdgpu_gem_list_handles {
842 /* User pointer to array of drm_amdgpu_gem_bo_info_entry */
843 __u64 entries;
844
845 /* Size of entries buffer / Number of handles in process (if larger than size of buffer, must retry) */
846 __u32 num_entries;
847
848 __u32 padding;
849};
850
851struct drm_amdgpu_gem_list_handles_entry {
852 /* gem handle of buffer object */
853 __u32 gem_handle;
854
855 /* Currently just one flag: IS_IMPORT */
856 __u32 flags;
857
858 /* Size of bo */
859 __u64 size;
860
861 /* Preferred domains for GEM_CREATE */
862 __u64 preferred_domains;
863
864 /* GEM_CREATE flags for re-creation of buffer */
865 __u64 alloc_flags;
866
867 /* physical start_addr alignment in bytes for some HW requirements */
868 __u64 alignment;
812};869};
813870
814#define AMDGPU_VA_OP_MAP 1871#define AMDGPU_VA_OP_MAP 1
...@@ -1031,10 +1088,11 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {...@@ -1031,10 +1088,11 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {
1031 * Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU1088 * Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU
1032 *1089 *
1033 */1090 */
1034#define AMDGPU_IDS_FLAGS_FUSION 0x11091#define AMDGPU_IDS_FLAGS_FUSION 0x01
1035#define AMDGPU_IDS_FLAGS_PREEMPTION 0x21092#define AMDGPU_IDS_FLAGS_PREEMPTION 0x02
1036#define AMDGPU_IDS_FLAGS_TMZ 0x41093#define AMDGPU_IDS_FLAGS_TMZ 0x04
1037#define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x81094#define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x08
1095#define AMDGPU_IDS_FLAGS_GANG_SUBMIT 0x10
10381096
1039/*1097/*
1040 * Query h/w info: Flag identifying VF/PF/PT mode1098 * Query h/w info: Flag identifying VF/PF/PT mode
...@@ -1497,27 +1555,6 @@ struct drm_amdgpu_info_hw_ip {...@@ -1497,27 +1555,6 @@ struct drm_amdgpu_info_hw_ip {
1497 __u32 userq_num_slots;1555 __u32 userq_num_slots;
1498};1556};
14991557
1500/* GFX metadata BO sizes and alignment info (in bytes) */
1501struct drm_amdgpu_info_uq_fw_areas_gfx {
1502 /* shadow area size */
1503 __u32 shadow_size;
1504 /* shadow area base virtual mem alignment */
1505 __u32 shadow_alignment;
1506 /* context save area size */
1507 __u32 csa_size;
1508 /* context save area base virtual mem alignment */
1509 __u32 csa_alignment;
1510};
1511
1512/* IP specific fw related information used in the
1513 * subquery AMDGPU_INFO_UQ_FW_AREAS
1514 */
1515struct drm_amdgpu_info_uq_fw_areas {
1516 union {
1517 struct drm_amdgpu_info_uq_fw_areas_gfx gfx;
1518 };
1519};
1520
1521struct drm_amdgpu_info_num_handles {1558struct drm_amdgpu_info_num_handles {
1522 /** Max handles as supported by firmware for UVD */1559 /** Max handles as supported by firmware for UVD */
1523 __u32 uvd_max_handles;1560 __u32 uvd_max_handles;
...@@ -1619,15 +1656,6 @@ struct drm_amdgpu_info_uq_metadata {...@@ -1619,15 +1656,6 @@ struct drm_amdgpu_info_uq_metadata {
1619#define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */1656#define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */
1620#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */1657#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
16211658
1622/* FIXME wrong namespace! */
1623struct drm_color_ctm_3x4 {
1624 /*
1625 * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude
1626 * (not two's complement!) format.
1627 */
1628 __u64 matrix[12];
1629};
1630
1631#if defined(__cplusplus)1659#if defined(__cplusplus)
1632}1660}
1633#endif1661#endif
lib/libc/include/any-linux-any/drm/amdxdna_accel.h+197
...@@ -34,6 +34,7 @@ enum amdxdna_drm_ioctl_id {...@@ -34,6 +34,7 @@ enum amdxdna_drm_ioctl_id {
34 DRM_AMDXDNA_EXEC_CMD,34 DRM_AMDXDNA_EXEC_CMD,
35 DRM_AMDXDNA_GET_INFO,35 DRM_AMDXDNA_GET_INFO,
36 DRM_AMDXDNA_SET_STATE,36 DRM_AMDXDNA_SET_STATE,
37 DRM_AMDXDNA_GET_ARRAY = 10,
37};38};
3839
39/**40/**
...@@ -153,6 +154,31 @@ enum amdxdna_bo_type {...@@ -153,6 +154,31 @@ enum amdxdna_bo_type {
153 AMDXDNA_BO_CMD,154 AMDXDNA_BO_CMD,
154};155};
155156
157/**
158 * struct amdxdna_drm_va_entry
159 * @vaddr: Virtual address.
160 * @len: Size of entry.
161 */
162struct amdxdna_drm_va_entry {
163 __u64 vaddr;
164 __u64 len;
165};
166
167/**
168 * struct amdxdna_drm_va_tbl
169 * @dmabuf_fd: The fd of dmabuf.
170 * @num_entries: Number of va entries.
171 * @va_entries: Array of va entries.
172 *
173 * The input can be either a dmabuf fd or a virtual address entry table.
174 * When dmabuf_fd is used, num_entries must be zero.
175 */
176struct amdxdna_drm_va_tbl {
177 __s32 dmabuf_fd;
178 __u32 num_entries;
179 struct amdxdna_drm_va_entry va_entries[];
180};
181
156/**182/**
157 * struct amdxdna_drm_create_bo - Create a buffer object.183 * struct amdxdna_drm_create_bo - Create a buffer object.
158 * @flags: Buffer flags. MBZ.184 * @flags: Buffer flags. MBZ.
...@@ -416,6 +442,52 @@ enum amdxdna_drm_get_param {...@@ -416,6 +442,52 @@ enum amdxdna_drm_get_param {
416 DRM_AMDXDNA_QUERY_HW_CONTEXTS,442 DRM_AMDXDNA_QUERY_HW_CONTEXTS,
417 DRM_AMDXDNA_QUERY_FIRMWARE_VERSION = 8,443 DRM_AMDXDNA_QUERY_FIRMWARE_VERSION = 8,
418 DRM_AMDXDNA_GET_POWER_MODE,444 DRM_AMDXDNA_GET_POWER_MODE,
445 DRM_AMDXDNA_QUERY_TELEMETRY,
446 DRM_AMDXDNA_GET_FORCE_PREEMPT_STATE,
447 DRM_AMDXDNA_QUERY_RESOURCE_INFO,
448 DRM_AMDXDNA_GET_FRAME_BOUNDARY_PREEMPT_STATE,
449};
450
451/**
452 * struct amdxdna_drm_get_resource_info - Get resource information
453 */
454struct amdxdna_drm_get_resource_info {
455 /** @npu_clk_max: max H-Clocks */
456 __u64 npu_clk_max;
457 /** @npu_tops_max: max TOPs */
458 __u64 npu_tops_max;
459 /** @npu_task_max: max number of tasks */
460 __u64 npu_task_max;
461 /** @npu_tops_curr: current TOPs */
462 __u64 npu_tops_curr;
463 /** @npu_task_curr: current number of tasks */
464 __u64 npu_task_curr;
465};
466
467/**
468 * struct amdxdna_drm_attribute_state - State of an attribute
469 */
470struct amdxdna_drm_attribute_state {
471 /** @state: enabled or disabled */
472 __u8 state;
473 /** @pad: MBZ */
474 __u8 pad[7];
475};
476
477/**
478 * struct amdxdna_drm_query_telemetry_header - Telemetry data header
479 */
480struct amdxdna_drm_query_telemetry_header {
481 /** @major: Firmware telemetry interface major version number */
482 __u32 major;
483 /** @minor: Firmware telemetry interface minor version number */
484 __u32 minor;
485 /** @type: Telemetry query type */
486 __u32 type;
487 /** @map_num_elements: Total number of elements in the map table */
488 __u32 map_num_elements;
489 /** @map: Element map */
490 __u32 map[];
419};491};
420492
421/**493/**
...@@ -430,10 +502,131 @@ struct amdxdna_drm_get_info {...@@ -430,10 +502,131 @@ struct amdxdna_drm_get_info {
430 __u64 buffer; /* in/out */502 __u64 buffer; /* in/out */
431};503};
432504
505#define AMDXDNA_HWCTX_STATE_IDLE 0
506#define AMDXDNA_HWCTX_STATE_ACTIVE 1
507
508/**
509 * struct amdxdna_drm_hwctx_entry - The hardware context array entry
510 */
511struct amdxdna_drm_hwctx_entry {
512 /** @context_id: Context ID. */
513 __u32 context_id;
514 /** @start_col: Start AIE array column assigned to context. */
515 __u32 start_col;
516 /** @num_col: Number of AIE array columns assigned to context. */
517 __u32 num_col;
518 /** @hwctx_id: The real hardware context id. */
519 __u32 hwctx_id;
520 /** @pid: ID of process which created this context. */
521 __s64 pid;
522 /** @command_submissions: Number of commands submitted. */
523 __u64 command_submissions;
524 /** @command_completions: Number of commands completed. */
525 __u64 command_completions;
526 /** @migrations: Number of times been migrated. */
527 __u64 migrations;
528 /** @preemptions: Number of times been preempted. */
529 __u64 preemptions;
530 /** @errors: Number of errors happened. */
531 __u64 errors;
532 /** @priority: Context priority. */
533 __u64 priority;
534 /** @heap_usage: Usage of device heap buffer. */
535 __u64 heap_usage;
536 /** @suspensions: Number of times been suspended. */
537 __u64 suspensions;
538 /**
539 * @state: Context state.
540 * %AMDXDNA_HWCTX_STATE_IDLE
541 * %AMDXDNA_HWCTX_STATE_ACTIVE
542 */
543 __u32 state;
544 /** @pasid: PASID been bound. */
545 __u32 pasid;
546 /** @gops: Giga operations per second. */
547 __u32 gops;
548 /** @fps: Frames per second. */
549 __u32 fps;
550 /** @dma_bandwidth: DMA bandwidth. */
551 __u32 dma_bandwidth;
552 /** @latency: Frame response latency. */
553 __u32 latency;
554 /** @frame_exec_time: Frame execution time. */
555 __u32 frame_exec_time;
556 /** @txn_op_idx: Index of last control code executed. */
557 __u32 txn_op_idx;
558 /** @ctx_pc: Program counter. */
559 __u32 ctx_pc;
560 /** @fatal_error_type: Fatal error type if context crashes. */
561 __u32 fatal_error_type;
562 /** @fatal_error_exception_type: Firmware exception type. */
563 __u32 fatal_error_exception_type;
564 /** @fatal_error_exception_pc: Firmware exception program counter. */
565 __u32 fatal_error_exception_pc;
566 /** @fatal_error_app_module: Exception module name. */
567 __u32 fatal_error_app_module;
568 /** @pad: Structure pad. */
569 __u32 pad;
570};
571
572/**
573 * struct amdxdna_async_error - XDNA async error structure
574 */
575struct amdxdna_async_error {
576 /** @err_code: Error code. */
577 __u64 err_code;
578 /** @ts_us: Timestamp. */
579 __u64 ts_us;
580 /** @ex_err_code: Extra error code */
581 __u64 ex_err_code;
582};
583
584#define DRM_AMDXDNA_HW_CONTEXT_ALL 0
585#define DRM_AMDXDNA_HW_LAST_ASYNC_ERR 2
586
587/**
588 * struct amdxdna_drm_get_array - Get information array.
589 */
590struct amdxdna_drm_get_array {
591 /**
592 * @param:
593 *
594 * Supported params:
595 *
596 * %DRM_AMDXDNA_HW_CONTEXT_ALL:
597 * Returns all created hardware contexts.
598 */
599 __u32 param;
600 /**
601 * @element_size:
602 *
603 * Specifies maximum element size and returns the actual element size.
604 */
605 __u32 element_size;
606 /**
607 * @num_element:
608 *
609 * Specifies maximum number of elements and returns the actual number
610 * of elements.
611 */
612 __u32 num_element; /* in/out */
613 /** @pad: MBZ */
614 __u32 pad;
615 /**
616 * @buffer:
617 *
618 * Specifies the match conditions and returns the matched information
619 * array.
620 */
621 __u64 buffer;
622};
623
433enum amdxdna_drm_set_param {624enum amdxdna_drm_set_param {
434 DRM_AMDXDNA_SET_POWER_MODE,625 DRM_AMDXDNA_SET_POWER_MODE,
435 DRM_AMDXDNA_WRITE_AIE_MEM,626 DRM_AMDXDNA_WRITE_AIE_MEM,
436 DRM_AMDXDNA_WRITE_AIE_REG,627 DRM_AMDXDNA_WRITE_AIE_REG,
628 DRM_AMDXDNA_SET_FORCE_PREEMPT,
629 DRM_AMDXDNA_SET_FRAME_BOUNDARY_PREEMPT,
437};630};
438631
439/**632/**
...@@ -494,6 +687,10 @@ struct amdxdna_drm_set_power_mode {...@@ -494,6 +687,10 @@ struct amdxdna_drm_set_power_mode {
494 DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SET_STATE, \687 DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SET_STATE, \
495 struct amdxdna_drm_set_state)688 struct amdxdna_drm_set_state)
496689
690#define DRM_IOCTL_AMDXDNA_GET_ARRAY \
691 DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_ARRAY, \
692 struct amdxdna_drm_get_array)
693
497#if defined(__cplusplus)694#if defined(__cplusplus)
498} /* extern c end */695} /* extern c end */
499#endif696#endif
lib/libc/include/any-linux-any/drm/drm.h+66-12
...@@ -591,34 +591,65 @@ struct drm_set_version {...@@ -591,34 +591,65 @@ struct drm_set_version {
591 int drm_dd_minor;591 int drm_dd_minor;
592};592};
593593
594/* DRM_IOCTL_GEM_CLOSE ioctl argument type */594/**
595 * struct drm_gem_close - Argument for &DRM_IOCTL_GEM_CLOSE ioctl.
596 * @handle: Handle of the object to be closed.
597 * @pad: Padding.
598 *
599 * Releases the handle to an mm object.
600 */
595struct drm_gem_close {601struct drm_gem_close {
596 /** Handle of the object to be closed. */
597 __u32 handle;602 __u32 handle;
598 __u32 pad;603 __u32 pad;
599};604};
600605
601/* DRM_IOCTL_GEM_FLINK ioctl argument type */606/**
607 * struct drm_gem_flink - Argument for &DRM_IOCTL_GEM_FLINK ioctl.
608 * @handle: Handle for the object being named.
609 * @name: Returned global name.
610 *
611 * Create a global name for an object, returning the name.
612 *
613 * Note that the name does not hold a reference; when the object
614 * is freed, the name goes away.
615 */
602struct drm_gem_flink {616struct drm_gem_flink {
603 /** Handle for the object being named */
604 __u32 handle;617 __u32 handle;
605
606 /** Returned global name */
607 __u32 name;618 __u32 name;
608};619};
609620
610/* DRM_IOCTL_GEM_OPEN ioctl argument type */621/**
622 * struct drm_gem_open - Argument for &DRM_IOCTL_GEM_OPEN ioctl.
623 * @name: Name of object being opened.
624 * @handle: Returned handle for the object.
625 * @size: Returned size of the object
626 *
627 * Open an object using the global name, returning a handle and the size.
628 *
629 * This handle (of course) holds a reference to the object, so the object
630 * will not go away until the handle is deleted.
631 */
611struct drm_gem_open {632struct drm_gem_open {
612 /** Name of object being opened */
613 __u32 name;633 __u32 name;
614
615 /** Returned handle for the object */
616 __u32 handle;634 __u32 handle;
617
618 /** Returned size of the object */
619 __u64 size;635 __u64 size;
620};636};
621637
638/**
639 * struct drm_gem_change_handle - Argument for &DRM_IOCTL_GEM_CHANGE_HANDLE ioctl.
640 * @handle: The handle of a gem object.
641 * @new_handle: An available gem handle.
642 *
643 * This ioctl changes the handle of a GEM object to the specified one.
644 * The new handle must be unused. On success the old handle is closed
645 * and all further IOCTL should refer to the new handle only.
646 * Calls to DRM_IOCTL_PRIME_FD_TO_HANDLE will return the new handle.
647 */
648struct drm_gem_change_handle {
649 __u32 handle;
650 __u32 new_handle;
651};
652
622/**653/**
623 * DRM_CAP_DUMB_BUFFER654 * DRM_CAP_DUMB_BUFFER
624 *655 *
...@@ -869,6 +900,21 @@ struct drm_get_cap {...@@ -869,6 +900,21 @@ struct drm_get_cap {
869 */900 */
870#define DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT 6901#define DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT 6
871902
903/**
904 * DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE
905 *
906 * If set to 1 the DRM core will allow setting the COLOR_PIPELINE
907 * property on a &drm_plane, as well as drm_colorop properties.
908 *
909 * Setting of these plane properties will be rejected when this client
910 * cap is set:
911 * - COLOR_ENCODING
912 * - COLOR_RANGE
913 *
914 * The client must enable &DRM_CLIENT_CAP_ATOMIC first.
915 */
916#define DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE 7
917
872/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */918/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
873struct drm_set_client_cap {919struct drm_set_client_cap {
874 __u64 capability;920 __u64 capability;
...@@ -1303,6 +1349,14 @@ extern "C" {...@@ -1303,6 +1349,14 @@ extern "C" {
1303 */1349 */
1304#define DRM_IOCTL_SET_CLIENT_NAME DRM_IOWR(0xD1, struct drm_set_client_name)1350#define DRM_IOCTL_SET_CLIENT_NAME DRM_IOWR(0xD1, struct drm_set_client_name)
13051351
1352/**
1353 * DRM_IOCTL_GEM_CHANGE_HANDLE - Move an object to a different handle
1354 *
1355 * Some applications (notably CRIU) need objects to have specific gem handles.
1356 * This ioctl changes the object at one gem handle to use a new gem handle.
1357 */
1358#define DRM_IOCTL_GEM_CHANGE_HANDLE DRM_IOWR(0xD2, struct drm_gem_change_handle)
1359
1306/*1360/*
1307 * Device specific ioctls should only be in their respective headers1361 * Device specific ioctls should only be in their respective headers
1308 * The device specific ioctl range is from 0x40 to 0x9f.1362 * The device specific ioctl range is from 0x40 to 0x9f.
lib/libc/include/any-linux-any/drm/drm_fourcc.h+16-9
...@@ -979,14 +979,20 @@ extern "C" {...@@ -979,14 +979,20 @@ extern "C" {
979 * 2 = Gob Height 8, Turing+ Page Kind mapping979 * 2 = Gob Height 8, Turing+ Page Kind mapping
980 * 3 = Reserved for future use.980 * 3 = Reserved for future use.
981 *981 *
982 * 22:22 s Sector layout. On Tegra GPUs prior to Xavier, there is a further982 * 22:22 s Sector layout. There is a further bit remapping step that occurs
983 * bit remapping step that occurs at an even lower level than the983 * 26:27 at an even lower level than the page kind and block linear
984 * page kind and block linear swizzles. This causes the layout of984 * swizzles. This causes the bit arrangement of surfaces in memory
985 * surfaces mapped in those SOC's GPUs to be incompatible with the985 * to differ subtly, and prevents direct sharing of surfaces between
986 * equivalent mapping on other GPUs in the same system.986 * GPUs with different layouts.
987 *987 *
988 * 0 = Tegra K1 - Tegra Parker/TX2 Layout.988 * 0 = Tegra K1 - Tegra Parker/TX2 Layout
989 * 1 = Desktop GPU and Tegra Xavier+ Layout989 * 1 = Pre-GB20x, GB20x 32+ bpp, GB10, Tegra Xavier-Orin Layout
990 * 2 = GB20x(Blackwell 2)+ 8 bpp surface layout
991 * 3 = GB20x(Blackwell 2)+ 16 bpp surface layout
992 * 4 = Reserved for future use.
993 * 5 = Reserved for future use.
994 * 6 = Reserved for future use.
995 * 7 = Reserved for future use.
990 *996 *
991 * 25:23 c Lossless Framebuffer Compression type.997 * 25:23 c Lossless Framebuffer Compression type.
992 *998 *
...@@ -1001,7 +1007,7 @@ extern "C" {...@@ -1001,7 +1007,7 @@ extern "C" {
1001 * 6 = Reserved for future use1007 * 6 = Reserved for future use
1002 * 7 = Reserved for future use1008 * 7 = Reserved for future use
1003 *1009 *
1004 * 55:25 - Reserved for future use. Must be zero.1010 * 55:28 - Reserved for future use. Must be zero.
1005 */1011 */
1006#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \1012#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
1007 fourcc_mod_code(NVIDIA, (0x10 | \1013 fourcc_mod_code(NVIDIA, (0x10 | \
...@@ -1009,6 +1015,7 @@ extern "C" {...@@ -1009,6 +1015,7 @@ extern "C" {
1009 (((k) & 0xff) << 12) | \1015 (((k) & 0xff) << 12) | \
1010 (((g) & 0x3) << 20) | \1016 (((g) & 0x3) << 20) | \
1011 (((s) & 0x1) << 22) | \1017 (((s) & 0x1) << 22) | \
1018 (((s) & 0x6) << 25) | \
1012 (((c) & 0x7) << 23)))1019 (((c) & 0x7) << 23)))
10131020
1014/* To grandfather in prior block linear format modifiers to the above layout,1021/* To grandfather in prior block linear format modifiers to the above layout,
lib/libc/include/any-linux-any/drm/drm_mode.h+191-1
...@@ -629,6 +629,7 @@ struct drm_mode_connector_set_property {...@@ -629,6 +629,7 @@ struct drm_mode_connector_set_property {
629#define DRM_MODE_OBJECT_FB 0xfbfbfbfb629#define DRM_MODE_OBJECT_FB 0xfbfbfbfb
630#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb630#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb
631#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee631#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee
632#define DRM_MODE_OBJECT_COLOROP 0xfafafafa
632#define DRM_MODE_OBJECT_ANY 0633#define DRM_MODE_OBJECT_ANY 0
633634
634struct drm_mode_obj_get_properties {635struct drm_mode_obj_get_properties {
...@@ -846,6 +847,20 @@ struct drm_color_ctm {...@@ -846,6 +847,20 @@ struct drm_color_ctm {
846 __u64 matrix[9];847 __u64 matrix[9];
847};848};
848849
850struct drm_color_ctm_3x4 {
851 /*
852 * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude
853 * (not two's complement!) format.
854 *
855 * out matrix in
856 * |R| |0 1 2 3 | | R |
857 * |G| = |4 5 6 7 | x | G |
858 * |B| |8 9 10 11| | B |
859 * |1.0|
860 */
861 __u64 matrix[12];
862};
863
849struct drm_color_lut {864struct drm_color_lut {
850 /*865 /*
851 * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and866 * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and
...@@ -857,6 +872,125 @@ struct drm_color_lut {...@@ -857,6 +872,125 @@ struct drm_color_lut {
857 __u16 reserved;872 __u16 reserved;
858};873};
859874
875/*
876 * struct drm_color_lut32
877 *
878 * 32-bit per channel color LUT entry, similar to drm_color_lut.
879 */
880struct drm_color_lut32 {
881 __u32 red;
882 __u32 green;
883 __u32 blue;
884 __u32 reserved;
885};
886
887/**
888 * enum drm_colorop_type - Type of color operation
889 *
890 * drm_colorops can be of many different types. Each type behaves differently
891 * and defines a different set of properties. This enum defines all types and
892 * gives a high-level description.
893 */
894enum drm_colorop_type {
895 /**
896 * @DRM_COLOROP_1D_CURVE:
897 *
898 * enum string "1D Curve"
899 *
900 * A 1D curve that is being applied to all color channels. The
901 * curve is specified via the CURVE_1D_TYPE colorop property.
902 */
903 DRM_COLOROP_1D_CURVE,
904
905 /**
906 * @DRM_COLOROP_1D_LUT:
907 *
908 * enum string "1D LUT"
909 *
910 * A simple 1D LUT of uniformly spaced &drm_color_lut32 entries,
911 * packed into a blob via the DATA property. The driver's
912 * expected LUT size is advertised via the SIZE property.
913 *
914 * The DATA blob is an array of struct drm_color_lut32 with size
915 * of "size".
916 */
917 DRM_COLOROP_1D_LUT,
918
919 /**
920 * @DRM_COLOROP_CTM_3X4:
921 *
922 * enum string "3x4 Matrix"
923 *
924 * A 3x4 matrix. Its values are specified via the
925 * &drm_color_ctm_3x4 struct provided via the DATA property.
926 *
927 * The DATA blob is a float[12]:
928 * out matrix in
929 * | R | | 0 1 2 3 | | R |
930 * | G | = | 4 5 6 7 | x | G |
931 * | B | | 8 9 10 12 | | B |
932 */
933 DRM_COLOROP_CTM_3X4,
934
935 /**
936 * @DRM_COLOROP_MULTIPLIER:
937 *
938 * enum string "Multiplier"
939 *
940 * A simple multiplier, applied to all color values. The
941 * multiplier is specified as a S31.32 via the MULTIPLIER
942 * property.
943 */
944 DRM_COLOROP_MULTIPLIER,
945
946 /**
947 * @DRM_COLOROP_3D_LUT:
948 *
949 * enum string "3D LUT"
950 *
951 * A 3D LUT of &drm_color_lut32 entries,
952 * packed into a blob via the DATA property. The driver's expected
953 * LUT size is advertised via the SIZE property, i.e., a 3D LUT with
954 * 17x17x17 entries will have SIZE set to 17.
955 *
956 * The DATA blob is a 3D array of struct drm_color_lut32 with dimension
957 * length of "size".
958 * The LUT elements are traversed like so:
959 *
960 * for B in range 0..n
961 * for G in range 0..n
962 * for R in range 0..n
963 * index = R + n * (G + n * B)
964 * color = lut3d[index]
965 */
966 DRM_COLOROP_3D_LUT,
967};
968
969/**
970 * enum drm_colorop_lut3d_interpolation_type - type of 3DLUT interpolation
971 */
972enum drm_colorop_lut3d_interpolation_type {
973 /**
974 * @DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL:
975 *
976 * Tetrahedral 3DLUT interpolation
977 */
978 DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL,
979};
980
981/**
982 * enum drm_colorop_lut1d_interpolation_type - type of interpolation for 1D LUTs
983 */
984enum drm_colorop_lut1d_interpolation_type {
985 /**
986 * @DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR:
987 *
988 * Linear interpolation. Values between points of the LUT will be
989 * linearly interpolated.
990 */
991 DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
992};
993
860/**994/**
861 * struct drm_plane_size_hint - Plane size hints995 * struct drm_plane_size_hint - Plane size hints
862 * @width: The width of the plane in pixel996 * @width: The width of the plane in pixel
...@@ -962,6 +1096,14 @@ struct hdr_output_metadata {...@@ -962,6 +1096,14 @@ struct hdr_output_metadata {
962 * Request that the kernel sends back a vblank event (see1096 * Request that the kernel sends back a vblank event (see
963 * struct drm_event_vblank) with the &DRM_EVENT_FLIP_COMPLETE type when the1097 * struct drm_event_vblank) with the &DRM_EVENT_FLIP_COMPLETE type when the
964 * page-flip is done.1098 * page-flip is done.
1099 *
1100 * When used with atomic uAPI, one event will be delivered per CRTC included in
1101 * the atomic commit. A CRTC is included in an atomic commit if one of its
1102 * properties is set, or if a property is set on a connector or plane linked
1103 * via the CRTC_ID property to the CRTC. At least one CRTC must be included,
1104 * and all pulled in CRTCs must be either previously or newly powered on (in
1105 * other words, a powered off CRTC which stays off cannot be included in the
1106 * atomic commit).
965 */1107 */
966#define DRM_MODE_PAGE_FLIP_EVENT 0x011108#define DRM_MODE_PAGE_FLIP_EVENT 0x01
967/**1109/**
...@@ -1058,7 +1200,7 @@ struct drm_mode_crtc_page_flip_target {...@@ -1058,7 +1200,7 @@ struct drm_mode_crtc_page_flip_target {
1058 * struct drm_mode_create_dumb - Create a KMS dumb buffer for scanout.1200 * struct drm_mode_create_dumb - Create a KMS dumb buffer for scanout.
1059 * @height: buffer height in pixels1201 * @height: buffer height in pixels
1060 * @width: buffer width in pixels1202 * @width: buffer width in pixels
1061 * @bpp: bits per pixel1203 * @bpp: color mode
1062 * @flags: must be zero1204 * @flags: must be zero
1063 * @handle: buffer object handle1205 * @handle: buffer object handle
1064 * @pitch: number of bytes between two consecutive lines1206 * @pitch: number of bytes between two consecutive lines
...@@ -1066,6 +1208,54 @@ struct drm_mode_crtc_page_flip_target {...@@ -1066,6 +1208,54 @@ struct drm_mode_crtc_page_flip_target {
1066 *1208 *
1067 * User-space fills @height, @width, @bpp and @flags. If the IOCTL succeeds,1209 * User-space fills @height, @width, @bpp and @flags. If the IOCTL succeeds,
1068 * the kernel fills @handle, @pitch and @size.1210 * the kernel fills @handle, @pitch and @size.
1211 *
1212 * The value of @bpp is a color-mode number describing a specific format
1213 * or a variant thereof. The value often corresponds to the number of bits
1214 * per pixel for most modes, although there are exceptions. Each color mode
1215 * maps to a DRM format plus a number of modes with similar pixel layout.
1216 * Framebuffer layout is always linear.
1217 *
1218 * Support for all modes and formats is optional. Even if dumb-buffer
1219 * creation with a certain color mode succeeds, it is not guaranteed that
1220 * the DRM driver supports any of the related formats. Most drivers support
1221 * a color mode of 32 with a format of DRM_FORMAT_XRGB8888 on their primary
1222 * plane.
1223 *
1224 * +------------+------------------------+------------------------+
1225 * | Color mode | Framebuffer format | Compatible formats |
1226 * +============+========================+========================+
1227 * | 32 | * DRM_FORMAT_XRGB8888 | * DRM_FORMAT_BGRX8888 |
1228 * | | | * DRM_FORMAT_RGBX8888 |
1229 * | | | * DRM_FORMAT_XBGR8888 |
1230 * +------------+------------------------+------------------------+
1231 * | 24 | * DRM_FORMAT_RGB888 | * DRM_FORMAT_BGR888 |
1232 * +------------+------------------------+------------------------+
1233 * | 16 | * DRM_FORMAT_RGB565 | * DRM_FORMAT_BGR565 |
1234 * +------------+------------------------+------------------------+
1235 * | 15 | * DRM_FORMAT_XRGB1555 | * DRM_FORMAT_BGRX1555 |
1236 * | | | * DRM_FORMAT_RGBX1555 |
1237 * | | | * DRM_FORMAT_XBGR1555 |
1238 * +------------+------------------------+------------------------+
1239 * | 8 | * DRM_FORMAT_C8 | * DRM_FORMAT_D8 |
1240 * | | | * DRM_FORMAT_R8 |
1241 * +------------+------------------------+------------------------+
1242 * | 4 | * DRM_FORMAT_C4 | * DRM_FORMAT_D4 |
1243 * | | | * DRM_FORMAT_R4 |
1244 * +------------+------------------------+------------------------+
1245 * | 2 | * DRM_FORMAT_C2 | * DRM_FORMAT_D2 |
1246 * | | | * DRM_FORMAT_R2 |
1247 * +------------+------------------------+------------------------+
1248 * | 1 | * DRM_FORMAT_C1 | * DRM_FORMAT_D1 |
1249 * | | | * DRM_FORMAT_R1 |
1250 * +------------+------------------------+------------------------+
1251 *
1252 * Color modes of 10, 12, 15, 30 and 64 are only supported for use by
1253 * legacy user space. Please don't use them in new code. Other modes
1254 * are not support.
1255 *
1256 * Do not attempt to allocate anything but linear framebuffer memory
1257 * with single-plane RGB data. Allocation of other framebuffer
1258 * layouts requires dedicated ioctls in the respective DRM driver.
1069 */1259 */
1070struct drm_mode_create_dumb {1260struct drm_mode_create_dumb {
1071 __u32 height;1261 __u32 height;
lib/libc/include/any-linux-any/drm/ethosu_accel.h created+261
...@@ -0,0 +1,261 @@
1/* SPDX-License-Identifier: MIT */
2/* Copyright (C) 2025 Arm, Ltd. */
3#ifndef _ETHOSU_DRM_H_
4#define _ETHOSU_DRM_H_
5
6#include "drm.h"
7
8#if defined(__cplusplus)
9extern "C" {
10#endif
11
12/**
13 * DOC: IOCTL IDs
14 *
15 * enum drm_ethosu_ioctl_id - IOCTL IDs
16 *
17 * Place new ioctls at the end, don't re-order, don't replace or remove entries.
18 *
19 * These IDs are not meant to be used directly. Use the DRM_IOCTL_ETHOSU_xxx
20 * definitions instead.
21 */
22enum drm_ethosu_ioctl_id {
23 /** @DRM_ETHOSU_DEV_QUERY: Query device information. */
24 DRM_ETHOSU_DEV_QUERY = 0,
25
26 /** @DRM_ETHOSU_BO_CREATE: Create a buffer object. */
27 DRM_ETHOSU_BO_CREATE,
28
29 /** @DRM_ETHOSU_BO_WAIT: Wait on a buffer object's fence. */
30 DRM_ETHOSU_BO_WAIT,
31
32 /**
33 * @DRM_ETHOSU_BO_MMAP_OFFSET: Get the file offset to pass to
34 * mmap to map a GEM object.
35 */
36 DRM_ETHOSU_BO_MMAP_OFFSET,
37
38 /**
39 * @DRM_ETHOSU_CMDSTREAM_BO_CREATE: Create a command stream buffer
40 * object.
41 */
42 DRM_ETHOSU_CMDSTREAM_BO_CREATE,
43
44 /** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */
45 DRM_ETHOSU_SUBMIT,
46};
47
48/**
49 * DOC: IOCTL arguments
50 */
51
52/**
53 * enum drm_ethosu_dev_query_type - Query type
54 *
55 * Place new types at the end, don't re-order, don't remove or replace.
56 */
57enum drm_ethosu_dev_query_type {
58 /** @DRM_ETHOSU_DEV_QUERY_NPU_INFO: Query NPU information. */
59 DRM_ETHOSU_DEV_QUERY_NPU_INFO = 0,
60};
61
62/**
63 * struct drm_ethosu_gpu_info - NPU information
64 *
65 * Structure grouping all queryable information relating to the NPU.
66 */
67struct drm_ethosu_npu_info {
68 /** @id : NPU ID. */
69 __u32 id;
70#define DRM_ETHOSU_ARCH_MAJOR(x) ((x) >> 28)
71#define DRM_ETHOSU_ARCH_MINOR(x) (((x) >> 20) & 0xff)
72#define DRM_ETHOSU_ARCH_PATCH(x) (((x) >> 16) & 0xf)
73#define DRM_ETHOSU_PRODUCT_MAJOR(x) (((x) >> 12) & 0xf)
74#define DRM_ETHOSU_VERSION_MAJOR(x) (((x) >> 8) & 0xf)
75#define DRM_ETHOSU_VERSION_MINOR(x) (((x) >> 4) & 0xff)
76#define DRM_ETHOSU_VERSION_STATUS(x) ((x) & 0xf)
77
78 /** @gpu_rev: GPU revision. */
79 __u32 config;
80
81 __u32 sram_size;
82};
83
84/**
85 * struct drm_ethosu_dev_query - Arguments passed to DRM_ETHOSU_IOCTL_DEV_QUERY
86 */
87struct drm_ethosu_dev_query {
88 /** @type: the query type (see drm_ethosu_dev_query_type). */
89 __u32 type;
90
91 /**
92 * @size: size of the type being queried.
93 *
94 * If pointer is NULL, size is updated by the driver to provide the
95 * output structure size. If pointer is not NULL, the driver will
96 * only copy min(size, actual_structure_size) bytes to the pointer,
97 * and update the size accordingly. This allows us to extend query
98 * types without breaking userspace.
99 */
100 __u32 size;
101
102 /**
103 * @pointer: user pointer to a query type struct.
104 *
105 * Pointer can be NULL, in which case, nothing is copied, but the
106 * actual structure size is returned. If not NULL, it must point to
107 * a location that's large enough to hold size bytes.
108 */
109 __u64 pointer;
110};
111
112/**
113 * enum drm_ethosu_bo_flags - Buffer object flags, passed at creation time.
114 */
115enum drm_ethosu_bo_flags {
116 /**
117 * @DRM_ETHOSU_BO_NO_MMAP: The buffer object will never be CPU-mapped
118 * in userspace.
119 */
120 DRM_ETHOSU_BO_NO_MMAP = (1 << 0),
121};
122
123/**
124 * struct drm_ethosu_bo_create - Arguments passed to DRM_IOCTL_ETHOSU_BO_CREATE.
125 */
126struct drm_ethosu_bo_create {
127 /**
128 * @size: Requested size for the object
129 *
130 * The (page-aligned) allocated size for the object will be returned.
131 */
132 __u64 size;
133
134 /**
135 * @flags: Flags. Must be a combination of drm_ethosu_bo_flags flags.
136 */
137 __u32 flags;
138
139 /**
140 * @handle: Returned handle for the object.
141 *
142 * Object handles are nonzero.
143 */
144 __u32 handle;
145};
146
147/**
148 * struct drm_ethosu_bo_mmap_offset - Arguments passed to DRM_IOCTL_ETHOSU_BO_MMAP_OFFSET.
149 */
150struct drm_ethosu_bo_mmap_offset {
151 /** @handle: Handle of the object we want an mmap offset for. */
152 __u32 handle;
153
154 /** @pad: MBZ. */
155 __u32 pad;
156
157 /** @offset: The fake offset to use for subsequent mmap calls. */
158 __u64 offset;
159};
160
161/**
162 * struct drm_ethosu_wait_bo - ioctl argument for waiting for
163 * completion of the last DRM_ETHOSU_SUBMIT on a BO.
164 *
165 * This is useful for cases where multiple processes might be
166 * rendering to a BO and you want to wait for all rendering to be
167 * completed.
168 */
169struct drm_ethosu_bo_wait {
170 __u32 handle;
171 __u32 pad;
172 __s64 timeout_ns; /* absolute */
173};
174
175struct drm_ethosu_cmdstream_bo_create {
176 /* Size of the data argument. */
177 __u32 size;
178
179 /* Flags, currently must be 0. */
180 __u32 flags;
181
182 /* Pointer to the data. */
183 __u64 data;
184
185 /** Returned GEM handle for the BO. */
186 __u32 handle;
187
188 /* Pad, must be 0. */
189 __u32 pad;
190};
191
192/**
193 * struct drm_ethosu_job - A job to be run on the NPU
194 *
195 * The kernel will schedule the execution of this job taking into account its
196 * dependencies with other jobs. All tasks in the same job will be executed
197 * sequentially on the same core, to benefit from memory residency in SRAM.
198 */
199struct drm_ethosu_job {
200 /** Input: BO handle for cmdstream. */
201 __u32 cmd_bo;
202
203 /** Input: Amount of SRAM to use. */
204 __u32 sram_size;
205
206#define ETHOSU_MAX_REGIONS 8
207 /** Input: Array of BO handles for each region. */
208 __u32 region_bo_handles[ETHOSU_MAX_REGIONS];
209};
210
211/**
212 * struct drm_ethosu_submit - ioctl argument for submitting commands to the NPU.
213 *
214 * The kernel will schedule the execution of these jobs in dependency order.
215 */
216struct drm_ethosu_submit {
217 /** Input: Pointer to an array of struct drm_ethosu_job. */
218 __u64 jobs;
219
220 /** Input: Number of jobs passed in. */
221 __u32 job_count;
222
223 /** Reserved, must be zero. */
224 __u32 pad;
225};
226
227/**
228 * DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number
229 * @__access: Access type. Must be R, W or RW.
230 * @__id: One of the DRM_ETHOSU_xxx id.
231 * @__type: Suffix of the type being passed to the IOCTL.
232 *
233 * Don't use this macro directly, use the DRM_IOCTL_ETHOSU_xxx
234 * values instead.
235 *
236 * Return: An IOCTL number to be passed to ioctl() from userspace.
237 */
238#define DRM_IOCTL_ETHOSU(__access, __id, __type) \
239 DRM_IO ## __access(DRM_COMMAND_BASE + DRM_ETHOSU_ ## __id, \
240 struct drm_ethosu_ ## __type)
241
242enum {
243 DRM_IOCTL_ETHOSU_DEV_QUERY =
244 DRM_IOCTL_ETHOSU(WR, DEV_QUERY, dev_query),
245 DRM_IOCTL_ETHOSU_BO_CREATE =
246 DRM_IOCTL_ETHOSU(WR, BO_CREATE, bo_create),
247 DRM_IOCTL_ETHOSU_BO_WAIT =
248 DRM_IOCTL_ETHOSU(WR, BO_WAIT, bo_wait),
249 DRM_IOCTL_ETHOSU_BO_MMAP_OFFSET =
250 DRM_IOCTL_ETHOSU(WR, BO_MMAP_OFFSET, bo_mmap_offset),
251 DRM_IOCTL_ETHOSU_CMDSTREAM_BO_CREATE =
252 DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),
253 DRM_IOCTL_ETHOSU_SUBMIT =
254 DRM_IOCTL_ETHOSU(WR, SUBMIT, submit),
255};
256
257#if defined(__cplusplus)
258}
259#endif
260
261#endif /* _ETHOSU_DRM_H_ */
\ No newline at end of file
lib/libc/include/any-linux-any/drm/ivpu_accel.h+63
...@@ -25,6 +25,7 @@ extern "C" {...@@ -25,6 +25,7 @@ extern "C" {
25#define DRM_IVPU_CMDQ_CREATE 0x0b25#define DRM_IVPU_CMDQ_CREATE 0x0b
26#define DRM_IVPU_CMDQ_DESTROY 0x0c26#define DRM_IVPU_CMDQ_DESTROY 0x0c
27#define DRM_IVPU_CMDQ_SUBMIT 0x0d27#define DRM_IVPU_CMDQ_SUBMIT 0x0d
28#define DRM_IVPU_BO_CREATE_FROM_USERPTR 0x0e
2829
29#define DRM_IOCTL_IVPU_GET_PARAM \30#define DRM_IOCTL_IVPU_GET_PARAM \
30 DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param)31 DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param)
...@@ -69,6 +70,10 @@ extern "C" {...@@ -69,6 +70,10 @@ extern "C" {
69#define DRM_IOCTL_IVPU_CMDQ_SUBMIT \70#define DRM_IOCTL_IVPU_CMDQ_SUBMIT \
70 DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_SUBMIT, struct drm_ivpu_cmdq_submit)71 DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_SUBMIT, struct drm_ivpu_cmdq_submit)
7172
73#define DRM_IOCTL_IVPU_BO_CREATE_FROM_USERPTR \
74 DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_CREATE_FROM_USERPTR, \
75 struct drm_ivpu_bo_create_from_userptr)
76
72/**77/**
73 * DOC: contexts78 * DOC: contexts
74 *79 *
...@@ -90,6 +95,7 @@ extern "C" {...@@ -90,6 +95,7 @@ extern "C" {
90#define DRM_IVPU_PARAM_TILE_CONFIG 1195#define DRM_IVPU_PARAM_TILE_CONFIG 11
91#define DRM_IVPU_PARAM_SKU 1296#define DRM_IVPU_PARAM_SKU 12
92#define DRM_IVPU_PARAM_CAPABILITIES 1397#define DRM_IVPU_PARAM_CAPABILITIES 13
98#define DRM_IVPU_PARAM_PREEMPT_BUFFER_SIZE 14
9399
94#define DRM_IVPU_PLATFORM_TYPE_SILICON 0100#define DRM_IVPU_PLATFORM_TYPE_SILICON 0
95101
...@@ -126,6 +132,13 @@ extern "C" {...@@ -126,6 +132,13 @@ extern "C" {
126 * command queue destroy and submit job on specific command queue.132 * command queue destroy and submit job on specific command queue.
127 */133 */
128#define DRM_IVPU_CAP_MANAGE_CMDQ 3134#define DRM_IVPU_CAP_MANAGE_CMDQ 3
135/**
136 * DRM_IVPU_CAP_BO_CREATE_FROM_USERPTR
137 *
138 * Driver supports creating buffer objects from user space memory pointers.
139 * This allows creating GEM buffers from existing user memory regions.
140 */
141#define DRM_IVPU_CAP_BO_CREATE_FROM_USERPTR 4
129142
130/**143/**
131 * struct drm_ivpu_param - Get/Set VPU parameters144 * struct drm_ivpu_param - Get/Set VPU parameters
...@@ -176,6 +189,9 @@ struct drm_ivpu_param {...@@ -176,6 +189,9 @@ struct drm_ivpu_param {
176 *189 *
177 * %DRM_IVPU_PARAM_CAPABILITIES:190 * %DRM_IVPU_PARAM_CAPABILITIES:
178 * Supported capabilities (read-only)191 * Supported capabilities (read-only)
192 *
193 * %DRM_IVPU_PARAM_PREEMPT_BUFFER_SIZE:
194 * Size of the preemption buffer (read-only)
179 */195 */
180 __u32 param;196 __u32 param;
181197
...@@ -190,6 +206,7 @@ struct drm_ivpu_param {...@@ -190,6 +206,7 @@ struct drm_ivpu_param {
190#define DRM_IVPU_BO_HIGH_MEM DRM_IVPU_BO_SHAVE_MEM206#define DRM_IVPU_BO_HIGH_MEM DRM_IVPU_BO_SHAVE_MEM
191#define DRM_IVPU_BO_MAPPABLE 0x00000002207#define DRM_IVPU_BO_MAPPABLE 0x00000002
192#define DRM_IVPU_BO_DMA_MEM 0x00000004208#define DRM_IVPU_BO_DMA_MEM 0x00000004
209#define DRM_IVPU_BO_READ_ONLY 0x00000008
193210
194#define DRM_IVPU_BO_CACHED 0x00000000211#define DRM_IVPU_BO_CACHED 0x00000000
195#define DRM_IVPU_BO_UNCACHED 0x00010000212#define DRM_IVPU_BO_UNCACHED 0x00010000
...@@ -200,6 +217,7 @@ struct drm_ivpu_param {...@@ -200,6 +217,7 @@ struct drm_ivpu_param {
200 (DRM_IVPU_BO_HIGH_MEM | \217 (DRM_IVPU_BO_HIGH_MEM | \
201 DRM_IVPU_BO_MAPPABLE | \218 DRM_IVPU_BO_MAPPABLE | \
202 DRM_IVPU_BO_DMA_MEM | \219 DRM_IVPU_BO_DMA_MEM | \
220 DRM_IVPU_BO_READ_ONLY | \
203 DRM_IVPU_BO_CACHE_MASK)221 DRM_IVPU_BO_CACHE_MASK)
204222
205/**223/**
...@@ -251,6 +269,44 @@ struct drm_ivpu_bo_create {...@@ -251,6 +269,44 @@ struct drm_ivpu_bo_create {
251 __u64 vpu_addr;269 __u64 vpu_addr;
252};270};
253271
272/**
273 * struct drm_ivpu_bo_create_from_userptr - Create dma-buf from user pointer
274 *
275 * Create a GEM buffer object from a user pointer to a memory region.
276 */
277struct drm_ivpu_bo_create_from_userptr {
278 /** @user_ptr: User pointer to memory region (must be page aligned) */
279 __u64 user_ptr;
280
281 /** @size: Size of the memory region in bytes (must be page aligned) */
282 __u64 size;
283
284 /**
285 * @flags:
286 *
287 * Supported flags:
288 *
289 * %DRM_IVPU_BO_HIGH_MEM:
290 *
291 * Allocate VPU address from >4GB range.
292 *
293 * %DRM_IVPU_BO_DMA_MEM:
294 *
295 * Allocate from DMA memory range accessible by hardware DMA.
296 *
297 * %DRM_IVPU_BO_READ_ONLY:
298 *
299 * Allocate as a read-only buffer object.
300 */
301 __u32 flags;
302
303 /** @handle: Returned GEM object handle */
304 __u32 handle;
305
306 /** @vpu_addr: Returned VPU virtual address */
307 __u64 vpu_addr;
308};
309
254/**310/**
255 * struct drm_ivpu_bo_info - Query buffer object info311 * struct drm_ivpu_bo_info - Query buffer object info
256 */312 */
...@@ -371,6 +427,13 @@ struct drm_ivpu_cmdq_submit {...@@ -371,6 +427,13 @@ struct drm_ivpu_cmdq_submit {
371 * to be executed. The offset has to be 8-byte aligned.427 * to be executed. The offset has to be 8-byte aligned.
372 */428 */
373 __u32 commands_offset;429 __u32 commands_offset;
430 /**
431 * @preempt_buffer_index:
432 *
433 * Index of the preemption buffer in the buffers_ptr array.
434 */
435 __u32 preempt_buffer_index;
436 __u32 reserved;
374};437};
375438
376/* drm_ivpu_bo_wait job status codes */439/* drm_ivpu_bo_wait job status codes */
lib/libc/include/any-linux-any/drm/panfrost_drm.h+123-27
...@@ -22,6 +22,8 @@ extern "C" {...@@ -22,6 +22,8 @@ extern "C" {
22#define DRM_PANFROST_PERFCNT_DUMP 0x0722#define DRM_PANFROST_PERFCNT_DUMP 0x07
23#define DRM_PANFROST_MADVISE 0x0823#define DRM_PANFROST_MADVISE 0x08
24#define DRM_PANFROST_SET_LABEL_BO 0x0924#define DRM_PANFROST_SET_LABEL_BO 0x09
25#define DRM_PANFROST_JM_CTX_CREATE 0x0a
26#define DRM_PANFROST_JM_CTX_DESTROY 0x0b
2527
26#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)28#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
27#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)29#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
...@@ -31,6 +33,8 @@ extern "C" {...@@ -31,6 +33,8 @@ extern "C" {
31#define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)33#define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)
32#define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise)34#define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise)
33#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)35#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)
37#define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy)
3438
35/*39/*
36 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module40 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
...@@ -50,27 +54,47 @@ extern "C" {...@@ -50,27 +54,47 @@ extern "C" {
50 * This asks the kernel to have the GPU execute a render command list.54 * This asks the kernel to have the GPU execute a render command list.
51 */55 */
52struct drm_panfrost_submit {56struct drm_panfrost_submit {
5357 /**
54 /** Address to GPU mapping of job descriptor */58 * @jc: Address to GPU mapping of job descriptor
59 */
55 __u64 jc;60 __u64 jc;
5661 /**
57 /** An optional array of sync objects to wait on before starting this job. */62 * @in_syncs: An optional array of sync objects to wait on
63 * before starting this job.
64 */
58 __u64 in_syncs;65 __u64 in_syncs;
5966 /**
60 /** Number of sync objects to wait on before starting this job. */67 * @in_sync_count: Number of sync objects to wait on before
68 * starting this job.
69 */
61 __u32 in_sync_count;70 __u32 in_sync_count;
6271 /**
63 /** An optional sync object to place the completion fence in. */72 * @out_sync: An optional sync object to place the completion fence in.
73 */
64 __u32 out_sync;74 __u32 out_sync;
6575 /**
66 /** Pointer to a u32 array of the BOs that are referenced by the job. */76 * @bo_handles: Pointer to a u32 array of the BOs that are
77 * referenced by the job.
78 */
67 __u64 bo_handles;79 __u64 bo_handles;
6880 /**
69 /** Number of BO handles passed in (size is that times 4). */81 * @bo_handle_count: Number of BO handles passed in (size is
82 * that times 4).
83 */
70 __u32 bo_handle_count;84 __u32 bo_handle_count;
7185 /**
72 /** A combination of PANFROST_JD_REQ_* */86 * @requirements: A combination of PANFROST_JD_REQ_*
87 */
73 __u32 requirements;88 __u32 requirements;
89 /**
90 * @jm_ctx_handle: JM context handle. Zero if you want to use the
91 * default context.
92 */
93 __u32 jm_ctx_handle;
94 /**
95 * @pad: Padding field. Must be zero.
96 */
97 __u32 pad;
74};98};
7599
76/**100/**
...@@ -82,9 +106,18 @@ struct drm_panfrost_submit {...@@ -82,9 +106,18 @@ struct drm_panfrost_submit {
82 * completed.106 * completed.
83 */107 */
84struct drm_panfrost_wait_bo {108struct drm_panfrost_wait_bo {
109 /**
110 * @handle: Handle for the object to wait for.
111 */
85 __u32 handle;112 __u32 handle;
113 /**
114 * @pad: Padding, must be zero-filled.
115 */
86 __u32 pad;116 __u32 pad;
87 __s64 timeout_ns; /* absolute */117 /**
118 * @timeout_ns: absolute number of nanoseconds to wait.
119 */
120 __s64 timeout_ns;
88};121};
89122
90/* Valid flags to pass to drm_panfrost_create_bo */123/* Valid flags to pass to drm_panfrost_create_bo */
...@@ -97,16 +130,26 @@ struct drm_panfrost_wait_bo {...@@ -97,16 +130,26 @@ struct drm_panfrost_wait_bo {
97 * The flags argument is a bit mask of PANFROST_BO_* flags.130 * The flags argument is a bit mask of PANFROST_BO_* flags.
98 */131 */
99struct drm_panfrost_create_bo {132struct drm_panfrost_create_bo {
133 /**
134 * @size: size of shmem/BO area to create (bytes)
135 */
100 __u32 size;136 __u32 size;
137 /**
138 * @flags: see PANFROST_BO_* flags
139 */
101 __u32 flags;140 __u32 flags;
102 /** Returned GEM handle for the BO. */141 /**
142 * @handle: Returned GEM handle for the BO.
143 */
103 __u32 handle;144 __u32 handle;
104 /* Pad, must be zero-filled. */145 /**
146 * @pad: Padding, must be zero-filled.
147 */
105 __u32 pad;148 __u32 pad;
106 /**149 /**
107 * Returned offset for the BO in the GPU address space. This offset150 * @offset: Returned offset for the BO in the GPU address space.
108 * is private to the DRM fd and is valid for the lifetime of the GEM151 * This offset is private to the DRM fd and is valid for the
109 * handle.152 * lifetime of the GEM handle.
110 *153 *
111 * This offset value will always be nonzero, since various HW154 * This offset value will always be nonzero, since various HW
112 * units treat 0 specially.155 * units treat 0 specially.
...@@ -126,10 +169,17 @@ struct drm_panfrost_create_bo {...@@ -126,10 +169,17 @@ struct drm_panfrost_create_bo {
126 * used in a future extension.169 * used in a future extension.
127 */170 */
128struct drm_panfrost_mmap_bo {171struct drm_panfrost_mmap_bo {
129 /** Handle for the object being mapped. */172 /**
173 * @handle: Handle for the object being mapped.
174 */
130 __u32 handle;175 __u32 handle;
176 /**
177 * @flags: currently not used (should be zero)
178 */
131 __u32 flags;179 __u32 flags;
132 /** offset into the drm node to use for subsequent mmap call. */180 /**
181 * @offset: offset into the drm node to use for subsequent mmap call.
182 */
133 __u64 offset;183 __u64 offset;
134};184};
135185
...@@ -177,6 +227,7 @@ enum drm_panfrost_param {...@@ -177,6 +227,7 @@ enum drm_panfrost_param {
177 DRM_PANFROST_PARAM_AFBC_FEATURES,227 DRM_PANFROST_PARAM_AFBC_FEATURES,
178 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,228 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,
179 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,229 DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,
230 DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,
180};231};
181232
182struct drm_panfrost_get_param {233struct drm_panfrost_get_param {
...@@ -185,7 +236,7 @@ struct drm_panfrost_get_param {...@@ -185,7 +236,7 @@ struct drm_panfrost_get_param {
185 __u64 value;236 __u64 value;
186};237};
187238
188/**239/*
189 * Returns the offset for the BO in the GPU address space for this DRM fd.240 * Returns the offset for the BO in the GPU address space for this DRM fd.
190 * This is the same value returned by drm_panfrost_create_bo, if that was called241 * This is the same value returned by drm_panfrost_create_bo, if that was called
191 * from this DRM fd.242 * from this DRM fd.
...@@ -233,12 +284,14 @@ struct drm_panfrost_madvise {...@@ -233,12 +284,14 @@ struct drm_panfrost_madvise {
233 * struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs.284 * struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs.
234 */285 */
235struct drm_panfrost_set_label_bo {286struct drm_panfrost_set_label_bo {
236 /** @handle: Handle of the buffer object to label. */287 /**
288 * @handle: Handle of the buffer object to label.
289 */
237 __u32 handle;290 __u32 handle;
238291 /**
239 /** @pad: MBZ. */292 * @pad: Must be zero.
293 */
240 __u32 pad;294 __u32 pad;
241
242 /**295 /**
243 * @label: User pointer to a NUL-terminated string296 * @label: User pointer to a NUL-terminated string
244 *297 *
...@@ -299,6 +352,49 @@ struct panfrost_dump_registers {...@@ -299,6 +352,49 @@ struct panfrost_dump_registers {
299 __u32 value;352 __u32 value;
300};353};
301354
355enum drm_panfrost_jm_ctx_priority {
356 /**
357 * @PANFROST_JM_CTX_PRIORITY_LOW: Low priority context.
358 */
359 PANFROST_JM_CTX_PRIORITY_LOW = 0,
360
361 /**
362 * @PANFROST_JM_CTX_PRIORITY_MEDIUM: Medium priority context.
363 */
364 PANFROST_JM_CTX_PRIORITY_MEDIUM,
365
366 /**
367 * @PANFROST_JM_CTX_PRIORITY_HIGH: High priority context.
368 *
369 * Requires CAP_SYS_NICE or DRM_MASTER.
370 */
371 PANFROST_JM_CTX_PRIORITY_HIGH,
372};
373
374struct drm_panfrost_jm_ctx_create {
375 /**
376 * @handle: Handle of the created JM context
377 */
378 __u32 handle;
379 /**
380 * @priority: Context priority (see enum drm_panfrost_jm_ctx_priority).
381 */
382 __u32 priority;
383};
384
385struct drm_panfrost_jm_ctx_destroy {
386 /**
387 * @handle: Handle of the JM context to destroy.
388 *
389 * Must be a valid context handle returned by DRM_IOCTL_PANTHOR_JM_CTX_CREATE.
390 */
391 __u32 handle;
392 /**
393 * @pad: Padding field, must be zero.
394 */
395 __u32 pad;
396};
397
302#if defined(__cplusplus)398#if defined(__cplusplus)
303}399}
304#endif400#endif
lib/libc/include/any-linux-any/drm/panthor_drm.h+3
...@@ -327,6 +327,9 @@ struct drm_panthor_gpu_info {...@@ -327,6 +327,9 @@ struct drm_panthor_gpu_info {
327327
328 /** @pad: MBZ. */328 /** @pad: MBZ. */
329 __u32 pad;329 __u32 pad;
330
331 /** @gpu_features: Bitmask describing supported GPU-wide features */
332 __u64 gpu_features;
330};333};
331334
332/**335/**
lib/libc/include/any-linux-any/drm/rocket_accel.h created+142
...@@ -0,0 +1,142 @@
1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2024 Tomeu Vizoso
4 */
5#ifndef __DRM_UAPI_ROCKET_ACCEL_H__
6#define __DRM_UAPI_ROCKET_ACCEL_H__
7
8#include "drm.h"
9
10#if defined(__cplusplus)
11extern "C" {
12#endif
13
14#define DRM_ROCKET_CREATE_BO 0x00
15#define DRM_ROCKET_SUBMIT 0x01
16#define DRM_ROCKET_PREP_BO 0x02
17#define DRM_ROCKET_FINI_BO 0x03
18
19#define DRM_IOCTL_ROCKET_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_ROCKET_CREATE_BO, struct drm_rocket_create_bo)
20#define DRM_IOCTL_ROCKET_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_ROCKET_SUBMIT, struct drm_rocket_submit)
21#define DRM_IOCTL_ROCKET_PREP_BO DRM_IOW(DRM_COMMAND_BASE + DRM_ROCKET_PREP_BO, struct drm_rocket_prep_bo)
22#define DRM_IOCTL_ROCKET_FINI_BO DRM_IOW(DRM_COMMAND_BASE + DRM_ROCKET_FINI_BO, struct drm_rocket_fini_bo)
23
24/**
25 * struct drm_rocket_create_bo - ioctl argument for creating Rocket BOs.
26 *
27 */
28struct drm_rocket_create_bo {
29 /** Input: Size of the requested BO. */
30 __u32 size;
31
32 /** Output: GEM handle for the BO. */
33 __u32 handle;
34
35 /**
36 * Output: DMA address for the BO in the NPU address space. This address
37 * is private to the DRM fd and is valid for the lifetime of the GEM
38 * handle.
39 */
40 __u64 dma_address;
41
42 /** Output: Offset into the drm node to use for subsequent mmap call. */
43 __u64 offset;
44};
45
46/**
47 * struct drm_rocket_prep_bo - ioctl argument for starting CPU ownership of the BO.
48 *
49 * Takes care of waiting for any NPU jobs that might still use the NPU and performs cache
50 * synchronization.
51 */
52struct drm_rocket_prep_bo {
53 /** Input: GEM handle of the buffer object. */
54 __u32 handle;
55
56 /** Reserved, must be zero. */
57 __u32 reserved;
58
59 /** Input: Amount of time to wait for NPU jobs. */
60 __s64 timeout_ns;
61};
62
63/**
64 * struct drm_rocket_fini_bo - ioctl argument for finishing CPU ownership of the BO.
65 *
66 * Synchronize caches for NPU access.
67 */
68struct drm_rocket_fini_bo {
69 /** Input: GEM handle of the buffer object. */
70 __u32 handle;
71
72 /** Reserved, must be zero. */
73 __u32 reserved;
74};
75
76/**
77 * struct drm_rocket_task - A task to be run on the NPU
78 *
79 * A task is the smallest unit of work that can be run on the NPU.
80 */
81struct drm_rocket_task {
82 /** Input: DMA address to NPU mapping of register command buffer */
83 __u32 regcmd;
84
85 /** Input: Number of commands in the register command buffer */
86 __u32 regcmd_count;
87};
88
89/**
90 * struct drm_rocket_job - A job to be run on the NPU
91 *
92 * The kernel will schedule the execution of this job taking into account its
93 * dependencies with other jobs. All tasks in the same job will be executed
94 * sequentially on the same core, to benefit from memory residency in SRAM.
95 */
96struct drm_rocket_job {
97 /** Input: Pointer to an array of struct drm_rocket_task. */
98 __u64 tasks;
99
100 /** Input: Pointer to a u32 array of the BOs that are read by the job. */
101 __u64 in_bo_handles;
102
103 /** Input: Pointer to a u32 array of the BOs that are written to by the job. */
104 __u64 out_bo_handles;
105
106 /** Input: Number of tasks passed in. */
107 __u32 task_count;
108
109 /** Input: Size in bytes of the structs in the @tasks field. */
110 __u32 task_struct_size;
111
112 /** Input: Number of input BO handles passed in (size is that times 4). */
113 __u32 in_bo_handle_count;
114
115 /** Input: Number of output BO handles passed in (size is that times 4). */
116 __u32 out_bo_handle_count;
117};
118
119/**
120 * struct drm_rocket_submit - ioctl argument for submitting commands to the NPU.
121 *
122 * The kernel will schedule the execution of these jobs in dependency order.
123 */
124struct drm_rocket_submit {
125 /** Input: Pointer to an array of struct drm_rocket_job. */
126 __u64 jobs;
127
128 /** Input: Number of jobs passed in. */
129 __u32 job_count;
130
131 /** Input: Size in bytes of the structs in the @jobs field. */
132 __u32 job_struct_size;
133
134 /** Reserved, must be zero. */
135 __u64 reserved;
136};
137
138#if defined(__cplusplus)
139}
140#endif
141
142#endif /* __DRM_UAPI_ROCKET_ACCEL_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/drm/v3d_drm.h+2
...@@ -294,6 +294,8 @@ enum drm_v3d_param {...@@ -294,6 +294,8 @@ enum drm_v3d_param {
294 DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,294 DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,
295 DRM_V3D_PARAM_MAX_PERF_COUNTERS,295 DRM_V3D_PARAM_MAX_PERF_COUNTERS,
296 DRM_V3D_PARAM_SUPPORTS_SUPER_PAGES,296 DRM_V3D_PARAM_SUPPORTS_SUPER_PAGES,
297 DRM_V3D_PARAM_GLOBAL_RESET_COUNTER,
298 DRM_V3D_PARAM_CONTEXT_RESET_COUNTER,
297};299};
298300
299struct drm_v3d_get_param {301struct drm_v3d_get_param {
lib/libc/include/any-linux-any/drm/xe_drm.h+302-2
...@@ -81,6 +81,8 @@ extern "C" {...@@ -81,6 +81,8 @@ extern "C" {
81 * - &DRM_IOCTL_XE_EXEC81 * - &DRM_IOCTL_XE_EXEC
82 * - &DRM_IOCTL_XE_WAIT_USER_FENCE82 * - &DRM_IOCTL_XE_WAIT_USER_FENCE
83 * - &DRM_IOCTL_XE_OBSERVATION83 * - &DRM_IOCTL_XE_OBSERVATION
84 * - &DRM_IOCTL_XE_MADVISE
85 * - &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
84 */86 */
8587
86/*88/*
...@@ -102,6 +104,8 @@ extern "C" {...@@ -102,6 +104,8 @@ extern "C" {
102#define DRM_XE_EXEC 0x09104#define DRM_XE_EXEC 0x09
103#define DRM_XE_WAIT_USER_FENCE 0x0a105#define DRM_XE_WAIT_USER_FENCE 0x0a
104#define DRM_XE_OBSERVATION 0x0b106#define DRM_XE_OBSERVATION 0x0b
107#define DRM_XE_MADVISE 0x0c
108#define DRM_XE_VM_QUERY_MEM_RANGE_ATTRS 0x0d
105109
106/* Must be kept compact -- no holes */110/* Must be kept compact -- no holes */
107111
...@@ -117,6 +121,8 @@ extern "C" {...@@ -117,6 +121,8 @@ extern "C" {
117#define DRM_IOCTL_XE_EXEC DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec)121#define DRM_IOCTL_XE_EXEC DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec)
118#define DRM_IOCTL_XE_WAIT_USER_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence)122#define DRM_IOCTL_XE_WAIT_USER_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence)
119#define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)123#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_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)
120126
121/**127/**
122 * DOC: Xe IOCTL Extensions128 * DOC: Xe IOCTL Extensions
...@@ -760,8 +766,16 @@ struct drm_xe_device_query {...@@ -760,8 +766,16 @@ struct drm_xe_device_query {
760 * gem creation766 * gem creation
761 *767 *
762 * The @flags can be:768 * The @flags can be:
763 * - %DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING769 * - %DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING - Modify the GEM object
764 * - %DRM_XE_GEM_CREATE_FLAG_SCANOUT770 * allocation strategy by deferring physical memory allocation
771 * until the object is either bound to a virtual memory region via
772 * VM_BIND or accessed by the CPU. As a result, no backing memory is
773 * reserved at the time of GEM object creation.
774 * - %DRM_XE_GEM_CREATE_FLAG_SCANOUT - Indicates that the GEM object is
775 * intended for scanout via the display engine. When set, kernel ensures
776 * that the allocation is placed in a memory region compatible with the
777 * display engine requirements. This may impose restrictions on tiling,
778 * alignment, and memory placement to guarantee proper display functionality.
765 * - %DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM - When using VRAM as a779 * - %DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM - When using VRAM as a
766 * possible placement, ensure that the corresponding VRAM allocation780 * possible placement, ensure that the corresponding VRAM allocation
767 * will always use the CPU accessible part of VRAM. This is important781 * will always use the CPU accessible part of VRAM. This is important
...@@ -1003,6 +1017,24 @@ struct drm_xe_vm_destroy {...@@ -1003,6 +1017,24 @@ struct drm_xe_vm_destroy {
1003 * valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address1017 * valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address
1004 * mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO1018 * mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
1005 * handle MBZ, and the BO offset MBZ.1019 * handle MBZ, and the BO offset MBZ.
1020 * - %DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET - Can be used in combination with
1021 * %DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR to reset madvises when the underlying
1022 * CPU address space range is unmapped (typically with munmap(2) or brk(2)).
1023 * The madvise values set with &DRM_IOCTL_XE_MADVISE are reset to the values
1024 * that were present immediately after the &DRM_IOCTL_XE_VM_BIND.
1025 * The reset GPU virtual address range is the intersection of the range bound
1026 * using &DRM_IOCTL_XE_VM_BIND and the virtual CPU address space range
1027 * unmapped.
1028 * This functionality is present to mimic the behaviour of CPU address space
1029 * madvises set using madvise(2), which are typically reset on unmap.
1030 * Note: free(3) may or may not call munmap(2) and/or brk(2), and may thus
1031 * not invoke autoreset. Neither will stack variables going out of scope.
1032 * Therefore it's recommended to always explicitly reset the madvises when
1033 * freeing the memory backing a region used in a &DRM_IOCTL_XE_MADVISE call.
1034 *
1035 * The @prefetch_mem_region_instance for %DRM_XE_VM_BIND_OP_PREFETCH can also be:
1036 * - %DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC, which ensures prefetching occurs in
1037 * the memory region advised by madvise.
1006 */1038 */
1007struct drm_xe_vm_bind_op {1039struct drm_xe_vm_bind_op {
1008 /** @extensions: Pointer to the first extension struct, if any */1040 /** @extensions: Pointer to the first extension struct, if any */
...@@ -1105,9 +1137,11 @@ struct drm_xe_vm_bind_op {...@@ -1105,9 +1137,11 @@ struct drm_xe_vm_bind_op {
1105#define DRM_XE_VM_BIND_FLAG_DUMPABLE (1 << 3)1137#define DRM_XE_VM_BIND_FLAG_DUMPABLE (1 << 3)
1106#define DRM_XE_VM_BIND_FLAG_CHECK_PXP (1 << 4)1138#define DRM_XE_VM_BIND_FLAG_CHECK_PXP (1 << 4)
1107#define DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR (1 << 5)1139#define DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR (1 << 5)
1140#define DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET (1 << 6)
1108 /** @flags: Bind flags */1141 /** @flags: Bind flags */
1109 __u32 flags;1142 __u32 flags;
11101143
1144#define DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC -1
1111 /**1145 /**
1112 * @prefetch_mem_region_instance: Memory region to prefetch VMA to.1146 * @prefetch_mem_region_instance: Memory region to prefetch VMA to.
1113 * It is a region instance, not a mask.1147 * It is a region instance, not a mask.
...@@ -1429,6 +1463,7 @@ struct drm_xe_exec {...@@ -1429,6 +1463,7 @@ struct drm_xe_exec {
1429 /** @exec_queue_id: Exec queue ID for the batch buffer */1463 /** @exec_queue_id: Exec queue ID for the batch buffer */
1430 __u32 exec_queue_id;1464 __u32 exec_queue_id;
14311465
1466#define DRM_XE_MAX_SYNCS 1024
1432 /** @num_syncs: Amount of struct drm_xe_sync in array. */1467 /** @num_syncs: Amount of struct drm_xe_sync in array. */
1433 __u32 num_syncs;1468 __u32 num_syncs;
14341469
...@@ -1974,6 +2009,271 @@ struct drm_xe_query_eu_stall {...@@ -1974,6 +2009,271 @@ struct drm_xe_query_eu_stall {
1974 __u64 sampling_rates[];2009 __u64 sampling_rates[];
1975};2010};
19762011
2012/**
2013 * struct drm_xe_madvise - Input of &DRM_IOCTL_XE_MADVISE
2014 *
2015 * This structure is used to set memory attributes for a virtual address range
2016 * in a VM. The type of attribute is specified by @type, and the corresponding
2017 * union member is used to provide additional parameters for @type.
2018 *
2019 * Supported attribute types:
2020 * - DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC: Set preferred memory location.
2021 * - DRM_XE_MEM_RANGE_ATTR_ATOMIC: Set atomic access policy.
2022 * - DRM_XE_MEM_RANGE_ATTR_PAT: Set page attribute table index.
2023 *
2024 * Example:
2025 *
2026 * .. code-block:: C
2027 *
2028 * struct drm_xe_madvise madvise = {
2029 * .vm_id = vm_id,
2030 * .start = 0x100000,
2031 * .range = 0x2000,
2032 * .type = DRM_XE_MEM_RANGE_ATTR_ATOMIC,
2033 * .atomic_val = DRM_XE_ATOMIC_DEVICE,
2034 * };
2035 *
2036 * ioctl(fd, DRM_IOCTL_XE_MADVISE, &madvise);
2037 *
2038 */
2039struct drm_xe_madvise {
2040 /** @extensions: Pointer to the first extension struct, if any */
2041 __u64 extensions;
2042
2043 /** @start: start of the virtual address range */
2044 __u64 start;
2045
2046 /** @range: size of the virtual address range */
2047 __u64 range;
2048
2049 /** @vm_id: vm_id of the virtual range */
2050 __u32 vm_id;
2051
2052#define DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC 0
2053#define DRM_XE_MEM_RANGE_ATTR_ATOMIC 1
2054#define DRM_XE_MEM_RANGE_ATTR_PAT 2
2055 /** @type: type of attribute */
2056 __u32 type;
2057
2058 union {
2059 /**
2060 * @preferred_mem_loc: preferred memory location
2061 *
2062 * Used when @type == DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC
2063 *
2064 * Supported values for @preferred_mem_loc.devmem_fd:
2065 * - DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE: set vram of fault tile as preferred loc
2066 * - DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM: set smem as preferred loc
2067 *
2068 * Supported values for @preferred_mem_loc.migration_policy:
2069 * - DRM_XE_MIGRATE_ALL_PAGES
2070 * - DRM_XE_MIGRATE_ONLY_SYSTEM_PAGES
2071 */
2072 struct {
2073#define DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE 0
2074#define DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM -1
2075 /** @preferred_mem_loc.devmem_fd: fd for preferred loc */
2076 __u32 devmem_fd;
2077
2078#define DRM_XE_MIGRATE_ALL_PAGES 0
2079#define DRM_XE_MIGRATE_ONLY_SYSTEM_PAGES 1
2080 /** @preferred_mem_loc.migration_policy: Page migration policy */
2081 __u16 migration_policy;
2082
2083 /** @preferred_mem_loc.pad : MBZ */
2084 __u16 pad;
2085
2086 /** @preferred_mem_loc.reserved : Reserved */
2087 __u64 reserved;
2088 } preferred_mem_loc;
2089
2090 /**
2091 * @atomic: Atomic access policy
2092 *
2093 * Used when @type == DRM_XE_MEM_RANGE_ATTR_ATOMIC.
2094 *
2095 * Supported values for @atomic.val:
2096 * - DRM_XE_ATOMIC_UNDEFINED: Undefined or default behaviour.
2097 * Support both GPU and CPU atomic operations for system allocator.
2098 * Support GPU atomic operations for normal(bo) allocator.
2099 * - DRM_XE_ATOMIC_DEVICE: Support GPU atomic operations.
2100 * - DRM_XE_ATOMIC_GLOBAL: Support both GPU and CPU atomic operations.
2101 * - DRM_XE_ATOMIC_CPU: Support CPU atomic only, no GPU atomics supported.
2102 */
2103 struct {
2104#define DRM_XE_ATOMIC_UNDEFINED 0
2105#define DRM_XE_ATOMIC_DEVICE 1
2106#define DRM_XE_ATOMIC_GLOBAL 2
2107#define DRM_XE_ATOMIC_CPU 3
2108 /** @atomic.val: value of atomic operation */
2109 __u32 val;
2110
2111 /** @atomic.pad: MBZ */
2112 __u32 pad;
2113
2114 /** @atomic.reserved: Reserved */
2115 __u64 reserved;
2116 } atomic;
2117
2118 /**
2119 * @pat_index: Page attribute table index
2120 *
2121 * Used when @type == DRM_XE_MEM_RANGE_ATTR_PAT.
2122 */
2123 struct {
2124 /** @pat_index.val: PAT index value */
2125 __u32 val;
2126
2127 /** @pat_index.pad: MBZ */
2128 __u32 pad;
2129
2130 /** @pat_index.reserved: Reserved */
2131 __u64 reserved;
2132 } pat_index;
2133 };
2134
2135 /** @reserved: Reserved */
2136 __u64 reserved[2];
2137};
2138
2139/**
2140 * struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS
2141 *
2142 * This structure is provided by userspace and filled by KMD in response to the
2143 * DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS ioctl. It describes memory attributes of
2144 * a memory ranges within a user specified address range in a VM.
2145 *
2146 * The structure includes information such as atomic access policy,
2147 * page attribute table (PAT) index, and preferred memory location.
2148 * Userspace allocates an array of these structures and passes a pointer to the
2149 * ioctl to retrieve attributes for each memory ranges
2150 *
2151 * @extensions: Pointer to the first extension struct, if any
2152 * @start: Start address of the memory range
2153 * @end: End address of the virtual memory range
2154 *
2155 */
2156struct drm_xe_mem_range_attr {
2157 /** @extensions: Pointer to the first extension struct, if any */
2158 __u64 extensions;
2159
2160 /** @start: start of the memory range */
2161 __u64 start;
2162
2163 /** @end: end of the memory range */
2164 __u64 end;
2165
2166 /** @preferred_mem_loc: preferred memory location */
2167 struct {
2168 /** @preferred_mem_loc.devmem_fd: fd for preferred loc */
2169 __u32 devmem_fd;
2170
2171 /** @preferred_mem_loc.migration_policy: Page migration policy */
2172 __u32 migration_policy;
2173 } preferred_mem_loc;
2174
2175 /** @atomic: Atomic access policy */
2176 struct {
2177 /** @atomic.val: atomic attribute */
2178 __u32 val;
2179
2180 /** @atomic.reserved: Reserved */
2181 __u32 reserved;
2182 } atomic;
2183
2184 /** @pat_index: Page attribute table index */
2185 struct {
2186 /** @pat_index.val: PAT index */
2187 __u32 val;
2188
2189 /** @pat_index.reserved: Reserved */
2190 __u32 reserved;
2191 } pat_index;
2192
2193 /** @reserved: Reserved */
2194 __u64 reserved[2];
2195};
2196
2197/**
2198 * struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_ATTRIBUTES
2199 *
2200 * This structure is used to query memory attributes of memory regions
2201 * within a user specified address range in a VM. It provides detailed
2202 * information about each memory range, including atomic access policy,
2203 * page attribute table (PAT) index, and preferred memory location.
2204 *
2205 * Userspace first calls the ioctl with @num_mem_ranges = 0,
2206 * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL to retrieve
2207 * the number of memory regions and size of each memory range attribute.
2208 * Then, it allocates a buffer of that size and calls the ioctl again to fill
2209 * the buffer with memory range attributes.
2210 *
2211 * If second call fails with -ENOSPC, it means memory ranges changed between
2212 * first call and now, retry IOCTL again with @num_mem_ranges = 0,
2213 * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL followed by
2214 * Second ioctl call.
2215 *
2216 * Example:
2217 *
2218 * .. code-block:: C
2219 *
2220 * struct drm_xe_vm_query_mem_range_attr query = {
2221 * .vm_id = vm_id,
2222 * .start = 0x100000,
2223 * .range = 0x2000,
2224 * };
2225 *
2226 * // First ioctl call to get num of mem regions and sizeof each attribute
2227 * ioctl(fd, DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS, &query);
2228 *
2229 * // Allocate buffer for the memory region attributes
2230 * void *ptr = malloc(query.num_mem_ranges * query.sizeof_mem_range_attr);
2231 * void *ptr_start = ptr;
2232 *
2233 * query.vector_of_mem_attr = (uintptr_t)ptr;
2234 *
2235 * // Second ioctl call to actually fill the memory attributes
2236 * ioctl(fd, DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS, &query);
2237 *
2238 * // Iterate over the returned memory region attributes
2239 * for (unsigned int i = 0; i < query.num_mem_ranges; ++i) {
2240 * struct drm_xe_mem_range_attr *attr = (struct drm_xe_mem_range_attr *)ptr;
2241 *
2242 * // Do something with attr
2243 *
2244 * // Move pointer by one entry
2245 * ptr += query.sizeof_mem_range_attr;
2246 * }
2247 *
2248 * free(ptr_start);
2249 */
2250struct drm_xe_vm_query_mem_range_attr {
2251 /** @extensions: Pointer to the first extension struct, if any */
2252 __u64 extensions;
2253
2254 /** @vm_id: vm_id of the virtual range */
2255 __u32 vm_id;
2256
2257 /** @num_mem_ranges: number of mem_ranges in range */
2258 __u32 num_mem_ranges;
2259
2260 /** @start: start of the virtual address range */
2261 __u64 start;
2262
2263 /** @range: size of the virtual address range */
2264 __u64 range;
2265
2266 /** @sizeof_mem_range_attr: size of struct drm_xe_mem_range_attr */
2267 __u64 sizeof_mem_range_attr;
2268
2269 /** @vector_of_mem_attr: userptr to array of struct drm_xe_mem_range_attr */
2270 __u64 vector_of_mem_attr;
2271
2272 /** @reserved: Reserved */
2273 __u64 reserved[2];
2274
2275};
2276
1977#if defined(__cplusplus)2277#if defined(__cplusplus)
1978}2278}
1979#endif2279#endif
lib/libc/include/any-linux-any/linux/acrn.h+21-15
...@@ -418,26 +418,32 @@ struct acrn_pcidev {...@@ -418,26 +418,32 @@ struct acrn_pcidev {
418};418};
419419
420/**420/**
421 * struct acrn_mmiodev - Info for assigning or de-assigning a MMIO device421 * struct acrn_mmio_dev_res - MMIO device resource description
422 * @name: Name of the MMIO device.422 * @user_vm_pa: Physical address of User VM of the MMIO region
423 * @res[].user_vm_pa: Physical address of User VM of the MMIO region423 * for the MMIO device.
424 * for the MMIO device.424 * @service_vm_pa: Physical address of Service VM of the MMIO
425 * @res[].service_vm_pa: Physical address of Service VM of the MMIO425 * region for the MMIO device.
426 * region for the MMIO device.426 * @size: Size of the MMIO region for the MMIO device.
427 * @res[].size: Size of the MMIO region for the MMIO device.427 * @mem_type: Memory type of the MMIO region for the MMIO
428 * @res[].mem_type: Memory type of the MMIO region for the MMIO428 * device.
429 * device.429 */
430struct acrn_mmio_dev_res {
431 __u64 user_vm_pa;
432 __u64 service_vm_pa;
433 __u64 size;
434 __u64 mem_type;
435};
436
437/**
438 * struct acrn_mmiodev - Info for assigning or de-assigning an MMIO device
439 * @name: Name of the MMIO device.
440 * @res: Array of MMIO device descriptions
430 *441 *
431 * This structure will be passed to hypervisor directly.442 * This structure will be passed to hypervisor directly.
432 */443 */
433struct acrn_mmiodev {444struct acrn_mmiodev {
434 __u8 name[8];445 __u8 name[8];
435 struct {446 struct acrn_mmio_dev_res res[ACRN_MMIODEV_RES_NUM];
436 __u64 user_vm_pa;
437 __u64 service_vm_pa;
438 __u64 size;
439 __u64 mem_type;
440 } res[ACRN_MMIODEV_RES_NUM];
441};447};
442448
443/**449/**
lib/libc/include/any-linux-any/linux/android/binder.h+1-1
...@@ -38,7 +38,7 @@ enum {...@@ -38,7 +38,7 @@ enum {
38 BINDER_TYPE_PTR = B_PACK_CHARS('p', 't', '*', B_TYPE_LARGE),38 BINDER_TYPE_PTR = B_PACK_CHARS('p', 't', '*', B_TYPE_LARGE),
39};39};
4040
41enum {41enum flat_binder_object_flags {
42 FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,42 FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,
43 FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,43 FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,
4444
lib/libc/include/any-linux-any/linux/android/binder_netlink.h created+38
...@@ -0,0 +1,38 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/binder.yaml */
4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
6
7#ifndef _LINUX_ANDROID_BINDER_NETLINK_H
8#define _LINUX_ANDROID_BINDER_NETLINK_H
9
10#define BINDER_FAMILY_NAME "binder"
11#define BINDER_FAMILY_VERSION 1
12
13enum {
14 BINDER_A_REPORT_ERROR = 1,
15 BINDER_A_REPORT_CONTEXT,
16 BINDER_A_REPORT_FROM_PID,
17 BINDER_A_REPORT_FROM_TID,
18 BINDER_A_REPORT_TO_PID,
19 BINDER_A_REPORT_TO_TID,
20 BINDER_A_REPORT_IS_REPLY,
21 BINDER_A_REPORT_FLAGS,
22 BINDER_A_REPORT_CODE,
23 BINDER_A_REPORT_DATA_SIZE,
24
25 __BINDER_A_REPORT_MAX,
26 BINDER_A_REPORT_MAX = (__BINDER_A_REPORT_MAX - 1)
27};
28
29enum {
30 BINDER_CMD_REPORT = 1,
31
32 __BINDER_CMD_MAX,
33 BINDER_CMD_MAX = (__BINDER_CMD_MAX - 1)
34};
35
36#define BINDER_MCGRP_REPORT "report"
37
38#endif /* _LINUX_ANDROID_BINDER_NETLINK_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/aspeed-video.h+7
...@@ -8,6 +8,13 @@...@@ -8,6 +8,13 @@
88
9#include <linux/v4l2-controls.h>9#include <linux/v4l2-controls.h>
1010
11/* aspeed video's input types */
12enum aspeed_video_input {
13 VIDEO_INPUT_VGA = 0,
14 VIDEO_INPUT_GFX,
15 VIDEO_INPUT_MAX
16};
17
11#define V4L2_CID_ASPEED_HQ_MODE (V4L2_CID_USER_ASPEED_BASE + 1)18#define V4L2_CID_ASPEED_HQ_MODE (V4L2_CID_USER_ASPEED_BASE + 1)
12#define V4L2_CID_ASPEED_HQ_JPEG_QUALITY (V4L2_CID_USER_ASPEED_BASE + 2)19#define V4L2_CID_ASPEED_HQ_JPEG_QUALITY (V4L2_CID_USER_ASPEED_BASE + 2)
1320
lib/libc/include/any-linux-any/linux/audit.h+2
...@@ -148,6 +148,8 @@...@@ -148,6 +148,8 @@
148#define AUDIT_IPE_POLICY_LOAD 1422 /* IPE policy load */148#define AUDIT_IPE_POLICY_LOAD 1422 /* IPE policy load */
149#define AUDIT_LANDLOCK_ACCESS 1423 /* Landlock denial */149#define AUDIT_LANDLOCK_ACCESS 1423 /* Landlock denial */
150#define AUDIT_LANDLOCK_DOMAIN 1424 /* Landlock domain status */150#define AUDIT_LANDLOCK_DOMAIN 1424 /* Landlock domain status */
151#define AUDIT_MAC_TASK_CONTEXTS 1425 /* Multiple LSM task contexts */
152#define AUDIT_MAC_OBJ_CONTEXTS 1426 /* Multiple LSM objext contexts */
151153
152#define AUDIT_FIRST_KERN_ANOM_MSG 1700154#define AUDIT_FIRST_KERN_ANOM_MSG 1700
153#define AUDIT_LAST_KERN_ANOM_MSG 1799155#define AUDIT_LAST_KERN_ANOM_MSG 1799
lib/libc/include/any-linux-any/linux/blktrace_api.h+53-2
...@@ -26,11 +26,22 @@ enum blktrace_cat {...@@ -26,11 +26,22 @@ enum blktrace_cat {
26 BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */26 BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */
27 BLK_TC_FUA = 1 << 15, /* fua requests */27 BLK_TC_FUA = 1 << 15, /* fua requests */
2828
29 BLK_TC_END = 1 << 15, /* we've run out of bits! */29 BLK_TC_END_V1 = 1 << 15, /* we've run out of bits! */
30
31 BLK_TC_ZONE_APPEND = 1ull << 16, /* zone append */
32 BLK_TC_ZONE_RESET = 1ull << 17, /* zone reset */
33 BLK_TC_ZONE_RESET_ALL = 1ull << 18, /* zone reset all */
34 BLK_TC_ZONE_FINISH = 1ull << 19, /* zone finish */
35 BLK_TC_ZONE_OPEN = 1ull << 20, /* zone open */
36 BLK_TC_ZONE_CLOSE = 1ull << 21, /* zone close */
37
38 BLK_TC_WRITE_ZEROES = 1ull << 22, /* write-zeroes */
39
40 BLK_TC_END_V2 = 1ull << 22,
30};41};
3142
32#define BLK_TC_SHIFT (16)43#define BLK_TC_SHIFT (16)
33#define BLK_TC_ACT(act) ((act) << BLK_TC_SHIFT)44#define BLK_TC_ACT(act) ((u64)(act) << BLK_TC_SHIFT)
3445
35/*46/*
36 * Basic trace actions47 * Basic trace actions
...@@ -53,6 +64,8 @@ enum blktrace_act {...@@ -53,6 +64,8 @@ enum blktrace_act {
53 __BLK_TA_REMAP, /* bio was remapped */64 __BLK_TA_REMAP, /* bio was remapped */
54 __BLK_TA_ABORT, /* request aborted */65 __BLK_TA_ABORT, /* request aborted */
55 __BLK_TA_DRV_DATA, /* driver-specific binary data */66 __BLK_TA_DRV_DATA, /* driver-specific binary data */
67 __BLK_TA_ZONE_PLUG, /* zone write plug was plugged */
68 __BLK_TA_ZONE_UNPLUG, /* zone write plug was unplugged */
56 __BLK_TA_CGROUP = 1 << 8, /* from a cgroup*/69 __BLK_TA_CGROUP = 1 << 8, /* from a cgroup*/
57};70};
5871
...@@ -88,12 +101,19 @@ enum blktrace_notify {...@@ -88,12 +101,19 @@ enum blktrace_notify {
88#define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE))101#define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE))
89#define BLK_TA_DRV_DATA (__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA))102#define BLK_TA_DRV_DATA (__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA))
90103
104#define BLK_TA_ZONE_APPEND (__BLK_TA_COMPLETE |\
105 BLK_TC_ACT(BLK_TC_ZONE_APPEND))
106#define BLK_TA_ZONE_PLUG (__BLK_TA_ZONE_PLUG | BLK_TC_ACT(BLK_TC_QUEUE))
107#define BLK_TA_ZONE_UNPLUG (__BLK_TA_ZONE_UNPLUG |\
108 BLK_TC_ACT(BLK_TC_QUEUE))
109
91#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))110#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
92#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))111#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
93#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))112#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))
94113
95#define BLK_IO_TRACE_MAGIC 0x65617400114#define BLK_IO_TRACE_MAGIC 0x65617400
96#define BLK_IO_TRACE_VERSION 0x07115#define BLK_IO_TRACE_VERSION 0x07
116#define BLK_IO_TRACE2_VERSION 0x08
97117
98/*118/*
99 * The trace itself119 * The trace itself
...@@ -113,6 +133,21 @@ struct blk_io_trace {...@@ -113,6 +133,21 @@ struct blk_io_trace {
113 /* cgroup id will be stored here if exists */133 /* cgroup id will be stored here if exists */
114};134};
115135
136struct blk_io_trace2 {
137 __u32 magic; /* MAGIC << 8 | BLK_IO_TRACE2_VERSION */
138 __u32 sequence; /* event number */
139 __u64 time; /* in nanoseconds */
140 __u64 sector; /* disk offset */
141 __u32 bytes; /* transfer length */
142 __u32 pid; /* who did it */
143 __u64 action; /* what happened */
144 __u32 device; /* device number */
145 __u32 cpu; /* on what cpu did it happen */
146 __u16 error; /* completion error */
147 __u16 pdu_len; /* length of data after this trace */
148 __u8 pad[12];
149 /* cgroup id will be stored here if it exists */
150};
116/*151/*
117 * The remap event152 * The remap event
118 */153 */
...@@ -129,6 +164,7 @@ enum {...@@ -129,6 +164,7 @@ enum {
129};164};
130165
131#define BLKTRACE_BDEV_SIZE 32166#define BLKTRACE_BDEV_SIZE 32
167#define BLKTRACE_BDEV_SIZE2 64
132168
133/*169/*
134 * User setup structure passed with BLKTRACESETUP170 * User setup structure passed with BLKTRACESETUP
...@@ -143,4 +179,19 @@ struct blk_user_trace_setup {...@@ -143,4 +179,19 @@ struct blk_user_trace_setup {
143 __u32 pid;179 __u32 pid;
144};180};
145181
182/*
183 * User setup structure passed with BLKTRACESETUP2
184 */
185struct blk_user_trace_setup2 {
186 char name[BLKTRACE_BDEV_SIZE2]; /* output */
187 __u64 act_mask; /* input */
188 __u32 buf_size; /* input */
189 __u32 buf_nr; /* input */
190 __u64 start_lba;
191 __u64 end_lba;
192 __u32 pid;
193 __u32 flags; /* currently unused */
194 __u64 reserved[11];
195};
196
146#endif /* BLKTRACE_H */197#endif /* BLKTRACE_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/blkzoned.h+43-5
...@@ -48,6 +48,8 @@ enum blk_zone_type {...@@ -48,6 +48,8 @@ enum blk_zone_type {
48 * FINISH ZONE command.48 * FINISH ZONE command.
49 * @BLK_ZONE_COND_READONLY: The zone is read-only.49 * @BLK_ZONE_COND_READONLY: The zone is read-only.
50 * @BLK_ZONE_COND_OFFLINE: The zone is offline (sectors cannot be read/written).50 * @BLK_ZONE_COND_OFFLINE: The zone is offline (sectors cannot be read/written).
51 * @BLK_ZONE_COND_ACTIVE: The zone is either implicitly open, explicitly open,
52 * or closed.
51 *53 *
52 * The Zone Condition state machine in the ZBC/ZAC standards maps the above54 * The Zone Condition state machine in the ZBC/ZAC standards maps the above
53 * deinitions as:55 * deinitions as:
...@@ -61,6 +63,13 @@ enum blk_zone_type {...@@ -61,6 +63,13 @@ enum blk_zone_type {
61 *63 *
62 * Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should64 * Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should
63 * be considered invalid.65 * be considered invalid.
66 *
67 * The condition BLK_ZONE_COND_ACTIVE is used only with cached zone reports.
68 * It is used to report any of the BLK_ZONE_COND_IMP_OPEN,
69 * BLK_ZONE_COND_EXP_OPEN and BLK_ZONE_COND_CLOSED conditions. Conversely, a
70 * regular zone report will never report a zone condition using
71 * BLK_ZONE_COND_ACTIVE and instead use the conditions BLK_ZONE_COND_IMP_OPEN,
72 * BLK_ZONE_COND_EXP_OPEN or BLK_ZONE_COND_CLOSED as reported by the device.
64 */73 */
65enum blk_zone_cond {74enum blk_zone_cond {
66 BLK_ZONE_COND_NOT_WP = 0x0,75 BLK_ZONE_COND_NOT_WP = 0x0,
...@@ -71,15 +80,29 @@ enum blk_zone_cond {...@@ -71,15 +80,29 @@ enum blk_zone_cond {
71 BLK_ZONE_COND_READONLY = 0xD,80 BLK_ZONE_COND_READONLY = 0xD,
72 BLK_ZONE_COND_FULL = 0xE,81 BLK_ZONE_COND_FULL = 0xE,
73 BLK_ZONE_COND_OFFLINE = 0xF,82 BLK_ZONE_COND_OFFLINE = 0xF,
83
84 BLK_ZONE_COND_ACTIVE = 0xFF, /* added in Linux 6.19 */
85#define BLK_ZONE_COND_ACTIVE BLK_ZONE_COND_ACTIVE
74};86};
7587
76/**88/**
77 * enum blk_zone_report_flags - Feature flags of reported zone descriptors.89 * enum blk_zone_report_flags - Feature flags of reported zone descriptors.
78 *90 *
79 * @BLK_ZONE_REP_CAPACITY: Zone descriptor has capacity field.91 * @BLK_ZONE_REP_CAPACITY: Output only. Indicates that zone descriptors in a
92 * zone report have a valid capacity field.
93 * @BLK_ZONE_REP_CACHED: Input only. Indicates that the zone report should be
94 * generated using cached zone information. In this case,
95 * the implicit open, explicit open and closed zone
96 * conditions are all reported with the
97 * BLK_ZONE_COND_ACTIVE condition.
80 */98 */
81enum blk_zone_report_flags {99enum blk_zone_report_flags {
82 BLK_ZONE_REP_CAPACITY = (1 << 0),100 /* Output flags */
101 BLK_ZONE_REP_CAPACITY = (1U << 0),
102
103 /* Input flags */
104 BLK_ZONE_REP_CACHED = (1U << 31), /* added in Linux 6.19 */
105#define BLK_ZONE_REP_CACHED BLK_ZONE_REP_CACHED
83};106};
84107
85/**108/**
...@@ -122,6 +145,10 @@ struct blk_zone {...@@ -122,6 +145,10 @@ struct blk_zone {
122 * @sector: starting sector of report145 * @sector: starting sector of report
123 * @nr_zones: IN maximum / OUT actual146 * @nr_zones: IN maximum / OUT actual
124 * @flags: one or more flags as defined by enum blk_zone_report_flags.147 * @flags: one or more flags as defined by enum blk_zone_report_flags.
148 * @flags: one or more flags as defined by enum blk_zone_report_flags.
149 * With BLKREPORTZONE, this field is ignored as an input and is valid
150 * only as an output. Using BLKREPORTZONEV2, this field is used as both
151 * input and output.
125 * @zones: Space to hold @nr_zones @zones entries on reply.152 * @zones: Space to hold @nr_zones @zones entries on reply.
126 *153 *
127 * The array of at most @nr_zones must follow this structure in memory.154 * The array of at most @nr_zones must follow this structure in memory.
...@@ -148,9 +175,19 @@ struct blk_zone_range {...@@ -148,9 +175,19 @@ struct blk_zone_range {
148/**175/**
149 * Zoned block device ioctl's:176 * Zoned block device ioctl's:
150 *177 *
151 * @BLKREPORTZONE: Get zone information. Takes a zone report as argument.178 * @BLKREPORTZONE: Get zone information from a zoned device. Takes a zone report
152 * The zone report will start from the zone containing the179 * as argument. The zone report will start from the zone
153 * sector specified in the report request structure.180 * containing the sector specified in struct blk_zone_report.
181 * The flags field of struct blk_zone_report is used as an
182 * output only and ignored as an input.
183 * DEPRECATED, use BLKREPORTZONEV2 instead.
184 * @BLKREPORTZONEV2: Same as @BLKREPORTZONE but uses the flags field of
185 * struct blk_zone_report as an input, allowing to get a zone
186 * report using cached zone information if the flag
187 * BLK_ZONE_REP_CACHED is set. In such case, the zone report
188 * may include zones with the condition @BLK_ZONE_COND_ACTIVE
189 * (c.f. the description of this condition above for more
190 * details).
154 * @BLKRESETZONE: Reset the write pointer of the zones in the specified191 * @BLKRESETZONE: Reset the write pointer of the zones in the specified
155 * sector range. The sector range must be zone aligned.192 * sector range. The sector range must be zone aligned.
156 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.193 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.
...@@ -169,5 +206,6 @@ struct blk_zone_range {...@@ -169,5 +206,6 @@ struct blk_zone_range {
169#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range)206#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range)
170#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range)207#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range)
171#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)208#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)
209#define BLKREPORTZONEV2 _IOWR(0x12, 142, struct blk_zone_report)
172210
173#endif /* _BLKZONED_H */211#endif /* _BLKZONED_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/bpf.h+54-5
...@@ -1026,6 +1026,7 @@ enum bpf_map_type {...@@ -1026,6 +1026,7 @@ enum bpf_map_type {
1026 BPF_MAP_TYPE_USER_RINGBUF,1026 BPF_MAP_TYPE_USER_RINGBUF,
1027 BPF_MAP_TYPE_CGRP_STORAGE,1027 BPF_MAP_TYPE_CGRP_STORAGE,
1028 BPF_MAP_TYPE_ARENA,1028 BPF_MAP_TYPE_ARENA,
1029 BPF_MAP_TYPE_INSN_ARRAY,
1029 __MAX_BPF_MAP_TYPE1030 __MAX_BPF_MAP_TYPE
1030};1031};
10311032
...@@ -1430,6 +1431,9 @@ enum {...@@ -1430,6 +1431,9 @@ enum {
14301431
1431/* Do not translate kernel bpf_arena pointers to user pointers */1432/* Do not translate kernel bpf_arena pointers to user pointers */
1432 BPF_F_NO_USER_CONV = (1U << 18),1433 BPF_F_NO_USER_CONV = (1U << 18),
1434
1435/* Enable BPF ringbuf overwrite mode */
1436 BPF_F_RB_OVERWRITE = (1U << 19),
1433};1437};
14341438
1435/* Flags for BPF_PROG_QUERY. */1439/* Flags for BPF_PROG_QUERY. */
...@@ -1522,6 +1526,12 @@ union bpf_attr {...@@ -1522,6 +1526,12 @@ union bpf_attr {
1522 * If provided, map_flags should have BPF_F_TOKEN_FD flag set.1526 * If provided, map_flags should have BPF_F_TOKEN_FD flag set.
1523 */1527 */
1524 __s32 map_token_fd;1528 __s32 map_token_fd;
1529
1530 /* Hash of the program that has exclusive access to the map.
1531 */
1532 __aligned_u64 excl_prog_hash;
1533 /* Size of the passed excl_prog_hash. */
1534 __u32 excl_prog_hash_size;
1525 };1535 };
15261536
1527 struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */1537 struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */
...@@ -1605,6 +1615,16 @@ union bpf_attr {...@@ -1605,6 +1615,16 @@ union bpf_attr {
1605 * continuous.1615 * continuous.
1606 */1616 */
1607 __u32 fd_array_cnt;1617 __u32 fd_array_cnt;
1618 /* Pointer to a buffer containing the signature of the BPF
1619 * program.
1620 */
1621 __aligned_u64 signature;
1622 /* Size of the signature buffer in bytes. */
1623 __u32 signature_size;
1624 /* ID of the kernel keyring to be used for signature
1625 * verification.
1626 */
1627 __s32 keyring_id;
1608 };1628 };
16091629
1610 struct { /* anonymous struct used by BPF_OBJ_* commands */1630 struct { /* anonymous struct used by BPF_OBJ_* commands */
...@@ -4875,7 +4895,7 @@ union bpf_attr {...@@ -4875,7 +4895,7 @@ union bpf_attr {
4875 *4895 *
4876 * **-ENOENT** if the bpf_local_storage cannot be found.4896 * **-ENOENT** if the bpf_local_storage cannot be found.
4877 *4897 *
4878 * long bpf_d_path(struct path *path, char *buf, u32 sz)4898 * long bpf_d_path(const struct path *path, char *buf, u32 sz)
4879 * Description4899 * Description
4880 * Return full path for given **struct path** object, which4900 * Return full path for given **struct path** object, which
4881 * needs to be the kernel BTF *path* object. The path is4901 * needs to be the kernel BTF *path* object. The path is
...@@ -5602,7 +5622,7 @@ union bpf_attr {...@@ -5602,7 +5622,7 @@ union bpf_attr {
5602 * Return5622 * Return
5603 * *sk* if casting is valid, or **NULL** otherwise.5623 * *sk* if casting is valid, or **NULL** otherwise.
5604 *5624 *
5605 * long bpf_dynptr_from_mem(void *data, u32 size, u64 flags, struct bpf_dynptr *ptr)5625 * long bpf_dynptr_from_mem(void *data, u64 size, u64 flags, struct bpf_dynptr *ptr)
5606 * Description5626 * Description
5607 * Get a dynptr to local memory *data*.5627 * Get a dynptr to local memory *data*.
5608 *5628 *
...@@ -5645,7 +5665,7 @@ union bpf_attr {...@@ -5645,7 +5665,7 @@ union bpf_attr {
5645 * Return5665 * Return
5646 * Nothing. Always succeeds.5666 * Nothing. Always succeeds.
5647 *5667 *
5648 * long bpf_dynptr_read(void *dst, u32 len, const struct bpf_dynptr *src, u32 offset, u64 flags)5668 * long bpf_dynptr_read(void *dst, u64 len, const struct bpf_dynptr *src, u64 offset, u64 flags)
5649 * Description5669 * Description
5650 * Read *len* bytes from *src* into *dst*, starting from *offset*5670 * Read *len* bytes from *src* into *dst*, starting from *offset*
5651 * into *src*.5671 * into *src*.
...@@ -5655,7 +5675,7 @@ union bpf_attr {...@@ -5655,7 +5675,7 @@ union bpf_attr {
5655 * of *src*'s data, -EINVAL if *src* is an invalid dynptr or if5675 * of *src*'s data, -EINVAL if *src* is an invalid dynptr or if
5656 * *flags* is not 0.5676 * *flags* is not 0.
5657 *5677 *
5658 * long bpf_dynptr_write(const struct bpf_dynptr *dst, u32 offset, void *src, u32 len, u64 flags)5678 * long bpf_dynptr_write(const struct bpf_dynptr *dst, u64 offset, void *src, u64 len, u64 flags)
5659 * Description5679 * Description
5660 * Write *len* bytes from *src* into *dst*, starting from *offset*5680 * Write *len* bytes from *src* into *dst*, starting from *offset*
5661 * into *dst*.5681 * into *dst*.
...@@ -5676,7 +5696,7 @@ union bpf_attr {...@@ -5676,7 +5696,7 @@ union bpf_attr {
5676 * is a read-only dynptr or if *flags* is not correct. For skb-type dynptrs,5696 * is a read-only dynptr or if *flags* is not correct. For skb-type dynptrs,
5677 * other errors correspond to errors returned by **bpf_skb_store_bytes**\ ().5697 * other errors correspond to errors returned by **bpf_skb_store_bytes**\ ().
5678 *5698 *
5679 * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u32 offset, u32 len)5699 * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u64 offset, u64 len)
5680 * Description5700 * Description
5681 * Get a pointer to the underlying dynptr data.5701 * Get a pointer to the underlying dynptr data.
5682 *5702 *
...@@ -6215,6 +6235,7 @@ enum {...@@ -6215,6 +6235,7 @@ enum {
6215 BPF_RB_RING_SIZE = 1,6235 BPF_RB_RING_SIZE = 1,
6216 BPF_RB_CONS_POS = 2,6236 BPF_RB_CONS_POS = 2,
6217 BPF_RB_PROD_POS = 3,6237 BPF_RB_PROD_POS = 3,
6238 BPF_RB_OVERWRITE_POS = 4,
6218};6239};
62196240
6220/* BPF ring buffer constants */6241/* BPF ring buffer constants */
...@@ -6666,6 +6687,8 @@ struct bpf_map_info {...@@ -6666,6 +6687,8 @@ struct bpf_map_info {
6666 __u32 btf_value_type_id;6687 __u32 btf_value_type_id;
6667 __u32 btf_vmlinux_id;6688 __u32 btf_vmlinux_id;
6668 __u64 map_extra;6689 __u64 map_extra;
6690 __aligned_u64 hash;
6691 __u32 hash_size;
6669} __attribute__((aligned(8)));6692} __attribute__((aligned(8)));
66706693
6671struct bpf_btf_info {6694struct bpf_btf_info {
...@@ -7182,6 +7205,8 @@ enum {...@@ -7182,6 +7205,8 @@ enum {
7182 TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */7205 TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */
7183 TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */7206 TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */
7184 SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */7207 SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */
7208 SK_BPF_BYPASS_PROT_MEM = 1010, /* Get or Set sk->sk_bypass_prot_mem */
7209
7185};7210};
71867211
7187enum {7212enum {
...@@ -7418,6 +7443,10 @@ struct bpf_timer {...@@ -7418,6 +7443,10 @@ struct bpf_timer {
7418 __u64 __opaque[2];7443 __u64 __opaque[2];
7419} __attribute__((aligned(8)));7444} __attribute__((aligned(8)));
74207445
7446struct bpf_task_work {
7447 __u64 __opaque;
7448} __attribute__((aligned(8)));
7449
7421struct bpf_wq {7450struct bpf_wq {
7422 __u64 __opaque[2];7451 __u64 __opaque[2];
7423} __attribute__((aligned(8)));7452} __attribute__((aligned(8)));
...@@ -7623,4 +7652,24 @@ enum bpf_kfunc_flags {...@@ -7623,4 +7652,24 @@ enum bpf_kfunc_flags {
7623 BPF_F_PAD_ZEROS = (1ULL << 0),7652 BPF_F_PAD_ZEROS = (1ULL << 0),
7624};7653};
76257654
7655/*
7656 * Values of a BPF_MAP_TYPE_INSN_ARRAY entry must be of this type.
7657 *
7658 * Before the map is used the orig_off field should point to an
7659 * instruction inside the program being loaded. The other fields
7660 * must be set to 0.
7661 *
7662 * After the program is loaded, the xlated_off will be adjusted
7663 * by the verifier to point to the index of the original instruction
7664 * in the xlated program. If the instruction is deleted, it will
7665 * be set to (u32)-1. The jitted_off will be set to the corresponding
7666 * offset in the jitted image of the program.
7667 */
7668struct bpf_insn_array_value {
7669 __u32 orig_off;
7670 __u32 xlated_off;
7671 __u32 jitted_off;
7672 __u32 :32;
7673};
7674
7626#endif /* __LINUX_BPF_H__ */7675#endif /* __LINUX_BPF_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/btrfs.h+9
...@@ -1097,6 +1097,12 @@ enum btrfs_err_code {...@@ -1097,6 +1097,12 @@ enum btrfs_err_code {
1097 BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,1097 BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
1098};1098};
10991099
1100/* Flags for IOC_SHUTDOWN, must match XFS_FSOP_GOING_FLAGS_* flags. */
1101#define BTRFS_SHUTDOWN_FLAGS_DEFAULT 0x0
1102#define BTRFS_SHUTDOWN_FLAGS_LOGFLUSH 0x1
1103#define BTRFS_SHUTDOWN_FLAGS_NOLOGFLUSH 0x2
1104#define BTRFS_SHUTDOWN_FLAGS_LAST 0x3
1105
1100#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \1106#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
1101 struct btrfs_ioctl_vol_args)1107 struct btrfs_ioctl_vol_args)
1102#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \1108#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
...@@ -1218,6 +1224,9 @@ enum btrfs_err_code {...@@ -1218,6 +1224,9 @@ enum btrfs_err_code {
1218#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \1224#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \
1219 struct btrfs_ioctl_subvol_wait)1225 struct btrfs_ioctl_subvol_wait)
12201226
1227/* Shutdown ioctl should follow XFS's interfaces, thus not using btrfs magic. */
1228#define BTRFS_IOC_SHUTDOWN _IOR('X', 125, __u32)
1229
1221#ifdef __cplusplus1230#ifdef __cplusplus
1222}1231}
1223#endif1232#endif
lib/libc/include/any-linux-any/linux/can/netlink.h+41-7
...@@ -5,6 +5,7 @@...@@ -5,6 +5,7 @@
5 * Definitions for the CAN netlink interface5 * Definitions for the CAN netlink interface
6 *6 *
7 * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>7 * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
8 * Copyright (c) 2021-2025 Vincent Mailhol <mailhol@kernel.org>
8 *9 *
9 * This program is free software; you can redistribute it and/or modify10 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the version 2 of the GNU General Public License11 * it under the terms of the version 2 of the GNU General Public License
...@@ -101,8 +102,13 @@ struct can_ctrlmode {...@@ -101,8 +102,13 @@ struct can_ctrlmode {
101#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */102#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */
102#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */103#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */
103#define CAN_CTRLMODE_CC_LEN8_DLC 0x100 /* Classic CAN DLC option */104#define CAN_CTRLMODE_CC_LEN8_DLC 0x100 /* Classic CAN DLC option */
104#define CAN_CTRLMODE_TDC_AUTO 0x200 /* CAN transiver automatically calculates TDCV */105#define CAN_CTRLMODE_TDC_AUTO 0x200 /* FD transceiver automatically calculates TDCV */
105#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* TDCV is manually set up by user */106#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* FD TDCV is manually set up by user */
107#define CAN_CTRLMODE_RESTRICTED 0x800 /* Restricted operation mode */
108#define CAN_CTRLMODE_XL 0x1000 /* CAN XL mode */
109#define CAN_CTRLMODE_XL_TDC_AUTO 0x2000 /* XL transceiver automatically calculates TDCV */
110#define CAN_CTRLMODE_XL_TDC_MANUAL 0x4000 /* XL TDCV is manually set up by user */
111#define CAN_CTRLMODE_XL_TMS 0x8000 /* Transceiver Mode Switching */
106112
107/*113/*
108 * CAN device statistics114 * CAN device statistics
...@@ -129,15 +135,20 @@ enum {...@@ -129,15 +135,20 @@ enum {
129 IFLA_CAN_RESTART_MS,135 IFLA_CAN_RESTART_MS,
130 IFLA_CAN_RESTART,136 IFLA_CAN_RESTART,
131 IFLA_CAN_BERR_COUNTER,137 IFLA_CAN_BERR_COUNTER,
132 IFLA_CAN_DATA_BITTIMING,138 IFLA_CAN_DATA_BITTIMING, /* FD */
133 IFLA_CAN_DATA_BITTIMING_CONST,139 IFLA_CAN_DATA_BITTIMING_CONST, /* FD */
134 IFLA_CAN_TERMINATION,140 IFLA_CAN_TERMINATION,
135 IFLA_CAN_TERMINATION_CONST,141 IFLA_CAN_TERMINATION_CONST,
136 IFLA_CAN_BITRATE_CONST,142 IFLA_CAN_BITRATE_CONST,
137 IFLA_CAN_DATA_BITRATE_CONST,143 IFLA_CAN_DATA_BITRATE_CONST, /* FD */
138 IFLA_CAN_BITRATE_MAX,144 IFLA_CAN_BITRATE_MAX,
139 IFLA_CAN_TDC,145 IFLA_CAN_TDC, /* FD */
140 IFLA_CAN_CTRLMODE_EXT,146 IFLA_CAN_CTRLMODE_EXT,
147 IFLA_CAN_XL_DATA_BITTIMING,
148 IFLA_CAN_XL_DATA_BITTIMING_CONST,
149 IFLA_CAN_XL_DATA_BITRATE_CONST,
150 IFLA_CAN_XL_TDC,
151 IFLA_CAN_XL_PWM,
141152
142 /* add new constants above here */153 /* add new constants above here */
143 __IFLA_CAN_MAX,154 __IFLA_CAN_MAX,
...@@ -145,7 +156,7 @@ enum {...@@ -145,7 +156,7 @@ enum {
145};156};
146157
147/*158/*
148 * CAN FD Transmitter Delay Compensation (TDC)159 * CAN FD/XL Transmitter Delay Compensation (TDC)
149 *160 *
150 * Please refer to struct can_tdc_const and can_tdc in161 * Please refer to struct can_tdc_const and can_tdc in
151 * include/linux/can/bittiming.h for further details.162 * include/linux/can/bittiming.h for further details.
...@@ -179,6 +190,29 @@ enum {...@@ -179,6 +190,29 @@ enum {
179 IFLA_CAN_CTRLMODE_MAX = __IFLA_CAN_CTRLMODE - 1190 IFLA_CAN_CTRLMODE_MAX = __IFLA_CAN_CTRLMODE - 1
180};191};
181192
193/*
194 * CAN FD/XL Pulse-Width Modulation (PWM)
195 *
196 * Please refer to struct can_pwm_const and can_pwm in
197 * include/linux/can/bittiming.h for further details.
198 */
199enum {
200 IFLA_CAN_PWM_UNSPEC,
201 IFLA_CAN_PWM_PWMS_MIN, /* u32 */
202 IFLA_CAN_PWM_PWMS_MAX, /* u32 */
203 IFLA_CAN_PWM_PWML_MIN, /* u32 */
204 IFLA_CAN_PWM_PWML_MAX, /* u32 */
205 IFLA_CAN_PWM_PWMO_MIN, /* u32 */
206 IFLA_CAN_PWM_PWMO_MAX, /* u32 */
207 IFLA_CAN_PWM_PWMS, /* u32 */
208 IFLA_CAN_PWM_PWML, /* u32 */
209 IFLA_CAN_PWM_PWMO, /* u32 */
210
211 /* add new constants above here */
212 __IFLA_CAN_PWM,
213 IFLA_CAN_PWM_MAX = __IFLA_CAN_PWM - 1
214};
215
182/* u16 termination range: 1..65535 Ohms */216/* u16 termination range: 1..65535 Ohms */
183#define CAN_TERMINATION_DISABLED 0217#define CAN_TERMINATION_DISABLED 0
184218
lib/libc/include/any-linux-any/linux/comedi.h+1-1
...@@ -640,7 +640,7 @@ struct comedi_chaninfo {...@@ -640,7 +640,7 @@ struct comedi_chaninfo {
640640
641/**641/**
642 * struct comedi_rangeinfo - used to retrieve the range table for a channel642 * struct comedi_rangeinfo - used to retrieve the range table for a channel
643 * @range_type: Encodes subdevice index (bits 27:24), channel index643 * @range_type: Encodes subdevice index (bits 31:24), channel index
644 * (bits 23:16) and range table length (bits 15:0).644 * (bits 23:16) and range table length (bits 15:0).
645 * @range_ptr: Pointer to array of @struct comedi_krange to be filled645 * @range_ptr: Pointer to array of @struct comedi_krange to be filled
646 * in with the range table for the channel or subdevice.646 * in with the range table for the channel or subdevice.
lib/libc/include/any-linux-any/linux/dev_energymodel.h created+82
...@@ -0,0 +1,82 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/dev-energymodel.yaml */
4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
6
7#ifndef _LINUX_DEV_ENERGYMODEL_H
8#define _LINUX_DEV_ENERGYMODEL_H
9
10#define DEV_ENERGYMODEL_FAMILY_NAME "dev-energymodel"
11#define DEV_ENERGYMODEL_FAMILY_VERSION 1
12
13/**
14 * enum dev_energymodel_perf_state_flags
15 * @DEV_ENERGYMODEL_PERF_STATE_FLAGS_PERF_STATE_INEFFICIENT: The performance
16 * state is inefficient. There is in this perf-domain, another performance
17 * state with a higher frequency but a lower or equal power cost.
18 */
19enum dev_energymodel_perf_state_flags {
20 DEV_ENERGYMODEL_PERF_STATE_FLAGS_PERF_STATE_INEFFICIENT = 1,
21};
22
23/**
24 * enum dev_energymodel_perf_domain_flags
25 * @DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_MICROWATTS: The power values
26 * are in micro-Watts or some other scale.
27 * @DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_SKIP_INEFFICIENCIES: Skip
28 * inefficient states when estimating energy consumption.
29 * @DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_ARTIFICIAL: The power values
30 * are artificial and might be created by platform missing real power
31 * information.
32 */
33enum dev_energymodel_perf_domain_flags {
34 DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_MICROWATTS = 1,
35 DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_SKIP_INEFFICIENCIES = 2,
36 DEV_ENERGYMODEL_PERF_DOMAIN_FLAGS_PERF_DOMAIN_ARTIFICIAL = 4,
37};
38
39enum {
40 DEV_ENERGYMODEL_A_PERF_DOMAIN_PAD = 1,
41 DEV_ENERGYMODEL_A_PERF_DOMAIN_PERF_DOMAIN_ID,
42 DEV_ENERGYMODEL_A_PERF_DOMAIN_FLAGS,
43 DEV_ENERGYMODEL_A_PERF_DOMAIN_CPUS,
44
45 __DEV_ENERGYMODEL_A_PERF_DOMAIN_MAX,
46 DEV_ENERGYMODEL_A_PERF_DOMAIN_MAX = (__DEV_ENERGYMODEL_A_PERF_DOMAIN_MAX - 1)
47};
48
49enum {
50 DEV_ENERGYMODEL_A_PERF_TABLE_PERF_DOMAIN_ID = 1,
51 DEV_ENERGYMODEL_A_PERF_TABLE_PERF_STATE,
52
53 __DEV_ENERGYMODEL_A_PERF_TABLE_MAX,
54 DEV_ENERGYMODEL_A_PERF_TABLE_MAX = (__DEV_ENERGYMODEL_A_PERF_TABLE_MAX - 1)
55};
56
57enum {
58 DEV_ENERGYMODEL_A_PERF_STATE_PAD = 1,
59 DEV_ENERGYMODEL_A_PERF_STATE_PERFORMANCE,
60 DEV_ENERGYMODEL_A_PERF_STATE_FREQUENCY,
61 DEV_ENERGYMODEL_A_PERF_STATE_POWER,
62 DEV_ENERGYMODEL_A_PERF_STATE_COST,
63 DEV_ENERGYMODEL_A_PERF_STATE_FLAGS,
64
65 __DEV_ENERGYMODEL_A_PERF_STATE_MAX,
66 DEV_ENERGYMODEL_A_PERF_STATE_MAX = (__DEV_ENERGYMODEL_A_PERF_STATE_MAX - 1)
67};
68
69enum {
70 DEV_ENERGYMODEL_CMD_GET_PERF_DOMAINS = 1,
71 DEV_ENERGYMODEL_CMD_GET_PERF_TABLE,
72 DEV_ENERGYMODEL_CMD_PERF_DOMAIN_CREATED,
73 DEV_ENERGYMODEL_CMD_PERF_DOMAIN_UPDATED,
74 DEV_ENERGYMODEL_CMD_PERF_DOMAIN_DELETED,
75
76 __DEV_ENERGYMODEL_CMD_MAX,
77 DEV_ENERGYMODEL_CMD_MAX = (__DEV_ENERGYMODEL_CMD_MAX - 1)
78};
79
80#define DEV_ENERGYMODEL_MCGRP_EVENT "event"
81
82#endif /* _LINUX_DEV_ENERGYMODEL_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/devlink.h+6
...@@ -181,6 +181,7 @@ enum devlink_sb_threshold_type {...@@ -181,6 +181,7 @@ enum devlink_sb_threshold_type {
181enum devlink_eswitch_mode {181enum devlink_eswitch_mode {
182 DEVLINK_ESWITCH_MODE_LEGACY,182 DEVLINK_ESWITCH_MODE_LEGACY,
183 DEVLINK_ESWITCH_MODE_SWITCHDEV,183 DEVLINK_ESWITCH_MODE_SWITCHDEV,
184 DEVLINK_ESWITCH_MODE_SWITCHDEV_INACTIVE,
184};185};
185186
186enum devlink_eswitch_inline_mode {187enum devlink_eswitch_inline_mode {
...@@ -636,6 +637,11 @@ enum devlink_attr {...@@ -636,6 +637,11 @@ enum devlink_attr {
636637
637 DEVLINK_ATTR_RATE_TC_BWS, /* nested */638 DEVLINK_ATTR_RATE_TC_BWS, /* nested */
638639
640 DEVLINK_ATTR_HEALTH_REPORTER_BURST_PERIOD, /* u64 */
641
642 DEVLINK_ATTR_PARAM_VALUE_DEFAULT, /* dynamic */
643 DEVLINK_ATTR_PARAM_RESET_DEFAULT, /* flag */
644
639 /* Add new attributes above here, update the spec in645 /* Add new attributes above here, update the spec in
640 * Documentation/netlink/specs/devlink.yaml and re-generate646 * Documentation/netlink/specs/devlink.yaml and re-generate
641 * net/devlink/netlink_gen.c.647 * net/devlink/netlink_gen.c.
lib/libc/include/any-linux-any/linux/dpll.h+3
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/dpll.yaml */3/* Documentation/netlink/specs/dpll.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_DPLL_H7#ifndef _LINUX_DPLL_H
7#define _LINUX_DPLL_H8#define _LINUX_DPLL_H
...@@ -216,6 +217,7 @@ enum dpll_a {...@@ -216,6 +217,7 @@ enum dpll_a {
216 DPLL_A_LOCK_STATUS_ERROR,217 DPLL_A_LOCK_STATUS_ERROR,
217 DPLL_A_CLOCK_QUALITY_LEVEL,218 DPLL_A_CLOCK_QUALITY_LEVEL,
218 DPLL_A_PHASE_OFFSET_MONITOR,219 DPLL_A_PHASE_OFFSET_MONITOR,
220 DPLL_A_PHASE_OFFSET_AVG_FACTOR,
219221
220 __DPLL_A_MAX,222 __DPLL_A_MAX,
221 DPLL_A_MAX = (__DPLL_A_MAX - 1)223 DPLL_A_MAX = (__DPLL_A_MAX - 1)
...@@ -250,6 +252,7 @@ enum dpll_a_pin {...@@ -250,6 +252,7 @@ enum dpll_a_pin {
250 DPLL_A_PIN_ESYNC_FREQUENCY_SUPPORTED,252 DPLL_A_PIN_ESYNC_FREQUENCY_SUPPORTED,
251 DPLL_A_PIN_ESYNC_PULSE,253 DPLL_A_PIN_ESYNC_PULSE,
252 DPLL_A_PIN_REFERENCE_SYNC,254 DPLL_A_PIN_REFERENCE_SYNC,
255 DPLL_A_PIN_PHASE_ADJUST_GRAN,
253256
254 __DPLL_A_PIN_MAX,257 __DPLL_A_PIN_MAX,
255 DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)258 DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
lib/libc/include/any-linux-any/linux/ethtool.h+6
...@@ -2075,6 +2075,10 @@ enum ethtool_link_mode_bit_indices {...@@ -2075,6 +2075,10 @@ enum ethtool_link_mode_bit_indices {
2075 ETHTOOL_LINK_MODE_800000baseDR4_2_Full_BIT = 118,2075 ETHTOOL_LINK_MODE_800000baseDR4_2_Full_BIT = 118,
2076 ETHTOOL_LINK_MODE_800000baseSR4_Full_BIT = 119,2076 ETHTOOL_LINK_MODE_800000baseSR4_Full_BIT = 119,
2077 ETHTOOL_LINK_MODE_800000baseVR4_Full_BIT = 120,2077 ETHTOOL_LINK_MODE_800000baseVR4_Full_BIT = 120,
2078 ETHTOOL_LINK_MODE_1600000baseCR8_Full_BIT = 121,
2079 ETHTOOL_LINK_MODE_1600000baseKR8_Full_BIT = 122,
2080 ETHTOOL_LINK_MODE_1600000baseDR8_Full_BIT = 123,
2081 ETHTOOL_LINK_MODE_1600000baseDR8_2_Full_BIT = 124,
20782082
2079 /* must be last entry */2083 /* must be last entry */
2080 __ETHTOOL_LINK_MODE_MASK_NBITS2084 __ETHTOOL_LINK_MODE_MASK_NBITS
...@@ -2188,6 +2192,7 @@ enum ethtool_link_mode_bit_indices {...@@ -2188,6 +2192,7 @@ enum ethtool_link_mode_bit_indices {
2188#define SPEED_200000 2000002192#define SPEED_200000 200000
2189#define SPEED_400000 4000002193#define SPEED_400000 400000
2190#define SPEED_800000 8000002194#define SPEED_800000 800000
2195#define SPEED_1600000 1600000
21912196
2192#define SPEED_UNKNOWN -12197#define SPEED_UNKNOWN -1
21932198
...@@ -2378,6 +2383,7 @@ enum {...@@ -2378,6 +2383,7 @@ enum {
2378#define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */2383#define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */
2379#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */2384#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
2380#define RXH_GTP_TEID (1 << 8) /* teid in case of GTP */2385#define RXH_GTP_TEID (1 << 8) /* teid in case of GTP */
2386#define RXH_IP6_FL (1 << 9) /* IPv6 flow label */
2381#define RXH_DISCARD (1 << 31)2387#define RXH_DISCARD (1 << 31)
23822388
2383#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL2389#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
lib/libc/include/any-linux-any/linux/ethtool_netlink_generated.h+48
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/ethtool.yaml */3/* Documentation/netlink/specs/ethtool.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_ETHTOOL_NETLINK_GENERATED_H7#ifndef _LINUX_ETHTOOL_NETLINK_GENERATED_H
7#define _LINUX_ETHTOOL_NETLINK_GENERATED_H8#define _LINUX_ETHTOOL_NETLINK_GENERATED_H
...@@ -561,12 +562,24 @@ enum {...@@ -561,12 +562,24 @@ enum {
561 ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)562 ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)
562};563};
563564
565enum {
566 ETHTOOL_A_FEC_HIST_PAD = 1,
567 ETHTOOL_A_FEC_HIST_BIN_LOW,
568 ETHTOOL_A_FEC_HIST_BIN_HIGH,
569 ETHTOOL_A_FEC_HIST_BIN_VAL,
570 ETHTOOL_A_FEC_HIST_BIN_VAL_PER_LANE,
571
572 __ETHTOOL_A_FEC_HIST_CNT,
573 ETHTOOL_A_FEC_HIST_MAX = (__ETHTOOL_A_FEC_HIST_CNT - 1)
574};
575
564enum {576enum {
565 ETHTOOL_A_FEC_STAT_UNSPEC,577 ETHTOOL_A_FEC_STAT_UNSPEC,
566 ETHTOOL_A_FEC_STAT_PAD,578 ETHTOOL_A_FEC_STAT_PAD,
567 ETHTOOL_A_FEC_STAT_CORRECTED,579 ETHTOOL_A_FEC_STAT_CORRECTED,
568 ETHTOOL_A_FEC_STAT_UNCORR,580 ETHTOOL_A_FEC_STAT_UNCORR,
569 ETHTOOL_A_FEC_STAT_CORR_BITS,581 ETHTOOL_A_FEC_STAT_CORR_BITS,
582 ETHTOOL_A_FEC_STAT_HIST,
570583
571 __ETHTOOL_A_FEC_STAT_CNT,584 __ETHTOOL_A_FEC_STAT_CNT,
572 ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1)585 ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1)
...@@ -791,6 +804,39 @@ enum {...@@ -791,6 +804,39 @@ enum {
791 ETHTOOL_A_PSE_NTF_MAX = (__ETHTOOL_A_PSE_NTF_CNT - 1)804 ETHTOOL_A_PSE_NTF_MAX = (__ETHTOOL_A_PSE_NTF_CNT - 1)
792};805};
793806
807enum {
808 ETHTOOL_A_MSE_CAPABILITIES_MAX_AVERAGE_MSE = 1,
809 ETHTOOL_A_MSE_CAPABILITIES_MAX_PEAK_MSE,
810 ETHTOOL_A_MSE_CAPABILITIES_REFRESH_RATE_PS,
811 ETHTOOL_A_MSE_CAPABILITIES_NUM_SYMBOLS,
812
813 __ETHTOOL_A_MSE_CAPABILITIES_CNT,
814 ETHTOOL_A_MSE_CAPABILITIES_MAX = (__ETHTOOL_A_MSE_CAPABILITIES_CNT - 1)
815};
816
817enum {
818 ETHTOOL_A_MSE_SNAPSHOT_AVERAGE_MSE = 1,
819 ETHTOOL_A_MSE_SNAPSHOT_PEAK_MSE,
820 ETHTOOL_A_MSE_SNAPSHOT_WORST_PEAK_MSE,
821
822 __ETHTOOL_A_MSE_SNAPSHOT_CNT,
823 ETHTOOL_A_MSE_SNAPSHOT_MAX = (__ETHTOOL_A_MSE_SNAPSHOT_CNT - 1)
824};
825
826enum {
827 ETHTOOL_A_MSE_HEADER = 1,
828 ETHTOOL_A_MSE_CAPABILITIES,
829 ETHTOOL_A_MSE_CHANNEL_A,
830 ETHTOOL_A_MSE_CHANNEL_B,
831 ETHTOOL_A_MSE_CHANNEL_C,
832 ETHTOOL_A_MSE_CHANNEL_D,
833 ETHTOOL_A_MSE_WORST_CHANNEL,
834 ETHTOOL_A_MSE_LINK,
835
836 __ETHTOOL_A_MSE_CNT,
837 ETHTOOL_A_MSE_MAX = (__ETHTOOL_A_MSE_CNT - 1)
838};
839
794enum {840enum {
795 ETHTOOL_MSG_USER_NONE = 0,841 ETHTOOL_MSG_USER_NONE = 0,
796 ETHTOOL_MSG_STRSET_GET = 1,842 ETHTOOL_MSG_STRSET_GET = 1,
...@@ -843,6 +889,7 @@ enum {...@@ -843,6 +889,7 @@ enum {
843 ETHTOOL_MSG_RSS_SET,889 ETHTOOL_MSG_RSS_SET,
844 ETHTOOL_MSG_RSS_CREATE_ACT,890 ETHTOOL_MSG_RSS_CREATE_ACT,
845 ETHTOOL_MSG_RSS_DELETE_ACT,891 ETHTOOL_MSG_RSS_DELETE_ACT,
892 ETHTOOL_MSG_MSE_GET,
846893
847 __ETHTOOL_MSG_USER_CNT,894 __ETHTOOL_MSG_USER_CNT,
848 ETHTOOL_MSG_USER_MAX = (__ETHTOOL_MSG_USER_CNT - 1)895 ETHTOOL_MSG_USER_MAX = (__ETHTOOL_MSG_USER_CNT - 1)
...@@ -903,6 +950,7 @@ enum {...@@ -903,6 +950,7 @@ enum {
903 ETHTOOL_MSG_RSS_CREATE_ACT_REPLY,950 ETHTOOL_MSG_RSS_CREATE_ACT_REPLY,
904 ETHTOOL_MSG_RSS_CREATE_NTF,951 ETHTOOL_MSG_RSS_CREATE_NTF,
905 ETHTOOL_MSG_RSS_DELETE_NTF,952 ETHTOOL_MSG_RSS_DELETE_NTF,
953 ETHTOOL_MSG_MSE_GET_REPLY,
906954
907 __ETHTOOL_MSG_KERNEL_CNT,955 __ETHTOOL_MSG_KERNEL_CNT,
908 ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1)956 ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1)
lib/libc/include/any-linux-any/linux/ext4.h+53
...@@ -33,6 +33,8 @@...@@ -33,6 +33,8 @@
33#define EXT4_IOC_CHECKPOINT _IOW('f', 43, __u32)33#define EXT4_IOC_CHECKPOINT _IOW('f', 43, __u32)
34#define EXT4_IOC_GETFSUUID _IOR('f', 44, struct fsuuid)34#define EXT4_IOC_GETFSUUID _IOR('f', 44, struct fsuuid)
35#define EXT4_IOC_SETFSUUID _IOW('f', 44, struct fsuuid)35#define EXT4_IOC_SETFSUUID _IOW('f', 44, struct fsuuid)
36#define EXT4_IOC_GET_TUNE_SB_PARAM _IOR('f', 45, struct ext4_tune_sb_params)
37#define EXT4_IOC_SET_TUNE_SB_PARAM _IOW('f', 46, struct ext4_tune_sb_params)
3638
37#define EXT4_IOC_SHUTDOWN _IOR('X', 125, __u32)39#define EXT4_IOC_SHUTDOWN _IOR('X', 125, __u32)
3840
...@@ -108,6 +110,57 @@ struct ext4_new_group_input {...@@ -108,6 +110,57 @@ struct ext4_new_group_input {
108 __u16 unused;110 __u16 unused;
109};111};
110112
113struct ext4_tune_sb_params {
114 __u32 set_flags;
115 __u32 checkinterval;
116 __u16 errors_behavior;
117 __u16 mnt_count;
118 __u16 max_mnt_count;
119 __u16 raid_stride;
120 __u64 last_check_time;
121 __u64 reserved_blocks;
122 __u64 blocks_count;
123 __u32 default_mnt_opts;
124 __u32 reserved_uid;
125 __u32 reserved_gid;
126 __u32 raid_stripe_width;
127 __u16 encoding;
128 __u16 encoding_flags;
129 __u8 def_hash_alg;
130 __u8 pad_1;
131 __u16 pad_2;
132 __u32 feature_compat;
133 __u32 feature_incompat;
134 __u32 feature_ro_compat;
135 __u32 set_feature_compat_mask;
136 __u32 set_feature_incompat_mask;
137 __u32 set_feature_ro_compat_mask;
138 __u32 clear_feature_compat_mask;
139 __u32 clear_feature_incompat_mask;
140 __u32 clear_feature_ro_compat_mask;
141 __u8 mount_opts[64];
142 __u8 pad[68];
143};
144
145#define EXT4_TUNE_FL_ERRORS_BEHAVIOR 0x00000001
146#define EXT4_TUNE_FL_MNT_COUNT 0x00000002
147#define EXT4_TUNE_FL_MAX_MNT_COUNT 0x00000004
148#define EXT4_TUNE_FL_CHECKINTRVAL 0x00000008
149#define EXT4_TUNE_FL_LAST_CHECK_TIME 0x00000010
150#define EXT4_TUNE_FL_RESERVED_BLOCKS 0x00000020
151#define EXT4_TUNE_FL_RESERVED_UID 0x00000040
152#define EXT4_TUNE_FL_RESERVED_GID 0x00000080
153#define EXT4_TUNE_FL_DEFAULT_MNT_OPTS 0x00000100
154#define EXT4_TUNE_FL_DEF_HASH_ALG 0x00000200
155#define EXT4_TUNE_FL_RAID_STRIDE 0x00000400
156#define EXT4_TUNE_FL_RAID_STRIPE_WIDTH 0x00000800
157#define EXT4_TUNE_FL_MOUNT_OPTS 0x00001000
158#define EXT4_TUNE_FL_FEATURES 0x00002000
159#define EXT4_TUNE_FL_EDIT_FEATURES 0x00004000
160#define EXT4_TUNE_FL_FORCE_FSCK 0x00008000
161#define EXT4_TUNE_FL_ENCODING 0x00010000
162#define EXT4_TUNE_FL_ENCODING_FLAGS 0x00020000
163
111/*164/*
112 * Returned by EXT4_IOC_GET_ES_CACHE as an additional possible flag.165 * Returned by EXT4_IOC_GET_ES_CACHE as an additional possible flag.
113 * It indicates that the entry in extent status cache is for a hole.166 * It indicates that the entry in extent status cache is for a hole.
lib/libc/include/any-linux-any/linux/fb.h+1-1
...@@ -317,7 +317,7 @@ enum {...@@ -317,7 +317,7 @@ enum {
317#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */317#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */
318#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */318#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */
319#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */319#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */
320#define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */320#define FB_VBLANK_HAVE_VSYNC 0x100 /* vertical syncs can be detected */
321321
322struct fb_vblank {322struct fb_vblank {
323 __u32 flags; /* FB_VBLANK flags */323 __u32 flags; /* FB_VBLANK flags */
lib/libc/include/any-linux-any/linux/fcntl.h+13
...@@ -4,6 +4,7 @@...@@ -4,6 +4,7 @@
44
5#include <asm/fcntl.h>5#include <asm/fcntl.h>
6#include <linux/openat2.h>6#include <linux/openat2.h>
7#include <linux/types.h>
78
8#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)9#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
9#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)10#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
...@@ -79,6 +80,17 @@...@@ -79,6 +80,17 @@
79 */80 */
80#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET81#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
8182
83/* Set/Get delegations */
84#define F_GETDELEG (F_LINUX_SPECIFIC_BASE + 15)
85#define F_SETDELEG (F_LINUX_SPECIFIC_BASE + 16)
86
87/* Argument structure for F_GETDELEG and F_SETDELEG */
88struct delegation {
89 __u32 d_flags; /* Must be 0 */
90 __u16 d_type; /* F_RDLCK, F_WRLCK, F_UNLCK */
91 __u16 __pad; /* Must be 0 */
92};
93
82/*94/*
83 * Types of directory notifications that may be requested.95 * Types of directory notifications that may be requested.
84 */96 */
...@@ -111,6 +123,7 @@...@@ -111,6 +123,7 @@
111#define PIDFD_SELF_THREAD_GROUP -10001 /* Current thread group leader. */123#define PIDFD_SELF_THREAD_GROUP -10001 /* Current thread group leader. */
112124
113#define FD_PIDFS_ROOT -10002 /* Root of the pidfs filesystem */125#define FD_PIDFS_ROOT -10002 /* Root of the pidfs filesystem */
126#define FD_NSFS_ROOT -10003 /* Root of the nsfs filesystem */
114#define FD_INVALID -10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */127#define FD_INVALID -10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */
115128
116/* Generic flags for the *at(2) family of syscalls. */129/* Generic flags for the *at(2) family of syscalls. */
lib/libc/include/any-linux-any/linux/fou.h+1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/fou.yaml */3/* Documentation/netlink/specs/fou.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_FOU_H7#ifndef _LINUX_FOU_H
7#define _LINUX_FOU_H8#define _LINUX_FOU_H
lib/libc/include/any-linux-any/linux/fs.h+6-2
...@@ -294,8 +294,9 @@ struct file_attr {...@@ -294,8 +294,9 @@ struct file_attr {
294#define BLKROTATIONAL _IO(0x12,126)294#define BLKROTATIONAL _IO(0x12,126)
295#define BLKZEROOUT _IO(0x12,127)295#define BLKZEROOUT _IO(0x12,127)
296#define BLKGETDISKSEQ _IOR(0x12,128,__u64)296#define BLKGETDISKSEQ _IOR(0x12,128,__u64)
297/* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */297/* 130-136 and 142 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
298/* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */298/* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */
299#define BLKTRACESETUP2 _IOWR(0x12, 142, struct blk_user_trace_setup2)
299300
300#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */301#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
301#define FIBMAP _IO(0x00,1) /* bmap access */302#define FIBMAP _IO(0x00,1) /* bmap access */
...@@ -426,10 +427,13 @@ typedef int __bitwise __kernel_rwf_t;...@@ -426,10 +427,13 @@ typedef int __bitwise __kernel_rwf_t;
426/* buffered IO that drops the cache after reading or writing data */427/* buffered IO that drops the cache after reading or writing data */
427#define RWF_DONTCACHE ((__kernel_rwf_t)0x00000080)428#define RWF_DONTCACHE ((__kernel_rwf_t)0x00000080)
428429
430/* prevent pipe and socket writes from raising SIGPIPE */
431#define RWF_NOSIGNAL ((__kernel_rwf_t)0x00000100)
432
429/* mask of flags supported by the kernel */433/* mask of flags supported by the kernel */
430#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\434#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
431 RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\435 RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\
432 RWF_DONTCACHE)436 RWF_DONTCACHE | RWF_NOSIGNAL)
433437
434#define PROCFS_IOCTL_MAGIC 'f'438#define PROCFS_IOCTL_MAGIC 'f'
435439
lib/libc/include/any-linux-any/linux/fuse.h+20-2
...@@ -235,6 +235,11 @@...@@ -235,6 +235,11 @@
235 *235 *
236 * 7.44236 * 7.44
237 * - add FUSE_NOTIFY_INC_EPOCH237 * - add FUSE_NOTIFY_INC_EPOCH
238 *
239 * 7.45
240 * - add FUSE_COPY_FILE_RANGE_64
241 * - add struct fuse_copy_file_range_out
242 * - add FUSE_NOTIFY_PRUNE
238 */243 */
239244
240#ifndef _LINUX_FUSE_H245#ifndef _LINUX_FUSE_H
...@@ -266,7 +271,7 @@...@@ -266,7 +271,7 @@
266#define FUSE_KERNEL_VERSION 7271#define FUSE_KERNEL_VERSION 7
267272
268/** Minor version number of this interface */273/** Minor version number of this interface */
269#define FUSE_KERNEL_MINOR_VERSION 44274#define FUSE_KERNEL_MINOR_VERSION 45
270275
271/** The node ID of the root inode */276/** The node ID of the root inode */
272#define FUSE_ROOT_ID 1277#define FUSE_ROOT_ID 1
...@@ -653,6 +658,7 @@ enum fuse_opcode {...@@ -653,6 +658,7 @@ enum fuse_opcode {
653 FUSE_SYNCFS = 50,658 FUSE_SYNCFS = 50,
654 FUSE_TMPFILE = 51,659 FUSE_TMPFILE = 51,
655 FUSE_STATX = 52,660 FUSE_STATX = 52,
661 FUSE_COPY_FILE_RANGE_64 = 53,
656662
657 /* CUSE specific operations */663 /* CUSE specific operations */
658 CUSE_INIT = 4096,664 CUSE_INIT = 4096,
...@@ -671,7 +677,7 @@ enum fuse_notify_code {...@@ -671,7 +677,7 @@ enum fuse_notify_code {
671 FUSE_NOTIFY_DELETE = 6,677 FUSE_NOTIFY_DELETE = 6,
672 FUSE_NOTIFY_RESEND = 7,678 FUSE_NOTIFY_RESEND = 7,
673 FUSE_NOTIFY_INC_EPOCH = 8,679 FUSE_NOTIFY_INC_EPOCH = 8,
674 FUSE_NOTIFY_CODE_MAX,680 FUSE_NOTIFY_PRUNE = 9,
675};681};
676682
677/* The read buffer is required to be at least 8k, but may be much larger */683/* The read buffer is required to be at least 8k, but may be much larger */
...@@ -1110,6 +1116,12 @@ struct fuse_notify_retrieve_in {...@@ -1110,6 +1116,12 @@ struct fuse_notify_retrieve_in {
1110 uint64_t dummy4;1116 uint64_t dummy4;
1111};1117};
11121118
1119struct fuse_notify_prune_out {
1120 uint32_t count;
1121 uint32_t padding;
1122 uint64_t spare;
1123};
1124
1113struct fuse_backing_map {1125struct fuse_backing_map {
1114 int32_t fd;1126 int32_t fd;
1115 uint32_t flags;1127 uint32_t flags;
...@@ -1122,6 +1134,7 @@ struct fuse_backing_map {...@@ -1122,6 +1134,7 @@ struct fuse_backing_map {
1122#define FUSE_DEV_IOC_BACKING_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 1, \1134#define FUSE_DEV_IOC_BACKING_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 1, \
1123 struct fuse_backing_map)1135 struct fuse_backing_map)
1124#define FUSE_DEV_IOC_BACKING_CLOSE _IOW(FUSE_DEV_IOC_MAGIC, 2, uint32_t)1136#define FUSE_DEV_IOC_BACKING_CLOSE _IOW(FUSE_DEV_IOC_MAGIC, 2, uint32_t)
1137#define FUSE_DEV_IOC_SYNC_INIT _IO(FUSE_DEV_IOC_MAGIC, 3)
11251138
1126struct fuse_lseek_in {1139struct fuse_lseek_in {
1127 uint64_t fh;1140 uint64_t fh;
...@@ -1144,6 +1157,11 @@ struct fuse_copy_file_range_in {...@@ -1144,6 +1157,11 @@ struct fuse_copy_file_range_in {
1144 uint64_t flags;1157 uint64_t flags;
1145};1158};
11461159
1160/* For FUSE_COPY_FILE_RANGE_64 */
1161struct fuse_copy_file_range_out {
1162 uint64_t bytes_copied;
1163};
1164
1147#define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)1165#define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)
1148#define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1)1166#define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1)
1149struct fuse_setupmapping_in {1167struct fuse_setupmapping_in {
lib/libc/include/any-linux-any/linux/gpib.h created+103
...@@ -0,0 +1,103 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3/***************************************************************************
4 * copyright : (C) 2002 by Frank Mori Hess
5 ***************************************************************************/
6
7#ifndef _GPIB_H
8#define _GPIB_H
9
10#define GPIB_MAX_NUM_BOARDS 16
11#define GPIB_MAX_NUM_DESCRIPTORS 0x1000
12
13enum ibsta_bit_numbers {
14 DCAS_NUM = 0,
15 DTAS_NUM = 1,
16 LACS_NUM = 2,
17 TACS_NUM = 3,
18 ATN_NUM = 4,
19 CIC_NUM = 5,
20 REM_NUM = 6,
21 LOK_NUM = 7,
22 CMPL_NUM = 8,
23 EVENT_NUM = 9,
24 SPOLL_NUM = 10,
25 RQS_NUM = 11,
26 SRQI_NUM = 12,
27 END_NUM = 13,
28 TIMO_NUM = 14,
29 ERR_NUM = 15
30};
31
32/* IBSTA status bits (returned by all functions) */
33enum ibsta_bits {
34 DCAS = (1 << DCAS_NUM), /* device clear state */
35 DTAS = (1 << DTAS_NUM), /* device trigger state */
36 LACS = (1 << LACS_NUM), /* GPIB interface is addressed as Listener */
37 TACS = (1 << TACS_NUM), /* GPIB interface is addressed as Talker */
38 ATN = (1 << ATN_NUM), /* Attention is asserted */
39 CIC = (1 << CIC_NUM), /* GPIB interface is Controller-in-Charge */
40 REM = (1 << REM_NUM), /* remote state */
41 LOK = (1 << LOK_NUM), /* lockout state */
42 CMPL = (1 << CMPL_NUM), /* I/O is complete */
43 EVENT = (1 << EVENT_NUM), /* DCAS, DTAS, or IFC has occurred */
44 SPOLL = (1 << SPOLL_NUM), /* board serial polled by busmaster */
45 RQS = (1 << RQS_NUM), /* Device requesting service */
46 SRQI = (1 << SRQI_NUM), /* SRQ is asserted */
47 END = (1 << END_NUM), /* EOI or EOS encountered */
48 TIMO = (1 << TIMO_NUM), /* Time limit on I/O or wait function exceeded */
49 ERR = (1 << ERR_NUM), /* Function call terminated on error */
50
51 device_status_mask = ERR | TIMO | END | CMPL | RQS,
52 board_status_mask = ERR | TIMO | END | CMPL | SPOLL |
53 EVENT | LOK | REM | CIC | ATN | TACS | LACS | DTAS | DCAS | SRQI,
54};
55
56/* End-of-string (EOS) modes for use with ibeos */
57
58enum eos_flags {
59 EOS_MASK = 0x1c00,
60 REOS = 0x0400, /* Terminate reads on EOS */
61 XEOS = 0x800, /* assert EOI when EOS char is sent */
62 BIN = 0x1000 /* Do 8-bit compare on EOS */
63};
64
65/* GPIB Bus Control Lines bit vector */
66enum bus_control_line {
67 VALID_DAV = 0x01,
68 VALID_NDAC = 0x02,
69 VALID_NRFD = 0x04,
70 VALID_IFC = 0x08,
71 VALID_REN = 0x10,
72 VALID_SRQ = 0x20,
73 VALID_ATN = 0x40,
74 VALID_EOI = 0x80,
75 VALID_ALL = 0xff,
76 BUS_DAV = 0x0100, /* DAV line status bit */
77 BUS_NDAC = 0x0200, /* NDAC line status bit */
78 BUS_NRFD = 0x0400, /* NRFD line status bit */
79 BUS_IFC = 0x0800, /* IFC line status bit */
80 BUS_REN = 0x1000, /* REN line status bit */
81 BUS_SRQ = 0x2000, /* SRQ line status bit */
82 BUS_ATN = 0x4000, /* ATN line status bit */
83 BUS_EOI = 0x8000 /* EOI line status bit */
84};
85
86enum ppe_bits {
87 PPC_DISABLE = 0x10,
88 PPC_SENSE = 0x8, /* parallel poll sense bit */
89 PPC_DIO_MASK = 0x7
90};
91
92enum {
93 request_service_bit = 0x40,
94};
95
96enum gpib_events {
97 EVENT_NONE = 0,
98 EVENT_DEV_TRG = 1,
99 EVENT_DEV_CLR = 2,
100 EVENT_IFC = 3
101};
102
103#endif /* _GPIB_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/gpib_ioctl.h created+167
...@@ -0,0 +1,167 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3/***************************************************************************
4 * copyright : (C) 2002 by Frank Mori Hess
5 ***************************************************************************/
6
7#ifndef _GPIB_IOCTL_H
8#define _GPIB_IOCTL_H
9
10#include <asm/ioctl.h>
11#include <linux/types.h>
12
13#define GPIB_CODE 160
14
15struct gpib_board_type_ioctl {
16 char name[100];
17};
18
19/* argument for read/write/command ioctls */
20struct gpib_read_write_ioctl {
21 __u64 buffer_ptr;
22 __u32 requested_transfer_count;
23 __u32 completed_transfer_count;
24 __s32 end; /* end flag return for reads, end io suppression request for cmd*/
25 __s32 handle;
26};
27
28struct gpib_open_dev_ioctl {
29 __u32 handle;
30 __u32 pad;
31 __s32 sad;
32 __u32 is_board;
33};
34
35struct gpib_close_dev_ioctl {
36 __u32 handle;
37};
38
39struct gpib_serial_poll_ioctl {
40 __u32 pad;
41 __s32 sad;
42 __u8 status_byte;
43 __u8 padding[3]; /* align to 32 bit boundary */
44};
45
46struct gpib_eos_ioctl {
47 __s32 eos;
48 __s32 eos_flags;
49};
50
51struct gpib_wait_ioctl {
52 __s32 handle;
53 __s32 wait_mask;
54 __s32 clear_mask;
55 __s32 set_mask;
56 __s32 ibsta;
57 __s32 pad;
58 __s32 sad;
59 __u32 usec_timeout;
60};
61
62struct gpib_online_ioctl {
63 __u64 init_data_ptr;
64 __s32 init_data_length;
65 __s32 online;
66};
67
68struct gpib_spoll_bytes_ioctl {
69 __u32 num_bytes;
70 __u32 pad;
71 __s32 sad;
72};
73
74struct gpib_board_info_ioctl {
75 __u32 pad;
76 __s32 sad;
77 __s32 parallel_poll_configuration;
78 __s32 autopolling;
79 __s32 is_system_controller;
80 __u32 t1_delay;
81 unsigned ist : 1;
82 unsigned no_7_bit_eos : 1;
83 unsigned padding :30; /* align to 32 bit boundary */
84};
85
86struct gpib_select_pci_ioctl {
87 __s32 pci_bus;
88 __s32 pci_slot;
89};
90
91struct gpib_ppoll_config_ioctl {
92 __u8 config;
93 unsigned set_ist : 1;
94 unsigned clear_ist : 1;
95 unsigned padding :22; /* align to 32 bit boundary */
96};
97
98struct gpib_pad_ioctl {
99 __u32 handle;
100 __u32 pad;
101};
102
103struct gpib_sad_ioctl {
104 __u32 handle;
105 __s32 sad;
106};
107
108/* select a piece of hardware to attach by its sysfs device path */
109struct gpib_select_device_path_ioctl {
110 char device_path[0x1000];
111};
112
113/* update status byte and request service */
114struct gpib_request_service2 {
115 __u8 status_byte;
116 __u8 padding[3]; /* align to 32 bit boundary */
117 __s32 new_reason_for_service;
118};
119
120/* Standard functions. */
121enum gpib_ioctl {
122 IBRD = _IOWR(GPIB_CODE, 100, struct gpib_read_write_ioctl),
123 IBWRT = _IOWR(GPIB_CODE, 101, struct gpib_read_write_ioctl),
124 IBCMD = _IOWR(GPIB_CODE, 102, struct gpib_read_write_ioctl),
125 IBOPENDEV = _IOWR(GPIB_CODE, 3, struct gpib_open_dev_ioctl),
126 IBCLOSEDEV = _IOW(GPIB_CODE, 4, struct gpib_close_dev_ioctl),
127 IBWAIT = _IOWR(GPIB_CODE, 5, struct gpib_wait_ioctl),
128 IBRPP = _IOWR(GPIB_CODE, 6, __u8),
129
130 IBSIC = _IOW(GPIB_CODE, 9, __u32),
131 IBSRE = _IOW(GPIB_CODE, 10, __s32),
132 IBGTS = _IO(GPIB_CODE, 11),
133 IBCAC = _IOW(GPIB_CODE, 12, __s32),
134 IBLINES = _IOR(GPIB_CODE, 14, __s16),
135 IBPAD = _IOW(GPIB_CODE, 15, struct gpib_pad_ioctl),
136 IBSAD = _IOW(GPIB_CODE, 16, struct gpib_sad_ioctl),
137 IBTMO = _IOW(GPIB_CODE, 17, __u32),
138 IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl),
139 IBEOS = _IOW(GPIB_CODE, 19, struct gpib_eos_ioctl),
140 IBRSV = _IOW(GPIB_CODE, 20, __u8),
141 CFCBASE = _IOW(GPIB_CODE, 21, __u64),
142 CFCIRQ = _IOW(GPIB_CODE, 22, __u32),
143 CFCDMA = _IOW(GPIB_CODE, 23, __u32),
144 CFCBOARDTYPE = _IOW(GPIB_CODE, 24, struct gpib_board_type_ioctl),
145
146 IBMUTEX = _IOW(GPIB_CODE, 26, __s32),
147 IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl),
148 IBPPC = _IOW(GPIB_CODE, 28, struct gpib_ppoll_config_ioctl),
149 IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl),
150
151 IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, __s32),
152 IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl),
153 IBEVENT = _IOR(GPIB_CODE, 33, __s16),
154 IBRSC = _IOW(GPIB_CODE, 34, __s32),
155 IB_T1_DELAY = _IOW(GPIB_CODE, 35, __u32),
156 IBLOC = _IO(GPIB_CODE, 36),
157
158 IBAUTOSPOLL = _IOW(GPIB_CODE, 38, __s16),
159 IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
160 IBPP2_SET = _IOW(GPIB_CODE, 40, __s16),
161 IBPP2_GET = _IOR(GPIB_CODE, 41, __s16),
162 IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl),
163 /* 44 was IBSELECT_SERIAL_NUMBER */
164 IBRSV2 = _IOW(GPIB_CODE, 45, struct gpib_request_service2)
165};
166
167#endif /* _GPIB_IOCTL_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/handshake.h+1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/handshake.yaml */3/* Documentation/netlink/specs/handshake.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_HANDSHAKE_H7#ifndef _LINUX_HANDSHAKE_H
7#define _LINUX_HANDSHAKE_H8#define _LINUX_HANDSHAKE_H
lib/libc/include/any-linux-any/linux/hidraw.h+2
...@@ -48,6 +48,8 @@ struct hidraw_devinfo {...@@ -48,6 +48,8 @@ struct hidraw_devinfo {
48#define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)48#define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)
49#define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */49#define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */
5050
51#define HIDIOCTL_LAST _IOC_NR(HIDIOCREVOKE)
52
51#define HIDRAW_FIRST_MINOR 053#define HIDRAW_FIRST_MINOR 0
52#define HIDRAW_MAX_DEVICES 6454#define HIDRAW_MAX_DEVICES 64
53/* number of reports to buffer */55/* number of reports to buffer */
lib/libc/include/any-linux-any/linux/i2c.h+1-1
...@@ -36,7 +36,7 @@...@@ -36,7 +36,7 @@
36 *36 *
37 * Only if I2C_FUNC_NOSTART is set:37 * Only if I2C_FUNC_NOSTART is set:
38 * %I2C_M_NOSTART: skip repeated start sequence38 * %I2C_M_NOSTART: skip repeated start sequence
3939 *
40 * Only if I2C_FUNC_PROTOCOL_MANGLING is set:40 * Only if I2C_FUNC_PROTOCOL_MANGLING is set:
41 * %I2C_M_NO_RD_ACK: in a read message, master ACK/NACK bit is skipped41 * %I2C_M_NO_RD_ACK: in a read message, master ACK/NACK bit is skipped
42 * %I2C_M_IGNORE_NAK: treat NACK from client as ACK42 * %I2C_M_IGNORE_NAK: treat NACK from client as ACK
lib/libc/include/any-linux-any/linux/i8k.h+2
...@@ -36,6 +36,8 @@...@@ -36,6 +36,8 @@
36#define I8K_FAN_LOW 136#define I8K_FAN_LOW 1
37#define I8K_FAN_HIGH 237#define I8K_FAN_HIGH 2
38#define I8K_FAN_TURBO 338#define I8K_FAN_TURBO 3
39/* Many machines treat this mode as some sort of automatic mode */
40#define I8K_FAN_AUTO 3
39#define I8K_FAN_MAX I8K_FAN_TURBO41#define I8K_FAN_MAX I8K_FAN_TURBO
4042
41#define I8K_VOL_UP 143#define I8K_VOL_UP 1
lib/libc/include/any-linux-any/linux/if_bridge.h+3
...@@ -823,6 +823,8 @@ struct br_mcast_stats {...@@ -823,6 +823,8 @@ struct br_mcast_stats {
823/* bridge boolean options823/* bridge boolean options
824 * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets824 * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets
825 * BR_BOOLOPT_MCAST_VLAN_SNOOPING - control vlan multicast snooping825 * BR_BOOLOPT_MCAST_VLAN_SNOOPING - control vlan multicast snooping
826 * BR_BOOLOPT_FDB_LOCAL_VLAN_0 - local FDB entries installed by the bridge
827 * driver itself should only be added on VLAN 0
826 *828 *
827 * IMPORTANT: if adding a new option do not forget to handle829 * IMPORTANT: if adding a new option do not forget to handle
828 * it in br_boolopt_toggle/get and bridge sysfs830 * it in br_boolopt_toggle/get and bridge sysfs
...@@ -832,6 +834,7 @@ enum br_boolopt_id {...@@ -832,6 +834,7 @@ enum br_boolopt_id {
832 BR_BOOLOPT_MCAST_VLAN_SNOOPING,834 BR_BOOLOPT_MCAST_VLAN_SNOOPING,
833 BR_BOOLOPT_MST_ENABLE,835 BR_BOOLOPT_MST_ENABLE,
834 BR_BOOLOPT_MDB_OFFLOAD_FAIL_NOTIFICATION,836 BR_BOOLOPT_MDB_OFFLOAD_FAIL_NOTIFICATION,
837 BR_BOOLOPT_FDB_LOCAL_VLAN_0,
835 BR_BOOLOPT_MAX838 BR_BOOLOPT_MAX
836};839};
837840
lib/libc/include/any-linux-any/linux/if_ether.h+4
...@@ -92,6 +92,9 @@...@@ -92,6 +92,9 @@
92#define ETH_P_ETHERCAT 0x88A4 /* EtherCAT */92#define ETH_P_ETHERCAT 0x88A4 /* EtherCAT */
93#define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */93#define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */
94#define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */94#define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */
95#define ETH_P_MXLGSW 0x88C3 /* Infineon Technologies Corporate Research ST
96 * Used by MaxLinear GSW DSA
97 */
95#define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */98#define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */
96#define ETH_P_TIPC 0x88CA /* TIPC */99#define ETH_P_TIPC 0x88CA /* TIPC */
97#define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */100#define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */
...@@ -114,6 +117,7 @@...@@ -114,6 +117,7 @@
114#define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */117#define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
115#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */118#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
116#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */119#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
120#define ETH_P_YT921X 0x9988 /* Motorcomm YT921x DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
117#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */121#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
118#define ETH_P_DSA_8021Q 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */122#define ETH_P_DSA_8021Q 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
119#define ETH_P_DSA_A5PSW 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */123#define ETH_P_DSA_A5PSW 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */
lib/libc/include/any-linux-any/linux/if_link.h+3
...@@ -379,6 +379,8 @@ enum {...@@ -379,6 +379,8 @@ enum {
379 IFLA_DPLL_PIN,379 IFLA_DPLL_PIN,
380 IFLA_MAX_PACING_OFFLOAD_HORIZON,380 IFLA_MAX_PACING_OFFLOAD_HORIZON,
381 IFLA_NETNS_IMMUTABLE,381 IFLA_NETNS_IMMUTABLE,
382 IFLA_HEADROOM,
383 IFLA_TAILROOM,
382 __IFLA_MAX384 __IFLA_MAX
383};385};
384386
...@@ -1562,6 +1564,7 @@ enum {...@@ -1562,6 +1564,7 @@ enum {
1562 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,1564 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
1563 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,1565 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
1564 IFLA_BOND_SLAVE_PRIO,1566 IFLA_BOND_SLAVE_PRIO,
1567 IFLA_BOND_SLAVE_ACTOR_PORT_PRIO,
1565 __IFLA_BOND_SLAVE_MAX,1568 __IFLA_BOND_SLAVE_MAX,
1566};1569};
15671570
lib/libc/include/any-linux-any/linux/if_team.h+1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/team.yaml */3/* Documentation/netlink/specs/team.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_IF_TEAM_H7#ifndef _LINUX_IF_TEAM_H
7#define _LINUX_IF_TEAM_H8#define _LINUX_IF_TEAM_H
lib/libc/include/any-linux-any/linux/iio/types.h+5
...@@ -52,6 +52,7 @@ enum iio_chan_type {...@@ -52,6 +52,7 @@ enum iio_chan_type {
52 IIO_COLORTEMP,52 IIO_COLORTEMP,
53 IIO_CHROMATICITY,53 IIO_CHROMATICITY,
54 IIO_ATTENTION,54 IIO_ATTENTION,
55 IIO_ALTCURRENT,
55};56};
5657
57enum iio_modifier {58enum iio_modifier {
...@@ -108,6 +109,10 @@ enum iio_modifier {...@@ -108,6 +109,10 @@ enum iio_modifier {
108 IIO_MOD_ROLL,109 IIO_MOD_ROLL,
109 IIO_MOD_LIGHT_UVA,110 IIO_MOD_LIGHT_UVA,
110 IIO_MOD_LIGHT_UVB,111 IIO_MOD_LIGHT_UVB,
112 IIO_MOD_RMS,
113 IIO_MOD_ACTIVE,
114 IIO_MOD_REACTIVE,
115 IIO_MOD_APPARENT,
111};116};
112117
113enum iio_event_type {118enum iio_event_type {
lib/libc/include/any-linux-any/linux/input-event-codes.h+22
...@@ -27,6 +27,7 @@...@@ -27,6 +27,7 @@
27#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */27#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
28#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */28#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
29#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */29#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
30#define INPUT_PROP_PRESSUREPAD 0x07 /* pressure triggers clicks */
3031
31#define INPUT_PROP_MAX 0x1f32#define INPUT_PROP_MAX 0x1f
32#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)33#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
...@@ -630,6 +631,18 @@...@@ -630,6 +631,18 @@
630#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */631#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
631#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */632#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
632633
634/*
635 * Keycodes for hotkeys toggling the electronic privacy screen found on some
636 * laptops on/off. Note when the embedded-controller turns on/off the eprivacy
637 * screen itself then the state should be reported through drm connecter props:
638 * https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#standard-connector-properties
639 * Except when implementing the drm connecter properties API is not possible
640 * because e.g. the firmware does not allow querying the presence and/or status
641 * of the eprivacy screen at boot.
642 */
643#define KEY_EPRIVACY_SCREEN_ON 0x252
644#define KEY_EPRIVACY_SCREEN_OFF 0x253
645
633#define KEY_KBDINPUTASSIST_PREV 0x260646#define KEY_KBDINPUTASSIST_PREV 0x260
634#define KEY_KBDINPUTASSIST_NEXT 0x261647#define KEY_KBDINPUTASSIST_NEXT 0x261
635#define KEY_KBDINPUTASSIST_PREVGROUP 0x262648#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
...@@ -878,6 +891,7 @@...@@ -878,6 +891,7 @@
878891
879#define ABS_VOLUME 0x20892#define ABS_VOLUME 0x20
880#define ABS_PROFILE 0x21893#define ABS_PROFILE 0x21
894#define ABS_SND_PROFILE 0x22
881895
882#define ABS_MISC 0x28896#define ABS_MISC 0x28
883897
...@@ -987,4 +1001,12 @@...@@ -987,4 +1001,12 @@
987#define SND_MAX 0x071001#define SND_MAX 0x07
988#define SND_CNT (SND_MAX+1)1002#define SND_CNT (SND_MAX+1)
9891003
1004/*
1005 * ABS_SND_PROFILE values
1006 */
1007
1008#define SND_PROFILE_SILENT 0x00
1009#define SND_PROFILE_VIBRATE 0x01
1010#define SND_PROFILE_RING 0x02
1011
990#endif1012#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/input.h+21-1
...@@ -427,6 +427,24 @@ struct ff_rumble_effect {...@@ -427,6 +427,24 @@ struct ff_rumble_effect {
427 __u16 weak_magnitude;427 __u16 weak_magnitude;
428};428};
429429
430/**
431 * struct ff_haptic_effect
432 * @hid_usage: hid_usage according to Haptics page (WAVEFORM_CLICK, etc.)
433 * @vendor_id: the waveform vendor ID if hid_usage is in the vendor-defined range
434 * @vendor_waveform_page: the vendor waveform page if hid_usage is in the vendor-defined range
435 * @intensity: strength of the effect as percentage
436 * @repeat_count: number of times to retrigger effect
437 * @retrigger_period: time before effect is retriggered (in ms)
438 */
439struct ff_haptic_effect {
440 __u16 hid_usage;
441 __u16 vendor_id;
442 __u8 vendor_waveform_page;
443 __u16 intensity;
444 __u16 repeat_count;
445 __u16 retrigger_period;
446};
447
430/**448/**
431 * struct ff_effect - defines force feedback effect449 * struct ff_effect - defines force feedback effect
432 * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,450 * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,
...@@ -463,6 +481,7 @@ struct ff_effect {...@@ -463,6 +481,7 @@ struct ff_effect {
463 struct ff_periodic_effect periodic;481 struct ff_periodic_effect periodic;
464 struct ff_condition_effect condition[2]; /* One for each axis */482 struct ff_condition_effect condition[2]; /* One for each axis */
465 struct ff_rumble_effect rumble;483 struct ff_rumble_effect rumble;
484 struct ff_haptic_effect haptic;
466 } u;485 } u;
467};486};
468487
...@@ -470,6 +489,7 @@ struct ff_effect {...@@ -470,6 +489,7 @@ struct ff_effect {
470 * Force feedback effect types489 * Force feedback effect types
471 */490 */
472491
492#define FF_HAPTIC 0x4f
473#define FF_RUMBLE 0x50493#define FF_RUMBLE 0x50
474#define FF_PERIODIC 0x51494#define FF_PERIODIC 0x51
475#define FF_CONSTANT 0x52495#define FF_CONSTANT 0x52
...@@ -479,7 +499,7 @@ struct ff_effect {...@@ -479,7 +499,7 @@ struct ff_effect {
479#define FF_INERTIA 0x56499#define FF_INERTIA 0x56
480#define FF_RAMP 0x57500#define FF_RAMP 0x57
481501
482#define FF_EFFECT_MIN FF_RUMBLE502#define FF_EFFECT_MIN FF_HAPTIC
483#define FF_EFFECT_MAX FF_RAMP503#define FF_EFFECT_MAX FF_RAMP
484504
485/*505/*
lib/libc/include/any-linux-any/linux/io_uring.h+69-2
...@@ -225,6 +225,18 @@ enum io_uring_sqe_flags_bit {...@@ -225,6 +225,18 @@ enum io_uring_sqe_flags_bit {
225/* Use hybrid poll in iopoll process */225/* Use hybrid poll in iopoll process */
226#define IORING_SETUP_HYBRID_IOPOLL (1U << 17)226#define IORING_SETUP_HYBRID_IOPOLL (1U << 17)
227227
228/*
229 * Allow both 16b and 32b CQEs. If a 32b CQE is posted, it will have
230 * IORING_CQE_F_32 set in cqe->flags.
231 */
232#define IORING_SETUP_CQE_MIXED (1U << 18)
233
234/*
235 * Allow both 64b and 128b SQEs. If a 128b SQE is posted, it will have
236 * a 128b opcode.
237 */
238#define IORING_SETUP_SQE_MIXED (1U << 19)
239
228enum io_uring_op {240enum io_uring_op {
229 IORING_OP_NOP,241 IORING_OP_NOP,
230 IORING_OP_READV,242 IORING_OP_READV,
...@@ -289,6 +301,8 @@ enum io_uring_op {...@@ -289,6 +301,8 @@ enum io_uring_op {
289 IORING_OP_READV_FIXED,301 IORING_OP_READV_FIXED,
290 IORING_OP_WRITEV_FIXED,302 IORING_OP_WRITEV_FIXED,
291 IORING_OP_PIPE,303 IORING_OP_PIPE,
304 IORING_OP_NOP128,
305 IORING_OP_URING_CMD128,
292306
293 /* this goes last, obviously */307 /* this goes last, obviously */
294 IORING_OP_LAST,308 IORING_OP_LAST,
...@@ -298,9 +312,13 @@ enum io_uring_op {...@@ -298,9 +312,13 @@ enum io_uring_op {
298 * sqe->uring_cmd_flags top 8bits aren't available for userspace312 * sqe->uring_cmd_flags top 8bits aren't available for userspace
299 * IORING_URING_CMD_FIXED use registered buffer; pass this flag313 * IORING_URING_CMD_FIXED use registered buffer; pass this flag
300 * along with setting sqe->buf_index.314 * along with setting sqe->buf_index.
315 * IORING_URING_CMD_MULTISHOT must be used with buffer select, like other
316 * multishot commands. Not compatible with
317 * IORING_URING_CMD_FIXED, for now.
301 */318 */
302#define IORING_URING_CMD_FIXED (1U << 0)319#define IORING_URING_CMD_FIXED (1U << 0)
303#define IORING_URING_CMD_MASK IORING_URING_CMD_FIXED320#define IORING_URING_CMD_MULTISHOT (1U << 1)
321#define IORING_URING_CMD_MASK (IORING_URING_CMD_FIXED | IORING_URING_CMD_MULTISHOT)
304322
305323
306/*324/*
...@@ -394,7 +412,7 @@ enum io_uring_op {...@@ -394,7 +412,7 @@ enum io_uring_op {
394 * will be contiguous from the starting buffer ID.412 * will be contiguous from the starting buffer ID.
395 *413 *
396 * IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec414 * IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec
397 * to allow vectorized send operations.415 * to allow vectorized send operations.
398 */416 */
399#define IORING_RECVSEND_POLL_FIRST (1U << 0)417#define IORING_RECVSEND_POLL_FIRST (1U << 0)
400#define IORING_RECV_MULTISHOT (1U << 1)418#define IORING_RECV_MULTISHOT (1U << 1)
...@@ -454,6 +472,7 @@ enum io_uring_msg_ring_flags {...@@ -454,6 +472,7 @@ enum io_uring_msg_ring_flags {
454#define IORING_NOP_FIXED_FILE (1U << 2)472#define IORING_NOP_FIXED_FILE (1U << 2)
455#define IORING_NOP_FIXED_BUFFER (1U << 3)473#define IORING_NOP_FIXED_BUFFER (1U << 3)
456#define IORING_NOP_TW (1U << 4)474#define IORING_NOP_TW (1U << 4)
475#define IORING_NOP_CQE32 (1U << 5)
457476
458/*477/*
459 * IO completion data structure (Completion Queue Entry)478 * IO completion data structure (Completion Queue Entry)
...@@ -487,12 +506,22 @@ struct io_uring_cqe {...@@ -487,12 +506,22 @@ struct io_uring_cqe {
487 * other provided buffer type, all completions with a506 * other provided buffer type, all completions with a
488 * buffer passed back is automatically returned to the507 * buffer passed back is automatically returned to the
489 * application.508 * application.
509 * IORING_CQE_F_SKIP If set, then the application/liburing must ignore this
510 * CQE. It's only purpose is to fill a gap in the ring,
511 * if a large CQE is attempted posted when the ring has
512 * just a single small CQE worth of space left before
513 * wrapping.
514 * IORING_CQE_F_32 If set, this is a 32b/big-cqe posting. Use with rings
515 * setup in a mixed CQE mode, where both 16b and 32b
516 * CQEs may be posted to the CQ ring.
490 */517 */
491#define IORING_CQE_F_BUFFER (1U << 0)518#define IORING_CQE_F_BUFFER (1U << 0)
492#define IORING_CQE_F_MORE (1U << 1)519#define IORING_CQE_F_MORE (1U << 1)
493#define IORING_CQE_F_SOCK_NONEMPTY (1U << 2)520#define IORING_CQE_F_SOCK_NONEMPTY (1U << 2)
494#define IORING_CQE_F_NOTIF (1U << 3)521#define IORING_CQE_F_NOTIF (1U << 3)
495#define IORING_CQE_F_BUF_MORE (1U << 4)522#define IORING_CQE_F_BUF_MORE (1U << 4)
523#define IORING_CQE_F_SKIP (1U << 5)
524#define IORING_CQE_F_32 (1U << 15)
496525
497#define IORING_CQE_BUFFER_SHIFT 16526#define IORING_CQE_BUFFER_SHIFT 16
498527
...@@ -665,6 +694,12 @@ enum io_uring_register_op {...@@ -665,6 +694,12 @@ enum io_uring_register_op {
665694
666 IORING_REGISTER_MEM_REGION = 34,695 IORING_REGISTER_MEM_REGION = 34,
667696
697 /* query various aspects of io_uring, see linux/io_uring/query.h */
698 IORING_REGISTER_QUERY = 35,
699
700 /* auxiliary zcrx configuration, see enum zcrx_ctrl_op */
701 IORING_REGISTER_ZCRX_CTRL = 36,
702
668 /* this goes last */703 /* this goes last */
669 IORING_REGISTER_LAST,704 IORING_REGISTER_LAST,
670705
...@@ -974,6 +1009,7 @@ enum io_uring_socket_op {...@@ -974,6 +1009,7 @@ enum io_uring_socket_op {
974 SOCKET_URING_OP_GETSOCKOPT,1009 SOCKET_URING_OP_GETSOCKOPT,
975 SOCKET_URING_OP_SETSOCKOPT,1010 SOCKET_URING_OP_SETSOCKOPT,
976 SOCKET_URING_OP_TX_TIMESTAMP,1011 SOCKET_URING_OP_TX_TIMESTAMP,
1012 SOCKET_URING_OP_GETSOCKNAME,
977};1013};
9781014
979/*1015/*
...@@ -1028,6 +1064,10 @@ struct io_uring_zcrx_area_reg {...@@ -1028,6 +1064,10 @@ struct io_uring_zcrx_area_reg {
1028 __u64 __resv2[2];1064 __u64 __resv2[2];
1029};1065};
10301066
1067enum zcrx_reg_flags {
1068 ZCRX_REG_IMPORT = 1,
1069};
1070
1031/*1071/*
1032 * Argument for IORING_REGISTER_ZCRX_IFQ1072 * Argument for IORING_REGISTER_ZCRX_IFQ
1033 */1073 */
...@@ -1046,6 +1086,33 @@ struct io_uring_zcrx_ifq_reg {...@@ -1046,6 +1086,33 @@ struct io_uring_zcrx_ifq_reg {
1046 __u64 __resv[3];1086 __u64 __resv[3];
1047};1087};
10481088
1089enum zcrx_ctrl_op {
1090 ZCRX_CTRL_FLUSH_RQ,
1091 ZCRX_CTRL_EXPORT,
1092
1093 __ZCRX_CTRL_LAST,
1094};
1095
1096struct zcrx_ctrl_flush_rq {
1097 __u64 __resv[6];
1098};
1099
1100struct zcrx_ctrl_export {
1101 __u32 zcrx_fd;
1102 __u32 __resv1[11];
1103};
1104
1105struct zcrx_ctrl {
1106 __u32 zcrx_id;
1107 __u32 op; /* see enum zcrx_ctrl_op */
1108 __u64 __resv[2];
1109
1110 union {
1111 struct zcrx_ctrl_export zc_export;
1112 struct zcrx_ctrl_flush_rq zc_flush;
1113 };
1114};
1115
1049#ifdef __cplusplus1116#ifdef __cplusplus
1050}1117}
1051#endif1118#endif
lib/libc/include/any-linux-any/linux/io_uring/query.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 query interface.
4 */
5#ifndef LINUX_IO_URING_QUERY_H
6#define LINUX_IO_URING_QUERY_H
7
8#include <linux/types.h>
9
10struct io_uring_query_hdr {
11 __u64 next_entry;
12 __u64 query_data;
13 __u32 query_op;
14 __u32 size;
15 __s32 result;
16 __u32 __resv[3];
17};
18
19enum {
20 IO_URING_QUERY_OPCODES = 0,
21 IO_URING_QUERY_ZCRX = 1,
22 IO_URING_QUERY_SCQ = 2,
23
24 __IO_URING_QUERY_MAX,
25};
26
27/* Doesn't require a ring */
28struct io_uring_query_opcode {
29 /* The number of supported IORING_OP_* opcodes */
30 __u32 nr_request_opcodes;
31 /* The number of supported IORING_[UN]REGISTER_* opcodes */
32 __u32 nr_register_opcodes;
33 /* Bitmask of all supported IORING_FEAT_* flags */
34 __u64 feature_flags;
35 /* Bitmask of all supported IORING_SETUP_* flags */
36 __u64 ring_setup_flags;
37 /* Bitmask of all supported IORING_ENTER_** flags */
38 __u64 enter_flags;
39 /* Bitmask of all supported IOSQE_* flags */
40 __u64 sqe_flags;
41 /* The number of available query opcodes */
42 __u32 nr_query_opcodes;
43 __u32 __pad;
44};
45
46struct io_uring_query_zcrx {
47 /* Bitmask of supported ZCRX_REG_* flags, */
48 __u64 register_flags;
49 /* Bitmask of all supported IORING_ZCRX_AREA_* flags */
50 __u64 area_flags;
51 /* The number of supported ZCRX_CTRL_* opcodes */
52 __u32 nr_ctrl_opcodes;
53 __u32 __resv1;
54 /* The refill ring header size */
55 __u32 rq_hdr_size;
56 /* The alignment for the header */
57 __u32 rq_hdr_alignment;
58 __u64 __resv2;
59};
60
61struct io_uring_query_scq {
62 /* The SQ/CQ rings header size */
63 __u64 hdr_size;
64 /* The alignment for the header */
65 __u64 hdr_alignment;
66};
67
68#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/iommufd.h+10
...@@ -450,6 +450,16 @@ struct iommu_hwpt_vtd_s1 {...@@ -450,6 +450,16 @@ struct iommu_hwpt_vtd_s1 {
450 * nested domain will translate the same as the nesting parent. The S1 will450 * nested domain will translate the same as the nesting parent. The S1 will
451 * install a Context Descriptor Table pointing at userspace memory translated451 * install a Context Descriptor Table pointing at userspace memory translated
452 * by the nesting parent.452 * by the nesting parent.
453 *
454 * It's suggested to allocate a vDEVICE object carrying vSID and then re-attach
455 * the nested domain, as soon as the vSID is available in the VMM level:
456 *
457 * - when Cfg=translate, a vDEVICE must be allocated prior to attaching to the
458 * allocated nested domain, as CD/ATS invalidations and vevents need a vSID.
459 * - when Cfg=bypass/abort, a vDEVICE is not enforced during the nested domain
460 * attachment, to support a GBPA case where VM sets CR0.SMMUEN=0. However, if
461 * VM sets CR0.SMMUEN=1 while missing a vDEVICE object, kernel would fail to
462 * report events to the VM. E.g. F_TRANSLATION when guest STE.Cfg=abort.
453 */463 */
454struct iommu_hwpt_arm_smmuv3 {464struct iommu_hwpt_arm_smmuv3 {
455 __aligned_le64 ste[2];465 __aligned_le64 ste[2];
lib/libc/include/any-linux-any/linux/isst_if.h+27-23
...@@ -52,7 +52,7 @@ struct isst_if_cpu_map {...@@ -52,7 +52,7 @@ struct isst_if_cpu_map {
52/**52/**
53 * struct isst_if_cpu_maps - structure for CPU map IOCTL53 * struct isst_if_cpu_maps - structure for CPU map IOCTL
54 * @cmd_count: Number of CPU mapping command in cpu_map[]54 * @cmd_count: Number of CPU mapping command in cpu_map[]
55 * @cpu_map[]: Holds one or more CPU map data structure55 * @cpu_map: Holds one or more CPU map data structure
56 *56 *
57 * This structure used with ioctl ISST_IF_GET_PHY_ID to send57 * This structure used with ioctl ISST_IF_GET_PHY_ID to send
58 * one or more CPU mapping commands. Here IOCTL return value indicates58 * one or more CPU mapping commands. Here IOCTL return value indicates
...@@ -82,8 +82,8 @@ struct isst_if_io_reg {...@@ -82,8 +82,8 @@ struct isst_if_io_reg {
8282
83/**83/**
84 * struct isst_if_io_regs - structure for IO register commands84 * struct isst_if_io_regs - structure for IO register commands
85 * @cmd_count: Number of io reg commands in io_reg[]85 * @req_count: Number of io reg commands in io_reg[]
86 * @io_reg[]: Holds one or more io_reg command structure86 * @io_reg: Holds one or more io_reg command structure
87 *87 *
88 * This structure used with ioctl ISST_IF_IO_CMD to send88 * This structure used with ioctl ISST_IF_IO_CMD to send
89 * one or more read/write commands to PUNIT. Here IOCTL return value89 * one or more read/write commands to PUNIT. Here IOCTL return value
...@@ -120,7 +120,7 @@ struct isst_if_mbox_cmd {...@@ -120,7 +120,7 @@ struct isst_if_mbox_cmd {
120/**120/**
121 * struct isst_if_mbox_cmds - structure for mailbox commands121 * struct isst_if_mbox_cmds - structure for mailbox commands
122 * @cmd_count: Number of mailbox commands in mbox_cmd[]122 * @cmd_count: Number of mailbox commands in mbox_cmd[]
123 * @mbox_cmd[]: Holds one or more mbox commands123 * @mbox_cmd: Holds one or more mbox commands
124 *124 *
125 * This structure used with ioctl ISST_IF_MBOX_COMMAND to send125 * This structure used with ioctl ISST_IF_MBOX_COMMAND to send
126 * one or more mailbox commands to PUNIT. Here IOCTL return value126 * one or more mailbox commands to PUNIT. Here IOCTL return value
...@@ -152,7 +152,7 @@ struct isst_if_msr_cmd {...@@ -152,7 +152,7 @@ struct isst_if_msr_cmd {
152/**152/**
153 * struct isst_if_msr_cmds - structure for msr commands153 * struct isst_if_msr_cmds - structure for msr commands
154 * @cmd_count: Number of mailbox commands in msr_cmd[]154 * @cmd_count: Number of mailbox commands in msr_cmd[]
155 * @msr_cmd[]: Holds one or more msr commands155 * @msr_cmd: Holds one or more msr commands
156 *156 *
157 * This structure used with ioctl ISST_IF_MSR_COMMAND to send157 * This structure used with ioctl ISST_IF_MSR_COMMAND to send
158 * one or more MSR commands. IOCTL return value indicates number of158 * one or more MSR commands. IOCTL return value indicates number of
...@@ -167,8 +167,9 @@ struct isst_if_msr_cmds {...@@ -167,8 +167,9 @@ struct isst_if_msr_cmds {
167 * struct isst_core_power - Structure to get/set core_power feature167 * struct isst_core_power - Structure to get/set core_power feature
168 * @get_set: 0: Get, 1: Set168 * @get_set: 0: Get, 1: Set
169 * @socket_id: Socket/package id169 * @socket_id: Socket/package id
170 * @power_domain: Power Domain id170 * @power_domain_id: Power Domain id
171 * @enable: Feature enable status171 * @enable: Feature enable status
172 * @supported: Power domain supports SST_CP interface
172 * @priority_type: Priority type for the feature (ordered/proportional)173 * @priority_type: Priority type for the feature (ordered/proportional)
173 *174 *
174 * Structure to get/set core_power feature state using IOCTL175 * Structure to get/set core_power feature state using IOCTL
...@@ -187,11 +188,11 @@ struct isst_core_power {...@@ -187,11 +188,11 @@ struct isst_core_power {
187 * struct isst_clos_param - Structure to get/set clos praram188 * struct isst_clos_param - Structure to get/set clos praram
188 * @get_set: 0: Get, 1: Set189 * @get_set: 0: Get, 1: Set
189 * @socket_id: Socket/package id190 * @socket_id: Socket/package id
190 * @power_domain: Power Domain id191 * @power_domain_id: Power Domain id
191 * clos: Clos ID for the parameters192 * @clos: Clos ID for the parameters
192 * min_freq_mhz: Minimum frequency in MHz193 * @min_freq_mhz: Minimum frequency in MHz
193 * max_freq_mhz: Maximum frequency in MHz194 * @max_freq_mhz: Maximum frequency in MHz
194 * prop_prio: Proportional priority from 0-15195 * @prop_prio: Proportional priority from 0-15
195 *196 *
196 * Structure to get/set per clos property using IOCTL197 * Structure to get/set per clos property using IOCTL
197 * ISST_IF_CLOS_PARAM.198 * ISST_IF_CLOS_PARAM.
...@@ -209,7 +210,7 @@ struct isst_clos_param {...@@ -209,7 +210,7 @@ struct isst_clos_param {
209/**210/**
210 * struct isst_if_clos_assoc - Structure to assign clos to a CPU211 * struct isst_if_clos_assoc - Structure to assign clos to a CPU
211 * @socket_id: Socket/package id212 * @socket_id: Socket/package id
212 * @power_domain: Power Domain id213 * @power_domain_id: Power Domain id
213 * @logical_cpu: CPU number214 * @logical_cpu: CPU number
214 * @clos: Clos ID to assign to the logical CPU215 * @clos: Clos ID to assign to the logical CPU
215 *216 *
...@@ -228,6 +229,7 @@ struct isst_if_clos_assoc {...@@ -228,6 +229,7 @@ struct isst_if_clos_assoc {
228 * @get_set: Request is for get or set229 * @get_set: Request is for get or set
229 * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not230 * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not
230 * Linux CPU number231 * Linux CPU number
232 * @assoc_info: CLOS data for this CPU
231 *233 *
232 * Structure used to get/set associate CPUs to clos using IOCTL234 * Structure used to get/set associate CPUs to clos using IOCTL
233 * ISST_IF_CLOS_ASSOC.235 * ISST_IF_CLOS_ASSOC.
...@@ -257,7 +259,7 @@ struct isst_tpmi_instance_count {...@@ -257,7 +259,7 @@ struct isst_tpmi_instance_count {
257/**259/**
258 * struct isst_perf_level_info - Structure to get information on SST-PP levels260 * struct isst_perf_level_info - Structure to get information on SST-PP levels
259 * @socket_id: Socket/package id261 * @socket_id: Socket/package id
260 * @power_domain: Power Domain id262 * @power_domain_id: Power Domain id
261 * @logical_cpu: CPU number263 * @logical_cpu: CPU number
262 * @clos: Clos ID to assign to the logical CPU264 * @clos: Clos ID to assign to the logical CPU
263 * @max_level: Maximum performance level supported by the platform265 * @max_level: Maximum performance level supported by the platform
...@@ -267,8 +269,8 @@ struct isst_tpmi_instance_count {...@@ -267,8 +269,8 @@ struct isst_tpmi_instance_count {
267 * @feature_state: SST-BF and SST-TF (enabled/disabled) status at current level269 * @feature_state: SST-BF and SST-TF (enabled/disabled) status at current level
268 * @locked: SST-PP performance level change is locked/unlocked270 * @locked: SST-PP performance level change is locked/unlocked
269 * @enabled: SST-PP feature is enabled or not271 * @enabled: SST-PP feature is enabled or not
270 * @sst-tf_support: SST-TF support status at this level272 * @sst_tf_support: SST-TF support status at this level
271 * @sst-bf_support: SST-BF support status at this level273 * @sst_bf_support: SST-BF support status at this level
272 *274 *
273 * Structure to get SST-PP details using IOCTL ISST_IF_PERF_LEVELS.275 * Structure to get SST-PP details using IOCTL ISST_IF_PERF_LEVELS.
274 */276 */
...@@ -289,7 +291,7 @@ struct isst_perf_level_info {...@@ -289,7 +291,7 @@ struct isst_perf_level_info {
289/**291/**
290 * struct isst_perf_level_control - Structure to set SST-PP level292 * struct isst_perf_level_control - Structure to set SST-PP level
291 * @socket_id: Socket/package id293 * @socket_id: Socket/package id
292 * @power_domain: Power Domain id294 * @power_domain_id: Power Domain id
293 * @level: level to set295 * @level: level to set
294 *296 *
295 * Structure used change SST-PP level using IOCTL ISST_IF_PERF_SET_LEVEL.297 * Structure used change SST-PP level using IOCTL ISST_IF_PERF_SET_LEVEL.
...@@ -303,7 +305,7 @@ struct isst_perf_level_control {...@@ -303,7 +305,7 @@ struct isst_perf_level_control {
303/**305/**
304 * struct isst_perf_feature_control - Structure to activate SST-BF/SST-TF306 * struct isst_perf_feature_control - Structure to activate SST-BF/SST-TF
305 * @socket_id: Socket/package id307 * @socket_id: Socket/package id
306 * @power_domain: Power Domain id308 * @power_domain_id: Power Domain id
307 * @feature: bit 0 = SST-BF state, bit 1 = SST-TF state309 * @feature: bit 0 = SST-BF state, bit 1 = SST-TF state
308 *310 *
309 * Structure used to enable SST-BF/SST-TF using IOCTL ISST_IF_PERF_SET_FEATURE.311 * Structure used to enable SST-BF/SST-TF using IOCTL ISST_IF_PERF_SET_FEATURE.
...@@ -320,7 +322,7 @@ struct isst_perf_feature_control {...@@ -320,7 +322,7 @@ struct isst_perf_feature_control {
320/**322/**
321 * struct isst_perf_level_data_info - Structure to get SST-PP level details323 * struct isst_perf_level_data_info - Structure to get SST-PP level details
322 * @socket_id: Socket/package id324 * @socket_id: Socket/package id
323 * @power_domain: Power Domain id325 * @power_domain_id: Power Domain id
324 * @level: SST-PP level for which caller wants to get information326 * @level: SST-PP level for which caller wants to get information
325 * @tdp_ratio: TDP Ratio327 * @tdp_ratio: TDP Ratio
326 * @base_freq_mhz: Base frequency in MHz328 * @base_freq_mhz: Base frequency in MHz
...@@ -341,8 +343,8 @@ struct isst_perf_feature_control {...@@ -341,8 +343,8 @@ struct isst_perf_feature_control {
341 * @pm_fabric_freq_mhz: Fabric (Uncore) minimum frequency343 * @pm_fabric_freq_mhz: Fabric (Uncore) minimum frequency
342 * @max_buckets: Maximum trl buckets344 * @max_buckets: Maximum trl buckets
343 * @max_trl_levels: Maximum trl levels345 * @max_trl_levels: Maximum trl levels
344 * @bucket_core_counts[TRL_MAX_BUCKETS]: Number of cores per bucket346 * @bucket_core_counts: Number of cores per bucket
345 * @trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]: maximum frequency347 * @trl_freq_mhz: maximum frequency
346 * for a bucket and trl level348 * for a bucket and trl level
347 *349 *
348 * Structure used to get information on frequencies and TDP for a SST-PP350 * Structure used to get information on frequencies and TDP for a SST-PP
...@@ -402,7 +404,7 @@ struct isst_perf_level_fabric_info {...@@ -402,7 +404,7 @@ struct isst_perf_level_fabric_info {
402/**404/**
403 * struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask405 * struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask
404 * @socket_id: Socket/package id406 * @socket_id: Socket/package id
405 * @power_domain: Power Domain id407 * @power_domain_id: Power Domain id
406 * @level: SST-PP level for which caller wants to get information408 * @level: SST-PP level for which caller wants to get information
407 * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not409 * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not
408 * Linux CPU number. If 0 CPU buffer is copied to user space410 * Linux CPU number. If 0 CPU buffer is copied to user space
...@@ -430,7 +432,7 @@ struct isst_perf_level_cpu_mask {...@@ -430,7 +432,7 @@ struct isst_perf_level_cpu_mask {
430/**432/**
431 * struct isst_base_freq_info - Structure to get SST-BF frequencies433 * struct isst_base_freq_info - Structure to get SST-BF frequencies
432 * @socket_id: Socket/package id434 * @socket_id: Socket/package id
433 * @power_domain: Power Domain id435 * @power_domain_id: Power Domain id
434 * @level: SST-PP level for which caller wants to get information436 * @level: SST-PP level for which caller wants to get information
435 * @high_base_freq_mhz: High priority CPU base frequency437 * @high_base_freq_mhz: High priority CPU base frequency
436 * @low_base_freq_mhz: Low priority CPU base frequency438 * @low_base_freq_mhz: Low priority CPU base frequency
...@@ -453,9 +455,11 @@ struct isst_base_freq_info {...@@ -453,9 +455,11 @@ struct isst_base_freq_info {
453/**455/**
454 * struct isst_turbo_freq_info - Structure to get SST-TF frequencies456 * struct isst_turbo_freq_info - Structure to get SST-TF frequencies
455 * @socket_id: Socket/package id457 * @socket_id: Socket/package id
456 * @power_domain: Power Domain id458 * @power_domain_id: Power Domain id
457 * @level: SST-PP level for which caller wants to get information459 * @level: SST-PP level for which caller wants to get information
458 * @max_clip_freqs: Maximum number of low priority core clipping frequencies460 * @max_clip_freqs: Maximum number of low priority core clipping frequencies
461 * @max_buckets: Maximum trl buckets
462 * @max_trl_levels: Maximum trl levels
459 * @lp_clip_freq_mhz: Clip frequencies per trl level463 * @lp_clip_freq_mhz: Clip frequencies per trl level
460 * @bucket_core_counts: Maximum number of cores for a bucket464 * @bucket_core_counts: Maximum number of cores for a bucket
461 * @trl_freq_mhz: Frequencies per trl level for each bucket465 * @trl_freq_mhz: Frequencies per trl level for each bucket
lib/libc/include/any-linux-any/linux/ivtv.h+1-1
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2/*2/*
3 Public ivtv API header3 Public ivtv API header
4 Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>4 Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>
5 Copyright (C) 2004-2007 Hans Verkuil <hverkuil@xs4all.nl>5 Copyright (C) 2004-2007 Hans Verkuil <hverkuil@kernel.org>
66
7 This program is free software; you can redistribute it and/or modify7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by8 it under the terms of the GNU General Public License as published by
lib/libc/include/any-linux-any/linux/kexec.h+4
...@@ -22,12 +22,16 @@...@@ -22,12 +22,16 @@
22 * KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image.22 * KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image.
23 * KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd23 * KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd
24 * fd field.24 * fd field.
25 * KEXEC_FILE_FORCE_DTB : Force carrying over the current boot's DTB to the new
26 * kernel on x86. This is already the default behavior on
27 * some other architectures, like ARM64 and PowerPC.
25 */28 */
26#define KEXEC_FILE_UNLOAD 0x0000000129#define KEXEC_FILE_UNLOAD 0x00000001
27#define KEXEC_FILE_ON_CRASH 0x0000000230#define KEXEC_FILE_ON_CRASH 0x00000002
28#define KEXEC_FILE_NO_INITRAMFS 0x0000000431#define KEXEC_FILE_NO_INITRAMFS 0x00000004
29#define KEXEC_FILE_DEBUG 0x0000000832#define KEXEC_FILE_DEBUG 0x00000008
30#define KEXEC_FILE_NO_CMA 0x0000001033#define KEXEC_FILE_NO_CMA 0x00000010
34#define KEXEC_FILE_FORCE_DTB 0x00000020
3135
32/* These values match the ELF architecture values.36/* These values match the ELF architecture values.
33 * Unless there is a good reason that should continue to be the case.37 * Unless there is a good reason that should continue to be the case.
lib/libc/include/any-linux-any/linux/kfd_ioctl.h+2-2
...@@ -67,8 +67,8 @@ struct kfd_ioctl_get_version_args {...@@ -67,8 +67,8 @@ struct kfd_ioctl_get_version_args {
6767
68struct kfd_ioctl_create_queue_args {68struct kfd_ioctl_create_queue_args {
69 __u64 ring_base_address; /* to KFD */69 __u64 ring_base_address; /* to KFD */
70 __u64 write_pointer_address; /* from KFD */70 __u64 write_pointer_address; /* to KFD */
71 __u64 read_pointer_address; /* from KFD */71 __u64 read_pointer_address; /* to KFD */
72 __u64 doorbell_offset; /* from KFD */72 __u64 doorbell_offset; /* from KFD */
7373
74 __u32 ring_size; /* to KFD */74 __u32 ring_size; /* to KFD */
lib/libc/include/any-linux-any/linux/kvm.h+14
...@@ -179,6 +179,7 @@ struct kvm_xen_exit {...@@ -179,6 +179,7 @@ struct kvm_xen_exit {
179#define KVM_EXIT_LOONGARCH_IOCSR 38179#define KVM_EXIT_LOONGARCH_IOCSR 38
180#define KVM_EXIT_MEMORY_FAULT 39180#define KVM_EXIT_MEMORY_FAULT 39
181#define KVM_EXIT_TDX 40181#define KVM_EXIT_TDX 40
182#define KVM_EXIT_ARM_SEA 41
182183
183/* For KVM_EXIT_INTERNAL_ERROR */184/* For KVM_EXIT_INTERNAL_ERROR */
184/* Emulate instruction failed. */185/* Emulate instruction failed. */
...@@ -465,6 +466,14 @@ struct kvm_run {...@@ -465,6 +466,14 @@ struct kvm_run {
465 } setup_event_notify;466 } setup_event_notify;
466 };467 };
467 } tdx;468 } tdx;
469 /* KVM_EXIT_ARM_SEA */
470 struct {
471#define KVM_EXIT_ARM_SEA_FLAG_GPA_VALID (1ULL << 0)
472 __u64 flags;
473 __u64 esr;
474 __u64 gva;
475 __u64 gpa;
476 } arm_sea;
468 /* Fix the size of the union. */477 /* Fix the size of the union. */
469 char padding[256];478 char padding[256];
470 };479 };
...@@ -954,6 +963,9 @@ struct kvm_enable_cap {...@@ -954,6 +963,9 @@ struct kvm_enable_cap {
954#define KVM_CAP_ARM_EL2_E2H0 241963#define KVM_CAP_ARM_EL2_E2H0 241
955#define KVM_CAP_RISCV_MP_STATE_RESET 242964#define KVM_CAP_RISCV_MP_STATE_RESET 242
956#define KVM_CAP_ARM_CACHEABLE_PFNMAP_SUPPORTED 243965#define KVM_CAP_ARM_CACHEABLE_PFNMAP_SUPPORTED 243
966#define KVM_CAP_GUEST_MEMFD_FLAGS 244
967#define KVM_CAP_ARM_SEA_TO_USER 245
968#define KVM_CAP_S390_USER_OPEREXEC 246
957969
958struct kvm_irq_routing_irqchip {970struct kvm_irq_routing_irqchip {
959 __u32 irqchip;971 __u32 irqchip;
...@@ -1590,6 +1602,8 @@ struct kvm_memory_attributes {...@@ -1590,6 +1602,8 @@ struct kvm_memory_attributes {
1590#define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3)1602#define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3)
15911603
1592#define KVM_CREATE_GUEST_MEMFD _IOWR(KVMIO, 0xd4, struct kvm_create_guest_memfd)1604#define KVM_CREATE_GUEST_MEMFD _IOWR(KVMIO, 0xd4, struct kvm_create_guest_memfd)
1605#define GUEST_MEMFD_FLAG_MMAP (1ULL << 0)
1606#define GUEST_MEMFD_FLAG_INIT_SHARED (1ULL << 1)
15931607
1594struct kvm_create_guest_memfd {1608struct kvm_create_guest_memfd {
1595 __u64 size;1609 __u64 size;
lib/libc/include/any-linux-any/linux/landlock.h+17-20
...@@ -216,6 +216,23 @@ struct landlock_net_port_attr {...@@ -216,6 +216,23 @@ struct landlock_net_port_attr {
216 * :manpage:`ftruncate(2)`, :manpage:`creat(2)`, or :manpage:`open(2)` with216 * :manpage:`ftruncate(2)`, :manpage:`creat(2)`, or :manpage:`open(2)` with
217 * ``O_TRUNC``. This access right is available since the third version of the217 * ``O_TRUNC``. This access right is available since the third version of the
218 * Landlock ABI.218 * Landlock ABI.
219 * - %LANDLOCK_ACCESS_FS_IOCTL_DEV: Invoke :manpage:`ioctl(2)` commands on an opened
220 * character or block device.
221 *
222 * This access right applies to all `ioctl(2)` commands implemented by device
223 * drivers. However, the following common IOCTL commands continue to be
224 * invokable independent of the %LANDLOCK_ACCESS_FS_IOCTL_DEV right:
225 *
226 * * IOCTL commands targeting file descriptors (``FIOCLEX``, ``FIONCLEX``),
227 * * IOCTL commands targeting file descriptions (``FIONBIO``, ``FIOASYNC``),
228 * * IOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``,
229 * ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``)
230 * * Some IOCTL commands which do not make sense when used with devices, but
231 * whose implementations are safe and return the right error codes
232 * (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``)
233 *
234 * This access right is available since the fifth version of the Landlock
235 * ABI.
219 *236 *
220 * Whether an opened file can be truncated with :manpage:`ftruncate(2)` or used237 * Whether an opened file can be truncated with :manpage:`ftruncate(2)` or used
221 * with `ioctl(2)` is determined during :manpage:`open(2)`, in the same way as238 * with `ioctl(2)` is determined during :manpage:`open(2)`, in the same way as
...@@ -275,26 +292,6 @@ struct landlock_net_port_attr {...@@ -275,26 +292,6 @@ struct landlock_net_port_attr {
275 * If multiple requirements are not met, the ``EACCES`` error code takes292 * If multiple requirements are not met, the ``EACCES`` error code takes
276 * precedence over ``EXDEV``.293 * precedence over ``EXDEV``.
277 *294 *
278 * The following access right applies both to files and directories:
279 *
280 * - %LANDLOCK_ACCESS_FS_IOCTL_DEV: Invoke :manpage:`ioctl(2)` commands on an opened
281 * character or block device.
282 *
283 * This access right applies to all `ioctl(2)` commands implemented by device
284 * drivers. However, the following common IOCTL commands continue to be
285 * invokable independent of the %LANDLOCK_ACCESS_FS_IOCTL_DEV right:
286 *
287 * * IOCTL commands targeting file descriptors (``FIOCLEX``, ``FIONCLEX``),
288 * * IOCTL commands targeting file descriptions (``FIONBIO``, ``FIOASYNC``),
289 * * IOCTL commands targeting file systems (``FIFREEZE``, ``FITHAW``,
290 * ``FIGETBSZ``, ``FS_IOC_GETFSUUID``, ``FS_IOC_GETFSSYSFSPATH``)
291 * * Some IOCTL commands which do not make sense when used with devices, but
292 * whose implementations are safe and return the right error codes
293 * (``FS_IOC_FIEMAP``, ``FICLONE``, ``FICLONERANGE``, ``FIDEDUPERANGE``)
294 *
295 * This access right is available since the fifth version of the Landlock
296 * ABI.
297 *
298 * .. warning::295 * .. warning::
299 *296 *
300 * It is currently not possible to restrict some file-related actions297 * It is currently not possible to restrict some file-related actions
lib/libc/include/any-linux-any/linux/liveupdate.h created+216
...@@ -0,0 +1,216 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3/*
4 * Userspace interface for /dev/liveupdate
5 * Live Update Orchestrator
6 *
7 * Copyright (c) 2025, Google LLC.
8 * Pasha Tatashin <pasha.tatashin@soleen.com>
9 */
10
11#ifndef _LIVEUPDATE_H
12#define _LIVEUPDATE_H
13
14#include <linux/ioctl.h>
15#include <linux/types.h>
16
17/**
18 * DOC: General ioctl format
19 *
20 * The ioctl interface follows a general format to allow for extensibility. Each
21 * ioctl is passed in a structure pointer as the argument providing the size of
22 * the structure in the first u32. The kernel checks that any structure space
23 * beyond what it understands is 0. This allows userspace to use the backward
24 * compatible portion while consistently using the newer, larger, structures.
25 *
26 * ioctls use a standard meaning for common errnos:
27 *
28 * - ENOTTY: The IOCTL number itself is not supported at all
29 * - E2BIG: The IOCTL number is supported, but the provided structure has
30 * non-zero in a part the kernel does not understand.
31 * - EOPNOTSUPP: The IOCTL number is supported, and the structure is
32 * understood, however a known field has a value the kernel does not
33 * understand or support.
34 * - EINVAL: Everything about the IOCTL was understood, but a field is not
35 * correct.
36 * - ENOENT: A provided token does not exist.
37 * - ENOMEM: Out of memory.
38 * - EOVERFLOW: Mathematics overflowed.
39 *
40 * As well as additional errnos, within specific ioctls.
41 */
42
43/* The ioctl type, documented in ioctl-number.rst */
44#define LIVEUPDATE_IOCTL_TYPE 0xBA
45
46/* The maximum length of session name including null termination */
47#define LIVEUPDATE_SESSION_NAME_LENGTH 64
48
49/* The /dev/liveupdate ioctl commands */
50enum {
51 LIVEUPDATE_CMD_BASE = 0x00,
52 LIVEUPDATE_CMD_CREATE_SESSION = LIVEUPDATE_CMD_BASE,
53 LIVEUPDATE_CMD_RETRIEVE_SESSION = 0x01,
54};
55
56/* ioctl commands for session file descriptors */
57enum {
58 LIVEUPDATE_CMD_SESSION_BASE = 0x40,
59 LIVEUPDATE_CMD_SESSION_PRESERVE_FD = LIVEUPDATE_CMD_SESSION_BASE,
60 LIVEUPDATE_CMD_SESSION_RETRIEVE_FD = 0x41,
61 LIVEUPDATE_CMD_SESSION_FINISH = 0x42,
62};
63
64/**
65 * struct liveupdate_ioctl_create_session - ioctl(LIVEUPDATE_IOCTL_CREATE_SESSION)
66 * @size: Input; sizeof(struct liveupdate_ioctl_create_session)
67 * @fd: Output; The new file descriptor for the created session.
68 * @name: Input; A null-terminated string for the session name, max
69 * length %LIVEUPDATE_SESSION_NAME_LENGTH including termination
70 * character.
71 *
72 * Creates a new live update session for managing preserved resources.
73 * This ioctl can only be called on the main /dev/liveupdate device.
74 *
75 * Return: 0 on success, negative error code on failure.
76 */
77struct liveupdate_ioctl_create_session {
78 __u32 size;
79 __s32 fd;
80 __u8 name[LIVEUPDATE_SESSION_NAME_LENGTH];
81};
82
83#define LIVEUPDATE_IOCTL_CREATE_SESSION \
84 _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_CREATE_SESSION)
85
86/**
87 * struct liveupdate_ioctl_retrieve_session - ioctl(LIVEUPDATE_IOCTL_RETRIEVE_SESSION)
88 * @size: Input; sizeof(struct liveupdate_ioctl_retrieve_session)
89 * @fd: Output; The new file descriptor for the retrieved session.
90 * @name: Input; A null-terminated string identifying the session to retrieve.
91 * The name must exactly match the name used when the session was
92 * created in the previous kernel.
93 *
94 * Retrieves a handle (a new file descriptor) for a preserved session by its
95 * name. This is the primary mechanism for a userspace agent to regain control
96 * of its preserved resources after a live update.
97 *
98 * The userspace application provides the null-terminated `name` of a session
99 * it created before the live update. If a preserved session with a matching
100 * name is found, the kernel instantiates it and returns a new file descriptor
101 * in the `fd` field. This new session FD can then be used for all file-specific
102 * operations, such as restoring individual file descriptors with
103 * LIVEUPDATE_SESSION_RETRIEVE_FD.
104 *
105 * It is the responsibility of the userspace application to know the names of
106 * the sessions it needs to retrieve. If no session with the given name is
107 * found, the ioctl will fail with -ENOENT.
108 *
109 * This ioctl can only be called on the main /dev/liveupdate device when the
110 * system is in the LIVEUPDATE_STATE_UPDATED state.
111 */
112struct liveupdate_ioctl_retrieve_session {
113 __u32 size;
114 __s32 fd;
115 __u8 name[LIVEUPDATE_SESSION_NAME_LENGTH];
116};
117
118#define LIVEUPDATE_IOCTL_RETRIEVE_SESSION \
119 _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_RETRIEVE_SESSION)
120
121/* Session specific IOCTLs */
122
123/**
124 * struct liveupdate_session_preserve_fd - ioctl(LIVEUPDATE_SESSION_PRESERVE_FD)
125 * @size: Input; sizeof(struct liveupdate_session_preserve_fd)
126 * @fd: Input; The user-space file descriptor to be preserved.
127 * @token: Input; An opaque, unique token for preserved resource.
128 *
129 * Holds parameters for preserving a file descriptor.
130 *
131 * User sets the @fd field identifying the file descriptor to preserve
132 * (e.g., memfd, kvm, iommufd, VFIO). The kernel validates if this FD type
133 * and its dependencies are supported for preservation. If validation passes,
134 * the kernel marks the FD internally and *initiates the process* of preparing
135 * its state for saving. The actual snapshotting of the state typically occurs
136 * during the subsequent %LIVEUPDATE_IOCTL_PREPARE execution phase, though
137 * some finalization might occur during freeze.
138 * On successful validation and initiation, the kernel uses the @token
139 * field with an opaque identifier representing the resource being preserved.
140 * This token confirms the FD is targeted for preservation and is required for
141 * the subsequent %LIVEUPDATE_SESSION_RETRIEVE_FD call after the live update.
142 *
143 * Return: 0 on success (validation passed, preservation initiated), negative
144 * error code on failure (e.g., unsupported FD type, dependency issue,
145 * validation failed).
146 */
147struct liveupdate_session_preserve_fd {
148 __u32 size;
149 __s32 fd;
150 __aligned_u64 token;
151};
152
153#define LIVEUPDATE_SESSION_PRESERVE_FD \
154 _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_PRESERVE_FD)
155
156/**
157 * struct liveupdate_session_retrieve_fd - ioctl(LIVEUPDATE_SESSION_RETRIEVE_FD)
158 * @size: Input; sizeof(struct liveupdate_session_retrieve_fd)
159 * @fd: Output; The new file descriptor representing the fully restored
160 * kernel resource.
161 * @token: Input; An opaque, token that was used to preserve the resource.
162 *
163 * Retrieve a previously preserved file descriptor.
164 *
165 * User sets the @token field to the value obtained from a successful
166 * %LIVEUPDATE_IOCTL_FD_PRESERVE call before the live update. On success,
167 * the kernel restores the state (saved during the PREPARE/FREEZE phases)
168 * associated with the token and populates the @fd field with a new file
169 * descriptor referencing the restored resource in the current (new) kernel.
170 * This operation must be performed *before* signaling completion via
171 * %LIVEUPDATE_IOCTL_FINISH.
172 *
173 * Return: 0 on success, negative error code on failure (e.g., invalid token).
174 */
175struct liveupdate_session_retrieve_fd {
176 __u32 size;
177 __s32 fd;
178 __aligned_u64 token;
179};
180
181#define LIVEUPDATE_SESSION_RETRIEVE_FD \
182 _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_RETRIEVE_FD)
183
184/**
185 * struct liveupdate_session_finish - ioctl(LIVEUPDATE_SESSION_FINISH)
186 * @size: Input; sizeof(struct liveupdate_session_finish)
187 * @reserved: Input; Must be zero. Reserved for future use.
188 *
189 * Signals the completion of the restoration process for a retrieved session.
190 * This is the final operation that should be performed on a session file
191 * descriptor after a live update.
192 *
193 * This ioctl must be called once all required file descriptors for the session
194 * have been successfully retrieved (using %LIVEUPDATE_SESSION_RETRIEVE_FD) and
195 * are fully restored from the userspace and kernel perspective.
196 *
197 * Upon success, the kernel releases its ownership of the preserved resources
198 * associated with this session. This allows internal resources to be freed,
199 * typically by decrementing reference counts on the underlying preserved
200 * objects.
201 *
202 * If this operation fails, the resources remain preserved in memory. Userspace
203 * may attempt to call finish again. The resources will otherwise be reset
204 * during the next live update cycle.
205 *
206 * Return: 0 on success, negative error code on failure.
207 */
208struct liveupdate_session_finish {
209 __u32 size;
210 __u32 reserved;
211};
212
213#define LIVEUPDATE_SESSION_FINISH \
214 _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_FINISH)
215
216#endif /* _LIVEUPDATE_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/lockd_netlink.h+1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/lockd.yaml */3/* Documentation/netlink/specs/lockd.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_LOCKD_NETLINK_H7#ifndef _LINUX_LOCKD_NETLINK_H
7#define _LINUX_LOCKD_NETLINK_H8#define _LINUX_LOCKD_NETLINK_H
lib/libc/include/any-linux-any/linux/magic.h+1
...@@ -103,5 +103,6 @@...@@ -103,5 +103,6 @@
103#define DEVMEM_MAGIC 0x454d444d /* "DMEM" */103#define DEVMEM_MAGIC 0x454d444d /* "DMEM" */
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" */
106107
107#endif /* __LINUX_MAGIC_H__ */108#endif /* __LINUX_MAGIC_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/map_benchmark.h created+35
...@@ -0,0 +1,35 @@
1/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2/*
3 * Copyright (C) 2022-2025 HiSilicon Limited.
4 */
5
6#ifndef _DMA_BENCHMARK_H
7#define _DMA_BENCHMARK_H
8
9#include <linux/types.h>
10
11#define DMA_MAP_BENCHMARK _IOWR('d', 1, struct map_benchmark)
12#define DMA_MAP_MAX_THREADS 1024
13#define DMA_MAP_MAX_SECONDS 300
14#define DMA_MAP_MAX_TRANS_DELAY (10 * NSEC_PER_MSEC)
15
16#define DMA_MAP_BIDIRECTIONAL 0
17#define DMA_MAP_TO_DEVICE 1
18#define DMA_MAP_FROM_DEVICE 2
19
20struct map_benchmark {
21 __u64 avg_map_100ns; /* average map latency in 100ns */
22 __u64 map_stddev; /* standard deviation of map latency */
23 __u64 avg_unmap_100ns; /* as above */
24 __u64 unmap_stddev;
25 __u32 threads; /* how many threads will do map/unmap in parallel */
26 __u32 seconds; /* how long the test will last */
27 __s32 node; /* which numa node this benchmark will run on */
28 __u32 dma_bits; /* DMA addressing capability */
29 __u32 dma_dir; /* DMA data direction */
30 __u32 dma_trans_ns; /* time for DMA transmission in ns */
31 __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */
32 __u8 expansion[76]; /* For future use */
33};
34
35#endif /* _DMA_BENCHMARK_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/mdio.h+21-2
...@@ -116,10 +116,24 @@...@@ -116,10 +116,24 @@
116#define MDIO_CTRL1_SPEED10G (MDIO_CTRL1_SPEEDSELEXT | 0x00)116#define MDIO_CTRL1_SPEED10G (MDIO_CTRL1_SPEEDSELEXT | 0x00)
117/* 10PASS-TS/2BASE-TL */117/* 10PASS-TS/2BASE-TL */
118#define MDIO_CTRL1_SPEED10P2B (MDIO_CTRL1_SPEEDSELEXT | 0x04)118#define MDIO_CTRL1_SPEED10P2B (MDIO_CTRL1_SPEEDSELEXT | 0x04)
119/* Note: the MDIO_CTRL1_SPEED_XXX values for everything past 10PASS-TS/2BASE-TL
120 * do not match between the PCS and PMA values. Any additions past this point
121 * should be PMA or PCS specific. The following 2 defines are workarounds for
122 * values added before this was caught. They should be considered deprecated.
123 */
124#define MDIO_CTRL1_SPEED2_5G MDIO_PMA_CTRL1_SPEED2_5G
125#define MDIO_CTRL1_SPEED5G MDIO_PMA_CTRL1_SPEED5G
126/* 100 Gb/s */
127#define MDIO_PCS_CTRL1_SPEED100G (MDIO_CTRL1_SPEEDSELEXT | 0x10)
128/* 25 Gb/s */
129#define MDIO_PCS_CTRL1_SPEED25G (MDIO_CTRL1_SPEEDSELEXT | 0x14)
130/* 50 Gb/s */
131#define MDIO_PCS_CTRL1_SPEED50G (MDIO_CTRL1_SPEEDSELEXT | 0x18)
119/* 2.5 Gb/s */132/* 2.5 Gb/s */
120#define MDIO_CTRL1_SPEED2_5G (MDIO_CTRL1_SPEEDSELEXT | 0x18)133#define MDIO_PMA_CTRL1_SPEED2_5G (MDIO_CTRL1_SPEEDSELEXT | 0x18)
121/* 5 Gb/s */134/* 5 Gb/s */
122#define MDIO_CTRL1_SPEED5G (MDIO_CTRL1_SPEEDSELEXT | 0x1c)135#define MDIO_PMA_CTRL1_SPEED5G (MDIO_CTRL1_SPEEDSELEXT | 0x1c)
136
123137
124/* Status register 1. */138/* Status register 1. */
125#define MDIO_STAT1_LPOWERABLE 0x0002 /* Low-power ability */139#define MDIO_STAT1_LPOWERABLE 0x0002 /* Low-power ability */
...@@ -133,6 +147,11 @@...@@ -133,6 +147,11 @@
133#define MDIO_AN_STAT1_PAGE 0x0040 /* Page received */147#define MDIO_AN_STAT1_PAGE 0x0040 /* Page received */
134#define MDIO_AN_STAT1_XNP 0x0080 /* Extended next page status */148#define MDIO_AN_STAT1_XNP 0x0080 /* Extended next page status */
135149
150/* Device Identifier 2 */
151#define MDIO_DEVID2_OUI 0xfc00 /* OUI Portion of PHY ID */
152#define MDIO_DEVID2_MODEL_NUM 0x03f0 /* Manufacturer's Model Number */
153#define MDIO_DEVID2_REV_NUM 0x000f /* Revision Number */
154
136/* Speed register. */155/* Speed register. */
137#define MDIO_SPEED_10G 0x0001 /* 10G capable */156#define MDIO_SPEED_10G 0x0001 /* 10G capable */
138#define MDIO_PMA_SPEED_2B 0x0002 /* 2BASE-TL capable */157#define MDIO_PMA_SPEED_2B 0x0002 /* 2BASE-TL capable */
lib/libc/include/any-linux-any/linux/media-bus-format.h+7-2
...@@ -34,7 +34,7 @@...@@ -34,7 +34,7 @@
3434
35#define MEDIA_BUS_FMT_FIXED 0x000135#define MEDIA_BUS_FMT_FIXED 0x0001
3636
37/* RGB - next is 0x1028 */37/* RGB - next is 0x1029 */
38#define MEDIA_BUS_FMT_RGB444_1X12 0x101638#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
39#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x100139#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
40#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x100240#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
...@@ -74,6 +74,7 @@...@@ -74,6 +74,7 @@
74#define MEDIA_BUS_FMT_RGB888_1X36_CPADLO 0x102174#define MEDIA_BUS_FMT_RGB888_1X36_CPADLO 0x1021
75#define MEDIA_BUS_FMT_RGB121212_1X36 0x101975#define MEDIA_BUS_FMT_RGB121212_1X36 0x1019
76#define MEDIA_BUS_FMT_RGB161616_1X48 0x101a76#define MEDIA_BUS_FMT_RGB161616_1X48 0x101a
77#define MEDIA_BUS_FMT_RGB202020_1X60 0x1028
7778
78/* YUV (including grey) - next is 0x202f */79/* YUV (including grey) - next is 0x202f */
79#define MEDIA_BUS_FMT_Y8_1X8 0x200180#define MEDIA_BUS_FMT_Y8_1X8 0x2001
...@@ -123,7 +124,7 @@...@@ -123,7 +124,7 @@
123#define MEDIA_BUS_FMT_YUV16_1X48 0x202a124#define MEDIA_BUS_FMT_YUV16_1X48 0x202a
124#define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b125#define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b
125126
126/* Bayer - next is 0x3021 */127/* Bayer - next is 0x3025 */
127#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001128#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001
128#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013129#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013
129#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002130#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002
...@@ -156,6 +157,10 @@...@@ -156,6 +157,10 @@
156#define MEDIA_BUS_FMT_SGBRG16_1X16 0x301e157#define MEDIA_BUS_FMT_SGBRG16_1X16 0x301e
157#define MEDIA_BUS_FMT_SGRBG16_1X16 0x301f158#define MEDIA_BUS_FMT_SGRBG16_1X16 0x301f
158#define MEDIA_BUS_FMT_SRGGB16_1X16 0x3020159#define MEDIA_BUS_FMT_SRGGB16_1X16 0x3020
160#define MEDIA_BUS_FMT_SBGGR20_1X20 0x3021
161#define MEDIA_BUS_FMT_SGBRG20_1X20 0x3022
162#define MEDIA_BUS_FMT_SGRBG20_1X20 0x3023
163#define MEDIA_BUS_FMT_SRGGB20_1X20 0x3024
159164
160/* JPEG compressed formats - next is 0x4002 */165/* JPEG compressed formats - next is 0x4002 */
161#define MEDIA_BUS_FMT_JPEG_1X8 0x4001166#define MEDIA_BUS_FMT_JPEG_1X8 0x4001
lib/libc/include/any-linux-any/linux/media/amlogic/c3-isp-config.h+17-69
...@@ -8,6 +8,8 @@...@@ -8,6 +8,8 @@
88
9#include <linux/types.h>9#include <linux/types.h>
1010
11#include <linux/media/v4l2-isp.h>
12
11/*13/*
12 * Frames are split into zones of almost equal width and height - a zone is a14 * Frames are split into zones of almost equal width and height - a zone is a
13 * rectangular tile of a frame. The metering blocks within the ISP collect15 * rectangular tile of a frame. The metering blocks within the ISP collect
...@@ -141,7 +143,7 @@ struct c3_isp_stats_info {...@@ -141,7 +143,7 @@ struct c3_isp_stats_info {
141 * @C3_ISP_PARAMS_BUFFER_V0: First version of C3 ISP parameters block143 * @C3_ISP_PARAMS_BUFFER_V0: First version of C3 ISP parameters block
142 */144 */
143enum c3_isp_params_buffer_version {145enum c3_isp_params_buffer_version {
144 C3_ISP_PARAMS_BUFFER_V0,146 C3_ISP_PARAMS_BUFFER_V0 = V4L2_ISP_PARAMS_VERSION_V0,
145};147};
146148
147/**149/**
...@@ -176,62 +178,23 @@ enum c3_isp_params_block_type {...@@ -176,62 +178,23 @@ enum c3_isp_params_block_type {
176 C3_ISP_PARAMS_BLOCK_SENTINEL178 C3_ISP_PARAMS_BLOCK_SENTINEL
177};179};
178180
179#define C3_ISP_PARAMS_BLOCK_FL_DISABLE (1U << 0)181/* For backward compatibility */
180#define C3_ISP_PARAMS_BLOCK_FL_ENABLE (1U << 1)182#define C3_ISP_PARAMS_BLOCK_FL_DISABLE V4L2_ISP_PARAMS_FL_BLOCK_DISABLE
183#define C3_ISP_PARAMS_BLOCK_FL_ENABLE V4L2_ISP_PARAMS_FL_BLOCK_ENABLE
181184
182/**185/**
183 * struct c3_isp_params_block_header - C3 ISP parameter block header186 * c3_isp_params_block_header - C3 ISP parameter block header
184 *187 *
185 * This structure represents the common part of all the ISP configuration188 * This structure represents the common part of all the ISP configuration
186 * blocks. Each parameters block shall embed an instance of this structure type189 * blocks and is identical to :c:type:`v4l2_isp_params_block_header`.
187 * as its first member, followed by the block-specific configuration data. The
188 * driver inspects this common header to discern the block type and its size and
189 * properly handle the block content by casting it to the correct block-specific
190 * type.
191 *190 *
192 * The @type field is one of the values enumerated by191 * The type field is one of the values enumerated by
193 * :c:type:`c3_isp_params_block_type` and specifies how the data should be192 * :c:type:`c3_isp_params_block_type` and specifies how the data should be
194 * interpreted by the driver. The @size field specifies the size of the193 * interpreted by the driver.
195 * parameters block and is used by the driver for validation purposes. The
196 * @flags field is a bitmask of per-block flags C3_ISP_PARAMS_FL*.
197 *
198 * When userspace wants to disable an ISP block the
199 * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit should be set in the @flags field. In
200 * this case userspace may optionally omit the remainder of the configuration
201 * block, which will be ignored by the driver.
202 *
203 * When a new configuration of an ISP block needs to be applied userspace
204 * shall fully populate the ISP block and omit setting the
205 * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit in the @flags field.
206 *
207 * Userspace is responsible for correctly populating the parameters block header
208 * fields (@type, @flags and @size) and the block-specific parameters.
209 *
210 * For example:
211 *
212 * .. code-block:: c
213 *194 *
214 * void populate_pst_gamma(struct c3_isp_params_block_header *block) {195 * The flags field is a bitmask of per-block flags C3_ISP_PARAMS_FL_*.
215 * struct c3_isp_params_pst_gamma *gamma =
216 * (struct c3_isp_params_pst_gamma *)block;
217 *
218 * gamma->header.type = C3_ISP_PARAMS_BLOCK_PST_GAMMA;
219 * gamma->header.flags = C3_ISP_PARAMS_BLOCK_FL_ENABLE;
220 * gamma->header.size = sizeof(*gamma);
221 *
222 * for (unsigned int i = 0; i < 129; i++)
223 * gamma->pst_gamma_lut[i] = i;
224 * }
225 *
226 * @type: The parameters block type from :c:type:`c3_isp_params_block_type`
227 * @flags: A bitmask of block flags
228 * @size: Size (in bytes) of the parameters block, including this header
229 */196 */
230struct c3_isp_params_block_header {197#define c3_isp_params_block_header v4l2_isp_params_block_header
231 __u16 type;
232 __u16 flags;
233 __u32 size;
234};
235198
236/**199/**
237 * struct c3_isp_params_awb_gains - Gains for auto-white balance200 * struct c3_isp_params_awb_gains - Gains for auto-white balance
...@@ -498,26 +461,10 @@ struct c3_isp_params_blc {...@@ -498,26 +461,10 @@ struct c3_isp_params_blc {
498/**461/**
499 * struct c3_isp_params_cfg - C3 ISP configuration parameters462 * struct c3_isp_params_cfg - C3 ISP configuration parameters
500 *463 *
501 * This struct contains the configuration parameters of the C3 ISP464 * This is the driver-specific implementation of
502 * algorithms, serialized by userspace into an opaque data buffer. Each465 * :c:type:`v4l2_isp_params_buffer`.
503 * configuration parameter block is represented by a block-specific structure466 *
504 * which contains a :c:type:`c3_isp_param_block_header` entry as first467 * Currently only C3_ISP_PARAM_BUFFER_V0 is supported.
505 * member. Userspace populates the @data buffer with configuration parameters
506 * for the blocks that it intends to configure. As a consequence, the data
507 * buffer effective size changes according to the number of ISP blocks that
508 * userspace intends to configure.
509 *
510 * The parameters buffer is versioned by the @version field to allow modifying
511 * and extending its definition. Userspace should populate the @version field to
512 * inform the driver about the version it intends to use. The driver will parse
513 * and handle the @data buffer according to the data layout specific to the
514 * indicated revision and return an error if the desired revision is not
515 * supported.
516 *
517 * For each ISP block that userspace wants to configure, a block-specific
518 * structure is appended to the @data buffer, one after the other without gaps
519 * in between nor overlaps. Userspace shall populate the @total_size field with
520 * the effective size, in bytes, of the @data buffer.
521 *468 *
522 * The expected memory layout of the parameters buffer is::469 * The expected memory layout of the parameters buffer is::
523 *470 *
...@@ -561,4 +508,5 @@ struct c3_isp_params_cfg {...@@ -561,4 +508,5 @@ struct c3_isp_params_cfg {
561 __u8 data[C3_ISP_PARAMS_MAX_SIZE];508 __u8 data[C3_ISP_PARAMS_MAX_SIZE];
562};509};
563510
511
564#endif512#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/media/arm/mali-c55-config.h created+785
...@@ -0,0 +1,785 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * ARM Mali-C55 ISP Driver - Userspace API
4 *
5 * Copyright (C) 2023 Ideas on Board Oy
6 */
7
8#ifndef __UAPI_MALI_C55_CONFIG_H
9#define __UAPI_MALI_C55_CONFIG_H
10
11#include <linux/types.h>
12#include <linux/v4l2-controls.h>
13#include <linux/media/v4l2-isp.h>
14
15#define V4L2_CID_MALI_C55_CAPABILITIES (V4L2_CID_USER_MALI_C55_BASE + 0x0)
16#define MALI_C55_GPS_PONG (1U << 0)
17#define MALI_C55_GPS_WDR (1U << 1)
18#define MALI_C55_GPS_COMPRESSION (1U << 2)
19#define MALI_C55_GPS_TEMPER (1U << 3)
20#define MALI_C55_GPS_SINTER_LITE (1U << 4)
21#define MALI_C55_GPS_SINTER (1U << 5)
22#define MALI_C55_GPS_IRIDIX_LTM (1U << 6)
23#define MALI_C55_GPS_IRIDIX_GTM (1U << 7)
24#define MALI_C55_GPS_CNR (1U << 8)
25#define MALI_C55_GPS_FRSCALER (1U << 9)
26#define MALI_C55_GPS_DS_PIPE (1U << 10)
27
28/*
29 * Frames are split into zones of almost equal width and height - a zone is a
30 * rectangular tile of a frame. The metering blocks within the ISP collect
31 * aggregated statistics per zone. A maximum of 15x15 zones can be configured,
32 * and so the statistics buffer within the hardware is sized to accommodate
33 * that.
34 *
35 * The utilised number of zones is runtime configurable.
36 */
37#define MALI_C55_MAX_ZONES (15 * 15)
38
39/**
40 * struct mali_c55_ae_1024bin_hist - Auto Exposure 1024-bin histogram statistics
41 *
42 * @bins: 1024 element array of 16-bit pixel counts.
43 *
44 * The 1024-bin histogram module collects image-global but zone-weighted
45 * intensity distributions of pixels in fixed-width bins. The modules can be
46 * configured into different "plane modes" which affect the contents of the
47 * collected statistics. In plane mode 0, pixel intensities are taken regardless
48 * of colour plane into a single 1024-bin histogram with a bin width of 4. In
49 * plane mode 1, four 256-bin histograms with a bin width of 16 are collected -
50 * one for each CFA colour plane. In plane modes 4, 5, 6 and 7 two 512-bin
51 * histograms with a bin width of 8 are collected - in each mode one of the
52 * colour planes is collected into the first histogram and all the others are
53 * combined into the second. The histograms are stored consecutively in the bins
54 * array.
55 *
56 * The 16-bit pixel counts are stored as a 4-bit exponent in the most
57 * significant bits followed by a 12-bit mantissa. Conversion to a usable
58 * format can be done according to the following pseudo-code::
59 *
60 * if (e == 0) {
61 * bin = m * 2;
62 * } else {
63 * bin = (m + 4096) * 2^e
64 * }
65 *
66 * where
67 * e is the exponent value in range 0..15
68 * m is the mantissa value in range 0..4095
69 *
70 * The pixels used in calculating the statistics can be masked using three
71 * methods:
72 *
73 * 1. Pixels can be skipped in X and Y directions independently.
74 * 2. Minimum/Maximum intensities can be configured
75 * 3. Zones can be differentially weighted, including 0 weighted to mask them
76 *
77 * The data for this histogram can be collected from different tap points in the
78 * ISP depending on configuration - after the white balance or digital gain
79 * blocks, or immediately after the input crossbar.
80 */
81struct mali_c55_ae_1024bin_hist {
82 __u16 bins[1024];
83} __attribute__((packed));
84
85/**
86 * struct mali_c55_ae_5bin_hist - Auto Exposure 5-bin histogram statistics
87 *
88 * @hist0: 16-bit normalised pixel count for the 0th intensity bin
89 * @hist1: 16-bit normalised pixel count for the 1st intensity bin
90 * @hist3: 16-bit normalised pixel count for the 3rd intensity bin
91 * @hist4: 16-bit normalised pixel count for the 4th intensity bin
92 *
93 * The ISP generates a 5-bin histogram of normalised pixel counts within bins of
94 * pixel intensity for each of 225 possible zones within a frame. The centre bin
95 * of the histogram for each zone is not available from the hardware and must be
96 * calculated by subtracting the values of hist0, hist1, hist3 and hist4 from
97 * 0xffff as in the following equation:
98 *
99 * hist2 = 0xffff - (hist0 + hist1 + hist3 + hist4)
100 */
101struct mali_c55_ae_5bin_hist {
102 __u16 hist0;
103 __u16 hist1;
104 __u16 hist3;
105 __u16 hist4;
106} __attribute__((packed));
107
108/**
109 * struct mali_c55_awb_average_ratios - Auto White Balance colour ratios
110 *
111 * @avg_rg_gr: Average R/G or G/R ratio in Q4.8 format.
112 * @avg_bg_br: Average B/G or B/R ratio in Q4.8 format.
113 * @num_pixels: The number of pixels used in the AWB calculation
114 *
115 * The ISP calculates and collects average colour ratios for each zone in an
116 * image and stores them in Q4.8 format (the lowest 8 bits are fractional, with
117 * bits [11:8] representing the integer). The exact ratios collected (either
118 * R/G, B/G or G/R, B/R) are configurable through the parameters buffer. The
119 * value of the 4 high bits is undefined.
120 */
121struct mali_c55_awb_average_ratios {
122 __u16 avg_rg_gr;
123 __u16 avg_bg_br;
124 __u32 num_pixels;
125} __attribute__((packed));
126
127/**
128 * struct mali_c55_af_statistics - Auto Focus edge and intensity statistics
129 *
130 * @intensity_stats: Packed mantissa and exponent value for pixel intensity
131 * @edge_stats: Packed mantissa and exponent values for edge intensity
132 *
133 * The ISP collects the squared sum of pixel intensities for each zone within a
134 * configurable Region of Interest on the frame. Additionally, the same data are
135 * collected after being passed through a bandpass filter which removes high and
136 * low frequency components - these are referred to as the edge statistics.
137 *
138 * The intensity and edge statistics for a zone can be used to calculate the
139 * contrast information for a zone
140 *
141 * C = E2 / I2
142 *
143 * Where I2 is the intensity statistic for a zone and E2 is the edge statistic
144 * for that zone. Optimum focus is reached when C is at its maximum.
145 *
146 * The intensity and edge statistics are stored packed into a non-standard 16
147 * bit floating point format, where the 7 most significant bits represent the
148 * exponent and the 9 least significant bits the mantissa. This format can be
149 * unpacked with the following pseudocode::
150 *
151 * if (e == 0) {
152 * x = m;
153 * } else {
154 * x = 2^e-1 * (m + 2^9)
155 * }
156 *
157 * where
158 * e is the exponent value in range 0..127
159 * m is the mantissa value in range 0..511
160 */
161struct mali_c55_af_statistics {
162 __u16 intensity_stats;
163 __u16 edge_stats;
164} __attribute__((packed));
165
166/**
167 * struct mali_c55_stats_buffer - 3A statistics for the mali-c55 ISP
168 *
169 * @ae_1024bin_hist: 1024-bin frame-global pixel intensity histogram
170 * @iridix_1024bin_hist: Post-Iridix block 1024-bin histogram
171 * @ae_5bin_hists: 5-bin pixel intensity histograms for AEC
172 * @reserved1: Undefined buffer space
173 * @awb_ratios: Color balance ratios for Auto White Balance
174 * @reserved2: Undefined buffer space
175 * @af_statistics: Pixel intensity statistics for Auto Focus
176 * @reserved3: Undefined buffer space
177 *
178 * This struct describes the metering statistics space in the Mali-C55 ISP's
179 * hardware in its entirety. The space between each defined area is marked as
180 * "unknown" and may not be 0, but should not be used. The @ae_5bin_hists,
181 * @awb_ratios and @af_statistics members are arrays of statistics per-zone.
182 * The zones are arranged in the array in raster order starting from the top
183 * left corner of the image.
184 */
185
186struct mali_c55_stats_buffer {
187 struct mali_c55_ae_1024bin_hist ae_1024bin_hist;
188 struct mali_c55_ae_1024bin_hist iridix_1024bin_hist;
189 struct mali_c55_ae_5bin_hist ae_5bin_hists[MALI_C55_MAX_ZONES];
190 __u32 reserved1[14];
191 struct mali_c55_awb_average_ratios awb_ratios[MALI_C55_MAX_ZONES];
192 __u32 reserved2[14];
193 struct mali_c55_af_statistics af_statistics[MALI_C55_MAX_ZONES];
194 __u32 reserved3[15];
195} __attribute__((packed));
196
197/**
198 * enum mali_c55_param_block_type - Enumeration of Mali-C55 parameter blocks
199 *
200 * This enumeration defines the types of Mali-C55 parameters block. Each block
201 * configures a specific processing block of the Mali-C55 ISP. The block
202 * type allows the driver to correctly interpret the parameters block data.
203 *
204 * It is the responsibility of userspace to correctly set the type of each
205 * parameters block.
206 *
207 * @MALI_C55_PARAM_BLOCK_SENSOR_OFFS: Sensor pre-shading black level offset
208 * @MALI_C55_PARAM_BLOCK_AEXP_HIST: Auto-exposure 1024-bin histogram
209 * configuration
210 * @MALI_C55_PARAM_BLOCK_AEXP_IHIST: Post-Iridix auto-exposure 1024-bin
211 * histogram configuration
212 * @MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS: Auto-exposure 1024-bin histogram
213 * weighting
214 * @MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS: Post-Iridix auto-exposure 1024-bin
215 * histogram weighting
216 * @MALI_C55_PARAM_BLOCK_DIGITAL_GAIN: Digital gain
217 * @MALI_C55_PARAM_BLOCK_AWB_GAINS: Auto-white balance gains
218 * @MALI_C55_PARAM_BLOCK_AWB_CONFIG: Auto-white balance statistics config
219 * @MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP: Auto-white balance gains for AEXP-0 tap
220 * @MALI_C55_PARAM_MESH_SHADING_CONFIG : Mesh shading tables configuration
221 * @MALI_C55_PARAM_MESH_SHADING_SELECTION: Mesh shading table selection
222 */
223enum mali_c55_param_block_type {
224 MALI_C55_PARAM_BLOCK_SENSOR_OFFS,
225 MALI_C55_PARAM_BLOCK_AEXP_HIST,
226 MALI_C55_PARAM_BLOCK_AEXP_IHIST,
227 MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS,
228 MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS,
229 MALI_C55_PARAM_BLOCK_DIGITAL_GAIN,
230 MALI_C55_PARAM_BLOCK_AWB_GAINS,
231 MALI_C55_PARAM_BLOCK_AWB_CONFIG,
232 MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP,
233 MALI_C55_PARAM_MESH_SHADING_CONFIG,
234 MALI_C55_PARAM_MESH_SHADING_SELECTION,
235};
236
237/**
238 * struct mali_c55_params_sensor_off_preshading - offset subtraction for each
239 * color channel
240 *
241 * Provides removal of the sensor black level from the sensor data. Separate
242 * offsets are provided for each of the four Bayer component color channels
243 * which are defaulted to R, Gr, Gb, B.
244 *
245 * header.type should be set to MALI_C55_PARAM_BLOCK_SENSOR_OFFS from
246 * :c:type:`mali_c55_param_block_type` for this block.
247 *
248 * @header: The Mali-C55 parameters block header
249 * @chan00: Offset for color channel 00 (default: R)
250 * @chan01: Offset for color channel 01 (default: Gr)
251 * @chan10: Offset for color channel 10 (default: Gb)
252 * @chan11: Offset for color channel 11 (default: B)
253 */
254struct mali_c55_params_sensor_off_preshading {
255 struct v4l2_isp_params_block_header header;
256 __u32 chan00;
257 __u32 chan01;
258 __u32 chan10;
259 __u32 chan11;
260};
261
262/**
263 * enum mali_c55_aexp_hist_tap_points - Tap points for the AEXP histogram
264 * @MALI_C55_AEXP_HIST_TAP_WB: After static white balance
265 * @MALI_C55_AEXP_HIST_TAP_FS: After WDR Frame Stitch
266 * @MALI_C55_AEXP_HIST_TAP_TPG: After the test pattern generator
267 */
268enum mali_c55_aexp_hist_tap_points {
269 MALI_C55_AEXP_HIST_TAP_WB = 0,
270 MALI_C55_AEXP_HIST_TAP_FS,
271 MALI_C55_AEXP_HIST_TAP_TPG,
272};
273
274/**
275 * enum mali_c55_aexp_skip_x - Horizontal pixel skipping
276 * @MALI_C55_AEXP_SKIP_X_EVERY_2ND: Collect every 2nd pixel horizontally
277 * @MALI_C55_AEXP_SKIP_X_EVERY_3RD: Collect every 3rd pixel horizontally
278 * @MALI_C55_AEXP_SKIP_X_EVERY_4TH: Collect every 4th pixel horizontally
279 * @MALI_C55_AEXP_SKIP_X_EVERY_5TH: Collect every 5th pixel horizontally
280 * @MALI_C55_AEXP_SKIP_X_EVERY_8TH: Collect every 8th pixel horizontally
281 * @MALI_C55_AEXP_SKIP_X_EVERY_9TH: Collect every 9th pixel horizontally
282 */
283enum mali_c55_aexp_skip_x {
284 MALI_C55_AEXP_SKIP_X_EVERY_2ND,
285 MALI_C55_AEXP_SKIP_X_EVERY_3RD,
286 MALI_C55_AEXP_SKIP_X_EVERY_4TH,
287 MALI_C55_AEXP_SKIP_X_EVERY_5TH,
288 MALI_C55_AEXP_SKIP_X_EVERY_8TH,
289 MALI_C55_AEXP_SKIP_X_EVERY_9TH
290};
291
292/**
293 * enum mali_c55_aexp_skip_y - Vertical pixel skipping
294 * @MALI_C55_AEXP_SKIP_Y_ALL: Collect every single pixel vertically
295 * @MALI_C55_AEXP_SKIP_Y_EVERY_2ND: Collect every 2nd pixel vertically
296 * @MALI_C55_AEXP_SKIP_Y_EVERY_3RD: Collect every 3rd pixel vertically
297 * @MALI_C55_AEXP_SKIP_Y_EVERY_4TH: Collect every 4th pixel vertically
298 * @MALI_C55_AEXP_SKIP_Y_EVERY_5TH: Collect every 5th pixel vertically
299 * @MALI_C55_AEXP_SKIP_Y_EVERY_8TH: Collect every 8th pixel vertically
300 * @MALI_C55_AEXP_SKIP_Y_EVERY_9TH: Collect every 9th pixel vertically
301 */
302enum mali_c55_aexp_skip_y {
303 MALI_C55_AEXP_SKIP_Y_ALL,
304 MALI_C55_AEXP_SKIP_Y_EVERY_2ND,
305 MALI_C55_AEXP_SKIP_Y_EVERY_3RD,
306 MALI_C55_AEXP_SKIP_Y_EVERY_4TH,
307 MALI_C55_AEXP_SKIP_Y_EVERY_5TH,
308 MALI_C55_AEXP_SKIP_Y_EVERY_8TH,
309 MALI_C55_AEXP_SKIP_Y_EVERY_9TH
310};
311
312/**
313 * enum mali_c55_aexp_row_column_offset - Start from the first or second row or
314 * column
315 * @MALI_C55_AEXP_FIRST_ROW_OR_COL: Start from the first row / column
316 * @MALI_C55_AEXP_SECOND_ROW_OR_COL: Start from the second row / column
317 */
318enum mali_c55_aexp_row_column_offset {
319 MALI_C55_AEXP_FIRST_ROW_OR_COL = 1,
320 MALI_C55_AEXP_SECOND_ROW_OR_COL = 2,
321};
322
323/**
324 * enum mali_c55_aexp_hist_plane_mode - Mode for the AEXP Histograms
325 * @MALI_C55_AEXP_HIST_COMBINED: All color planes in one 1024-bin histogram
326 * @MALI_C55_AEXP_HIST_SEPARATE: Each color plane in one 256-bin histogram with a bin width of 16
327 * @MALI_C55_AEXP_HIST_FOCUS_00: Top left plane in the first bank, rest in second bank
328 * @MALI_C55_AEXP_HIST_FOCUS_01: Top right plane in the first bank, rest in second bank
329 * @MALI_C55_AEXP_HIST_FOCUS_10: Bottom left plane in the first bank, rest in second bank
330 * @MALI_C55_AEXP_HIST_FOCUS_11: Bottom right plane in the first bank, rest in second bank
331 *
332 * In the "focus" modes statistics are collected into two 512-bin histograms
333 * with a bin width of 8. One colour plane is in the first histogram with the
334 * remainder combined into the second. The four options represent which of the
335 * four positions in a bayer pattern are the focused plane.
336 */
337enum mali_c55_aexp_hist_plane_mode {
338 MALI_C55_AEXP_HIST_COMBINED = 0,
339 MALI_C55_AEXP_HIST_SEPARATE = 1,
340 MALI_C55_AEXP_HIST_FOCUS_00 = 4,
341 MALI_C55_AEXP_HIST_FOCUS_01 = 5,
342 MALI_C55_AEXP_HIST_FOCUS_10 = 6,
343 MALI_C55_AEXP_HIST_FOCUS_11 = 7,
344};
345
346/**
347 * struct mali_c55_params_aexp_hist - configuration for AEXP metering hists
348 *
349 * This struct allows users to configure the 1024-bin AEXP histograms. Broadly
350 * speaking the parameters allow you to mask particular regions of the image and
351 * to select different kinds of histogram.
352 *
353 * The skip_x, offset_x, skip_y and offset_y fields allow users to ignore or
354 * mask pixels in the frame by their position relative to the top left pixel.
355 * First, the skip_y, offset_x and offset_y fields define which of the pixels
356 * within each 2x2 region will be counted in the statistics.
357 *
358 * If skip_y == 0 then two pixels from each covered region will be counted. If
359 * both offset_x and offset_y are zero, then the two left-most pixels in each
360 * 2x2 pixel region will be counted. Setting offset_x = 1 will discount the top
361 * left pixel and count the top right pixel. Setting offset_y = 1 will discount
362 * the bottom left pixel and count the bottom right pixel.
363 *
364 * If skip_y != 0 then only a single pixel from each region covered by the
365 * pattern will be counted. In this case offset_x controls whether the pixel
366 * that's counted is in the left (if offset_x == 0) or right (if offset_x == 1)
367 * column and offset_y controls whether the pixel that's counted is in the top
368 * (if offset_y == 0) or bottom (if offset_y == 1) row.
369 *
370 * The skip_x and skip_y fields control how the 2x2 pixel region is repeated
371 * across the image data. The first instance of the region is always in the top
372 * left of the image data. The skip_x field controls how many pixels are ignored
373 * in the x direction before the pixel masking region is repeated. The skip_y
374 * field controls how many pixels are ignored in the y direction before the
375 * pixel masking region is repeated.
376 *
377 * These fields can be used to reduce the number of pixels counted for the
378 * statistics, but it's important to be careful to configure them correctly.
379 * Some combinations of values will result in colour components from the input
380 * data being ignored entirely, for example in the following configuration:
381 *
382 * skip_x = 0
383 * offset_x = 0
384 * skip_y = 0
385 * offset_y = 0
386 *
387 * Only the R and Gb components of RGGB data that was input would be collected.
388 * Similarly in the following configuration:
389 *
390 * skip_x = 0
391 * offset_x = 0
392 * skip_y = 1
393 * offset_y = 1
394 *
395 * Only the Gb component of RGGB data that was input would be collected. To
396 * correct things such that all 4 colour components were included it would be
397 * necessary to set the skip_x and skip_y fields in a way that resulted in all
398 * four colour components being collected:
399 *
400 * skip_x = 1
401 * offset_x = 0
402 * skip_y = 1
403 * offset_y = 1
404 *
405 * header.type should be set to one of either MALI_C55_PARAM_BLOCK_AEXP_HIST or
406 * MALI_C55_PARAM_BLOCK_AEXP_IHIST from :c:type:`mali_c55_param_block_type`.
407 *
408 * @header: The Mali-C55 parameters block header
409 * @skip_x: Horizontal decimation. See enum mali_c55_aexp_skip_x
410 * @offset_x: Skip the first column, or not. See enum mali_c55_aexp_row_column_offset
411 * @skip_y: Vertical decimation. See enum mali_c55_aexp_skip_y
412 * @offset_y: Skip the first row, or not. See enum mali_c55_aexp_row_column_offset
413 * @scale_bottom: Scale pixels in bottom half of intensity range: 0=1x ,1=2x, 2=4x, 4=8x, 4=16x
414 * @scale_top: scale pixels in top half of intensity range: 0=1x ,1=2x, 2=4x, 4=8x, 4=16x
415 * @plane_mode: Plane separation mode. See enum mali_c55_aexp_hist_plane_mode
416 * @tap_point: Tap point for histogram from enum mali_c55_aexp_hist_tap_points.
417 * This parameter is unused for the post-Iridix Histogram
418 */
419struct mali_c55_params_aexp_hist {
420 struct v4l2_isp_params_block_header header;
421 __u8 skip_x;
422 __u8 offset_x;
423 __u8 skip_y;
424 __u8 offset_y;
425 __u8 scale_bottom;
426 __u8 scale_top;
427 __u8 plane_mode;
428 __u8 tap_point;
429};
430
431/**
432 * struct mali_c55_params_aexp_weights - Array of weights for AEXP metering
433 *
434 * This struct allows users to configure the weighting for both of the 1024-bin
435 * AEXP histograms. The pixel data collected for each zone is multiplied by the
436 * corresponding weight from this array, which may be zero if the intention is
437 * to mask off the zone entirely.
438 *
439 * header.type should be set to one of either MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS
440 * or MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS from :c:type:`mali_c55_param_block_type`.
441 *
442 * @header: The Mali-C55 parameters block header
443 * @nodes_used_horiz: Number of active zones horizontally [0..15]
444 * @nodes_used_vert: Number of active zones vertically [0..15]
445 * @zone_weights: Zone weighting. Index is row*col where 0,0 is the top
446 * left zone continuing in raster order. Each zone can be
447 * weighted in the range [0..15]. The number of rows and
448 * columns is defined by @nodes_used_vert and
449 * @nodes_used_horiz
450 */
451struct mali_c55_params_aexp_weights {
452 struct v4l2_isp_params_block_header header;
453 __u8 nodes_used_horiz;
454 __u8 nodes_used_vert;
455 __u8 zone_weights[MALI_C55_MAX_ZONES];
456};
457
458/**
459 * struct mali_c55_params_digital_gain - Digital gain value
460 *
461 * This struct carries a digital gain value to set in the ISP.
462 *
463 * header.type should be set to MALI_C55_PARAM_BLOCK_DIGITAL_GAIN from
464 * :c:type:`mali_c55_param_block_type` for this block.
465 *
466 * @header: The Mali-C55 parameters block header
467 * @gain: The digital gain value to apply, in Q5.8 format.
468 */
469struct mali_c55_params_digital_gain {
470 struct v4l2_isp_params_block_header header;
471 __u16 gain;
472};
473
474/**
475 * enum mali_c55_awb_stats_mode - Statistics mode for AWB
476 * @MALI_C55_AWB_MODE_GRBR: Statistics collected as Green/Red and Blue/Red ratios
477 * @MALI_C55_AWB_MODE_RGBG: Statistics collected as Red/Green and Blue/Green ratios
478 */
479enum mali_c55_awb_stats_mode {
480 MALI_C55_AWB_MODE_GRBR = 0,
481 MALI_C55_AWB_MODE_RGBG,
482};
483
484/**
485 * struct mali_c55_params_awb_gains - Gain settings for auto white balance
486 *
487 * This struct allows users to configure the gains for auto-white balance. There
488 * are four gain settings corresponding to each colour channel in the bayer
489 * domain. Although named generically, the association between the gain applied
490 * and the colour channel is done automatically within the ISP depending on the
491 * input format, and so the following mapping always holds true::
492 *
493 * gain00 = R
494 * gain01 = Gr
495 * gain10 = Gb
496 * gain11 = B
497 *
498 * All of the gains are stored in Q4.8 format.
499 *
500 * header.type should be set to one of either MALI_C55_PARAM_BLOCK_AWB_GAINS or
501 * MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP from :c:type:`mali_c55_param_block_type`.
502 *
503 * @header: The Mali-C55 parameters block header
504 * @gain00: Multiplier for colour channel 00
505 * @gain01: Multiplier for colour channel 01
506 * @gain10: Multiplier for colour channel 10
507 * @gain11: Multiplier for colour channel 11
508 */
509struct mali_c55_params_awb_gains {
510 struct v4l2_isp_params_block_header header;
511 __u16 gain00;
512 __u16 gain01;
513 __u16 gain10;
514 __u16 gain11;
515};
516
517/**
518 * enum mali_c55_params_awb_tap_points - Tap points for the AWB statistics
519 * @MALI_C55_AWB_STATS_TAP_PF: Immediately after the Purple Fringe block
520 * @MALI_C55_AWB_STATS_TAP_CNR: Immediately after the CNR block
521 */
522enum mali_c55_params_awb_tap_points {
523 MALI_C55_AWB_STATS_TAP_PF = 0,
524 MALI_C55_AWB_STATS_TAP_CNR,
525};
526
527/**
528 * struct mali_c55_params_awb_config - Stats settings for auto-white balance
529 *
530 * This struct allows the configuration of the statistics generated for auto
531 * white balance. Pixel intensity limits can be set to exclude overly bright or
532 * dark regions of an image from the statistics entirely. Colour ratio minima
533 * and maxima can be set to discount pixels who's ratios fall outside the
534 * defined boundaries; there are two sets of registers to do this - the
535 * "min/max" ratios which bound a region and the "high/low" ratios which further
536 * trim the upper and lower ratios. For example with the boundaries configured
537 * as follows, only pixels whos colour ratios falls into the region marked "A"
538 * would be counted::
539 *
540 * cr_high
541 * 2.0 | |
542 * | cb_max --> _________________________v_____
543 * 1.8 | | \ |
544 * | | \ |
545 * 1.6 | | \ |
546 * | | \ |
547 * c 1.4 | cb_low -->|\ A \|<-- cb_high
548 * b | | \ |
549 * 1.2 | | \ |
550 * r | | \ |
551 * a 1.0 | cb_min --> |____\_________________________|
552 * t | ^ ^ ^
553 * i 0.8 | | | |
554 * o | cr_min | cr_max
555 * s 0.6 | |
556 * | cr_low
557 * 0.4 |
558 * |
559 * 0.2 |
560 * |
561 * 0.0 |_______________________________________________________________
562 * 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
563 * cr ratios
564 *
565 * header.type should be set to MALI_C55_PARAM_BLOCK_AWB_CONFIG from
566 * :c:type:`mali_c55_param_block_type` for this block.
567 *
568 * @header: The Mali-C55 parameters block header
569 * @tap_point: The tap point from enum mali_c55_params_awb_tap_points
570 * @stats_mode: AWB statistics collection mode, see :c:type:`mali_c55_awb_stats_mode`
571 * @white_level: Upper pixel intensity (I.E. raw pixel values) limit
572 * @black_level: Lower pixel intensity (I.E. raw pixel values) limit
573 * @cr_max: Maximum R/G ratio (Q4.8 format)
574 * @cr_min: Minimum R/G ratio (Q4.8 format)
575 * @cb_max: Maximum B/G ratio (Q4.8 format)
576 * @cb_min: Minimum B/G ratio (Q4.8 format)
577 * @nodes_used_horiz: Number of active zones horizontally [0..15]
578 * @nodes_used_vert: Number of active zones vertically [0..15]
579 * @cr_high: R/G ratio trim high (Q4.8 format)
580 * @cr_low: R/G ratio trim low (Q4.8 format)
581 * @cb_high: B/G ratio trim high (Q4.8 format)
582 * @cb_low: B/G ratio trim low (Q4.8 format)
583 */
584struct mali_c55_params_awb_config {
585 struct v4l2_isp_params_block_header header;
586 __u8 tap_point;
587 __u8 stats_mode;
588 __u16 white_level;
589 __u16 black_level;
590 __u16 cr_max;
591 __u16 cr_min;
592 __u16 cb_max;
593 __u16 cb_min;
594 __u8 nodes_used_horiz;
595 __u8 nodes_used_vert;
596 __u16 cr_high;
597 __u16 cr_low;
598 __u16 cb_high;
599 __u16 cb_low;
600};
601
602#define MALI_C55_NUM_MESH_SHADING_ELEMENTS 3072
603
604/**
605 * struct mali_c55_params_mesh_shading_config - Mesh shading configuration
606 *
607 * The mesh shading correction module allows programming a separate table of
608 * either 16x16 or 32x32 node coefficients for 3 different light sources. The
609 * final correction coefficients applied are computed by blending the
610 * coefficients from two tables together.
611 *
612 * A page of 1024 32-bit integers is associated to each colour channel, with
613 * pages stored consecutively in memory. Each 32-bit integer packs 3 8-bit
614 * correction coefficients for a single node, one for each of the three light
615 * sources. The 8 most significant bits are unused. The following table
616 * describes the layout::
617 *
618 * +----------- Page (Colour Plane) 0 -------------+
619 * | @mesh[i] | Mesh Point | Bits | Light Source |
620 * +-----------+------------+-------+--------------+
621 * | 0 | 0,0 | 16,23 | LS2 |
622 * | | | 08-15 | LS1 |
623 * | | | 00-07 | LS0 |
624 * +-----------+------------+-------+--------------+
625 * | 1 | 0,1 | 16,23 | LS2 |
626 * | | | 08-15 | LS1 |
627 * | | | 00-07 | LS0 |
628 * +-----------+------------+-------+--------------+
629 * | ... | ... | ... | ... |
630 * +-----------+------------+-------+--------------+
631 * | 1023 | 31,31 | 16,23 | LS2 |
632 * | | | 08-15 | LS1 |
633 * | | | 00-07 | LS0 |
634 * +----------- Page (Colour Plane) 1 -------------+
635 * | @mesh[i] | Mesh Point | Bits | Light Source |
636 * +-----------+------------+-------+--------------+
637 * | 1024 | 0,0 | 16,23 | LS2 |
638 * | | | 08-15 | LS1 |
639 * | | | 00-07 | LS0 |
640 * +-----------+------------+-------+--------------+
641 * | 1025 | 0,1 | 16,23 | LS2 |
642 * | | | 08-15 | LS1 |
643 * | | | 00-07 | LS0 |
644 * +-----------+------------+-------+--------------+
645 * | ... | ... | ... | ... |
646 * +-----------+------------+-------+--------------+
647 * | 2047 | 31,31 | 16,23 | LS2 |
648 * | | | 08-15 | LS1 |
649 * | | | 00-07 | LS0 |
650 * +----------- Page (Colour Plane) 2 -------------+
651 * | @mesh[i] | Mesh Point | Bits | Light Source |
652 * +-----------+------------+-------+--------------+
653 * | 2048 | 0,0 | 16,23 | LS2 |
654 * | | | 08-15 | LS1 |
655 * | | | 00-07 | LS0 |
656 * +-----------+------------+-------+--------------+
657 * | 2049 | 0,1 | 16,23 | LS2 |
658 * | | | 08-15 | LS1 |
659 * | | | 00-07 | LS0 |
660 * +-----------+------------+-------+--------------+
661 * | ... | ... | ... | ... |
662 * +-----------+------------+-------+--------------+
663 * | 3071 | 31,31 | 16,23 | LS2 |
664 * | | | 08-15 | LS1 |
665 * | | | 00-07 | LS0 |
666 * +-----------+------------+-------+--------------+
667 *
668 * The @mesh_scale member determines the precision and minimum and maximum gain.
669 * For example if @mesh_scale is 0 and therefore selects 0 - 2x gain, a value of
670 * 0 in a coefficient means 0.0 gain, a value of 128 means 1.0 gain and 255
671 * means 2.0 gain.
672 *
673 * header.type should be set to MALI_C55_PARAM_MESH_SHADING_CONFIG from
674 * :c:type:`mali_c55_param_block_type` for this block.
675 *
676 * @header: The Mali-C55 parameters block header
677 * @mesh_show: Output the mesh data rather than image data
678 * @mesh_scale: Set the precision and maximum gain range of mesh shading
679 * - 0 = 0-2x gain
680 * - 1 = 0-4x gain
681 * - 2 = 0-8x gain
682 * - 3 = 0-16x gain
683 * - 4 = 1-2x gain
684 * - 5 = 1-3x gain
685 * - 6 = 1-5x gain
686 * - 7 = 1-9x gain
687 * @mesh_page_r: Mesh page select for red colour plane [0..2]
688 * @mesh_page_g: Mesh page select for green colour plane [0..2]
689 * @mesh_page_b: Mesh page select for blue colour plane [0..2]
690 * @mesh_width: Number of horizontal nodes minus 1 [15,31]
691 * @mesh_height: Number of vertical nodes minus 1 [15,31]
692 * @mesh: Mesh shading correction tables
693 */
694struct mali_c55_params_mesh_shading_config {
695 struct v4l2_isp_params_block_header header;
696 __u8 mesh_show;
697 __u8 mesh_scale;
698 __u8 mesh_page_r;
699 __u8 mesh_page_g;
700 __u8 mesh_page_b;
701 __u8 mesh_width;
702 __u8 mesh_height;
703 __u32 mesh[MALI_C55_NUM_MESH_SHADING_ELEMENTS];
704};
705
706/** enum mali_c55_params_mesh_alpha_bank - Mesh shading table bank selection
707 * @MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS1 - Select Light Sources 0 and 1
708 * @MALI_C55_MESH_ALPHA_BANK_LS1_AND_LS2 - Select Light Sources 1 and 2
709 * @MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS2 - Select Light Sources 0 and 2
710 */
711enum mali_c55_params_mesh_alpha_bank {
712 MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS1 = 0,
713 MALI_C55_MESH_ALPHA_BANK_LS1_AND_LS2 = 1,
714 MALI_C55_MESH_ALPHA_BANK_LS0_AND_LS2 = 4
715};
716
717/**
718 * struct mali_c55_params_mesh_shading_selection - Mesh table selection
719 *
720 * The module computes the final correction coefficients by blending the ones
721 * from two light source tables, which are selected (independently for each
722 * colour channel) by the @mesh_alpha_bank_r/g/b fields.
723 *
724 * The final blended coefficients for each node are calculated using the
725 * following equation:
726 *
727 * Final coefficient = (a * LS\ :sub:`b`\ + (256 - a) * LS\ :sub:`a`\) / 256
728 *
729 * Where a is the @mesh_alpha_r/g/b value, and LS\ :sub:`a`\ and LS\ :sub:`b`\
730 * are the node cofficients for the two tables selected by the
731 * @mesh_alpha_bank_r/g/b value.
732 *
733 * The scale of the applied correction may also be controlled by tuning the
734 * @mesh_strength member. This is a modifier to the final coefficients which can
735 * be used to globally reduce the gains applied.
736 *
737 * header.type should be set to MALI_C55_PARAM_MESH_SHADING_SELECTION from
738 * :c:type:`mali_c55_param_block_type` for this block.
739 *
740 * @header: The Mali-C55 parameters block header
741 * @mesh_alpha_bank_r: Red mesh table select (c:type:`enum mali_c55_params_mesh_alpha_bank`)
742 * @mesh_alpha_bank_g: Green mesh table select (c:type:`enum mali_c55_params_mesh_alpha_bank`)
743 * @mesh_alpha_bank_b: Blue mesh table select (c:type:`enum mali_c55_params_mesh_alpha_bank`)
744 * @mesh_alpha_r: Blend coefficient for R [0..255]
745 * @mesh_alpha_g: Blend coefficient for G [0..255]
746 * @mesh_alpha_b: Blend coefficient for B [0..255]
747 * @mesh_strength: Mesh strength in Q4.12 format [0..4096]
748 */
749struct mali_c55_params_mesh_shading_selection {
750 struct v4l2_isp_params_block_header header;
751 __u8 mesh_alpha_bank_r;
752 __u8 mesh_alpha_bank_g;
753 __u8 mesh_alpha_bank_b;
754 __u8 mesh_alpha_r;
755 __u8 mesh_alpha_g;
756 __u8 mesh_alpha_b;
757 __u16 mesh_strength;
758};
759
760/**
761 * define MALI_C55_PARAMS_MAX_SIZE - Maximum size of all Mali C55 Parameters
762 *
763 * Though the parameters for the Mali-C55 are passed as optional blocks, the
764 * driver still needs to know the absolute maximum size so that it can allocate
765 * a buffer sized appropriately to accommodate userspace attempting to set all
766 * possible parameters in a single frame.
767 *
768 * Some structs are in this list multiple times. Where that's the case, it just
769 * reflects the fact that the same struct can be used with multiple different
770 * header types from :c:type:`mali_c55_param_block_type`.
771 */
772#define MALI_C55_PARAMS_MAX_SIZE \
773 (sizeof(struct mali_c55_params_sensor_off_preshading) + \
774 sizeof(struct mali_c55_params_aexp_hist) + \
775 sizeof(struct mali_c55_params_aexp_weights) + \
776 sizeof(struct mali_c55_params_aexp_hist) + \
777 sizeof(struct mali_c55_params_aexp_weights) + \
778 sizeof(struct mali_c55_params_digital_gain) + \
779 sizeof(struct mali_c55_params_awb_gains) + \
780 sizeof(struct mali_c55_params_awb_config) + \
781 sizeof(struct mali_c55_params_awb_gains) + \
782 sizeof(struct mali_c55_params_mesh_shading_config) + \
783 sizeof(struct mali_c55_params_mesh_shading_selection))
784
785#endif /* __UAPI_MALI_C55_CONFIG_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/media/v4l2-isp.h created+102
...@@ -0,0 +1,102 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Video4Linux2 generic ISP parameters and statistics support
4 *
5 * Copyright (C) 2025 Ideas On Board Oy
6 * Author: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
7 */
8
9#ifndef _V4L2_ISP_H_
10#define _V4L2_ISP_H_
11
12#include <linux/stddef.h>
13#include <linux/types.h>
14
15/**
16 * enum v4l2_isp_params_version - V4L2 ISP parameters versioning
17 *
18 * @V4L2_ISP_PARAMS_VERSION_V0: First version of the V4L2 ISP parameters format
19 * (for compatibility)
20 * @V4L2_ISP_PARAMS_VERSION_V1: First version of the V4L2 ISP parameters format
21 *
22 * V0 and V1 are identical in order to support drivers compatible with the V4L2
23 * ISP parameters format already upstreamed which use either 0 or 1 as their
24 * versioning identifier. Both V0 and V1 refers to the first version of the
25 * V4L2 ISP parameters format.
26 *
27 * Future revisions of the V4L2 ISP parameters format should start from the
28 * value of 2.
29 */
30enum v4l2_isp_params_version {
31 V4L2_ISP_PARAMS_VERSION_V0 = 0,
32 V4L2_ISP_PARAMS_VERSION_V1
33};
34
35#define V4L2_ISP_PARAMS_FL_BLOCK_DISABLE (1U << 0)
36#define V4L2_ISP_PARAMS_FL_BLOCK_ENABLE (1U << 1)
37
38/*
39 * Reserve the first 8 bits for V4L2_ISP_PARAMS_FL_* flag.
40 *
41 * Driver-specific flags should be defined as:
42 * #define DRIVER_SPECIFIC_FLAG0 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(0))
43 * #define DRIVER_SPECIFIC_FLAG1 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(1))
44 */
45#define V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(n) ((n) + 8)
46
47/**
48 * struct v4l2_isp_params_block_header - V4L2 extensible parameters block header
49 * @type: The parameters block type (driver-specific)
50 * @flags: A bitmask of block flags (driver-specific)
51 * @size: Size (in bytes) of the parameters block, including this header
52 *
53 * This structure represents the common part of all the ISP configuration
54 * blocks. Each parameters block shall embed an instance of this structure type
55 * as its first member, followed by the block-specific configuration data.
56 *
57 * The @type field is an ISP driver-specific value that identifies the block
58 * type. The @size field specifies the size of the parameters block.
59 *
60 * The @flags field is a bitmask of per-block flags V4L2_PARAMS_ISP_FL_* and
61 * driver-specific flags specified by the driver header.
62 */
63struct v4l2_isp_params_block_header {
64 __u16 type;
65 __u16 flags;
66 __u32 size;
67} __attribute__((aligned(8)));
68
69/**
70 * struct v4l2_isp_params_buffer - V4L2 extensible parameters configuration
71 * @version: The parameters buffer version (driver-specific)
72 * @data_size: The configuration data effective size, excluding this header
73 * @data: The configuration data
74 *
75 * This structure contains the configuration parameters of the ISP algorithms,
76 * serialized by userspace into a data buffer. Each configuration parameter
77 * block is represented by a block-specific structure which contains a
78 * :c:type:`v4l2_isp_params_block_header` entry as first member. Userspace
79 * populates the @data buffer with configuration parameters for the blocks that
80 * it intends to configure. As a consequence, the data buffer effective size
81 * changes according to the number of ISP blocks that userspace intends to
82 * configure and is set by userspace in the @data_size field.
83 *
84 * The parameters buffer is versioned by the @version field to allow modifying
85 * and extending its definition. Userspace shall populate the @version field to
86 * inform the driver about the version it intends to use. The driver will parse
87 * and handle the @data buffer according to the data layout specific to the
88 * indicated version and return an error if the desired version is not
89 * supported.
90 *
91 * For each ISP block that userspace wants to configure, a block-specific
92 * structure is appended to the @data buffer, one after the other without gaps
93 * in between. Userspace shall populate the @data_size field with the effective
94 * size, in bytes, of the @data buffer.
95 */
96struct v4l2_isp_params_buffer {
97 __u32 version;
98 __u32 data_size;
99 __u8 data[] __counted_by(data_size);
100};
101
102#endif /* _V4L2_ISP_H_ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/mempolicy.h+9-3
...@@ -66,10 +66,16 @@ enum {...@@ -66,10 +66,16 @@ enum {
66#define MPOL_F_MORON (1 << 4) /* Migrate On protnone Reference On Node */66#define MPOL_F_MORON (1 << 4) /* Migrate On protnone Reference On Node */
6767
68/*68/*
69 * These bit locations are exposed in the vm.zone_reclaim_mode sysctl69 * Enabling zone reclaim means the page allocator will attempt to fulfill
70 * ABI. New bits are OK, but existing bits can never change.70 * the allocation request on the current node by triggering reclaim and
71 * trying to shrink the current node.
72 * Fallback allocations on the next candidates in the zonelist are considered
73 * when reclaim fails to free up enough memory in the current node/zone.
74 *
75 * These bit locations are exposed in the vm.zone_reclaim_mode sysctl.
76 * New bits are OK, but existing bits should not be changed.
71 */77 */
72#define RECLAIM_ZONE (1<<0) /* Run shrink_inactive_list on the zone */78#define RECLAIM_ZONE (1<<0) /* Enable zone reclaim */
73#define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */79#define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */
74#define RECLAIM_UNMAP (1<<2) /* Unmap pages during reclaim */80#define RECLAIM_UNMAP (1<<2) /* Unmap pages during reclaim */
7581
lib/libc/include/any-linux-any/linux/mount.h+1-1
...@@ -197,7 +197,7 @@ struct statmount {...@@ -197,7 +197,7 @@ struct statmount {
197 */197 */
198struct mnt_id_req {198struct mnt_id_req {
199 __u32 size;199 __u32 size;
200 __u32 spare;200 __u32 mnt_ns_fd;
201 __u64 mnt_id;201 __u64 mnt_id;
202 __u64 param;202 __u64 param;
203 __u64 mnt_ns_id;203 __u64 mnt_ns_id;
lib/libc/include/any-linux-any/linux/mptcp.h+18-6
...@@ -30,20 +30,28 @@...@@ -30,20 +30,28 @@
30#define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED _BITUL(1)30#define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED _BITUL(1)
3131
32#define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 _BITUL(0)32#define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 _BITUL(0)
33#define MPTCP_PM_EV_FLAG_SERVER_SIDE _BITUL(1)
3334
34#define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0)35#define MPTCP_PM_ADDR_FLAG_SIGNAL _BITUL(0)
35#define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1)36#define MPTCP_PM_ADDR_FLAG_SUBFLOW _BITUL(1)
36#define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2)37#define MPTCP_PM_ADDR_FLAG_BACKUP _BITUL(2)
37#define MPTCP_PM_ADDR_FLAG_FULLMESH (1 << 3)38#define MPTCP_PM_ADDR_FLAG_FULLMESH _BITUL(3)
38#define MPTCP_PM_ADDR_FLAG_IMPLICIT (1 << 4)39#define MPTCP_PM_ADDR_FLAG_IMPLICIT _BITUL(4)
40#define MPTCP_PM_ADDR_FLAG_LAMINAR _BITUL(5)
41#define MPTCP_PM_ADDR_FLAGS_MASK GENMASK(5, 0)
3942
40struct mptcp_info {43struct mptcp_info {
41 __u8 mptcpi_subflows;44 __u8 mptcpi_subflows;
45 #define mptcpi_extra_subflows mptcpi_subflows
42 __u8 mptcpi_add_addr_signal;46 __u8 mptcpi_add_addr_signal;
43 __u8 mptcpi_add_addr_accepted;47 __u8 mptcpi_add_addr_accepted;
44 __u8 mptcpi_subflows_max;48 __u8 mptcpi_subflows_max;
49 #define mptcpi_limit_extra_subflows mptcpi_subflows_max
45 __u8 mptcpi_add_addr_signal_max;50 __u8 mptcpi_add_addr_signal_max;
51 #define mptcpi_endp_signal_max mptcpi_add_addr_signal_max
46 __u8 mptcpi_add_addr_accepted_max;52 __u8 mptcpi_add_addr_accepted_max;
53 #define mptcpi_limit_add_addr_accepted mptcpi_add_addr_accepted_max
54 /* 16-bit hole that can no longer be filled */
47 __u32 mptcpi_flags;55 __u32 mptcpi_flags;
48 __u32 mptcpi_token;56 __u32 mptcpi_token;
49 __u64 mptcpi_write_seq;57 __u64 mptcpi_write_seq;
...@@ -51,14 +59,18 @@ struct mptcp_info {...@@ -51,14 +59,18 @@ struct mptcp_info {
51 __u64 mptcpi_rcv_nxt;59 __u64 mptcpi_rcv_nxt;
52 __u8 mptcpi_local_addr_used;60 __u8 mptcpi_local_addr_used;
53 __u8 mptcpi_local_addr_max;61 __u8 mptcpi_local_addr_max;
62 #define mptcpi_endp_subflow_max mptcpi_local_addr_max
54 __u8 mptcpi_csum_enabled;63 __u8 mptcpi_csum_enabled;
64 /* 8-bit hole that can no longer be filled */
55 __u32 mptcpi_retransmits;65 __u32 mptcpi_retransmits;
56 __u64 mptcpi_bytes_retrans;66 __u64 mptcpi_bytes_retrans;
57 __u64 mptcpi_bytes_sent;67 __u64 mptcpi_bytes_sent;
58 __u64 mptcpi_bytes_received;68 __u64 mptcpi_bytes_received;
59 __u64 mptcpi_bytes_acked;69 __u64 mptcpi_bytes_acked;
60 __u8 mptcpi_subflows_total;70 __u8 mptcpi_subflows_total;
61 __u8 reserved[3];71 __u8 mptcpi_endp_laminar_max;
72 __u8 mptcpi_endp_fullmesh_max;
73 __u8 reserved;
62 __u32 mptcpi_last_data_sent;74 __u32 mptcpi_last_data_sent;
63 __u32 mptcpi_last_data_recv;75 __u32 mptcpi_last_data_recv;
64 __u32 mptcpi_last_ack_recv;76 __u32 mptcpi_last_ack_recv;
lib/libc/include/any-linux-any/linux/mptcp_pm.h+3-2
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/mptcp_pm.yaml */3/* Documentation/netlink/specs/mptcp_pm.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_MPTCP_PM_H7#ifndef _LINUX_MPTCP_PM_H
7#define _LINUX_MPTCP_PM_H8#define _LINUX_MPTCP_PM_H
...@@ -16,10 +17,10 @@...@@ -16,10 +17,10 @@
16 * 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
17 * traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED18 * traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED
18 * is sent. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6,19 * is sent. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6,
19 * sport, dport, server-side, [flags].20 * sport, dport, [server-side], [flags].
20 * @MPTCP_EVENT_ESTABLISHED: A MPTCP connection is established (can start new21 * @MPTCP_EVENT_ESTABLISHED: A MPTCP connection is established (can start new
21 * subflows). Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6,22 * subflows). Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6,
22 * sport, dport, server-side, [flags].23 * sport, dport, [server-side], [flags].
23 * @MPTCP_EVENT_CLOSED: A MPTCP connection has stopped. Attribute: token.24 * @MPTCP_EVENT_CLOSED: A MPTCP connection has stopped. Attribute: token.
24 * @MPTCP_EVENT_ANNOUNCED: A new address has been announced by the peer.25 * @MPTCP_EVENT_ANNOUNCED: A new address has been announced by the peer.
25 * Attributes: token, rem_id, family, daddr4 | daddr6 [, dport].26 * Attributes: token, rem_id, family, daddr4 | daddr6 [, dport].
lib/libc/include/any-linux-any/linux/mshv.h+115-1
...@@ -26,6 +26,7 @@ enum {...@@ -26,6 +26,7 @@ enum {
26 MSHV_PT_BIT_LAPIC,26 MSHV_PT_BIT_LAPIC,
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_COUNT,30 MSHV_PT_BIT_COUNT,
30};31};
3132
...@@ -41,6 +42,8 @@ enum {...@@ -41,6 +42,8 @@ enum {
41 * @pt_flags: Bitmask of 1 << MSHV_PT_BIT_*42 * @pt_flags: Bitmask of 1 << MSHV_PT_BIT_*
42 * @pt_isolation: MSHV_PT_ISOLATION_*43 * @pt_isolation: MSHV_PT_ISOLATION_*
43 *44 *
45 * This is the initial/v1 version for backward compatibility.
46 *
44 * Returns a file descriptor to act as a handle to a guest partition.47 * Returns a file descriptor to act as a handle to a guest partition.
45 * At this point the partition is not yet initialized in the hypervisor.48 * At this point the partition is not yet initialized in the hypervisor.
46 * Some operations must be done with the partition in this state, e.g. setting49 * Some operations must be done with the partition in this state, e.g. setting
...@@ -52,6 +55,37 @@ struct mshv_create_partition {...@@ -52,6 +55,37 @@ struct mshv_create_partition {
52 __u64 pt_isolation;55 __u64 pt_isolation;
53};56};
5457
58#define MSHV_NUM_CPU_FEATURES_BANKS 2
59
60/**
61 * struct mshv_create_partition_v2
62 *
63 * This is extended version of the above initial MSHV_CREATE_PARTITION
64 * ioctl and allows for following additional parameters:
65 *
66 * @pt_num_cpu_fbanks: Must be set to MSHV_NUM_CPU_FEATURES_BANKS.
67 * @pt_cpu_fbanks: Disabled processor feature banks array.
68 * @pt_disabled_xsave: Disabled xsave feature bits.
69 *
70 * pt_cpu_fbanks and pt_disabled_xsave are passed through as-is to the create
71 * partition hypercall.
72 *
73 * Returns : same as above original mshv_create_partition
74 */
75struct mshv_create_partition_v2 {
76 __u64 pt_flags;
77 __u64 pt_isolation;
78 __u16 pt_num_cpu_fbanks;
79 __u8 pt_rsvd[6]; /* MBZ */
80 __u64 pt_cpu_fbanks[MSHV_NUM_CPU_FEATURES_BANKS];
81 __u64 pt_rsvd1[2]; /* MBZ */
82#if defined(__x86_64__)
83 __u64 pt_disabled_xsave;
84#else
85 __u64 pt_rsvd2; /* MBZ */
86#endif
87} __attribute__((packed));
88
55/* /dev/mshv */89/* /dev/mshv */
56#define MSHV_CREATE_PARTITION _IOW(MSHV_IOCTL, 0x00, struct mshv_create_partition)90#define MSHV_CREATE_PARTITION _IOW(MSHV_IOCTL, 0x00, struct mshv_create_partition)
5791
...@@ -89,7 +123,7 @@ enum {...@@ -89,7 +123,7 @@ enum {
89 * @rsvd: MBZ123 * @rsvd: MBZ
90 *124 *
91 * Map or unmap a region of userspace memory to Guest Physical Addresses (GPA).125 * Map or unmap a region of userspace memory to Guest Physical Addresses (GPA).
92 * Mappings can't overlap in GPA space or userspace.126 * Mappings can't overlap in GPA space.
93 * To unmap, these fields must match an existing mapping.127 * To unmap, these fields must match an existing mapping.
94 */128 */
95struct mshv_user_mem_region {129struct mshv_user_mem_region {
...@@ -288,4 +322,84 @@ struct mshv_get_set_vp_state {...@@ -288,4 +322,84 @@ struct mshv_get_set_vp_state {
288 * #define MSHV_ROOT_HVCALL _IOWR(MSHV_IOCTL, 0x07, struct mshv_root_hvcall)322 * #define MSHV_ROOT_HVCALL _IOWR(MSHV_IOCTL, 0x07, struct mshv_root_hvcall)
289 */323 */
290324
325/* Structure definitions, macros and IOCTLs for mshv_vtl */
326
327#define MSHV_CAP_CORE_API_STABLE 0x0
328#define MSHV_CAP_REGISTER_PAGE 0x1
329#define MSHV_CAP_VTL_RETURN_ACTION 0x2
330#define MSHV_CAP_DR6_SHARED 0x3
331#define MSHV_MAX_RUN_MSG_SIZE 256
332
333struct mshv_vp_registers {
334 __u32 count; /* supports only 1 register at a time */
335 __u32 reserved; /* Reserved for alignment or future use */
336 __u64 regs_ptr; /* pointer to struct hv_register_assoc */
337};
338
339struct mshv_vtl_set_eventfd {
340 __s32 fd;
341 __u32 flag;
342};
343
344struct mshv_vtl_signal_event {
345 __u32 connection_id;
346 __u32 flag;
347};
348
349struct mshv_vtl_sint_post_msg {
350 __u64 message_type;
351 __u32 connection_id;
352 __u32 payload_size; /* Must not exceed HV_MESSAGE_PAYLOAD_BYTE_COUNT */
353 __u64 payload_ptr; /* pointer to message payload (bytes) */
354};
355
356struct mshv_vtl_ram_disposition {
357 __u64 start_pfn;
358 __u64 last_pfn;
359};
360
361struct mshv_vtl_set_poll_file {
362 __u32 cpu;
363 __u32 fd;
364};
365
366struct mshv_vtl_hvcall_setup {
367 __u64 bitmap_array_size; /* stores number of bytes */
368 __u64 allow_bitmap_ptr;
369};
370
371struct mshv_vtl_hvcall {
372 __u64 control; /* Hypercall control code */
373 __u64 input_size; /* Size of the input data */
374 __u64 input_ptr; /* Pointer to the input struct */
375 __u64 status; /* Status of the hypercall (output) */
376 __u64 output_size; /* Size of the output data */
377 __u64 output_ptr; /* Pointer to the output struct */
378};
379
380struct mshv_sint_mask {
381 __u8 mask;
382 __u8 reserved[7];
383};
384
385/* /dev/mshv device IOCTL */
386#define MSHV_CHECK_EXTENSION _IOW(MSHV_IOCTL, 0x00, __u32)
387
388/* vtl device */
389#define MSHV_CREATE_VTL _IOR(MSHV_IOCTL, 0x1D, char)
390#define MSHV_ADD_VTL0_MEMORY _IOW(MSHV_IOCTL, 0x21, struct mshv_vtl_ram_disposition)
391#define MSHV_SET_POLL_FILE _IOW(MSHV_IOCTL, 0x25, struct mshv_vtl_set_poll_file)
392#define MSHV_RETURN_TO_LOWER_VTL _IO(MSHV_IOCTL, 0x27)
393#define MSHV_GET_VP_REGISTERS _IOWR(MSHV_IOCTL, 0x05, struct mshv_vp_registers)
394#define MSHV_SET_VP_REGISTERS _IOW(MSHV_IOCTL, 0x06, struct mshv_vp_registers)
395
396/* VMBus device IOCTLs */
397#define MSHV_SINT_SIGNAL_EVENT _IOW(MSHV_IOCTL, 0x22, struct mshv_vtl_signal_event)
398#define MSHV_SINT_POST_MESSAGE _IOW(MSHV_IOCTL, 0x23, struct mshv_vtl_sint_post_msg)
399#define MSHV_SINT_SET_EVENTFD _IOW(MSHV_IOCTL, 0x24, struct mshv_vtl_set_eventfd)
400#define MSHV_SINT_PAUSE_MESSAGE_STREAM _IOW(MSHV_IOCTL, 0x25, struct mshv_sint_mask)
401
402/* hv_hvcall device */
403#define MSHV_HVCALL_SETUP _IOW(MSHV_IOCTL, 0x1E, struct mshv_vtl_hvcall_setup)
404#define MSHV_HVCALL _IOWR(MSHV_IOCTL, 0x1F, struct mshv_vtl_hvcall)
291#endif405#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/net_shaper.h+1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/net_shaper.yaml */3/* Documentation/netlink/specs/net_shaper.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_NET_SHAPER_H7#ifndef _LINUX_NET_SHAPER_H
7#define _LINUX_NET_SHAPER_H8#define _LINUX_NET_SHAPER_H
lib/libc/include/any-linux-any/linux/netdev.h+2
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/netdev.yaml */3/* Documentation/netlink/specs/netdev.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_NETDEV_H7#ifndef _LINUX_NETDEV_H
7#define _LINUX_NETDEV_H8#define _LINUX_NETDEV_H
...@@ -80,6 +81,7 @@ enum netdev_qstats_scope {...@@ -80,6 +81,7 @@ enum netdev_qstats_scope {
80enum netdev_napi_threaded {81enum netdev_napi_threaded {
81 NETDEV_NAPI_THREADED_DISABLED,82 NETDEV_NAPI_THREADED_DISABLED,
82 NETDEV_NAPI_THREADED_ENABLED,83 NETDEV_NAPI_THREADED_ENABLED,
84 NETDEV_NAPI_THREADED_BUSY_POLL,
83};85};
8486
85enum {87enum {
lib/libc/include/any-linux-any/linux/netfilter/nf_tables.h+9-7
...@@ -881,7 +881,7 @@ enum nft_exthdr_flags {...@@ -881,7 +881,7 @@ enum nft_exthdr_flags {
881 * enum nft_exthdr_op - nf_tables match options881 * enum nft_exthdr_op - nf_tables match options
882 *882 *
883 * @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers883 * @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers
884 * @NFT_EXTHDR_OP_TCP: match against tcp options884 * @NFT_EXTHDR_OP_TCPOPT: match against tcp options
885 * @NFT_EXTHDR_OP_IPV4: match against ipv4 options885 * @NFT_EXTHDR_OP_IPV4: match against ipv4 options
886 * @NFT_EXTHDR_OP_SCTP: match against sctp chunks886 * @NFT_EXTHDR_OP_SCTP: match against sctp chunks
887 * @NFT_EXTHDR_OP_DCCP: match against dccp otions887 * @NFT_EXTHDR_OP_DCCP: match against dccp otions
...@@ -959,6 +959,7 @@ enum nft_exthdr_attributes {...@@ -959,6 +959,7 @@ enum nft_exthdr_attributes {
959 * @NFT_META_SDIF: slave device interface index959 * @NFT_META_SDIF: slave device interface index
960 * @NFT_META_SDIFNAME: slave device interface name960 * @NFT_META_SDIFNAME: slave device interface name
961 * @NFT_META_BRI_BROUTE: packet br_netfilter_broute bit961 * @NFT_META_BRI_BROUTE: packet br_netfilter_broute bit
962 * @NFT_META_BRI_IIFHWADDR: packet input bridge interface ethernet address
962 */963 */
963enum nft_meta_keys {964enum nft_meta_keys {
964 NFT_META_LEN,965 NFT_META_LEN,
...@@ -999,6 +1000,7 @@ enum nft_meta_keys {...@@ -999,6 +1000,7 @@ enum nft_meta_keys {
999 NFT_META_SDIFNAME,1000 NFT_META_SDIFNAME,
1000 NFT_META_BRI_BROUTE,1001 NFT_META_BRI_BROUTE,
1001 __NFT_META_IIFTYPE,1002 __NFT_META_IIFTYPE,
1003 NFT_META_BRI_IIFHWADDR,
1002};1004};
10031005
1004/**1006/**
...@@ -1198,7 +1200,7 @@ enum nft_ct_attributes {...@@ -1198,7 +1200,7 @@ enum nft_ct_attributes {
1198#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)1200#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)
11991201
1200/**1202/**
1201 * enum nft_flow_attributes - ct offload expression attributes1203 * enum nft_offload_attributes - ct offload expression attributes
1202 * @NFTA_FLOW_TABLE_NAME: flow table name (NLA_STRING)1204 * @NFTA_FLOW_TABLE_NAME: flow table name (NLA_STRING)
1203 */1205 */
1204enum nft_offload_attributes {1206enum nft_offload_attributes {
...@@ -1408,7 +1410,7 @@ enum nft_reject_types {...@@ -1408,7 +1410,7 @@ enum nft_reject_types {
1408};1410};
14091411
1410/**1412/**
1411 * enum nft_reject_code - Generic reject codes for IPv4/IPv61413 * enum nft_reject_inet_code - Generic reject codes for IPv4/IPv6
1412 *1414 *
1413 * @NFT_REJECT_ICMPX_NO_ROUTE: no route to host / network unreachable1415 * @NFT_REJECT_ICMPX_NO_ROUTE: no route to host / network unreachable
1414 * @NFT_REJECT_ICMPX_PORT_UNREACH: port unreachable1416 * @NFT_REJECT_ICMPX_PORT_UNREACH: port unreachable
...@@ -1478,9 +1480,9 @@ enum nft_nat_attributes {...@@ -1478,9 +1480,9 @@ enum nft_nat_attributes {
1478/**1480/**
1479 * enum nft_tproxy_attributes - nf_tables tproxy expression netlink attributes1481 * enum nft_tproxy_attributes - nf_tables tproxy expression netlink attributes
1480 *1482 *
1481 * NFTA_TPROXY_FAMILY: Target address family (NLA_U32: nft_registers)1483 * @NFTA_TPROXY_FAMILY: Target address family (NLA_U32: nft_registers)
1482 * NFTA_TPROXY_REG_ADDR: Target address register (NLA_U32: nft_registers)1484 * @NFTA_TPROXY_REG_ADDR: Target address register (NLA_U32: nft_registers)
1483 * NFTA_TPROXY_REG_PORT: Target port register (NLA_U32: nft_registers)1485 * @NFTA_TPROXY_REG_PORT: Target port register (NLA_U32: nft_registers)
1484 */1486 */
1485enum nft_tproxy_attributes {1487enum nft_tproxy_attributes {
1486 NFTA_TPROXY_UNSPEC,1488 NFTA_TPROXY_UNSPEC,
...@@ -1781,7 +1783,7 @@ enum nft_synproxy_attributes {...@@ -1781,7 +1783,7 @@ enum nft_synproxy_attributes {
1781#define NFTA_SYNPROXY_MAX (__NFTA_SYNPROXY_MAX - 1)1783#define NFTA_SYNPROXY_MAX (__NFTA_SYNPROXY_MAX - 1)
17821784
1783/**1785/**
1784 * enum nft_device_attributes - nf_tables device netlink attributes1786 * enum nft_devices_attributes - nf_tables device netlink attributes
1785 *1787 *
1786 * @NFTA_DEVICE_NAME: name of this device (NLA_STRING)1788 * @NFTA_DEVICE_NAME: name of this device (NLA_STRING)
1787 * @NFTA_DEVICE_PREFIX: device name prefix, a simple wildcard (NLA_STRING)1789 * @NFTA_DEVICE_PREFIX: device name prefix, a simple wildcard (NLA_STRING)
lib/libc/include/any-linux-any/linux/netfilter_ipv6/ip6t_srh.h+20-20
...@@ -41,13 +41,13 @@...@@ -41,13 +41,13 @@
4141
42/**42/**
43 * struct ip6t_srh - SRH match options43 * struct ip6t_srh - SRH match options
44 * @ next_hdr: Next header field of SRH44 * @next_hdr: Next header field of SRH
45 * @ hdr_len: Extension header length field of SRH45 * @hdr_len: Extension header length field of SRH
46 * @ segs_left: Segments left field of SRH46 * @segs_left: Segments left field of SRH
47 * @ last_entry: Last entry field of SRH47 * @last_entry: Last entry field of SRH
48 * @ tag: Tag field of SRH48 * @tag: Tag field of SRH
49 * @ mt_flags: match options49 * @mt_flags: match options
50 * @ mt_invflags: Invert the sense of match options50 * @mt_invflags: Invert the sense of match options
51 */51 */
5252
53struct ip6t_srh {53struct ip6t_srh {
...@@ -62,19 +62,19 @@ struct ip6t_srh {...@@ -62,19 +62,19 @@ struct ip6t_srh {
6262
63/**63/**
64 * struct ip6t_srh1 - SRH match options (revision 1)64 * struct ip6t_srh1 - SRH match options (revision 1)
65 * @ next_hdr: Next header field of SRH65 * @next_hdr: Next header field of SRH
66 * @ hdr_len: Extension header length field of SRH66 * @hdr_len: Extension header length field of SRH
67 * @ segs_left: Segments left field of SRH67 * @segs_left: Segments left field of SRH
68 * @ last_entry: Last entry field of SRH68 * @last_entry: Last entry field of SRH
69 * @ tag: Tag field of SRH69 * @tag: Tag field of SRH
70 * @ psid_addr: Address of previous SID in SRH SID list70 * @psid_addr: Address of previous SID in SRH SID list
71 * @ nsid_addr: Address of NEXT SID in SRH SID list71 * @nsid_addr: Address of NEXT SID in SRH SID list
72 * @ lsid_addr: Address of LAST SID in SRH SID list72 * @lsid_addr: Address of LAST SID in SRH SID list
73 * @ psid_msk: Mask of previous SID in SRH SID list73 * @psid_msk: Mask of previous SID in SRH SID list
74 * @ nsid_msk: Mask of next SID in SRH SID list74 * @nsid_msk: Mask of next SID in SRH SID list
75 * @ lsid_msk: MAsk of last SID in SRH SID list75 * @lsid_msk: MAsk of last SID in SRH SID list
76 * @ mt_flags: match options76 * @mt_flags: match options
77 * @ mt_invflags: Invert the sense of match options77 * @mt_invflags: Invert the sense of match options
78 */78 */
7979
80struct ip6t_srh1 {80struct ip6t_srh1 {
lib/libc/include/any-linux-any/linux/nfs.h-1
...@@ -49,7 +49,6 @@...@@ -49,7 +49,6 @@
49 NFSERR_NOENT = 2, /* v2 v3 v4 */49 NFSERR_NOENT = 2, /* v2 v3 v4 */
50 NFSERR_IO = 5, /* v2 v3 v4 */50 NFSERR_IO = 5, /* v2 v3 v4 */
51 NFSERR_NXIO = 6, /* v2 v3 v4 */51 NFSERR_NXIO = 6, /* v2 v3 v4 */
52 NFSERR_EAGAIN = 11, /* v2 v3 */
53 NFSERR_ACCES = 13, /* v2 v3 v4 */52 NFSERR_ACCES = 13, /* v2 v3 v4 */
54 NFSERR_EXIST = 17, /* v2 v3 v4 */53 NFSERR_EXIST = 17, /* v2 v3 v4 */
55 NFSERR_XDEV = 18, /* v3 v4 */54 NFSERR_XDEV = 18, /* v3 v4 */
lib/libc/include/any-linux-any/linux/nfsd_netlink.h+1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/nfsd.yaml */3/* Documentation/netlink/specs/nfsd.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_NFSD_NETLINK_H7#ifndef _LINUX_NFSD_NETLINK_H
7#define _LINUX_NFSD_NETLINK_H8#define _LINUX_NFSD_NETLINK_H
lib/libc/include/any-linux-any/linux/nl80211-vnd-intel.h-1
...@@ -84,7 +84,6 @@ enum iwl_vendor_auth_akm_mode {...@@ -84,7 +84,6 @@ enum iwl_vendor_auth_akm_mode {
84 *84 *
85 * @NUM_IWL_MVM_VENDOR_ATTR: number of vendor attributes85 * @NUM_IWL_MVM_VENDOR_ATTR: number of vendor attributes
86 * @MAX_IWL_MVM_VENDOR_ATTR: highest vendor attribute number86 * @MAX_IWL_MVM_VENDOR_ATTR: highest vendor attribute number
87
88 */87 */
89enum iwl_mvm_vendor_attr {88enum iwl_mvm_vendor_attr {
90 __IWL_MVM_VENDOR_ATTR_INVALID = 0x00,89 __IWL_MVM_VENDOR_ATTR_INVALID = 0x00,
lib/libc/include/any-linux-any/linux/nl80211.h+253-7
...@@ -1085,8 +1085,9 @@...@@ -1085,8 +1085,9 @@
1085 * %NL80211_ATTR_NAN_MASTER_PREF attribute and optional1085 * %NL80211_ATTR_NAN_MASTER_PREF attribute and optional
1086 * %NL80211_ATTR_BANDS attributes. If %NL80211_ATTR_BANDS is1086 * %NL80211_ATTR_BANDS attributes. If %NL80211_ATTR_BANDS is
1087 * omitted or set to 0, it means don't-care and the device will1087 * omitted or set to 0, it means don't-care and the device will
1088 * decide what to use. After this command NAN functions can be1088 * decide what to use. Additional cluster configuration may be
1089 * added.1089 * optionally provided with %NL80211_ATTR_NAN_CONFIG.
1090 * After this command NAN functions can be added.
1090 * @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by1091 * @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by
1091 * its %NL80211_ATTR_WDEV interface.1092 * its %NL80211_ATTR_WDEV interface.
1092 * @NL80211_CMD_ADD_NAN_FUNCTION: Add a NAN function. The function is defined1093 * @NL80211_CMD_ADD_NAN_FUNCTION: Add a NAN function. The function is defined
...@@ -1115,6 +1116,10 @@...@@ -1115,6 +1116,10 @@
1115 * current configuration is not changed. If it is present but1116 * current configuration is not changed. If it is present but
1116 * set to zero, the configuration is changed to don't-care1117 * set to zero, the configuration is changed to don't-care
1117 * (i.e. the device can decide what to do).1118 * (i.e. the device can decide what to do).
1119 * Additional parameters may be provided with
1120 * %NL80211_ATTR_NAN_CONFIG. User space should provide all previously
1121 * configured nested attributes under %NL80211_ATTR_NAN_CONFIG, even if
1122 * only a subset was changed.
1118 * @NL80211_CMD_NAN_MATCH: Notification sent when a match is reported.1123 * @NL80211_CMD_NAN_MATCH: Notification sent when a match is reported.
1119 * This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and1124 * This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
1120 * %NL80211_ATTR_COOKIE.1125 * %NL80211_ATTR_COOKIE.
...@@ -1344,6 +1349,18 @@...@@ -1344,6 +1349,18 @@
1344 * control EPCS configuration. Used to notify userland on the current state1349 * control EPCS configuration. Used to notify userland on the current state
1345 * of EPCS.1350 * of EPCS.
1346 *1351 *
1352 * @NL80211_CMD_NAN_NEXT_DW_NOTIFICATION: This command is used to notify
1353 * user space about the next NAN Discovery Window (DW). User space may use
1354 * it to prepare frames to be sent in the next DW.
1355 * %NL80211_ATTR_WIPHY_FREQ is used to indicate the frequency of the next
1356 * DW. SDF transmission should be requested with %NL80211_CMD_FRAME and
1357 * the device/driver shall take care of the actual transmission timing.
1358 * This notification is only sent to the NAN interface owning socket
1359 * (see %NL80211_ATTR_SOCKET_OWNER flag).
1360 * @NL80211_CMD_NAN_CLUSTER_JOINED: This command is used to notify
1361 * user space that the NAN new cluster has been joined. The cluster ID is
1362 * indicated by %NL80211_ATTR_MAC.
1363 *
1347 * @NL80211_CMD_MAX: highest used command number1364 * @NL80211_CMD_MAX: highest used command number
1348 * @__NL80211_CMD_AFTER_LAST: internal use1365 * @__NL80211_CMD_AFTER_LAST: internal use
1349 */1366 */
...@@ -1604,6 +1621,9 @@ enum nl80211_commands {...@@ -1604,6 +1621,9 @@ enum nl80211_commands {
1604 NL80211_CMD_ASSOC_MLO_RECONF,1621 NL80211_CMD_ASSOC_MLO_RECONF,
1605 NL80211_CMD_EPCS_CFG,1622 NL80211_CMD_EPCS_CFG,
16061623
1624 NL80211_CMD_NAN_NEXT_DW_NOTIFICATION,
1625 NL80211_CMD_NAN_CLUSTER_JOINED,
1626
1607 /* add new commands above here */1627 /* add new commands above here */
16081628
1609 /* used to define NL80211_CMD_MAX below */1629 /* used to define NL80211_CMD_MAX below */
...@@ -1943,8 +1963,9 @@ enum nl80211_commands {...@@ -1943,8 +1963,9 @@ enum nl80211_commands {
1943 * The driver must also specify support for this with the extended1963 * The driver must also specify support for this with the extended
1944 * features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,1964 * features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
1945 * NL80211_EXT_FEATURE_BEACON_RATE_HT,1965 * NL80211_EXT_FEATURE_BEACON_RATE_HT,
1946 * NL80211_EXT_FEATURE_BEACON_RATE_VHT and1966 * NL80211_EXT_FEATURE_BEACON_RATE_VHT,
1947 * NL80211_EXT_FEATURE_BEACON_RATE_HE.1967 * NL80211_EXT_FEATURE_BEACON_RATE_HE and
1968 * NL80211_EXT_FEATURE_BEACON_RATE_EHT.
1948 *1969 *
1949 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain1970 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
1950 * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.1971 * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
...@@ -2283,7 +2304,8 @@ enum nl80211_commands {...@@ -2283,7 +2304,8 @@ enum nl80211_commands {
2283 * @NL80211_ATTR_PEER_AID: Association ID for the peer TDLS station (u16).2304 * @NL80211_ATTR_PEER_AID: Association ID for the peer TDLS station (u16).
2284 * This is similar to @NL80211_ATTR_STA_AID but with a difference of being2305 * This is similar to @NL80211_ATTR_STA_AID but with a difference of being
2285 * allowed to be used with the first @NL80211_CMD_SET_STATION command to2306 * allowed to be used with the first @NL80211_CMD_SET_STATION command to
2286 * update a TDLS peer STA entry.2307 * update a TDLS peer STA entry. For S1G interfaces, this is limited to
2308 * 1600 for the current mac80211 implementation.
2287 *2309 *
2288 * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information.2310 * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information.
2289 *2311 *
...@@ -2858,8 +2880,9 @@ enum nl80211_commands {...@@ -2858,8 +2880,9 @@ enum nl80211_commands {
2858 * index. If the userspace includes more RNR elements than number of2880 * index. If the userspace includes more RNR elements than number of
2859 * MBSSID elements then these will be added in every EMA beacon.2881 * MBSSID elements then these will be added in every EMA beacon.
2860 *2882 *
2861 * @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is2883 * @NL80211_ATTR_MLO_LINK_DISABLED: Unused. It was used to indicate that a link
2862 * disabled.2884 * is disabled during association. However, the AP will send the
2885 * information by including a TTLM in the association response.
2863 *2886 *
2864 * @NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA: Include BSS usage data, i.e.2887 * @NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA: Include BSS usage data, i.e.
2865 * include BSSes that can only be used in restricted scenarios and/or2888 * include BSSes that can only be used in restricted scenarios and/or
...@@ -2928,6 +2951,29 @@ enum nl80211_commands {...@@ -2928,6 +2951,29 @@ enum nl80211_commands {
2928 * required alongside this attribute. Refer to2951 * required alongside this attribute. Refer to
2929 * @enum nl80211_s1g_short_beacon_attrs for the attribute definitions.2952 * @enum nl80211_s1g_short_beacon_attrs for the attribute definitions.
2930 *2953 *
2954 * @NL80211_ATTR_BSS_PARAM: nested attribute used with %NL80211_CMD_GET_WIPHY
2955 * which indicates which BSS parameters can be modified. The attribute can
2956 * also be used as flag attribute by user-space in %NL80211_CMD_SET_BSS to
2957 * indicate that it wants strict checking on the BSS parameters to be
2958 * modified.
2959 *
2960 * @NL80211_ATTR_NAN_CONFIG: Nested attribute for
2961 * extended NAN cluster configuration. This is used with
2962 * %NL80211_CMD_START_NAN and %NL80211_CMD_CHANGE_NAN_CONFIG.
2963 * See &enum nl80211_nan_conf_attributes for details.
2964 * This attribute is optional.
2965 * @NL80211_ATTR_NAN_NEW_CLUSTER: Flag attribute indicating that a new
2966 * NAN cluster has been created. This is used with
2967 * %NL80211_CMD_NAN_CLUSTER_JOINED
2968 * @NL80211_ATTR_NAN_CAPABILITIES: Nested attribute for NAN capabilities.
2969 * This is used with %NL80211_CMD_GET_WIPHY to indicate the NAN
2970 * capabilities supported by the driver. See &enum nl80211_nan_capabilities
2971 * for details.
2972 *
2973 * @NL80211_ATTR_S1G_PRIMARY_2MHZ: flag attribute indicating that the S1G
2974 * primary channel is 2 MHz wide, and the control channel designates
2975 * the 1 MHz primary subchannel within that 2 MHz primary.
2976 *
2931 * @NUM_NL80211_ATTR: total number of nl80211_attrs available2977 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
2932 * @NL80211_ATTR_MAX: highest attribute number currently defined2978 * @NL80211_ATTR_MAX: highest attribute number currently defined
2933 * @__NL80211_ATTR_AFTER_LAST: internal use2979 * @__NL80211_ATTR_AFTER_LAST: internal use
...@@ -3489,6 +3535,12 @@ enum nl80211_attrs {...@@ -3489,6 +3535,12 @@ enum nl80211_attrs {
34893535
3490 NL80211_ATTR_S1G_LONG_BEACON_PERIOD,3536 NL80211_ATTR_S1G_LONG_BEACON_PERIOD,
3491 NL80211_ATTR_S1G_SHORT_BEACON,3537 NL80211_ATTR_S1G_SHORT_BEACON,
3538 NL80211_ATTR_BSS_PARAM,
3539 NL80211_ATTR_NAN_CONFIG,
3540 NL80211_ATTR_NAN_NEW_CLUSTER,
3541 NL80211_ATTR_NAN_CAPABILITIES,
3542
3543 NL80211_ATTR_S1G_PRIMARY_2MHZ,
34923544
3493 /* add attributes here, update the policy in nl80211.c */3545 /* add attributes here, update the policy in nl80211.c */
34943546
...@@ -3735,6 +3787,22 @@ enum nl80211_eht_gi {...@@ -3735,6 +3787,22 @@ enum nl80211_eht_gi {
3735 NL80211_RATE_INFO_EHT_GI_3_2,3787 NL80211_RATE_INFO_EHT_GI_3_2,
3736};3788};
37373789
3790/**
3791 * enum nl80211_eht_ltf - EHT long training field
3792 * @NL80211_RATE_INFO_EHT_1XLTF: 3.2 usec
3793 * @NL80211_RATE_INFO_EHT_2XLTF: 6.4 usec
3794 * @NL80211_RATE_INFO_EHT_4XLTF: 12.8 usec
3795 * @NL80211_RATE_INFO_EHT_6XLTF: 19.2 usec
3796 * @NL80211_RATE_INFO_EHT_8XLTF: 25.6 usec
3797 */
3798enum nl80211_eht_ltf {
3799 NL80211_RATE_INFO_EHT_1XLTF,
3800 NL80211_RATE_INFO_EHT_2XLTF,
3801 NL80211_RATE_INFO_EHT_4XLTF,
3802 NL80211_RATE_INFO_EHT_6XLTF,
3803 NL80211_RATE_INFO_EHT_8XLTF,
3804};
3805
3738/**3806/**
3739 * enum nl80211_eht_ru_alloc - EHT RU allocation values3807 * enum nl80211_eht_ru_alloc - EHT RU allocation values
3740 * @NL80211_RATE_INFO_EHT_RU_ALLOC_26: 26-tone RU allocation3808 * @NL80211_RATE_INFO_EHT_RU_ALLOC_26: 26-tone RU allocation
...@@ -4371,6 +4439,12 @@ enum nl80211_wmm_rule {...@@ -4371,6 +4439,12 @@ enum nl80211_wmm_rule {
4371 * very low power (VLP) AP, despite being NO_IR.4439 * very low power (VLP) AP, despite being NO_IR.
4372 * @NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY: This channel can be active in4440 * @NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY: This channel can be active in
4373 * 20 MHz bandwidth, despite being NO_IR.4441 * 20 MHz bandwidth, despite being NO_IR.
4442 * @NL80211_FREQUENCY_ATTR_NO_4MHZ: 4 MHz operation is not allowed on this
4443 * channel in current regulatory domain.
4444 * @NL80211_FREQUENCY_ATTR_NO_8MHZ: 8 MHz operation is not allowed on this
4445 * channel in current regulatory domain.
4446 * @NL80211_FREQUENCY_ATTR_NO_16MHZ: 16 MHz operation is not allowed on this
4447 * channel in current regulatory domain.
4374 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number4448 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
4375 * currently defined4449 * currently defined
4376 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use4450 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
...@@ -4416,6 +4490,9 @@ enum nl80211_frequency_attr {...@@ -4416,6 +4490,9 @@ enum nl80211_frequency_attr {
4416 NL80211_FREQUENCY_ATTR_CAN_MONITOR,4490 NL80211_FREQUENCY_ATTR_CAN_MONITOR,
4417 NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP,4491 NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP,
4418 NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY,4492 NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY,
4493 NL80211_FREQUENCY_ATTR_NO_4MHZ,
4494 NL80211_FREQUENCY_ATTR_NO_8MHZ,
4495 NL80211_FREQUENCY_ATTR_NO_16MHZ,
44194496
4420 /* keep last */4497 /* keep last */
4421 __NL80211_FREQUENCY_ATTR_AFTER_LAST,4498 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
...@@ -5481,6 +5558,10 @@ enum nl80211_key_attributes {...@@ -5481,6 +5558,10 @@ enum nl80211_key_attributes {
5481 * see &struct nl80211_txrate_he5558 * see &struct nl80211_txrate_he
5482 * @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us.5559 * @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us.
5483 * @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF.5560 * @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF.
5561 * @NL80211_TXRATE_EHT: EHT rates allowed for TX rate selection,
5562 * see &struct nl80211_txrate_eht
5563 * @NL80211_TXRATE_EHT_GI: configure EHT GI, (u8, see &enum nl80211_eht_gi)
5564 * @NL80211_TXRATE_EHT_LTF: configure EHT LTF, (u8, see &enum nl80211_eht_ltf)
5484 * @__NL80211_TXRATE_AFTER_LAST: internal5565 * @__NL80211_TXRATE_AFTER_LAST: internal
5485 * @NL80211_TXRATE_MAX: highest TX rate attribute5566 * @NL80211_TXRATE_MAX: highest TX rate attribute
5486 */5567 */
...@@ -5493,6 +5574,9 @@ enum nl80211_tx_rate_attributes {...@@ -5493,6 +5574,9 @@ enum nl80211_tx_rate_attributes {
5493 NL80211_TXRATE_HE,5574 NL80211_TXRATE_HE,
5494 NL80211_TXRATE_HE_GI,5575 NL80211_TXRATE_HE_GI,
5495 NL80211_TXRATE_HE_LTF,5576 NL80211_TXRATE_HE_LTF,
5577 NL80211_TXRATE_EHT,
5578 NL80211_TXRATE_EHT_GI,
5579 NL80211_TXRATE_EHT_LTF,
54965580
5497 /* keep last */5581 /* keep last */
5498 __NL80211_TXRATE_AFTER_LAST,5582 __NL80211_TXRATE_AFTER_LAST,
...@@ -5525,6 +5609,15 @@ enum nl80211_txrate_gi {...@@ -5525,6 +5609,15 @@ enum nl80211_txrate_gi {
5525 NL80211_TXRATE_FORCE_LGI,5609 NL80211_TXRATE_FORCE_LGI,
5526};5610};
55275611
5612#define NL80211_EHT_NSS_MAX 16
5613/**
5614 * struct nl80211_txrate_eht - EHT MCS/NSS txrate bitmap
5615 * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.)
5616 */
5617struct nl80211_txrate_eht {
5618 __u16 mcs[NL80211_EHT_NSS_MAX];
5619};
5620
5528/**5621/**
5529 * enum nl80211_band - Frequency band5622 * enum nl80211_band - Frequency band
5530 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band5623 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
...@@ -6649,6 +6742,9 @@ enum nl80211_feature_flags {...@@ -6649,6 +6742,9 @@ enum nl80211_feature_flags {
6649 * (signaling and payload protected) A-MSDUs and this shall be advertised6742 * (signaling and payload protected) A-MSDUs and this shall be advertised
6650 * in the RSNXE.6743 * in the RSNXE.
6651 *6744 *
6745 * @NL80211_EXT_FEATURE_BEACON_RATE_EHT: Driver supports beacon rate
6746 * configuration (AP/mesh) with EHT rates.
6747 *
6652 * @NUM_NL80211_EXT_FEATURES: number of extended features.6748 * @NUM_NL80211_EXT_FEATURES: number of extended features.
6653 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.6749 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
6654 */6750 */
...@@ -6724,6 +6820,7 @@ enum nl80211_ext_feature_index {...@@ -6724,6 +6820,7 @@ enum nl80211_ext_feature_index {
6724 NL80211_EXT_FEATURE_OWE_OFFLOAD_AP,6820 NL80211_EXT_FEATURE_OWE_OFFLOAD_AP,
6725 NL80211_EXT_FEATURE_DFS_CONCURRENT,6821 NL80211_EXT_FEATURE_DFS_CONCURRENT,
6726 NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,6822 NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,
6823 NL80211_EXT_FEATURE_BEACON_RATE_EHT,
67276824
6728 /* add new features before the definition below */6825 /* add new features before the definition below */
6729 NUM_NL80211_EXT_FEATURES,6826 NUM_NL80211_EXT_FEATURES,
...@@ -7278,6 +7375,105 @@ enum nl80211_nan_match_attributes {...@@ -7278,6 +7375,105 @@ enum nl80211_nan_match_attributes {
7278 NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 17375 NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1
7279};7376};
72807377
7378/**
7379 * enum nl80211_nan_band_conf_attributes - NAN band configuration attributes
7380 * @__NL80211_NAN_BAND_CONF_INVALID: Invalid.
7381 * @NL80211_NAN_BAND_CONF_BAND: Band for which the configuration is
7382 * being set. The value is according to &enum nl80211_band (u8).
7383 * @NL80211_NAN_BAND_CONF_FREQ: Discovery frequency. This attribute shall not
7384 * be present on 2.4 GHZ band. On 5 GHz band its presence is optional.
7385 * The allowed values are 5220 (channel 44) or 5745 (channel 149).
7386 * If not present, channel 149 is used if allowed, otherwise channel 44
7387 * will be selected. The value is in MHz (u16).
7388 * @NL80211_NAN_BAND_CONF_RSSI_CLOSE: RSSI close threshold used for NAN state
7389 * transition algorithm as described in chapters 3.3.6 and 3.3.7 "NAN
7390 * Device Role and State Transition" of Wi-Fi Aware (TM) Specification
7391 * v4.0. If not specified, default device value is used. The value should
7392 * be greater than -60 dBm (s8).
7393 * @NL80211_NAN_BAND_CONF_RSSI_MIDDLE: RSSI middle threshold used for NAN state
7394 * transition algorithm as described in chapters 3.3.6 and 3.3.7 "NAN
7395 * Device Role and State Transition" of Wi-Fi Aware (TM) Specification
7396 * v4.0. If not present, default device value is used. The value should be
7397 * greater than -75 dBm and less than %NL80211_NAN_BAND_CONF_RSSI_CLOSE
7398 * (s8).
7399 * @NL80211_NAN_BAND_CONF_WAKE_DW: Committed DW information (values 0-5).
7400 * Value 0 means that the device will not wake up during the
7401 * discovery window. Values 1-5 mean that the device will wake up
7402 * during each 2^(n - 1) discovery window, where n is the value of
7403 * this attribute. Setting this attribute to 0 is not allowed on
7404 * 2.4 GHz band (u8). This is an optional parameter (default is 1).
7405 * @NL80211_NAN_BAND_CONF_DISABLE_SCAN: Optional flag attribute to disable
7406 * scanning (for cluster merge) on the band. If set, the device will not
7407 * scan on this band anymore. Disabling scanning on 2.4 GHz band is not
7408 * allowed.
7409 * @NUM_NL80211_NAN_BAND_CONF_ATTR: Internal.
7410 * @NL80211_NAN_BAND_CONF_ATTR_MAX: Highest NAN band configuration attribute.
7411 *
7412 * These attributes are used to configure NAN band-specific parameters. Note,
7413 * that both RSSI attributes should be configured (or both left unset).
7414 */
7415enum nl80211_nan_band_conf_attributes {
7416 __NL80211_NAN_BAND_CONF_INVALID,
7417 NL80211_NAN_BAND_CONF_BAND,
7418 NL80211_NAN_BAND_CONF_FREQ,
7419 NL80211_NAN_BAND_CONF_RSSI_CLOSE,
7420 NL80211_NAN_BAND_CONF_RSSI_MIDDLE,
7421 NL80211_NAN_BAND_CONF_WAKE_DW,
7422 NL80211_NAN_BAND_CONF_DISABLE_SCAN,
7423
7424 /* keep last */
7425 NUM_NL80211_NAN_BAND_CONF_ATTR,
7426 NL80211_NAN_BAND_CONF_ATTR_MAX = NUM_NL80211_NAN_BAND_CONF_ATTR - 1,
7427};
7428
7429/**
7430 * enum nl80211_nan_conf_attributes - NAN configuration attributes
7431 * @__NL80211_NAN_CONF_INVALID: Invalid attribute, used for validation.
7432 * @NL80211_NAN_CONF_CLUSTER_ID: ID for the NAN cluster. This is a MAC
7433 * 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,
7435 * a random Cluster ID will be chosen.
7436 * @NL80211_NAN_CONF_EXTRA_ATTRS: Additional NAN attributes to be
7437 * published in the beacons. This is an optional byte array.
7438 * @NL80211_NAN_CONF_VENDOR_ELEMS: Vendor-specific elements that will
7439 * be published in the beacons. This is an optional byte array.
7440 * @NL80211_NAN_CONF_BAND_CONFIGS: This is a nested array attribute,
7441 * containing multiple entries for each supported band. Each band
7442 * configuration consists of &enum nl80211_nan_band_conf_attributes.
7443 * @NL80211_NAN_CONF_SCAN_PERIOD: Scan period in seconds. If not configured,
7444 * device default is used. Zero value will disable scanning.
7445 * This is u16 (optional).
7446 * @NL80211_NAN_CONF_SCAN_DWELL_TIME: Scan dwell time in TUs per channel.
7447 * Only non-zero values are valid. If not configured the device default
7448 * value is used. This is u16 (optional)
7449 * @NL80211_NAN_CONF_DISCOVERY_BEACON_INTERVAL: Discovery beacon interval
7450 * in TUs. Valid range is 50-200 TUs. If not configured the device default
7451 * value is used. This is u8 (optional)
7452 * @NL80211_NAN_CONF_NOTIFY_DW: If set, the driver will notify userspace about
7453 * the upcoming discovery window with
7454 * %NL80211_CMD_NAN_NEXT_DW_NOTIFICATION.
7455 * This is a flag attribute.
7456 * @NUM_NL80211_NAN_CONF_ATTR: Internal.
7457 * @NL80211_NAN_CONF_ATTR_MAX: Highest NAN configuration attribute.
7458 *
7459 * These attributes are used to configure NAN-specific parameters.
7460 */
7461enum nl80211_nan_conf_attributes {
7462 __NL80211_NAN_CONF_INVALID,
7463 NL80211_NAN_CONF_CLUSTER_ID,
7464 NL80211_NAN_CONF_EXTRA_ATTRS,
7465 NL80211_NAN_CONF_VENDOR_ELEMS,
7466 NL80211_NAN_CONF_BAND_CONFIGS,
7467 NL80211_NAN_CONF_SCAN_PERIOD,
7468 NL80211_NAN_CONF_SCAN_DWELL_TIME,
7469 NL80211_NAN_CONF_DISCOVERY_BEACON_INTERVAL,
7470 NL80211_NAN_CONF_NOTIFY_DW,
7471
7472 /* keep last */
7473 NUM_NL80211_NAN_CONF_ATTR,
7474 NL80211_NAN_CONF_ATTR_MAX = NUM_NL80211_NAN_CONF_ATTR - 1,
7475};
7476
7281/**7477/**
7282 * enum nl80211_external_auth_action - Action to perform with external7478 * enum nl80211_external_auth_action - Action to perform with external
7283 * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.7479 * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.
...@@ -8187,4 +8383,54 @@ enum nl80211_s1g_short_beacon_attrs {...@@ -8187,4 +8383,54 @@ enum nl80211_s1g_short_beacon_attrs {
8187 __NL80211_S1G_SHORT_BEACON_ATTR_LAST - 18383 __NL80211_S1G_SHORT_BEACON_ATTR_LAST - 1
8188};8384};
81898385
8386/**
8387 * enum nl80211_nan_capabilities - NAN (Neighbor Aware Networking)
8388 * capabilities.
8389 *
8390 * @__NL80211_NAN_CAPABILITIES_INVALID: Invalid.
8391 * @NL80211_NAN_CAPA_CONFIGURABLE_SYNC: Flag attribute indicating that
8392 * the device supports configurable synchronization. If set, the device
8393 * should be able to handle %NL80211_ATTR_NAN_CONFIG
8394 * attribute in the %NL80211_CMD_START_NAN (and change) command.
8395 * @NL80211_NAN_CAPA_USERSPACE_DE: Flag attribute indicating that
8396 * NAN Discovery Engine (DE) is not offloaded and the driver assumes
8397 * user space DE implementation. When set, %NL80211_CMD_ADD_NAN_FUNCTION,
8398 * %NL80211_CMD_DEL_NAN_FUNCTION and %NL80211_CMD_NAN_MATCH commands
8399 * should not be used. In addition, the device/driver should support
8400 * sending discovery window (DW) notifications using
8401 * %NL80211_CMD_NAN_NEXT_DW_NOTIFICATION and handling transmission and
8402 * reception of NAN SDF frames on NAN device interface during DW windows.
8403 * (%NL80211_CMD_FRAME is used to transmit SDFs)
8404 * @NL80211_NAN_CAPA_OP_MODE: u8 attribute indicating the supported operation
8405 * modes as defined in Wi-Fi Aware (TM) specification Table 81 (Operation
8406 * Mode field format).
8407 * @NL80211_NAN_CAPA_NUM_ANTENNAS: u8 attribute indicating the number of
8408 * TX and RX antennas supported by the device. Lower nibble indicates
8409 * the number of TX antennas and upper nibble indicates the number of RX
8410 * antennas. Value 0 indicates the information is not available.
8411 * See table 79 of Wi-Fi Aware (TM) specification (Number of
8412 * Antennas field).
8413 * @NL80211_NAN_CAPA_MAX_CHANNEL_SWITCH_TIME: u16 attribute indicating the
8414 * maximum time in microseconds that the device requires to switch
8415 * channels.
8416 * @NL80211_NAN_CAPA_CAPABILITIES: u8 attribute containing the
8417 * capabilities of the device as defined in Wi-Fi Aware (TM)
8418 * specification Table 79 (Capabilities field).
8419 * @__NL80211_NAN_CAPABILITIES_LAST: Internal
8420 * @NL80211_NAN_CAPABILITIES_MAX: Highest NAN capability attribute.
8421 */
8422enum nl80211_nan_capabilities {
8423 __NL80211_NAN_CAPABILITIES_INVALID,
8424
8425 NL80211_NAN_CAPA_CONFIGURABLE_SYNC,
8426 NL80211_NAN_CAPA_USERSPACE_DE,
8427 NL80211_NAN_CAPA_OP_MODE,
8428 NL80211_NAN_CAPA_NUM_ANTENNAS,
8429 NL80211_NAN_CAPA_MAX_CHANNEL_SWITCH_TIME,
8430 NL80211_NAN_CAPA_CAPABILITIES,
8431 /* keep last */
8432 __NL80211_NAN_CAPABILITIES_LAST,
8433 NL80211_NAN_CAPABILITIES_MAX = __NL80211_NAN_CAPABILITIES_LAST - 1,
8434};
8435
8190#endif /* __LINUX_NL80211_H */8436#endif /* __LINUX_NL80211_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/nsfs.h+68-2
...@@ -16,8 +16,6 @@...@@ -16,8 +16,6 @@
16#define NS_GET_NSTYPE _IO(NSIO, 0x3)16#define NS_GET_NSTYPE _IO(NSIO, 0x3)
17/* Get owner UID (in the caller's user namespace) for a user namespace */17/* Get owner UID (in the caller's user namespace) for a user namespace */
18#define NS_GET_OWNER_UID _IO(NSIO, 0x4)18#define NS_GET_OWNER_UID _IO(NSIO, 0x4)
19/* Get the id for a mount namespace */
20#define NS_GET_MNTNS_ID _IOR(NSIO, 0x5, __u64)
21/* Translate pid from target pid namespace into the caller's pid namespace. */19/* Translate pid from target pid namespace into the caller's pid namespace. */
22#define NS_GET_PID_FROM_PIDNS _IOR(NSIO, 0x6, int)20#define NS_GET_PID_FROM_PIDNS _IOR(NSIO, 0x6, int)
23/* Return thread-group leader id of pid in the callers pid namespace. */21/* Return thread-group leader id of pid in the callers pid namespace. */
...@@ -42,6 +40,10 @@ struct mnt_ns_info {...@@ -42,6 +40,10 @@ struct mnt_ns_info {
42/* Get previous namespace. */40/* Get previous namespace. */
43#define NS_MNT_GET_PREV _IOR(NSIO, 12, struct mnt_ns_info)41#define NS_MNT_GET_PREV _IOR(NSIO, 12, struct mnt_ns_info)
4442
43/* Retrieve namespace identifiers. */
44#define NS_GET_MNTNS_ID _IOR(NSIO, 5, __u64)
45#define NS_GET_ID _IOR(NSIO, 13, __u64)
46
45enum init_ns_ino {47enum init_ns_ino {
46 IPC_NS_INIT_INO = 0xEFFFFFFFU,48 IPC_NS_INIT_INO = 0xEFFFFFFFU,
47 UTS_NS_INIT_INO = 0xEFFFFFFEU,49 UTS_NS_INIT_INO = 0xEFFFFFFEU,
...@@ -53,4 +55,68 @@ enum init_ns_ino {...@@ -53,4 +55,68 @@ enum init_ns_ino {
53 MNT_NS_INIT_INO = 0xEFFFFFF8U,55 MNT_NS_INIT_INO = 0xEFFFFFF8U,
54};56};
5557
58struct nsfs_file_handle {
59 __u64 ns_id;
60 __u32 ns_type;
61 __u32 ns_inum;
62};
63
64#define NSFS_FILE_HANDLE_SIZE_VER0 16 /* sizeof first published struct */
65#define NSFS_FILE_HANDLE_SIZE_LATEST sizeof(struct nsfs_file_handle) /* sizeof latest published struct */
66
67enum init_ns_id {
68 IPC_NS_INIT_ID = 1ULL,
69 UTS_NS_INIT_ID = 2ULL,
70 USER_NS_INIT_ID = 3ULL,
71 PID_NS_INIT_ID = 4ULL,
72 CGROUP_NS_INIT_ID = 5ULL,
73 TIME_NS_INIT_ID = 6ULL,
74 NET_NS_INIT_ID = 7ULL,
75 MNT_NS_INIT_ID = 8ULL,
76};
77
78enum ns_type {
79 TIME_NS = (1ULL << 7), /* CLONE_NEWTIME */
80 MNT_NS = (1ULL << 17), /* CLONE_NEWNS */
81 CGROUP_NS = (1ULL << 25), /* CLONE_NEWCGROUP */
82 UTS_NS = (1ULL << 26), /* CLONE_NEWUTS */
83 IPC_NS = (1ULL << 27), /* CLONE_NEWIPC */
84 USER_NS = (1ULL << 28), /* CLONE_NEWUSER */
85 PID_NS = (1ULL << 29), /* CLONE_NEWPID */
86 NET_NS = (1ULL << 30), /* CLONE_NEWNET */
87};
88
89/**
90 * struct ns_id_req - namespace ID request structure
91 * @size: size of this structure
92 * @spare: reserved for future use
93 * @filter: filter mask
94 * @ns_id: last namespace id
95 * @user_ns_id: owning user namespace ID
96 *
97 * Structure for passing namespace ID and miscellaneous parameters to
98 * statns(2) and listns(2).
99 *
100 * For statns(2) @param represents the request mask.
101 * For listns(2) @param represents the last listed mount id (or zero).
102 */
103struct ns_id_req {
104 __u32 size;
105 __u32 spare;
106 __u64 ns_id;
107 struct /* listns */ {
108 __u32 ns_type;
109 __u32 spare2;
110 __u64 user_ns_id;
111 };
112};
113
114/*
115 * Special @user_ns_id value that can be passed to listns()
116 */
117#define LISTNS_CURRENT_USER 0xffffffffffffffff /* Caller's userns */
118
119/* List of all ns_id_req versions. */
120#define NS_ID_REQ_SIZE_VER0 32 /* sizeof first published struct */
121
56#endif /* __LINUX_NSFS_H */122#endif /* __LINUX_NSFS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/ovpn.h+1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2/* Do not edit directly, auto-generated from: */2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/ovpn.yaml */3/* Documentation/netlink/specs/ovpn.yaml */
4/* YNL-GEN uapi header */4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
56
6#ifndef _LINUX_OVPN_H7#ifndef _LINUX_OVPN_H
7#define _LINUX_OVPN_H8#define _LINUX_OVPN_H
lib/libc/include/any-linux-any/linux/pci_regs.h+99
...@@ -207,6 +207,9 @@...@@ -207,6 +207,9 @@
207207
208/* Capability lists */208/* Capability lists */
209209
210#define PCI_CAP_ID_MASK 0x00ff /* Capability ID mask */
211#define PCI_CAP_LIST_NEXT_MASK 0xff00 /* Next Capability Pointer mask */
212
210#define PCI_CAP_LIST_ID 0 /* Capability ID */213#define PCI_CAP_LIST_ID 0 /* Capability ID */
211#define PCI_CAP_ID_PM 0x01 /* Power Management */214#define PCI_CAP_ID_PM 0x01 /* Power Management */
212#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */215#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */
...@@ -500,6 +503,7 @@...@@ -500,6 +503,7 @@
500#define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */503#define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */
501#define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */504#define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */
502#define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */505#define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */
506#define PCI_EXP_DEVCAP_TEE 0x40000000 /* TEE I/O (TDISP) Support */
503#define PCI_EXP_DEVCTL 0x08 /* Device Control */507#define PCI_EXP_DEVCTL 0x08 /* Device Control */
504#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */508#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */
505#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */509#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */
...@@ -751,6 +755,8 @@...@@ -751,6 +755,8 @@
751#define PCI_EXT_CAP_ID_NPEM 0x29 /* Native PCIe Enclosure Management */755#define PCI_EXT_CAP_ID_NPEM 0x29 /* Native PCIe Enclosure Management */
752#define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */756#define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */
753#define PCI_EXT_CAP_ID_DOE 0x2E /* Data Object Exchange */757#define PCI_EXT_CAP_ID_DOE 0x2E /* Data Object Exchange */
758#define PCI_EXT_CAP_ID_DEV3 0x2F /* Device 3 Capability/Control/Status */
759#define PCI_EXT_CAP_ID_IDE 0x30 /* Integrity and Data Encryption */
754#define PCI_EXT_CAP_ID_PL_64GT 0x31 /* Physical Layer 64.0 GT/s */760#define PCI_EXT_CAP_ID_PL_64GT 0x31 /* Physical Layer 64.0 GT/s */
755#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PL_64GT761#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PL_64GT
756762
...@@ -776,6 +782,12 @@...@@ -776,6 +782,12 @@
776#define PCI_ERR_UNC_MCBTLP 0x00800000 /* MC blocked TLP */782#define PCI_ERR_UNC_MCBTLP 0x00800000 /* MC blocked TLP */
777#define PCI_ERR_UNC_ATOMEG 0x01000000 /* Atomic egress blocked */783#define PCI_ERR_UNC_ATOMEG 0x01000000 /* Atomic egress blocked */
778#define PCI_ERR_UNC_TLPPRE 0x02000000 /* TLP prefix blocked */784#define PCI_ERR_UNC_TLPPRE 0x02000000 /* TLP prefix blocked */
785#define PCI_ERR_UNC_POISON_BLK 0x04000000 /* Poisoned TLP Egress Blocked */
786#define PCI_ERR_UNC_DMWR_BLK 0x08000000 /* DMWr Request Egress Blocked */
787#define PCI_ERR_UNC_IDE_CHECK 0x10000000 /* IDE Check Failed */
788#define PCI_ERR_UNC_MISR_IDE 0x20000000 /* Misrouted IDE TLP */
789#define PCI_ERR_UNC_PCRC_CHECK 0x40000000 /* PCRC Check Failed */
790#define PCI_ERR_UNC_XLAT_BLK 0x80000000 /* TLP Translation Egress Blocked */
779#define PCI_ERR_UNCOR_MASK 0x08 /* Uncorrectable Error Mask */791#define PCI_ERR_UNCOR_MASK 0x08 /* Uncorrectable Error Mask */
780 /* Same bits as above */792 /* Same bits as above */
781#define PCI_ERR_UNCOR_SEVER 0x0c /* Uncorrectable Error Severity */793#define PCI_ERR_UNCOR_SEVER 0x0c /* Uncorrectable Error Severity */
...@@ -798,6 +810,7 @@...@@ -798,6 +810,7 @@
798#define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */810#define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */
799#define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */811#define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */
800#define PCI_ERR_CAP_PREFIX_LOG_PRESENT 0x00000800 /* TLP Prefix Log Present */812#define PCI_ERR_CAP_PREFIX_LOG_PRESENT 0x00000800 /* TLP Prefix Log Present */
813#define PCI_ERR_CAP_COMP_TIME_LOG 0x00001000 /* Completion Timeout Prefix/Header Log Capable */
801#define PCI_ERR_CAP_TLP_LOG_FLIT 0x00040000 /* TLP was logged in Flit Mode */814#define PCI_ERR_CAP_TLP_LOG_FLIT 0x00040000 /* TLP was logged in Flit Mode */
802#define PCI_ERR_CAP_TLP_LOG_SIZE 0x00f80000 /* Logged TLP Size (only in Flit mode) */815#define PCI_ERR_CAP_TLP_LOG_SIZE 0x00f80000 /* Logged TLP Size (only in Flit mode) */
803#define PCI_ERR_HEADER_LOG 0x1c /* Header Log Register (16 bytes) */816#define PCI_ERR_HEADER_LOG 0x1c /* Header Log Register (16 bytes) */
...@@ -1234,9 +1247,95 @@...@@ -1234,9 +1247,95 @@
1234/* Deprecated old name, replaced with PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE */1247/* Deprecated old name, replaced with PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE */
1235#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE1248#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE
12361249
1250/* Device 3 Extended Capability */
1251#define PCI_DEV3_CAP 0x04 /* Device 3 Capabilities Register */
1252#define PCI_DEV3_CTL 0x08 /* Device 3 Control Register */
1253#define PCI_DEV3_STA 0x0c /* Device 3 Status Register */
1254#define PCI_DEV3_STA_SEGMENT 0x8 /* Segment Captured (end-to-end flit-mode detected) */
1255
1237/* Compute Express Link (CXL r3.1, sec 8.1.5) */1256/* Compute Express Link (CXL r3.1, sec 8.1.5) */
1238#define PCI_DVSEC_CXL_PORT 31257#define PCI_DVSEC_CXL_PORT 3
1239#define PCI_DVSEC_CXL_PORT_CTL 0x0c1258#define PCI_DVSEC_CXL_PORT_CTL 0x0c
1240#define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x000000011259#define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001
12411260
1261/* Integrity and Data Encryption Extended Capability */
1262#define PCI_IDE_CAP 0x04
1263#define PCI_IDE_CAP_LINK 0x1 /* Link IDE Stream Supported */
1264#define PCI_IDE_CAP_SELECTIVE 0x2 /* Selective IDE Streams Supported */
1265#define PCI_IDE_CAP_FLOWTHROUGH 0x4 /* Flow-Through IDE Stream Supported */
1266#define PCI_IDE_CAP_PARTIAL_HEADER_ENC 0x8 /* Partial Header Encryption Supported */
1267#define PCI_IDE_CAP_AGGREGATION 0x10 /* Aggregation Supported */
1268#define PCI_IDE_CAP_PCRC 0x20 /* PCRC Supported */
1269#define PCI_IDE_CAP_IDE_KM 0x40 /* IDE_KM Protocol Supported */
1270#define PCI_IDE_CAP_SEL_CFG 0x80 /* Selective IDE for Config Request Support */
1271#define PCI_IDE_CAP_ALG __GENMASK(12, 8) /* Supported Algorithms */
1272#define PCI_IDE_CAP_ALG_AES_GCM_256 0 /* AES-GCM 256 key size, 96b MAC */
1273#define PCI_IDE_CAP_LINK_TC_NUM __GENMASK(15, 13) /* Link IDE TCs */
1274#define PCI_IDE_CAP_SEL_NUM __GENMASK(23, 16) /* Supported Selective IDE Streams */
1275#define PCI_IDE_CAP_TEE_LIMITED 0x1000000 /* TEE-Limited Stream Supported */
1276#define PCI_IDE_CTL 0x08
1277#define PCI_IDE_CTL_FLOWTHROUGH_IDE 0x4 /* Flow-Through IDE Stream Enabled */
1278
1279#define PCI_IDE_LINK_STREAM_0 0xc /* First Link Stream Register Block */
1280#define PCI_IDE_LINK_BLOCK_SIZE 8
1281/* Link IDE Stream block, up to PCI_IDE_CAP_LINK_TC_NUM */
1282#define PCI_IDE_LINK_CTL_0 0x00 /* First Link Control Register Offset in block */
1283#define PCI_IDE_LINK_CTL_EN 0x1 /* Link IDE Stream Enable */
1284#define PCI_IDE_LINK_CTL_TX_AGGR_NPR __GENMASK(3, 2) /* Tx Aggregation Mode NPR */
1285#define PCI_IDE_LINK_CTL_TX_AGGR_PR __GENMASK(5, 4) /* Tx Aggregation Mode PR */
1286#define PCI_IDE_LINK_CTL_TX_AGGR_CPL __GENMASK(7, 6) /* Tx Aggregation Mode CPL */
1287#define PCI_IDE_LINK_CTL_PCRC_EN 0x100 /* PCRC Enable */
1288#define PCI_IDE_LINK_CTL_PART_ENC __GENMASK(13, 10) /* Partial Header Encryption Mode */
1289#define PCI_IDE_LINK_CTL_ALG __GENMASK(18, 14) /* Selection from PCI_IDE_CAP_ALG */
1290#define PCI_IDE_LINK_CTL_TC __GENMASK(21, 19) /* Traffic Class */
1291#define PCI_IDE_LINK_CTL_ID __GENMASK(31, 24) /* Stream ID */
1292#define PCI_IDE_LINK_STS_0 0x4 /* First Link Status Register Offset in block */
1293#define PCI_IDE_LINK_STS_STATE __GENMASK(3, 0) /* Link IDE Stream State */
1294#define PCI_IDE_LINK_STS_IDE_FAIL 0x80000000 /* IDE fail message received */
1295
1296/* Selective IDE Stream block, up to PCI_IDE_CAP_SELECTIVE_STREAMS_NUM */
1297/* Selective IDE Stream Capability Register */
1298#define PCI_IDE_SEL_CAP 0x00
1299#define PCI_IDE_SEL_CAP_ASSOC_NUM __GENMASK(3, 0)
1300/* Selective IDE Stream Control Register */
1301#define PCI_IDE_SEL_CTL 0x04
1302#define PCI_IDE_SEL_CTL_EN 0x1 /* Selective IDE Stream Enable */
1303#define PCI_IDE_SEL_CTL_TX_AGGR_NPR __GENMASK(3, 2) /* Tx Aggregation Mode NPR */
1304#define PCI_IDE_SEL_CTL_TX_AGGR_PR __GENMASK(5, 4) /* Tx Aggregation Mode PR */
1305#define PCI_IDE_SEL_CTL_TX_AGGR_CPL __GENMASK(7, 6) /* Tx Aggregation Mode CPL */
1306#define PCI_IDE_SEL_CTL_PCRC_EN 0x100 /* PCRC Enable */
1307#define PCI_IDE_SEL_CTL_CFG_EN 0x200 /* Selective IDE for Configuration Requests */
1308#define PCI_IDE_SEL_CTL_PART_ENC __GENMASK(13, 10) /* Partial Header Encryption Mode */
1309#define PCI_IDE_SEL_CTL_ALG __GENMASK(18, 14) /* Selection from PCI_IDE_CAP_ALG */
1310#define PCI_IDE_SEL_CTL_TC __GENMASK(21, 19) /* Traffic Class */
1311#define PCI_IDE_SEL_CTL_DEFAULT 0x400000 /* Default Stream */
1312#define PCI_IDE_SEL_CTL_TEE_LIMITED 0x800000 /* TEE-Limited Stream */
1313#define PCI_IDE_SEL_CTL_ID __GENMASK(31, 24) /* Stream ID */
1314#define PCI_IDE_SEL_CTL_ID_MAX 255
1315/* Selective IDE Stream Status Register */
1316#define PCI_IDE_SEL_STS 0x08
1317#define PCI_IDE_SEL_STS_STATE __GENMASK(3, 0) /* Selective IDE Stream State */
1318#define PCI_IDE_SEL_STS_STATE_INSECURE 0
1319#define PCI_IDE_SEL_STS_STATE_SECURE 2
1320#define PCI_IDE_SEL_STS_IDE_FAIL 0x80000000 /* IDE fail message received */
1321/* IDE RID Association Register 1 */
1322#define PCI_IDE_SEL_RID_1 0x0c
1323#define PCI_IDE_SEL_RID_1_LIMIT __GENMASK(23, 8)
1324/* IDE RID Association Register 2 */
1325#define PCI_IDE_SEL_RID_2 0x10
1326#define PCI_IDE_SEL_RID_2_VALID 0x1
1327#define PCI_IDE_SEL_RID_2_BASE __GENMASK(23, 8)
1328#define PCI_IDE_SEL_RID_2_SEG __GENMASK(31, 24)
1329/* Selective IDE Address Association Register Block, up to PCI_IDE_SEL_CAP_ASSOC_NUM */
1330#define PCI_IDE_SEL_ADDR_BLOCK_SIZE 12
1331#define PCI_IDE_SEL_ADDR_1(x) (20 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
1332#define PCI_IDE_SEL_ADDR_1_VALID 0x1
1333#define PCI_IDE_SEL_ADDR_1_BASE_LOW __GENMASK(19, 8)
1334#define PCI_IDE_SEL_ADDR_1_LIMIT_LOW __GENMASK(31, 20)
1335/* IDE Address Association Register 2 is "Memory Limit Upper" */
1336#define PCI_IDE_SEL_ADDR_2(x) (24 + (x) * PCI_IDE_SEL_ADDR_BLOCK_SIZE)
1337/* IDE Address Association Register 3 is "Memory Base Upper" */
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))
1340
1242#endif /* LINUX_PCI_REGS_H */1341#endif /* LINUX_PCI_REGS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/perf_event.h+23-2
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2/*2/*
3 * Performance events:3 * Performance events:
4 *4 *
5 * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de>5 * Copyright (C) 2008-2009, Linutronix GmbH, Thomas Gleixner <tglx@kernel.org>
6 * Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar6 * Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar
7 * Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra7 * Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra
8 *8 *
...@@ -382,6 +382,7 @@ enum perf_event_read_format {...@@ -382,6 +382,7 @@ enum perf_event_read_format {
382#define PERF_ATTR_SIZE_VER6 120 /* Add: aux_sample_size */382#define PERF_ATTR_SIZE_VER6 120 /* Add: aux_sample_size */
383#define PERF_ATTR_SIZE_VER7 128 /* Add: sig_data */383#define PERF_ATTR_SIZE_VER7 128 /* Add: sig_data */
384#define PERF_ATTR_SIZE_VER8 136 /* Add: config3 */384#define PERF_ATTR_SIZE_VER8 136 /* Add: config3 */
385#define PERF_ATTR_SIZE_VER9 144 /* add: config4 */
385386
386/*387/*
387 * 'struct perf_event_attr' contains various attributes that define388 * 'struct perf_event_attr' contains various attributes that define
...@@ -463,7 +464,9 @@ struct perf_event_attr {...@@ -463,7 +464,9 @@ struct perf_event_attr {
463 inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */464 inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */
464 remove_on_exec : 1, /* event is removed from task on exec */465 remove_on_exec : 1, /* event is removed from task on exec */
465 sigtrap : 1, /* send synchronous SIGTRAP on event */466 sigtrap : 1, /* send synchronous SIGTRAP on event */
466 __reserved_1 : 26;467 defer_callchain: 1, /* request PERF_RECORD_CALLCHAIN_DEFERRED records */
468 defer_output : 1, /* output PERF_RECORD_CALLCHAIN_DEFERRED records */
469 __reserved_1 : 24;
467470
468 union {471 union {
469 __u32 wakeup_events; /* wake up every n events */472 __u32 wakeup_events; /* wake up every n events */
...@@ -543,6 +546,7 @@ struct perf_event_attr {...@@ -543,6 +546,7 @@ struct perf_event_attr {
543 __u64 sig_data;546 __u64 sig_data;
544547
545 __u64 config3; /* extension of config2 */548 __u64 config3; /* extension of config2 */
549 __u64 config4; /* extension of config3 */
546};550};
547551
548/*552/*
...@@ -1239,6 +1243,22 @@ enum perf_event_type {...@@ -1239,6 +1243,22 @@ enum perf_event_type {
1239 */1243 */
1240 PERF_RECORD_AUX_OUTPUT_HW_ID = 21,1244 PERF_RECORD_AUX_OUTPUT_HW_ID = 21,
12411245
1246 /*
1247 * This user callchain capture was deferred until shortly before
1248 * returning to user space. Previous samples would have kernel
1249 * callchains only and they need to be stitched with this to make full
1250 * callchains.
1251 *
1252 * struct {
1253 * struct perf_event_header header;
1254 * u64 cookie;
1255 * u64 nr;
1256 * u64 ips[nr];
1257 * struct sample_id sample_id;
1258 * };
1259 */
1260 PERF_RECORD_CALLCHAIN_DEFERRED = 22,
1261
1242 PERF_RECORD_MAX, /* non-ABI */1262 PERF_RECORD_MAX, /* non-ABI */
1243};1263};
12441264
...@@ -1269,6 +1289,7 @@ enum perf_callchain_context {...@@ -1269,6 +1289,7 @@ enum perf_callchain_context {
1269 PERF_CONTEXT_HV = (__u64)-32,1289 PERF_CONTEXT_HV = (__u64)-32,
1270 PERF_CONTEXT_KERNEL = (__u64)-128,1290 PERF_CONTEXT_KERNEL = (__u64)-128,
1271 PERF_CONTEXT_USER = (__u64)-512,1291 PERF_CONTEXT_USER = (__u64)-512,
1292 PERF_CONTEXT_USER_DEFERRED = (__u64)-640,
12721293
1273 PERF_CONTEXT_GUEST = (__u64)-2048,1294 PERF_CONTEXT_GUEST = (__u64)-2048,
1274 PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176,1295 PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176,
lib/libc/include/any-linux-any/linux/pidfd.h+9-2
...@@ -22,8 +22,12 @@...@@ -22,8 +22,12 @@
22#define PIDFD_INFO_CGROUPID (1UL << 2) /* Always returned if available, even if not requested */22#define PIDFD_INFO_CGROUPID (1UL << 2) /* Always returned if available, even if not requested */
23#define PIDFD_INFO_EXIT (1UL << 3) /* Only returned if requested. */23#define PIDFD_INFO_EXIT (1UL << 3) /* Only returned if requested. */
24#define PIDFD_INFO_COREDUMP (1UL << 4) /* Only returned if requested. */24#define PIDFD_INFO_COREDUMP (1UL << 4) /* Only returned if requested. */
25#define PIDFD_INFO_SUPPORTED_MASK (1UL << 5) /* Want/got supported mask flags */
26#define PIDFD_INFO_COREDUMP_SIGNAL (1UL << 6) /* Always returned if PIDFD_INFO_COREDUMP is requested. */
2527
26#define PIDFD_INFO_SIZE_VER0 64 /* sizeof first published struct */28#define PIDFD_INFO_SIZE_VER0 64 /* sizeof first published struct */
29#define PIDFD_INFO_SIZE_VER1 72 /* sizeof second published struct */
30#define PIDFD_INFO_SIZE_VER2 80 /* sizeof third published struct */
2731
28/*32/*
29 * Values for @coredump_mask in pidfd_info.33 * Values for @coredump_mask in pidfd_info.
...@@ -87,8 +91,11 @@ struct pidfd_info {...@@ -87,8 +91,11 @@ struct pidfd_info {
87 __u32 fsuid;91 __u32 fsuid;
88 __u32 fsgid;92 __u32 fsgid;
89 __s32 exit_code;93 __s32 exit_code;
90 __u32 coredump_mask;94 struct /* coredump info */ {
91 __u32 __spare1;95 __u32 coredump_mask;
96 __u32 coredump_signal;
97 };
98 __u64 supported_mask; /* Mask flags that this kernel supports */
92};99};
93100
94#define PIDFS_IOCTL_MAGIC 0xFF101#define PIDFS_IOCTL_MAGIC 0xFF
lib/libc/include/any-linux-any/linux/pr.h+16
...@@ -56,6 +56,18 @@ struct pr_clear {...@@ -56,6 +56,18 @@ struct pr_clear {
56 __u32 __pad;56 __u32 __pad;
57};57};
5858
59struct pr_read_keys {
60 __u32 generation;
61 __u32 num_keys;
62 __u64 keys_ptr;
63};
64
65struct pr_read_reservation {
66 __u64 key;
67 __u32 generation;
68 __u32 type;
69};
70
59#define PR_FL_IGNORE_KEY (1 << 0) /* ignore existing key */71#define PR_FL_IGNORE_KEY (1 << 0) /* ignore existing key */
6072
61#define IOC_PR_REGISTER _IOW('p', 200, struct pr_registration)73#define IOC_PR_REGISTER _IOW('p', 200, struct pr_registration)
...@@ -64,5 +76,9 @@ struct pr_clear {...@@ -64,5 +76,9 @@ struct pr_clear {
64#define IOC_PR_PREEMPT _IOW('p', 203, struct pr_preempt)76#define IOC_PR_PREEMPT _IOW('p', 203, struct pr_preempt)
65#define IOC_PR_PREEMPT_ABORT _IOW('p', 204, struct pr_preempt)77#define IOC_PR_PREEMPT_ABORT _IOW('p', 204, struct pr_preempt)
66#define IOC_PR_CLEAR _IOW('p', 205, struct pr_clear)78#define IOC_PR_CLEAR _IOW('p', 205, struct pr_clear)
79#define IOC_PR_READ_KEYS _IOWR('p', 206, struct pr_read_keys)
80#define IOC_PR_READ_RESERVATION _IOR('p', 207, struct pr_read_reservation)
81
82#define PR_KEYS_MAX (1u << 16)
6783
68#endif /* _PR_H */84#endif /* _PR_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/prctl.h+10
...@@ -177,7 +177,17 @@ struct prctl_mm_map {...@@ -177,7 +177,17 @@ struct prctl_mm_map {
177177
178#define PR_GET_TID_ADDRESS 40178#define PR_GET_TID_ADDRESS 40
179179
180/*
181 * Flags for PR_SET_THP_DISABLE are only applicable when disabling. Bit 0
182 * is reserved, so PR_GET_THP_DISABLE can return "1 | flags", to effectively
183 * return "1" when no flags were specified for PR_SET_THP_DISABLE.
184 */
180#define PR_SET_THP_DISABLE 41185#define PR_SET_THP_DISABLE 41
186/*
187 * Don't disable THPs when explicitly advised (e.g., MADV_HUGEPAGE /
188 * VM_HUGEPAGE, MADV_COLLAPSE).
189 */
190# define PR_THP_DISABLE_EXCEPT_ADVISED (1 << 1)
181#define PR_GET_THP_DISABLE 42191#define PR_GET_THP_DISABLE 42
182192
183/*193/*
lib/libc/include/any-linux-any/linux/psp-sev.h+50-26
...@@ -47,32 +47,32 @@ typedef enum {...@@ -47,32 +47,32 @@ typedef enum {
47 * with possible values from the specification.47 * with possible values from the specification.
48 */48 */
49 SEV_RET_NO_FW_CALL = -1,49 SEV_RET_NO_FW_CALL = -1,
50 SEV_RET_SUCCESS = 0,50 SEV_RET_SUCCESS = 0,
51 SEV_RET_INVALID_PLATFORM_STATE,51 SEV_RET_INVALID_PLATFORM_STATE = 0x0001,
52 SEV_RET_INVALID_GUEST_STATE,52 SEV_RET_INVALID_GUEST_STATE = 0x0002,
53 SEV_RET_INAVLID_CONFIG,53 SEV_RET_INAVLID_CONFIG = 0x0003,
54 SEV_RET_INVALID_CONFIG = SEV_RET_INAVLID_CONFIG,54 SEV_RET_INVALID_CONFIG = SEV_RET_INAVLID_CONFIG,
55 SEV_RET_INVALID_LEN,55 SEV_RET_INVALID_LEN = 0x0004,
56 SEV_RET_ALREADY_OWNED,56 SEV_RET_ALREADY_OWNED = 0x0005,
57 SEV_RET_INVALID_CERTIFICATE,57 SEV_RET_INVALID_CERTIFICATE = 0x0006,
58 SEV_RET_POLICY_FAILURE,58 SEV_RET_POLICY_FAILURE = 0x0007,
59 SEV_RET_INACTIVE,59 SEV_RET_INACTIVE = 0x0008,
60 SEV_RET_INVALID_ADDRESS,60 SEV_RET_INVALID_ADDRESS = 0x0009,
61 SEV_RET_BAD_SIGNATURE,61 SEV_RET_BAD_SIGNATURE = 0x000A,
62 SEV_RET_BAD_MEASUREMENT,62 SEV_RET_BAD_MEASUREMENT = 0x000B,
63 SEV_RET_ASID_OWNED,63 SEV_RET_ASID_OWNED = 0x000C,
64 SEV_RET_INVALID_ASID,64 SEV_RET_INVALID_ASID = 0x000D,
65 SEV_RET_WBINVD_REQUIRED,65 SEV_RET_WBINVD_REQUIRED = 0x000E,
66 SEV_RET_DFFLUSH_REQUIRED,66 SEV_RET_DFFLUSH_REQUIRED = 0x000F,
67 SEV_RET_INVALID_GUEST,67 SEV_RET_INVALID_GUEST = 0x0010,
68 SEV_RET_INVALID_COMMAND,68 SEV_RET_INVALID_COMMAND = 0x0011,
69 SEV_RET_ACTIVE,69 SEV_RET_ACTIVE = 0x0012,
70 SEV_RET_HWSEV_RET_PLATFORM,70 SEV_RET_HWSEV_RET_PLATFORM = 0x0013,
71 SEV_RET_HWSEV_RET_UNSAFE,71 SEV_RET_HWSEV_RET_UNSAFE = 0x0014,
72 SEV_RET_UNSUPPORTED,72 SEV_RET_UNSUPPORTED = 0x0015,
73 SEV_RET_INVALID_PARAM,73 SEV_RET_INVALID_PARAM = 0x0016,
74 SEV_RET_RESOURCE_LIMIT,74 SEV_RET_RESOURCE_LIMIT = 0x0017,
75 SEV_RET_SECURE_DATA_INVALID,75 SEV_RET_SECURE_DATA_INVALID = 0x0018,
76 SEV_RET_INVALID_PAGE_SIZE = 0x0019,76 SEV_RET_INVALID_PAGE_SIZE = 0x0019,
77 SEV_RET_INVALID_PAGE_STATE = 0x001A,77 SEV_RET_INVALID_PAGE_STATE = 0x001A,
78 SEV_RET_INVALID_MDATA_ENTRY = 0x001B,78 SEV_RET_INVALID_MDATA_ENTRY = 0x001B,
...@@ -87,6 +87,22 @@ typedef enum {...@@ -87,6 +87,22 @@ typedef enum {
87 SEV_RET_RESTORE_REQUIRED = 0x0025,87 SEV_RET_RESTORE_REQUIRED = 0x0025,
88 SEV_RET_RMP_INITIALIZATION_FAILED = 0x0026,88 SEV_RET_RMP_INITIALIZATION_FAILED = 0x0026,
89 SEV_RET_INVALID_KEY = 0x0027,89 SEV_RET_INVALID_KEY = 0x0027,
90 SEV_RET_SHUTDOWN_INCOMPLETE = 0x0028,
91 SEV_RET_INCORRECT_BUFFER_LENGTH = 0x0030,
92 SEV_RET_EXPAND_BUFFER_LENGTH_REQUEST = 0x0031,
93 SEV_RET_SPDM_REQUEST = 0x0032,
94 SEV_RET_SPDM_ERROR = 0x0033,
95 SEV_RET_SEV_STATUS_ERR_IN_DEV_CONN = 0x0035,
96 SEV_RET_SEV_STATUS_INVALID_DEV_CTX = 0x0036,
97 SEV_RET_SEV_STATUS_INVALID_TDI_CTX = 0x0037,
98 SEV_RET_SEV_STATUS_INVALID_TDI = 0x0038,
99 SEV_RET_SEV_STATUS_RECLAIM_REQUIRED = 0x0039,
100 SEV_RET_IN_USE = 0x003A,
101 SEV_RET_SEV_STATUS_INVALID_DEV_STATE = 0x003B,
102 SEV_RET_SEV_STATUS_INVALID_TDI_STATE = 0x003C,
103 SEV_RET_SEV_STATUS_DEV_CERT_CHANGED = 0x003D,
104 SEV_RET_SEV_STATUS_RESYNC_REQ = 0x003E,
105 SEV_RET_SEV_STATUS_RESPONSE_TOO_LARGE = 0x003F,
90 SEV_RET_MAX,106 SEV_RET_MAX,
91} sev_ret_code;107} sev_ret_code;
92108
...@@ -185,6 +201,10 @@ struct sev_user_data_get_id2 {...@@ -185,6 +201,10 @@ struct sev_user_data_get_id2 {
185 * @mask_chip_id: whether chip id is present in attestation reports or not201 * @mask_chip_id: whether chip id is present in attestation reports or not
186 * @mask_chip_key: whether attestation reports are signed or not202 * @mask_chip_key: whether attestation reports are signed or not
187 * @vlek_en: VLEK (Version Loaded Endorsement Key) hashstick is loaded203 * @vlek_en: VLEK (Version Loaded Endorsement Key) hashstick is loaded
204 * @feature_info: whether SNP_FEATURE_INFO command is available
205 * @rapl_dis: whether RAPL is disabled
206 * @ciphertext_hiding_cap: whether platform has ciphertext hiding capability
207 * @ciphertext_hiding_en: whether ciphertext hiding is enabled
188 * @rsvd1: reserved208 * @rsvd1: reserved
189 * @guest_count: the number of guest currently managed by the firmware209 * @guest_count: the number of guest currently managed by the firmware
190 * @current_tcb_version: current TCB version210 * @current_tcb_version: current TCB version
...@@ -200,7 +220,11 @@ struct sev_user_data_snp_status {...@@ -200,7 +220,11 @@ struct sev_user_data_snp_status {
200 __u32 mask_chip_id:1; /* Out */220 __u32 mask_chip_id:1; /* Out */
201 __u32 mask_chip_key:1; /* Out */221 __u32 mask_chip_key:1; /* Out */
202 __u32 vlek_en:1; /* Out */222 __u32 vlek_en:1; /* Out */
203 __u32 rsvd1:29;223 __u32 feature_info:1; /* Out */
224 __u32 rapl_dis:1; /* Out */
225 __u32 ciphertext_hiding_cap:1; /* Out */
226 __u32 ciphertext_hiding_en:1; /* Out */
227 __u32 rsvd1:25;
204 __u32 guest_count; /* Out */228 __u32 guest_count; /* Out */
205 __u64 current_tcb_version; /* Out */229 __u64 current_tcb_version; /* Out */
206 __u64 reported_tcb_version; /* Out */230 __u64 reported_tcb_version; /* Out */
lib/libc/include/any-linux-any/linux/psp-sfs.h created+87
...@@ -0,0 +1,87 @@
1/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2/*
3 * Userspace interface for AMD Seamless Firmware Servicing (SFS)
4 *
5 * Copyright (C) 2025 Advanced Micro Devices, Inc.
6 *
7 * Author: Ashish Kalra <ashish.kalra@amd.com>
8 */
9
10#ifndef __PSP_SFS_USER_H__
11#define __PSP_SFS_USER_H__
12
13#include <linux/types.h>
14
15/**
16 * SFS: AMD Seamless Firmware Support (SFS) interface
17 */
18
19#define PAYLOAD_NAME_SIZE 64
20#define TEE_EXT_CMD_BUFFER_SIZE 4096
21
22/**
23 * struct sfs_user_get_fw_versions - get current level of base firmware (output).
24 * @blob: current level of base firmware for ASP and patch levels (input/output).
25 * @sfs_status: 32-bit SFS status value (output).
26 * @sfs_extended_status: 32-bit SFS extended status value (output).
27 */
28struct sfs_user_get_fw_versions {
29 __u8 blob[TEE_EXT_CMD_BUFFER_SIZE];
30 __u32 sfs_status;
31 __u32 sfs_extended_status;
32} __attribute__((packed));
33
34/**
35 * struct sfs_user_update_package - update SFS package (input).
36 * @payload_name: name of SFS package to load, verify and execute (input).
37 * @sfs_status: 32-bit SFS status value (output).
38 * @sfs_extended_status: 32-bit SFS extended status value (output).
39 */
40struct sfs_user_update_package {
41 char payload_name[PAYLOAD_NAME_SIZE];
42 __u32 sfs_status;
43 __u32 sfs_extended_status;
44} __attribute__((packed));
45
46/**
47 * Seamless Firmware Support (SFS) IOC
48 *
49 * possible return codes for all SFS IOCTLs:
50 * 0: success
51 * -EINVAL: invalid input
52 * -E2BIG: excess data passed
53 * -EFAULT: failed to copy to/from userspace
54 * -EBUSY: mailbox in recovery or in use
55 * -ENODEV: driver not bound with PSP device
56 * -EACCES: request isn't authorized
57 * -EINVAL: invalid parameter
58 * -ETIMEDOUT: request timed out
59 * -EAGAIN: invalid request for state machine
60 * -ENOENT: not implemented
61 * -ENFILE: overflow
62 * -EPERM: invalid signature
63 * -EIO: PSP I/O error
64 */
65#define SFS_IOC_TYPE 'S'
66
67/**
68 * SFSIOCFWVERS - returns blob containing FW versions
69 * ASP provides the current level of Base Firmware for the ASP
70 * and the other microprocessors as well as current patch
71 * level(s).
72 */
73#define SFSIOCFWVERS _IOWR(SFS_IOC_TYPE, 0x1, struct sfs_user_get_fw_versions)
74
75/**
76 * SFSIOCUPDATEPKG - updates package/payload
77 * ASP loads, verifies and executes the SFS package.
78 * By default, the SFS package/payload is loaded from
79 * /lib/firmware/amd, but alternative firmware loading
80 * path can be specified using kernel parameter
81 * firmware_class.path or the firmware loading path
82 * can be customized using sysfs file:
83 * /sys/module/firmware_class/parameters/path.
84 */
85#define SFSIOCUPDATEPKG _IOWR(SFS_IOC_TYPE, 0x2, struct sfs_user_update_package)
86
87#endif /* __PSP_SFS_USER_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/psp.h created+85
...@@ -0,0 +1,85 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/psp.yaml */
4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
6
7#ifndef _LINUX_PSP_H
8#define _LINUX_PSP_H
9
10#define PSP_FAMILY_NAME "psp"
11#define PSP_FAMILY_VERSION 1
12
13enum psp_version {
14 PSP_VERSION_HDR0_AES_GCM_128,
15 PSP_VERSION_HDR0_AES_GCM_256,
16 PSP_VERSION_HDR0_AES_GMAC_128,
17 PSP_VERSION_HDR0_AES_GMAC_256,
18};
19
20enum {
21 PSP_A_DEV_ID = 1,
22 PSP_A_DEV_IFINDEX,
23 PSP_A_DEV_PSP_VERSIONS_CAP,
24 PSP_A_DEV_PSP_VERSIONS_ENA,
25
26 __PSP_A_DEV_MAX,
27 PSP_A_DEV_MAX = (__PSP_A_DEV_MAX - 1)
28};
29
30enum {
31 PSP_A_ASSOC_DEV_ID = 1,
32 PSP_A_ASSOC_VERSION,
33 PSP_A_ASSOC_RX_KEY,
34 PSP_A_ASSOC_TX_KEY,
35 PSP_A_ASSOC_SOCK_FD,
36
37 __PSP_A_ASSOC_MAX,
38 PSP_A_ASSOC_MAX = (__PSP_A_ASSOC_MAX - 1)
39};
40
41enum {
42 PSP_A_KEYS_KEY = 1,
43 PSP_A_KEYS_SPI,
44
45 __PSP_A_KEYS_MAX,
46 PSP_A_KEYS_MAX = (__PSP_A_KEYS_MAX - 1)
47};
48
49enum {
50 PSP_A_STATS_DEV_ID = 1,
51 PSP_A_STATS_KEY_ROTATIONS,
52 PSP_A_STATS_STALE_EVENTS,
53 PSP_A_STATS_RX_PACKETS,
54 PSP_A_STATS_RX_BYTES,
55 PSP_A_STATS_RX_AUTH_FAIL,
56 PSP_A_STATS_RX_ERROR,
57 PSP_A_STATS_RX_BAD,
58 PSP_A_STATS_TX_PACKETS,
59 PSP_A_STATS_TX_BYTES,
60 PSP_A_STATS_TX_ERROR,
61
62 __PSP_A_STATS_MAX,
63 PSP_A_STATS_MAX = (__PSP_A_STATS_MAX - 1)
64};
65
66enum {
67 PSP_CMD_DEV_GET = 1,
68 PSP_CMD_DEV_ADD_NTF,
69 PSP_CMD_DEV_DEL_NTF,
70 PSP_CMD_DEV_SET,
71 PSP_CMD_DEV_CHANGE_NTF,
72 PSP_CMD_KEY_ROTATE,
73 PSP_CMD_KEY_ROTATE_NTF,
74 PSP_CMD_RX_ASSOC,
75 PSP_CMD_TX_ASSOC,
76 PSP_CMD_GET_STATS,
77
78 __PSP_CMD_MAX,
79 PSP_CMD_MAX = (__PSP_CMD_MAX - 1)
80};
81
82#define PSP_MCGRP_MGMT "mgmt"
83#define PSP_MCGRP_USE "use"
84
85#endif /* _LINUX_PSP_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/ptp_clock.h+4
...@@ -248,6 +248,10 @@ struct ptp_pin_desc {...@@ -248,6 +248,10 @@ struct ptp_pin_desc {
248 _IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended)248 _IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended)
249#define PTP_MASK_CLEAR_ALL _IO(PTP_CLK_MAGIC, 19)249#define PTP_MASK_CLEAR_ALL _IO(PTP_CLK_MAGIC, 19)
250#define PTP_MASK_EN_SINGLE _IOW(PTP_CLK_MAGIC, 20, unsigned int)250#define PTP_MASK_EN_SINGLE _IOW(PTP_CLK_MAGIC, 20, unsigned int)
251#define PTP_SYS_OFFSET_PRECISE_CYCLES \
252 _IOWR(PTP_CLK_MAGIC, 21, struct ptp_sys_offset_precise)
253#define PTP_SYS_OFFSET_EXTENDED_CYCLES \
254 _IOWR(PTP_CLK_MAGIC, 22, struct ptp_sys_offset_extended)
251255
252struct ptp_extts_event {256struct ptp_extts_event {
253 struct ptp_clock_time t; /* Time event occurred. */257 struct ptp_clock_time t; /* Time event occurred. */
lib/libc/include/any-linux-any/linux/raid/md_p.h+2-1
...@@ -291,7 +291,8 @@ struct mdp_superblock_1 {...@@ -291,7 +291,8 @@ struct mdp_superblock_1 {
291 __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */291 __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */
292 __le32 sb_csum; /* checksum up to devs[max_dev] */292 __le32 sb_csum; /* checksum up to devs[max_dev] */
293 __le32 max_dev; /* size of devs[] array to consider */293 __le32 max_dev; /* size of devs[] array to consider */
294 __u8 pad3[64-32]; /* set to 0 when writing */294 __le32 logical_block_size; /* same as q->limits->logical_block_size */
295 __u8 pad3[64-36]; /* set to 0 when writing */
295296
296 /* device state information. Indexed by dev_number.297 /* device state information. Indexed by dev_number.
297 * 2 bytes per device298 * 2 bytes per device
lib/libc/include/any-linux-any/linux/rkisp1-config.h+15-83
...@@ -9,6 +9,8 @@...@@ -9,6 +9,8 @@
99
10#include <linux/types.h>10#include <linux/types.h>
1111
12#include <linux/media/v4l2-isp.h>
13
12/* Defect Pixel Cluster Detection */14/* Defect Pixel Cluster Detection */
13#define RKISP1_CIF_ISP_MODULE_DPCC (1U << 0)15#define RKISP1_CIF_ISP_MODULE_DPCC (1U << 0)
14/* Black Level Subtraction */16/* Black Level Subtraction */
...@@ -1158,79 +1160,26 @@ enum rkisp1_ext_params_block_type {...@@ -1158,79 +1160,26 @@ enum rkisp1_ext_params_block_type {
1158 RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,1160 RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,
1159};1161};
11601162
1161#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE (1U << 0)1163/* For backward compatibility */
1162#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE (1U << 1)1164#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE V4L2_ISP_PARAMS_FL_BLOCK_DISABLE
1165#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE V4L2_ISP_PARAMS_FL_BLOCK_ENABLE
11631166
1164/* A bitmask of parameters blocks supported on the current hardware. */1167/* A bitmask of parameters blocks supported on the current hardware. */
1165#define RKISP1_CID_SUPPORTED_PARAMS_BLOCKS (V4L2_CID_USER_RKISP1_BASE + 0x01)1168#define RKISP1_CID_SUPPORTED_PARAMS_BLOCKS (V4L2_CID_USER_RKISP1_BASE + 0x01)
11661169
1167/**1170/**
1168 * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block1171 * rkisp1_ext_params_block_header - RkISP1 extensible parameters block header
1169 * header
1170 *1172 *
1171 * This structure represents the common part of all the ISP configuration1173 * This structure represents the common part of all the ISP configuration
1172 * blocks. Each parameters block shall embed an instance of this structure type1174 * blocks and is identical to :c:type:`v4l2_isp_params_block_header`.
1173 * as its first member, followed by the block-specific configuration data. The
1174 * driver inspects this common header to discern the block type and its size and
1175 * properly handle the block content by casting it to the correct block-specific
1176 * type.
1177 *1175 *
1178 * The @type field is one of the values enumerated by1176 * The type field is one of the values enumerated by
1179 * :c:type:`rkisp1_ext_params_block_type` and specifies how the data should be1177 * :c:type:`rkisp1_ext_params_block_type` and specifies how the data should be
1180 * interpreted by the driver. The @size field specifies the size of the1178 * interpreted by the driver.
1181 * parameters block and is used by the driver for validation purposes.
1182 *
1183 * The @flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*.
1184 *
1185 * When userspace wants to configure and enable an ISP block it shall fully
1186 * populate the block configuration and set the
1187 * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE bit in the @flags field.
1188 *
1189 * When userspace simply wants to disable an ISP block the
1190 * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bit should be set in @flags field. The
1191 * driver ignores the rest of the block configuration structure in this case.
1192 *
1193 * If a new configuration of an ISP block has to be applied userspace shall
1194 * fully populate the ISP block configuration and omit setting the
1195 * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits
1196 * in the @flags field.
1197 *
1198 * Setting both the RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and
1199 * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits in the @flags field is not allowed
1200 * and not accepted by the driver.
1201 *
1202 * Userspace is responsible for correctly populating the parameters block header
1203 * fields (@type, @flags and @size) and the block-specific parameters.
1204 *
1205 * For example:
1206 *1179 *
1207 * .. code-block:: c1180 * The flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*.
1208 *
1209 * void populate_bls(struct rkisp1_ext_params_block_header *block) {
1210 * struct rkisp1_ext_params_bls_config *bls =
1211 * (struct rkisp1_ext_params_bls_config *)block;
1212 *
1213 * bls->header.type = RKISP1_EXT_PARAMS_BLOCK_ID_BLS;
1214 * bls->header.flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE;
1215 * bls->header.size = sizeof(*bls);
1216 *
1217 * bls->config.enable_auto = 0;
1218 * bls->config.fixed_val.r = blackLevelRed_;
1219 * bls->config.fixed_val.gr = blackLevelGreenR_;
1220 * bls->config.fixed_val.gb = blackLevelGreenB_;
1221 * bls->config.fixed_val.b = blackLevelBlue_;
1222 * }
1223 *
1224 * @type: The parameters block type, see
1225 * :c:type:`rkisp1_ext_params_block_type`
1226 * @flags: A bitmask of block flags
1227 * @size: Size (in bytes) of the parameters block, including this header
1228 */1181 */
1229struct rkisp1_ext_params_block_header {1182#define rkisp1_ext_params_block_header v4l2_isp_params_block_header
1230 __u16 type;
1231 __u16 flags;
1232 __u32 size;
1233};
12341183
1235/**1184/**
1236 * struct rkisp1_ext_params_bls_config - RkISP1 extensible params BLS config1185 * struct rkisp1_ext_params_bls_config - RkISP1 extensible params BLS config
...@@ -1588,27 +1537,14 @@ struct rkisp1_ext_params_wdr_config {...@@ -1588,27 +1537,14 @@ struct rkisp1_ext_params_wdr_config {
1588 * @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters1537 * @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters
1589 */1538 */
1590enum rksip1_ext_param_buffer_version {1539enum rksip1_ext_param_buffer_version {
1591 RKISP1_EXT_PARAM_BUFFER_V1 = 1,1540 RKISP1_EXT_PARAM_BUFFER_V1 = V4L2_ISP_PARAMS_VERSION_V1,
1592};1541};
15931542
1594/**1543/**
1595 * struct rkisp1_ext_params_cfg - RkISP1 extensible parameters configuration1544 * struct rkisp1_ext_params_cfg - RkISP1 extensible parameters configuration
1596 *1545 *
1597 * This struct contains the configuration parameters of the RkISP1 ISP1546 * This is the driver-specific implementation of
1598 * algorithms, serialized by userspace into a data buffer. Each configuration1547 * :c:type:`v4l2_isp_params_buffer`.
1599 * parameter block is represented by a block-specific structure which contains a
1600 * :c:type:`rkisp1_ext_params_block_header` entry as first member. Userspace
1601 * populates the @data buffer with configuration parameters for the blocks that
1602 * it intends to configure. As a consequence, the data buffer effective size
1603 * changes according to the number of ISP blocks that userspace intends to
1604 * configure and is set by userspace in the @data_size field.
1605 *
1606 * The parameters buffer is versioned by the @version field to allow modifying
1607 * and extending its definition. Userspace shall populate the @version field to
1608 * inform the driver about the version it intends to use. The driver will parse
1609 * and handle the @data buffer according to the data layout specific to the
1610 * indicated version and return an error if the desired version is not
1611 * supported.
1612 *1548 *
1613 * Currently the single RKISP1_EXT_PARAM_BUFFER_V1 version is supported.1549 * Currently the single RKISP1_EXT_PARAM_BUFFER_V1 version is supported.
1614 * When a new format version will be added, a mechanism for userspace to query1550 * When a new format version will be added, a mechanism for userspace to query
...@@ -1624,11 +1560,6 @@ enum rksip1_ext_param_buffer_version {...@@ -1624,11 +1560,6 @@ enum rksip1_ext_param_buffer_version {
1624 * the maximum value represents the blocks supported by the kernel driver,1560 * the maximum value represents the blocks supported by the kernel driver,
1625 * independently of the device instance.1561 * independently of the device instance.
1626 *1562 *
1627 * For each ISP block that userspace wants to configure, a block-specific
1628 * structure is appended to the @data buffer, one after the other without gaps
1629 * in between nor overlaps. Userspace shall populate the @data_size field with
1630 * the effective size, in bytes, of the @data buffer.
1631 *
1632 * The expected memory layout of the parameters buffer is::1563 * The expected memory layout of the parameters buffer is::
1633 *1564 *
1634 * +-------------------- struct rkisp1_ext_params_cfg -------------------+1565 * +-------------------- struct rkisp1_ext_params_cfg -------------------+
...@@ -1678,4 +1609,5 @@ struct rkisp1_ext_params_cfg {...@@ -1678,4 +1609,5 @@ struct rkisp1_ext_params_cfg {
1678 __u8 data[RKISP1_EXT_PARAMS_MAX_SIZE];1609 __u8 data[RKISP1_EXT_PARAMS_MAX_SIZE];
1679};1610};
16801611
1612
1681#endif /* _RKISP1_CONFIG_H */1613#endif /* _RKISP1_CONFIG_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/rseq.h+7-14
...@@ -114,20 +114,13 @@ struct rseq {...@@ -114,20 +114,13 @@ struct rseq {
114 /*114 /*
115 * Restartable sequences flags field.115 * Restartable sequences flags field.
116 *116 *
117 * This field should only be updated by the thread which117 * This field was initially intended to allow event masking for
118 * registered this data structure. Read by the kernel.118 * single-stepping through rseq critical sections with debuggers.
119 * Mainly used for single-stepping through rseq critical sections119 * The kernel does not support this anymore and the relevant bits
120 * with debuggers.120 * are checked for being always false:
121 *121 * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT
122 * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT122 * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL
123 * Inhibit instruction sequence block restart on preemption123 * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
124 * for this thread.
125 * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL
126 * Inhibit instruction sequence block restart on signal
127 * delivery for this thread.
128 * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
129 * Inhibit instruction sequence block restart on migration for
130 * this thread.
131 */124 */
132 __u32 flags;125 __u32 flags;
133126
lib/libc/include/any-linux-any/linux/stddef.h-1
...@@ -3,7 +3,6 @@...@@ -3,7 +3,6 @@
3#define _LINUX_STDDEF_H3#define _LINUX_STDDEF_H
44
55
6
7#ifndef __always_inline6#ifndef __always_inline
8#define __always_inline __inline__7#define __always_inline __inline__
9#endif8#endif
lib/libc/include/any-linux-any/linux/tcp.h+9
...@@ -316,6 +316,15 @@ struct tcp_info {...@@ -316,6 +316,15 @@ struct tcp_info {
316 * in milliseconds, including any316 * in milliseconds, including any
317 * unfinished recovery.317 * unfinished recovery.
318 */318 */
319 __u32 tcpi_received_ce; /* # of CE marks received */
320 __u32 tcpi_delivered_e1_bytes; /* Accurate ECN byte counters */
321 __u32 tcpi_delivered_e0_bytes;
322 __u32 tcpi_delivered_ce_bytes;
323 __u32 tcpi_received_e1_bytes;
324 __u32 tcpi_received_e0_bytes;
325 __u32 tcpi_received_ce_bytes;
326 __u16 tcpi_accecn_fail_mode;
327 __u16 tcpi_accecn_opt_seen;
319};328};
320329
321/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */330/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
lib/libc/include/any-linux-any/linux/tee.h+92-16
...@@ -42,14 +42,16 @@...@@ -42,14 +42,16 @@
42#define TEE_IOC_MAGIC 0xa442#define TEE_IOC_MAGIC 0xa4
43#define TEE_IOC_BASE 043#define TEE_IOC_BASE 0
4444
45#define TEE_MAX_ARG_SIZE 102445#define TEE_MAX_ARG_SIZE 4096
4646
47#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */47#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */
48#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */48#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */
49#define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */49#define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */
50#define TEE_GEN_CAP_MEMREF_NULL (1 << 3)/* NULL MemRef support */50#define TEE_GEN_CAP_MEMREF_NULL (1 << 3)/* NULL MemRef support */
51#define TEE_GEN_CAP_OBJREF (1 << 4)/* Supports generic object reference */
5152
52#define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */53#define TEE_MEMREF_NULL ((__u64)(-1)) /* NULL MemRef Buffer */
54#define TEE_OBJREF_NULL ((__u64)(-1)) /* NULL ObjRef Object */
5355
54/*56/*
55 * TEE Implementation ID57 * TEE Implementation ID
...@@ -57,6 +59,7 @@...@@ -57,6 +59,7 @@
57#define TEE_IMPL_ID_OPTEE 159#define TEE_IMPL_ID_OPTEE 1
58#define TEE_IMPL_ID_AMDTEE 260#define TEE_IMPL_ID_AMDTEE 2
59#define TEE_IMPL_ID_TSTEE 361#define TEE_IMPL_ID_TSTEE 3
62#define TEE_IMPL_ID_QTEE 4
6063
61/*64/*
62 * OP-TEE specific capabilities65 * OP-TEE specific capabilities
...@@ -151,6 +154,20 @@ struct tee_ioctl_buf_data {...@@ -151,6 +154,20 @@ struct tee_ioctl_buf_data {
151#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT 6154#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT 6
152#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT 7 /* input and output */155#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT 7 /* input and output */
153156
157/*
158 * These defines userspace buffer parameters.
159 */
160#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT 8
161#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_OUTPUT 9
162#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INOUT 10 /* input and output */
163
164/*
165 * These defines object reference parameters.
166 */
167#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_INPUT 11
168#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_OUTPUT 12
169#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_INOUT 13
170
154/*171/*
155 * Mask for the type part of the attribute, leaves room for more types172 * Mask for the type part of the attribute, leaves room for more types
156 */173 */
...@@ -186,14 +203,18 @@ struct tee_ioctl_buf_data {...@@ -186,14 +203,18 @@ struct tee_ioctl_buf_data {
186/**203/**
187 * struct tee_ioctl_param - parameter204 * struct tee_ioctl_param - parameter
188 * @attr: attributes205 * @attr: attributes
189 * @a: if a memref, offset into the shared memory object, else a value parameter206 * @a: if a memref, offset into the shared memory object,
190 * @b: if a memref, size of the buffer, else a value parameter207 * else if a ubuf, address of the user buffer,
208 * else if an objref, object identifier, else a value parameter
209 * @b: if a memref or ubuf, size of the buffer,
210 * else if objref, flags for the object, else a value parameter
191 * @c: if a memref, shared memory identifier, else a value parameter211 * @c: if a memref, shared memory identifier, else a value parameter
192 *212 *
193 * @attr & TEE_PARAM_ATTR_TYPE_MASK indicates if memref or value is used in213 * @attr & TEE_PARAM_ATTR_TYPE_MASK indicates if memref, ubuf, or value is
194 * the union. TEE_PARAM_ATTR_TYPE_VALUE_* indicates value and214 * used in the union. TEE_PARAM_ATTR_TYPE_VALUE_* indicates value,
195 * TEE_PARAM_ATTR_TYPE_MEMREF_* indicates memref. TEE_PARAM_ATTR_TYPE_NONE215 * TEE_PARAM_ATTR_TYPE_MEMREF_* indicates memref, TEE_PARAM_ATTR_TYPE_UBUF_*
196 * indicates that none of the members are used.216 * indicates ubuf, and TEE_PARAM_ATTR_TYPE_OBJREF_* indicates objref.
217 * TEE_PARAM_ATTR_TYPE_NONE indicates that none of the members are used.
197 *218 *
198 * Shared memory is allocated with TEE_IOC_SHM_ALLOC which returns an219 * Shared memory is allocated with TEE_IOC_SHM_ALLOC which returns an
199 * identifier representing the shared memory object. A memref can reference220 * identifier representing the shared memory object. A memref can reference
...@@ -228,8 +249,9 @@ struct tee_ioctl_param {...@@ -228,8 +249,9 @@ struct tee_ioctl_param {
228 * @cancel_id: [in] Cancellation id, a unique value to identify this request249 * @cancel_id: [in] Cancellation id, a unique value to identify this request
229 * @session: [out] Session id250 * @session: [out] Session id
230 * @ret: [out] return value251 * @ret: [out] return value
231 * @ret_origin [out] origin of the return value252 * @ret_origin: [out] origin of the return value
232 * @num_params [in] number of parameters following this struct253 * @num_params: [in] number of &struct tee_ioctl_param entries in @params
254 * @params: array of ioctl parameters
233 */255 */
234struct tee_ioctl_open_session_arg {256struct tee_ioctl_open_session_arg {
235 __u8 uuid[TEE_IOCTL_UUID_LEN];257 __u8 uuid[TEE_IOCTL_UUID_LEN];
...@@ -255,14 +277,14 @@ struct tee_ioctl_open_session_arg {...@@ -255,14 +277,14 @@ struct tee_ioctl_open_session_arg {
255 struct tee_ioctl_buf_data)277 struct tee_ioctl_buf_data)
256278
257/**279/**
258 * struct tee_ioctl_invoke_func_arg - Invokes a function in a Trusted280 * struct tee_ioctl_invoke_arg - Invokes a function in a Trusted Application
259 * Application
260 * @func: [in] Trusted Application function, specific to the TA281 * @func: [in] Trusted Application function, specific to the TA
261 * @session: [in] Session id282 * @session: [in] Session id
262 * @cancel_id: [in] Cancellation id, a unique value to identify this request283 * @cancel_id: [in] Cancellation id, a unique value to identify this request
263 * @ret: [out] return value284 * @ret: [out] return value
264 * @ret_origin [out] origin of the return value285 * @ret_origin: [out] origin of the return value
265 * @num_params [in] number of parameters following this struct286 * @num_params: [in] number of parameters following this struct
287 * @params: array of ioctl parameters
266 */288 */
267struct tee_ioctl_invoke_arg {289struct tee_ioctl_invoke_arg {
268 __u32 func;290 __u32 func;
...@@ -317,7 +339,8 @@ struct tee_ioctl_close_session_arg {...@@ -317,7 +339,8 @@ struct tee_ioctl_close_session_arg {
317/**339/**
318 * struct tee_iocl_supp_recv_arg - Receive a request for a supplicant function340 * struct tee_iocl_supp_recv_arg - Receive a request for a supplicant function
319 * @func: [in] supplicant function341 * @func: [in] supplicant function
320 * @num_params [in/out] number of parameters following this struct342 * @num_params: [in/out] number of &struct tee_ioctl_param entries in @params
343 * @params: array of ioctl parameters
321 *344 *
322 * @num_params is the number of params that tee-supplicant has room to345 * @num_params is the number of params that tee-supplicant has room to
323 * receive when input, @num_params is the number of actual params346 * receive when input, @num_params is the number of actual params
...@@ -342,7 +365,8 @@ struct tee_iocl_supp_recv_arg {...@@ -342,7 +365,8 @@ struct tee_iocl_supp_recv_arg {
342/**365/**
343 * struct tee_iocl_supp_send_arg - Send a response to a received request366 * struct tee_iocl_supp_send_arg - Send a response to a received request
344 * @ret: [out] return value367 * @ret: [out] return value
345 * @num_params [in] number of parameters following this struct368 * @num_params: [in] number of &struct tee_ioctl_param entries in @params
369 * @params: array of ioctl parameters
346 */370 */
347struct tee_iocl_supp_send_arg {371struct tee_iocl_supp_send_arg {
348 __u32 ret;372 __u32 ret;
...@@ -378,6 +402,37 @@ struct tee_ioctl_shm_register_data {...@@ -378,6 +402,37 @@ struct tee_ioctl_shm_register_data {
378 __s32 id;402 __s32 id;
379};403};
380404
405/**
406 * struct tee_ioctl_shm_register_fd_data - Shared memory registering argument
407 * @fd: [in] File descriptor identifying dmabuf reference
408 * @size: [out] Size of referenced memory
409 * @flags: [in] Flags to/from allocation.
410 * @id: [out] Identifier of the shared memory
411 *
412 * The flags field should currently be zero as input. Updated by the call
413 * with actual flags as defined by TEE_IOCTL_SHM_* above.
414 * This structure is used as argument for TEE_IOC_SHM_REGISTER_FD below.
415 */
416struct tee_ioctl_shm_register_fd_data {
417 __s64 fd;
418 __u64 size;
419 __u32 flags;
420 __s32 id;
421};
422
423/**
424 * TEE_IOC_SHM_REGISTER_FD - register a shared memory from a file descriptor
425 *
426 * Returns a file descriptor on success or < 0 on failure
427 *
428 * The returned file descriptor refers to the shared memory object in the
429 * kernel. The supplied file deccriptor can be closed if it's not needed
430 * for other purposes. The shared memory is freed when the descriptor is
431 * closed.
432 */
433#define TEE_IOC_SHM_REGISTER_FD _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 8, \
434 struct tee_ioctl_shm_register_fd_data)
435
381/**436/**
382 * TEE_IOC_SHM_REGISTER - Register shared memory argument437 * TEE_IOC_SHM_REGISTER - Register shared memory argument
383 *438 *
...@@ -401,4 +456,25 @@ struct tee_ioctl_shm_register_data {...@@ -401,4 +456,25 @@ struct tee_ioctl_shm_register_data {
401 * munmap(): unmaps previously shared memory456 * munmap(): unmaps previously shared memory
402 */457 */
403458
459/**
460 * struct tee_ioctl_object_invoke_arg - Invokes an object in a
461 * Trusted Application
462 * @id: [in] Object id
463 * @op: [in] Object operation, specific to the object
464 * @ret: [out] return value
465 * @num_params: [in] number of parameters following this struct
466 * @params: array of ioctl parameters
467 */
468struct tee_ioctl_object_invoke_arg {
469 __u64 id;
470 __u32 op;
471 __u32 ret;
472 __u32 num_params;
473 /* num_params tells the actual number of element in params */
474 struct tee_ioctl_param params[];
475};
476
477#define TEE_IOC_OBJECT_INVOKE _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 10, \
478 struct tee_ioctl_buf_data)
479
404#endif /*__TEE_H*/480#endif /*__TEE_H*/
\ No newline at end of file
lib/libc/include/any-linux-any/linux/tls.h+2
...@@ -41,6 +41,7 @@...@@ -41,6 +41,7 @@
41#define TLS_RX 2 /* Set receive parameters */41#define TLS_RX 2 /* Set receive parameters */
42#define TLS_TX_ZEROCOPY_RO 3 /* TX zerocopy (only sendfile now) */42#define TLS_TX_ZEROCOPY_RO 3 /* TX zerocopy (only sendfile now) */
43#define TLS_RX_EXPECT_NO_PAD 4 /* Attempt opportunistic zero-copy */43#define TLS_RX_EXPECT_NO_PAD 4 /* Attempt opportunistic zero-copy */
44#define TLS_TX_MAX_PAYLOAD_LEN 5 /* Maximum plaintext size */
4445
45/* Supported versions */46/* Supported versions */
46#define TLS_VERSION_MINOR(ver) ((ver) & 0xFF)47#define TLS_VERSION_MINOR(ver) ((ver) & 0xFF)
...@@ -194,6 +195,7 @@ enum {...@@ -194,6 +195,7 @@ enum {
194 TLS_INFO_RXCONF,195 TLS_INFO_RXCONF,
195 TLS_INFO_ZC_RO_TX,196 TLS_INFO_ZC_RO_TX,
196 TLS_INFO_RX_NO_PAD,197 TLS_INFO_RX_NO_PAD,
198 TLS_INFO_TX_MAX_PAYLOAD_LEN,
197 __TLS_INFO_MAX,199 __TLS_INFO_MAX,
198};200};
199#define TLS_INFO_MAX (__TLS_INFO_MAX - 1)201#define TLS_INFO_MAX (__TLS_INFO_MAX - 1)
lib/libc/include/any-linux-any/linux/usb/cdc.h+8-4
...@@ -104,8 +104,10 @@ struct usb_cdc_union_desc {...@@ -104,8 +104,10 @@ struct usb_cdc_union_desc {
104 __u8 bDescriptorSubType;104 __u8 bDescriptorSubType;
105105
106 __u8 bMasterInterface0;106 __u8 bMasterInterface0;
107 __u8 bSlaveInterface0;107 union {
108 /* ... and there could be other slave interfaces */108 __u8 bSlaveInterface0;
109 __DECLARE_FLEX_ARRAY(__u8, bSlaveInterfaces);
110 };
109} __attribute__ ((packed));111} __attribute__ ((packed));
110112
111/* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */113/* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */
...@@ -115,8 +117,10 @@ struct usb_cdc_country_functional_desc {...@@ -115,8 +117,10 @@ struct usb_cdc_country_functional_desc {
115 __u8 bDescriptorSubType;117 __u8 bDescriptorSubType;
116118
117 __u8 iCountryCodeRelDate;119 __u8 iCountryCodeRelDate;
118 __le16 wCountyCode0;120 union {
119 /* ... and there can be a lot of country codes */121 __le16 wCountryCode0;
122 __DECLARE_FLEX_ARRAY(__le16, wCountryCodes);
123 };
120} __attribute__ ((packed));124} __attribute__ ((packed));
121125
122/* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */126/* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */
lib/libc/include/any-linux-any/linux/v4l2-controls.h+66-61
...@@ -226,6 +226,12 @@ enum v4l2_colorfx {...@@ -226,6 +226,12 @@ enum v4l2_colorfx {
226 */226 */
227#define V4L2_CID_USER_RKISP1_BASE (V4L2_CID_USER_BASE + 0x1220)227#define V4L2_CID_USER_RKISP1_BASE (V4L2_CID_USER_BASE + 0x1220)
228228
229/*
230 * The base for the Arm Mali-C55 ISP driver controls.
231 * We reserve 16 controls for this driver
232 */
233#define V4L2_CID_USER_MALI_C55_BASE (V4L2_CID_USER_BASE + 0x1230)
234
229/* MPEG-class control IDs */235/* MPEG-class control IDs */
230/* The MPEG controls are applicable to all codec controls236/* The MPEG controls are applicable to all codec controls
231 * and the 'MPEG' part of the define is historical */237 * and the 'MPEG' part of the define is historical */
...@@ -1189,7 +1195,7 @@ enum v4l2_flash_strobe_source {...@@ -1189,7 +1195,7 @@ enum v4l2_flash_strobe_source {
1189#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900)1195#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900)
1190#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1)1196#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1)
11911197
1192#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)1198#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)
1193enum v4l2_jpeg_chroma_subsampling {1199enum v4l2_jpeg_chroma_subsampling {
1194 V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0,1200 V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0,
1195 V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1,1201 V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1,
...@@ -1198,15 +1204,15 @@ enum v4l2_jpeg_chroma_subsampling {...@@ -1198,15 +1204,15 @@ enum v4l2_jpeg_chroma_subsampling {
1198 V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4,1204 V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4,
1199 V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5,1205 V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5,
1200};1206};
1201#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)1207#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)
1202#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)1208#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)
12031209
1204#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)1210#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)
1205#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)1211#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)
1206#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)1212#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)
1207#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)1213#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)
1208#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)1214#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
1209#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)1215#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
12101216
12111217
1212/* Image source controls */1218/* Image source controls */
...@@ -1239,10 +1245,10 @@ enum v4l2_jpeg_chroma_subsampling {...@@ -1239,10 +1245,10 @@ enum v4l2_jpeg_chroma_subsampling {
1239#define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900)1245#define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900)
1240#define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1)1246#define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1)
12411247
1242#define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1)1248#define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1)
1243#define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2)1249#define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2)
1244#define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3)1250#define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3)
1245#define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4)1251#define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4)
1246enum v4l2_dv_tx_mode {1252enum v4l2_dv_tx_mode {
1247 V4L2_DV_TX_MODE_DVI_D = 0,1253 V4L2_DV_TX_MODE_DVI_D = 0,
1248 V4L2_DV_TX_MODE_HDMI = 1,1254 V4L2_DV_TX_MODE_HDMI = 1,
...@@ -1263,7 +1269,7 @@ enum v4l2_dv_it_content_type {...@@ -1263,7 +1269,7 @@ enum v4l2_dv_it_content_type {
1263 V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4,1269 V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4,
1264};1270};
12651271
1266#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)1272#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
1267#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)1273#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
1268#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102)1274#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102)
12691275
...@@ -1533,15 +1539,6 @@ struct v4l2_ctrl_h264_pred_weights {...@@ -1533,15 +1539,6 @@ struct v4l2_ctrl_h264_pred_weights {
1533 struct v4l2_h264_weight_factors weight_factors[2];1539 struct v4l2_h264_weight_factors weight_factors[2];
1534};1540};
15351541
1536#define V4L2_H264_SLICE_TYPE_P 0
1537#define V4L2_H264_SLICE_TYPE_B 1
1538#define V4L2_H264_SLICE_TYPE_I 2
1539#define V4L2_H264_SLICE_TYPE_SP 3
1540#define V4L2_H264_SLICE_TYPE_SI 4
1541
1542#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED 0x01
1543#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH 0x02
1544
1545#define V4L2_H264_TOP_FIELD_REF 0x11542#define V4L2_H264_TOP_FIELD_REF 0x1
1546#define V4L2_H264_BOTTOM_FIELD_REF 0x21543#define V4L2_H264_BOTTOM_FIELD_REF 0x2
1547#define V4L2_H264_FRAME_REF 0x31544#define V4L2_H264_FRAME_REF 0x3
...@@ -1562,8 +1559,17 @@ struct v4l2_h264_reference {...@@ -1562,8 +1559,17 @@ struct v4l2_h264_reference {
1562 * Maximum DPB size, as specified by section 'A.3.1 Level limits1559 * Maximum DPB size, as specified by section 'A.3.1 Level limits
1563 * common to the Baseline, Main, and Extended profiles'.1560 * common to the Baseline, Main, and Extended profiles'.
1564 */1561 */
1565#define V4L2_H264_NUM_DPB_ENTRIES 161562#define V4L2_H264_NUM_DPB_ENTRIES 16
1566#define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES)1563#define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES)
1564
1565#define V4L2_H264_SLICE_TYPE_P 0
1566#define V4L2_H264_SLICE_TYPE_B 1
1567#define V4L2_H264_SLICE_TYPE_I 2
1568#define V4L2_H264_SLICE_TYPE_SP 3
1569#define V4L2_H264_SLICE_TYPE_SI 4
1570
1571#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED 0x01
1572#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH 0x02
15671573
1568#define V4L2_CID_STATELESS_H264_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 6)1574#define V4L2_CID_STATELESS_H264_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 6)
1569/**1575/**
...@@ -1703,7 +1709,6 @@ struct v4l2_ctrl_h264_decode_params {...@@ -1703,7 +1709,6 @@ struct v4l2_ctrl_h264_decode_params {
1703 __u32 flags;1709 __u32 flags;
1704};1710};
17051711
1706
1707/* Stateless FWHT control, used by the vicodec driver */1712/* Stateless FWHT control, used by the vicodec driver */
17081713
1709/* Current FWHT version */1714/* Current FWHT version */
...@@ -2545,44 +2550,10 @@ struct v4l2_ctrl_hevc_scaling_matrix {...@@ -2545,44 +2550,10 @@ struct v4l2_ctrl_hevc_scaling_matrix {
2545 __u8 scaling_list_dc_coef_32x32[2];2550 __u8 scaling_list_dc_coef_32x32[2];
2546};2551};
25472552
2548#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
2549#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
2550
2551#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
2552
2553struct v4l2_ctrl_hdr10_cll_info {
2554 __u16 max_content_light_level;
2555 __u16 max_pic_average_light_level;
2556};
2557
2558#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
2559
2560#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5
2561#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000
2562#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5
2563#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000
2564#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
2565#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000
2566#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
2567#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000
2568#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000
2569#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000
2570#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1
2571#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000
2572
2573struct v4l2_ctrl_hdr10_mastering_display {
2574 __u16 display_primaries_x[3];
2575 __u16 display_primaries_y[3];
2576 __u16 white_point_x;
2577 __u16 white_point_y;
2578 __u32 max_display_mastering_luminance;
2579 __u32 min_display_mastering_luminance;
2580};
2581
2582/* Stateless VP9 controls */2553/* Stateless VP9 controls */
25832554
2584#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x12555#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1
2585#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x22556#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2
25862557
2587/**2558/**
2588 * struct v4l2_vp9_loop_filter - VP9 loop filter parameters2559 * struct v4l2_vp9_loop_filter - VP9 loop filter parameters
...@@ -3509,4 +3480,38 @@ struct v4l2_ctrl_av1_film_grain {...@@ -3509,4 +3480,38 @@ struct v4l2_ctrl_av1_film_grain {
3509#define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE3480#define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE
3510#define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE3481#define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE
35113482
3483#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
3484#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
3485
3486#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
3487
3488struct v4l2_ctrl_hdr10_cll_info {
3489 __u16 max_content_light_level;
3490 __u16 max_pic_average_light_level;
3491};
3492
3493#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
3494
3495#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5
3496#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000
3497#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5
3498#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000
3499#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
3500#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000
3501#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
3502#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000
3503#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000
3504#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000
3505#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1
3506#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000
3507
3508struct v4l2_ctrl_hdr10_mastering_display {
3509 __u16 display_primaries_x[3];
3510 __u16 display_primaries_y[3];
3511 __u16 white_point_x;
3512 __u16 white_point_y;
3513 __u32 max_display_mastering_luminance;
3514 __u32 min_display_mastering_luminance;
3515};
3516
3512#endif3517#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/v4l2-dv-timings.h+1-1
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2/*2/*
3 * V4L2 DV timings header.3 * V4L2 DV timings header.
4 *4 *
5 * Copyright (C) 2012-2016 Hans Verkuil <hansverk@cisco.com>5 * Copyright (C) 2012-2016 Hans Verkuil <hverkuil@kernel.org>
6 */6 */
77
8#ifndef _V4L2_DV_TIMINGS_H8#ifndef _V4L2_DV_TIMINGS_H
lib/libc/include/any-linux-any/linux/version.h+2-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1#define LINUX_VERSION_CODE 3975681#define LINUX_VERSION_CODE 398080
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 6
4#define LINUX_VERSION_PATCHLEVEL 174#define LINUX_VERSION_PATCHLEVEL 19
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+28
...@@ -14,6 +14,7 @@...@@ -14,6 +14,7 @@
1414
15#include <linux/types.h>15#include <linux/types.h>
16#include <linux/ioctl.h>16#include <linux/ioctl.h>
17#include <linux/stddef.h>
1718
18#define VFIO_API_VERSION 019#define VFIO_API_VERSION 0
1920
...@@ -1478,6 +1479,33 @@ struct vfio_device_feature_bus_master {...@@ -1478,6 +1479,33 @@ struct vfio_device_feature_bus_master {
1478};1479};
1479#define VFIO_DEVICE_FEATURE_BUS_MASTER 101480#define VFIO_DEVICE_FEATURE_BUS_MASTER 10
14801481
1482/**
1483 * Upon VFIO_DEVICE_FEATURE_GET create a dma_buf fd for the
1484 * regions selected.
1485 *
1486 * open_flags are the typical flags passed to open(2), eg O_RDWR, O_CLOEXEC,
1487 * etc. offset/length specify a slice of the region to create the dmabuf from.
1488 * nr_ranges is the total number of (P2P DMA) ranges that comprise the dmabuf.
1489 *
1490 * flags should be 0.
1491 *
1492 * Return: The fd number on success, -1 and errno is set on failure.
1493 */
1494#define VFIO_DEVICE_FEATURE_DMA_BUF 11
1495
1496struct vfio_region_dma_range {
1497 __u64 offset;
1498 __u64 length;
1499};
1500
1501struct vfio_device_feature_dma_buf {
1502 __u32 region_index;
1503 __u32 open_flags;
1504 __u32 flags;
1505 __u32 nr_ranges;
1506 struct vfio_region_dma_range dma_ranges[] __counted_by(nr_ranges);
1507};
1508
1481/* -------- API for Type1 VFIO IOMMU -------- */1509/* -------- API for Type1 VFIO IOMMU -------- */
14821510
1483/**1511/**
lib/libc/include/any-linux-any/linux/videodev2.h+14-10
...@@ -51,7 +51,7 @@...@@ -51,7 +51,7 @@
51 *51 *
52 * Author: Bill Dirks <bill@thedirks.org>52 * Author: Bill Dirks <bill@thedirks.org>
53 * Justin Schoeman53 * Justin Schoeman
54 * Hans Verkuil <hverkuil@xs4all.nl>54 * Hans Verkuil <hverkuil@kernel.org>
55 * et al.55 * et al.
56 */56 */
57#ifndef __LINUX_VIDEODEV2_H57#ifndef __LINUX_VIDEODEV2_H
...@@ -857,6 +857,10 @@ struct v4l2_pix_format {...@@ -857,6 +857,10 @@ struct v4l2_pix_format {
857#define V4L2_META_FMT_RPI_FE_CFG v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */857#define V4L2_META_FMT_RPI_FE_CFG v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */
858#define V4L2_META_FMT_RPI_FE_STATS v4l2_fourcc('R', 'P', 'F', 'S') /* PiSP FE stats */858#define V4L2_META_FMT_RPI_FE_STATS v4l2_fourcc('R', 'P', 'F', 'S') /* PiSP FE stats */
859859
860/* Vendor specific - used for Arm Mali-C55 ISP */
861#define V4L2_META_FMT_MALI_C55_PARAMS v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */
862#define V4L2_META_FMT_MALI_C55_STATS v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */
863
860864
861/* priv field value to indicates that subsequent fields are valid. */865/* priv field value to indicates that subsequent fields are valid. */
862#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe866#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
...@@ -1542,8 +1546,8 @@ struct v4l2_bt_timings {...@@ -1542,8 +1546,8 @@ struct v4l2_bt_timings {
1542} __attribute__ ((packed));1546} __attribute__ ((packed));
15431547
1544/* Interlaced or progressive format */1548/* Interlaced or progressive format */
1545#define V4L2_DV_PROGRESSIVE 01549#define V4L2_DV_PROGRESSIVE 0
1546#define V4L2_DV_INTERLACED 11550#define V4L2_DV_INTERLACED 1
15471551
1548/* Polarities. If bit is not set, it is assumed to be negative polarity */1552/* Polarities. If bit is not set, it is assumed to be negative polarity */
1549#define V4L2_DV_VSYNC_POS_POL 0x000000011553#define V4L2_DV_VSYNC_POS_POL 0x00000001
...@@ -2715,15 +2719,15 @@ struct v4l2_remove_buffers {...@@ -2715,15 +2719,15 @@ struct v4l2_remove_buffers {
2715 * Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.2719 * Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
2716 * You must be root to use these ioctls. Never use these in applications!2720 * You must be root to use these ioctls. Never use these in applications!
2717 */2721 */
2718#define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register)2722#define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register)
2719#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)2723#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
27202724
2721#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)2725#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
2722#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)2726#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
2723#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)2727#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
2724#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)2728#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
2725#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)2729#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
2726#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)2730#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
2727#define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers)2731#define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers)
2728#define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer)2732#define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer)
2729#define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection)2733#define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection)
lib/libc/include/any-linux-any/linux/virtio_ids.h+1
...@@ -68,6 +68,7 @@...@@ -68,6 +68,7 @@
68#define VIRTIO_ID_AUDIO_POLICY 39 /* virtio audio policy */68#define VIRTIO_ID_AUDIO_POLICY 39 /* virtio audio policy */
69#define VIRTIO_ID_BT 40 /* virtio bluetooth */69#define VIRTIO_ID_BT 40 /* virtio bluetooth */
70#define VIRTIO_ID_GPIO 41 /* virtio gpio */70#define VIRTIO_ID_GPIO 41 /* virtio gpio */
71#define VIRTIO_ID_SPI 45 /* virtio spi */
7172
72/*73/*
73 * Virtio Transitional IDs74 * Virtio Transitional IDs
lib/libc/include/any-linux-any/linux/virtio_net.h+2-1
...@@ -193,7 +193,8 @@ struct virtio_net_hdr_v1 {...@@ -193,7 +193,8 @@ struct virtio_net_hdr_v1 {
193193
194struct virtio_net_hdr_v1_hash {194struct virtio_net_hdr_v1_hash {
195 struct virtio_net_hdr_v1 hdr;195 struct virtio_net_hdr_v1 hdr;
196 __le32 hash_value;196 __le16 hash_value_lo;
197 __le16 hash_value_hi;
197#define VIRTIO_NET_HASH_REPORT_NONE 0198#define VIRTIO_NET_HASH_REPORT_NONE 0
198#define VIRTIO_NET_HASH_REPORT_IPv4 1199#define VIRTIO_NET_HASH_REPORT_IPv4 1
199#define VIRTIO_NET_HASH_REPORT_TCPv4 2200#define VIRTIO_NET_HASH_REPORT_TCPv4 2
lib/libc/include/any-linux-any/linux/virtio_pci.h+1-1
...@@ -40,7 +40,7 @@...@@ -40,7 +40,7 @@
40#define _LINUX_VIRTIO_PCI_H40#define _LINUX_VIRTIO_PCI_H
4141
42#include <linux/types.h>42#include <linux/types.h>
43#include <linux/kernel.h>43#include <linux/const.h>
4444
45#ifndef VIRTIO_PCI_NO_LEGACY45#ifndef VIRTIO_PCI_NO_LEGACY
4646
lib/libc/include/any-linux-any/linux/virtio_spi.h created+181
...@@ -0,0 +1,181 @@
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright (C) 2023 OpenSynergy GmbH
4 * Copyright (C) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
5 */
6#ifndef _LINUX_VIRTIO_VIRTIO_SPI_H
7#define _LINUX_VIRTIO_VIRTIO_SPI_H
8
9#include <linux/types.h>
10#include <linux/virtio_config.h>
11#include <linux/virtio_ids.h>
12#include <linux/virtio_types.h>
13
14/* Sample data on trailing clock edge */
15#define VIRTIO_SPI_CPHA _BITUL(0)
16/* Clock is high when IDLE */
17#define VIRTIO_SPI_CPOL _BITUL(1)
18/* Chip Select is active high */
19#define VIRTIO_SPI_CS_HIGH _BITUL(2)
20/* Transmit LSB first */
21#define VIRTIO_SPI_MODE_LSB_FIRST _BITUL(3)
22/* Loopback mode */
23#define VIRTIO_SPI_MODE_LOOP _BITUL(4)
24
25/**
26 * struct virtio_spi_config - All config fields are read-only for the
27 * Virtio SPI driver
28 * @cs_max_number: maximum number of chipselect the host SPI controller
29 * supports.
30 * @cs_change_supported: indicates if the host SPI controller supports to toggle
31 * chipselect after each transfer in one message:
32 * 0: unsupported, chipselect will be kept in active state throughout the
33 * message transaction;
34 * 1: supported.
35 * Note: Message here contains a sequence of SPI transfers.
36 * @tx_nbits_supported: indicates the supported number of bit for writing:
37 * bit 0: DUAL (2-bit transfer), 1 for supported
38 * bit 1: QUAD (4-bit transfer), 1 for supported
39 * bit 2: OCTAL (8-bit transfer), 1 for supported
40 * other bits are reserved as 0, 1-bit transfer is always supported.
41 * @rx_nbits_supported: indicates the supported number of bit for reading:
42 * bit 0: DUAL (2-bit transfer), 1 for supported
43 * bit 1: QUAD (4-bit transfer), 1 for supported
44 * bit 2: OCTAL (8-bit transfer), 1 for supported
45 * other bits are reserved as 0, 1-bit transfer is always supported.
46 * @bits_per_word_mask: mask indicating which values of bits_per_word are
47 * supported. If not set, no limitation for bits_per_word.
48 * @mode_func_supported: indicates the following features are supported or not:
49 * bit 0-1: CPHA feature
50 * 0b00: invalid, should support as least one CPHA setting
51 * 0b01: supports CPHA=0 only
52 * 0b10: supports CPHA=1 only
53 * 0b11: supports CPHA=0 and CPHA=1.
54 * bit 2-3: CPOL feature
55 * 0b00: invalid, should support as least one CPOL setting
56 * 0b01: supports CPOL=0 only
57 * 0b10: supports CPOL=1 only
58 * 0b11: supports CPOL=0 and CPOL=1.
59 * bit 4: chipselect active high feature, 0 for unsupported and 1 for
60 * supported, chipselect active low is supported by default.
61 * bit 5: LSB first feature, 0 for unsupported and 1 for supported,
62 * MSB first is supported by default.
63 * bit 6: loopback mode feature, 0 for unsupported and 1 for supported,
64 * normal mode is supported by default.
65 * @max_freq_hz: the maximum clock rate supported in Hz unit, 0 means no
66 * limitation for transfer speed.
67 * @max_word_delay_ns: the maximum word delay supported, in nanoseconds.
68 * A value of 0 indicates that word delay is unsupported.
69 * Each transfer may consist of a sequence of words.
70 * @max_cs_setup_ns: the maximum delay supported after chipselect is asserted,
71 * in ns unit, 0 means delay is not supported to introduce after chipselect is
72 * asserted.
73 * @max_cs_hold_ns: the maximum delay supported before chipselect is deasserted,
74 * in ns unit, 0 means delay is not supported to introduce before chipselect
75 * is deasserted.
76 * @max_cs_incative_ns: maximum delay supported after chipselect is deasserted,
77 * in ns unit, 0 means delay is not supported to introduce after chipselect is
78 * deasserted.
79 */
80struct virtio_spi_config {
81 __u8 cs_max_number;
82 __u8 cs_change_supported;
83#define VIRTIO_SPI_RX_TX_SUPPORT_DUAL _BITUL(0)
84#define VIRTIO_SPI_RX_TX_SUPPORT_QUAD _BITUL(1)
85#define VIRTIO_SPI_RX_TX_SUPPORT_OCTAL _BITUL(2)
86 __u8 tx_nbits_supported;
87 __u8 rx_nbits_supported;
88 __le32 bits_per_word_mask;
89#define VIRTIO_SPI_MF_SUPPORT_CPHA_0 _BITUL(0)
90#define VIRTIO_SPI_MF_SUPPORT_CPHA_1 _BITUL(1)
91#define VIRTIO_SPI_MF_SUPPORT_CPOL_0 _BITUL(2)
92#define VIRTIO_SPI_MF_SUPPORT_CPOL_1 _BITUL(3)
93#define VIRTIO_SPI_MF_SUPPORT_CS_HIGH _BITUL(4)
94#define VIRTIO_SPI_MF_SUPPORT_LSB_FIRST _BITUL(5)
95#define VIRTIO_SPI_MF_SUPPORT_LOOPBACK _BITUL(6)
96 __le32 mode_func_supported;
97 __le32 max_freq_hz;
98 __le32 max_word_delay_ns;
99 __le32 max_cs_setup_ns;
100 __le32 max_cs_hold_ns;
101 __le32 max_cs_inactive_ns;
102};
103
104/**
105 * struct spi_transfer_head - virtio SPI transfer descriptor
106 * @chip_select_id: chipselect index the SPI transfer used.
107 * @bits_per_word: the number of bits in each SPI transfer word.
108 * @cs_change: whether to deselect device after finishing this transfer
109 * before starting the next transfer, 0 means cs keep asserted and
110 * 1 means cs deasserted then asserted again.
111 * @tx_nbits: bus width for write transfer.
112 * 0,1: bus width is 1, also known as SINGLE
113 * 2 : bus width is 2, also known as DUAL
114 * 4 : bus width is 4, also known as QUAD
115 * 8 : bus width is 8, also known as OCTAL
116 * other values are invalid.
117 * @rx_nbits: bus width for read transfer.
118 * 0,1: bus width is 1, also known as SINGLE
119 * 2 : bus width is 2, also known as DUAL
120 * 4 : bus width is 4, also known as QUAD
121 * 8 : bus width is 8, also known as OCTAL
122 * other values are invalid.
123 * @reserved: for future use.
124 * @mode: SPI transfer mode.
125 * bit 0: CPHA, determines the timing (i.e. phase) of the data
126 * bits relative to the clock pulses.For CPHA=0, the
127 * "out" side changes the data on the trailing edge of the
128 * preceding clock cycle, while the "in" side captures the data
129 * on (or shortly after) the leading edge of the clock cycle.
130 * For CPHA=1, the "out" side changes the data on the leading
131 * edge of the current clock cycle, while the "in" side
132 * captures the data on (or shortly after) the trailing edge of
133 * the clock cycle.
134 * bit 1: CPOL, determines the polarity of the clock. CPOL=0 is a
135 * clock which idles at 0, and each cycle consists of a pulse
136 * of 1. CPOL=1 is a clock which idles at 1, and each cycle
137 * consists of a pulse of 0.
138 * bit 2: CS_HIGH, if 1, chip select active high, else active low.
139 * bit 3: LSB_FIRST, determines per-word bits-on-wire, if 0, MSB
140 * first, else LSB first.
141 * bit 4: LOOP, loopback mode.
142 * @freq: the transfer speed in Hz.
143 * @word_delay_ns: delay to be inserted between consecutive words of a
144 * transfer, in ns unit.
145 * @cs_setup_ns: delay to be introduced after CS is asserted, in ns
146 * unit.
147 * @cs_delay_hold_ns: delay to be introduced before CS is deasserted
148 * for each transfer, in ns unit.
149 * @cs_change_delay_inactive_ns: delay to be introduced after CS is
150 * deasserted and before next asserted, in ns unit.
151 */
152struct spi_transfer_head {
153 __u8 chip_select_id;
154 __u8 bits_per_word;
155 __u8 cs_change;
156 __u8 tx_nbits;
157 __u8 rx_nbits;
158 __u8 reserved[3];
159 __le32 mode;
160 __le32 freq;
161 __le32 word_delay_ns;
162 __le32 cs_setup_ns;
163 __le32 cs_delay_hold_ns;
164 __le32 cs_change_delay_inactive_ns;
165};
166
167/**
168 * struct spi_transfer_result - virtio SPI transfer result
169 * @result: Transfer result code.
170 * VIRTIO_SPI_TRANS_OK: Transfer successful.
171 * VIRTIO_SPI_PARAM_ERR: Parameter error.
172 * VIRTIO_SPI_TRANS_ERR: Transfer error.
173 */
174struct spi_transfer_result {
175#define VIRTIO_SPI_TRANS_OK 0
176#define VIRTIO_SPI_PARAM_ERR 1
177#define VIRTIO_SPI_TRANS_ERR 2
178 __u8 result;
179};
180
181#endif /* #ifndef _LINUX_VIRTIO_VIRTIO_SPI_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/vmcore.h+9
...@@ -15,4 +15,13 @@ struct vmcoredd_header {...@@ -15,4 +15,13 @@ struct vmcoredd_header {
15 __u8 dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Device dump's name */15 __u8 dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Device dump's name */
16};16};
1717
18enum hwerr_error_type {
19 HWERR_RECOV_CPU,
20 HWERR_RECOV_MEMORY,
21 HWERR_RECOV_PCI,
22 HWERR_RECOV_CXL,
23 HWERR_RECOV_OTHERS,
24 HWERR_RECOV_MAX,
25};
26
18#endif /* _VMCORE_H */27#endif /* _VMCORE_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/wireguard.h+33-158
...@@ -1,156 +1,31 @@...@@ -1,156 +1,31 @@
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 BSD-3-Clause) */
2/*2/* Do not edit directly, auto-generated from: */
3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.3/* Documentation/netlink/specs/wireguard.yaml */
4 *4/* YNL-GEN uapi header */
5 * Documentation5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
6 * =============
7 *
8 * The below enums and macros are for interfacing with WireGuard, using generic
9 * netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two
10 * methods: get and set. Note that while they share many common attributes,
11 * these two functions actually accept a slightly different set of inputs and
12 * outputs.
13 *
14 * WG_CMD_GET_DEVICE
15 * -----------------
16 *
17 * May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain
18 * one but not both of:
19 *
20 * WGDEVICE_A_IFINDEX: NLA_U32
21 * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
22 *
23 * The kernel will then return several messages (NLM_F_MULTI) containing the
24 * following tree of nested items:
25 *
26 * WGDEVICE_A_IFINDEX: NLA_U32
27 * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
28 * WGDEVICE_A_PRIVATE_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
29 * WGDEVICE_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
30 * WGDEVICE_A_LISTEN_PORT: NLA_U16
31 * WGDEVICE_A_FWMARK: NLA_U32
32 * WGDEVICE_A_PEERS: NLA_NESTED
33 * 0: NLA_NESTED
34 * WGPEER_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
35 * WGPEER_A_PRESHARED_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
36 * WGPEER_A_ENDPOINT: NLA_MIN_LEN(struct sockaddr), struct sockaddr_in or struct sockaddr_in6
37 * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16
38 * WGPEER_A_LAST_HANDSHAKE_TIME: NLA_EXACT_LEN, struct __kernel_timespec
39 * WGPEER_A_RX_BYTES: NLA_U64
40 * WGPEER_A_TX_BYTES: NLA_U64
41 * WGPEER_A_ALLOWEDIPS: NLA_NESTED
42 * 0: NLA_NESTED
43 * WGALLOWEDIP_A_FAMILY: NLA_U16
44 * WGALLOWEDIP_A_IPADDR: NLA_MIN_LEN(struct in_addr), struct in_addr or struct in6_addr
45 * WGALLOWEDIP_A_CIDR_MASK: NLA_U8
46 * 0: NLA_NESTED
47 * ...
48 * 0: NLA_NESTED
49 * ...
50 * ...
51 * WGPEER_A_PROTOCOL_VERSION: NLA_U32
52 * 0: NLA_NESTED
53 * ...
54 * ...
55 *
56 * It is possible that all of the allowed IPs of a single peer will not
57 * fit within a single netlink message. In that case, the same peer will
58 * be written in the following message, except it will only contain
59 * WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several
60 * times in a row for the same peer. It is then up to the receiver to
61 * coalesce adjacent peers. Likewise, it is possible that all peers will
62 * not fit within a single message. So, subsequent peers will be sent
63 * in following messages, except those will only contain WGDEVICE_A_IFNAME
64 * and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these
65 * messages to form the complete list of peers.
66 *
67 * Since this is an NLA_F_DUMP command, the final message will always be
68 * NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message
69 * contains an integer error code. It is either zero or a negative error
70 * code corresponding to the errno.
71 *
72 * WG_CMD_SET_DEVICE
73 * -----------------
74 *
75 * May only be called via NLM_F_REQUEST. The command should contain the
76 * following tree of nested items, containing one but not both of
77 * WGDEVICE_A_IFINDEX and WGDEVICE_A_IFNAME:
78 *
79 * WGDEVICE_A_IFINDEX: NLA_U32
80 * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
81 * WGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current
82 * peers should be removed prior to adding the list below.
83 * WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove
84 * WGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly
85 * WGDEVICE_A_FWMARK: NLA_U32, 0 to disable
86 * WGDEVICE_A_PEERS: NLA_NESTED
87 * 0: NLA_NESTED
88 * WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN
89 * WGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the
90 * specified peer should not exist at the end of the
91 * operation, rather than added/updated and/or
92 * WGPEER_F_REPLACE_ALLOWEDIPS if all current allowed
93 * IPs of this peer should be removed prior to adding
94 * the list below and/or WGPEER_F_UPDATE_ONLY if the
95 * peer should only be set if it already exists.
96 * WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove
97 * WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6
98 * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable
99 * WGPEER_A_ALLOWEDIPS: NLA_NESTED
100 * 0: NLA_NESTED
101 * WGALLOWEDIP_A_FAMILY: NLA_U16
102 * WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr
103 * WGALLOWEDIP_A_CIDR_MASK: NLA_U8
104 * WGALLOWEDIP_A_FLAGS: NLA_U32, WGALLOWEDIP_F_REMOVE_ME if
105 * the specified IP should be removed;
106 * otherwise, this IP will be added if
107 * it is not already present.
108 * 0: NLA_NESTED
109 * ...
110 * 0: NLA_NESTED
111 * ...
112 * ...
113 * WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at
114 * all by most users of this API, as the
115 * most recent protocol will be used when
116 * this is unset. Otherwise, must be set
117 * to 1.
118 * 0: NLA_NESTED
119 * ...
120 * ...
121 *
122 * It is possible that the amount of configuration data exceeds that of
123 * the maximum message length accepted by the kernel. In that case, several
124 * messages should be sent one after another, with each successive one
125 * filling in information not contained in the prior. Note that if
126 * WGDEVICE_F_REPLACE_PEERS is specified in the first message, it probably
127 * should not be specified in fragments that come after, so that the list
128 * of peers is only cleared the first time but appended after. Likewise for
129 * peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the first message
130 * of a peer, it likely should not be specified in subsequent fragments.
131 *
132 * If an error occurs, NLMSG_ERROR will reply containing an errno.
133 */
1346
135#ifndef _WG_UAPI_WIREGUARD_H7#ifndef _LINUX_WIREGUARD_H
136#define _WG_UAPI_WIREGUARD_H8#define _LINUX_WIREGUARD_H
1379
138#define WG_GENL_NAME "wireguard"10#define WG_GENL_NAME "wireguard"
139#define WG_GENL_VERSION 111#define WG_GENL_VERSION 1
14012
141#define WG_KEY_LEN 3213#define WG_KEY_LEN 32
14214
143enum wg_cmd {15enum wgdevice_flag {
144 WG_CMD_GET_DEVICE,16 WGDEVICE_F_REPLACE_PEERS = 1,
145 WG_CMD_SET_DEVICE,
146 __WG_CMD_MAX
147};17};
148#define WG_CMD_MAX (__WG_CMD_MAX - 1)
14918
150enum wgdevice_flag {19enum wgpeer_flag {
151 WGDEVICE_F_REPLACE_PEERS = 1U << 0,20 WGPEER_F_REMOVE_ME = 1,
152 __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS21 WGPEER_F_REPLACE_ALLOWEDIPS = 2,
22 WGPEER_F_UPDATE_ONLY = 4,
23};
24
25enum wgallowedip_flag {
26 WGALLOWEDIP_F_REMOVE_ME = 1,
153};27};
28
154enum wgdevice_attribute {29enum wgdevice_attribute {
155 WGDEVICE_A_UNSPEC,30 WGDEVICE_A_UNSPEC,
156 WGDEVICE_A_IFINDEX,31 WGDEVICE_A_IFINDEX,
...@@ -161,17 +36,11 @@ enum wgdevice_attribute {...@@ -161,17 +36,11 @@ enum wgdevice_attribute {
161 WGDEVICE_A_LISTEN_PORT,36 WGDEVICE_A_LISTEN_PORT,
162 WGDEVICE_A_FWMARK,37 WGDEVICE_A_FWMARK,
163 WGDEVICE_A_PEERS,38 WGDEVICE_A_PEERS,
39
164 __WGDEVICE_A_LAST40 __WGDEVICE_A_LAST
165};41};
166#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)42#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)
16743
168enum wgpeer_flag {
169 WGPEER_F_REMOVE_ME = 1U << 0,
170 WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1,
171 WGPEER_F_UPDATE_ONLY = 1U << 2,
172 __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS |
173 WGPEER_F_UPDATE_ONLY
174};
175enum wgpeer_attribute {44enum wgpeer_attribute {
176 WGPEER_A_UNSPEC,45 WGPEER_A_UNSPEC,
177 WGPEER_A_PUBLIC_KEY,46 WGPEER_A_PUBLIC_KEY,
...@@ -184,22 +53,28 @@ enum wgpeer_attribute {...@@ -184,22 +53,28 @@ enum wgpeer_attribute {
184 WGPEER_A_TX_BYTES,53 WGPEER_A_TX_BYTES,
185 WGPEER_A_ALLOWEDIPS,54 WGPEER_A_ALLOWEDIPS,
186 WGPEER_A_PROTOCOL_VERSION,55 WGPEER_A_PROTOCOL_VERSION,
56
187 __WGPEER_A_LAST57 __WGPEER_A_LAST
188};58};
189#define WGPEER_A_MAX (__WGPEER_A_LAST - 1)59#define WGPEER_A_MAX (__WGPEER_A_LAST - 1)
19060
191enum wgallowedip_flag {
192 WGALLOWEDIP_F_REMOVE_ME = 1U << 0,
193 __WGALLOWEDIP_F_ALL = WGALLOWEDIP_F_REMOVE_ME
194};
195enum wgallowedip_attribute {61enum wgallowedip_attribute {
196 WGALLOWEDIP_A_UNSPEC,62 WGALLOWEDIP_A_UNSPEC,
197 WGALLOWEDIP_A_FAMILY,63 WGALLOWEDIP_A_FAMILY,
198 WGALLOWEDIP_A_IPADDR,64 WGALLOWEDIP_A_IPADDR,
199 WGALLOWEDIP_A_CIDR_MASK,65 WGALLOWEDIP_A_CIDR_MASK,
200 WGALLOWEDIP_A_FLAGS,66 WGALLOWEDIP_A_FLAGS,
67
201 __WGALLOWEDIP_A_LAST68 __WGALLOWEDIP_A_LAST
202};69};
203#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)70#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)
20471
205#endif /* _WG_UAPI_WIREGUARD_H */
\ No newline at end of file
72enum wg_cmd {
73 WG_CMD_GET_DEVICE,
74 WG_CMD_SET_DEVICE,
75
76 __WG_CMD_MAX
77};
78#define WG_CMD_MAX (__WG_CMD_MAX - 1)
79
80#endif /* _LINUX_WIREGUARD_H */
\ No newline at end of file
lib/libc/include/any-linux-any/misc/fastrpc.h+1-1
...@@ -134,7 +134,7 @@ struct fastrpc_mem_unmap {...@@ -134,7 +134,7 @@ struct fastrpc_mem_unmap {
134};134};
135135
136struct fastrpc_ioctl_capability {136struct fastrpc_ioctl_capability {
137 __u32 domain;137 __u32 unused; /* deprecated, ignored by the kernel */
138 __u32 attribute_id;138 __u32 attribute_id;
139 __u32 capability; /* dsp capability */139 __u32 capability; /* dsp capability */
140 __u32 reserved[4];140 __u32 reserved[4];
lib/libc/include/any-linux-any/misc/uacce/hisi_qm.h+1
...@@ -31,6 +31,7 @@ struct hisi_qp_info {...@@ -31,6 +31,7 @@ struct hisi_qp_info {
31#define HISI_QM_API_VER_BASE "hisi_qm_v1"31#define HISI_QM_API_VER_BASE "hisi_qm_v1"
32#define HISI_QM_API_VER2_BASE "hisi_qm_v2"32#define HISI_QM_API_VER2_BASE "hisi_qm_v2"
33#define HISI_QM_API_VER3_BASE "hisi_qm_v3"33#define HISI_QM_API_VER3_BASE "hisi_qm_v3"
34#define HISI_QM_API_VER5_BASE "hisi_qm_v5"
3435
35/* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */36/* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */
36#define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx)37#define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx)
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h+1
...@@ -255,6 +255,7 @@ enum rdma_driver_id {...@@ -255,6 +255,7 @@ enum rdma_driver_id {
255 RDMA_DRIVER_SIW,255 RDMA_DRIVER_SIW,
256 RDMA_DRIVER_ERDMA,256 RDMA_DRIVER_ERDMA,
257 RDMA_DRIVER_MANA,257 RDMA_DRIVER_MANA,
258 RDMA_DRIVER_IONIC,
258};259};
259260
260enum ib_uverbs_gid_type {261enum ib_uverbs_gid_type {
lib/libc/include/any-linux-any/rdma/ib_user_sa.h+14
...@@ -74,4 +74,18 @@ struct ib_user_path_rec {...@@ -74,4 +74,18 @@ struct ib_user_path_rec {
74 __u8 preference;74 __u8 preference;
75};75};
7676
77struct ib_user_service_rec {
78 __be64 id;
79 __u8 gid[16];
80 __be16 pkey;
81 __u8 reserved[2];
82 __be32 lease;
83 __u8 key[16];
84 __u8 name[64];
85 __u8 data_8[16];
86 __be16 data_16[8];
87 __be32 data_32[4];
88 __be64 data_64[2];
89};
90
77#endif /* IB_USER_SA_H */91#endif /* IB_USER_SA_H */
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ionic-abi.h created+115
...@@ -0,0 +1,115 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc */
3
4#ifndef IONIC_ABI_H
5#define IONIC_ABI_H
6
7#include <linux/types.h>
8
9#define IONIC_ABI_VERSION 1
10
11#define IONIC_EXPDB_64 1
12#define IONIC_EXPDB_128 2
13#define IONIC_EXPDB_256 4
14#define IONIC_EXPDB_512 8
15
16#define IONIC_EXPDB_SQ 1
17#define IONIC_EXPDB_RQ 2
18
19#define IONIC_CMB_ENABLE 1
20#define IONIC_CMB_REQUIRE 2
21#define IONIC_CMB_EXPDB 4
22#define IONIC_CMB_WC 8
23#define IONIC_CMB_UC 16
24
25struct ionic_ctx_req {
26 __u32 rsvd[2];
27};
28
29struct ionic_ctx_resp {
30 __u32 rsvd;
31 __u32 page_shift;
32
33 __aligned_u64 dbell_offset;
34
35 __u16 version;
36 __u8 qp_opcodes;
37 __u8 admin_opcodes;
38
39 __u8 sq_qtype;
40 __u8 rq_qtype;
41 __u8 cq_qtype;
42 __u8 admin_qtype;
43
44 __u8 max_stride;
45 __u8 max_spec;
46 __u8 udma_count;
47 __u8 expdb_mask;
48 __u8 expdb_qtypes;
49
50 __u8 rsvd2[3];
51};
52
53struct ionic_qdesc {
54 __aligned_u64 addr;
55 __u32 size;
56 __u16 mask;
57 __u8 depth_log2;
58 __u8 stride_log2;
59};
60
61struct ionic_ah_resp {
62 __u32 ahid;
63 __u32 pad;
64};
65
66struct ionic_cq_req {
67 struct ionic_qdesc cq[2];
68 __u8 udma_mask;
69 __u8 rsvd[7];
70};
71
72struct ionic_cq_resp {
73 __u32 cqid[2];
74 __u8 udma_mask;
75 __u8 rsvd[7];
76};
77
78struct ionic_qp_req {
79 struct ionic_qdesc sq;
80 struct ionic_qdesc rq;
81 __u8 sq_spec;
82 __u8 rq_spec;
83 __u8 sq_cmb;
84 __u8 rq_cmb;
85 __u8 udma_mask;
86 __u8 rsvd[3];
87};
88
89struct ionic_qp_resp {
90 __u32 qpid;
91 __u8 sq_cmb;
92 __u8 rq_cmb;
93 __u8 udma_idx;
94 __u8 rsvd[1];
95 __aligned_u64 sq_cmb_offset;
96 __aligned_u64 rq_cmb_offset;
97};
98
99struct ionic_srq_req {
100 struct ionic_qdesc rq;
101 __u8 rq_spec;
102 __u8 rq_cmb;
103 __u8 udma_mask;
104 __u8 rsvd[5];
105};
106
107struct ionic_srq_resp {
108 __u32 qpid;
109 __u8 rq_cmb;
110 __u8 udma_idx;
111 __u8 rsvd[2];
112 __aligned_u64 rq_cmb_offset;
113};
114
115#endif /* IONIC_ABI_H */
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/irdma-abi.h+15-1
...@@ -20,11 +20,14 @@ enum irdma_memreg_type {...@@ -20,11 +20,14 @@ enum irdma_memreg_type {
20 IRDMA_MEMREG_TYPE_MEM = 0,20 IRDMA_MEMREG_TYPE_MEM = 0,
21 IRDMA_MEMREG_TYPE_QP = 1,21 IRDMA_MEMREG_TYPE_QP = 1,
22 IRDMA_MEMREG_TYPE_CQ = 2,22 IRDMA_MEMREG_TYPE_CQ = 2,
23 IRDMA_MEMREG_TYPE_SRQ = 3,
23};24};
2425
25enum {26enum {
26 IRDMA_ALLOC_UCTX_USE_RAW_ATTR = 1 << 0,27 IRDMA_ALLOC_UCTX_USE_RAW_ATTR = 1 << 0,
27 IRDMA_ALLOC_UCTX_MIN_HW_WQ_SIZE = 1 << 1,28 IRDMA_ALLOC_UCTX_MIN_HW_WQ_SIZE = 1 << 1,
29 IRDMA_ALLOC_UCTX_MAX_HW_SRQ_QUANTA = 1 << 2,
30 IRDMA_SUPPORT_WQE_FORMAT_V2 = 1 << 3,
28};31};
2932
30struct irdma_alloc_ucontext_req {33struct irdma_alloc_ucontext_req {
...@@ -54,7 +57,8 @@ struct irdma_alloc_ucontext_resp {...@@ -54,7 +57,8 @@ struct irdma_alloc_ucontext_resp {
54 __u8 rsvd2;57 __u8 rsvd2;
55 __aligned_u64 comp_mask;58 __aligned_u64 comp_mask;
56 __u16 min_hw_wq_size;59 __u16 min_hw_wq_size;
57 __u8 rsvd3[6];60 __u8 revd3[2];
61 __u32 max_hw_srq_quanta;
58};62};
5963
60struct irdma_alloc_pd_resp {64struct irdma_alloc_pd_resp {
...@@ -71,6 +75,16 @@ struct irdma_create_cq_req {...@@ -71,6 +75,16 @@ struct irdma_create_cq_req {
71 __aligned_u64 user_shadow_area;75 __aligned_u64 user_shadow_area;
72};76};
7377
78struct irdma_create_srq_req {
79 __aligned_u64 user_srq_buf;
80 __aligned_u64 user_shadow_area;
81};
82
83struct irdma_create_srq_resp {
84 __u32 srq_id;
85 __u32 srq_size;
86};
87
74struct irdma_create_qp_req {88struct irdma_create_qp_req {
75 __aligned_u64 user_wqe_bufs;89 __aligned_u64 user_wqe_bufs;
76 __aligned_u64 user_compl_ctx;90 __aligned_u64 user_compl_ctx;
lib/libc/include/any-linux-any/rdma/rdma_user_cm.h+42-2
...@@ -67,7 +67,9 @@ enum {...@@ -67,7 +67,9 @@ enum {
67 RDMA_USER_CM_CMD_QUERY,67 RDMA_USER_CM_CMD_QUERY,
68 RDMA_USER_CM_CMD_BIND,68 RDMA_USER_CM_CMD_BIND,
69 RDMA_USER_CM_CMD_RESOLVE_ADDR,69 RDMA_USER_CM_CMD_RESOLVE_ADDR,
70 RDMA_USER_CM_CMD_JOIN_MCAST70 RDMA_USER_CM_CMD_JOIN_MCAST,
71 RDMA_USER_CM_CMD_RESOLVE_IB_SERVICE,
72 RDMA_USER_CM_CMD_WRITE_CM_EVENT,
71};73};
7274
73/* See IBTA Annex A11, servies ID bytes 4 & 5 */75/* See IBTA Annex A11, servies ID bytes 4 & 5 */
...@@ -147,7 +149,8 @@ struct rdma_ucm_resolve_route {...@@ -147,7 +149,8 @@ struct rdma_ucm_resolve_route {
147enum {149enum {
148 RDMA_USER_CM_QUERY_ADDR,150 RDMA_USER_CM_QUERY_ADDR,
149 RDMA_USER_CM_QUERY_PATH,151 RDMA_USER_CM_QUERY_PATH,
150 RDMA_USER_CM_QUERY_GID152 RDMA_USER_CM_QUERY_GID,
153 RDMA_USER_CM_QUERY_IB_SERVICE
151};154};
152155
153struct rdma_ucm_query {156struct rdma_ucm_query {
...@@ -187,6 +190,12 @@ struct rdma_ucm_query_path_resp {...@@ -187,6 +190,12 @@ struct rdma_ucm_query_path_resp {
187 struct ib_path_rec_data path_data[];190 struct ib_path_rec_data path_data[];
188};191};
189192
193struct rdma_ucm_query_ib_service_resp {
194 __u32 num_service_recs;
195 __u32 reserved;
196 struct ib_user_service_rec recs[];
197};
198
190struct rdma_ucm_conn_param {199struct rdma_ucm_conn_param {
191 __u32 qp_num;200 __u32 qp_num;
192 __u32 qkey;201 __u32 qkey;
...@@ -297,6 +306,7 @@ struct rdma_ucm_event_resp {...@@ -297,6 +306,7 @@ struct rdma_ucm_event_resp {
297 union {306 union {
298 struct rdma_ucm_conn_param conn;307 struct rdma_ucm_conn_param conn;
299 struct rdma_ucm_ud_param ud;308 struct rdma_ucm_ud_param ud;
309 __u32 arg32[2];
300 } param;310 } param;
301 __u32 reserved;311 __u32 reserved;
302 struct rdma_ucm_ece ece;312 struct rdma_ucm_ece ece;
...@@ -338,4 +348,34 @@ struct rdma_ucm_migrate_resp {...@@ -338,4 +348,34 @@ struct rdma_ucm_migrate_resp {
338 __u32 events_reported;348 __u32 events_reported;
339};349};
340350
351enum {
352 RDMA_USER_CM_IB_SERVICE_FLAG_ID = 1 << 0,
353 RDMA_USER_CM_IB_SERVICE_FLAG_NAME = 1 << 1,
354};
355
356#define RDMA_USER_CM_IB_SERVICE_NAME_SIZE 64
357struct rdma_ucm_ib_service {
358 __aligned_u64 service_id;
359 __u8 service_name[RDMA_USER_CM_IB_SERVICE_NAME_SIZE];
360 __u32 flags;
361 __u32 reserved;
362};
363
364struct rdma_ucm_resolve_ib_service {
365 __u32 id;
366 __u32 reserved;
367 struct rdma_ucm_ib_service ibs;
368};
369
370struct rdma_ucm_write_cm_event {
371 __u32 id;
372 __u32 reserved;
373 __u32 event;
374 __u32 status;
375 union {
376 struct rdma_ucm_conn_param conn;
377 struct rdma_ucm_ud_param ud;
378 __u64 arg;
379 } param;
380};
341#endif /* RDMA_USER_CM_H */381#endif /* RDMA_USER_CM_H */
\ No newline at end of file
lib/libc/include/any-linux-any/regulator/regulator.h+2-2
...@@ -8,7 +8,7 @@...@@ -8,7 +8,7 @@
8#ifndef _REGULATOR_H8#ifndef _REGULATOR_H
9#define _REGULATOR_H9#define _REGULATOR_H
1010
11#include <stdint.h>11#include <linux/types.h>
1212
13/*13/*
14 * Regulator notifier events.14 * Regulator notifier events.
...@@ -58,7 +58,7 @@...@@ -58,7 +58,7 @@
5858
59struct reg_genl_event {59struct reg_genl_event {
60 char reg_name[32];60 char reg_name[32];
61 uint64_t event;61 __u64 event;
62};62};
6363
64/* attributes of reg_genl_family */64/* attributes of reg_genl_family */
lib/libc/include/any-linux-any/scsi/fc/fc_els.h+35-19
...@@ -11,6 +11,8 @@...@@ -11,6 +11,8 @@
11#include <linux/types.h>11#include <linux/types.h>
12#include <asm/byteorder.h>12#include <asm/byteorder.h>
1313
14#include <stddef.h> /* for offsetof */
15
14/*16/*
15 * Fibre Channel Switch - Enhanced Link Services definitions.17 * Fibre Channel Switch - Enhanced Link Services definitions.
16 * From T11 FC-LS Rev 1.2 June 7, 2005.18 * From T11 FC-LS Rev 1.2 June 7, 2005.
...@@ -1109,12 +1111,15 @@ struct fc_els_fpin {...@@ -1109,12 +1111,15 @@ struct fc_els_fpin {
11091111
1110/* Diagnostic Function Descriptor - FPIN Registration */1112/* Diagnostic Function Descriptor - FPIN Registration */
1111struct fc_df_desc_fpin_reg {1113struct fc_df_desc_fpin_reg {
1112 __be32 desc_tag; /* FPIN Registration (0x00030001) */1114 /* New members MUST be added within the __struct_group() macro below. */
1113 __be32 desc_len; /* Length of Descriptor (in bytes).1115 __struct_group(fc_df_desc_fpin_reg_hdr, __hdr, /* no attrs */,
1114 * Size of descriptor excluding1116 __be32 desc_tag; /* FPIN Registration (0x00030001) */
1115 * desc_tag and desc_len fields.1117 __be32 desc_len; /* Length of Descriptor (in bytes).
1116 */1118 * Size of descriptor excluding
1117 __be32 count; /* Number of desc_tags elements */1119 * desc_tag and desc_len fields.
1120 */
1121 __be32 count; /* Number of desc_tags elements */
1122 );
1118 __be32 desc_tags[]; /* Array of Descriptor Tags.1123 __be32 desc_tags[]; /* Array of Descriptor Tags.
1119 * Each tag indicates a function1124 * Each tag indicates a function
1120 * supported by the N_Port (request)1125 * supported by the N_Port (request)
...@@ -1124,33 +1129,44 @@ struct fc_df_desc_fpin_reg {...@@ -1124,33 +1129,44 @@ struct fc_df_desc_fpin_reg {
1124 * See ELS_FN_DTAG_xxx for tag values.1129 * See ELS_FN_DTAG_xxx for tag values.
1125 */1130 */
1126};1131};
1132_Static_assert(offsetof(struct fc_df_desc_fpin_reg, desc_tags) == sizeof(struct fc_df_desc_fpin_reg_hdr),
1133 "struct member likely outside of __struct_group()");
11271134
1128/*1135/*
1129 * ELS_RDF - Register Diagnostic Functions1136 * ELS_RDF - Register Diagnostic Functions
1130 */1137 */
1131struct fc_els_rdf {1138struct fc_els_rdf {
1132 __u8 fpin_cmd; /* command (0x19) */1139 /* New members MUST be added within the __struct_group() macro below. */
1133 __u8 fpin_zero[3]; /* specified as zero - part of cmd */1140 __struct_group(fc_els_rdf_hdr, __hdr, /* no attrs */,
1134 __be32 desc_len; /* Length of Descriptor List (in bytes).1141 __u8 fpin_cmd; /* command (0x19) */
1135 * Size of ELS excluding fpin_cmd,1142 __u8 fpin_zero[3]; /* specified as zero - part of cmd */
1136 * fpin_zero and desc_len fields.1143 __be32 desc_len; /* Length of Descriptor List (in bytes).
1137 */1144 * Size of ELS excluding fpin_cmd,
1145 * fpin_zero and desc_len fields.
1146 */
1147 );
1138 struct fc_tlv_desc desc[]; /* Descriptor list */1148 struct fc_tlv_desc desc[]; /* Descriptor list */
1139};1149};
1150_Static_assert(offsetof(struct fc_els_rdf, desc) == sizeof(struct fc_els_rdf_hdr),
1151 "struct member likely outside of __struct_group()");
11401152
1141/*1153/*
1142 * ELS RDF LS_ACC Response.1154 * ELS RDF LS_ACC Response.
1143 */1155 */
1144struct fc_els_rdf_resp {1156struct fc_els_rdf_resp {
1145 struct fc_els_ls_acc acc_hdr;1157 /* New members MUST be added within the __struct_group() macro below. */
1146 __be32 desc_list_len; /* Length of response (in1158 __struct_group(fc_els_rdf_resp_hdr, __hdr, /* no attrs */,
1147 * bytes). Excludes acc_hdr1159 struct fc_els_ls_acc acc_hdr;
1148 * and desc_list_len fields.1160 __be32 desc_list_len; /* Length of response (in
1149 */1161 * bytes). Excludes acc_hdr
1150 struct fc_els_lsri_desc lsri;1162 * and desc_list_len fields.
1163 */
1164 struct fc_els_lsri_desc lsri;
1165 );
1151 struct fc_tlv_desc desc[]; /* Supported Descriptor list */1166 struct fc_tlv_desc desc[]; /* Supported Descriptor list */
1152};1167};
11531168_Static_assert(offsetof(struct fc_els_rdf_resp, desc) == sizeof(struct fc_els_rdf_resp_hdr),
1169 "struct member likely outside of __struct_group()");
11541170
1155/*1171/*
1156 * Diagnostic Capability Descriptors for EDC ELS1172 * Diagnostic Capability Descriptors for EDC ELS
lib/libc/include/any-linux-any/sound/asound.h+1-1
...@@ -58,7 +58,7 @@ struct snd_cea_861_aud_if {...@@ -58,7 +58,7 @@ struct snd_cea_861_aud_if {
58 unsigned char db2_sf_ss; /* sample frequency and size */58 unsigned char db2_sf_ss; /* sample frequency and size */
59 unsigned char db3; /* not used, all zeros */59 unsigned char db3; /* not used, all zeros */
60 unsigned char db4_ca; /* channel allocation code */60 unsigned char db4_ca; /* channel allocation code */
61 unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */61 unsigned char db5_dminh_lsv; /* downmix inhibit & level-shift values */
62};62};
6363
64/****************************************************************************64/****************************************************************************
lib/libc/include/any-linux-any/sound/compress_offload.h+33-2
...@@ -13,8 +13,7 @@...@@ -13,8 +13,7 @@
13#include <sound/asound.h>13#include <sound/asound.h>
14#include <sound/compress_params.h>14#include <sound/compress_params.h>
1515
1616#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 4, 1)
17#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 3, 0)
18/**17/**
19 * struct snd_compressed_buffer - compressed buffer18 * struct snd_compressed_buffer - compressed buffer
20 * @fragment_size: size of buffer fragment in bytes19 * @fragment_size: size of buffer fragment in bytes
...@@ -56,6 +55,25 @@ struct snd_compr_tstamp {...@@ -56,6 +55,25 @@ struct snd_compr_tstamp {
56 __u32 sampling_rate;55 __u32 sampling_rate;
57} __attribute__((packed, aligned(4)));56} __attribute__((packed, aligned(4)));
5857
58/**
59 * struct snd_compr_tstamp64 - timestamp descriptor with fields in 64 bit
60 * @byte_offset: Byte offset in ring buffer to DSP
61 * @copied_total: Total number of bytes copied from/to ring buffer to/by DSP
62 * @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by
63 * large steps and should only be used to monitor encoding/decoding
64 * progress. It shall not be used for timing estimates.
65 * @pcm_io_frames: Frames rendered or received by DSP into a mixer or an audio
66 * output/input. This field should be used for A/V sync or time estimates.
67 * @sampling_rate: sampling rate of audio
68 */
69struct snd_compr_tstamp64 {
70 __u32 byte_offset;
71 __u64 copied_total;
72 __u64 pcm_frames;
73 __u64 pcm_io_frames;
74 __u32 sampling_rate;
75} __attribute__((packed, aligned(4)));
76
59/**77/**
60 * struct snd_compr_avail - avail descriptor78 * struct snd_compr_avail - avail descriptor
61 * @avail: Number of bytes available in ring buffer for writing/reading79 * @avail: Number of bytes available in ring buffer for writing/reading
...@@ -66,6 +84,16 @@ struct snd_compr_avail {...@@ -66,6 +84,16 @@ struct snd_compr_avail {
66 struct snd_compr_tstamp tstamp;84 struct snd_compr_tstamp tstamp;
67} __attribute__((packed, aligned(4)));85} __attribute__((packed, aligned(4)));
6886
87/**
88 * struct snd_compr_avail64 - avail descriptor with tstamp in 64 bit format
89 * @avail: Number of bytes available in ring buffer for writing/reading
90 * @tstamp: timestamp information
91 */
92struct snd_compr_avail64 {
93 __u64 avail;
94 struct snd_compr_tstamp64 tstamp;
95} __attribute__((packed, aligned(4)));
96
69enum snd_compr_direction {97enum snd_compr_direction {
70 SND_COMPRESS_PLAYBACK = 0,98 SND_COMPRESS_PLAYBACK = 0,
71 SND_COMPRESS_CAPTURE,99 SND_COMPRESS_CAPTURE,
...@@ -189,6 +217,7 @@ struct snd_compr_task_status {...@@ -189,6 +217,7 @@ struct snd_compr_task_status {
189 * Note: only codec params can be changed runtime and stream params cant be217 * Note: only codec params can be changed runtime and stream params cant be
190 * SNDRV_COMPRESS_GET_PARAMS: Query codec params218 * SNDRV_COMPRESS_GET_PARAMS: Query codec params
191 * SNDRV_COMPRESS_TSTAMP: get the current timestamp value219 * SNDRV_COMPRESS_TSTAMP: get the current timestamp value
220 * SNDRV_COMPRESS_TSTAMP64: get the current timestamp value in 64 bit format
192 * SNDRV_COMPRESS_AVAIL: get the current buffer avail value.221 * SNDRV_COMPRESS_AVAIL: get the current buffer avail value.
193 * This also queries the tstamp properties222 * This also queries the tstamp properties
194 * SNDRV_COMPRESS_PAUSE: Pause the running stream223 * SNDRV_COMPRESS_PAUSE: Pause the running stream
...@@ -211,6 +240,8 @@ struct snd_compr_task_status {...@@ -211,6 +240,8 @@ struct snd_compr_task_status {
211 struct snd_compr_metadata)240 struct snd_compr_metadata)
212#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)241#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
213#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)242#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
243#define SNDRV_COMPRESS_TSTAMP64 _IOR('C', 0x22, struct snd_compr_tstamp64)
244#define SNDRV_COMPRESS_AVAIL64 _IOR('C', 0x23, struct snd_compr_avail64)
214#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)245#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
215#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)246#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
216#define SNDRV_COMPRESS_START _IO('C', 0x32)247#define SNDRV_COMPRESS_START _IO('C', 0x32)
lib/libc/include/any-linux-any/sound/compress_params.h+40-1
...@@ -43,7 +43,8 @@...@@ -43,7 +43,8 @@
43#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)43#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
44#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)44#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
45#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)45#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
46#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE46#define SND_AUDIOCODEC_OPUS_RAW ((__u32) 0x00000011)
47#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_OPUS_RAW
4748
48/*49/*
49 * Profile and modes are listed with bit masks. This allows for a50 * Profile and modes are listed with bit masks. This allows for a
...@@ -324,6 +325,43 @@ struct snd_dec_ape {...@@ -324,6 +325,43 @@ struct snd_dec_ape {
324 __u32 seek_table_present;325 __u32 seek_table_present;
325} __attribute__((packed, aligned(4)));326} __attribute__((packed, aligned(4)));
326327
328/**
329 * struct snd_dec_opus - Opus decoder parameters (raw opus packets)
330 * @version: Usually should be '1' but can be split into major (4 upper bits)
331 * and minor (4 lower bits) sub-fields.
332 * @num_channels: Number of output channels.
333 * @pre_skip: Number of samples to discard at 48 kHz.
334 * @sample_rate: Sample rate of original input.
335 * @output_gain: Gain to apply when decoding (in Q7.8 format).
336 * @mapping_family: Order and meaning of output channels. Only values 0 and 1
337 * are expected; values 2..255 are not recommended for playback.
338 *
339 * @chan_map: Optional channel mapping table. Describes mapping of opus streams
340 * to decoded channels. Fields:
341 * @chan_map.stream_count: Number of streams encoded in each Ogg packet.
342 * @chan_map.coupled_count: Number of streams whose decoders are used
343 * for two channels.
344 * @chan_map.channel_map: Which decoded channel to be used for each one.
345 * Supports only mapping families 0 and 1,
346 * max number of channels is 8.
347 *
348 * These options were extracted from RFC7845 Section 5.
349 */
350
351struct snd_dec_opus {
352 __u8 version;
353 __u8 num_channels;
354 __u16 pre_skip;
355 __u32 sample_rate;
356 __u16 output_gain;
357 __u8 mapping_family;
358 struct snd_dec_opus_ch_map {
359 __u8 stream_count;
360 __u8 coupled_count;
361 __u8 channel_map[8];
362 } chan_map;
363} __attribute__((packed, aligned(4)));
364
327union snd_codec_options {365union snd_codec_options {
328 struct snd_enc_wma wma;366 struct snd_enc_wma wma;
329 struct snd_enc_vorbis vorbis;367 struct snd_enc_vorbis vorbis;
...@@ -334,6 +372,7 @@ union snd_codec_options {...@@ -334,6 +372,7 @@ union snd_codec_options {
334 struct snd_dec_wma wma_d;372 struct snd_dec_wma wma_d;
335 struct snd_dec_alac alac_d;373 struct snd_dec_alac alac_d;
336 struct snd_dec_ape ape_d;374 struct snd_dec_ape ape_d;
375 struct snd_dec_opus opus_d;
337 struct {376 struct {
338 __u32 out_sample_rate;377 __u32 out_sample_rate;
339 } src_d;378 } src_d;
lib/libc/include/any-linux-any/sound/intel/avs/tokens.h+21
...@@ -21,6 +21,7 @@ enum avs_tplg_token {...@@ -21,6 +21,7 @@ enum avs_tplg_token {
21 AVS_TKN_MANIFEST_NUM_BINDINGS_U32 = 8,21 AVS_TKN_MANIFEST_NUM_BINDINGS_U32 = 8,
22 AVS_TKN_MANIFEST_NUM_CONDPATH_TMPLS_U32 = 9,22 AVS_TKN_MANIFEST_NUM_CONDPATH_TMPLS_U32 = 9,
23 AVS_TKN_MANIFEST_NUM_INIT_CONFIGS_U32 = 10,23 AVS_TKN_MANIFEST_NUM_INIT_CONFIGS_U32 = 10,
24 AVS_TKN_MANIFEST_NUM_NHLT_CONFIGS_U32 = 11,
2425
25 /* struct avs_tplg_library */26 /* struct avs_tplg_library */
26 AVS_TKN_LIBRARY_ID_U32 = 101,27 AVS_TKN_LIBRARY_ID_U32 = 101,
...@@ -124,6 +125,7 @@ enum avs_tplg_token {...@@ -124,6 +125,7 @@ enum avs_tplg_token {
124 AVS_TKN_MOD_KCONTROL_ID_U32 = 1707,125 AVS_TKN_MOD_KCONTROL_ID_U32 = 1707,
125 AVS_TKN_MOD_INIT_CONFIG_NUM_IDS_U32 = 1708,126 AVS_TKN_MOD_INIT_CONFIG_NUM_IDS_U32 = 1708,
126 AVS_TKN_MOD_INIT_CONFIG_ID_U32 = 1709,127 AVS_TKN_MOD_INIT_CONFIG_ID_U32 = 1709,
128 AVS_TKN_MOD_NHLT_CONFIG_ID_U32 = 1710,
127129
128 /* struct avs_tplg_path_template */130 /* struct avs_tplg_path_template */
129 AVS_TKN_PATH_TMPL_ID_U32 = 1801,131 AVS_TKN_PATH_TMPL_ID_U32 = 1801,
...@@ -133,6 +135,21 @@ enum avs_tplg_token {...@@ -133,6 +135,21 @@ enum avs_tplg_token {
133 AVS_TKN_PATH_FE_FMT_ID_U32 = 1902,135 AVS_TKN_PATH_FE_FMT_ID_U32 = 1902,
134 AVS_TKN_PATH_BE_FMT_ID_U32 = 1903,136 AVS_TKN_PATH_BE_FMT_ID_U32 = 1903,
135137
138 /* struct avs_tplg_path_template (conditional) */
139 AVS_TKN_CONDPATH_TMPL_ID_U32 = 1801,
140 AVS_TKN_CONDPATH_TMPL_SOURCE_TPLG_NAME_STRING = 2002,
141 AVS_TKN_CONDPATH_TMPL_SOURCE_PATH_TMPL_ID_U32 = 2003,
142 AVS_TKN_CONDPATH_TMPL_SINK_TPLG_NAME_STRING = 2004,
143 AVS_TKN_CONDPATH_TMPL_SINK_PATH_TMPL_ID_U32 = 2005,
144 AVS_TKN_CONDPATH_TMPL_COND_TYPE_U32 = 2006,
145 AVS_TKN_CONDPATH_TMPL_OVERRIDABLE_BOOL = 2007,
146 AVS_TKN_CONDPATH_TMPL_PRIORITY_U8 = 2008,
147
148 /* struct avs_tplg_path (conditional) */
149 AVS_TKN_CONDPATH_ID_U32 = 1901,
150 AVS_TKN_CONDPATH_SOURCE_PATH_ID_U32 = 2102,
151 AVS_TKN_CONDPATH_SINK_PATH_ID_U32 = 2103,
152
136 /* struct avs_tplg_pin_format */153 /* struct avs_tplg_pin_format */
137 AVS_TKN_PIN_FMT_INDEX_U32 = 2201,154 AVS_TKN_PIN_FMT_INDEX_U32 = 2201,
138 AVS_TKN_PIN_FMT_IOBS_U32 = 2202,155 AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
...@@ -145,6 +162,10 @@ enum avs_tplg_token {...@@ -145,6 +162,10 @@ enum avs_tplg_token {
145 AVS_TKN_INIT_CONFIG_ID_U32 = 2401,162 AVS_TKN_INIT_CONFIG_ID_U32 = 2401,
146 AVS_TKN_INIT_CONFIG_PARAM_U8 = 2402,163 AVS_TKN_INIT_CONFIG_PARAM_U8 = 2402,
147 AVS_TKN_INIT_CONFIG_LENGTH_U32 = 2403,164 AVS_TKN_INIT_CONFIG_LENGTH_U32 = 2403,
165
166 /* struct avs_tplg_nhlt_config */
167 AVS_TKN_NHLT_CONFIG_ID_U32 = 2501,
168 AVS_TKN_NHLT_CONFIG_SIZE_U32 = 2502,
148};169};
149170
150#endif171#endif
\ No newline at end of file
lib/libc/include/any-linux-any/sound/snd_ar_tokens.h+18-2
...@@ -3,6 +3,8 @@...@@ -3,6 +3,8 @@
3#ifndef __SND_AR_TOKENS_H__3#ifndef __SND_AR_TOKENS_H__
4#define __SND_AR_TOKENS_H__4#define __SND_AR_TOKENS_H__
55
6#include <linux/types.h>
7
6#define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x18#define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1
7#define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x29#define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2
810
...@@ -118,6 +120,12 @@ enum ar_event_types {...@@ -118,6 +120,12 @@ enum ar_event_types {
118 * LPAIF_WSA = 2,120 * LPAIF_WSA = 2,
119 * LPAIF_VA = 3,121 * LPAIF_VA = 3,
120 * LPAIF_AXI = 4122 * LPAIF_AXI = 4
123 * Possible values for MI2S
124 * I2S_INTF_TYPE_PRIMARY = 0,
125 * I2S_INTF_TYPE_SECONDARY = 1,
126 * I2S_INTF_TYPE_TERTIARY = 2,
127 * I2S_INTF_TYPE_QUATERNARY = 3,
128 * I2S_INTF_TYPE_QUINARY = 4,
121 *129 *
122 * %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving130 * %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving
123 * PCM_INTERLEAVED = 1,131 * PCM_INTERLEAVED = 1,
...@@ -184,8 +192,8 @@ enum ar_event_types {...@@ -184,8 +192,8 @@ enum ar_event_types {
184#define AR_TKN_U32_MODULE_INSTANCE_ID 201192#define AR_TKN_U32_MODULE_INSTANCE_ID 201
185#define AR_TKN_U32_MODULE_MAX_IP_PORTS 202193#define AR_TKN_U32_MODULE_MAX_IP_PORTS 202
186#define AR_TKN_U32_MODULE_MAX_OP_PORTS 203194#define AR_TKN_U32_MODULE_MAX_OP_PORTS 203
187#define AR_TKN_U32_MODULE_IN_PORTS 204195#define AR_TKN_U32_MODULE_IN_PORTS 204 /* deprecated */
188#define AR_TKN_U32_MODULE_OUT_PORTS 205196#define AR_TKN_U32_MODULE_OUT_PORTS 205 /* deprecated */
189#define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206197#define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206
190#define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207198#define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207
191#define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208199#define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208
...@@ -232,4 +240,12 @@ enum ar_event_types {...@@ -232,4 +240,12 @@ enum ar_event_types {
232#define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260240#define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
233#define AR_TKN_U32_MODULE_LOG_MODE 261241#define AR_TKN_U32_MODULE_LOG_MODE 261
234242
243#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
244struct audioreach_module_priv_data {
245 __le32 size; /* size in bytes of the array, including all elements */
246 __le32 type; /* SND_SOC_AR_TPLG_MODULE_CFG_TYPE */
247 __le32 priv[2]; /* Private data for future expansion */
248 __le32 data[0]; /* config data */
249};
250
235#endif /* __SND_AR_TOKENS_H__ */251#endif /* __SND_AR_TOKENS_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/sound/sof/tokens.h+2
...@@ -106,6 +106,8 @@...@@ -106,6 +106,8 @@
106 */106 */
107#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417107#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417
108108
109#define SOF_TKN_COMP_SCHED_DOMAIN 418
110
109/* SSP */111/* SSP */
110#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500112#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
111#define SOF_TKN_INTEL_SSP_MCLK_ID 501113#define SOF_TKN_INTEL_SSP_MCLK_ID 501
lib/libc/include/arc-linux-any/asm/unistd_32.h+1
...@@ -350,6 +350,7 @@...@@ -350,6 +350,7 @@
350#define __NR_open_tree_attr 467350#define __NR_open_tree_attr 467
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 470
353354
354355
355#endif /* _ASM_UNISTD_32_H */356#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/arm-linux-any/asm/unistd-eabi.h+1
...@@ -423,5 +423,6 @@...@@ -423,5 +423,6 @@
423#define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467)423#define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467)
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)
426427
427#endif /* _ASM_UNISTD_EABI_H */428#endif /* _ASM_UNISTD_EABI_H */
\ No newline at end of file
lib/libc/include/arm-linux-any/asm/unistd-oabi.h+1
...@@ -435,5 +435,6 @@...@@ -435,5 +435,6 @@
435#define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467)435#define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467)
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)
438439
439#endif /* _ASM_UNISTD_OABI_H */440#endif /* _ASM_UNISTD_OABI_H */
\ No newline at end of file
lib/libc/include/csky-linux-any/asm/ptrace.h+2-2
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3#ifndef _CSKY_PTRACE_H3#ifndef _CSKY_PTRACE_H
4#define _CSKY_PTRACE_H4#define _CSKY_PTRACE_H
55
6#ifndef __ASSEMBLY__6#ifndef __ASSEMBLER__
77
8struct pt_regs {8struct pt_regs {
9 unsigned long tls;9 unsigned long tls;
...@@ -47,5 +47,5 @@ struct user_fp {...@@ -47,5 +47,5 @@ struct user_fp {
47 unsigned long reserved;47 unsigned long reserved;
48};48};
4949
50#endif /* __ASSEMBLY__ */50#endif /* __ASSEMBLER__ */
51#endif /* _CSKY_PTRACE_H */51#endif /* _CSKY_PTRACE_H */
\ No newline at end of file
lib/libc/include/csky-linux-any/asm/unistd_32.h+1
...@@ -346,6 +346,7 @@...@@ -346,6 +346,7 @@
346#define __NR_open_tree_attr 467346#define __NR_open_tree_attr 467
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 470
349350
350351
351#endif /* _ASM_UNISTD_32_H */352#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/hexagon-linux-any/asm/unistd_32.h+1
...@@ -345,6 +345,7 @@...@@ -345,6 +345,7 @@
345#define __NR_open_tree_attr 467345#define __NR_open_tree_attr 467
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 470
348349
349350
350#endif /* _ASM_UNISTD_32_H */351#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/kvm.h+2
...@@ -103,6 +103,8 @@ struct kvm_fpu {...@@ -103,6 +103,8 @@ struct kvm_fpu {
103#define KVM_LOONGARCH_VM_FEAT_PMU 5103#define KVM_LOONGARCH_VM_FEAT_PMU 5
104#define KVM_LOONGARCH_VM_FEAT_PV_IPI 6104#define KVM_LOONGARCH_VM_FEAT_PV_IPI 6
105#define KVM_LOONGARCH_VM_FEAT_PV_STEALTIME 7105#define KVM_LOONGARCH_VM_FEAT_PV_STEALTIME 7
106#define KVM_LOONGARCH_VM_FEAT_PTW 8
107#define KVM_LOONGARCH_VM_FEAT_MSGINT 9
106108
107/* Device Control API on vcpu fd */109/* Device Control API on vcpu fd */
108#define KVM_LOONGARCH_VCPU_CPUCFG 0110#define KVM_LOONGARCH_VCPU_CPUCFG 0
lib/libc/include/loongarch-linux-any/asm/ptrace.h+28-20
...@@ -10,8 +10,6 @@...@@ -10,8 +10,6 @@
1010
11#include <linux/types.h>11#include <linux/types.h>
1212
13#include <stdint.h>
14
15/*13/*
16 * For PTRACE_{POKE,PEEK}USR. 0 - 31 are GPRs,14 * For PTRACE_{POKE,PEEK}USR. 0 - 31 are GPRs,
17 * 32 is syscall's original ARG0, 33 is PC, 34 is BADVADDR.15 * 32 is syscall's original ARG0, 33 is PC, 34 is BADVADDR.
...@@ -39,44 +37,54 @@ struct user_pt_regs {...@@ -39,44 +37,54 @@ struct user_pt_regs {
39} __attribute__((aligned(8)));37} __attribute__((aligned(8)));
4038
41struct user_fp_state {39struct user_fp_state {
42 uint64_t fpr[32];40 __u64 fpr[32];
43 uint64_t fcc;41 __u64 fcc;
44 uint32_t fcsr;42 __u32 fcsr;
45};43};
4644
47struct user_lsx_state {45struct user_lsx_state {
48 /* 32 registers, 128 bits width per register. */46 /* 32 registers, 128 bits width per register. */
49 uint64_t vregs[32*2];47 __u64 vregs[32*2];
50};48};
5149
52struct user_lasx_state {50struct user_lasx_state {
53 /* 32 registers, 256 bits width per register. */51 /* 32 registers, 256 bits width per register. */
54 uint64_t vregs[32*4];52 __u64 vregs[32*4];
55};53};
5654
57struct user_lbt_state {55struct user_lbt_state {
58 uint64_t scr[4];56 __u64 scr[4];
59 uint32_t eflags;57 __u32 eflags;
60 uint32_t ftop;58 __u32 ftop;
61};59};
6260
63struct user_watch_state {61struct user_watch_state {
64 uint64_t dbg_info;62 __u64 dbg_info;
65 struct {63 struct {
66 uint64_t addr;64#if __BITS_PER_LONG == 32
67 uint64_t mask;65 __u32 addr;
68 uint32_t ctrl;66 __u32 mask;
69 uint32_t pad;67#else
68 __u64 addr;
69 __u64 mask;
70#endif
71 __u32 ctrl;
72 __u32 pad;
70 } dbg_regs[8];73 } dbg_regs[8];
71};74};
7275
73struct user_watch_state_v2 {76struct user_watch_state_v2 {
74 uint64_t dbg_info;77 __u64 dbg_info;
75 struct {78 struct {
76 uint64_t addr;79#if __BITS_PER_LONG == 32
77 uint64_t mask;80 __u32 addr;
78 uint32_t ctrl;81 __u32 mask;
79 uint32_t pad;82#else
83 __u64 addr;
84 __u64 mask;
85#endif
86 __u32 ctrl;
87 __u32 pad;
80 } dbg_regs[14];88 } dbg_regs[14];
81};89};
8290
lib/libc/include/loongarch-linux-any/asm/unistd.h+7-1
...@@ -1,3 +1,9 @@...@@ -1,3 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22
3#include <asm/unistd_64.h>
\ No newline at end of file
3#include <asm/bitsperlong.h>
4
5#if __BITS_PER_LONG == 32
6#include <asm/unistd_32.h>
7#else
8#include <asm/unistd_64.h>
9#endif
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/unistd_32.h created+320
...@@ -0,0 +1,320 @@
1#ifndef _ASM_UNISTD_32_H
2#define _ASM_UNISTD_32_H
3
4#define __NR_io_setup 0
5#define __NR_io_destroy 1
6#define __NR_io_submit 2
7#define __NR_io_cancel 3
8#define __NR_setxattr 5
9#define __NR_lsetxattr 6
10#define __NR_fsetxattr 7
11#define __NR_getxattr 8
12#define __NR_lgetxattr 9
13#define __NR_fgetxattr 10
14#define __NR_listxattr 11
15#define __NR_llistxattr 12
16#define __NR_flistxattr 13
17#define __NR_removexattr 14
18#define __NR_lremovexattr 15
19#define __NR_fremovexattr 16
20#define __NR_getcwd 17
21#define __NR_lookup_dcookie 18
22#define __NR_eventfd2 19
23#define __NR_epoll_create1 20
24#define __NR_epoll_ctl 21
25#define __NR_epoll_pwait 22
26#define __NR_dup 23
27#define __NR_dup3 24
28#define __NR_fcntl64 25
29#define __NR_inotify_init1 26
30#define __NR_inotify_add_watch 27
31#define __NR_inotify_rm_watch 28
32#define __NR_ioctl 29
33#define __NR_ioprio_set 30
34#define __NR_ioprio_get 31
35#define __NR_flock 32
36#define __NR_mknodat 33
37#define __NR_mkdirat 34
38#define __NR_unlinkat 35
39#define __NR_symlinkat 36
40#define __NR_linkat 37
41#define __NR_umount2 39
42#define __NR_mount 40
43#define __NR_pivot_root 41
44#define __NR_nfsservctl 42
45#define __NR_statfs64 43
46#define __NR_fstatfs64 44
47#define __NR_truncate64 45
48#define __NR_ftruncate64 46
49#define __NR_fallocate 47
50#define __NR_faccessat 48
51#define __NR_chdir 49
52#define __NR_fchdir 50
53#define __NR_chroot 51
54#define __NR_fchmod 52
55#define __NR_fchmodat 53
56#define __NR_fchownat 54
57#define __NR_fchown 55
58#define __NR_openat 56
59#define __NR_close 57
60#define __NR_vhangup 58
61#define __NR_pipe2 59
62#define __NR_quotactl 60
63#define __NR_getdents64 61
64#define __NR_llseek 62
65#define __NR_read 63
66#define __NR_write 64
67#define __NR_readv 65
68#define __NR_writev 66
69#define __NR_pread64 67
70#define __NR_pwrite64 68
71#define __NR_preadv 69
72#define __NR_pwritev 70
73#define __NR_sendfile64 71
74#define __NR_signalfd4 74
75#define __NR_vmsplice 75
76#define __NR_splice 76
77#define __NR_tee 77
78#define __NR_readlinkat 78
79#define __NR_sync 81
80#define __NR_fsync 82
81#define __NR_fdatasync 83
82#define __NR_sync_file_range 84
83#define __NR_timerfd_create 85
84#define __NR_acct 89
85#define __NR_capget 90
86#define __NR_capset 91
87#define __NR_personality 92
88#define __NR_exit 93
89#define __NR_exit_group 94
90#define __NR_waitid 95
91#define __NR_set_tid_address 96
92#define __NR_unshare 97
93#define __NR_set_robust_list 99
94#define __NR_get_robust_list 100
95#define __NR_getitimer 102
96#define __NR_setitimer 103
97#define __NR_kexec_load 104
98#define __NR_init_module 105
99#define __NR_delete_module 106
100#define __NR_timer_create 107
101#define __NR_timer_getoverrun 109
102#define __NR_timer_delete 111
103#define __NR_syslog 116
104#define __NR_ptrace 117
105#define __NR_sched_setparam 118
106#define __NR_sched_setscheduler 119
107#define __NR_sched_getscheduler 120
108#define __NR_sched_getparam 121
109#define __NR_sched_setaffinity 122
110#define __NR_sched_getaffinity 123
111#define __NR_sched_yield 124
112#define __NR_sched_get_priority_max 125
113#define __NR_sched_get_priority_min 126
114#define __NR_restart_syscall 128
115#define __NR_kill 129
116#define __NR_tkill 130
117#define __NR_tgkill 131
118#define __NR_sigaltstack 132
119#define __NR_rt_sigsuspend 133
120#define __NR_rt_sigaction 134
121#define __NR_rt_sigprocmask 135
122#define __NR_rt_sigpending 136
123#define __NR_rt_sigqueueinfo 138
124#define __NR_rt_sigreturn 139
125#define __NR_setpriority 140
126#define __NR_getpriority 141
127#define __NR_reboot 142
128#define __NR_setregid 143
129#define __NR_setgid 144
130#define __NR_setreuid 145
131#define __NR_setuid 146
132#define __NR_setresuid 147
133#define __NR_getresuid 148
134#define __NR_setresgid 149
135#define __NR_getresgid 150
136#define __NR_setfsuid 151
137#define __NR_setfsgid 152
138#define __NR_times 153
139#define __NR_setpgid 154
140#define __NR_getpgid 155
141#define __NR_getsid 156
142#define __NR_setsid 157
143#define __NR_getgroups 158
144#define __NR_setgroups 159
145#define __NR_uname 160
146#define __NR_sethostname 161
147#define __NR_setdomainname 162
148#define __NR_getrusage 165
149#define __NR_umask 166
150#define __NR_prctl 167
151#define __NR_getcpu 168
152#define __NR_getpid 172
153#define __NR_getppid 173
154#define __NR_getuid 174
155#define __NR_geteuid 175
156#define __NR_getgid 176
157#define __NR_getegid 177
158#define __NR_gettid 178
159#define __NR_sysinfo 179
160#define __NR_mq_open 180
161#define __NR_mq_unlink 181
162#define __NR_mq_notify 184
163#define __NR_mq_getsetattr 185
164#define __NR_msgget 186
165#define __NR_msgctl 187
166#define __NR_msgrcv 188
167#define __NR_msgsnd 189
168#define __NR_semget 190
169#define __NR_semctl 191
170#define __NR_semop 193
171#define __NR_shmget 194
172#define __NR_shmctl 195
173#define __NR_shmat 196
174#define __NR_shmdt 197
175#define __NR_socket 198
176#define __NR_socketpair 199
177#define __NR_bind 200
178#define __NR_listen 201
179#define __NR_accept 202
180#define __NR_connect 203
181#define __NR_getsockname 204
182#define __NR_getpeername 205
183#define __NR_sendto 206
184#define __NR_recvfrom 207
185#define __NR_setsockopt 208
186#define __NR_getsockopt 209
187#define __NR_shutdown 210
188#define __NR_sendmsg 211
189#define __NR_recvmsg 212
190#define __NR_readahead 213
191#define __NR_brk 214
192#define __NR_munmap 215
193#define __NR_mremap 216
194#define __NR_add_key 217
195#define __NR_request_key 218
196#define __NR_keyctl 219
197#define __NR_clone 220
198#define __NR_execve 221
199#define __NR_mmap2 222
200#define __NR_fadvise64_64 223
201#define __NR_swapon 224
202#define __NR_swapoff 225
203#define __NR_mprotect 226
204#define __NR_msync 227
205#define __NR_mlock 228
206#define __NR_munlock 229
207#define __NR_mlockall 230
208#define __NR_munlockall 231
209#define __NR_mincore 232
210#define __NR_madvise 233
211#define __NR_remap_file_pages 234
212#define __NR_mbind 235
213#define __NR_get_mempolicy 236
214#define __NR_set_mempolicy 237
215#define __NR_migrate_pages 238
216#define __NR_move_pages 239
217#define __NR_rt_tgsigqueueinfo 240
218#define __NR_perf_event_open 241
219#define __NR_accept4 242
220#define __NR_prlimit64 261
221#define __NR_fanotify_init 262
222#define __NR_fanotify_mark 263
223#define __NR_name_to_handle_at 264
224#define __NR_open_by_handle_at 265
225#define __NR_syncfs 267
226#define __NR_setns 268
227#define __NR_sendmmsg 269
228#define __NR_process_vm_readv 270
229#define __NR_process_vm_writev 271
230#define __NR_kcmp 272
231#define __NR_finit_module 273
232#define __NR_sched_setattr 274
233#define __NR_sched_getattr 275
234#define __NR_renameat2 276
235#define __NR_seccomp 277
236#define __NR_getrandom 278
237#define __NR_memfd_create 279
238#define __NR_bpf 280
239#define __NR_execveat 281
240#define __NR_userfaultfd 282
241#define __NR_membarrier 283
242#define __NR_mlock2 284
243#define __NR_copy_file_range 285
244#define __NR_preadv2 286
245#define __NR_pwritev2 287
246#define __NR_pkey_mprotect 288
247#define __NR_pkey_alloc 289
248#define __NR_pkey_free 290
249#define __NR_statx 291
250#define __NR_rseq 293
251#define __NR_kexec_file_load 294
252#define __NR_clock_gettime64 403
253#define __NR_clock_settime64 404
254#define __NR_clock_adjtime64 405
255#define __NR_clock_getres_time64 406
256#define __NR_clock_nanosleep_time64 407
257#define __NR_timer_gettime64 408
258#define __NR_timer_settime64 409
259#define __NR_timerfd_gettime64 410
260#define __NR_timerfd_settime64 411
261#define __NR_utimensat_time64 412
262#define __NR_pselect6_time64 413
263#define __NR_ppoll_time64 414
264#define __NR_io_pgetevents_time64 416
265#define __NR_recvmmsg_time64 417
266#define __NR_mq_timedsend_time64 418
267#define __NR_mq_timedreceive_time64 419
268#define __NR_semtimedop_time64 420
269#define __NR_rt_sigtimedwait_time64 421
270#define __NR_futex_time64 422
271#define __NR_sched_rr_get_interval_time64 423
272#define __NR_pidfd_send_signal 424
273#define __NR_io_uring_setup 425
274#define __NR_io_uring_enter 426
275#define __NR_io_uring_register 427
276#define __NR_open_tree 428
277#define __NR_move_mount 429
278#define __NR_fsopen 430
279#define __NR_fsconfig 431
280#define __NR_fsmount 432
281#define __NR_fspick 433
282#define __NR_pidfd_open 434
283#define __NR_clone3 435
284#define __NR_close_range 436
285#define __NR_openat2 437
286#define __NR_pidfd_getfd 438
287#define __NR_faccessat2 439
288#define __NR_process_madvise 440
289#define __NR_epoll_pwait2 441
290#define __NR_mount_setattr 442
291#define __NR_quotactl_fd 443
292#define __NR_landlock_create_ruleset 444
293#define __NR_landlock_add_rule 445
294#define __NR_landlock_restrict_self 446
295#define __NR_process_mrelease 448
296#define __NR_futex_waitv 449
297#define __NR_set_mempolicy_home_node 450
298#define __NR_cachestat 451
299#define __NR_fchmodat2 452
300#define __NR_map_shadow_stack 453
301#define __NR_futex_wake 454
302#define __NR_futex_wait 455
303#define __NR_futex_requeue 456
304#define __NR_statmount 457
305#define __NR_listmount 458
306#define __NR_lsm_get_self_attr 459
307#define __NR_lsm_set_self_attr 460
308#define __NR_lsm_list_modules 461
309#define __NR_mseal 462
310#define __NR_setxattrat 463
311#define __NR_getxattrat 464
312#define __NR_listxattrat 465
313#define __NR_removexattrat 466
314#define __NR_open_tree_attr 467
315#define __NR_file_getattr 468
316#define __NR_file_setattr 469
317#define __NR_listns 470
318
319
320#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/unistd_64.h+1
...@@ -322,6 +322,7 @@...@@ -322,6 +322,7 @@
322#define __NR_open_tree_attr 467322#define __NR_open_tree_attr 467
323#define __NR_file_getattr 468323#define __NR_file_getattr 468
324#define __NR_file_setattr 469324#define __NR_file_setattr 469
325#define __NR_listns 470
325326
326327
327#endif /* _ASM_UNISTD_64_H */328#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/m68k-linux-any/asm/unistd_32.h+1
...@@ -442,6 +442,7 @@...@@ -442,6 +442,7 @@
442#define __NR_open_tree_attr 467442#define __NR_open_tree_attr 467
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 470
445446
446447
447#endif /* _ASM_UNISTD_32_H */448#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/unistd_n32.h+1
...@@ -398,5 +398,6 @@...@@ -398,5 +398,6 @@
398#define __NR_open_tree_attr (__NR_Linux + 467)398#define __NR_open_tree_attr (__NR_Linux + 467)
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)
401402
402#endif /* _ASM_UNISTD_N32_H */403#endif /* _ASM_UNISTD_N32_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/unistd_n64.h+1
...@@ -374,5 +374,6 @@...@@ -374,5 +374,6 @@
374#define __NR_open_tree_attr (__NR_Linux + 467)374#define __NR_open_tree_attr (__NR_Linux + 467)
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)
377378
378#endif /* _ASM_UNISTD_N64_H */379#endif /* _ASM_UNISTD_N64_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/unistd_o32.h+1
...@@ -444,5 +444,6 @@...@@ -444,5 +444,6 @@
444#define __NR_open_tree_attr (__NR_Linux + 467)444#define __NR_open_tree_attr (__NR_Linux + 467)
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)
447448
448#endif /* _ASM_UNISTD_O32_H */449#endif /* _ASM_UNISTD_O32_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/opal-prd.h+2-2
...@@ -40,7 +40,7 @@...@@ -40,7 +40,7 @@
40#define OPAL_PRD_SCOM_READ _IOR('o', 0x02, struct opal_prd_scom)40#define OPAL_PRD_SCOM_READ _IOR('o', 0x02, struct opal_prd_scom)
41#define OPAL_PRD_SCOM_WRITE _IOW('o', 0x03, struct opal_prd_scom)41#define OPAL_PRD_SCOM_WRITE _IOW('o', 0x03, struct opal_prd_scom)
4242
43#ifndef __ASSEMBLY__43#ifndef __ASSEMBLER__
4444
45struct opal_prd_info {45struct opal_prd_info {
46 __u64 version;46 __u64 version;
...@@ -54,6 +54,6 @@ struct opal_prd_scom {...@@ -54,6 +54,6 @@ struct opal_prd_scom {
54 __s64 rc;54 __s64 rc;
55};55};
5656
57#endif /* __ASSEMBLY__ */57#endif /* __ASSEMBLER__ */
5858
59#endif /* _ASM_POWERPC_OPAL_PRD_H */59#endif /* _ASM_POWERPC_OPAL_PRD_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/papr-hvpipe.h created+33
...@@ -0,0 +1,33 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _PAPR_HVPIPE_H_
3#define _PAPR_HVPIPE_H_
4
5#include <linux/types.h>
6#include <asm/ioctl.h>
7#include <asm/papr-miscdev.h>
8
9/*
10 * This header is included in payload between OS and the user
11 * space.
12 * flags: OS notifies the user space whether the hvpipe is
13 * closed or the buffer has the payload.
14 */
15struct papr_hvpipe_hdr {
16 __u8 version;
17 __u8 reserved[3];
18 __u32 flags;
19 __u8 reserved2[40];
20};
21
22/*
23 * ioctl for /dev/papr-hvpipe
24 */
25#define PAPR_HVPIPE_IOC_CREATE_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 9, __u32)
26
27/*
28 * hvpipe_hdr flags used for read()
29 */
30#define HVPIPE_MSG_AVAILABLE 0x01 /* Payload is available */
31#define HVPIPE_LOST_CONNECTION 0x02 /* Pipe connection is closed/unavailable */
32
33#endif /* _PAPR_HVPIPE_H_ */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/ptrace.h+6-6
...@@ -27,7 +27,7 @@...@@ -27,7 +27,7 @@
2727
28#include <linux/types.h>28#include <linux/types.h>
2929
30#ifndef __ASSEMBLY__30#ifndef __ASSEMBLER__
3131
32struct pt_regs32struct pt_regs
33{33{
...@@ -53,7 +53,7 @@ struct pt_regs...@@ -53,7 +53,7 @@ struct pt_regs
53 unsigned long result; /* Result of a system call */53 unsigned long result; /* Result of a system call */
54};54};
5555
56#endif /* __ASSEMBLY__ */56#endif /* __ASSEMBLER__ */
5757
5858
59/*59/*
...@@ -196,7 +196,7 @@ struct pt_regs...@@ -196,7 +196,7 @@ struct pt_regs
196#define PPC_PTRACE_SETHWDEBUG 0x88196#define PPC_PTRACE_SETHWDEBUG 0x88
197#define PPC_PTRACE_DELHWDEBUG 0x87197#define PPC_PTRACE_DELHWDEBUG 0x87
198198
199#ifndef __ASSEMBLY__199#ifndef __ASSEMBLER__
200200
201struct ppc_debug_info {201struct ppc_debug_info {
202 __u32 version; /* Only version 1 exists to date */202 __u32 version; /* Only version 1 exists to date */
...@@ -208,7 +208,7 @@ struct ppc_debug_info {...@@ -208,7 +208,7 @@ struct ppc_debug_info {
208 __u64 features;208 __u64 features;
209};209};
210210
211#endif /* __ASSEMBLY__ */211#endif /* __ASSEMBLER__ */
212212
213/*213/*
214 * features will have bits indication whether there is support for:214 * features will have bits indication whether there is support for:
...@@ -220,7 +220,7 @@ struct ppc_debug_info {...@@ -220,7 +220,7 @@ struct ppc_debug_info {
220#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x0000000000000010220#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x0000000000000010
221#define PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 0x0000000000000020221#define PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 0x0000000000000020
222222
223#ifndef __ASSEMBLY__223#ifndef __ASSEMBLER__
224224
225struct ppc_hw_breakpoint {225struct ppc_hw_breakpoint {
226 __u32 version; /* currently, version must be 1 */226 __u32 version; /* currently, version must be 1 */
...@@ -232,7 +232,7 @@ struct ppc_hw_breakpoint {...@@ -232,7 +232,7 @@ struct ppc_hw_breakpoint {
232 __u64 condition_value; /* contents of the DVC register */232 __u64 condition_value; /* contents of the DVC register */
233};233};
234234
235#endif /* __ASSEMBLY__ */235#endif /* __ASSEMBLER__ */
236236
237/*237/*
238 * Trigger Type238 * Trigger Type
lib/libc/include/powerpc-linux-any/asm/types.h+2-2
...@@ -28,14 +28,14 @@...@@ -28,14 +28,14 @@
28# include <asm-generic/int-ll64.h>28# include <asm-generic/int-ll64.h>
29#endif29#endif
3030
31#ifndef __ASSEMBLY__31#ifndef __ASSEMBLER__
3232
3333
34typedef struct {34typedef struct {
35 __u32 u[4];35 __u32 u[4];
36} __attribute__((aligned(16))) __vector128;36} __attribute__((aligned(16))) __vector128;
3737
38#endif /* __ASSEMBLY__ */38#endif /* __ASSEMBLER__ */
3939
4040
41#endif /* _ASM_POWERPC_TYPES_H */41#endif /* _ASM_POWERPC_TYPES_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/unistd_32.h+1
...@@ -451,6 +451,7 @@...@@ -451,6 +451,7 @@
451#define __NR_open_tree_attr 467451#define __NR_open_tree_attr 467
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 470
454455
455456
456#endif /* _ASM_UNISTD_32_H */457#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/unistd_64.h+1
...@@ -423,6 +423,7 @@...@@ -423,6 +423,7 @@
423#define __NR_open_tree_attr 467423#define __NR_open_tree_attr 467
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 470
426427
427428
428#endif /* _ASM_UNISTD_64_H */429#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/hwprobe.h+7
...@@ -82,6 +82,11 @@ struct riscv_hwprobe {...@@ -82,6 +82,11 @@ struct riscv_hwprobe {
82#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)82#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)
83#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)83#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)
84#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)84#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)
85#define RISCV_HWPROBE_EXT_ZALASR (1ULL << 59)
86#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)
87#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)
88#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)
89
85#define RISCV_HWPROBE_KEY_CPUPERF_0 590#define RISCV_HWPROBE_KEY_CPUPERF_0 5
86#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)91#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
87#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)92#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
...@@ -106,6 +111,8 @@ struct riscv_hwprobe {...@@ -106,6 +111,8 @@ struct riscv_hwprobe {
106#define RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0 11111#define RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0 11
107#define RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE 12112#define RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE 12
108#define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 13113#define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 13
114#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14
115#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15
109/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */116/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
110117
111/* Flags */118/* Flags */
lib/libc/include/riscv-linux-any/asm/kvm.h+25-1
...@@ -9,7 +9,7 @@...@@ -9,7 +9,7 @@
9#ifndef __LINUX_KVM_RISCV_H9#ifndef __LINUX_KVM_RISCV_H
10#define __LINUX_KVM_RISCV_H10#define __LINUX_KVM_RISCV_H
1111
12#ifndef __ASSEMBLY__12#ifndef __ASSEMBLER__
1313
14#include <linux/types.h>14#include <linux/types.h>
15#include <asm/bitsperlong.h>15#include <asm/bitsperlong.h>
...@@ -23,6 +23,8 @@...@@ -23,6 +23,8 @@
23#define KVM_INTERRUPT_SET -1U23#define KVM_INTERRUPT_SET -1U
24#define KVM_INTERRUPT_UNSET -2U24#define KVM_INTERRUPT_UNSET -2U
2525
26#define KVM_EXIT_FAIL_ENTRY_NO_VSFILE (1ULL << 0)
27
26/* for KVM_GET_REGS and KVM_SET_REGS */28/* for KVM_GET_REGS and KVM_SET_REGS */
27struct kvm_regs {29struct kvm_regs {
28};30};
...@@ -56,6 +58,7 @@ struct kvm_riscv_config {...@@ -56,6 +58,7 @@ struct kvm_riscv_config {
56 unsigned long mimpid;58 unsigned long mimpid;
57 unsigned long zicboz_block_size;59 unsigned long zicboz_block_size;
58 unsigned long satp_mode;60 unsigned long satp_mode;
61 unsigned long zicbop_block_size;
59};62};
6063
61/* CORE registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */64/* CORE registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
...@@ -185,6 +188,10 @@ enum KVM_RISCV_ISA_EXT_ID {...@@ -185,6 +188,10 @@ enum KVM_RISCV_ISA_EXT_ID {
185 KVM_RISCV_ISA_EXT_ZICCRSE,188 KVM_RISCV_ISA_EXT_ZICCRSE,
186 KVM_RISCV_ISA_EXT_ZAAMO,189 KVM_RISCV_ISA_EXT_ZAAMO,
187 KVM_RISCV_ISA_EXT_ZALRSC,190 KVM_RISCV_ISA_EXT_ZALRSC,
191 KVM_RISCV_ISA_EXT_ZICBOP,
192 KVM_RISCV_ISA_EXT_ZFBFMIN,
193 KVM_RISCV_ISA_EXT_ZVFBFMIN,
194 KVM_RISCV_ISA_EXT_ZVFBFWMA,
188 KVM_RISCV_ISA_EXT_MAX,195 KVM_RISCV_ISA_EXT_MAX,
189};196};
190197
...@@ -205,6 +212,8 @@ enum KVM_RISCV_SBI_EXT_ID {...@@ -205,6 +212,8 @@ enum KVM_RISCV_SBI_EXT_ID {
205 KVM_RISCV_SBI_EXT_DBCN,212 KVM_RISCV_SBI_EXT_DBCN,
206 KVM_RISCV_SBI_EXT_STA,213 KVM_RISCV_SBI_EXT_STA,
207 KVM_RISCV_SBI_EXT_SUSP,214 KVM_RISCV_SBI_EXT_SUSP,
215 KVM_RISCV_SBI_EXT_FWFT,
216 KVM_RISCV_SBI_EXT_MPXY,
208 KVM_RISCV_SBI_EXT_MAX,217 KVM_RISCV_SBI_EXT_MAX,
209};218};
210219
...@@ -214,6 +223,18 @@ struct kvm_riscv_sbi_sta {...@@ -214,6 +223,18 @@ struct kvm_riscv_sbi_sta {
214 unsigned long shmem_hi;223 unsigned long shmem_hi;
215};224};
216225
226struct kvm_riscv_sbi_fwft_feature {
227 unsigned long enable;
228 unsigned long flags;
229 unsigned long value;
230};
231
232/* SBI FWFT extension registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
233struct kvm_riscv_sbi_fwft {
234 struct kvm_riscv_sbi_fwft_feature misaligned_deleg;
235 struct kvm_riscv_sbi_fwft_feature pointer_masking;
236};
237
217/* Possible states for kvm_riscv_timer */238/* Possible states for kvm_riscv_timer */
218#define KVM_RISCV_TIMER_STATE_OFF 0239#define KVM_RISCV_TIMER_STATE_OFF 0
219#define KVM_RISCV_TIMER_STATE_ON 1240#define KVM_RISCV_TIMER_STATE_ON 1
...@@ -297,6 +318,9 @@ struct kvm_riscv_sbi_sta {...@@ -297,6 +318,9 @@ struct kvm_riscv_sbi_sta {
297#define KVM_REG_RISCV_SBI_STA (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)318#define KVM_REG_RISCV_SBI_STA (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)
298#define KVM_REG_RISCV_SBI_STA_REG(name) \319#define KVM_REG_RISCV_SBI_STA_REG(name) \
299 (offsetof(struct kvm_riscv_sbi_sta, name) / sizeof(unsigned long))320 (offsetof(struct kvm_riscv_sbi_sta, name) / sizeof(unsigned long))
321#define KVM_REG_RISCV_SBI_FWFT (0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT)
322#define KVM_REG_RISCV_SBI_FWFT_REG(name) \
323 (offsetof(struct kvm_riscv_sbi_fwft, name) / sizeof(unsigned long))
300324
301/* Device Control API: RISC-V AIA */325/* Device Control API: RISC-V AIA */
302#define KVM_DEV_RISCV_APLIC_ALIGN 0x1000326#define KVM_DEV_RISCV_APLIC_ALIGN 0x1000
lib/libc/include/riscv-linux-any/asm/ptrace.h+2-2
...@@ -6,7 +6,7 @@...@@ -6,7 +6,7 @@
6#ifndef _ASM_RISCV_PTRACE_H6#ifndef _ASM_RISCV_PTRACE_H
7#define _ASM_RISCV_PTRACE_H7#define _ASM_RISCV_PTRACE_H
88
9#ifndef __ASSEMBLY__9#ifndef __ASSEMBLER__
1010
11#include <linux/types.h>11#include <linux/types.h>
1212
...@@ -127,6 +127,6 @@ struct __riscv_v_regset_state {...@@ -127,6 +127,6 @@ struct __riscv_v_regset_state {
127 */127 */
128#define RISCV_MAX_VLENB (8192)128#define RISCV_MAX_VLENB (8192)
129129
130#endif /* __ASSEMBLY__ */130#endif /* __ASSEMBLER__ */
131131
132#endif /* _ASM_RISCV_PTRACE_H */132#endif /* _ASM_RISCV_PTRACE_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/sigcontext.h+2-2
...@@ -15,7 +15,7 @@...@@ -15,7 +15,7 @@
15/* The size of END signal context header. */15/* The size of END signal context header. */
16#define END_HDR_SIZE 0x016#define END_HDR_SIZE 0x0
1717
18#ifndef __ASSEMBLY__18#ifndef __ASSEMBLER__
1919
20struct __sc_riscv_v_state {20struct __sc_riscv_v_state {
21 struct __riscv_v_ext_state v_state;21 struct __riscv_v_ext_state v_state;
...@@ -35,6 +35,6 @@ struct sigcontext {...@@ -35,6 +35,6 @@ struct sigcontext {
35 };35 };
36};36};
3737
38#endif /*!__ASSEMBLY__*/38#endif /*!__ASSEMBLER__*/
3939
40#endif /* _ASM_RISCV_SIGCONTEXT_H */40#endif /* _ASM_RISCV_SIGCONTEXT_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/unistd_32.h+1
...@@ -317,6 +317,7 @@...@@ -317,6 +317,7 @@
317#define __NR_open_tree_attr 467317#define __NR_open_tree_attr 467
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 470
320321
321322
322#endif /* _ASM_UNISTD_32_H */323#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/unistd_64.h+1
...@@ -327,6 +327,7 @@...@@ -327,6 +327,7 @@
327#define __NR_open_tree_attr 467327#define __NR_open_tree_attr 467
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 470
330331
331332
332#endif /* _ASM_UNISTD_64_H */333#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/vendor/mips.h created+3
...@@ -0,0 +1,3 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3#define RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL BIT(0)
\ No newline at end of file
lib/libc/include/s390x-linux-any/asm/bitsperlong.h-4
...@@ -2,11 +2,7 @@...@@ -2,11 +2,7 @@
2#ifndef __ASM_S390_BITSPERLONG_H2#ifndef __ASM_S390_BITSPERLONG_H
3#define __ASM_S390_BITSPERLONG_H3#define __ASM_S390_BITSPERLONG_H
44
5#ifndef __s390x__
6#define __BITS_PER_LONG 32
7#else
8#define __BITS_PER_LONG 645#define __BITS_PER_LONG 64
9#endif
106
11#include <asm-generic/bitsperlong.h>7#include <asm-generic/bitsperlong.h>
128
lib/libc/include/s390x-linux-any/asm/ipcbuf.h-3
...@@ -24,9 +24,6 @@ struct ipc64_perm...@@ -24,9 +24,6 @@ struct ipc64_perm
24 __kernel_mode_t mode;24 __kernel_mode_t mode;
25 unsigned short __pad1;25 unsigned short __pad1;
26 unsigned short seq;26 unsigned short seq;
27#ifndef __s390x__
28 unsigned short __pad2;
29#endif /* ! __s390x__ */
30 unsigned long __unused1;27 unsigned long __unused1;
31 unsigned long __unused2;28 unsigned long __unused2;
32};29};
lib/libc/include/s390x-linux-any/asm/ipl.h+1
...@@ -15,6 +15,7 @@ struct ipl_pl_hdr {...@@ -15,6 +15,7 @@ struct ipl_pl_hdr {
15#define IPL_PL_FLAG_IPLPS 0x8015#define IPL_PL_FLAG_IPLPS 0x80
16#define IPL_PL_FLAG_SIPL 0x4016#define IPL_PL_FLAG_SIPL 0x40
17#define IPL_PL_FLAG_IPLSR 0x2017#define IPL_PL_FLAG_IPLSR 0x20
18#define IPL_PL_FLAG_SBP 0x10
1819
19/* IPL Parameter Block header */20/* IPL Parameter Block header */
20struct ipl_pb_hdr {21struct ipl_pb_hdr {
lib/libc/include/s390x-linux-any/asm/posix_types.h-13
...@@ -21,17 +21,6 @@ typedef unsigned short __kernel_old_dev_t;...@@ -21,17 +21,6 @@ typedef unsigned short __kernel_old_dev_t;
21#define __kernel_old_dev_t __kernel_old_dev_t21#define __kernel_old_dev_t __kernel_old_dev_t
2222
2323
24#ifndef __s390x__
25
26typedef unsigned long __kernel_ino_t;
27typedef unsigned short __kernel_mode_t;
28typedef unsigned short __kernel_ipc_pid_t;
29typedef unsigned short __kernel_uid_t;
30typedef unsigned short __kernel_gid_t;
31typedef int __kernel_ptrdiff_t;
32
33#else /* __s390x__ */
34
35typedef unsigned int __kernel_ino_t;24typedef unsigned int __kernel_ino_t;
36typedef unsigned int __kernel_mode_t;25typedef unsigned int __kernel_mode_t;
37typedef int __kernel_ipc_pid_t;26typedef int __kernel_ipc_pid_t;
...@@ -40,8 +29,6 @@ typedef unsigned int __kernel_gid_t;...@@ -40,8 +29,6 @@ typedef unsigned int __kernel_gid_t;
40typedef long __kernel_ptrdiff_t;29typedef long __kernel_ptrdiff_t;
41typedef unsigned long __kernel_sigset_t; /* at least 32 bits */30typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
4231
43#endif /* __s390x__ */
44
45#define __kernel_ino_t __kernel_ino_t32#define __kernel_ino_t __kernel_ino_t
46#define __kernel_mode_t __kernel_mode_t33#define __kernel_mode_t __kernel_mode_t
47#define __kernel_ipc_pid_t __kernel_ipc_pid_t34#define __kernel_ipc_pid_t __kernel_ipc_pid_t
lib/libc/include/s390x-linux-any/asm/ptrace.h-124
...@@ -14,94 +14,6 @@...@@ -14,94 +14,6 @@
14 * Offsets in the user_regs_struct. They are used for the ptrace14 * Offsets in the user_regs_struct. They are used for the ptrace
15 * system call and in entry.S15 * system call and in entry.S
16 */16 */
17#ifndef __s390x__
18
19#define PT_PSWMASK 0x00
20#define PT_PSWADDR 0x04
21#define PT_GPR0 0x08
22#define PT_GPR1 0x0C
23#define PT_GPR2 0x10
24#define PT_GPR3 0x14
25#define PT_GPR4 0x18
26#define PT_GPR5 0x1C
27#define PT_GPR6 0x20
28#define PT_GPR7 0x24
29#define PT_GPR8 0x28
30#define PT_GPR9 0x2C
31#define PT_GPR10 0x30
32#define PT_GPR11 0x34
33#define PT_GPR12 0x38
34#define PT_GPR13 0x3C
35#define PT_GPR14 0x40
36#define PT_GPR15 0x44
37#define PT_ACR0 0x48
38#define PT_ACR1 0x4C
39#define PT_ACR2 0x50
40#define PT_ACR3 0x54
41#define PT_ACR4 0x58
42#define PT_ACR5 0x5C
43#define PT_ACR6 0x60
44#define PT_ACR7 0x64
45#define PT_ACR8 0x68
46#define PT_ACR9 0x6C
47#define PT_ACR10 0x70
48#define PT_ACR11 0x74
49#define PT_ACR12 0x78
50#define PT_ACR13 0x7C
51#define PT_ACR14 0x80
52#define PT_ACR15 0x84
53#define PT_ORIGGPR2 0x88
54#define PT_FPC 0x90
55/*
56 * A nasty fact of life that the ptrace api
57 * only supports passing of longs.
58 */
59#define PT_FPR0_HI 0x98
60#define PT_FPR0_LO 0x9C
61#define PT_FPR1_HI 0xA0
62#define PT_FPR1_LO 0xA4
63#define PT_FPR2_HI 0xA8
64#define PT_FPR2_LO 0xAC
65#define PT_FPR3_HI 0xB0
66#define PT_FPR3_LO 0xB4
67#define PT_FPR4_HI 0xB8
68#define PT_FPR4_LO 0xBC
69#define PT_FPR5_HI 0xC0
70#define PT_FPR5_LO 0xC4
71#define PT_FPR6_HI 0xC8
72#define PT_FPR6_LO 0xCC
73#define PT_FPR7_HI 0xD0
74#define PT_FPR7_LO 0xD4
75#define PT_FPR8_HI 0xD8
76#define PT_FPR8_LO 0XDC
77#define PT_FPR9_HI 0xE0
78#define PT_FPR9_LO 0xE4
79#define PT_FPR10_HI 0xE8
80#define PT_FPR10_LO 0xEC
81#define PT_FPR11_HI 0xF0
82#define PT_FPR11_LO 0xF4
83#define PT_FPR12_HI 0xF8
84#define PT_FPR12_LO 0xFC
85#define PT_FPR13_HI 0x100
86#define PT_FPR13_LO 0x104
87#define PT_FPR14_HI 0x108
88#define PT_FPR14_LO 0x10C
89#define PT_FPR15_HI 0x110
90#define PT_FPR15_LO 0x114
91#define PT_CR_9 0x118
92#define PT_CR_10 0x11C
93#define PT_CR_11 0x120
94#define PT_IEEE_IP 0x13C
95#define PT_LASTOFF PT_IEEE_IP
96#define PT_ENDREGS 0x140-1
97
98#define GPR_SIZE 4
99#define CR_SIZE 4
100
101#define STACK_FRAME_OVERHEAD 96 /* size of minimum stack frame */
102
103#else /* __s390x__ */
104
105#define PT_PSWMASK 0x0017#define PT_PSWMASK 0x00
106#define PT_PSWADDR 0x0818#define PT_PSWADDR 0x08
107#define PT_GPR0 0x1019#define PT_GPR0 0x10
...@@ -166,38 +78,6 @@...@@ -166,38 +78,6 @@
16678
167#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */79#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
16880
169#endif /* __s390x__ */
170
171#ifndef __s390x__
172
173#define PSW_MASK_PER _AC(0x40000000, UL)
174#define PSW_MASK_DAT _AC(0x04000000, UL)
175#define PSW_MASK_IO _AC(0x02000000, UL)
176#define PSW_MASK_EXT _AC(0x01000000, UL)
177#define PSW_MASK_KEY _AC(0x00F00000, UL)
178#define PSW_MASK_BASE _AC(0x00080000, UL) /* always one */
179#define PSW_MASK_MCHECK _AC(0x00040000, UL)
180#define PSW_MASK_WAIT _AC(0x00020000, UL)
181#define PSW_MASK_PSTATE _AC(0x00010000, UL)
182#define PSW_MASK_ASC _AC(0x0000C000, UL)
183#define PSW_MASK_CC _AC(0x00003000, UL)
184#define PSW_MASK_PM _AC(0x00000F00, UL)
185#define PSW_MASK_RI _AC(0x00000000, UL)
186#define PSW_MASK_EA _AC(0x00000000, UL)
187#define PSW_MASK_BA _AC(0x00000000, UL)
188
189#define PSW_MASK_USER _AC(0x0000FF00, UL)
190
191#define PSW_ADDR_AMODE _AC(0x80000000, UL)
192#define PSW_ADDR_INSN _AC(0x7FFFFFFF, UL)
193
194#define PSW_ASC_PRIMARY _AC(0x00000000, UL)
195#define PSW_ASC_ACCREG _AC(0x00004000, UL)
196#define PSW_ASC_SECONDARY _AC(0x00008000, UL)
197#define PSW_ASC_HOME _AC(0x0000C000, UL)
198
199#else /* __s390x__ */
200
201#define PSW_MASK_PER _AC(0x4000000000000000, UL)81#define PSW_MASK_PER _AC(0x4000000000000000, UL)
202#define PSW_MASK_DAT _AC(0x0400000000000000, UL)82#define PSW_MASK_DAT _AC(0x0400000000000000, UL)
203#define PSW_MASK_IO _AC(0x0200000000000000, UL)83#define PSW_MASK_IO _AC(0x0200000000000000, UL)
...@@ -224,8 +104,6 @@...@@ -224,8 +104,6 @@
224#define PSW_ASC_SECONDARY _AC(0x0000800000000000, UL)104#define PSW_ASC_SECONDARY _AC(0x0000800000000000, UL)
225#define PSW_ASC_HOME _AC(0x0000C00000000000, UL)105#define PSW_ASC_HOME _AC(0x0000C00000000000, UL)
226106
227#endif /* __s390x__ */
228
229#define NUM_GPRS 16107#define NUM_GPRS 16
230#define NUM_FPRS 16108#define NUM_FPRS 16
231#define NUM_CRS 16109#define NUM_CRS 16
...@@ -308,9 +186,7 @@ typedef struct {...@@ -308,9 +186,7 @@ typedef struct {
308#define PER_EM_MASK 0xE8000000UL186#define PER_EM_MASK 0xE8000000UL
309187
310typedef struct {188typedef struct {
311#ifdef __s390x__
312 unsigned : 32;189 unsigned : 32;
313#endif /* __s390x__ */
314 unsigned em_branching : 1;190 unsigned em_branching : 1;
315 unsigned em_instruction_fetch : 1;191 unsigned em_instruction_fetch : 1;
316 /*192 /*
lib/libc/include/s390x-linux-any/asm/sigcontext.h-15
...@@ -17,24 +17,12 @@...@@ -17,24 +17,12 @@
17#define __NUM_VXRS_LOW 1617#define __NUM_VXRS_LOW 16
18#define __NUM_VXRS_HIGH 1618#define __NUM_VXRS_HIGH 16
1919
20#ifndef __s390x__
21
22/* Has to be at least _NSIG_WORDS from asm/signal.h */
23#define _SIGCONTEXT_NSIG 64
24#define _SIGCONTEXT_NSIG_BPW 32
25/* Size of stack frame allocated when calling signal handler. */
26#define __SIGNAL_FRAMESIZE 96
27
28#else /* __s390x__ */
29
30/* Has to be at least _NSIG_WORDS from asm/signal.h */20/* Has to be at least _NSIG_WORDS from asm/signal.h */
31#define _SIGCONTEXT_NSIG 6421#define _SIGCONTEXT_NSIG 64
32#define _SIGCONTEXT_NSIG_BPW 64 22#define _SIGCONTEXT_NSIG_BPW 64
33/* Size of stack frame allocated when calling signal handler. */23/* Size of stack frame allocated when calling signal handler. */
34#define __SIGNAL_FRAMESIZE 16024#define __SIGNAL_FRAMESIZE 160
3525
36#endif /* __s390x__ */
37
38#define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)26#define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
39#define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)27#define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
4028
...@@ -66,9 +54,6 @@ typedef struct...@@ -66,9 +54,6 @@ typedef struct
6654
67typedef struct55typedef struct
68{56{
69#ifndef __s390x__
70 unsigned long gprs_high[__NUM_GPRS];
71#endif
72 unsigned long long vxrs_low[__NUM_VXRS_LOW];57 unsigned long long vxrs_low[__NUM_VXRS_LOW];
73 __vector128 vxrs_high[__NUM_VXRS_HIGH];58 __vector128 vxrs_high[__NUM_VXRS_HIGH];
74 unsigned char __reserved[128];59 unsigned char __reserved[128];
lib/libc/include/s390x-linux-any/asm/stat.h-70
...@@ -8,74 +8,6 @@...@@ -8,74 +8,6 @@
8#ifndef _S390_STAT_H8#ifndef _S390_STAT_H
9#define _S390_STAT_H9#define _S390_STAT_H
1010
11#ifndef __s390x__
12struct __old_kernel_stat {
13 unsigned short st_dev;
14 unsigned short st_ino;
15 unsigned short st_mode;
16 unsigned short st_nlink;
17 unsigned short st_uid;
18 unsigned short st_gid;
19 unsigned short st_rdev;
20 unsigned long st_size;
21 unsigned long st_atime;
22 unsigned long st_mtime;
23 unsigned long st_ctime;
24};
25
26struct stat {
27 unsigned short st_dev;
28 unsigned short __pad1;
29 unsigned long st_ino;
30 unsigned short st_mode;
31 unsigned short st_nlink;
32 unsigned short st_uid;
33 unsigned short st_gid;
34 unsigned short st_rdev;
35 unsigned short __pad2;
36 unsigned long st_size;
37 unsigned long st_blksize;
38 unsigned long st_blocks;
39 unsigned long st_atime;
40 unsigned long st_atime_nsec;
41 unsigned long st_mtime;
42 unsigned long st_mtime_nsec;
43 unsigned long st_ctime;
44 unsigned long st_ctime_nsec;
45 unsigned long __unused4;
46 unsigned long __unused5;
47};
48
49/* This matches struct stat64 in glibc2.1, hence the absolutely
50 * insane amounts of padding around dev_t's.
51 */
52struct stat64 {
53 unsigned long long st_dev;
54 unsigned int __pad1;
55#define STAT64_HAS_BROKEN_ST_INO 1
56 unsigned long __st_ino;
57 unsigned int st_mode;
58 unsigned int st_nlink;
59 unsigned long st_uid;
60 unsigned long st_gid;
61 unsigned long long st_rdev;
62 unsigned int __pad3;
63 long long st_size;
64 unsigned long st_blksize;
65 unsigned char __pad4[4];
66 unsigned long __pad5; /* future possible st_blocks high bits */
67 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
68 unsigned long st_atime;
69 unsigned long st_atime_nsec;
70 unsigned long st_mtime;
71 unsigned long st_mtime_nsec;
72 unsigned long st_ctime;
73 unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */
74 unsigned long long st_ino;
75};
76
77#else /* __s390x__ */
78
79struct stat {11struct stat {
80 unsigned long st_dev;12 unsigned long st_dev;
81 unsigned long st_ino;13 unsigned long st_ino;
...@@ -97,8 +29,6 @@ struct stat {...@@ -97,8 +29,6 @@ struct stat {
97 unsigned long __unused[3];29 unsigned long __unused[3];
98};30};
9931
100#endif /* __s390x__ */
101
102#define STAT_HAVE_NSEC 132#define STAT_HAVE_NSEC 1
10333
104#endif34#endif
\ No newline at end of file
lib/libc/include/s390x-linux-any/asm/unistd.h-4
...@@ -8,10 +8,6 @@...@@ -8,10 +8,6 @@
8#ifndef _ASM_S390_UNISTD_H_8#ifndef _ASM_S390_UNISTD_H_
9#define _ASM_S390_UNISTD_H_9#define _ASM_S390_UNISTD_H_
1010
11#ifdef __s390x__
12#include <asm/unistd_64.h>11#include <asm/unistd_64.h>
13#else
14#include <asm/unistd_32.h>
15#endif
1612
17#endif /* _ASM_S390_UNISTD_H_ */13#endif /* _ASM_S390_UNISTD_H_ */
\ No newline at end of file
lib/libc/include/s390x-linux-any/asm/unistd_32.h deleted-446
...@@ -1,446 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _ASM_S390_UNISTD_32_H
3#define _ASM_S390_UNISTD_32_H
4
5#define __NR_exit 1
6#define __NR_fork 2
7#define __NR_read 3
8#define __NR_write 4
9#define __NR_open 5
10#define __NR_close 6
11#define __NR_restart_syscall 7
12#define __NR_creat 8
13#define __NR_link 9
14#define __NR_unlink 10
15#define __NR_execve 11
16#define __NR_chdir 12
17#define __NR_time 13
18#define __NR_mknod 14
19#define __NR_chmod 15
20#define __NR_lchown 16
21#define __NR_lseek 19
22#define __NR_getpid 20
23#define __NR_mount 21
24#define __NR_umount 22
25#define __NR_setuid 23
26#define __NR_getuid 24
27#define __NR_stime 25
28#define __NR_ptrace 26
29#define __NR_alarm 27
30#define __NR_pause 29
31#define __NR_utime 30
32#define __NR_access 33
33#define __NR_nice 34
34#define __NR_sync 36
35#define __NR_kill 37
36#define __NR_rename 38
37#define __NR_mkdir 39
38#define __NR_rmdir 40
39#define __NR_dup 41
40#define __NR_pipe 42
41#define __NR_times 43
42#define __NR_brk 45
43#define __NR_setgid 46
44#define __NR_getgid 47
45#define __NR_signal 48
46#define __NR_geteuid 49
47#define __NR_getegid 50
48#define __NR_acct 51
49#define __NR_umount2 52
50#define __NR_ioctl 54
51#define __NR_fcntl 55
52#define __NR_setpgid 57
53#define __NR_umask 60
54#define __NR_chroot 61
55#define __NR_ustat 62
56#define __NR_dup2 63
57#define __NR_getppid 64
58#define __NR_getpgrp 65
59#define __NR_setsid 66
60#define __NR_sigaction 67
61#define __NR_setreuid 70
62#define __NR_setregid 71
63#define __NR_sigsuspend 72
64#define __NR_sigpending 73
65#define __NR_sethostname 74
66#define __NR_setrlimit 75
67#define __NR_getrlimit 76
68#define __NR_getrusage 77
69#define __NR_gettimeofday 78
70#define __NR_settimeofday 79
71#define __NR_getgroups 80
72#define __NR_setgroups 81
73#define __NR_symlink 83
74#define __NR_readlink 85
75#define __NR_uselib 86
76#define __NR_swapon 87
77#define __NR_reboot 88
78#define __NR_readdir 89
79#define __NR_mmap 90
80#define __NR_munmap 91
81#define __NR_truncate 92
82#define __NR_ftruncate 93
83#define __NR_fchmod 94
84#define __NR_fchown 95
85#define __NR_getpriority 96
86#define __NR_setpriority 97
87#define __NR_statfs 99
88#define __NR_fstatfs 100
89#define __NR_ioperm 101
90#define __NR_socketcall 102
91#define __NR_syslog 103
92#define __NR_setitimer 104
93#define __NR_getitimer 105
94#define __NR_stat 106
95#define __NR_lstat 107
96#define __NR_fstat 108
97#define __NR_lookup_dcookie 110
98#define __NR_vhangup 111
99#define __NR_idle 112
100#define __NR_wait4 114
101#define __NR_swapoff 115
102#define __NR_sysinfo 116
103#define __NR_ipc 117
104#define __NR_fsync 118
105#define __NR_sigreturn 119
106#define __NR_clone 120
107#define __NR_setdomainname 121
108#define __NR_uname 122
109#define __NR_adjtimex 124
110#define __NR_mprotect 125
111#define __NR_sigprocmask 126
112#define __NR_create_module 127
113#define __NR_init_module 128
114#define __NR_delete_module 129
115#define __NR_get_kernel_syms 130
116#define __NR_quotactl 131
117#define __NR_getpgid 132
118#define __NR_fchdir 133
119#define __NR_bdflush 134
120#define __NR_sysfs 135
121#define __NR_personality 136
122#define __NR_afs_syscall 137
123#define __NR_setfsuid 138
124#define __NR_setfsgid 139
125#define __NR__llseek 140
126#define __NR_getdents 141
127#define __NR__newselect 142
128#define __NR_flock 143
129#define __NR_msync 144
130#define __NR_readv 145
131#define __NR_writev 146
132#define __NR_getsid 147
133#define __NR_fdatasync 148
134#define __NR__sysctl 149
135#define __NR_mlock 150
136#define __NR_munlock 151
137#define __NR_mlockall 152
138#define __NR_munlockall 153
139#define __NR_sched_setparam 154
140#define __NR_sched_getparam 155
141#define __NR_sched_setscheduler 156
142#define __NR_sched_getscheduler 157
143#define __NR_sched_yield 158
144#define __NR_sched_get_priority_max 159
145#define __NR_sched_get_priority_min 160
146#define __NR_sched_rr_get_interval 161
147#define __NR_nanosleep 162
148#define __NR_mremap 163
149#define __NR_setresuid 164
150#define __NR_getresuid 165
151#define __NR_query_module 167
152#define __NR_poll 168
153#define __NR_nfsservctl 169
154#define __NR_setresgid 170
155#define __NR_getresgid 171
156#define __NR_prctl 172
157#define __NR_rt_sigreturn 173
158#define __NR_rt_sigaction 174
159#define __NR_rt_sigprocmask 175
160#define __NR_rt_sigpending 176
161#define __NR_rt_sigtimedwait 177
162#define __NR_rt_sigqueueinfo 178
163#define __NR_rt_sigsuspend 179
164#define __NR_pread64 180
165#define __NR_pwrite64 181
166#define __NR_chown 182
167#define __NR_getcwd 183
168#define __NR_capget 184
169#define __NR_capset 185
170#define __NR_sigaltstack 186
171#define __NR_sendfile 187
172#define __NR_getpmsg 188
173#define __NR_putpmsg 189
174#define __NR_vfork 190
175#define __NR_ugetrlimit 191
176#define __NR_mmap2 192
177#define __NR_truncate64 193
178#define __NR_ftruncate64 194
179#define __NR_stat64 195
180#define __NR_lstat64 196
181#define __NR_fstat64 197
182#define __NR_lchown32 198
183#define __NR_getuid32 199
184#define __NR_getgid32 200
185#define __NR_geteuid32 201
186#define __NR_getegid32 202
187#define __NR_setreuid32 203
188#define __NR_setregid32 204
189#define __NR_getgroups32 205
190#define __NR_setgroups32 206
191#define __NR_fchown32 207
192#define __NR_setresuid32 208
193#define __NR_getresuid32 209
194#define __NR_setresgid32 210
195#define __NR_getresgid32 211
196#define __NR_chown32 212
197#define __NR_setuid32 213
198#define __NR_setgid32 214
199#define __NR_setfsuid32 215
200#define __NR_setfsgid32 216
201#define __NR_pivot_root 217
202#define __NR_mincore 218
203#define __NR_madvise 219
204#define __NR_getdents64 220
205#define __NR_fcntl64 221
206#define __NR_readahead 222
207#define __NR_sendfile64 223
208#define __NR_setxattr 224
209#define __NR_lsetxattr 225
210#define __NR_fsetxattr 226
211#define __NR_getxattr 227
212#define __NR_lgetxattr 228
213#define __NR_fgetxattr 229
214#define __NR_listxattr 230
215#define __NR_llistxattr 231
216#define __NR_flistxattr 232
217#define __NR_removexattr 233
218#define __NR_lremovexattr 234
219#define __NR_fremovexattr 235
220#define __NR_gettid 236
221#define __NR_tkill 237
222#define __NR_futex 238
223#define __NR_sched_setaffinity 239
224#define __NR_sched_getaffinity 240
225#define __NR_tgkill 241
226#define __NR_io_setup 243
227#define __NR_io_destroy 244
228#define __NR_io_getevents 245
229#define __NR_io_submit 246
230#define __NR_io_cancel 247
231#define __NR_exit_group 248
232#define __NR_epoll_create 249
233#define __NR_epoll_ctl 250
234#define __NR_epoll_wait 251
235#define __NR_set_tid_address 252
236#define __NR_fadvise64 253
237#define __NR_timer_create 254
238#define __NR_timer_settime 255
239#define __NR_timer_gettime 256
240#define __NR_timer_getoverrun 257
241#define __NR_timer_delete 258
242#define __NR_clock_settime 259
243#define __NR_clock_gettime 260
244#define __NR_clock_getres 261
245#define __NR_clock_nanosleep 262
246#define __NR_fadvise64_64 264
247#define __NR_statfs64 265
248#define __NR_fstatfs64 266
249#define __NR_remap_file_pages 267
250#define __NR_mbind 268
251#define __NR_get_mempolicy 269
252#define __NR_set_mempolicy 270
253#define __NR_mq_open 271
254#define __NR_mq_unlink 272
255#define __NR_mq_timedsend 273
256#define __NR_mq_timedreceive 274
257#define __NR_mq_notify 275
258#define __NR_mq_getsetattr 276
259#define __NR_kexec_load 277
260#define __NR_add_key 278
261#define __NR_request_key 279
262#define __NR_keyctl 280
263#define __NR_waitid 281
264#define __NR_ioprio_set 282
265#define __NR_ioprio_get 283
266#define __NR_inotify_init 284
267#define __NR_inotify_add_watch 285
268#define __NR_inotify_rm_watch 286
269#define __NR_migrate_pages 287
270#define __NR_openat 288
271#define __NR_mkdirat 289
272#define __NR_mknodat 290
273#define __NR_fchownat 291
274#define __NR_futimesat 292
275#define __NR_fstatat64 293
276#define __NR_unlinkat 294
277#define __NR_renameat 295
278#define __NR_linkat 296
279#define __NR_symlinkat 297
280#define __NR_readlinkat 298
281#define __NR_fchmodat 299
282#define __NR_faccessat 300
283#define __NR_pselect6 301
284#define __NR_ppoll 302
285#define __NR_unshare 303
286#define __NR_set_robust_list 304
287#define __NR_get_robust_list 305
288#define __NR_splice 306
289#define __NR_sync_file_range 307
290#define __NR_tee 308
291#define __NR_vmsplice 309
292#define __NR_move_pages 310
293#define __NR_getcpu 311
294#define __NR_epoll_pwait 312
295#define __NR_utimes 313
296#define __NR_fallocate 314
297#define __NR_utimensat 315
298#define __NR_signalfd 316
299#define __NR_timerfd 317
300#define __NR_eventfd 318
301#define __NR_timerfd_create 319
302#define __NR_timerfd_settime 320
303#define __NR_timerfd_gettime 321
304#define __NR_signalfd4 322
305#define __NR_eventfd2 323
306#define __NR_inotify_init1 324
307#define __NR_pipe2 325
308#define __NR_dup3 326
309#define __NR_epoll_create1 327
310#define __NR_preadv 328
311#define __NR_pwritev 329
312#define __NR_rt_tgsigqueueinfo 330
313#define __NR_perf_event_open 331
314#define __NR_fanotify_init 332
315#define __NR_fanotify_mark 333
316#define __NR_prlimit64 334
317#define __NR_name_to_handle_at 335
318#define __NR_open_by_handle_at 336
319#define __NR_clock_adjtime 337
320#define __NR_syncfs 338
321#define __NR_setns 339
322#define __NR_process_vm_readv 340
323#define __NR_process_vm_writev 341
324#define __NR_s390_runtime_instr 342
325#define __NR_kcmp 343
326#define __NR_finit_module 344
327#define __NR_sched_setattr 345
328#define __NR_sched_getattr 346
329#define __NR_renameat2 347
330#define __NR_seccomp 348
331#define __NR_getrandom 349
332#define __NR_memfd_create 350
333#define __NR_bpf 351
334#define __NR_s390_pci_mmio_write 352
335#define __NR_s390_pci_mmio_read 353
336#define __NR_execveat 354
337#define __NR_userfaultfd 355
338#define __NR_membarrier 356
339#define __NR_recvmmsg 357
340#define __NR_sendmmsg 358
341#define __NR_socket 359
342#define __NR_socketpair 360
343#define __NR_bind 361
344#define __NR_connect 362
345#define __NR_listen 363
346#define __NR_accept4 364
347#define __NR_getsockopt 365
348#define __NR_setsockopt 366
349#define __NR_getsockname 367
350#define __NR_getpeername 368
351#define __NR_sendto 369
352#define __NR_sendmsg 370
353#define __NR_recvfrom 371
354#define __NR_recvmsg 372
355#define __NR_shutdown 373
356#define __NR_mlock2 374
357#define __NR_copy_file_range 375
358#define __NR_preadv2 376
359#define __NR_pwritev2 377
360#define __NR_s390_guarded_storage 378
361#define __NR_statx 379
362#define __NR_s390_sthyi 380
363#define __NR_kexec_file_load 381
364#define __NR_io_pgetevents 382
365#define __NR_rseq 383
366#define __NR_pkey_mprotect 384
367#define __NR_pkey_alloc 385
368#define __NR_pkey_free 386
369#define __NR_semget 393
370#define __NR_semctl 394
371#define __NR_shmget 395
372#define __NR_shmctl 396
373#define __NR_shmat 397
374#define __NR_shmdt 398
375#define __NR_msgget 399
376#define __NR_msgsnd 400
377#define __NR_msgrcv 401
378#define __NR_msgctl 402
379#define __NR_clock_gettime64 403
380#define __NR_clock_settime64 404
381#define __NR_clock_adjtime64 405
382#define __NR_clock_getres_time64 406
383#define __NR_clock_nanosleep_time64 407
384#define __NR_timer_gettime64 408
385#define __NR_timer_settime64 409
386#define __NR_timerfd_gettime64 410
387#define __NR_timerfd_settime64 411
388#define __NR_utimensat_time64 412
389#define __NR_pselect6_time64 413
390#define __NR_ppoll_time64 414
391#define __NR_io_pgetevents_time64 416
392#define __NR_recvmmsg_time64 417
393#define __NR_mq_timedsend_time64 418
394#define __NR_mq_timedreceive_time64 419
395#define __NR_semtimedop_time64 420
396#define __NR_rt_sigtimedwait_time64 421
397#define __NR_futex_time64 422
398#define __NR_sched_rr_get_interval_time64 423
399#define __NR_pidfd_send_signal 424
400#define __NR_io_uring_setup 425
401#define __NR_io_uring_enter 426
402#define __NR_io_uring_register 427
403#define __NR_open_tree 428
404#define __NR_move_mount 429
405#define __NR_fsopen 430
406#define __NR_fsconfig 431
407#define __NR_fsmount 432
408#define __NR_fspick 433
409#define __NR_pidfd_open 434
410#define __NR_clone3 435
411#define __NR_close_range 436
412#define __NR_openat2 437
413#define __NR_pidfd_getfd 438
414#define __NR_faccessat2 439
415#define __NR_process_madvise 440
416#define __NR_epoll_pwait2 441
417#define __NR_mount_setattr 442
418#define __NR_quotactl_fd 443
419#define __NR_landlock_create_ruleset 444
420#define __NR_landlock_add_rule 445
421#define __NR_landlock_restrict_self 446
422#define __NR_memfd_secret 447
423#define __NR_process_mrelease 448
424#define __NR_futex_waitv 449
425#define __NR_set_mempolicy_home_node 450
426#define __NR_cachestat 451
427#define __NR_fchmodat2 452
428#define __NR_map_shadow_stack 453
429#define __NR_futex_wake 454
430#define __NR_futex_wait 455
431#define __NR_futex_requeue 456
432#define __NR_statmount 457
433#define __NR_listmount 458
434#define __NR_lsm_get_self_attr 459
435#define __NR_lsm_set_self_attr 460
436#define __NR_lsm_list_modules 461
437#define __NR_mseal 462
438#define __NR_setxattrat 463
439#define __NR_getxattrat 464
440#define __NR_listxattrat 465
441#define __NR_removexattrat 466
442#define __NR_open_tree_attr 467
443#define __NR_file_getattr 468
444#define __NR_file_setattr 469
445
446#endif /* _ASM_S390_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/s390x-linux-any/asm/unistd_64.h+5-4
...@@ -1,6 +1,5 @@...@@ -1,6 +1,5 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _ASM_UNISTD_64_H
2#ifndef _ASM_S390_UNISTD_64_H2#define _ASM_UNISTD_64_H
3#define _ASM_S390_UNISTD_64_H
43
5#define __NR_exit 14#define __NR_exit 1
6#define __NR_fork 25#define __NR_fork 2
...@@ -390,5 +389,7 @@...@@ -390,5 +389,7 @@
390#define __NR_open_tree_attr 467389#define __NR_open_tree_attr 467
391#define __NR_file_getattr 468390#define __NR_file_getattr 468
392#define __NR_file_setattr 469391#define __NR_file_setattr 469
392#define __NR_listns 470
393393
394#endif /* _ASM_S390_UNISTD_64_H */
\ No newline at end of file
394
395#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/ptrace.h+12-12
...@@ -15,7 +15,7 @@...@@ -15,7 +15,7 @@
15 */15 */
16#define PT_REGS_MAGIC 0x57ac6c0016#define PT_REGS_MAGIC 0x57ac6c00
1717
18#ifndef __ASSEMBLY__18#ifndef __ASSEMBLER__
1919
20#include <linux/types.h>20#include <linux/types.h>
2121
...@@ -88,7 +88,7 @@ struct sparc_trapf {...@@ -88,7 +88,7 @@ struct sparc_trapf {
88 unsigned long _unused;88 unsigned long _unused;
89 struct pt_regs *regs;89 struct pt_regs *regs;
90};90};
91#endif /* (!__ASSEMBLY__) */91#endif /* (!__ASSEMBLER__) */
92#else92#else
93/* 32 bit sparc */93/* 32 bit sparc */
9494
...@@ -97,7 +97,7 @@ struct sparc_trapf {...@@ -97,7 +97,7 @@ struct sparc_trapf {
97/* This struct defines the way the registers are stored on the97/* This struct defines the way the registers are stored on the
98 * stack during a system call and basically all traps.98 * stack during a system call and basically all traps.
99 */99 */
100#ifndef __ASSEMBLY__100#ifndef __ASSEMBLER__
101101
102#include <linux/types.h>102#include <linux/types.h>
103103
...@@ -125,11 +125,11 @@ struct sparc_stackf {...@@ -125,11 +125,11 @@ struct sparc_stackf {
125 unsigned long xargs[6];125 unsigned long xargs[6];
126 unsigned long xxargs[1];126 unsigned long xxargs[1];
127};127};
128#endif /* (!__ASSEMBLY__) */128#endif /* (!__ASSEMBLER__) */
129129
130#endif /* (defined(__sparc__) && defined(__arch64__))*/130#endif /* (defined(__sparc__) && defined(__arch64__))*/
131131
132#ifndef __ASSEMBLY__132#ifndef __ASSEMBLER__
133133
134#define TRACEREG_SZ sizeof(struct pt_regs)134#define TRACEREG_SZ sizeof(struct pt_regs)
135#define STACKFRAME_SZ sizeof(struct sparc_stackf)135#define STACKFRAME_SZ sizeof(struct sparc_stackf)
...@@ -137,7 +137,7 @@ struct sparc_stackf {...@@ -137,7 +137,7 @@ struct sparc_stackf {
137#define TRACEREG32_SZ sizeof(struct pt_regs32)137#define TRACEREG32_SZ sizeof(struct pt_regs32)
138#define STACKFRAME32_SZ sizeof(struct sparc_stackf32)138#define STACKFRAME32_SZ sizeof(struct sparc_stackf32)
139139
140#endif /* (!__ASSEMBLY__) */140#endif /* (!__ASSEMBLER__) */
141141
142#define UREG_G0 0142#define UREG_G0 0
143#define UREG_G1 1143#define UREG_G1 1
...@@ -161,30 +161,30 @@ struct sparc_stackf {...@@ -161,30 +161,30 @@ struct sparc_stackf {
161#if defined(__sparc__) && defined(__arch64__)161#if defined(__sparc__) && defined(__arch64__)
162/* 64 bit sparc */162/* 64 bit sparc */
163163
164#ifndef __ASSEMBLY__164#ifndef __ASSEMBLER__
165165
166166
167#else /* __ASSEMBLY__ */167#else /* __ASSEMBLER__ */
168/* For assembly code. */168/* For assembly code. */
169#define TRACEREG_SZ 0xa0169#define TRACEREG_SZ 0xa0
170#define STACKFRAME_SZ 0xc0170#define STACKFRAME_SZ 0xc0
171171
172#define TRACEREG32_SZ 0x50172#define TRACEREG32_SZ 0x50
173#define STACKFRAME32_SZ 0x60173#define STACKFRAME32_SZ 0x60
174#endif /* __ASSEMBLY__ */174#endif /* __ASSEMBLER__ */
175175
176#else /* (defined(__sparc__) && defined(__arch64__)) */176#else /* (defined(__sparc__) && defined(__arch64__)) */
177177
178/* 32 bit sparc */178/* 32 bit sparc */
179179
180#ifndef __ASSEMBLY__180#ifndef __ASSEMBLER__
181181
182182
183#else /* (!__ASSEMBLY__) */183#else /* (!__ASSEMBLER__) */
184/* For assembly code. */184/* For assembly code. */
185#define TRACEREG_SZ 0x50185#define TRACEREG_SZ 0x50
186#define STACKFRAME_SZ 0x60186#define STACKFRAME_SZ 0x60
187#endif /* (!__ASSEMBLY__) */187#endif /* (!__ASSEMBLER__) */
188188
189#endif /* (defined(__sparc__) && defined(__arch64__)) */189#endif /* (defined(__sparc__) && defined(__arch64__)) */
190190
lib/libc/include/sparc-linux-any/asm/signal.h+2-2
...@@ -105,7 +105,7 @@...@@ -105,7 +105,7 @@
105#define __old_sigaction32 sigaction32105#define __old_sigaction32 sigaction32
106#endif106#endif
107107
108#ifndef __ASSEMBLY__108#ifndef __ASSEMBLER__
109109
110typedef unsigned long __old_sigset_t; /* at least 32 bits */110typedef unsigned long __old_sigset_t; /* at least 32 bits */
111111
...@@ -174,6 +174,6 @@ typedef struct sigaltstack {...@@ -174,6 +174,6 @@ typedef struct sigaltstack {
174} stack_t;174} stack_t;
175175
176176
177#endif /* !(__ASSEMBLY__) */177#endif /* !(__ASSEMBLER__) */
178178
179#endif /* __SPARC_SIGNAL_H */179#endif /* __SPARC_SIGNAL_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/traps.h+2-2
...@@ -10,8 +10,8 @@...@@ -10,8 +10,8 @@
1010
11#define NUM_SPARC_TRAPS 25511#define NUM_SPARC_TRAPS 255
1212
13#ifndef __ASSEMBLY__13#ifndef __ASSEMBLER__
14#endif /* !(__ASSEMBLY__) */14#endif /* !(__ASSEMBLER__) */
1515
16/* For patching the trap table at boot time, we need to know how to16/* For patching the trap table at boot time, we need to know how to
17 * form various common Sparc instructions. Thus these macros...17 * form various common Sparc instructions. Thus these macros...
lib/libc/include/sparc-linux-any/asm/unistd_32.h+1
...@@ -439,6 +439,7 @@...@@ -439,6 +439,7 @@
439#define __NR_open_tree_attr 467439#define __NR_open_tree_attr 467
440#define __NR_file_getattr 468440#define __NR_file_getattr 468
441#define __NR_file_setattr 469441#define __NR_file_setattr 469
442#define __NR_listns 470
442443
443444
444#endif /* _ASM_UNISTD_32_H */445#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/unistd_64.h+1
...@@ -402,6 +402,7 @@...@@ -402,6 +402,7 @@
402#define __NR_open_tree_attr 467402#define __NR_open_tree_attr 467
403#define __NR_file_getattr 468403#define __NR_file_getattr 468
404#define __NR_file_setattr 469404#define __NR_file_setattr 469
405#define __NR_listns 470
405406
406407
407#endif /* _ASM_UNISTD_64_H */408#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/utrap.h+2-2
...@@ -44,9 +44,9 @@...@@ -44,9 +44,9 @@
4444
45#define UTH_NOCHANGE (-1)45#define UTH_NOCHANGE (-1)
4646
47#ifndef __ASSEMBLY__47#ifndef __ASSEMBLER__
48typedef int utrap_entry_t;48typedef int utrap_entry_t;
49typedef void *utrap_handler_t;49typedef void *utrap_handler_t;
50#endif /* __ASSEMBLY__ */50#endif /* __ASSEMBLER__ */
5151
52#endif /* !(__ASM_SPARC64_PROCESSOR_H) */52#endif /* !(__ASM_SPARC64_PROCESSOR_H) */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/kvm.h+35
...@@ -35,6 +35,11 @@...@@ -35,6 +35,11 @@
35#define MC_VECTOR 1835#define MC_VECTOR 18
36#define XM_VECTOR 1936#define XM_VECTOR 19
37#define VE_VECTOR 2037#define VE_VECTOR 20
38#define CP_VECTOR 21
39
40#define HV_VECTOR 28
41#define VC_VECTOR 29
42#define SX_VECTOR 30
3843
39/* Select x86 specific features in <linux/kvm.h> */44/* Select x86 specific features in <linux/kvm.h> */
40#define __KVM_HAVE_PIT45#define __KVM_HAVE_PIT
...@@ -409,6 +414,35 @@ struct kvm_xcrs {...@@ -409,6 +414,35 @@ struct kvm_xcrs {
409 __u64 padding[16];414 __u64 padding[16];
410};415};
411416
417#define KVM_X86_REG_TYPE_MSR 2
418#define KVM_X86_REG_TYPE_KVM 3
419
420#define KVM_X86_KVM_REG_SIZE(reg) \
421({ \
422 reg == KVM_REG_GUEST_SSP ? KVM_REG_SIZE_U64 : 0; \
423})
424
425#define KVM_X86_REG_TYPE_SIZE(type, reg) \
426({ \
427 __u64 type_size = (__u64)type << 32; \
428 \
429 type_size |= type == KVM_X86_REG_TYPE_MSR ? KVM_REG_SIZE_U64 : \
430 type == KVM_X86_REG_TYPE_KVM ? KVM_X86_KVM_REG_SIZE(reg) : \
431 0; \
432 type_size; \
433})
434
435#define KVM_X86_REG_ID(type, index) \
436 (KVM_REG_X86 | KVM_X86_REG_TYPE_SIZE(type, index) | index)
437
438#define KVM_X86_REG_MSR(index) \
439 KVM_X86_REG_ID(KVM_X86_REG_TYPE_MSR, index)
440#define KVM_X86_REG_KVM(index) \
441 KVM_X86_REG_ID(KVM_X86_REG_TYPE_KVM, index)
442
443/* KVM-defined registers starting from 0 */
444#define KVM_REG_GUEST_SSP 0
445
412#define KVM_SYNC_X86_REGS (1UL << 0)446#define KVM_SYNC_X86_REGS (1UL << 0)
413#define KVM_SYNC_X86_SREGS (1UL << 1)447#define KVM_SYNC_X86_SREGS (1UL << 1)
414#define KVM_SYNC_X86_EVENTS (1UL << 2)448#define KVM_SYNC_X86_EVENTS (1UL << 2)
...@@ -466,6 +500,7 @@ struct kvm_sync_regs {...@@ -466,6 +500,7 @@ struct kvm_sync_regs {
466/* vendor-specific groups and attributes for system fd */500/* vendor-specific groups and attributes for system fd */
467#define KVM_X86_GRP_SEV 1501#define KVM_X86_GRP_SEV 1
468# define KVM_X86_SEV_VMSA_FEATURES 0502# define KVM_X86_SEV_VMSA_FEATURES 0
503# define KVM_X86_SNP_POLICY_BITS 1
469504
470struct kvm_vmx_nested_state_data {505struct kvm_vmx_nested_state_data {
471 __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];506 __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
lib/libc/include/x86-linux-any/asm/processor-flags.h+2
...@@ -136,6 +136,8 @@...@@ -136,6 +136,8 @@
136#define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT)136#define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT)
137#define X86_CR4_CET_BIT 23 /* enable Control-flow Enforcement Technology */137#define X86_CR4_CET_BIT 23 /* enable Control-flow Enforcement Technology */
138#define X86_CR4_CET _BITUL(X86_CR4_CET_BIT)138#define X86_CR4_CET _BITUL(X86_CR4_CET_BIT)
139#define X86_CR4_LASS_BIT 27 /* enable Linear Address Space Separation support */
140#define X86_CR4_LASS _BITUL(X86_CR4_LASS_BIT)
139#define X86_CR4_LAM_SUP_BIT 28 /* LAM for supervisor pointers */141#define X86_CR4_LAM_SUP_BIT 28 /* LAM for supervisor pointers */
140#define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT)142#define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT)
141143
lib/libc/include/x86-linux-any/asm/sgx.h+8-2
...@@ -10,7 +10,7 @@...@@ -10,7 +10,7 @@
1010
11/**11/**
12 * enum sgx_page_flags - page control flags12 * enum sgx_page_flags - page control flags
13 * %SGX_PAGE_MEASURE: Measure the page contents with a sequence of13 * @SGX_PAGE_MEASURE: Measure the page contents with a sequence of
14 * ENCLS[EEXTEND] operations.14 * ENCLS[EEXTEND] operations.
15 */15 */
16enum sgx_page_flags {16enum sgx_page_flags {
...@@ -143,6 +143,12 @@ struct sgx_enclave_run;...@@ -143,6 +143,12 @@ struct sgx_enclave_run;
143/**143/**
144 * typedef sgx_enclave_user_handler_t - Exit handler function accepted by144 * typedef sgx_enclave_user_handler_t - Exit handler function accepted by
145 * __vdso_sgx_enter_enclave()145 * __vdso_sgx_enter_enclave()
146 * @rdi: RDI at the time of EEXIT, undefined on AEX
147 * @rsi: RSI at the time of EEXIT, undefined on AEX
148 * @rdx: RDX at the time of EEXIT, undefined on AEX
149 * @rsp: RSP (untrusted) at the time of EEXIT or AEX
150 * @r8: R8 at the time of EEXIT, undefined on AEX
151 * @r9: R9 at the time of EEXIT, undefined on AEX
146 * @run: The run instance given by the caller152 * @run: The run instance given by the caller
147 *153 *
148 * The register parameters contain the snapshot of their values at enclave154 * The register parameters contain the snapshot of their values at enclave
...@@ -166,7 +172,7 @@ typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx,...@@ -166,7 +172,7 @@ typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx,
166 * @exception_addr: The address that triggered the exception172 * @exception_addr: The address that triggered the exception
167 * @user_handler: User provided callback run on exception173 * @user_handler: User provided callback run on exception
168 * @user_data: Data passed to the user handler174 * @user_data: Data passed to the user handler
169 * @reserved Reserved for future extensions175 * @reserved: Reserved for future extensions
170 *176 *
171 * If @user_handler is provided, the handler will be invoked on all return paths177 * If @user_handler is provided, the handler will be invoked on all return paths
172 * of the normal flow. The user handler may transfer control, e.g. via a178 * of the normal flow. The user handler may transfer control, e.g. via a
lib/libc/include/x86-linux-any/asm/svm.h+4
...@@ -118,6 +118,10 @@...@@ -118,6 +118,10 @@
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 0x80000018
121#define SVM_VMGEXIT_SAVIC 0x8000001a
122#define SVM_VMGEXIT_SAVIC_REGISTER_GPA 0
123#define SVM_VMGEXIT_SAVIC_UNREGISTER_GPA 1
124#define SVM_VMGEXIT_SAVIC_SELF_GPA ~0ULL
121#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd125#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd
122#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe126#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe
123#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \127#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \
lib/libc/include/x86-linux-any/asm/unistd_32.h+1
...@@ -460,6 +460,7 @@...@@ -460,6 +460,7 @@
460#define __NR_open_tree_attr 467460#define __NR_open_tree_attr 467
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 470
463464
464465
465#endif /* _ASM_UNISTD_32_H */466#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/unistd_64.h+2
...@@ -337,6 +337,7 @@...@@ -337,6 +337,7 @@
337#define __NR_io_pgetevents 333337#define __NR_io_pgetevents 333
338#define __NR_rseq 334338#define __NR_rseq 334
339#define __NR_uretprobe 335339#define __NR_uretprobe 335
340#define __NR_uprobe 336
340#define __NR_pidfd_send_signal 424341#define __NR_pidfd_send_signal 424
341#define __NR_io_uring_setup 425342#define __NR_io_uring_setup 425
342#define __NR_io_uring_enter 426343#define __NR_io_uring_enter 426
...@@ -383,6 +384,7 @@...@@ -383,6 +384,7 @@
383#define __NR_open_tree_attr 467384#define __NR_open_tree_attr 467
384#define __NR_file_getattr 468385#define __NR_file_getattr 468
385#define __NR_file_setattr 469386#define __NR_file_setattr 469
387#define __NR_listns 470
386388
387389
388#endif /* _ASM_UNISTD_64_H */390#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/unistd_x32.h+2
...@@ -290,6 +290,7 @@...@@ -290,6 +290,7 @@
290#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333)290#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333)
291#define __NR_rseq (__X32_SYSCALL_BIT + 334)291#define __NR_rseq (__X32_SYSCALL_BIT + 334)
292#define __NR_uretprobe (__X32_SYSCALL_BIT + 335)292#define __NR_uretprobe (__X32_SYSCALL_BIT + 335)
293#define __NR_uprobe (__X32_SYSCALL_BIT + 336)
293#define __NR_pidfd_send_signal (__X32_SYSCALL_BIT + 424)294#define __NR_pidfd_send_signal (__X32_SYSCALL_BIT + 424)
294#define __NR_io_uring_setup (__X32_SYSCALL_BIT + 425)295#define __NR_io_uring_setup (__X32_SYSCALL_BIT + 425)
295#define __NR_io_uring_enter (__X32_SYSCALL_BIT + 426)296#define __NR_io_uring_enter (__X32_SYSCALL_BIT + 426)
...@@ -336,6 +337,7 @@...@@ -336,6 +337,7 @@
336#define __NR_open_tree_attr (__X32_SYSCALL_BIT + 467)337#define __NR_open_tree_attr (__X32_SYSCALL_BIT + 467)
337#define __NR_file_getattr (__X32_SYSCALL_BIT + 468)338#define __NR_file_getattr (__X32_SYSCALL_BIT + 468)
338#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)
339#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)341#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
340#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)342#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
341#define __NR_ioctl (__X32_SYSCALL_BIT + 514)343#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
lib/libc/include/x86-linux-any/asm/vmx.h+6-1
...@@ -93,7 +93,10 @@...@@ -93,7 +93,10 @@
93#define EXIT_REASON_TPAUSE 6893#define EXIT_REASON_TPAUSE 68
94#define EXIT_REASON_BUS_LOCK 7494#define EXIT_REASON_BUS_LOCK 74
95#define EXIT_REASON_NOTIFY 7595#define EXIT_REASON_NOTIFY 75
96#define EXIT_REASON_SEAMCALL 76
96#define EXIT_REASON_TDCALL 7797#define EXIT_REASON_TDCALL 77
98#define EXIT_REASON_MSR_READ_IMM 84
99#define EXIT_REASON_MSR_WRITE_IMM 85
97100
98#define VMX_EXIT_REASONS \101#define VMX_EXIT_REASONS \
99 { EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \102 { EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \
...@@ -158,7 +161,9 @@...@@ -158,7 +161,9 @@
158 { EXIT_REASON_TPAUSE, "TPAUSE" }, \161 { EXIT_REASON_TPAUSE, "TPAUSE" }, \
159 { EXIT_REASON_BUS_LOCK, "BUS_LOCK" }, \162 { EXIT_REASON_BUS_LOCK, "BUS_LOCK" }, \
160 { EXIT_REASON_NOTIFY, "NOTIFY" }, \163 { EXIT_REASON_NOTIFY, "NOTIFY" }, \
161 { EXIT_REASON_TDCALL, "TDCALL" }164 { EXIT_REASON_TDCALL, "TDCALL" }, \
165 { EXIT_REASON_MSR_READ_IMM, "MSR_READ_IMM" }, \
166 { EXIT_REASON_MSR_WRITE_IMM, "MSR_WRITE_IMM" }
162167
163#define VMX_EXIT_REASON_FLAGS \168#define VMX_EXIT_REASON_FLAGS \
164 { VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" }169 { VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" }
lib/libc/include/xtensa-linux-any/asm/unistd_32.h+1
...@@ -416,6 +416,7 @@...@@ -416,6 +416,7 @@
416#define __NR_open_tree_attr 467416#define __NR_open_tree_attr 467
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 470
419420
420421
421#endif /* _ASM_UNISTD_32_H */422#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file