authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 18:02:46+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 18:02:46+02:00
logb22be11891e828b53280c44c578a3909ddce8b91
tree6ffa9c969ab1f7c2a4fd757d11a7a3cedecf7073
parent705a6b4efb7b19feb7d2ee86f2ac6e56653cb923
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

libc: update Linux headers to 7.3


141 files changed, 3149 insertions(+), 1156 deletions(-)

lib/libc/include/aarch64-linux-any/asm/kvm.h+1
...@@ -106,6 +106,7 @@ struct kvm_regs {...@@ -106,6 +106,7 @@ struct kvm_regs {
106#define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */106#define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */
107#define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */107#define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */
108#define KVM_ARM_VCPU_HAS_EL2_E2H0 8 /* Limit NV support to E2H RES0 */108#define KVM_ARM_VCPU_HAS_EL2_E2H0 8 /* Limit NV support to E2H RES0 */
109#define KVM_ARM_VCPU_PMU_V3_STRICT 9 /* No default PMU creation */
109110
110struct kvm_vcpu_init {111struct kvm_vcpu_init {
111 __u32 target;112 __u32 target;
lib/libc/include/aarch64-linux-any/asm/ptrace.h+6-6
...@@ -93,7 +93,7 @@ struct user_pt_regs {...@@ -93,7 +93,7 @@ struct user_pt_regs {
93};93};
9494
95struct user_fpsimd_state {95struct user_fpsimd_state {
96 __uint128_t vregs[32];96 __u128 vregs[32];
97 __u32 fpsr;97 __u32 fpsr;
98 __u32 fpcr;98 __u32 fpcr;
99 __u32 __reserved[2];99 __u32 __reserved[2];
...@@ -258,14 +258,14 @@ struct user_pac_mask {...@@ -258,14 +258,14 @@ struct user_pac_mask {
258/* pointer authentication keys (NT_ARM_PACA_KEYS, NT_ARM_PACG_KEYS) */258/* pointer authentication keys (NT_ARM_PACA_KEYS, NT_ARM_PACG_KEYS) */
259259
260struct user_pac_address_keys {260struct user_pac_address_keys {
261 __uint128_t apiakey;261 __u128 apiakey;
262 __uint128_t apibkey;262 __u128 apibkey;
263 __uint128_t apdakey;263 __u128 apdakey;
264 __uint128_t apdbkey;264 __u128 apdbkey;
265};265};
266266
267struct user_pac_generic_keys {267struct user_pac_generic_keys {
268 __uint128_t apgakey;268 __u128 apgakey;
269};269};
270270
271/* ZA state (NT_ARM_ZA) */271/* ZA state (NT_ARM_ZA) */
lib/libc/include/aarch64-linux-any/asm/sigcontext.h+3-3
...@@ -78,7 +78,7 @@ struct fpsimd_context {...@@ -78,7 +78,7 @@ struct fpsimd_context {
78 struct _aarch64_ctx head;78 struct _aarch64_ctx head;
79 __u32 fpsr;79 __u32 fpsr;
80 __u32 fpcr;80 __u32 fpcr;
81 __uint128_t vregs[32];81 __u128 vregs[32];
82};82};
8383
84/*84/*
...@@ -266,8 +266,8 @@ struct gcs_context {...@@ -266,8 +266,8 @@ struct gcs_context {
266 * - ---- -----------266 * - ---- -----------
267 * REGS the entire SVE context267 * REGS the entire SVE context
268 *268 *
269 * ZREGS __uint128_t[SVE_NUM_ZREGS][vq] all Z-registers269 * ZREGS __u128[SVE_NUM_ZREGS][vq] all Z-registers
270 * ZREG __uint128_t[vq] individual Z-register Zn270 * ZREG __u128[vq] individual Z-register Zn
271 *271 *
272 * PREGS uint16_t[SVE_NUM_PREGS][vq] all P-registers272 * PREGS uint16_t[SVE_NUM_PREGS][vq] all P-registers
273 * PREG uint16_t[vq] individual P-register Pn273 * PREG uint16_t[vq] individual P-register Pn
lib/libc/include/aarch64-linux-any/asm/unistd_64.h+1
...@@ -328,6 +328,7 @@...@@ -328,6 +328,7 @@
328#define __NR_file_setattr 469328#define __NR_file_setattr 469
329#define __NR_listns 470329#define __NR_listns 470
330#define __NR_rseq_slice_yield 471330#define __NR_rseq_slice_yield 471
331#define __NR_fchroot 472
331332
332333
333#endif /* _ASM_UNISTD_64_H */334#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/int-l64.h+2-2
...@@ -11,7 +11,7 @@...@@ -11,7 +11,7 @@
1111
12#include <asm/bitsperlong.h>12#include <asm/bitsperlong.h>
1313
14#ifndef __ASSEMBLY__14#ifndef __ASSEMBLER__
15/*15/*
16 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the16 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
17 * header files exported to user space17 * header files exported to user space
...@@ -29,7 +29,7 @@ typedef unsigned int __u32;...@@ -29,7 +29,7 @@ typedef unsigned int __u32;
29typedef __signed__ long __s64;29typedef __signed__ long __s64;
30typedef unsigned long __u64;30typedef unsigned long __u64;
3131
32#endif /* __ASSEMBLY__ */32#endif /* __ASSEMBLER__ */
3333
3434
35#endif /* _ASM_GENERIC_INT_L64_H */35#endif /* _ASM_GENERIC_INT_L64_H */
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/int-ll64.h+2-2
...@@ -11,7 +11,7 @@...@@ -11,7 +11,7 @@
1111
12#include <asm/bitsperlong.h>12#include <asm/bitsperlong.h>
1313
14#ifndef __ASSEMBLY__14#ifndef __ASSEMBLER__
15/*15/*
16 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the16 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
17 * header files exported to user space17 * header files exported to user space
...@@ -34,7 +34,7 @@ typedef __signed__ long long __s64;...@@ -34,7 +34,7 @@ typedef __signed__ long long __s64;
34typedef unsigned long long __u64;34typedef unsigned long long __u64;
35#endif35#endif
3636
37#endif /* __ASSEMBLY__ */37#endif /* __ASSEMBLER__ */
3838
3939
40#endif /* _ASM_GENERIC_INT_LL64_H */40#endif /* _ASM_GENERIC_INT_LL64_H */
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/signal-defs.h+1-1
...@@ -78,7 +78,7 @@...@@ -78,7 +78,7 @@
78#define SIG_SETMASK 2 /* for setting the signal mask */78#define SIG_SETMASK 2 /* for setting the signal mask */
79#endif79#endif
8080
81#ifndef __ASSEMBLY__81#ifndef __ASSEMBLER__
82typedef void __signalfn_t(int);82typedef void __signalfn_t(int);
83typedef __signalfn_t *__sighandler_t;83typedef __signalfn_t *__sighandler_t;
8484
lib/libc/include/any-linux-any/asm-generic/signal.h+2-2
...@@ -57,7 +57,7 @@...@@ -57,7 +57,7 @@
57#define SIGSTKSZ 819257#define SIGSTKSZ 8192
58#endif58#endif
5959
60#ifndef __ASSEMBLY__60#ifndef __ASSEMBLER__
61typedef struct {61typedef struct {
62 unsigned long sig[_NSIG_WORDS];62 unsigned long sig[_NSIG_WORDS];
63} sigset_t;63} sigset_t;
...@@ -86,6 +86,6 @@ typedef struct sigaltstack {...@@ -86,6 +86,6 @@ typedef struct sigaltstack {
86 __kernel_size_t ss_size;86 __kernel_size_t ss_size;
87} stack_t;87} stack_t;
8888
89#endif /* __ASSEMBLY__ */89#endif /* __ASSEMBLER__ */
9090
91#endif /* __ASM_GENERIC_SIGNAL_H */91#endif /* __ASM_GENERIC_SIGNAL_H */
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/socket.h+2
...@@ -150,6 +150,8 @@...@@ -150,6 +150,8 @@
150#define SO_INQ 84150#define SO_INQ 84
151#define SCM_INQ SO_INQ151#define SCM_INQ SO_INQ
152152
153#define SO_RIGHTS_NOTRUNC 85
154
153155
154#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))156#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
155/* on 64-bit and x32, avoid the ?: operator */157/* on 64-bit and x32, avoid the ?: operator */
lib/libc/include/any-linux-any/asm-generic/unistd.h+5-1
...@@ -863,8 +863,12 @@ __SYSCALL(__NR_listns, sys_listns)...@@ -863,8 +863,12 @@ __SYSCALL(__NR_listns, sys_listns)
863#define __NR_rseq_slice_yield 471863#define __NR_rseq_slice_yield 471
864__SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield)864__SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield)
865865
866/* fs/open.c */
867#define __NR_fchroot 472
868__SYSCALL(__NR_fchroot, sys_fchroot)
869
866#undef __NR_syscalls870#undef __NR_syscalls
867#define __NR_syscalls 472871#define __NR_syscalls 473
868872
869/*873/*
870 * 32 bit systems traditionally used different874 * 32 bit systems traditionally used different
lib/libc/include/any-linux-any/drm/amdgpu_drm.h+22-1
...@@ -58,6 +58,7 @@ extern "C" {...@@ -58,6 +58,7 @@ extern "C" {
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 0x1960#define DRM_AMDGPU_GEM_LIST_HANDLES 0x19
61#define DRM_AMDGPU_PROC_OPTIONS 0x1A
6162
62#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)63#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
63#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)64#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
...@@ -79,6 +80,7 @@ extern "C" {...@@ -79,6 +80,7 @@ extern "C" {
79#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)80#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)
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_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)82#define DRM_IOCTL_AMDGPU_GEM_LIST_HANDLES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_LIST_HANDLES, struct drm_amdgpu_gem_list_handles)
83#define DRM_IOCTL_AMDGPU_PROC_OPTIONS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_PROC_OPTIONS, struct drm_amdgpu_proc_options)
8284
83/**85/**
84 * DOC: memory domains86 * DOC: memory domains
...@@ -1510,6 +1512,7 @@ struct drm_amdgpu_info_device {...@@ -1510,6 +1512,7 @@ struct drm_amdgpu_info_device {
1510 __u64 high_va_max;1512 __u64 high_va_max;
1511 /* gfx10 pa_sc_tile_steering_override */1513 /* gfx10 pa_sc_tile_steering_override */
1512 __u32 pa_sc_tile_steering_override;1514 __u32 pa_sc_tile_steering_override;
1515 __u32 pad;
1513 /* disabled TCCs */1516 /* disabled TCCs */
1514 __u64 tcc_disabled_mask;1517 __u64 tcc_disabled_mask;
1515 __u64 min_engine_clock;1518 __u64 min_engine_clock;
...@@ -1534,7 +1537,6 @@ struct drm_amdgpu_info_device {...@@ -1534,7 +1537,6 @@ struct drm_amdgpu_info_device {
1534 __u32 csa_alignment;1537 __u32 csa_alignment;
1535 /* Userq IP mask (1 << AMDGPU_HW_IP_*) */1538 /* Userq IP mask (1 << AMDGPU_HW_IP_*) */
1536 __u32 userq_ip_mask;1539 __u32 userq_ip_mask;
1537 __u32 pad;
1538};1540};
15391541
1540struct drm_amdgpu_info_hw_ip {1542struct drm_amdgpu_info_hw_ip {
...@@ -1673,6 +1675,25 @@ struct drm_amdgpu_info_uq_metadata {...@@ -1673,6 +1675,25 @@ struct drm_amdgpu_info_uq_metadata {
1673#define AMDGPU_FAMILY_GC_11_5_4 154 /* GC 11.5.4 */1675#define AMDGPU_FAMILY_GC_11_5_4 154 /* GC 11.5.4 */
1674#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */1676#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
16751677
1678/*
1679 * Definition of user options
1680 *
1681 * option: AMDGPU_PROC_OPTIONS_OP_KFD_SIGBUS_DELAY
1682 * 0: Disable sigbus delay - SIGBUS will be raised immediately
1683 * 0xFFFFFFFF: SIGBUS will not be raised
1684 * other: Set the sigbus delay in milliseconds
1685 */
1686#define AMDGPU_PROC_OPTIONS_OP_KFD_SIGBUS_DELAY 0
1687
1688#define AMDGPU_PROC_OPTIONS_KFD_SIGBUS_DELAY_DISABLED 0xFFFFFFFFu
1689
1690struct drm_amdgpu_proc_options {
1691 __u32 op;
1692 struct {
1693 __u32 value;
1694 } kfd_sigbus_delay;
1695};
1696
1676#if defined(__cplusplus)1697#if defined(__cplusplus)
1677}1698}
1678#endif1699#endif
lib/libc/include/any-linux-any/drm/drm_fourcc.h+191-18
...@@ -1646,36 +1646,69 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)...@@ -1646,36 +1646,69 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
1646 * For multi-plane formats the above surfaces get merged into one plane for1646 * For multi-plane formats the above surfaces get merged into one plane for
1647 * each format plane, based on the required alignment only.1647 * each format plane, based on the required alignment only.
1648 *1648 *
1649 * Bits Parameter Notes1649 * Bits Parameter Notes
1650 * ----- ------------------------ ---------------------------------------------1650 * ------- ------------------------ ---------------------------------------------
1651 *
1652 * DRM format modifier fields on AMD GPUs:
1653 * 7:0 TILE_VERSION Values are AMD_FMT_MOD_TILE_VER_*
1654 * 12:8 TILE Values are AMD_FMT_MOD_TILE_<version>_*
1655 * 13 DCC Delta Color Compression, supported on GFX8 and newer
1656 * 55:14 (chip specific) See below for details, depends on GFX block version
1657 * 63:56 Vendor Value is DRM_FORMAT_MOD_VENDOR_AMD
1658 *
1659 * Chip specific fields on Gfx9 and newer:
1660 * 14 DCC_RETILE
1661 * 15 DCC_PIPE_ALIGN
1662 * 16 DCC_INDEPENDENT_64B
1663 * 17 DCC_INDEPENDENT_128B
1664 * 19:18 DCC_MAX_COMPRESSED_BLOCK Values are AMD_FMT_MOD_DCC_BLOCK_*
1665 * 20 DCC_CONSTANT_ENCODE
1666 * 23:21 PIPE_XOR_BITS Only for some chips
1667 * 26:24 BANK_XOR_BITS Only for some chips
1668 * 29:27 PACKERS Only for some chips
1669 * 32:30 RB Only for some chips
1670 * 35:33 PIPE Only for some chips
1671 * 55:36 - Reserved for future use, must be zero
1672 *
1673 * Chip specific fields on Gfx6-8:
1674 * 16:14 MICROTILE Micro tile format
1675 * 21:17 PIPE_CONFIG Number of pipes and how pipes are interleaved
1676 * 24:22 TILE_SPLIT Tile split size
1677 * 26:25 BANK_WIDTH Number of tiles in the X direction in the same bank
1678 * 28:27 BANK_HEIGHT Number of tiles in the Y direction in the same bank
1679 * 30:29 MACRO_TILE_ASPECT Macro tile aspect ratio
1680 * 32:31 NUM_BANKS Number of banks
1681 * 55:33 - Reserved for future use, must be zero
1651 *1682 *
1652 * 7:0 TILE_VERSION Values are AMD_FMT_MOD_TILE_VER_*
1653 * 12:8 TILE Values are AMD_FMT_MOD_TILE_<version>_*
1654 * 13 DCC
1655 * 14 DCC_RETILE
1656 * 15 DCC_PIPE_ALIGN
1657 * 16 DCC_INDEPENDENT_64B
1658 * 17 DCC_INDEPENDENT_128B
1659 * 19:18 DCC_MAX_COMPRESSED_BLOCK Values are AMD_FMT_MOD_DCC_BLOCK_*
1660 * 20 DCC_CONSTANT_ENCODE
1661 * 23:21 PIPE_XOR_BITS Only for some chips
1662 * 26:24 BANK_XOR_BITS Only for some chips
1663 * 29:27 PACKERS Only for some chips
1664 * 32:30 RB Only for some chips
1665 * 35:33 PIPE Only for some chips
1666 * 55:36 - Reserved for future use, must be zero
1667 */1683 */
1668#define AMD_FMT_MOD fourcc_mod_code(AMD, 0)1684#define AMD_FMT_MOD fourcc_mod_code(AMD, 0)
16691685
1670#define IS_AMD_FMT_MOD(val) (((val) >> 56) == DRM_FORMAT_MOD_VENDOR_AMD)1686#define IS_AMD_FMT_MOD(val) (((val) >> 56) == DRM_FORMAT_MOD_VENDOR_AMD)
16711687
1672/* Reserve 0 for GFX8 and older */1688#define AMD_FMT_MOD_TILE_VER_GFX6 0
1673#define AMD_FMT_MOD_TILE_VER_GFX9 11689#define AMD_FMT_MOD_TILE_VER_GFX9 1
1674#define AMD_FMT_MOD_TILE_VER_GFX10 21690#define AMD_FMT_MOD_TILE_VER_GFX10 2
1675#define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 31691#define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 3
1676#define AMD_FMT_MOD_TILE_VER_GFX11 41692#define AMD_FMT_MOD_TILE_VER_GFX11 4
1677#define AMD_FMT_MOD_TILE_VER_GFX12 51693#define AMD_FMT_MOD_TILE_VER_GFX12 5
16781694
1695/*
1696 * Gfx6-8 tiling modes.
1697 * A complete reference implementation is found in addrlib in the Mesa code base.
1698 *
1699 * - Microtiled modes (1D):
1700 * Pixel data is organized into micro tiles of 8x8 pixels.
1701 *
1702 * - Macrotiled modes (2D):
1703 * Micro tiles are further organized into macro tiles.
1704 * These are optimized for even load distribution among memory channels.
1705 *
1706 * Note that only THIN1 modes are exposed here.
1707 * THICK and XTHICK are for 3D images and not relevant to DRM format modifiers.
1708 */
1709#define AMD_FMT_MOD_TILE_GFX6_1D_TILED_THIN1 0x2
1710#define AMD_FMT_MOD_TILE_GFX6_2D_TILED_THIN1 0x4
1711
1679/*1712/*
1680 * 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical1713 * 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical
1681 * version.1714 * version.
...@@ -1774,6 +1807,146 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)...@@ -1774,6 +1807,146 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
1774#define AMD_FMT_MOD_PIPE_SHIFT 331807#define AMD_FMT_MOD_PIPE_SHIFT 33
1775#define AMD_FMT_MOD_PIPE_MASK 0x71808#define AMD_FMT_MOD_PIPE_MASK 0x7
17761809
1810/*
1811 * MICRO_TILE_MODE, 3 bits. Determines the micro tile format.
1812 * Only relevant to Gfx6-8.
1813 *
1814 * DISPLAY - Displayable tiling
1815 * THIN - Non-displayable tiling, a.k.a thin micro tiling
1816 * DEPTH, THICK - not exposed, not relevant to DRM format modifier use cases
1817 * ROTATED - not exposed, not implemented in Linux or Mesa
1818 */
1819#define AMD_FMT_MOD_MICROTILE_SHIFT 14ULL
1820#define AMD_FMT_MOD_MICROTILE_MASK 0x7
1821
1822#define AMD_FMT_MOD_MICROTILE_DISPLAY 0x0
1823#define AMD_FMT_MOD_MICROTILE_THIN 0x1
1824
1825/*
1826 * PIPE_CONFIG, 5 bits. Number of pipes and how pipes are interleaved on the surface,
1827 * which means the shader engine tile size and packer tile size.
1828 * Typically matches the number of memory channels, or number of RBs.
1829 * Only relevant to Gfx6-8 macro tiled modes.
1830 *
1831 * P<n>_<a>x<b>_<c>x<d>
1832 * where:
1833 * <n> - number of pipes
1834 * <a>x<b> - shader engine tile size
1835 * <c>x<d> - packer tile size
1836 */
1837#define AMD_FMT_MOD_PIPE_CONFIG_SHIFT 17ULL
1838#define AMD_FMT_MOD_PIPE_CONFIG_MASK 0x1f
1839
1840#define AMD_FMT_MOD_PIPE_CONFIG_P2 0x0
1841#define AMD_FMT_MOD_PIPE_CONFIG_P4_8x16 0x4
1842#define AMD_FMT_MOD_PIPE_CONFIG_P4_16x16 0x5
1843#define AMD_FMT_MOD_PIPE_CONFIG_P4_16x32 0x6
1844#define AMD_FMT_MOD_PIPE_CONFIG_P4_32x32 0x7
1845#define AMD_FMT_MOD_PIPE_CONFIG_P8_16x16_8x16 0x8
1846#define AMD_FMT_MOD_PIPE_CONFIG_P8_16x32_8x16 0x9
1847#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x32_8x16 0xa
1848#define AMD_FMT_MOD_PIPE_CONFIG_P8_16x32_16x16 0xb
1849#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x32_16x16 0xc
1850#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x32_16x32 0xd
1851#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x64_32x32 0xe
1852#define AMD_FMT_MOD_PIPE_CONFIG_P16_32x32_8x16 0x10
1853#define AMD_FMT_MOD_PIPE_CONFIG_P16_32x32_16x16 0x11
1854
1855/*
1856 * TILE_SPLIT, 3 bits.
1857 * Only relevant to Gfx6-8 macro tiled modes.
1858 *
1859 * On GFX6 (or with depth tiling modes on GFX7 and newer),
1860 * the GFX block uses the GB_TILE_MODE.TILE_SPLIT field directly.
1861 *
1862 * On GFX7 and newer with non-depth tiling modes, the GFX block uses a
1863 * split factor which is stored in the GB_TILE_MODE.SAMPLE_SPLIT field.
1864 * SAMPLE_SPLIT may be: 0 - 1 byte; 1 - 2 bytes; 2 - 4 bytes; 3 - 8 bytes.
1865 * The actual tile size and tile split bytes are calculated as follows:
1866 *
1867 * bpp = ... <- bits per pixel in the current image
1868 * thickness = ... <- depends on array mode; may be: 1, 4, 8
1869 * num_samples = ... <- number of samples in the current image
1870 * tile_size_pixels = 8 * 8
1871 * tile_bytes_1x = thickness * tile_size_pixels * bpp / 8
1872 * sample_split_factor = 1 << SAMPLE_SPLIT
1873 * tile_split_bytes = clamp(tile_bytes_1x * sample_split_factor, 256, dram_row_size_bytes)
1874 * tile_bytes = clamp(tile_bytes_1x * num_samples, 64, tile_split_bytes)
1875 *
1876 * In both cases, the display block (DCE) has no SAMPLE_SPLIT
1877 * and just needs the tile split bytes in the GRPH_CONTROL.GRPH_TILE_SPLIT field.
1878 * To maximize compatibility between GFX6-7, we don't include the SAMPLE_SPLIT
1879 * in the format modifiers.
1880 *
1881 * The actual tile split in bytes is: 64 << field value
1882 * Possible values of this field:
1883 *
1884 * 0 - Tile split is 64 bytes
1885 * 1 - Tile split is 128 bytes
1886 * 2 - Tile split is 256 bytes
1887 * 3 - Tile split is 512 bytes
1888 * 4 - Tile split is 1 KiB
1889 * 5 - Tile split is 2 KiB
1890 * 6 - Tile split is 4 KiB
1891 */
1892#define AMD_FMT_MOD_TILE_SPLIT_SHIFT 22ULL
1893#define AMD_FMT_MOD_TILE_SPLIT_MASK 0x7
1894
1895/*
1896 * BANK_WIDTH, 2 bits. Number of tiles in the X direction in the same bank.
1897 * Only relevant to Gfx6-8 macro tiled modes.
1898 * The actual bank width is: 1 << field value
1899 * Possible values:
1900 *
1901 * 0 - bank width is 1
1902 * 1 - bank width is 2
1903 * 2 - bank width is 4
1904 * 3 - bank width is 8
1905 */
1906#define AMD_FMT_MOD_BANK_WIDTH_SHIFT 25ULL
1907#define AMD_FMT_MOD_BANK_WIDTH_MASK 0x3
1908
1909/*
1910 * BANK_HEIGHT, 2 bits. Number of tiles in the Y direction in the same bank.
1911 * Only relevant to Gfx6-8 macro tiled modes.
1912 * The actual bank height is: 1 << field value
1913 * Possible values:
1914 *
1915 * 0 - bank height is 1
1916 * 1 - bank height is 2
1917 * 2 - bank height is 4
1918 * 3 - bank height is 8
1919 */
1920#define AMD_FMT_MOD_BANK_HEIGHT_SHIFT 27ULL
1921#define AMD_FMT_MOD_BANK_HEIGHT_MASK 0x3
1922
1923/*
1924 * MACRO_TILE_ASPECT, 2 bits. Macro tile aspect ratio.
1925 * Only relevant to Gfx6-8 macro tiled modes.
1926 * Possible values:
1927 *
1928 * 0 - aspect ratio is 1:1
1929 * 1 - aspect ratio is 4:1
1930 * 2 - aspect ratio is 16:1
1931 * 3 - aspect ratio is 64:1
1932 */
1933#define AMD_FMT_MOD_MACRO_TILE_ASPECT_SHIFT 29ULL
1934#define AMD_FMT_MOD_MACRO_TILE_ASPECT_MASK 0x3
1935
1936/*
1937 * NUM_BANKS, 2 bits. Number of banks.
1938 * Only relevant to Gfx6-8 macro tiled modes.
1939 * The actual number of banks is: 2 << field value
1940 * Possible values:
1941 *
1942 * 0 - number of banks is 2
1943 * 1 - number of banks is 4
1944 * 2 - number of banks is 8
1945 * 3 - number of banks is 16
1946 */
1947#define AMD_FMT_MOD_NUM_BANKS_SHIFT 31ULL
1948#define AMD_FMT_MOD_NUM_BANKS_MASK 0x3
1949
1777#define AMD_FMT_MOD_SET(field, value) \1950#define AMD_FMT_MOD_SET(field, value) \
1778 ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)1951 ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)
1779#define AMD_FMT_MOD_GET(field, value) \1952#define AMD_FMT_MOD_GET(field, value) \
lib/libc/include/any-linux-any/drm/drm_mode.h+1
...@@ -155,6 +155,7 @@ extern "C" {...@@ -155,6 +155,7 @@ extern "C" {
155/* Panel type property */155/* Panel type property */
156#define DRM_MODE_PANEL_TYPE_UNKNOWN 0156#define DRM_MODE_PANEL_TYPE_UNKNOWN 0
157#define DRM_MODE_PANEL_TYPE_OLED 1157#define DRM_MODE_PANEL_TYPE_OLED 1
158#define DRM_MODE_PANEL_TYPE_LCD 2
158159
159/*160/*
160 * DRM_MODE_ROTATE_<degrees>161 * DRM_MODE_ROTATE_<degrees>
lib/libc/include/any-linux-any/drm/ethosu_accel.h+59-1
...@@ -43,6 +43,11 @@ enum drm_ethosu_ioctl_id {...@@ -43,6 +43,11 @@ enum drm_ethosu_ioctl_id {
4343
44 /** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */44 /** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */
45 DRM_ETHOSU_SUBMIT,45 DRM_ETHOSU_SUBMIT,
46
47 DRM_ETHOSU_PERFMON_CREATE,
48 DRM_ETHOSU_PERFMON_DESTROY,
49 DRM_ETHOSU_PERFMON_GET_VALUES,
50 DRM_ETHOSU_PERFMON_SET_GLOBAL,
46};51};
4752
48/**53/**
...@@ -79,6 +84,7 @@ struct drm_ethosu_npu_info {...@@ -79,6 +84,7 @@ struct drm_ethosu_npu_info {
79 __u32 config;84 __u32 config;
8085
81 __u32 sram_size;86 __u32 sram_size;
87 __u32 pmu_counters;
82};88};
8389
84/**90/**
...@@ -220,10 +226,54 @@ struct drm_ethosu_submit {...@@ -220,10 +226,54 @@ struct drm_ethosu_submit {
220 /** Input: Number of jobs passed in. */226 /** Input: Number of jobs passed in. */
221 __u32 job_count;227 __u32 job_count;
222228
223 /** Reserved, must be zero. */229 /** Input: Id returned by DRM_ETHOSU_PERFMON_CREATE */
230 __u32 perfmon_id;
231};
232
233#define DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS 8
234#define DRM_ETHOSU_MAX_PERF_COUNTERS \
235 (DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS + 1)
236
237struct drm_ethosu_perfmon_create {
238 __u32 id;
239 __u32 ncounters;
240 __u16 counters[DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS];
241};
242
243struct drm_ethosu_perfmon_destroy {
244 __u32 id;
224 __u32 pad;245 __u32 pad;
225};246};
226247
248/*
249 * Returns the values of the performance counters tracked by this
250 * perfmon (as an array of (ncounters + 1) u64 values).
251 *
252 * No implicit synchronization is performed, so the user has to
253 * guarantee that any jobs using this perfmon have already been
254 * completed.
255 */
256struct drm_ethosu_perfmon_get_values {
257 __u32 id;
258 __u32 pad;
259 __u64 values_ptr;
260};
261
262#define DRM_ETHOSU_PERFMON_CLEAR_GLOBAL 0x0001
263
264/**
265 * struct drm_ethosu_perfmon_set_global - ioctl to define a global performance
266 * monitor
267 *
268 * The global performance monitor will be used for all jobs. If a global
269 * performance monitor is defined, jobs with a self-defined performance
270 * monitor won't be allowed.
271 */
272struct drm_ethosu_perfmon_set_global {
273 __u32 flags;
274 __u32 id;
275};
276
227/**277/**
228 * DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number278 * DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number
229 * @__access: Access type. Must be R, W or RW.279 * @__access: Access type. Must be R, W or RW.
...@@ -252,6 +302,14 @@ enum {...@@ -252,6 +302,14 @@ enum {
252 DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),302 DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),
253 DRM_IOCTL_ETHOSU_SUBMIT =303 DRM_IOCTL_ETHOSU_SUBMIT =
254 DRM_IOCTL_ETHOSU(WR, SUBMIT, submit),304 DRM_IOCTL_ETHOSU(WR, SUBMIT, submit),
305 DRM_IOCTL_ETHOSU_PERFMON_CREATE =
306 DRM_IOCTL_ETHOSU(WR, PERFMON_CREATE, perfmon_create),
307 DRM_IOCTL_ETHOSU_PERFMON_DESTROY =
308 DRM_IOCTL_ETHOSU(WR, PERFMON_DESTROY, perfmon_destroy),
309 DRM_IOCTL_ETHOSU_PERFMON_GET_VALUES =
310 DRM_IOCTL_ETHOSU(WR, PERFMON_GET_VALUES, perfmon_get_values),
311 DRM_IOCTL_ETHOSU_PERFMON_SET_GLOBAL =
312 DRM_IOCTL_ETHOSU(WR, PERFMON_SET_GLOBAL, perfmon_set_global),
255};313};
256314
257#if defined(__cplusplus)315#if defined(__cplusplus)
lib/libc/include/any-linux-any/drm/msm_drm.h+3-3
...@@ -228,7 +228,7 @@ struct drm_msm_gem_cpu_fini {...@@ -228,7 +228,7 @@ struct drm_msm_gem_cpu_fini {
228228
229struct drm_msm_syncobj {229struct drm_msm_syncobj {
230 __u32 handle; /* in, syncobj handle. */230 __u32 handle; /* in, syncobj handle. */
231 __u32 flags; /* in, from MSM_SUBMIT_SYNCOBJ_FLAGS */231 __u32 flags; /* in, from MSM_SYNCOBJ_FLAGS */
232 __u64 point; /* in, timepoint for timeline syncobjs. */232 __u64 point; /* in, timepoint for timeline syncobjs. */
233};233};
234234
...@@ -393,9 +393,9 @@ struct drm_msm_vm_bind {...@@ -393,9 +393,9 @@ struct drm_msm_vm_bind {
393 __s32 fence_fd;393 __s32 fence_fd;
394 /** @queue_id: in, submitqueue id */394 /** @queue_id: in, submitqueue id */
395 __u32 queue_id;395 __u32 queue_id;
396 /** @in_syncobjs: in, ptr to array of drm_msm_gem_syncobj */396 /** @in_syncobjs: in, ptr to array of drm_msm_syncobj */
397 __u64 in_syncobjs;397 __u64 in_syncobjs;
398 /** @out_syncobjs: in, ptr to array of drm_msm_gem_syncobj */398 /** @out_syncobjs: in, ptr to array of drm_msm_syncobj */
399 __u64 out_syncobjs;399 __u64 out_syncobjs;
400 /** @nr_in_syncobjs: in, number of entries in in_syncobj */400 /** @nr_in_syncobjs: in, number of entries in in_syncobj */
401 __u32 nr_in_syncobjs;401 __u32 nr_in_syncobjs;
lib/libc/include/any-linux-any/drm/nouveau_drm.h+1
...@@ -89,6 +89,7 @@ struct drm_nouveau_getparam {...@@ -89,6 +89,7 @@ struct drm_nouveau_getparam {
89#define NOUVEAU_FIFO_ENGINE_PPP 0x0489#define NOUVEAU_FIFO_ENGINE_PPP 0x04
90#define NOUVEAU_FIFO_ENGINE_BSP 0x0890#define NOUVEAU_FIFO_ENGINE_BSP 0x08
91#define NOUVEAU_FIFO_ENGINE_CE 0x3091#define NOUVEAU_FIFO_ENGINE_CE 0x30
92#define NOUVEAU_FIFO_ENGINE_NVDEC 0x300
9293
93struct drm_nouveau_channel_alloc {94struct drm_nouveau_channel_alloc {
94 __u32 fb_ctxdma_handle;95 __u32 fb_ctxdma_handle;
lib/libc/include/any-linux-any/drm/panthor_drm.h+25-1
...@@ -253,6 +253,9 @@ enum drm_panthor_dev_query_type {...@@ -253,6 +253,9 @@ enum drm_panthor_dev_query_type {
253 * @DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO: Query allowed group priorities information.253 * @DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO: Query allowed group priorities information.
254 */254 */
255 DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,255 DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,
256
257 /** @DRM_PANTHOR_DEV_QUERY_MMU_INFO: Query MMU information. */
258 DRM_PANTHOR_DEV_QUERY_MMU_INFO,
256};259};
257260
258/**261/**
...@@ -487,6 +490,16 @@ struct drm_panthor_timestamp_info {...@@ -487,6 +490,16 @@ struct drm_panthor_timestamp_info {
487 __u64 cpu_timestamp_nsec;490 __u64 cpu_timestamp_nsec;
488};491};
489492
493/**
494 * struct drm_panthor_mmu_info - MMU information
495 *
496 * Structure grouping all queryable information relating to the MMU.
497 */
498struct drm_panthor_mmu_info {
499 /** @page_size_bitmap: Allowed page sizes */
500 __u64 page_size_bitmap;
501};
502
490/**503/**
491 * struct drm_panthor_group_priorities_info - Group priorities information504 * struct drm_panthor_group_priorities_info - Group priorities information
492 *505 *
...@@ -601,6 +614,18 @@ enum drm_panthor_vm_bind_op_flags {...@@ -601,6 +614,18 @@ enum drm_panthor_vm_bind_op_flags {
601 */614 */
602 DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED = 1 << 2,615 DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED = 1 << 2,
603616
617 /**
618 * @DRM_PANTHOR_VM_BIND_OP_MAP_SPARSE: Sparsely map a virtual memory range
619 *
620 * Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP.
621 *
622 * When this flag is set, the whole vm_bind range is mapped over a dummy object in a cyclic
623 * fashion, and all GPU reads from addresses in the range return undefined values. This flag
624 * being set means drm_panthor_vm_bind_op::bo_offset and drm_panthor_vm_bind_op::bo_handle
625 * must both be set to 0. DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC must also be set.
626 */
627 DRM_PANTHOR_VM_BIND_OP_MAP_SPARSE = 1 << 3,
628
604 /**629 /**
605 * @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation.630 * @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation.
606 */631 */
...@@ -664,7 +689,6 @@ struct drm_panthor_vm_bind_op {...@@ -664,7 +689,6 @@ struct drm_panthor_vm_bind_op {
664 * This array shall not be empty for sync-only operations.689 * This array shall not be empty for sync-only operations.
665 */690 */
666 struct drm_panthor_obj_array syncs;691 struct drm_panthor_obj_array syncs;
667
668};692};
669693
670/**694/**
lib/libc/include/any-linux-any/drm/xe_drm.h+13-4
...@@ -2537,21 +2537,21 @@ struct drm_xe_exec_queue_set_property {...@@ -2537,21 +2537,21 @@ struct drm_xe_exec_queue_set_property {
2537 * Refer to Documentation/netlink/specs/drm_ras.yaml for complete interface specification.2537 * Refer to Documentation/netlink/specs/drm_ras.yaml for complete interface specification.
2538 *2538 *
2539 * Node Registration2539 * Node Registration
2540 * =================2540 * -----------------
2541 *2541 *
2542 * The driver registers DRM RAS nodes for each error severity level.2542 * The driver registers DRM RAS nodes for each error severity level.
2543 * enum drm_xe_ras_error_severity defines the node-id, while DRM_XE_RAS_ERROR_SEVERITY_NAMES maps2543 * enum drm_xe_ras_error_severity defines the node-id, while DRM_XE_RAS_ERROR_SEVERITY_NAMES maps
2544 * node-id to node-name.2544 * node-id to node-name.
2545 *2545 *
2546 * Error Classification2546 * Error Classification
2547 * ====================2547 * --------------------
2548 *2548 *
2549 * Each node contains a list of error counters. Each error is identified by a error-id and2549 * Each node contains a list of error counters. Each error is identified by a error-id and
2550 * an error-name. enum drm_xe_ras_error_component defines the error-id, while2550 * an error-name. enum drm_xe_ras_error_component defines the error-id, while
2551 * DRM_XE_RAS_ERROR_COMPONENT_NAMES maps error-id to error-name.2551 * DRM_XE_RAS_ERROR_COMPONENT_NAMES maps error-id to error-name.
2552 *2552 *
2553 * User Interface2553 * User Interface
2554 * ==============2554 * --------------
2555 *2555 *
2556 * To retrieve error values of a error counter, userspace applications should2556 * To retrieve error values of a error counter, userspace applications should
2557 * follow the below steps:2557 * follow the below steps:
...@@ -2589,6 +2589,12 @@ enum drm_xe_ras_error_component {...@@ -2589,6 +2589,12 @@ enum drm_xe_ras_error_component {
2589 DRM_XE_RAS_ERR_COMP_CORE_COMPUTE = 1,2589 DRM_XE_RAS_ERR_COMP_CORE_COMPUTE = 1,
2590 /** @DRM_XE_RAS_ERR_COMP_SOC_INTERNAL: SoC Internal Error */2590 /** @DRM_XE_RAS_ERR_COMP_SOC_INTERNAL: SoC Internal Error */
2591 DRM_XE_RAS_ERR_COMP_SOC_INTERNAL,2591 DRM_XE_RAS_ERR_COMP_SOC_INTERNAL,
2592 /** @DRM_XE_RAS_ERR_COMP_DEVICE_MEMORY: Device Memory Error */
2593 DRM_XE_RAS_ERR_COMP_DEVICE_MEMORY,
2594 /** @DRM_XE_RAS_ERR_COMP_PCIE: PCIe Subsystem Error */
2595 DRM_XE_RAS_ERR_COMP_PCIE,
2596 /** @DRM_XE_RAS_ERR_COMP_FABRIC: Fabric Subsystem Error */
2597 DRM_XE_RAS_ERR_COMP_FABRIC,
2592 /** @DRM_XE_RAS_ERR_COMP_MAX: Max Error */2598 /** @DRM_XE_RAS_ERR_COMP_MAX: Max Error */
2593 DRM_XE_RAS_ERR_COMP_MAX /* non-ABI */2599 DRM_XE_RAS_ERR_COMP_MAX /* non-ABI */
2594};2600};
...@@ -2606,7 +2612,10 @@ enum drm_xe_ras_error_component {...@@ -2606,7 +2612,10 @@ enum drm_xe_ras_error_component {
2606 */2612 */
2607#define DRM_XE_RAS_ERROR_COMPONENT_NAMES { \2613#define DRM_XE_RAS_ERROR_COMPONENT_NAMES { \
2608 [DRM_XE_RAS_ERR_COMP_CORE_COMPUTE] = "core-compute", \2614 [DRM_XE_RAS_ERR_COMP_CORE_COMPUTE] = "core-compute", \
2609 [DRM_XE_RAS_ERR_COMP_SOC_INTERNAL] = "soc-internal" \2615 [DRM_XE_RAS_ERR_COMP_SOC_INTERNAL] = "soc-internal", \
2616 [DRM_XE_RAS_ERR_COMP_DEVICE_MEMORY] = "device-memory", \
2617 [DRM_XE_RAS_ERR_COMP_PCIE] = "pcie", \
2618 [DRM_XE_RAS_ERR_COMP_FABRIC] = "fabric", \
2610}2619}
26112620
2612#if defined(__cplusplus)2621#if defined(__cplusplus)
lib/libc/include/any-linux-any/fwctl/bnxt.h+4
...@@ -12,6 +12,7 @@ enum fwctl_bnxt_commands {...@@ -12,6 +12,7 @@ enum fwctl_bnxt_commands {
12 FWCTL_BNXT_INLINE_COMMANDS = 0,12 FWCTL_BNXT_INLINE_COMMANDS = 0,
13 FWCTL_BNXT_QUERY_COMMANDS,13 FWCTL_BNXT_QUERY_COMMANDS,
14 FWCTL_BNXT_SEND_COMMANDS,14 FWCTL_BNXT_SEND_COMMANDS,
15 FWCTL_BNXT_DMA_COMMANDS,
15};16};
1617
17/**18/**
...@@ -23,4 +24,7 @@ enum fwctl_bnxt_commands {...@@ -23,4 +24,7 @@ enum fwctl_bnxt_commands {
23struct fwctl_info_bnxt {24struct fwctl_info_bnxt {
24 __u32 uctx_caps;25 __u32 uctx_caps;
25};26};
27
28#define FWCTL_BNXT_MAX_DMABUF 0x10000 /* 64 KiB */
29
26#endif30#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/a.out.h+2-2
...@@ -10,7 +10,7 @@...@@ -10,7 +10,7 @@
1010
11#endif /* __STRUCT_EXEC_OVERRIDE__ */11#endif /* __STRUCT_EXEC_OVERRIDE__ */
1212
13#ifndef __ASSEMBLY__13#ifndef __ASSEMBLER__
1414
15/* these go in the N_MACHTYPE field */15/* these go in the N_MACHTYPE field */
16enum machine_type {16enum machine_type {
...@@ -243,5 +243,5 @@ struct relocation_info...@@ -243,5 +243,5 @@ struct relocation_info
243};243};
244#endif /* no N_RELOCATION_INFO_DECLARED. */244#endif /* no N_RELOCATION_INFO_DECLARED. */
245245
246#endif /*__ASSEMBLY__ */246#endif /*__ASSEMBLER__ */
247#endif /* __A_OUT_GNU_H__ */247#endif /* __A_OUT_GNU_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/alloc_tag.h created+100
...@@ -0,0 +1,100 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * alloc_tag IOCTL API definition
4 *
5 * Copyright (C) 2026 Google, LLC. All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef _ALLOC_TAG_H
13#define _ALLOC_TAG_H
14
15#include <linux/types.h>
16
17/*
18 * Function, file and module names often have the same prefixes, therefore
19 * when filtering by these criteria, we compare the last 64 characters to
20 * minimize the chances of name collisions
21 */
22#define ALLOCINFO_STR_SIZE 64
23
24struct allocinfo_content_id {
25 __u64 id;
26};
27
28struct allocinfo_tag {
29 /* Longer names are trimmed */
30 char modname[ALLOCINFO_STR_SIZE];
31 char function[ALLOCINFO_STR_SIZE];
32 char filename[ALLOCINFO_STR_SIZE];
33 __u64 lineno;
34};
35
36/* The alignment ensures 32-bit compatible interfaces are not broken */
37struct allocinfo_counter {
38 __u64 bytes;
39 __u64 calls;
40 __u8 accurate;
41 __u8 pad[7];
42} __attribute__((aligned(8)));
43
44struct allocinfo_tag_data {
45 struct allocinfo_tag tag;
46 struct allocinfo_counter counter;
47};
48
49enum {
50 ALLOCINFO_FILTER_MODNAME,
51 ALLOCINFO_FILTER_FUNCTION,
52 ALLOCINFO_FILTER_FILENAME,
53 ALLOCINFO_FILTER_LINENO,
54 ALLOCINFO_FILTER_INACCURATE,
55 ALLOCINFO_FILTER_MIN_SIZE,
56 ALLOCINFO_FILTER_MAX_SIZE,
57 __ALLOCINFO_FILTER_LAST = ALLOCINFO_FILTER_MAX_SIZE
58};
59
60#define ALLOCINFO_FILTER_MASK_MODNAME (1 << ALLOCINFO_FILTER_MODNAME)
61#define ALLOCINFO_FILTER_MASK_FUNCTION (1 << ALLOCINFO_FILTER_FUNCTION)
62#define ALLOCINFO_FILTER_MASK_FILENAME (1 << ALLOCINFO_FILTER_FILENAME)
63#define ALLOCINFO_FILTER_MASK_LINENO (1 << ALLOCINFO_FILTER_LINENO)
64#define ALLOCINFO_FILTER_MASK_INACCURATE (1 << ALLOCINFO_FILTER_INACCURATE)
65#define ALLOCINFO_FILTER_MASK_MIN_SIZE (1 << ALLOCINFO_FILTER_MIN_SIZE)
66#define ALLOCINFO_FILTER_MASK_MAX_SIZE (1 << ALLOCINFO_FILTER_MAX_SIZE)
67
68#define ALLOCINFO_FILTER_MASKS \
69 ((1 << (__ALLOCINFO_FILTER_LAST + 1)) - 1)
70
71struct allocinfo_filter {
72 __u64 mask; /* bitmask of the filter fields used */
73 struct allocinfo_tag fields;
74 __u64 min_size;
75 __u64 max_size;
76 /* filter criteria only; see allocinfo_counter.accurate for actual accuracy */
77 __u64 inaccurate;
78};
79
80struct allocinfo_get_at {
81 /* inputs */
82 __u64 pos;
83 struct allocinfo_filter filter;
84 /* output */
85 struct allocinfo_tag_data data;
86};
87
88#define _ALLOCINFO_IOC_CONTENT_ID 0
89#define _ALLOCINFO_IOC_GET_AT 1
90#define _ALLOCINFO_IOC_GET_NEXT 2
91
92#define ALLOCINFO_IOC_BASE 0xA6
93#define ALLOCINFO_IOC_CONTENT_ID _IOR(ALLOCINFO_IOC_BASE, _ALLOCINFO_IOC_CONTENT_ID, \
94 struct allocinfo_content_id)
95#define ALLOCINFO_IOC_GET_AT _IOWR(ALLOCINFO_IOC_BASE, _ALLOCINFO_IOC_GET_AT, \
96 struct allocinfo_get_at)
97#define ALLOCINFO_IOC_GET_NEXT _IOR(ALLOCINFO_IOC_BASE, _ALLOCINFO_IOC_GET_NEXT, \
98 struct allocinfo_tag_data)
99
100#endif /* _ALLOC_TAG_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/amd-pmf.h created+204
...@@ -0,0 +1,204 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
2/*
3 * AMD Platform Management Framework (PMF) UAPI Header
4 *
5 * Copyright (c) 2026, Advanced Micro Devices, Inc.
6 * All Rights Reserved.
7 *
8 * This file defines the user-space API for interacting with the AMD PMF
9 * driver. It provides ioctl interfaces to query platform-specific metrics
10 * such as power source, slider position, platform type, laptop placement,
11 * and various BIOS input/output parameters.
12 */
13
14#ifndef _LINUX_AMD_PMF_H
15#define _LINUX_AMD_PMF_H
16
17#include <linux/bits.h>
18#include <linux/ioctl.h>
19#include <linux/types.h>
20
21/**
22 * AMD_PMF_IOC_MAGIC - Magic number for AMD PMF ioctl commands
23 *
24 * This magic number uniquely identifies AMD PMF ioctl operations.
25 */
26#define AMD_PMF_IOC_MAGIC 'p'
27
28/**
29 * IOCTL_AMD_PMF_POPULATE_DATA - ioctl command to retrieve PMF metrics data
30 *
31 * This ioctl command is used to populate the amd_pmf_info structure
32 * with the requested PMF metrics information.
33 */
34#define IOCTL_AMD_PMF_POPULATE_DATA _IOWR(AMD_PMF_IOC_MAGIC, 0x00, __u64)
35
36#define AMD_PMF_BIOS_PARAMS_MAX 10
37
38/* AMD PMF feature flags - bitmask indicating supported features */
39#define AMD_PMF_FEAT_AUTO_MODE BIT(0)
40#define AMD_PMF_FEAT_STATIC_POWER_SLIDER BIT(1)
41#define AMD_PMF_FEAT_POLICY_BUILDER BIT(2)
42#define AMD_PMF_FEAT_DYNAMIC_POWER_SLIDER_AC BIT(3)
43#define AMD_PMF_FEAT_DYNAMIC_POWER_SLIDER_DC BIT(4)
44
45/**
46 * enum amd_pmf_laptop_placement - Describes the physical placement of the laptop
47 * @AMD_PMF_LP_UNKNOWN: Placement cannot be determined
48 * @AMD_PMF_ON_TABLE: Laptop is placed on a stable surface like a table or desk
49 * @AMD_PMF_ON_LAP_MOTION: Laptop is on a lap with detected motion
50 * @AMD_PMF_IN_BAG: Laptop is detected to be inside a bag or case
51 * @AMD_PMF_OUT_OF_BAG: Laptop has been removed from bag or case
52 * @AMD_PMF_LP_UNDEFINED: Placement state is undefined
53 *
54 * This enumeration represents the physical placement state of the laptop
55 * as detected by platform sensors. Used for adaptive power management
56 * and thermal policies.
57 */
58enum amd_pmf_laptop_placement {
59 AMD_PMF_LP_UNKNOWN,
60 AMD_PMF_ON_TABLE,
61 AMD_PMF_ON_LAP_MOTION,
62 AMD_PMF_IN_BAG,
63 AMD_PMF_OUT_OF_BAG,
64 AMD_PMF_LP_UNDEFINED,
65};
66
67/**
68 * enum amd_pmf_ta_slider - Trusted Application power slider positions
69 * @AMD_PMF_TA_BEST_BATTERY: Maximum battery savings, minimal performance
70 * @AMD_PMF_TA_BETTER_BATTERY: Balanced towards battery life
71 * @AMD_PMF_TA_BETTER_PERFORMANCE: Balanced towards performance
72 * @AMD_PMF_TA_BEST_PERFORMANCE: Maximum performance, higher power consumption
73 * @AMD_PMF_TA_MAX: Sentinel value indicating maximum enum value
74 *
75 * This enumeration defines the power slider positions used by the
76 * AMD PMF Trusted Application for dynamic power management decisions.
77 * These correspond to the Windows power slider UI positions.
78 */
79enum amd_pmf_ta_slider {
80 AMD_PMF_TA_BEST_BATTERY,
81 AMD_PMF_TA_BETTER_BATTERY,
82 AMD_PMF_TA_BETTER_PERFORMANCE,
83 AMD_PMF_TA_BEST_PERFORMANCE,
84 AMD_PMF_TA_MAX,
85};
86
87/**
88 * enum amd_pmf_platform_type - Describes the physical form factor orientation
89 * @AMD_PMF_PTYPE_UNKNOWN: Platform type cannot be determined
90 * @AMD_PMF_LID_CLOSE: Laptop lid is closed
91 * @AMD_PMF_CLAMSHELL: Traditional laptop mode with keyboard and screen
92 * @AMD_PMF_FLAT: Device is lying flat on a surface
93 * @AMD_PMF_TENT: Device is in tent mode (keyboard folded back, standing)
94 * @AMD_PMF_STAND: Device is propped up in stand orientation
95 * @AMD_PMF_TABLET: Device is in tablet mode with keyboard hidden
96 * @AMD_PMF_BOOK: Device is in book reading orientation
97 * @AMD_PMF_PRESENTATION: Device is in presentation mode
98 * @AMD_PMF_PULL_FWD: Screen is pulled forward towards user
99 * @AMD_PMF_PTYPE_INVALID: Invalid platform type marker
100 *
101 * This enumeration describes the current physical orientation or form
102 * factor of convertible/2-in-1 devices. Used for optimizing power and
103 * thermal management based on device posture.
104 */
105enum amd_pmf_platform_type {
106 AMD_PMF_PTYPE_UNKNOWN,
107 AMD_PMF_LID_CLOSE,
108 AMD_PMF_CLAMSHELL,
109 AMD_PMF_FLAT,
110 AMD_PMF_TENT,
111 AMD_PMF_STAND,
112 AMD_PMF_TABLET,
113 AMD_PMF_BOOK,
114 AMD_PMF_PRESENTATION,
115 AMD_PMF_PULL_FWD,
116 AMD_PMF_PTYPE_INVALID = 0xf,
117};
118
119static __inline__ const char *amd_pmf_get_platform_type(unsigned int platform_type)
120{
121 switch (platform_type) {
122 case AMD_PMF_CLAMSHELL:
123 return "CLAMSHELL";
124 case AMD_PMF_LID_CLOSE:
125 return "LID_CLOSE";
126 case AMD_PMF_FLAT:
127 return "FLAT";
128 case AMD_PMF_TENT:
129 return "TENT";
130 case AMD_PMF_STAND:
131 return "STAND";
132 case AMD_PMF_TABLET:
133 return "TABLET";
134 case AMD_PMF_BOOK:
135 return "BOOK";
136 case AMD_PMF_PRESENTATION:
137 return "PRESENTATION";
138 case AMD_PMF_PULL_FWD:
139 return "PULL_FWD";
140 default:
141 return "UNKNOWN";
142 }
143}
144
145static __inline__ const char *amd_pmf_get_laptop_placement(unsigned int device_state)
146{
147 switch (device_state) {
148 case AMD_PMF_ON_TABLE:
149 return "ON_TABLE";
150 case AMD_PMF_ON_LAP_MOTION:
151 return "ON_LAP_MOTION";
152 case AMD_PMF_IN_BAG:
153 return "IN_BAG";
154 case AMD_PMF_OUT_OF_BAG:
155 return "OUT_OF_BAG";
156 default:
157 return "UNKNOWN";
158 }
159}
160
161static __inline__ const char *amd_pmf_get_slider_position(unsigned int state)
162{
163 switch (state) {
164 case AMD_PMF_TA_BEST_PERFORMANCE:
165 return "PERFORMANCE";
166 case AMD_PMF_TA_BETTER_PERFORMANCE:
167 return "BALANCED";
168 case AMD_PMF_TA_BEST_BATTERY:
169 return "POWER_SAVER";
170 case AMD_PMF_TA_BETTER_BATTERY:
171 return "BALANCED_BATTERY";
172 default:
173 return "Unknown TA Slider State";
174 }
175}
176
177struct amd_pmf_info {
178 __u64 size;
179
180 /* Feature info */
181 __u32 features_supported;
182
183 /* Power and state info */
184 __u32 platform_type;
185 __u32 power_source;
186 __u32 laptop_placement;
187 __u32 lid_state;
188 __u32 user_presence;
189 __u32 slider_position;
190
191 /* Thermal and power metrics */
192 __s32 skin_temp;
193 __u32 gfx_busy;
194 __s32 ambient_light;
195 __u32 avg_c0_residency;
196 __u32 max_c0_residency;
197 __u32 socket_power;
198
199 /* BIOS parameters */
200 __u32 bios_input[AMD_PMF_BIOS_PARAMS_MAX];
201 __u32 bios_output[AMD_PMF_BIOS_PARAMS_MAX];
202};
203
204#endif /* _LINUX_AMD_PMF_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/arm_sdei.h+1
...@@ -22,6 +22,7 @@...@@ -22,6 +22,7 @@
22#define SDEI_1_0_FN_SDEI_PE_UNMASK SDEI_1_0_FN(0x0C)22#define SDEI_1_0_FN_SDEI_PE_UNMASK SDEI_1_0_FN(0x0C)
23#define SDEI_1_0_FN_SDEI_INTERRUPT_BIND SDEI_1_0_FN(0x0D)23#define SDEI_1_0_FN_SDEI_INTERRUPT_BIND SDEI_1_0_FN(0x0D)
24#define SDEI_1_0_FN_SDEI_INTERRUPT_RELEASE SDEI_1_0_FN(0x0E)24#define SDEI_1_0_FN_SDEI_INTERRUPT_RELEASE SDEI_1_0_FN(0x0E)
25#define SDEI_1_0_FN_SDEI_EVENT_SIGNAL SDEI_1_0_FN(0x0F)
25#define SDEI_1_0_FN_SDEI_PRIVATE_RESET SDEI_1_0_FN(0x11)26#define SDEI_1_0_FN_SDEI_PRIVATE_RESET SDEI_1_0_FN(0x11)
26#define SDEI_1_0_FN_SDEI_SHARED_RESET SDEI_1_0_FN(0x12)27#define SDEI_1_0_FN_SDEI_SHARED_RESET SDEI_1_0_FN(0x12)
2728
lib/libc/include/any-linux-any/linux/batadv_packet.h+11-5
...@@ -192,13 +192,19 @@ enum batadv_tvlv_type {...@@ -192,13 +192,19 @@ enum batadv_tvlv_type {
192};192};
193193
194#pragma pack(2)194#pragma pack(2)
195/* the destination hardware field in the ARP frame is used to195/**
196 * transport the claim type and the group id196 * struct batadv_bla_claim_dst - layout of the destination MAC of a BLA claim
197 * frame
198 * @magic: fixed magic prefix (FF:43:05) identifying claim frames
199 * @type: claim frame type, see &enum batadv_bla_claimframe
200 * @group: group identifier of the announcing backbone gateway
201 *
202 * used in the destination hardware field of the ARP frame
197 */203 */
198struct batadv_bla_claim_dst {204struct batadv_bla_claim_dst {
199 __u8 magic[3]; /* FF:43:05 */205 __u8 magic[3];
200 __u8 type; /* bla_claimframe */206 __u8 type;
201 __be16 group; /* group id */207 __be16 group;
202};208};
203209
204/**210/**
lib/libc/include/any-linux-any/linux/binfmts.h+7
...@@ -22,4 +22,11 @@ struct pt_regs;...@@ -22,4 +22,11 @@ struct pt_regs;
22#define AT_FLAGS_PRESERVE_ARGV0_BIT 022#define AT_FLAGS_PRESERVE_ARGV0_BIT 0
23#define AT_FLAGS_PRESERVE_ARGV0 (1 << AT_FLAGS_PRESERVE_ARGV0_BIT)23#define AT_FLAGS_PRESERVE_ARGV0 (1 << AT_FLAGS_PRESERVE_ARGV0_BIT)
2424
25/*
26 * The interpreter runs transparently: the argument vector and the exe
27 * link belong to the binary passed in AT_EXECFD.
28 */
29#define AT_FLAGS_TRANSPARENT_INTERP_BIT 1
30#define AT_FLAGS_TRANSPARENT_INTERP (1 << AT_FLAGS_TRANSPARENT_INTERP_BIT)
31
25#endif /* _LINUX_BINFMTS_H */32#endif /* _LINUX_BINFMTS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/blkdev.h+1
...@@ -10,5 +10,6 @@...@@ -10,5 +10,6 @@
10 * It's a different number space from ioctl(), reuse the block's code 0x12.10 * It's a different number space from ioctl(), reuse the block's code 0x12.
11 */11 */
12#define BLOCK_URING_CMD_DISCARD _IO(0x12, 0)12#define BLOCK_URING_CMD_DISCARD _IO(0x12, 0)
13#define BLOCK_URING_CMD_ZONE_RESET_ALL _IO(0x12, 1)
1314
14#endif15#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/bpf.h+105-12
...@@ -3038,8 +3038,34 @@ union bpf_attr {...@@ -3038,8 +3038,34 @@ union bpf_attr {
3038 *3038 *
3039 * * **BPF_F_ADJ_ROOM_DECAP_L3_IPV4**,3039 * * **BPF_F_ADJ_ROOM_DECAP_L3_IPV4**,
3040 * **BPF_F_ADJ_ROOM_DECAP_L3_IPV6**:3040 * **BPF_F_ADJ_ROOM_DECAP_L3_IPV6**:
3041 * Indicate the new IP header version after decapsulating the outer3041 * Indicate the new IP header version after decapsulating the
3042 * IP header. Used when the inner and outer IP versions are different.3042 * outer IP header. Used when the inner and outer IP versions
3043 * are different. These flags only trigger a protocol change
3044 * without clearing any tunnel-specific GSO flags.
3045 *
3046 * * **BPF_F_ADJ_ROOM_DECAP_L4_GRE**:
3047 * Clear GRE tunnel GSO flags (SKB_GSO_GRE and SKB_GSO_GRE_CSUM)
3048 * when decapsulating a GRE tunnel.
3049 *
3050 * * **BPF_F_ADJ_ROOM_DECAP_L4_UDP**:
3051 * Clear UDP tunnel GSO flags (SKB_GSO_UDP_TUNNEL and
3052 * SKB_GSO_UDP_TUNNEL_CSUM) when decapsulating a UDP tunnel.
3053 *
3054 * * **BPF_F_ADJ_ROOM_DECAP_IPXIP4**:
3055 * Clear IPIP/SIT tunnel GSO flag (SKB_GSO_IPXIP4) when decapsulating
3056 * a tunnel with an outer IPv4 header (IPv4-in-IPv4 or IPv6-in-IPv4).
3057 *
3058 * * **BPF_F_ADJ_ROOM_DECAP_IPXIP6**:
3059 * Clear IPv6 encapsulation tunnel GSO flag (SKB_GSO_IPXIP6) when
3060 * decapsulating a tunnel with an outer IPv6 header (IPv6-in-IPv6
3061 * or IPv4-in-IPv6).
3062 *
3063 * When using the decapsulation flags above, the skb->encapsulation
3064 * flag is automatically cleared if all tunnel-specific GSO flags
3065 * (SKB_GSO_UDP_TUNNEL, SKB_GSO_UDP_TUNNEL_CSUM, SKB_GSO_GRE,
3066 * SKB_GSO_GRE_CSUM, SKB_GSO_IPXIP4, SKB_GSO_IPXIP6) have been
3067 * removed from the packet. This handles cases where all tunnel
3068 * layers have been decapsulated.
3043 *3069 *
3044 * A call to this helper is susceptible to change the underlying3070 * A call to this helper is susceptible to change the underlying
3045 * packet buffer. Therefore, at load time, all checks on pointers3071 * packet buffer. Therefore, at load time, all checks on pointers
...@@ -3532,6 +3558,47 @@ union bpf_attr {...@@ -3532,6 +3558,47 @@ union bpf_attr {
3532 * Use the mark present in *params*->mark for the fib lookup.3558 * Use the mark present in *params*->mark for the fib lookup.
3533 * This option should not be used with BPF_FIB_LOOKUP_DIRECT,3559 * This option should not be used with BPF_FIB_LOOKUP_DIRECT,
3534 * as it only has meaning for full lookups.3560 * as it only has meaning for full lookups.
3561 * **BPF_FIB_LOOKUP_VLAN**
3562 * If the fib lookup resolves to a VLAN device whose
3563 * parent is a real (non-VLAN) device, set
3564 * *params*->h_vlan_proto and *params*->h_vlan_TCI from
3565 * the VLAN device and replace *params*->ifindex with the
3566 * parent's ifindex. *params*->h_vlan_TCI carries the VID
3567 * only, with PCP and DEI bits zero; a consumer wanting to
3568 * set egress priority writes PCP itself. *params*->smac is
3569 * the VLAN device's own address, which can differ from the
3570 * parent's. Only the immediate parent is resolved; if it
3571 * is itself a VLAN device (QinQ) or in another namespace,
3572 * the egress cannot be reduced to a physical device plus
3573 * one tag and the lookup returns
3574 * **BPF_FIB_LKUP_RET_VLAN_FAILURE** with *params*->ifindex
3575 * left at the input. To obtain the VLAN device's own
3576 * ifindex, repeat the lookup without
3577 * **BPF_FIB_LOOKUP_VLAN**, re-initializing *params*
3578 * first: output fields overwrite the inputs they share
3579 * storage with. The swap and the vlan fields
3580 * are written only on success; other output fields keep
3581 * the helper's existing behaviour, so a frag-needed result
3582 * still reports the route mtu in *params*->mtu_result.
3583 * This flag is only valid for XDP programs; tc programs
3584 * receive -EINVAL since they can redirect to the VLAN
3585 * device directly.
3586 * **BPF_FIB_LOOKUP_VLAN_INPUT**
3587 * Treat *params*->h_vlan_proto and *params*->h_vlan_TCI
3588 * as an input VLAN tag and run the lookup as if ingress
3589 * had happened on the VLAN subinterface carrying that tag
3590 * on *params*->ifindex. The VID is the low 12 bits of
3591 * *params*->h_vlan_TCI; *params*->h_vlan_proto must be
3592 * ETH_P_8021Q or ETH_P_8021AD in network byte order, else
3593 * **-EINVAL**. If *params*->ifindex is itself a VLAN
3594 * device, its inner (QinQ) subinterface is matched; for a
3595 * bond or team, pass the master's ifindex. An unmatched
3596 * tag, a down device, or one in another namespace returns
3597 * **BPF_FIB_LKUP_RET_NOT_FWDED**, mirroring real ingress.
3598 * A VID of 0 is looked up literally, so do not set this
3599 * flag for priority-tagged frames. Cannot be combined with
3600 * **BPF_FIB_LOOKUP_TBID** or **BPF_FIB_LOOKUP_OUTPUT**
3601 * (returns **-EINVAL**).
3535 *3602 *
3536 * *ctx* is either **struct xdp_md** for XDP programs or3603 * *ctx* is either **struct xdp_md** for XDP programs or
3537 * **struct sk_buff** tc cls_act programs.3604 * **struct sk_buff** tc cls_act programs.
...@@ -4694,6 +4761,7 @@ union bpf_attr {...@@ -4694,6 +4761,7 @@ union bpf_attr {
4694 * * **BPF_RB_RING_SIZE**: The size of ring buffer.4761 * * **BPF_RB_RING_SIZE**: The size of ring buffer.
4695 * * **BPF_RB_CONS_POS**: Consumer position (can wrap around).4762 * * **BPF_RB_CONS_POS**: Consumer position (can wrap around).
4696 * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).4763 * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
4764 * * **BPF_RB_OVERWRITE_POS**: Overwrite position (can wrap around).
4697 *4765 *
4698 * Data returned is just a momentary snapshot of actual values4766 * Data returned is just a momentary snapshot of actual values
4699 * and could be inaccurate, so this facility should be used to4767 * and could be inaccurate, so this facility should be used to
...@@ -5079,17 +5147,19 @@ union bpf_attr {...@@ -5079,17 +5147,19 @@ union bpf_attr {
5079 * Description5147 * Description
5080 * Redirect the packet to another net device of index *ifindex*.5148 * Redirect the packet to another net device of index *ifindex*.
5081 * This helper is somewhat similar to **bpf_redirect**\ (), except5149 * This helper is somewhat similar to **bpf_redirect**\ (), except
5082 * that the redirection happens to the *ifindex*' peer device and5150 * that the redirection happens to the *ifindex*' peer device. If
5083 * the netns switch takes place from ingress to ingress without5151 * *flags* is 0, the netns switch takes place from ingress to
5084 * going through the CPU's backlog queue.5152 * ingress without going through the CPU's backlog queue. If the
5153 * **BPF_F_EGRESS** flag is provided then redirection happens in
5154 * the egress direction of the peer device.
5085 *5155 *
5086 * *skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during5156 * *skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during
5087 * the netns switch.5157 * the netns switch.
5088 *5158 *
5089 * The *flags* argument is reserved and must be 0. The helper is5159 * If the *flags* argument is 0, the helper is currently only
5090 * currently only supported for tc BPF program types at the5160 * supported for tc BPF program types at the ingress hook and for
5091 * ingress hook and for veth and netkit target device types. The5161 * veth and netkit target device types. The peer device must reside
5092 * peer device must reside in a different network namespace.5162 * in a different network namespace.
5093 * Return5163 * Return
5094 * The helper returns **TC_ACT_REDIRECT** on success or5164 * The helper returns **TC_ACT_REDIRECT** on success or
5095 * **TC_ACT_SHOT** on error.5165 * **TC_ACT_SHOT** on error.
...@@ -6239,7 +6309,7 @@ enum {...@@ -6239,7 +6309,7 @@ enum {
6239};6309};
62406310
6241/* BPF_FUNC_skb_adjust_room flags. */6311/* BPF_FUNC_skb_adjust_room flags. */
6242enum {6312enum bpf_adj_room_flags {
6243 BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0),6313 BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0),
6244 BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = (1ULL << 1),6314 BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = (1ULL << 1),
6245 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2),6315 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2),
...@@ -6249,6 +6319,10 @@ enum {...@@ -6249,6 +6319,10 @@ enum {
6249 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = (1ULL << 6),6319 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = (1ULL << 6),
6250 BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = (1ULL << 7),6320 BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = (1ULL << 7),
6251 BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = (1ULL << 8),6321 BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = (1ULL << 8),
6322 BPF_F_ADJ_ROOM_DECAP_L4_GRE = (1ULL << 9),
6323 BPF_F_ADJ_ROOM_DECAP_L4_UDP = (1ULL << 10),
6324 BPF_F_ADJ_ROOM_DECAP_IPXIP4 = (1ULL << 11),
6325 BPF_F_ADJ_ROOM_DECAP_IPXIP6 = (1ULL << 12),
6252};6326};
62536327
6254enum {6328enum {
...@@ -6336,9 +6410,10 @@ enum {...@@ -6336,9 +6410,10 @@ enum {
6336/* Flags for bpf_redirect and bpf_redirect_map helpers */6410/* Flags for bpf_redirect and bpf_redirect_map helpers */
6337enum {6411enum {
6338 BPF_F_INGRESS = (1ULL << 0), /* used for skb path */6412 BPF_F_INGRESS = (1ULL << 0), /* used for skb path */
6413 BPF_F_EGRESS = (1ULL << 1), /* used for skb path */
6339 BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */6414 BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */
6340 BPF_F_EXCLUDE_INGRESS = (1ULL << 4), /* used for XDP path */6415 BPF_F_EXCLUDE_INGRESS = (1ULL << 4), /* used for XDP path */
6341#define BPF_F_REDIRECT_FLAGS (BPF_F_INGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS)6416#define BPF_F_REDIRECT_FLAGS (BPF_F_INGRESS | BPF_F_EGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS)
6342};6417};
63436418
6344#define __bpf_md_ptr(type, name) \6419#define __bpf_md_ptr(type, name) \
...@@ -6839,6 +6914,15 @@ struct bpf_link_info {...@@ -6839,6 +6914,15 @@ struct bpf_link_info {
6839 __u32 flags;6914 __u32 flags;
6840 __u32 pid;6915 __u32 pid;
6841 } uprobe_multi;6916 } uprobe_multi;
6917 struct {
6918 __u32 attach_type;
6919 __u32 count; /* in/out: tracing_multi target count */
6920 __u32 btf_obj_id;
6921 __u32 :32;
6922 __aligned_u64 ids;
6923 __aligned_u64 addrs;
6924 __aligned_u64 cookies;
6925 } tracing_multi;
6842 struct {6926 struct {
6843 __u32 type; /* enum bpf_perf_event_type */6927 __u32 type; /* enum bpf_perf_event_type */
6844 __u32 :32;6928 __u32 :32;
...@@ -7327,6 +7411,8 @@ enum {...@@ -7327,6 +7411,8 @@ enum {
7327 BPF_FIB_LOOKUP_TBID = (1U << 3),7411 BPF_FIB_LOOKUP_TBID = (1U << 3),
7328 BPF_FIB_LOOKUP_SRC = (1U << 4),7412 BPF_FIB_LOOKUP_SRC = (1U << 4),
7329 BPF_FIB_LOOKUP_MARK = (1U << 5),7413 BPF_FIB_LOOKUP_MARK = (1U << 5),
7414 BPF_FIB_LOOKUP_VLAN = (1U << 6),
7415 BPF_FIB_LOOKUP_VLAN_INPUT = (1U << 7),
7330};7416};
73317417
7332enum {7418enum {
...@@ -7340,6 +7426,7 @@ enum {...@@ -7340,6 +7426,7 @@ enum {
7340 BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */7426 BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */
7341 BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */7427 BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */
7342 BPF_FIB_LKUP_RET_NO_SRC_ADDR, /* failed to derive IP src addr */7428 BPF_FIB_LKUP_RET_NO_SRC_ADDR, /* failed to derive IP src addr */
7429 BPF_FIB_LKUP_RET_VLAN_FAILURE, /* VLAN egress, parent unresolvable */
7343};7430};
73447431
7345struct bpf_fib_lookup {7432struct bpf_fib_lookup {
...@@ -7393,7 +7480,13 @@ struct bpf_fib_lookup {...@@ -7393,7 +7480,13 @@ struct bpf_fib_lookup {
73937480
7394 union {7481 union {
7395 struct {7482 struct {
7396 /* output */7483 /*
7484 * output with BPF_FIB_LOOKUP_VLAN: set from the
7485 * resolved egress VLAN device (see the flag); zeroed
7486 * on other successful lookups. input with
7487 * BPF_FIB_LOOKUP_VLAN_INPUT: the VLAN tag to scope
7488 * the lookup by.
7489 */
7397 __be16 h_vlan_proto;7490 __be16 h_vlan_proto;
7398 __be16 h_vlan_TCI;7491 __be16 h_vlan_TCI;
7399 };7492 };
lib/libc/include/any-linux-any/linux/cachefiles.h deleted-68
...@@ -1,68 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _LINUX_CACHEFILES_H
3#define _LINUX_CACHEFILES_H
4
5#include <linux/types.h>
6#include <linux/ioctl.h>
7
8/*
9 * Fscache ensures that the maximum length of cookie key is 255. The volume key
10 * is controlled by netfs, and generally no bigger than 255.
11 */
12#define CACHEFILES_MSG_MAX_SIZE 1024
13
14enum cachefiles_opcode {
15 CACHEFILES_OP_OPEN,
16 CACHEFILES_OP_CLOSE,
17 CACHEFILES_OP_READ,
18};
19
20/*
21 * Message Header
22 *
23 * @msg_id a unique ID identifying this message
24 * @opcode message type, CACHEFILE_OP_*
25 * @len message length, including message header and following data
26 * @object_id a unique ID identifying a cache file
27 * @data message type specific payload
28 */
29struct cachefiles_msg {
30 __u32 msg_id;
31 __u32 opcode;
32 __u32 len;
33 __u32 object_id;
34 __u8 data[];
35};
36
37/*
38 * @data contains the volume_key followed directly by the cookie_key. volume_key
39 * is a NUL-terminated string; @volume_key_size indicates the size of the volume
40 * key in bytes. cookie_key is binary data, which is netfs specific;
41 * @cookie_key_size indicates the size of the cookie key in bytes.
42 *
43 * @fd identifies an anon_fd referring to the cache file.
44 */
45struct cachefiles_open {
46 __u32 volume_key_size;
47 __u32 cookie_key_size;
48 __u32 fd;
49 __u32 flags;
50 __u8 data[];
51};
52
53/*
54 * @off indicates the starting offset of the requested file range
55 * @len indicates the length of the requested file range
56 */
57struct cachefiles_read {
58 __u64 off;
59 __u64 len;
60};
61
62/*
63 * Reply for READ request
64 * @arg for this ioctl is the @id field of READ request.
65 */
66#define CACHEFILES_IOC_READ_COMPLETE _IOW(0x98, 1, int)
67
68#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/capability.h+6-6
...@@ -102,9 +102,9 @@ struct vfs_ns_cap_data {...@@ -102,9 +102,9 @@ struct vfs_ns_cap_data {
102102
103103
104104
105/**105/*
106 ** POSIX-draft defined capabilities.106 * POSIX-draft defined capabilities.
107 **/107 */
108108
109/* In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, this109/* In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, this
110 overrides the restriction of changing file ownership and group110 overrides the restriction of changing file ownership and group
...@@ -157,9 +157,9 @@ struct vfs_ns_cap_data {...@@ -157,9 +157,9 @@ struct vfs_ns_cap_data {
157#define CAP_SETUID 7157#define CAP_SETUID 7
158158
159159
160/**160/*
161 ** Linux-specific capabilities161 * Linux-specific capabilities
162 **/162 */
163163
164/* Without VFS support for capabilities:164/* Without VFS support for capabilities:
165 * Transfer any capability in your permitted set to any pid,165 * Transfer any capability in your permitted set to any pid,
lib/libc/include/any-linux-any/linux/cciss_ioctl.h+1
...@@ -85,5 +85,6 @@ typedef struct _LogvolInfo_struct{...@@ -85,5 +85,6 @@ typedef struct _LogvolInfo_struct{
85#define CCISS_RESCANDISK _IO(CCISS_IOC_MAGIC, 16)85#define CCISS_RESCANDISK _IO(CCISS_IOC_MAGIC, 16)
86#define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)86#define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)
87#define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct)87#define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct)
88#define CCISS_BIG_PASSTHRU_SUPPORTED _IO(CCISS_IOC_MAGIC, 19)
8889
89#endif /* CCISS_IOCTLH */90#endif /* CCISS_IOCTLH */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/cec.h+2
...@@ -403,6 +403,8 @@ struct cec_log_addrs {...@@ -403,6 +403,8 @@ struct cec_log_addrs {
403#define CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU (1 << 1)403#define CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU (1 << 1)
404/* CDC-Only device: supports only CDC messages */404/* CDC-Only device: supports only CDC messages */
405#define CEC_LOG_ADDRS_FL_CDC_ONLY (1 << 2)405#define CEC_LOG_ADDRS_FL_CDC_ONLY (1 << 2)
406/* Configuration failed */
407#define CEC_LOG_ADDRS_FL_CONFIG_FAILED (1 << 3)
406408
407/**409/**
408 * struct cec_drm_connector_info - tells which drm connector is410 * struct cec_drm_connector_info - tells which drm connector is
lib/libc/include/any-linux-any/linux/const.h+2-2
...@@ -13,7 +13,7 @@...@@ -13,7 +13,7 @@
13 * leave it unchanged in asm.13 * leave it unchanged in asm.
14 */14 */
1515
16#ifdef __ASSEMBLY__16#ifdef __ASSEMBLER__
17#define _AC(X,Y) X17#define _AC(X,Y) X
18#define _AT(T,X) X18#define _AT(T,X) X
19#else19#else
...@@ -28,7 +28,7 @@...@@ -28,7 +28,7 @@
28#define _BITUL(x) (_UL(1) << (x))28#define _BITUL(x) (_UL(1) << (x))
29#define _BITULL(x) (_ULL(1) << (x))29#define _BITULL(x) (_ULL(1) << (x))
3030
31#if !defined(__ASSEMBLY__)31#if !defined(__ASSEMBLER__)
32/*32/*
33 * Missing __asm__ support33 * Missing __asm__ support
34 *34 *
lib/libc/include/any-linux-any/linux/devlink.h+2
...@@ -648,6 +648,8 @@ enum devlink_attr {...@@ -648,6 +648,8 @@ enum devlink_attr {
648 DEVLINK_ATTR_INDEX, /* uint */648 DEVLINK_ATTR_INDEX, /* uint */
649 DEVLINK_ATTR_RESOURCE_SCOPE_MASK, /* u32 */649 DEVLINK_ATTR_RESOURCE_SCOPE_MASK, /* u32 */
650650
651 DEVLINK_ATTR_PARENT_DEV, /* nested */
652
651 /* Add new attributes above here, update the spec in653 /* Add new attributes above here, update the spec in
652 * Documentation/netlink/specs/devlink.yaml and re-generate654 * Documentation/netlink/specs/devlink.yaml and re-generate
653 * net/devlink/netlink_gen.c.655 * net/devlink/netlink_gen.c.
lib/libc/include/any-linux-any/linux/dpll.h+8
...@@ -129,6 +129,9 @@ enum dpll_type {...@@ -129,6 +129,9 @@ enum dpll_type {
129 * @DPLL_PIN_TYPE_SYNCE_ETH_PORT: ethernet port PHY's recovered clock129 * @DPLL_PIN_TYPE_SYNCE_ETH_PORT: ethernet port PHY's recovered clock
130 * @DPLL_PIN_TYPE_INT_OSCILLATOR: device internal oscillator130 * @DPLL_PIN_TYPE_INT_OSCILLATOR: device internal oscillator
131 * @DPLL_PIN_TYPE_GNSS: GNSS recovered clock131 * @DPLL_PIN_TYPE_GNSS: GNSS recovered clock
132 * @DPLL_PIN_TYPE_INT_NCO: Device internal numerically controlled oscillator.
133 * When connected as a DPLL input, the DPLL enters NCO mode where the output
134 * frequency is adjusted by the host via the PTP clock interface.
132 */135 */
133enum dpll_pin_type {136enum dpll_pin_type {
134 DPLL_PIN_TYPE_MUX = 1,137 DPLL_PIN_TYPE_MUX = 1,
...@@ -136,6 +139,7 @@ enum dpll_pin_type {...@@ -136,6 +139,7 @@ enum dpll_pin_type {
136 DPLL_PIN_TYPE_SYNCE_ETH_PORT,139 DPLL_PIN_TYPE_SYNCE_ETH_PORT,
137 DPLL_PIN_TYPE_INT_OSCILLATOR,140 DPLL_PIN_TYPE_INT_OSCILLATOR,
138 DPLL_PIN_TYPE_GNSS,141 DPLL_PIN_TYPE_GNSS,
142 DPLL_PIN_TYPE_INT_NCO,
139143
140 /* private: */144 /* private: */
141 __DPLL_PIN_TYPE_MAX,145 __DPLL_PIN_TYPE_MAX,
...@@ -208,11 +212,15 @@ enum dpll_pin_operstate {...@@ -208,11 +212,15 @@ enum dpll_pin_operstate {
208 * @DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE: pin direction can be changed212 * @DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE: pin direction can be changed
209 * @DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE: pin priority can be changed213 * @DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE: pin priority can be changed
210 * @DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE: pin state can be changed214 * @DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE: pin state can be changed
215 * @DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE: pin state can be set to
216 * connected regardless of current DPLL device mode, overriding the active
217 * input selection. Requires state-can-change to be set as well.
211 */218 */
212enum dpll_pin_capabilities {219enum dpll_pin_capabilities {
213 DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE = 1,220 DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE = 1,
214 DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE = 2,221 DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE = 2,
215 DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE = 4,222 DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE = 4,
223 DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE = 8,
216};224};
217225
218#define DPLL_PHASE_OFFSET_DIVIDER 1000226#define DPLL_PHASE_OFFSET_DIVIDER 1000
lib/libc/include/any-linux-any/linux/edd.h+2-2
...@@ -53,7 +53,7 @@...@@ -53,7 +53,7 @@
53#define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF53#define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF
54 in boot_params - treat this as 1 byte */54 in boot_params - treat this as 1 byte */
5555
56#ifndef __ASSEMBLY__56#ifndef __ASSEMBLER__
5757
58#define EDD_EXT_FIXED_DISK_ACCESS (1 << 0)58#define EDD_EXT_FIXED_DISK_ACCESS (1 << 0)
59#define EDD_EXT_DEVICE_LOCKING_AND_EJECTING (1 << 1)59#define EDD_EXT_DEVICE_LOCKING_AND_EJECTING (1 << 1)
...@@ -187,6 +187,6 @@ struct edd {...@@ -187,6 +187,6 @@ struct edd {
187 unsigned char edd_info_nr;187 unsigned char edd_info_nr;
188};188};
189189
190#endif /*!__ASSEMBLY__ */190#endif /*!__ASSEMBLER__ */
191191
192#endif /* _LINUX_EDD_H */192#endif /* _LINUX_EDD_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/efs_fs_sb.h deleted-62
...@@ -1,62 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * efs_fs_sb.h
4 *
5 * Copyright (c) 1999 Al Smith
6 *
7 * Portions derived from IRIX header files (c) 1988 Silicon Graphics
8 */
9
10#ifndef __EFS_FS_SB_H__
11#define __EFS_FS_SB_H__
12
13#include <linux/types.h>
14#include <linux/magic.h>
15
16/* EFS superblock magic numbers */
17#define EFS_MAGIC 0x072959
18#define EFS_NEWMAGIC 0x07295a
19
20#define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
21
22#define EFS_SUPER 1
23#define EFS_ROOTINODE 2
24
25/* efs superblock on disk */
26struct efs_super {
27 __be32 fs_size; /* size of filesystem, in sectors */
28 __be32 fs_firstcg; /* bb offset to first cg */
29 __be32 fs_cgfsize; /* size of cylinder group in bb's */
30 __be16 fs_cgisize; /* bb's of inodes per cylinder group */
31 __be16 fs_sectors; /* sectors per track */
32 __be16 fs_heads; /* heads per cylinder */
33 __be16 fs_ncg; /* # of cylinder groups in filesystem */
34 __be16 fs_dirty; /* fs needs to be fsck'd */
35 __be32 fs_time; /* last super-block update */
36 __be32 fs_magic; /* magic number */
37 char fs_fname[6]; /* file system name */
38 char fs_fpack[6]; /* file system pack name */
39 __be32 fs_bmsize; /* size of bitmap in bytes */
40 __be32 fs_tfree; /* total free data blocks */
41 __be32 fs_tinode; /* total free inodes */
42 __be32 fs_bmblock; /* bitmap location. */
43 __be32 fs_replsb; /* Location of replicated superblock. */
44 __be32 fs_lastialloc; /* last allocated inode */
45 char fs_spare[20]; /* space for expansion - MUST BE ZERO */
46 __be32 fs_checksum; /* checksum of volume portion of fs */
47};
48
49/* efs superblock information in memory */
50struct efs_sb_info {
51 __u32 fs_magic; /* superblock magic number */
52 __u32 fs_start; /* first block of filesystem */
53 __u32 first_block; /* first data block in filesystem */
54 __u32 total_blocks; /* total number of blocks in filesystem */
55 __u32 group_size; /* # of blocks a group consists of */
56 __u32 data_free; /* # of free data blocks */
57 __u32 inode_free; /* # of free inodes */
58 __u16 inode_blocks; /* # of blocks used for inodes in every grp */
59 __u16 total_groups; /* # of groups */
60};
61
62#endif /* __EFS_FS_SB_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/ethtool.h+6
...@@ -2013,7 +2013,13 @@ enum ethtool_link_mode_bit_indices {...@@ -2013,7 +2013,13 @@ enum ethtool_link_mode_bit_indices {
2013 ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39,2013 ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39,
2014 ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40,2014 ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40,
2015 ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 41,2015 ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 41,
2016
2017 /* Despite the "baseCR" in 10000baseCR, this is not an IEEE 802.3 baseCR
2018 * It represents SFF-8431 Appendix-E SFP+ Direct Attach (10G-SFI-DA).
2019 * The name is kept as-is for uAPI backward compatibility.
2020 */
2016 ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 42,2021 ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 42,
2022
2017 ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 43,2023 ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 43,
2018 ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44,2024 ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44,
2019 ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45,2025 ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45,
lib/libc/include/any-linux-any/linux/f2fs.h+7
...@@ -45,6 +45,9 @@...@@ -45,6 +45,9 @@
45#define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25)45#define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25)
46#define F2FS_IOC_GET_DEV_ALIAS_FILE _IOR(F2FS_IOCTL_MAGIC, 26, __u32)46#define F2FS_IOC_GET_DEV_ALIAS_FILE _IOR(F2FS_IOCTL_MAGIC, 26, __u32)
47#define F2FS_IOC_IO_PRIO _IOW(F2FS_IOCTL_MAGIC, 27, __u32)47#define F2FS_IOC_IO_PRIO _IOW(F2FS_IOCTL_MAGIC, 27, __u32)
48#define F2FS_IOC_RESERVE_DEV_ALIAS _IO(F2FS_IOCTL_MAGIC, 28)
49#define F2FS_IOC_RELEASE_DEV_ALIAS _IO(F2FS_IOCTL_MAGIC, 29)
50#define F2FS_IOC_GET_DEV_ALIAS_STATUS _IOR(F2FS_IOCTL_MAGIC, 30, __u32)
4851
49/*52/*
50 * should be same as XFS_IOC_GOINGDOWN.53 * should be same as XFS_IOC_GOINGDOWN.
...@@ -70,6 +73,10 @@ enum {...@@ -70,6 +73,10 @@ enum {
70 F2FS_IOPRIO_MAX,73 F2FS_IOPRIO_MAX,
71};74};
7275
76/* for F2FS_IOC_GET_DEV_ALIAS_STATUS */
77#define F2FS_DEV_ALIAS_STATUS_RELEASED 0
78#define F2FS_DEV_ALIAS_STATUS_RESERVED 1
79
73struct f2fs_gc_range {80struct f2fs_gc_range {
74 __u32 sync;81 __u32 sync;
75 __u64 start;82 __u64 start;
lib/libc/include/any-linux-any/linux/fcntl.h+1
...@@ -124,6 +124,7 @@ struct delegation {...@@ -124,6 +124,7 @@ struct delegation {
124124
125#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 */126#define FD_NSFS_ROOT -10003 /* Root of the nsfs filesystem */
127#define FD_FAILFS_ROOT -10004 /* Root of the failfs filesystem */
127#define FD_INVALID -10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */128#define FD_INVALID -10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */
128129
129/* Generic flags for the *at(2) family of syscalls. */130/* Generic flags for the *at(2) family of syscalls. */
lib/libc/include/any-linux-any/linux/fs.h+1
...@@ -467,6 +467,7 @@ typedef int __bitwise __kernel_rwf_t;...@@ -467,6 +467,7 @@ typedef int __bitwise __kernel_rwf_t;
467#define PAGE_IS_HUGE (1 << 6)467#define PAGE_IS_HUGE (1 << 6)
468#define PAGE_IS_SOFT_DIRTY (1 << 7)468#define PAGE_IS_SOFT_DIRTY (1 << 7)
469#define PAGE_IS_GUARD (1 << 8)469#define PAGE_IS_GUARD (1 << 8)
470#define PAGE_IS_ACCESSED (1 << 9)
470471
471/*472/*
472 * struct page_region - Page region with flags473 * struct page_region - Page region with flags
lib/libc/include/any-linux-any/linux/fscrypt.h-1
...@@ -30,7 +30,6 @@...@@ -30,7 +30,6 @@
30#define FSCRYPT_MODE_SM4_CTS 830#define FSCRYPT_MODE_SM4_CTS 8
31#define FSCRYPT_MODE_ADIANTUM 931#define FSCRYPT_MODE_ADIANTUM 9
32#define FSCRYPT_MODE_AES_256_HCTR2 1032#define FSCRYPT_MODE_AES_256_HCTR2 10
33/* If adding a mode number > 10, update FSCRYPT_MODE_MAX in fscrypt_private.h */
3433
35/*34/*
36 * Legacy policy version; ad-hoc KDF and no key verification.35 * Legacy policy version; ad-hoc KDF and no key verification.
lib/libc/include/any-linux-any/linux/fuse.h+61-2
...@@ -240,6 +240,14 @@...@@ -240,6 +240,14 @@
240 * - add FUSE_COPY_FILE_RANGE_64240 * - add FUSE_COPY_FILE_RANGE_64
241 * - add struct fuse_copy_file_range_out241 * - add struct fuse_copy_file_range_out
242 * - add FUSE_NOTIFY_PRUNE242 * - add FUSE_NOTIFY_PRUNE
243 *
244 * 7.46
245 * - add FUSE_IO_URING_CMD_ADD_QUEUE
246 * - add FUSE_HAS_IO_URING_BUFPOOL
247 * - add fuse_uring_cmd_req bufpool struct
248 * - add bufpool offset field to fuse_uring_ent_in_out struct
249 * - add FUSE_URING_ZERO_COPY, FUSE_URING_ENT_ZERO_COPY, and
250 * FOPEN_IO_URING_ZERO_COPY flag
243 */251 */
244252
245#ifndef _LINUX_FUSE_H253#ifndef _LINUX_FUSE_H
...@@ -271,7 +279,7 @@...@@ -271,7 +279,7 @@
271#define FUSE_KERNEL_VERSION 7279#define FUSE_KERNEL_VERSION 7
272280
273/** Minor version number of this interface */281/** Minor version number of this interface */
274#define FUSE_KERNEL_MINOR_VERSION 45282#define FUSE_KERNEL_MINOR_VERSION 46
275283
276/** The node ID of the root inode */284/** The node ID of the root inode */
277#define FUSE_ROOT_ID 1285#define FUSE_ROOT_ID 1
...@@ -379,6 +387,12 @@ struct fuse_file_lock {...@@ -379,6 +387,12 @@ struct fuse_file_lock {
379 * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE)387 * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE)
380 * FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode388 * FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode
381 * FOPEN_PASSTHROUGH: passthrough read/write io for this open file389 * FOPEN_PASSTHROUGH: passthrough read/write io for this open file
390 * FOPEN_IO_URING_ZERO_COPY: use io-uring zero-copy for reads/writes on this
391 * open file. Honored only when the serving io-uring
392 * queue was set up for zero-copy
393 * (FUSE_URING_ZERO_COPY) and the request carries page
394 * payload. Otherwise reads/writes fall back to
395 * copying.
382 */396 */
383#define FOPEN_DIRECT_IO (1 << 0)397#define FOPEN_DIRECT_IO (1 << 0)
384#define FOPEN_KEEP_CACHE (1 << 1)398#define FOPEN_KEEP_CACHE (1 << 1)
...@@ -388,6 +402,7 @@ struct fuse_file_lock {...@@ -388,6 +402,7 @@ struct fuse_file_lock {
388#define FOPEN_NOFLUSH (1 << 5)402#define FOPEN_NOFLUSH (1 << 5)
389#define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6)403#define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6)
390#define FOPEN_PASSTHROUGH (1 << 7)404#define FOPEN_PASSTHROUGH (1 << 7)
405#define FOPEN_IO_URING_ZERO_COPY (1 << 8)
391406
392/**407/**
393 * INIT request/reply flags408 * INIT request/reply flags
...@@ -444,6 +459,7 @@ struct fuse_file_lock {...@@ -444,6 +459,7 @@ struct fuse_file_lock {
444 * FUSE_OVER_IO_URING: Indicate that client supports io-uring459 * FUSE_OVER_IO_URING: Indicate that client supports io-uring
445 * FUSE_REQUEST_TIMEOUT: kernel supports timing out requests.460 * FUSE_REQUEST_TIMEOUT: kernel supports timing out requests.
446 * init_out.request_timeout contains the timeout (in secs)461 * init_out.request_timeout contains the timeout (in secs)
462 * FUSE_HAS_IO_URING_BUFPOOL: kernel supports io-uring buffer pools
447 */463 */
448#define FUSE_ASYNC_READ (1 << 0)464#define FUSE_ASYNC_READ (1 << 0)
449#define FUSE_POSIX_LOCKS (1 << 1)465#define FUSE_POSIX_LOCKS (1 << 1)
...@@ -491,6 +507,7 @@ struct fuse_file_lock {...@@ -491,6 +507,7 @@ struct fuse_file_lock {
491#define FUSE_ALLOW_IDMAP (1ULL << 40)507#define FUSE_ALLOW_IDMAP (1ULL << 40)
492#define FUSE_OVER_IO_URING (1ULL << 41)508#define FUSE_OVER_IO_URING (1ULL << 41)
493#define FUSE_REQUEST_TIMEOUT (1ULL << 42)509#define FUSE_REQUEST_TIMEOUT (1ULL << 42)
510#define FUSE_HAS_IO_URING_BUFPOOL (1ULL << 43)
494511
495/**512/**
496 * CUSE INIT request/reply flags513 * CUSE INIT request/reply flags
...@@ -1247,6 +1264,13 @@ struct fuse_supp_groups {...@@ -1247,6 +1264,13 @@ struct fuse_supp_groups {
1247#define FUSE_URING_IN_OUT_HEADER_SZ 1281264#define FUSE_URING_IN_OUT_HEADER_SZ 128
1248#define FUSE_URING_OP_IN_OUT_SZ 1281265#define FUSE_URING_OP_IN_OUT_SZ 128
12491266
1267/**
1268 * fuse_uring_ent_in_out flags
1269 *
1270 * FUSE_URING_ENT_ZERO_COPY: Set if the ent's payload is zero-copied
1271 */
1272#define FUSE_URING_ENT_ZERO_COPY (1 << 0)
1273
1250/* Used as part of the fuse_uring_req_header */1274/* Used as part of the fuse_uring_req_header */
1251struct fuse_uring_ent_in_out {1275struct fuse_uring_ent_in_out {
1252 uint64_t flags;1276 uint64_t flags;
...@@ -1259,7 +1283,9 @@ struct fuse_uring_ent_in_out {...@@ -1259,7 +1283,9 @@ struct fuse_uring_ent_in_out {
12591283
1260 /* size of user payload buffer */1284 /* size of user payload buffer */
1261 uint32_t payload_sz;1285 uint32_t payload_sz;
1262 uint32_t padding;1286
1287 /* Offset into the bufpool, if bufpools are used */
1288 uint32_t offset;
12631289
1264 uint64_t reserved;1290 uint64_t reserved;
1265};1291};
...@@ -1288,8 +1314,22 @@ enum fuse_uring_cmd {...@@ -1288,8 +1314,22 @@ enum fuse_uring_cmd {
12881314
1289 /* commit fuse request result and fetch next request */1315 /* commit fuse request result and fetch next request */
1290 FUSE_IO_URING_CMD_COMMIT_AND_FETCH = 2,1316 FUSE_IO_URING_CMD_COMMIT_AND_FETCH = 2,
1317
1318 /* add a queue */
1319 FUSE_IO_URING_CMD_ADD_QUEUE = 3,
1320
1321 /* add a bufpool to a queue */
1322 FUSE_IO_URING_CMD_ADD_BUFPOOL = 4,
1291};1323};
12921324
1325/*
1326 * fuse_uring_cmd_req flags for FUSE_IO_URING_CMD_ADD_QUEUE
1327 *
1328 * FUSE_URING_ZERO_COPY is only supported for queues with bufpools on privileged
1329 * servers
1330 */
1331#define FUSE_URING_ZERO_COPY (1 << 0)
1332
1293/**1333/**
1294 * In the 80B command area of the SQE.1334 * In the 80B command area of the SQE.
1295 */1335 */
...@@ -1302,6 +1342,25 @@ struct fuse_uring_cmd_req {...@@ -1302,6 +1342,25 @@ struct fuse_uring_cmd_req {
1302 /* queue the command is for (queue index) */1342 /* queue the command is for (queue index) */
1303 uint16_t qid;1343 uint16_t qid;
1304 uint8_t padding[6];1344 uint8_t padding[6];
1345
1346 union {
1347 struct {
1348 /* base address of bufpool */
1349 uint64_t uaddr;
1350 uint32_t len;
1351 uint32_t reserved;
1352 } bufpool;
1353
1354 /*
1355 * Index of this entry's slot in the server's io_uring
1356 * registered buffer table, where the kernel registers the
1357 * request's pages for zero-copy. Set for
1358 * FUSE_IO_URING_CMD_REGISTER cmds only, and only on queues
1359 * created with FUSE_URING_ZERO_COPY. On a non-zero-copy queue
1360 * this must be 0
1361 */
1362 uint16_t ent_zero_copy_buf_index;
1363 };
1305};1364};
13061365
1307#endif /* _LINUX_FUSE_H */1366#endif /* _LINUX_FUSE_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/hdlc/ioctl.h+2-2
...@@ -35,7 +35,7 @@...@@ -35,7 +35,7 @@
35#define LMI_CCITT 3 /* ITU-T Annex A */35#define LMI_CCITT 3 /* ITU-T Annex A */
36#define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */36#define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */
3737
38#ifndef __ASSEMBLY__38#ifndef __ASSEMBLER__
3939
40typedef struct {40typedef struct {
41 unsigned int clock_rate; /* bits per second */41 unsigned int clock_rate; /* bits per second */
...@@ -90,5 +90,5 @@ typedef struct {...@@ -90,5 +90,5 @@ typedef struct {
9090
91/* PPP doesn't need any info now - supply length = 0 to ioctl */91/* PPP doesn't need any info now - supply length = 0 to ioctl */
9292
93#endif /* __ASSEMBLY__ */93#endif /* __ASSEMBLER__ */
94#endif /* __HDLC_IOCTL_H__ */94#endif /* __HDLC_IOCTL_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/if_addr.h+1
...@@ -36,6 +36,7 @@ enum {...@@ -36,6 +36,7 @@ enum {
36 IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */36 IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */
37 IFA_TARGET_NETNSID,37 IFA_TARGET_NETNSID,
38 IFA_PROTO, /* u8, address protocol */38 IFA_PROTO, /* u8, address protocol */
39 IFA_MC_USERS, /* u32, multicast group users */
39 __IFA_MAX,40 __IFA_MAX,
40};41};
4142
lib/libc/include/any-linux-any/linux/if_tun.h+4
...@@ -69,6 +69,10 @@...@@ -69,6 +69,10 @@
69#define IFF_NAPI_FRAGS 0x002069#define IFF_NAPI_FRAGS 0x0020
70/* Used in TUNSETIFF to bring up tun/tap without carrier */70/* Used in TUNSETIFF to bring up tun/tap without carrier */
71#define IFF_NO_CARRIER 0x004071#define IFF_NO_CARRIER 0x0040
72/* Stop the queue instead of dropping when the internal ring is full, so an
73 * attached qdisc applies backpressure instead of being bypassed.
74 */
75#define IFF_BACKPRESSURE 0x0080
72#define IFF_NO_PI 0x100076#define IFF_NO_PI 0x1000
73/* This flag has no real effect */77/* This flag has no real effect */
74#define IFF_ONE_QUEUE 0x200078#define IFF_ONE_QUEUE 0x2000
lib/libc/include/any-linux-any/linux/if_xdp.h+1
...@@ -149,6 +149,7 @@ struct xsk_tx_metadata {...@@ -149,6 +149,7 @@ struct xsk_tx_metadata {
149 __u16 csum_start;149 __u16 csum_start;
150 /* Offset from csum_start where checksum should be stored. */150 /* Offset from csum_start where checksum should be stored. */
151 __u16 csum_offset;151 __u16 csum_offset;
152 __u32 reserved;
152153
153 /* XDP_TXMD_FLAGS_LAUNCH_TIME */154 /* XDP_TXMD_FLAGS_LAUNCH_TIME */
154 /* Launch time in nanosecond against the PTP HW Clock */155 /* Launch time in nanosecond against the PTP HW Clock */
lib/libc/include/any-linux-any/linux/iio/types.h+1
...@@ -54,6 +54,7 @@ enum iio_chan_type {...@@ -54,6 +54,7 @@ enum iio_chan_type {
54 IIO_ATTENTION,54 IIO_ATTENTION,
55 IIO_ALTCURRENT,55 IIO_ALTCURRENT,
56 IIO_COVERAGE,56 IIO_COVERAGE,
57 IIO_VOLUMEFLOW,
57};58};
5859
59enum iio_modifier {60enum iio_modifier {
lib/libc/include/any-linux-any/linux/input-event-codes.h+6
...@@ -970,6 +970,12 @@...@@ -970,6 +970,12 @@
970970
971/*971/*
972 * LEDs972 * LEDs
973 *
974 * Do not add any new LED definitions to the input subsystem. The existing
975 * definitions are legacy and grandfathered for backwards compatibility with
976 * userspace (via evdev). Any new LEDs should be implemented using the
977 * LED subsystem (struct led_classdev). The input core provides a bridge to
978 * the LED subsystem in drivers/input/input-leds.c.
973 */979 */
974980
975#define LED_NUML 0x00981#define LED_NUML 0x00
lib/libc/include/any-linux-any/linux/io_uring/zcrx.h+7
...@@ -116,6 +116,7 @@ enum zcrx_ctrl_op {...@@ -116,6 +116,7 @@ enum zcrx_ctrl_op {
116 ZCRX_CTRL_FLUSH_RQ,116 ZCRX_CTRL_FLUSH_RQ,
117 ZCRX_CTRL_EXPORT,117 ZCRX_CTRL_EXPORT,
118 ZCRX_CTRL_ARM_EVENT,118 ZCRX_CTRL_ARM_EVENT,
119 ZCRX_CTRL_ADD_AREA,
119120
120 __ZCRX_CTRL_LAST,121 __ZCRX_CTRL_LAST,
121};122};
...@@ -134,6 +135,11 @@ struct zcrx_ctrl_arm_event {...@@ -134,6 +135,11 @@ struct zcrx_ctrl_arm_event {
134 __u32 __resv[11];135 __u32 __resv[11];
135};136};
136137
138struct zcrx_ctrl_add_area {
139 __u64 area_ptr; /* pointer to struct io_uring_zcrx_area_reg */
140 __u64 __resv[5];
141};
142
137struct zcrx_ctrl {143struct zcrx_ctrl {
138 __u32 zcrx_id;144 __u32 zcrx_id;
139 __u32 op; /* see enum zcrx_ctrl_op */145 __u32 op; /* see enum zcrx_ctrl_op */
...@@ -143,6 +149,7 @@ struct zcrx_ctrl {...@@ -143,6 +149,7 @@ struct zcrx_ctrl {
143 struct zcrx_ctrl_export zc_export;149 struct zcrx_ctrl_export zc_export;
144 struct zcrx_ctrl_flush_rq zc_flush;150 struct zcrx_ctrl_flush_rq zc_flush;
145 struct zcrx_ctrl_arm_event zc_arm_event;151 struct zcrx_ctrl_arm_event zc_arm_event;
152 struct zcrx_ctrl_add_area zc_area;
146 };153 };
147};154};
148155
lib/libc/include/any-linux-any/linux/iommufd.h+42-3
...@@ -57,6 +57,7 @@ enum {...@@ -57,6 +57,7 @@ enum {
57 IOMMUFD_CMD_IOAS_CHANGE_PROCESS = 0x92,57 IOMMUFD_CMD_IOAS_CHANGE_PROCESS = 0x92,
58 IOMMUFD_CMD_VEVENTQ_ALLOC = 0x93,58 IOMMUFD_CMD_VEVENTQ_ALLOC = 0x93,
59 IOMMUFD_CMD_HW_QUEUE_ALLOC = 0x94,59 IOMMUFD_CMD_HW_QUEUE_ALLOC = 0x94,
60 IOMMUFD_CMD_IOAS_NOIOMMU_GET_PA = 0x95,
60};61};
6162
62/**63/**
...@@ -219,6 +220,33 @@ struct iommu_ioas_map {...@@ -219,6 +220,33 @@ struct iommu_ioas_map {
219};220};
220#define IOMMU_IOAS_MAP _IO(IOMMUFD_TYPE, IOMMUFD_CMD_IOAS_MAP)221#define IOMMU_IOAS_MAP _IO(IOMMUFD_TYPE, IOMMUFD_CMD_IOAS_MAP)
221222
223/**
224 * struct iommu_ioas_noiommu_get_pa - ioctl(IOMMU_IOAS_NOIOMMU_GET_PA)
225 * @size: sizeof(struct iommu_ioas_noiommu_get_pa)
226 * @flags: Reserved, must be 0 for now
227 * @ioas_id: IOAS ID to query IOVA to PA mapping from
228 * @__reserved: Must be 0
229 * @iova: IOVA to query
230 * @length: On input, non-zero maximum number of bytes to query starting from
231 * @iova. On output, number of physically contiguous bytes starting
232 * from @out_phys, capped by the input length.
233 * @out_phys: Output physical address the IOVA maps to
234 *
235 * Query the physical address backing an IOVA range. The beginning of the
236 * range must be mapped already and length must be non-zero. For noiommu
237 * devices doing unsafe DMA only.
238 */
239struct iommu_ioas_noiommu_get_pa {
240 __u32 size;
241 __u32 flags;
242 __u32 ioas_id;
243 __u32 __reserved;
244 __aligned_u64 iova;
245 __aligned_u64 length;
246 __aligned_u64 out_phys;
247};
248#define IOMMU_IOAS_NOIOMMU_GET_PA _IO(IOMMUFD_TYPE, IOMMUFD_CMD_IOAS_NOIOMMU_GET_PA)
249
222/**250/**
223 * struct iommu_ioas_map_file - ioctl(IOMMU_IOAS_MAP_FILE)251 * struct iommu_ioas_map_file - ioctl(IOMMU_IOAS_MAP_FILE)
224 * @size: sizeof(struct iommu_ioas_map_file)252 * @size: sizeof(struct iommu_ioas_map_file)
...@@ -574,11 +602,22 @@ struct iommu_hw_info_vtd {...@@ -574,11 +602,22 @@ struct iommu_hw_info_vtd {
574 __aligned_u64 ecap_reg;602 __aligned_u64 ecap_reg;
575};603};
576604
605/**
606 * enum iommu_hw_info_arm_smmuv3_flags - Flags for ARM SMMUv3 hw_info
607 * @IOMMU_HW_INFO_ARM_SMMUV3_ERRATA_REPEAT_TLBI_CFGI:
608 * If set, user space must issue TLBI/CFGI+SYNC commands twice due to
609 * hardware erratum T264-SMMU-3. See the description at
610 * arm_smmu_erratum_repeat_tlbi_cfgi_key.
611 */
612enum iommu_hw_info_arm_smmuv3_flags {
613 IOMMU_HW_INFO_ARM_SMMUV3_ERRATA_REPEAT_TLBI_CFGI = 1 << 0,
614};
615
577/**616/**
578 * struct iommu_hw_info_arm_smmuv3 - ARM SMMUv3 hardware information617 * struct iommu_hw_info_arm_smmuv3 - ARM SMMUv3 hardware information
579 * (IOMMU_HW_INFO_TYPE_ARM_SMMUV3)618 * (IOMMU_HW_INFO_TYPE_ARM_SMMUV3)
580 *619 *
581 * @flags: Must be set to 0620 * @flags: Combination of enum iommu_hw_info_arm_smmuv3_flags
582 * @__reserved: Must be 0621 * @__reserved: Must be 0
583 * @idr: Implemented features for ARM SMMU Non-secure programming interface622 * @idr: Implemented features for ARM SMMU Non-secure programming interface
584 * @iidr: Information about the implementation and implementer of ARM SMMU,623 * @iidr: Information about the implementation and implementer of ARM SMMU,
...@@ -594,7 +633,7 @@ struct iommu_hw_info_vtd {...@@ -594,7 +633,7 @@ struct iommu_hw_info_vtd {
594 * idr[0]: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN , CD2L, ASID16, TTF633 * idr[0]: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN , CD2L, ASID16, TTF
595 * idr[1]: SIDSIZE, SSIDSIZE634 * idr[1]: SIDSIZE, SSIDSIZE
596 * idr[3]: BBML, RIL635 * idr[3]: BBML, RIL
597 * idr[5]: VAX, GRAN64K, GRAN16K, GRAN4K636 * idr[5]: VAX, GRAN64K, GRAN16K, GRAN4K, DS
598 *637 *
599 * - S1P should be assumed to be true if a NESTED HWPT can be created638 * - S1P should be assumed to be true if a NESTED HWPT can be created
600 * - VFIO/iommufd only support platforms with COHACC, it should be assumed to be639 * - VFIO/iommufd only support platforms with COHACC, it should be assumed to be
...@@ -602,7 +641,7 @@ struct iommu_hw_info_vtd {...@@ -602,7 +641,7 @@ struct iommu_hw_info_vtd {
602 * - ATS is a per-device property. If the VMM describes any devices as ATS641 * - ATS is a per-device property. If the VMM describes any devices as ATS
603 * capable in ACPI/DT it should set the corresponding idr.642 * capable in ACPI/DT it should set the corresponding idr.
604 *643 *
605 * This list may expand in future (eg E0PD, AIE, PBHA, D128, DS etc). It is644 * This list may expand in future (eg E0PD, AIE, PBHA, D128 etc). It is
606 * important that VMMs do not read bits outside the list to allow for645 * important that VMMs do not read bits outside the list to allow for
607 * compatibility with future kernels. Several features in the SMMUv3646 * compatibility with future kernels. Several features in the SMMUv3
608 * architecture are not currently supported by the kernel for nesting: HTTU,647 * architecture are not currently supported by the kernel for nesting: HTTU,
lib/libc/include/any-linux-any/linux/issei.h created+69
...@@ -0,0 +1,69 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Copyright (C) 2023-2026 Intel Corporation
4 * Intel Silicon Security Engine Interface (ISSEI) Linux driver:
5 * ISSEI Interface Header
6 */
7#ifndef _LINUX_ISSEI_H
8#define _LINUX_ISSEI_H
9
10#include <linux/ioctl.h>
11#include <linux/types.h>
12
13/*
14 * This ioctl is used to associate the current file descriptor with a
15 * FW Client (given by UUID). This opens a communication channel
16 * between a host client and a FW client. From this point every read and write
17 * will communicate with the associated FW client.
18 * The communication between the clients can be terminated by
19 * IOCTL_ISSEI_DISCONNECT_CLIENT IOCTL or by
20 * closing the file descriptor (file_operation release()).
21 *
22 * The ioctl argument is a struct with a union that contains
23 * the input parameter and the output parameter for this ioctl.
24 *
25 * The input parameter is UUID of the FW Client.
26 * The output parameter is the properties of the FW client
27 * (FW protocol version, max message size and client flags).
28 */
29#define IOCTL_ISSEI_CONNECT_CLIENT \
30 _IOWR('H', 0x01, struct issei_connect_client_data)
31
32/**
33 * struct issei_client - ISSEI client information structure
34 * @max_msg_length: maximum message length supported by the firmware client (in bytes)
35 * @protocol_version: protocol version reported by the firmware client
36 * @reserved1: reserved
37 * @flags: flag bitmask reported by the firmware client
38 * @reserved2: reserved
39 */
40struct issei_client {
41 __u32 max_msg_length;
42 __u8 protocol_version;
43 __u8 reserved1[3];
44 __u32 flags;
45 __u32 reserved2;
46};
47
48#define ISSEI_IOCTL_UUID_LEN 16
49
50/**
51 * struct issei_connect_client_data - ioctl Connect Client Data structure
52 * @in_client_uuid: unique id of the firmware client to connect to (from user space to kernel)
53 * @out_client_properties: connected firmware client properties (from kernel to user space)
54 */
55struct issei_connect_client_data {
56 union {
57 __u8 in_client_uuid[ISSEI_IOCTL_UUID_LEN];
58 struct issei_client out_client_properties;
59 };
60};
61
62/*
63 * This ioctl is used to terminate association between
64 * the host client and the FW client.
65 */
66#define IOCTL_ISSEI_DISCONNECT_CLIENT \
67 _IO('H', 0x02)
68
69#endif /* _LINUX_ISSEI_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/kfd_ioctl.h+89-91
...@@ -690,7 +690,7 @@ enum kfd_criu_op {...@@ -690,7 +690,7 @@ enum kfd_criu_op {
690};690};
691691
692/**692/**
693 * kfd_ioctl_criu_args - Arguments perform CRIU operation693 * struct kfd_ioctl_criu_args - Arguments perform CRIU operation
694 * @devices: [in/out] User pointer to memory location for devices information.694 * @devices: [in/out] User pointer to memory location for devices information.
695 * This is an array of type kfd_criu_device_bucket.695 * This is an array of type kfd_criu_device_bucket.
696 * @bos: [in/out] User pointer to memory location for BOs information696 * @bos: [in/out] User pointer to memory location for BOs information
...@@ -698,11 +698,11 @@ enum kfd_criu_op {...@@ -698,11 +698,11 @@ enum kfd_criu_op {
698 * @priv_data: [in/out] User pointer to memory location for private data698 * @priv_data: [in/out] User pointer to memory location for private data
699 * @priv_data_size: [in/out] Size of priv_data in bytes699 * @priv_data_size: [in/out] Size of priv_data in bytes
700 * @num_devices: [in/out] Number of GPUs used by process. Size of @devices array.700 * @num_devices: [in/out] Number of GPUs used by process. Size of @devices array.
701 * @num_bos [in/out] Number of BOs used by process. Size of @bos array.701 * @num_bos: [in/out] Number of BOs used by process. Size of @bos array.
702 * @num_objects: [in/out] Number of objects used by process. Objects are opaque to702 * @num_objects: [in/out] Number of objects used by process. Objects are opaque to
703 * user application.703 * user application.
704 * @pid: [in/out] PID of the process being checkpointed704 * @pid: [in/out] PID of the process being checkpointed
705 * @op [in] Type of operation (kfd_criu_op)705 * @op: [in] Type of operation (kfd_criu_op)
706 *706 *
707 * Return: 0 on success, -errno on failure707 * Return: 0 on success, -errno on failure
708 */708 */
...@@ -764,7 +764,7 @@ enum kfd_mmio_remap {...@@ -764,7 +764,7 @@ enum kfd_mmio_remap {
764#define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080764#define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080
765765
766/**766/**
767 * kfd_ioctl_svm_op - SVM ioctl operations767 * enum kfd_ioctl_svm_op - SVM ioctl operations
768 *768 *
769 * @KFD_IOCTL_SVM_OP_SET_ATTR: Modify one or more attributes769 * @KFD_IOCTL_SVM_OP_SET_ATTR: Modify one or more attributes
770 * @KFD_IOCTL_SVM_OP_GET_ATTR: Query one or more attributes770 * @KFD_IOCTL_SVM_OP_GET_ATTR: Query one or more attributes
...@@ -786,7 +786,7 @@ enum kfd_ioctl_svm_location {...@@ -786,7 +786,7 @@ enum kfd_ioctl_svm_location {
786};786};
787787
788/**788/**
789 * kfd_ioctl_svm_attr_type - SVM attribute types789 * enum kfd_ioctl_svm_attr_type - SVM attribute types
790 *790 *
791 * @KFD_IOCTL_SVM_ATTR_PREFERRED_LOC: gpuid of the preferred location, 0 for791 * @KFD_IOCTL_SVM_ATTR_PREFERRED_LOC: gpuid of the preferred location, 0 for
792 * system memory792 * system memory
...@@ -815,7 +815,7 @@ enum kfd_ioctl_svm_attr_type {...@@ -815,7 +815,7 @@ enum kfd_ioctl_svm_attr_type {
815};815};
816816
817/**817/**
818 * kfd_ioctl_svm_attribute - Attributes as pairs of type and value818 * struct kfd_ioctl_svm_attribute - Attributes as pairs of type and value
819 *819 *
820 * The meaning of the @value depends on the attribute type.820 * The meaning of the @value depends on the attribute type.
821 *821 *
...@@ -828,7 +828,7 @@ struct kfd_ioctl_svm_attribute {...@@ -828,7 +828,7 @@ struct kfd_ioctl_svm_attribute {
828};828};
829829
830/**830/**
831 * kfd_ioctl_svm_args - Arguments for SVM ioctl831 * struct kfd_ioctl_svm_args - Arguments for SVM ioctl
832 *832 *
833 * @op specifies the operation to perform (see enum833 * @op specifies the operation to perform (see enum
834 * @kfd_ioctl_svm_op). @start_addr and @size are common for all834 * @kfd_ioctl_svm_op). @start_addr and @size are common for all
...@@ -875,7 +875,7 @@ struct kfd_ioctl_svm_args {...@@ -875,7 +875,7 @@ struct kfd_ioctl_svm_args {
875};875};
876876
877/**877/**
878 * kfd_ioctl_set_xnack_mode_args - Arguments for set_xnack_mode878 * struct kfd_ioctl_set_xnack_mode_args - Arguments for set_xnack_mode
879 *879 *
880 * @xnack_enabled: [in/out] Whether to enable XNACK mode for this process880 * @xnack_enabled: [in/out] Whether to enable XNACK mode for this process
881 *881 *
...@@ -1055,15 +1055,15 @@ struct kfd_runtime_info {...@@ -1055,15 +1055,15 @@ struct kfd_runtime_info {
1055#define KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK 21055#define KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK 2
10561056
1057/**1057/**
1058 * kfd_ioctl_runtime_enable_args - Arguments for runtime enable1058 * struct kfd_ioctl_runtime_enable_args - Arguments for runtime enable
1059 *1059 *
1060 * Coordinates debug exception signalling and debug device enablement with runtime.1060 * Coordinates debug exception signalling and debug device enablement with runtime.
1061 *1061 *
1062 * @r_debug - pointer to user struct for sharing information between ROCr and the debuggger1062 * @r_debug: pointer to user struct for sharing information between ROCr and the debuggger
1063 * @mode_mask - mask to set mode1063 * @mode_mask: mask to set mode
1064 * KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK - enable runtime for debugging, otherwise disable1064 * KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK - enable runtime for debugging, otherwise disable
1065 * KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK - enable trap temporary setup (ignore on disable)1065 * KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK - enable trap temporary setup (ignore on disable)
1066 * @capabilities_mask - mask to notify runtime on what KFD supports1066 * @capabilities_mask: mask to notify runtime on what KFD supports
1067 *1067 *
1068 * Return - 0 on SUCCESS.1068 * Return - 0 on SUCCESS.
1069 * - EBUSY if runtime enable call already pending.1069 * - EBUSY if runtime enable call already pending.
...@@ -1158,17 +1158,15 @@ enum kfd_dbg_trap_operations {...@@ -1158,17 +1158,15 @@ enum kfd_dbg_trap_operations {
1158};1158};
11591159
1160/**1160/**
1161 * kfd_ioctl_dbg_trap_enable_args1161 * struct kfd_ioctl_dbg_trap_enable_args - Arguments for KFD_IOC_DBG_TRAP_ENABLE.
1162 *
1163 * Arguments for KFD_IOC_DBG_TRAP_ENABLE.
1164 *1162 *
1165 * Enables debug session for target process. Call @op KFD_IOC_DBG_TRAP_DISABLE in1163 * Enables debug session for target process. Call @op KFD_IOC_DBG_TRAP_DISABLE in
1166 * kfd_ioctl_dbg_trap_args to disable debug session.1164 * kfd_ioctl_dbg_trap_args to disable debug session.
1167 *1165 *
1168 * @exception_mask (IN) - exceptions to raise to the debugger1166 * @exception_mask: (IN) - exceptions to raise to the debugger
1169 * @rinfo_ptr (IN) - pointer to runtime info buffer (see kfd_runtime_info)1167 * @rinfo_ptr: (IN) - pointer to runtime info buffer (see kfd_runtime_info)
1170 * @rinfo_size (IN/OUT) - size of runtime info buffer in bytes1168 * @rinfo_size: (IN/OUT) - size of runtime info buffer in bytes
1171 * @dbg_fd (IN) - fd the KFD will nofify the debugger with of raised1169 * @dbg_fd: (IN) - fd the KFD will nofify the debugger with of raised
1172 * exceptions set in exception_mask.1170 * exceptions set in exception_mask.
1173 *1171 *
1174 * Generic errors apply (see kfd_dbg_trap_operations).1172 * Generic errors apply (see kfd_dbg_trap_operations).
...@@ -1188,15 +1186,14 @@ struct kfd_ioctl_dbg_trap_enable_args {...@@ -1188,15 +1186,14 @@ struct kfd_ioctl_dbg_trap_enable_args {
1188};1186};
11891187
1190/**1188/**
1191 * kfd_ioctl_dbg_trap_send_runtime_event_args1189 * struct kfd_ioctl_dbg_trap_send_runtime_event_args - Arguments for
1192 *1190 * KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT.
1193 *1191 *
1194 * Arguments for KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT.
1195 * Raises exceptions to runtime.1192 * Raises exceptions to runtime.
1196 *1193 *
1197 * @exception_mask (IN) - exceptions to raise to runtime1194 * @exception_mask: (IN) - exceptions to raise to runtime
1198 * @gpu_id (IN) - target device id1195 * @gpu_id: (IN) - target device id
1199 * @queue_id (IN) - target queue id1196 * @queue_id: (IN) - target queue id
1200 *1197 *
1201 * Generic errors apply (see kfd_dbg_trap_operations).1198 * Generic errors apply (see kfd_dbg_trap_operations).
1202 * Return - 0 on SUCCESS.1199 * Return - 0 on SUCCESS.
...@@ -1213,12 +1210,12 @@ struct kfd_ioctl_dbg_trap_send_runtime_event_args {...@@ -1213,12 +1210,12 @@ struct kfd_ioctl_dbg_trap_send_runtime_event_args {
1213};1210};
12141211
1215/**1212/**
1216 * kfd_ioctl_dbg_trap_set_exceptions_enabled_args1213 * struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args - Arguments for
1214 * KFD_IOC_SET_EXCEPTIONS_ENABLED
1217 *1215 *
1218 * Arguments for KFD_IOC_SET_EXCEPTIONS_ENABLED
1219 * Set new exceptions to be raised to the debugger.1216 * Set new exceptions to be raised to the debugger.
1220 *1217 *
1221 * @exception_mask (IN) - new exceptions to raise the debugger1218 * @exception_mask: (IN) - new exceptions to raise the debugger
1222 *1219 *
1223 * Generic errors apply (see kfd_dbg_trap_operations).1220 * Generic errors apply (see kfd_dbg_trap_operations).
1224 * Return - 0 on SUCCESS.1221 * Return - 0 on SUCCESS.
...@@ -1228,16 +1225,16 @@ struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args {...@@ -1228,16 +1225,16 @@ struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args {
1228};1225};
12291226
1230/**1227/**
1231 * kfd_ioctl_dbg_trap_set_wave_launch_override_args1228 * struct kfd_ioctl_dbg_trap_set_wave_launch_override_args - Arguments for
1229 * KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE
1232 *1230 *
1233 * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE
1234 * Enable HW exceptions to raise trap.1231 * Enable HW exceptions to raise trap.
1235 *1232 *
1236 * @override_mode (IN) - see kfd_dbg_trap_override_mode1233 * @override_mode: (IN) - see kfd_dbg_trap_override_mode
1237 * @enable_mask (IN/OUT) - reference kfd_dbg_trap_mask.1234 * @enable_mask: (IN/OUT) - reference kfd_dbg_trap_mask.
1238 * IN is the override modes requested to be enabled.1235 * IN is the override modes requested to be enabled.
1239 * OUT is referenced in Return below.1236 * OUT is referenced in Return below.
1240 * @support_request_mask (IN/OUT) - reference kfd_dbg_trap_mask.1237 * @support_request_mask: (IN/OUT) - reference kfd_dbg_trap_mask.
1241 * IN is the override modes requested for support check.1238 * IN is the override modes requested for support check.
1242 * OUT is referenced in Return below.1239 * OUT is referenced in Return below.
1243 *1240 *
...@@ -1254,36 +1251,38 @@ struct kfd_ioctl_dbg_trap_set_wave_launch_override_args {...@@ -1254,36 +1251,38 @@ struct kfd_ioctl_dbg_trap_set_wave_launch_override_args {
1254 __u32 override_mode;1251 __u32 override_mode;
1255 __u32 enable_mask;1252 __u32 enable_mask;
1256 __u32 support_request_mask;1253 __u32 support_request_mask;
1254 /* private: */
1257 __u32 pad;1255 __u32 pad;
1258};1256};
12591257
1260/**1258/**
1261 * kfd_ioctl_dbg_trap_set_wave_launch_mode_args1259 * struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args - Arguments for
1260 * KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE
1262 *1261 *
1263 * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE
1264 * Set wave launch mode.1262 * Set wave launch mode.
1265 *1263 *
1266 * @mode (IN) - see kfd_dbg_trap_wave_launch_mode1264 * @launch_mode: (IN) - see kfd_dbg_trap_wave_launch_mode
1267 *1265 *
1268 * Generic errors apply (see kfd_dbg_trap_operations).1266 * Generic errors apply (see kfd_dbg_trap_operations).
1269 * Return - 0 on SUCCESS.1267 * Return - 0 on SUCCESS.
1270 */1268 */
1271struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args {1269struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args {
1272 __u32 launch_mode;1270 __u32 launch_mode;
1271 /* private: */
1273 __u32 pad;1272 __u32 pad;
1274};1273};
12751274
1276/**1275/**
1277 * kfd_ioctl_dbg_trap_suspend_queues_ags1276 * struct kfd_ioctl_dbg_trap_suspend_queues_args - Arguments for
1277 * KFD_IOC_DBG_TRAP_SUSPEND_QUEUES
1278 *1278 *
1279 * Arguments for KFD_IOC_DBG_TRAP_SUSPEND_QUEUES
1280 * Suspend queues.1279 * Suspend queues.
1281 *1280 *
1282 * @exception_mask (IN) - raised exceptions to clear1281 * @exception_mask: (IN) - raised exceptions to clear
1283 * @queue_array_ptr (IN) - pointer to array of queue ids (u32 per queue id)1282 * @queue_array_ptr: (IN) - pointer to array of queue ids (u32 per queue id)
1284 * to suspend1283 * to suspend
1285 * @num_queues (IN) - number of queues to suspend in @queue_array_ptr1284 * @num_queues: (IN) - number of queues to suspend in @queue_array_ptr
1286 * @grace_period (IN) - wave time allowance before preemption1285 * @grace_period: (IN) - wave time allowance before preemption
1287 * per 1K GPU clock cycle unit1286 * per 1K GPU clock cycle unit
1288 *1287 *
1289 * Generic errors apply (see kfd_dbg_trap_operations).1288 * Generic errors apply (see kfd_dbg_trap_operations).
...@@ -1311,14 +1310,14 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args {...@@ -1311,14 +1310,14 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args {
1311};1310};
13121311
1313/**1312/**
1314 * kfd_ioctl_dbg_trap_resume_queues_args1313 * struct kfd_ioctl_dbg_trap_resume_queues_args - Arguments for
1314 * KFD_IOC_DBG_TRAP_RESUME_QUEUES
1315 *1315 *
1316 * Arguments for KFD_IOC_DBG_TRAP_RESUME_QUEUES
1317 * Resume queues.1316 * Resume queues.
1318 *1317 *
1319 * @queue_array_ptr (IN) - pointer to array of queue ids (u32 per queue id)1318 * @queue_array_ptr: (IN) - pointer to array of queue ids (u32 per queue id)
1320 * to resume1319 * to resume
1321 * @num_queues (IN) - number of queues to resume in @queue_array_ptr1320 * @num_queues: (IN) - number of queues to resume in @queue_array_ptr
1322 *1321 *
1323 * Generic errors apply (see kfd_dbg_trap_operations).1322 * Generic errors apply (see kfd_dbg_trap_operations).
1324 * Return - Number of queues resumed on SUCCESS.1323 * Return - Number of queues resumed on SUCCESS.
...@@ -1331,20 +1330,21 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args {...@@ -1331,20 +1330,21 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args {
1331struct kfd_ioctl_dbg_trap_resume_queues_args {1330struct kfd_ioctl_dbg_trap_resume_queues_args {
1332 __u64 queue_array_ptr;1331 __u64 queue_array_ptr;
1333 __u32 num_queues;1332 __u32 num_queues;
1333 /* private: */
1334 __u32 pad;1334 __u32 pad;
1335};1335};
13361336
1337/**1337/**
1338 * kfd_ioctl_dbg_trap_set_node_address_watch_args1338 * struct kfd_ioctl_dbg_trap_set_node_address_watch_args - Arguments for
1339 * KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH
1339 *1340 *
1340 * Arguments for KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH
1341 * Sets address watch for device.1341 * Sets address watch for device.
1342 *1342 *
1343 * @address (IN) - watch address to set1343 * @address: (IN) - watch address to set
1344 * @mode (IN) - see kfd_dbg_trap_address_watch_mode1344 * @mode: (IN) - see kfd_dbg_trap_address_watch_mode
1345 * @mask (IN) - watch address mask1345 * @mask: (IN) - watch address mask
1346 * @gpu_id (IN) - target gpu to set watch point1346 * @gpu_id: (IN) - target gpu to set watch point
1347 * @id (OUT) - watch id allocated1347 * @id: (OUT) - watch id allocated
1348 *1348 *
1349 * Generic errors apply (see kfd_dbg_trap_operations).1349 * Generic errors apply (see kfd_dbg_trap_operations).
1350 * Return - 0 on SUCCESS.1350 * Return - 0 on SUCCESS.
...@@ -1361,13 +1361,13 @@ struct kfd_ioctl_dbg_trap_set_node_address_watch_args {...@@ -1361,13 +1361,13 @@ struct kfd_ioctl_dbg_trap_set_node_address_watch_args {
1361};1361};
13621362
1363/**1363/**
1364 * kfd_ioctl_dbg_trap_clear_node_address_watch_args1364 * struct kfd_ioctl_dbg_trap_clear_node_address_watch_args - Arguments for
1365 * KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH
1365 *1366 *
1366 * Arguments for KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH
1367 * Clear address watch for device.1367 * Clear address watch for device.
1368 *1368 *
1369 * @gpu_id (IN) - target device to clear watch point1369 * @gpu_id: (IN) - target device to clear watch point
1370 * @id (IN) - allocated watch id to clear1370 * @id: (IN) - allocated watch id to clear
1371 *1371 *
1372 * Generic errors apply (see kfd_dbg_trap_operations).1372 * Generic errors apply (see kfd_dbg_trap_operations).
1373 * Return - 0 on SUCCESS.1373 * Return - 0 on SUCCESS.
...@@ -1380,12 +1380,12 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args {...@@ -1380,12 +1380,12 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args {
1380};1380};
13811381
1382/**1382/**
1383 * kfd_ioctl_dbg_trap_set_flags_args1383 * struct kfd_ioctl_dbg_trap_set_flags_args - Arguments for
1384 * KFD_IOC_DBG_TRAP_SET_FLAGS
1384 *1385 *
1385 * Arguments for KFD_IOC_DBG_TRAP_SET_FLAGS
1386 * Sets flags for wave behaviour.1386 * Sets flags for wave behaviour.
1387 *1387 *
1388 * @flags (IN/OUT) - IN = flags to enable, OUT = flags previously enabled1388 * @flags: (IN/OUT) - IN = flags to enable, OUT = flags previously enabled
1389 *1389 *
1390 * Generic errors apply (see kfd_dbg_trap_operations).1390 * Generic errors apply (see kfd_dbg_trap_operations).
1391 * Return - 0 on SUCCESS.1391 * Return - 0 on SUCCESS.
...@@ -1393,13 +1393,13 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args {...@@ -1393,13 +1393,13 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args {
1393 */1393 */
1394struct kfd_ioctl_dbg_trap_set_flags_args {1394struct kfd_ioctl_dbg_trap_set_flags_args {
1395 __u32 flags;1395 __u32 flags;
1396 /* private: */
1396 __u32 pad;1397 __u32 pad;
1397};1398};
13981399
1399/**1400/**
1400 * kfd_ioctl_dbg_trap_query_debug_event_args1401 * struct kfd_ioctl_dbg_trap_query_debug_event_args - Arguments for
1401 *1402 * KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT
1402 * Arguments for KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT
1403 *1403 *
1404 * Find one or more raised exceptions. This function can return multiple1404 * Find one or more raised exceptions. This function can return multiple
1405 * exceptions from a single queue or a single device with one call. To find1405 * exceptions from a single queue or a single device with one call. To find
...@@ -1409,9 +1409,9 @@ struct kfd_ioctl_dbg_trap_set_flags_args {...@@ -1409,9 +1409,9 @@ struct kfd_ioctl_dbg_trap_set_flags_args {
1409 * However, clearing an exception prevents retrieving further information1409 * However, clearing an exception prevents retrieving further information
1410 * about it with KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO.1410 * about it with KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO.
1411 *1411 *
1412 * @exception_mask (IN/OUT) - exception to clear (IN) and raised (OUT)1412 * @exception_mask: (IN/OUT) - exception to clear (IN) and raised (OUT)
1413 * @gpu_id (OUT) - gpu id of exceptions raised1413 * @gpu_id: (OUT) - gpu id of exceptions raised
1414 * @queue_id (OUT) - queue id of exceptions raised1414 * @queue_id: (OUT) - queue id of exceptions raised
1415 *1415 *
1416 * Generic errors apply (see kfd_dbg_trap_operations).1416 * Generic errors apply (see kfd_dbg_trap_operations).
1417 * Return - 0 on raised exception found1417 * Return - 0 on raised exception found
...@@ -1426,16 +1426,16 @@ struct kfd_ioctl_dbg_trap_query_debug_event_args {...@@ -1426,16 +1426,16 @@ struct kfd_ioctl_dbg_trap_query_debug_event_args {
1426};1426};
14271427
1428/**1428/**
1429 * kfd_ioctl_dbg_trap_query_exception_info_args1429 * struct kfd_ioctl_dbg_trap_query_exception_info_args - Arguments for
1430 * KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO
1430 *1431 *
1431 * Arguments KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO
1432 * Get additional info on raised exception.1432 * Get additional info on raised exception.
1433 *1433 *
1434 * @info_ptr (IN) - pointer to exception info buffer to copy to1434 * @info_ptr: (IN) - pointer to exception info buffer to copy to
1435 * @info_size (IN/OUT) - exception info buffer size (bytes)1435 * @info_size: (IN/OUT) - exception info buffer size (bytes)
1436 * @source_id (IN) - target gpu or queue id1436 * @source_id: (IN) - target gpu or queue id
1437 * @exception_code (IN) - target exception1437 * @exception_code: (IN) - target exception
1438 * @clear_exception (IN) - clear raised @exception_code exception1438 * @clear_exception: (IN) - clear raised @exception_code exception
1439 * (0 = false, 1 = true)1439 * (0 = false, 1 = true)
1440 *1440 *
1441 * Generic errors apply (see kfd_dbg_trap_operations).1441 * Generic errors apply (see kfd_dbg_trap_operations).
...@@ -1455,20 +1455,20 @@ struct kfd_ioctl_dbg_trap_query_exception_info_args {...@@ -1455,20 +1455,20 @@ struct kfd_ioctl_dbg_trap_query_exception_info_args {
1455};1455};
14561456
1457/**1457/**
1458 * kfd_ioctl_dbg_trap_get_queue_snapshot_args1458 * struct kfd_ioctl_dbg_trap_queue_snapshot_args - Arguments for
1459 * KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT
1459 *1460 *
1460 * Arguments KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT
1461 * Get queue information.1461 * Get queue information.
1462 *1462 *
1463 * @exception_mask (IN) - exceptions raised to clear1463 * @exception_mask: (IN) - exceptions raised to clear
1464 * @snapshot_buf_ptr (IN) - queue snapshot entry buffer (see kfd_queue_snapshot_entry)1464 * @snapshot_buf_ptr: (IN) - queue snapshot entry buffer (see kfd_queue_snapshot_entry)
1465 * @num_queues (IN/OUT) - number of queue snapshot entries1465 * @num_queues: (IN/OUT) - number of queue snapshot entries
1466 * The debugger specifies the size of the array allocated in @num_queues.1466 * The debugger specifies the size of the array allocated in @num_queues.
1467 * KFD returns the number of queues that actually existed. If this is1467 * KFD returns the number of queues that actually existed. If this is
1468 * larger than the size specified by the debugger, KFD will not overflow1468 * larger than the size specified by the debugger, KFD will not overflow
1469 * the array allocated by the debugger.1469 * the array allocated by the debugger.
1470 *1470 *
1471 * @entry_size (IN/OUT) - size per entry in bytes1471 * @entry_size: (IN/OUT) - size per entry in bytes
1472 * The debugger specifies sizeof(struct kfd_queue_snapshot_entry) in1472 * The debugger specifies sizeof(struct kfd_queue_snapshot_entry) in
1473 * @entry_size. KFD returns the number of bytes actually populated per1473 * @entry_size. KFD returns the number of bytes actually populated per
1474 * entry. The debugger should use the KFD_IOCTL_MINOR_VERSION to determine,1474 * entry. The debugger should use the KFD_IOCTL_MINOR_VERSION to determine,
...@@ -1491,20 +1491,20 @@ struct kfd_ioctl_dbg_trap_queue_snapshot_args {...@@ -1491,20 +1491,20 @@ struct kfd_ioctl_dbg_trap_queue_snapshot_args {
1491};1491};
14921492
1493/**1493/**
1494 * kfd_ioctl_dbg_trap_get_device_snapshot_args1494 * struct kfd_ioctl_dbg_trap_device_snapshot_args - Arguments for
1495 * KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT
1495 *1496 *
1496 * Arguments for KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT
1497 * Get device information.1497 * Get device information.
1498 *1498 *
1499 * @exception_mask (IN) - exceptions raised to clear1499 * @exception_mask: (IN) - exceptions raised to clear
1500 * @snapshot_buf_ptr (IN) - pointer to snapshot buffer (see kfd_dbg_device_info_entry)1500 * @snapshot_buf_ptr: (IN) - pointer to snapshot buffer (see kfd_dbg_device_info_entry)
1501 * @num_devices (IN/OUT) - number of debug devices to snapshot1501 * @num_devices: (IN/OUT) - number of debug devices to snapshot
1502 * The debugger specifies the size of the array allocated in @num_devices.1502 * The debugger specifies the size of the array allocated in @num_devices.
1503 * KFD returns the number of devices that actually existed. If this is1503 * KFD returns the number of devices that actually existed. If this is
1504 * larger than the size specified by the debugger, KFD will not overflow1504 * larger than the size specified by the debugger, KFD will not overflow
1505 * the array allocated by the debugger.1505 * the array allocated by the debugger.
1506 *1506 *
1507 * @entry_size (IN/OUT) - size per entry in bytes1507 * @entry_size: (IN/OUT) - size per entry in bytes
1508 * The debugger specifies sizeof(struct kfd_dbg_device_info_entry) in1508 * The debugger specifies sizeof(struct kfd_dbg_device_info_entry) in
1509 * @entry_size. KFD returns the number of bytes actually populated. The1509 * @entry_size. KFD returns the number of bytes actually populated. The
1510 * debugger should use KFD_IOCTL_MINOR_VERSION to determine, which fields1510 * debugger should use KFD_IOCTL_MINOR_VERSION to determine, which fields
...@@ -1527,12 +1527,10 @@ struct kfd_ioctl_dbg_trap_device_snapshot_args {...@@ -1527,12 +1527,10 @@ struct kfd_ioctl_dbg_trap_device_snapshot_args {
1527};1527};
15281528
1529/**1529/**
1530 * kfd_ioctl_dbg_trap_args1530 * struct kfd_ioctl_dbg_trap_args - Arguments to debug target process.
1531 *
1532 * Arguments to debug target process.
1533 *1531 *
1534 * @pid - target process to debug1532 * @pid: target process to debug
1535 * @op - debug operation (see kfd_dbg_trap_operations)1533 * @op: debug operation (see kfd_dbg_trap_operations)
1536 *1534 *
1537 * @op determines which union struct args to use.1535 * @op determines which union struct args to use.
1538 * Refer to kern docs for each kfd_ioctl_dbg_trap_*_args struct.1536 * Refer to kern docs for each kfd_ioctl_dbg_trap_*_args struct.
...@@ -1567,7 +1565,7 @@ enum kfd_profiler_ops {...@@ -1567,7 +1565,7 @@ enum kfd_profiler_ops {
1567};1565};
15681566
1569/**1567/**
1570 * Enables/Disables GPU Specific profiler settings1568 * struct kfd_ioctl_pmc_settings - Enables/Disables GPU Specific profiler settings
1571 */1569 */
1572struct kfd_ioctl_pmc_settings {1570struct kfd_ioctl_pmc_settings {
1573 __u32 gpu_id; /* This is the user_gpu_id */1571 __u32 gpu_id; /* This is the user_gpu_id */
lib/libc/include/any-linux-any/linux/kvm.h+4
...@@ -986,6 +986,8 @@ struct kvm_enable_cap {...@@ -986,6 +986,8 @@ struct kvm_enable_cap {
986#define KVM_CAP_S390_KEYOP 247986#define KVM_CAP_S390_KEYOP 247
987#define KVM_CAP_S390_VSIE_ESAMODE 248987#define KVM_CAP_S390_VSIE_ESAMODE 248
988#define KVM_CAP_S390_HPAGE_2G 249988#define KVM_CAP_S390_HPAGE_2G 249
989#define KVM_CAP_PPC_COMPAT_CAPS 250
990#define KVM_CAP_ARM_PMU_V3_STRICT 251
989991
990struct kvm_irq_routing_irqchip {992struct kvm_irq_routing_irqchip {
991 __u32 irqchip;993 __u32 irqchip;
...@@ -1330,6 +1332,8 @@ struct kvm_s390_keyop {...@@ -1330,6 +1332,8 @@ struct kvm_s390_keyop {
1330/* Available with KVM_CAP_COUNTER_OFFSET */1332/* Available with KVM_CAP_COUNTER_OFFSET */
1331#define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset)1333#define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset)
1332#define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_range)1334#define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_range)
1335/* Available with KVM_CAP_PPC_COMPAT_CAPS */
1336#define KVM_PPC_GET_COMPAT_CAPS _IO(KVMIO, 0xb8)
13331337
1334/* ioctl for vm fd */1338/* ioctl for vm fd */
1335#define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)1339#define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)
lib/libc/include/any-linux-any/linux/landlock.h+18-4
...@@ -191,12 +191,25 @@ struct landlock_ruleset_attr {...@@ -191,12 +191,25 @@ struct landlock_ruleset_attr {
191 *191 *
192 * If the calling thread is running with no_new_privs, this operation192 * If the calling thread is running with no_new_privs, this operation
193 * enables no_new_privs on the sibling threads as well.193 * enables no_new_privs on the sibling threads as well.
194 *
195 * The following flag ties the no_new_privs attribute to the ruleset
196 * enforcement:
197 *
198 * %LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS
199 * Sets the no_new_privs attribute of the calling thread only once the
200 * enforcement of the ruleset succeeded: no_new_privs is set if and only
201 * if sys_landlock_restrict_self() succeeds. This removes the need for a
202 * prior :manpage:`prctl(2)` ``PR_SET_NO_NEW_PRIVS`` call (or
203 * %CAP_SYS_ADMIN use). This flag requires a ruleset. When
204 * combined with %LANDLOCK_RESTRICT_SELF_TSYNC, no_new_privs is set on the
205 * sibling threads as well.
194 */206 */
195/* clang-format off */207/* clang-format off */
196#define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)208#define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)
197#define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON (1U << 1)209#define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON (1U << 1)
198#define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF (1U << 2)210#define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF (1U << 2)
199#define LANDLOCK_RESTRICT_SELF_TSYNC (1U << 3)211#define LANDLOCK_RESTRICT_SELF_TSYNC (1U << 3)
212#define LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS (1U << 4)
200/* clang-format on */213/* clang-format on */
201214
202/**215/**
...@@ -315,16 +328,16 @@ struct landlock_net_port_attr {...@@ -315,16 +328,16 @@ struct landlock_net_port_attr {
315 * :manpage:`connect(2)` as well as calls to :manpage:`sendmsg(2)` with an328 * :manpage:`connect(2)` as well as calls to :manpage:`sendmsg(2)` with an
316 * explicit recipient address.329 * explicit recipient address.
317 *330 *
318 * This access right only applies to connections to UNIX server sockets which331 * This access right applies only to connections to UNIX server sockets which
319 * were created outside of the newly created Landlock domain (e.g. from within332 * were created outside of the newly created Landlock domain (e.g. from within
320 * a parent domain or from an unrestricted process). Newly created UNIX333 * a parent domain or from an unrestricted process). Newly created UNIX
321 * servers within the same Landlock domain continue to be accessible. In this334 * servers within the same Landlock domain continue to be accessible. In this
322 * regard, %LANDLOCK_ACCESS_FS_RESOLVE_UNIX has the same semantics as the335 * regard, %LANDLOCK_ACCESS_FS_RESOLVE_UNIX has the same semantics as the
323 * ``LANDLOCK_SCOPE_*`` flags.336 * ``LANDLOCK_SCOPE_*`` flags.
324 *337 *
325 * If a resolve attempt is denied, the operation returns an ``EACCES`` error,338 * If a resolution attempt is denied, the operation returns an ``EACCES``
326 * in line with other filesystem access rights (but different to denials for339 * error, in line with other filesystem access rights (but different to
327 * abstract UNIX domain sockets).340 * denials for abstract UNIX domain sockets).
328 *341 *
329 * This access right is available since the ninth version of the Landlock ABI.342 * This access right is available since the ninth version of the Landlock ABI.
330 *343 *
...@@ -351,6 +364,7 @@ struct landlock_net_port_attr {...@@ -351,6 +364,7 @@ struct landlock_net_port_attr {
351 * device.364 * device.
352 * - %LANDLOCK_ACCESS_FS_MAKE_DIR: Create (or rename) a directory.365 * - %LANDLOCK_ACCESS_FS_MAKE_DIR: Create (or rename) a directory.
353 * - %LANDLOCK_ACCESS_FS_MAKE_REG: Create (or rename or link) a regular file.366 * - %LANDLOCK_ACCESS_FS_MAKE_REG: Create (or rename or link) a regular file.
367 * This also guards the creation of whiteout objects as used in OverlayFS.
354 * - %LANDLOCK_ACCESS_FS_MAKE_SOCK: Create (or rename or link) a UNIX domain368 * - %LANDLOCK_ACCESS_FS_MAKE_SOCK: Create (or rename or link) a UNIX domain
355 * socket.369 * socket.
356 * - %LANDLOCK_ACCESS_FS_MAKE_FIFO: Create (or rename or link) a named pipe.370 * - %LANDLOCK_ACCESS_FS_MAKE_FIFO: Create (or rename or link) a named pipe.
lib/libc/include/any-linux-any/linux/magic.h+2
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define AUTOFS_SUPER_MAGIC 0x01878#define AUTOFS_SUPER_MAGIC 0x0187
9#define CEPH_SUPER_MAGIC 0x00c364009#define CEPH_SUPER_MAGIC 0x00c36400
10#define CODA_SUPER_MAGIC 0x7375724510#define CODA_SUPER_MAGIC 0x73757245
11#define CONFIGFS_MAGIC 0x62656570 /* some random number */
11#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */12#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */
12#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */13#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */
13#define DEBUGFS_MAGIC 0x6462672014#define DEBUGFS_MAGIC 0x64626720
...@@ -105,5 +106,6 @@...@@ -105,5 +106,6 @@
105#define PID_FS_MAGIC 0x50494446 /* "PIDF" */106#define PID_FS_MAGIC 0x50494446 /* "PIDF" */
106#define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */107#define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */
107#define NULL_FS_MAGIC 0x4E554C4C /* "NULL" */108#define NULL_FS_MAGIC 0x4E554C4C /* "NULL" */
109#define FAIL_FS_MAGIC 0x4641494C /* "FAIL" */
108110
109#endif /* __LINUX_MAGIC_H__ */111#endif /* __LINUX_MAGIC_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/mdio.h+5
...@@ -332,8 +332,13 @@...@@ -332,8 +332,13 @@
332#define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */332#define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */
333#define MDIO_AN_10GBT_CTRL_ADV5G 0x0100 /* Advertise 5GBASE-T */333#define MDIO_AN_10GBT_CTRL_ADV5G 0x0100 /* Advertise 5GBASE-T */
334#define MDIO_AN_10GBT_CTRL_ADV10G 0x1000 /* Advertise 10GBASE-T */334#define MDIO_AN_10GBT_CTRL_ADV10G 0x1000 /* Advertise 10GBASE-T */
335#define MDIO_AN_10GBT_CTRL_MS_ENABLE 0x8000 /* Master/slave manual config enable */
336#define MDIO_AN_10GBT_CTRL_MS_VALUE 0x4000 /* Master/slave config value (1=Master) */
337#define MDIO_AN_10GBT_CTRL_MS_PORT_TYPE 0x2000 /* Master Preferred Type */
335338
336/* AN 10GBASE-T status register. */339/* AN 10GBASE-T status register. */
340#define MDIO_AN_10GBT_STAT_MS_FAULT 0x8000 /* Master/slave fault */
341#define MDIO_AN_10GBT_STAT_MS_RES 0x4000 /* Master/slave resolution (1=Master) */
337#define MDIO_AN_10GBT_STAT_LP2_5G 0x0020 /* LP is 2.5GBT capable */342#define MDIO_AN_10GBT_STAT_LP2_5G 0x0020 /* LP is 2.5GBT capable */
338#define MDIO_AN_10GBT_STAT_LP5G 0x0040 /* LP is 5GBT capable */343#define MDIO_AN_10GBT_STAT_LP5G 0x0040 /* LP is 5GBT capable */
339#define MDIO_AN_10GBT_STAT_LPTRR 0x0200 /* LP training reset req. */344#define MDIO_AN_10GBT_STAT_LPTRR 0x0200 /* LP training reset req. */
lib/libc/include/any-linux-any/linux/media/arm/mali-c55-config.h+85-1
...@@ -36,6 +36,9 @@...@@ -36,6 +36,9 @@
36 */36 */
37#define MALI_C55_MAX_ZONES (15 * 15)37#define MALI_C55_MAX_ZONES (15 * 15)
3838
39/* Number of RGB gamma LUT entries. */
40#define MALI_C55_NUM_GAMMA_LUT_ELEMENTS 129
41
39/**42/**
40 * struct mali_c55_ae_1024bin_hist - Auto Exposure 1024-bin histogram statistics43 * struct mali_c55_ae_1024bin_hist - Auto Exposure 1024-bin histogram statistics
41 *44 *
...@@ -219,6 +222,9 @@ struct mali_c55_stats_buffer {...@@ -219,6 +222,9 @@ struct mali_c55_stats_buffer {
219 * @MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP: Auto-white balance gains for AEXP-0 tap222 * @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 configuration223 * @MALI_C55_PARAM_MESH_SHADING_CONFIG : Mesh shading tables configuration
221 * @MALI_C55_PARAM_MESH_SHADING_SELECTION: Mesh shading table selection224 * @MALI_C55_PARAM_MESH_SHADING_SELECTION: Mesh shading table selection
225 * @MALI_C55_PARAM_BLOCK_CCM: Colour correction matrix
226 * @MALI_C55_PARAM_BLOCK_GAMMA_FR: Gamma gain and offset for FR pipe
227 * @MALI_C55_PARAM_BLOCK_GAMMA_DS: Gamma gain and offset for DS pipe
222 */228 */
223enum mali_c55_param_block_type {229enum mali_c55_param_block_type {
224 MALI_C55_PARAM_BLOCK_SENSOR_OFFS,230 MALI_C55_PARAM_BLOCK_SENSOR_OFFS,
...@@ -232,6 +238,9 @@ enum mali_c55_param_block_type {...@@ -232,6 +238,9 @@ enum mali_c55_param_block_type {
232 MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP,238 MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP,
233 MALI_C55_PARAM_MESH_SHADING_CONFIG,239 MALI_C55_PARAM_MESH_SHADING_CONFIG,
234 MALI_C55_PARAM_MESH_SHADING_SELECTION,240 MALI_C55_PARAM_MESH_SHADING_SELECTION,
241 MALI_C55_PARAM_BLOCK_CCM,
242 MALI_C55_PARAM_BLOCK_GAMMA_FR,
243 MALI_C55_PARAM_BLOCK_GAMMA_DS,
235};244};
236245
237/**246/**
...@@ -757,6 +766,78 @@ struct mali_c55_params_mesh_shading_selection {...@@ -757,6 +766,78 @@ struct mali_c55_params_mesh_shading_selection {
757 __u16 mesh_strength;766 __u16 mesh_strength;
758};767};
759768
769/**
770 * struct mali_c55_params_ccm - Coefficients, offsets and gains for the colour
771 * correction matrix
772 *
773 * The colour correction module converts images data from a sensor-specific
774 * colour space to known one.
775 *
776 * Colour correction is applied after demosaicing and each pixel is represented
777 * as a column vector of the three RGB colour channels on which the following
778 * operations take place:
779 * 1) An offset is subtracted from each colour channel
780 * 2) Each colour channel is multiplied by a gain
781 * 3) The pixel column vector is multiplied by the colour correction matrix
782 *
783 * This struct allows users to configure the coefficients for CCM and the
784 * per-channel offsets and gains. The nine matrix coefficients are expressed as
785 * 13 bits signed Q4.8 Sign/Magnitude fixed-point numbers, the three gain
786 * multipliers are expressed as 12 bits unsigned Q4.8 fixed-point numbers and
787 * the three offsets are expressed as a 12 bits unsigned integers.
788 *
789 * header.type should be set to MALI_C55_PARAM_BLOCK_CCM from
790 * :c:type:`mali_c55_param_block_type`.
791 *
792 * @header: The Mali-C55 parameters block header
793 * @coeffs: 3x3 color conversion matrix coefficients in sign/magnitude
794 * Q4.8 format
795 * @gains: Gains for red, green and blue channels in unsigned Q4.8 format
796 * @offs: Offsets for red, green and blue channels
797 */
798struct mali_c55_params_ccm {
799 struct v4l2_isp_params_block_header header;
800 __u16 coeffs[3][3];
801 __u16 gains[3];
802 __u16 offs[3];
803};
804
805/**
806 * struct mali_c55_params_gamma - RGB Gamma correction
807 *
808 * Gamma correction is used to program a standard gamma curve such as the sRGB
809 * one. It provides gains and offsets to implement contrast adjustments.
810 *
811 * Gamma correction is applied on both the FR and DS pipes separately in the RGB
812 * colour domain where the following operations take place:
813 * 1) An offset is subtracted from each colour channel
814 * 2) Each colour channel is multiplied by a gain
815 * 3) The Gamma LUT is applied to each colour channel
816 *
817 * The Gamma LUT has 129 entries where each node is an unsigned 12 bit number.
818 * It is expected that LUT[0]=0 and LUT[128]=0xfff, with the other 127 values
819 * defining the Gamma correction curve. The three gain multipliers are expressed
820 * as 12-bits unsigned Q4.8 fixed-point numbers and the three offsets are
821 * expressed as a 12-bits unsigned integers.
822 *
823 * As one Gamma correction block is available on both the FR and DS pipes, the
824 * header.type field should be set to one of either
825 * MALI_C55_PARAM_BLOCK_GAMMA_FR or MALI_C55_PARAM_BLOCK_GAMMA_DS from
826 * :c:type:`mali_c55_param_block_type`.
827 *
828 * @header: The Mali-C55 parameters block header
829 * @gains: Gains for the red, green and blue channel in unsigned Q4.8 format
830 * @offs: Offsets subtracted from the red, green and blue channels
831 * in unsigned 12 bits format
832 * @lut: 129-node Gamma LUT in unsigned 12 bits format
833 */
834struct mali_c55_params_gamma {
835 struct v4l2_isp_params_block_header header;
836 __u16 gains[3];
837 __u16 offs[3];
838 __u32 lut[MALI_C55_NUM_GAMMA_LUT_ELEMENTS];
839};
840
760/**841/**
761 * define MALI_C55_PARAMS_MAX_SIZE - Maximum size of all Mali C55 Parameters842 * define MALI_C55_PARAMS_MAX_SIZE - Maximum size of all Mali C55 Parameters
762 *843 *
...@@ -780,6 +861,9 @@ struct mali_c55_params_mesh_shading_selection {...@@ -780,6 +861,9 @@ struct mali_c55_params_mesh_shading_selection {
780 sizeof(struct mali_c55_params_awb_config) + \861 sizeof(struct mali_c55_params_awb_config) + \
781 sizeof(struct mali_c55_params_awb_gains) + \862 sizeof(struct mali_c55_params_awb_gains) + \
782 sizeof(struct mali_c55_params_mesh_shading_config) + \863 sizeof(struct mali_c55_params_mesh_shading_config) + \
783 sizeof(struct mali_c55_params_mesh_shading_selection))864 sizeof(struct mali_c55_params_mesh_shading_selection) + \
865 sizeof(struct mali_c55_params_ccm) + \
866 sizeof(struct mali_c55_params_gamma) + \
867 sizeof(struct mali_c55_params_gamma))
784868
785#endif /* __UAPI_MALI_C55_CONFIG_H */869#endif /* __UAPI_MALI_C55_CONFIG_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/media/dreamchip/rppx1-config.h created+730
...@@ -0,0 +1,730 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * Dreamchip RPP-X1 ISP Driver - Userspace API
4 *
5 * Copyright (C) 2026 Renesas Electronics Corp.
6 * Copyright (C) 2026 Ideas on Board Oy
7 * Copyright (C) 2026 Ragnatech AB
8 */
9
10#ifndef __UAPI_RPP_X1_CONFIG_H
11#define __UAPI_RPP_X1_CONFIG_H
12
13#include <linux/media/v4l2-isp.h>
14
15/**
16 * struct rppx1_window - Measurement window
17 *
18 * RPP-X1 measurement window. Different blocks use a window or multiple
19 * windows for measurement purposes. This defines a common type for all of
20 * them. The number of relevant bits depends on the block where the window is
21 * used and is specified in the per-block description
22 *
23 * @h_offs: horizontal offset from the left of the frame in pixels
24 * @v_offs: vertical offset from the top of the frame in pixels
25 * @h_size: horizontal size of the window in pixels
26 * @v_size: vertical size of the window in pixels
27 */
28struct rppx1_window {
29 __u16 h_offs;
30 __u16 v_offs;
31 __u16 h_size;
32 __u16 v_size;
33};
34
35/**
36 * enum rppx1_meas_chan - Measurement point for the Histogram and EXM Modules
37 *
38 * Measurement points for the RPP-X1 Histogram measurement module and Exposure
39 * measurement module.
40 *
41 * All tap points are available for the PRE1/PRE2 pipes. Only
42 * RPPX1_MEAS_CHAN_SEL4 and RPPX1_MEAS_CHAN_SEL7 are available for the
43 * MAIN_POST pipe.
44 *
45 * @RPPX1_MEAS_CHAN_SEL0: after input acquisition
46 * @RPPX1_MEAS_CHAN_SEL1: after black level subtraction
47 * @RPPX1_MEAS_CHAN_SEL2: after sensor gamma linearization
48 * @RPPX1_MEAS_CHAN_SEL3: after lens shading correction
49 * @RPPX1_MEAS_CHAN_SEL4: after auto white balance gains
50 * @RPPX1_MEAS_CHAN_SEL5: after defect pixel correction
51 * @RPPX1_MEAS_CHAN_SEL6: after denoise pre-filter
52 * @RPPX1_MEAS_CHAN_SEL7: after demosaicing
53 */
54enum rppx1_meas_chan {
55 RPPX1_MEAS_CHAN_SEL0,
56 RPPX1_MEAS_CHAN_SEL1,
57 RPPX1_MEAS_CHAN_SEL2,
58 RPPX1_MEAS_CHAN_SEL3,
59 RPPX1_MEAS_CHAN_SEL4,
60 RPPX1_MEAS_CHAN_SEL5,
61 RPPX1_MEAS_CHAN_SEL6,
62 RPPX1_MEAS_CHAN_SEL7,
63};
64
65/* ---------------------------------------------------------------------------
66 * Parameter Structures
67 *
68 * The same ISP block might be instantiated in multiple pipeliness and operate
69 * on a different bitdepth/precision. For fields of varying length among
70 * different instances of the same block, use a data type that can accommodate
71 * the larger bitdepth/precision.
72 */
73
74/**
75 * enum rppx1_params_block_type - RPP-X1 extensible params block types
76 *
77 * NOTE: Only append to the enumeration as the numbers are uAPI.
78 *
79 * @RPPX1_PARAMS_BLOCK_TYPE_WBMEAS_POST: AWB Measurement Configuration
80 * @RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE1: PRE1 pipe White Balance Gains
81 * @RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE2: PRE2 White Balance Gains
82 * @RPPX1_PARAMS_BLOCK_TYPE_AWBG_POST: MAIN_POST White Balance Gains
83 * @RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE1: PRE1 pipe Exposure Measurement
84 * @RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE2: PRE2 pipe Exposure Measurement
85 * @RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE1: PRE1 pipe Histogram Measurement
86 * @RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE2: PRE2 pipe Histogram Measurement
87 * @RPPX1_PARAMS_BLOCK_TYPE_HIST_POST: POST pipe Histogram Measurement
88 * @RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE1: PRE1 pipe Black Level Subtraction
89 * @RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE2: PRE2 pipe Black Level Subtraction
90 * @RPPX1_PARAMS_BLOCK_TYPE_CCOR_POST: POST pipe Color Correction
91 * @RPPX1_PARAMS_BLOCK_TYPE_LSC_PRE1: PRE1 pipe Lens Shading Correction
92 * @RPPX1_PARAMS_BLOCK_TYPE_LSC_PRE2: PRE2 pipe Lens Shading Correction
93 * @RPPX1_PARAMS_BLOCK_TYPE_GA_HV: Human Vision Pipe Gamma Out Correction
94 * @RPPX1_PARAMS_BLOCK_TYPE_GA_MV: Machine Vision Gamma Out Correction
95 * @RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE1: PRE1 pipe Linearization (Sensor De-gamma)
96 * @RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE2: PRE2 pipe Linearization (Sensor De-gamma)
97 */
98enum rppx1_params_block_type {
99 RPPX1_PARAMS_BLOCK_TYPE_WBMEAS_POST,
100 RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE1,
101 RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE2,
102 RPPX1_PARAMS_BLOCK_TYPE_AWBG_POST,
103 RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE1,
104 RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE2,
105 RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE1,
106 RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE2,
107 RPPX1_PARAMS_BLOCK_TYPE_HIST_POST,
108 RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE1,
109 RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE2,
110 RPPX1_PARAMS_BLOCK_TYPE_CCOR_POST,
111 RPPX1_PARAMS_BLOCK_TYPE_LSC_PRE1,
112 RPPX1_PARAMS_BLOCK_TYPE_LSC_PRE2,
113 RPPX1_PARAMS_BLOCK_TYPE_GA_HV,
114 RPPX1_PARAMS_BLOCK_TYPE_GA_MV,
115 RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE1,
116 RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE2,
117};
118
119/**
120 * enum rppx1_wbmeas_mode - AWB measurement mode
121 *
122 * @RPPX1_WBMEAS_MODE_YCBCR: YCbCr measurement mode
123 * @RPPX1_WBMEAS_MODE_RGB: RGB measurement mode
124 */
125enum rppx1_wbmeas_mode {
126 RPPX1_WBMEAS_MODE_YCBCR,
127 RPPX1_WBMEAS_MODE_RGB,
128};
129
130/**
131 * struct rppx1_wbmeas_params - AWB measurement configuration
132 *
133 * The Auto-White Balance measurement module is available on the MAIN_POST pipe.
134 * It supports two measurement modes, selected by the @mode field. The
135 * measurement window is programmed through the @wnd field.
136 *
137 * To support measurement in YCbCr mode a color conversion matrix with
138 * programmable offset is available in the @ccor_coeff and @ccor_offs fields.
139 * The color conversion matrix coefficients are represented as 16 bits signed
140 * Q4.12 numbers ranging from -8 to +7.99. The per-color channel offsets are
141 * represented as 25 bits 2's complement integer numbers ranging from -16777216
142 * to +16777215.
143 *
144 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_WBMEAS_POST)
145 * @wnd: measurement window
146 * @mode: measurement mode (from enum rppx1_wbmeas_mode)
147 * @ymax_cmp: enable Y_MAX compare using @max_y
148 * @frames: number of frames for mean value calculation (0 = 1 frame)
149 * @reserved: padding
150 * @ref_cr_max_r: reference Cr or max red value in RGB mode, 24 bits
151 * @ref_cb_max_b: reference Cb or max blue value in RGB mode, 24 bits
152 * @min_y_max_g: luminance minimum value or max green value in RGB mode, 24 bits
153 * @max_y: luminance maximum value, only valid if @mode is set to YCbCr and
154 * @ymax_cmp is set to enabled, 24 bits
155 * @max_csum: chrominance sum maximum value, 24 bits
156 * @min_c: chrominance minimum value, 24 bits
157 * @ccor_coeff: coefficients for color conversion matrix, signed 16 bits Q4.6
158 * @reserved2: padding
159 * @ccor_offs: R-G-B color conversion coefficients, signed 25 bits 2's complement
160 * @reserved3: padding
161 */
162struct rppx1_wbmeas_params {
163 struct v4l2_isp_params_block_header header;
164 struct rppx1_window wnd;
165 __u8 mode;
166 __u8 ymax_cmp;
167 __u8 frames;
168 __u8 reserved;
169 __u32 ref_cr_max_r;
170 __u32 ref_cb_max_b;
171 __u32 min_y_max_g;
172 __u32 max_y;
173 __u32 max_csum;
174 __u32 min_c;
175 __u16 ccor_coeff[3][3];
176 __u16 reserved2;
177 __u32 ccor_offs[3];
178 __u32 reserved3;
179};
180
181/**
182 * struct rppx1_awbg_params - WB gain configuration
183 *
184 * The RPP-X1 White Balance Gain module is available in the PRE1 and PRE2
185 * pre-fusion pipes and in the MAIN_POST post-fusion pipe. Userspace selects
186 * which pipe to operate by setting the @header.type field to
187 * RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE1, RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE2
188 * or RPPX1_PARAMS_BLOCK_TYPE_AWBG_POST.
189 *
190 * The White Balance module allows to specify per-color channel gains, expressed
191 * as unsigned fixed-point values as 18 bits unsigned integers in Q6.12 format
192 * with a maximum of 63.999.
193 *
194 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE1 or
195 * type = RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE2 or
196 * type = RPPX1_PARAMS_BLOCK_TYPE_AWBG_POST)
197 * @gain_red: gain for red component, 18-bit (unsigned Q6.12)
198 * @gain_green_r: gain for green component in red lines, 18-bit (unsigned Q6.12)
199 * @gain_blue: gain for blue component, 18-bit (unsigned Q6.12)
200 * @gain_green_b: gain for green component in blue lines, 18-bit (unsigned Q6.12)
201 */
202struct rppx1_awbg_params {
203 struct v4l2_isp_params_block_header header;
204 __u32 gain_red;
205 __u32 gain_green_r;
206 __u32 gain_blue;
207 __u32 gain_green_b;
208};
209
210/**
211 * enum rppx1_exm_mode - Exposure measurement mode
212 *
213 * Exaposure measurement mode selection (RGB/Bayer).
214 *
215 * @RPPX1_EXP_MEASURING_MODE_DISABLED: no measurement
216 * @RPPX1_EXP_MEASURING_MODE_RGB: Y/R/G/B measurement
217 * @RPPX1_EXP_MEASURING_MODE_BAYER: Bayer RGB measurement
218 */
219enum rppx1_exm_mode {
220 RPPX1_EXP_MEASURING_MODE_DISABLED,
221 RPPX1_EXP_MEASURING_MODE_RGB,
222 RPPX1_EXP_MEASURING_MODE_BAYER,
223};
224
225/**
226 * struct rppx1_exm_params - Exposure measurement configuration
227 *
228 * The RPP-X1 Exposure measurement unit is available on the PRE1 and PRE2
229 * pre-fusion pipes. Userspace selects which pipe to operate by setting
230 * the @header.type field to RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE1 or
231 * RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE2.
232 *
233 * Exposure measurement is performed in the RGB or Bayer domain, according to
234 * the setting of the @mode field. The exposure measurement tap point is
235 * selected according to the value of @channel_sel.
236 *
237 * The exposure measurement is performed on an input window specified in @wnd.
238 * To each color component a programmable weight coefficient is associated.
239 * Coefficients are represented as unsigned 8 bits integer values in Q1.7 format
240 * ranging from 0 to 1.992.
241 *
242 * The @last_line fields controls when the exposure measurement completes. It
243 * is usually programmed to the value of (@wnd.v_offs + @wnd.v_size + 1).
244 *
245 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE1 or
246 * type = RPPX1_PARAMS_BLOCK_TYPE_EXM_PRE2)
247 * @wnd: measurement window coordinates
248 * @mode: exposure measure mode (from enum rppx1_exm_mode)
249 * @last_line: line number for which the exposure measurement completes
250 * @channel_sel: exposure measurement point (see enum rppx1_meas_chan)
251 * @coeff_r: coefficient for the red Bayer sample or red color channel, Q1.7
252 * @coeff_g_gr: coefficient for the green/red Bayer sample or green color channel, Q1.7
253 * @coeff_b: coefficient for the blue Bayer sample or blue color channel, Q1.7
254 * @coeff_gb: coefficient for the green/blue Bayer sample, unused in RGB mode, Q1.7
255 * @reserved: padding
256 */
257struct rppx1_exm_params {
258 struct v4l2_isp_params_block_header header;
259 struct rppx1_window wnd;
260 __u32 mode;
261 __u32 last_line;
262 __u8 channel_sel;
263 __u8 coeff_r;
264 __u8 coeff_g_gr;
265 __u8 coeff_b;
266 __u8 coeff_gb;
267 __u8 reserved[3];
268};
269
270/* Histogram */
271#define RPPX1_HIST_WEIGHT_GRIDS_SIZE 25
272
273/**
274 * enum rppx1_hist_mode - Histogram measurement mode
275 *
276 * Histogram measurement mode. Select which channel or combination of channels
277 * the histogram measurement is performed on.
278 *
279 * @RPPX1_HIST_MODE_DISABLE: histogram disabled
280 * @RPPX1_HIST_MODE_RGB_COMBINED: combined RGB histogram
281 * @RPPX1_HIST_MODE_R_HISTOGRAM: red channel histogram
282 * @RPPX1_HIST_MODE_GR_HISTOGRAM: green/red channel histogram
283 * @RPPX1_HIST_MODE_B_HISTOGRAM: blue channel histogram
284 * @RPPX1_HIST_MODE_GB_HISTOGRAM: green/blue histogram
285 */
286enum rppx1_hist_mode {
287 RPPX1_HIST_MODE_DISABLE,
288 RPPX1_HIST_MODE_RGB_COMBINED,
289 RPPX1_HIST_MODE_R_HISTOGRAM,
290 RPPX1_HIST_MODE_GR_HISTOGRAM,
291 RPPX1_HIST_MODE_B_HISTOGRAM,
292 RPPX1_HIST_MODE_GB_HISTOGRAM,
293};
294
295/**
296 * struct rppx1_hist_params - Histogram measurement configuration
297 *
298 * The RPP-X1 Histogram measurement unit is available on the PRE1, PRE2 and
299 * MAIN_POST pipes. Userspace selects which pipe to operate by setting the
300 * @header.type field to RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE1,
301 * RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE2 or
302 * RPPX1_PARAMS_BLOCK_TYPE_HIST_POST.
303 *
304 * The histogram measurement point is selected using the @channel field while
305 * histogram measurement mode is selected using the @mode field.
306 *
307 * Histogram measurement is performed by programming subsampling factors using
308 * the @v_stepsize and @h_step_inc fields and by weighted windowing, by
309 * programming the size of the measurement window @wnd with @weights associated
310 * to each cell of the 5x5 measurement grid. Weights are represented as 5 bits
311 * integer values ranging from 0 to 16.
312 *
313 * The @last_line fields controls when the histogram measurement completes. It
314 * is usually programmed to the value of (@wnd.v_offs + @wnd.v_size - 1).
315 *
316 * Histogram values are calculated by applying a per-color channel coefficient
317 * represented as an 8 bits unsigned Q1.7 integer value. The @sample_offs and
318 * @sample_shift fields allow to reduce the color dynamic range on which
319 * histogram data are produced.
320 *
321 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE1,
322 * type = RPPX1_PARAMS_BLOCK_TYPE_HIST_PRE2 or
323 * type = RPPX1_PARAMS_BLOCK_TYPE_HIST_POST)
324 * @wnd: measurement window coordinates
325 * @last_line: line number for which the histogram measurement completes
326 * @v_stepsize: vertical subsampling divider, 7 bits
327 * @h_step_inc: horizontal subsampling step counter, 17 bits
328 * @sample_offs: sample offset, 24 bits
329 * @mode: histogram measurement mode (from enum rppx1_hist_mode)
330 * @channel_sel: histogram measurement point (see enum rppx1_meas_chan)
331 * @weights: weighting factors for each sub-window (5x5 grid)
332 * @coeff: R-G-B coefficients, 8 bits unsigned Q1.7
333 * @sample_shift: sample shift, 4 bits
334 * @reserved: padding
335 */
336struct rppx1_hist_params {
337 struct v4l2_isp_params_block_header header;
338 struct rppx1_window wnd;
339 __u32 last_line;
340 __u32 v_stepsize;
341 __u32 h_step_inc;
342 __u32 sample_offs;
343 __u8 mode;
344 __u8 channel_sel;
345 __u8 weights[RPPX1_HIST_WEIGHT_GRIDS_SIZE];
346 __u8 coeff[3];
347 __u8 sample_shift;
348 __u8 reserved;
349};
350
351/**
352 * struct rppx1_bls_fixed - BLS fixed subtraction values
353 *
354 * Fixed black level values subtracted from sensor data per Bayer channel.
355 * Negative values result in addition.
356 *
357 * The PRE1 pipe BLS module operates on a 24-bits input data and fixed black
358 * levels are stored as a signed 2's complement representation ranging from
359 * -2^24 to 2^24-1.
360 *
361 * The PRE2 pipe BLS module operates on a 12-bits input data and fixed black
362 * levels are stored as a signed 2's complement representation ranging from
363 * -2^12 to 2^12-1.
364 *
365 * Userspace is expected to provide fixed black level values with a bit-depth
366 * matching the one of pipe in use.
367 *
368 * These subtraction values are matched with the sensor native Bayer components
369 * ordering according to the cropping configuration on the input port.
370 *
371 * @a: subtraction value for channel A
372 * @b: subtraction value for channel B
373 * @c: subtraction value for channel C
374 * @d: subtraction value for channel D
375 */
376struct rppx1_bls_fixed {
377 __u32 a;
378 __u32 b;
379 __u32 c;
380 __u32 d;
381};
382
383/**
384 * enum rppx1_bls_mode - BLS subtraction mode
385 *
386 * Select if subtracted black level come from fixed or measured values.
387 *
388 * @RPPX1_BLS_MODE_FIXED: subtract fixed values
389 * @RPPX1_BLS_MODE_MEAS: subtract measured values
390 */
391enum rppx1_bls_mode {
392 RPPX1_BLS_MODE_FIXED,
393 RPPX1_BLS_MODE_MEAS,
394};
395
396/**
397 * enum rppx1_bls_win_en: BLS measurement configuration
398 *
399 * Select the measurement window to use for measured black level values.
400 *
401 * @RPPX1_BLS_WIN_EN_OFF: disable measurement
402 * @RPPX1_BLS_WIN_EN_WIN1: Enable measurement from window 1
403 * @RPPX1_BLS_WIN_EN_WIN2: enable measurement from window 2
404 * @RPPX1_BLS_WIN_EN_WIN12: enable measurement from window 1 and window 2
405 */
406enum rppx1_bls_win_en {
407 RPPX1_BLS_WIN_EN_OFF,
408 RPPX1_BLS_WIN_EN_WIN1,
409 RPPX1_BLS_WIN_EN_WIN2,
410 RPPX1_BLS_WIN_EN_WIN12,
411};
412
413/**
414 * struct rppx1_bls_params - RPP-X1 Black Level Subtraction Module
415 *
416 * The RPP-X1 Black Level Subtraction module is available on the PRE1 and PRE2
417 * pre-fusion pipes. Userspace selects which pipe to operate by setting the
418 * @header.type field to RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE1 or
419 * RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE2.
420 *
421 * The BLS module operates on fixed or measured data according to the setting of
422 * the @mode field. When RPPX1_BLS_MODE_FIXED is used userspace shall provide
423 * the per-channel black levels in @fixed. When RPPX1_BLS_MODE_MEAS is used
424 * userspace shall configure the measurement windows @window1 and optionally
425 * @window2 to select the optically black pixels region in the input frame. The
426 * @samples fields controls how many measure samples are used for averaging the
427 * measured black levels.
428 *
429 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE1 or
430 * type == RPPX1_PARAMS_BLOCK_TYPE_BLS_PRE2)
431 * @window1: BLS measurement window 1 (14 bits)
432 * @window2: BLS measurement window 2 (14 bits)
433 * @fixed: fixed subtraction values (see enum rppx1_bls_fixed)
434 * @mode: BLS subtraction mode (see enum rppx1_bls_mode)
435 * @en_windows: BLS measurement mode (see rppx1_bls_win_en)
436 * @samples: log2 of the number of measured pixels per Bayer position
437 * @reserved: padding
438 */
439struct rppx1_bls_params {
440 struct v4l2_isp_params_block_header header;
441 struct rppx1_window window1;
442 struct rppx1_window window2;
443 struct rppx1_bls_fixed fixed;
444 __u8 mode;
445 __u8 en_windows;
446 __u8 samples;
447 __u8 reserved[5];
448};
449
450/**
451 * struct rppx1_ccor_params - Color CORrection configuration
452 *
453 * The CCOR (Color Correction) module is available on the MAIN_POST pipe. It
454 * performs color space correction on a pixel-per-pixel basis using a 3x3 matrix
455 * of coefficients and per-color channel offsets.
456 *
457 * The matrix coefficients are represented as 16 bits signed fixed point values
458 * in Q4.12 format ranging from -8 to +7.999.
459 *
460 * The per-channel color offsets are represented as 2's complement values
461 * stored in 25 bits ranging from -16777216 to 16777215.
462 *
463 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_CCOR_POST)
464 * @coeff: color correction matrix coefficients, 16 bits signed Q4.12
465 * @reserved: padding
466 * @offset: R, G, B offsets, 2's complement 25 bits
467 */
468struct rppx1_ccor_params {
469 struct v4l2_isp_params_block_header header;
470 __u16 coeff[3][3];
471 __u16 reserved;
472 __u32 offset[3];
473};
474
475/* Lens Shade Correction */
476#define RPPX1_LSC_SAMPLES_MAX 17
477#define RPPX1_LSC_NUM_SECTORS 16
478
479/**
480 * struct rppx1_lsc_params - Lens Shading Correction configuration
481 *
482 * The RPP-X1 Lens shading correction module is available on the PRE1 and PRE2
483 * pre-fusion pipes. Userspace selects which pipe to operate by setting the
484 * @header.type field to RPPX1_PARAMS_BLOCK_TYPE_LSC_PRE1 or
485 * RPPX1_PARAMS_BLOCK_TYPE_LSC_PRE2.
486 *
487 * The module applies per-color channel correction factors @r_data, @gr_data,
488 * @gb_data and @b_data as a 16x16 grid mapped on the image. The size of each
489 * grid segment is expressed by the @x_sect_size and @y_sect_size arrays. Each
490 * segment shall be at least 8 pixels in size and the sum of all horizontal
491 * segments @x_sect_size shall match the input frame size width.
492 *
493 * The correction factors values are expressed as unsigned Q2.10 integers
494 * ranging from 1 to 3.999.
495 *
496 * Pre-calculated interpolation factors shall be provided in the @x_grad
497 * and @y_grad fields, expressed as 12 bits integer values.
498 *
499 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_LSC)
500 * @r_data: correction factors for the red channel in Q2.10 format
501 * @gr_data: correction factors for the green (red) channel in Q2.10 format
502 * @gb_data: correction factors for the green (blue) channel in Q2.10 format
503 * @b_data: correction factors for the blue channel in Q2.10 format
504 * @x_grad: Interpolation gradients for each horizontal sector (12 bits)
505 * @y_grad: Interpolation gradients for each vertical sector (12 bits)
506 * @x_sect_size: Horizontal sectors sizes
507 * @y_sect_size: Vertical sectors sizes
508 */
509struct rppx1_lsc_params {
510 struct v4l2_isp_params_block_header header;
511 __u16 r_data[RPPX1_LSC_SAMPLES_MAX][RPPX1_LSC_SAMPLES_MAX];
512 __u16 gr_data[RPPX1_LSC_SAMPLES_MAX][RPPX1_LSC_SAMPLES_MAX];
513 __u16 gb_data[RPPX1_LSC_SAMPLES_MAX][RPPX1_LSC_SAMPLES_MAX];
514 __u16 b_data[RPPX1_LSC_SAMPLES_MAX][RPPX1_LSC_SAMPLES_MAX];
515 __u16 x_grad[RPPX1_LSC_NUM_SECTORS];
516 __u16 y_grad[RPPX1_LSC_NUM_SECTORS];
517 __u16 x_sect_size[RPPX1_LSC_NUM_SECTORS];
518 __u16 y_sect_size[RPPX1_LSC_NUM_SECTORS];
519};
520
521/* Gamma Out */
522#define RPPX1_GA_MAX_SAMPLES 17
523
524/**
525 * enum rppx1_ga_seg_mode - Gamma out curve segmentation mode
526 *
527 * Segmentation mode of the 16 input sampling points for the Gamma Out
528 * Correction module.
529 *
530 * @RPPX1_GA_SEG_MODE_LOGARITHMIC: logarithmic-like segmentation mode
531 * @RPPX1_GA_SEG_MODE_EQUIDISTANT: equidistant segmentation mode
532 */
533enum rppx1_ga_seg_mode {
534 RPPX1_GA_SEG_MODE_LOGARITHMIC,
535 RPPX1_GA_SEG_MODE_EQUIDISTANT
536};
537
538/**
539 * struct rppx1_ga_params - Gamma Out Correction configuration
540 *
541 * The Gamma Out Correction module is available on the Human Vision Output
542 * Pipe (HV) and the Machine Vision Output Pipe (MV). Userspace selects
543 * which pipe to operate by setting the @header.type field to
544 * RPPX1_PARAMS_BLOCK_TYPE_GA_HV or RPPX1_PARAMS_BLOCK_TYPE_GA_MV.
545 *
546 * The module allows to apply a @gamma_y gamma correction curve to RGB data
547 * represented as a table of 16 entries. The 16 input sampling points can be
548 * equidistant or segmented using a logarithmic scale according to the value of
549 * @mode.
550 *
551 * The gamma curve values are 12 bits on the HV output pipe and 24 bits on the
552 * MV output pipe. Userspace is expected to provide the curve values with a
553 * bit-depth matching the one of pipe in use.
554 *
555 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_GA_HV or
556 * type = RPPX1_PARAMS_BLOCK_TYPE_GA_MV)
557 * @gamma_y: gamma out curve y-axis values
558 * @mode: gamma curve input segmentation mode (see rppx1_ga_seg_mode)
559 * @reserved: padding
560 */
561struct rppx1_ga_params {
562 struct v4l2_isp_params_block_header header;
563 __u32 gamma_y[RPPX1_GA_MAX_SAMPLES];
564 __u8 mode;
565 __u8 reserved[3];
566};
567
568/* Linearization (Sensor De-gamma) */
569#define RPPX1_LIN_SAMPLE_POINTS_NUM 16
570#define RPPX1_LIN_DEGAMMA_CURVE_NUM 17
571
572/**
573 * struct rppx1_lin_params - Linearization (Sensor De-gamma) configuration
574 *
575 * The RPP-X1 linearization module is available on the PRE1 and PRE2 pre-fusion
576 * pipes. Userspace selects which pipe to operate by setting the @header.type
577 * field to RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE1 or
578 * RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE2.
579 *
580 * The LIN module applies the per-color channel de-gamma linearization curves
581 * @curve_r, @curve_g and @curve_b defined on the input sampling points @dx.
582 *
583 * For the PRE1 pipe the de-gamma curves values are 24-bits, for the PRE2 pipe
584 * the de-gamma curve values are 12-bits.
585 *
586 * For the PRE1 pipe de-gamma module sampling points @dx values are in the range
587 * [0, 15] (4 bits). For the PRE2 pipe de-gamma module sampling points values
588 * are in the range [0, 7] (3 bits).
589 *
590 * Userspace is expected to provide the curve values and sampling points with a
591 * bit-depth matching the one of pipe in use.
592 *
593 * @header: block header (type = RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE1 or
594 * RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE2)
595 * @curve_r: de-gamma linearization curve for red channel
596 * @curve_g: de-gamma linearization curve for green channel
597 * @curve_b: de-gamma linearization curve for blue channel
598 * @dx: input sampling points
599 * @reserved: padding
600 */
601struct rppx1_lin_params {
602 struct v4l2_isp_params_block_header header;
603 __u32 curve_r[RPPX1_LIN_DEGAMMA_CURVE_NUM];
604 __u32 curve_g[RPPX1_LIN_DEGAMMA_CURVE_NUM];
605 __u32 curve_b[RPPX1_LIN_DEGAMMA_CURVE_NUM];
606 __u8 dx[RPPX1_LIN_SAMPLE_POINTS_NUM];
607 __u32 reserved;
608};
609
610/**
611 * RPPX1_PARAMS_MAX_SIZE - Maximum size of all RPP-X1 parameter blocks
612 *
613 * Some types are reported twice as the same block might be instantiated in
614 * multiple pipes.
615 */
616#define RPPX1_PARAMS_MAX_SIZE \
617 (sizeof(struct rppx1_wbmeas_params) + \
618 sizeof(struct rppx1_awbg_params) + \
619 sizeof(struct rppx1_awbg_params) + \
620 sizeof(struct rppx1_awbg_params) + \
621 sizeof(struct rppx1_exm_params) + \
622 sizeof(struct rppx1_exm_params) + \
623 sizeof(struct rppx1_hist_params) + \
624 sizeof(struct rppx1_hist_params) + \
625 sizeof(struct rppx1_hist_params) + \
626 sizeof(struct rppx1_bls_params) + \
627 sizeof(struct rppx1_bls_params) + \
628 sizeof(struct rppx1_ccor_params) + \
629 sizeof(struct rppx1_lsc_params) + \
630 sizeof(struct rppx1_lsc_params) + \
631 sizeof(struct rppx1_ga_params) + \
632 sizeof(struct rppx1_ga_params) + \
633 sizeof(struct rppx1_lin_params) + \
634 sizeof(struct rppx1_lin_params))
635
636/* ---------------------------------------------------------------------------
637 * Statistics Structures
638 *
639 * The same ISP block might be instantiated in multiple pipeliness and operate
640 * on a different bitdepth/precision. For fields of varying length among
641 * different instances of the same block, use a data type that can accommodate
642 * the larger bitdepth/precision.
643 */
644
645/**
646 * enum rppx1_stats_block_type - RPP-X1 extensible stats block types
647 *
648 * NOTE: Only append to the enumeration as the numbers are uAPI.
649 *
650 * @RPPX1_STATS_BLOCK_TYPE_WBMEAS_POST: post-fusion white-balance measurement
651 * @RPPX1_STATS_BLOCK_TYPE_EXM_PRE1: pre-fusion pipe1 exposure measurement
652 * @RPPX1_STATS_BLOCK_TYPE_EXM_PRE2: pre-fusion pipe2 exposure measurement
653 * @RPPX1_STATS_BLOCK_TYPE_HIST_PRE1: pre-fusion pipe1 histogram
654 * @RPPX1_STATS_BLOCK_TYPE_HIST_PRE2: pre-fusion pipe2 histogram
655 * @RPPX1_STATS_BLOCK_TYPE_HIST_POST: post-fusion histogram
656 */
657enum rppx1_stats_block_type {
658 RPPX1_STATS_BLOCK_TYPE_WBMEAS_POST,
659 RPPX1_STATS_BLOCK_TYPE_EXM_PRE1,
660 RPPX1_STATS_BLOCK_TYPE_EXM_PRE2,
661 RPPX1_STATS_BLOCK_TYPE_HIST_PRE1,
662 RPPX1_STATS_BLOCK_TYPE_HIST_PRE2,
663 RPPX1_STATS_BLOCK_TYPE_HIST_POST,
664};
665
666/**
667 * struct rppx1_wbmeas_stats - AWB statistics
668 *
669 * @header: block header (type = RPPX1_STATS_BLOCK_TYPE_WBMEAS_POST)
670 * @cnt: Number of pixels matched
671 * @mean_y_or_g: mean Y (or G in RGB mode) value, 24-bit
672 * @mean_cb_or_b: mean Cb (or B in RGB mode) value, 24-bit
673 * @mean_cr_or_r: mean Cr (or R in RGB mode) value, 24-bit
674 */
675struct rppx1_wbmeas_stats {
676 struct v4l2_isp_block_header header;
677 __u32 cnt;
678 __u32 mean_y_or_g;
679 __u32 mean_cb_or_b;
680 __u32 mean_cr_or_r;
681};
682
683/* Exposure Measurement */
684#define RPPX1_EXM_NUM_WIN 25
685
686/**
687 * struct rppx1_exm_stats - Exposure measurement
688 *
689 * RPP-X1 exposure measurement calculates the mean value on 25 programmable
690 * windows on the input picture.
691 *
692 * @header: block header (type = RPPX1_STATS_BLOCK_TYPE_EXM_PRE1)
693 * @exp_mean: mean luminance values per block, up to 20-bit
694 * @reserved: padding
695 */
696struct rppx1_exm_stats {
697 struct v4l2_isp_block_header header;
698 __u32 exp_mean[RPPX1_EXM_NUM_WIN];
699 __u32 reserved;
700};
701
702/* Histogram */
703#define RPPX1_HIST_NUM_BINS 32
704
705/**
706 * struct rppx1_hist_stats - Histogram statistics
707 *
708 * @header: block header (type = RPPX1_STATS_BLOCK_TYPE_HIST_POST)
709 * @hist_bins: accumulation histogram results in unsigned 20-bit Q16.4 format
710 */
711struct rppx1_hist_stats {
712 struct v4l2_isp_block_header header;
713 __u32 hist_bins[RPPX1_HIST_NUM_BINS];
714};
715
716/**
717 * RPPX1_STATS_MAX_SIZE - Maximum size of all RPP-X1 statistics
718 *
719 * Some types are reported twice as the same block might be instantiated in
720 * multiple pipes.
721 */
722#define RPPX1_STATS_MAX_SIZE \
723 (sizeof(struct rppx1_wbmeas_stats) + \
724 sizeof(struct rppx1_exm_stats) + \
725 sizeof(struct rppx1_exm_stats) + \
726 sizeof(struct rppx1_hist_stats) + \
727 sizeof(struct rppx1_hist_stats) + \
728 sizeof(struct rppx1_hist_stats))
729
730#endif /* __UAPI_RPP_X1_CONFIG_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/media/v4l2-isp.h+79-46
...@@ -13,25 +13,33 @@...@@ -13,25 +13,33 @@
13#include <linux/types.h>13#include <linux/types.h>
1414
15/**15/**
16 * enum v4l2_isp_params_version - V4L2 ISP parameters versioning16 * enum v4l2_isp_version - V4L2 ISP serialization format versioning
17 *17 *
18 * @V4L2_ISP_PARAMS_VERSION_V0: First version of the V4L2 ISP parameters format18 * @V4L2_ISP_VERSION_V0: First version of the V4L2 ISP serialization format
19 * (for compatibility)19 * (for compatibility)
20 * @V4L2_ISP_PARAMS_VERSION_V1: First version of the V4L2 ISP parameters format20 * @V4L2_ISP_VERSION_V1: First version of the V4L2 ISP serialization format
21 *21 *
22 * V0 and V1 are identical in order to support drivers compatible with the V4L222 * 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 their23 * ISP format already upstreamed which use either 0 or 1 as their versioning
24 * versioning identifier. Both V0 and V1 refers to the first version of the24 * identifier. Both V0 and V1 refers to the first version of the V4L2 ISP
25 * V4L2 ISP parameters format.25 * serialization format.
26 *26 *
27 * Future revisions of the V4L2 ISP parameters format should start from the27 * Future revisions of the V4L2 ISP serialization format should start from the
28 * value of 2.28 * value of 2.
29 */29 */
30enum v4l2_isp_params_version {30enum v4l2_isp_version {
31 V4L2_ISP_PARAMS_VERSION_V0 = 0,31 V4L2_ISP_VERSION_V0 = 0,
32 V4L2_ISP_PARAMS_VERSION_V132 V4L2_ISP_VERSION_V1
33};33};
3434
35/*
36 * Compatibility with existing users of v4l2_isp_params which pre-date the
37 * introduction of v4l2_isp_stats.
38 */
39#define v4l2_isp_params_version v4l2_isp_version
40#define V4L2_ISP_PARAMS_VERSION_V0 V4L2_ISP_VERSION_V0
41#define V4L2_ISP_PARAMS_VERSION_V1 V4L2_ISP_VERSION_V1
42
35#define V4L2_ISP_PARAMS_FL_BLOCK_DISABLE (1U << 0)43#define V4L2_ISP_PARAMS_FL_BLOCK_DISABLE (1U << 0)
36#define V4L2_ISP_PARAMS_FL_BLOCK_ENABLE (1U << 1)44#define V4L2_ISP_PARAMS_FL_BLOCK_ENABLE (1U << 1)
3745
...@@ -39,64 +47,89 @@ enum v4l2_isp_params_version {...@@ -39,64 +47,89 @@ enum v4l2_isp_params_version {
39 * Reserve the first 8 bits for V4L2_ISP_PARAMS_FL_* flag.47 * Reserve the first 8 bits for V4L2_ISP_PARAMS_FL_* flag.
40 *48 *
41 * Driver-specific flags should be defined as:49 * Driver-specific flags should be defined as:
42 * #define DRIVER_SPECIFIC_FLAG0 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(0))50 * #define DRIVER_SPECIFIC_FLAG0 ((1U << V4L2_ISP_FL_DRIVER_FLAGS(0))
43 * #define DRIVER_SPECIFIC_FLAG1 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(1))51 * #define DRIVER_SPECIFIC_FLAG1 ((1U << V4L2_ISP_FL_DRIVER_FLAGS(1))
44 */52 */
45#define V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(n) ((n) + 8)53#define V4L2_ISP_FL_DRIVER_FLAGS(n) ((n) + 8)
4654
47/**55/**
48 * struct v4l2_isp_params_block_header - V4L2 extensible parameters block header56 * struct v4l2_isp_block_header - V4L2 extensible block header
49 * @type: The parameters block type (driver-specific)57 * @type: The parameters or statistics block type (driver-specific)
50 * @flags: A bitmask of block flags (driver-specific)58 * @flags: A bitmask of block flags (driver-specific)
51 * @size: Size (in bytes) of the parameters block, including this header59 * @size: Size (in bytes) of the block, including this header
52 *60 *
53 * This structure represents the common part of all the ISP configuration61 * This structure represents the common part of all the ISP configuration or
54 * blocks. Each parameters block shall embed an instance of this structure type62 * statistic blocks. Each block shall embed an instance of this structure type
55 * as its first member, followed by the block-specific configuration data.63 * as its first member, followed by the block-specific configuration or
64 * statistic data.
56 *65 *
57 * The @type field is an ISP driver-specific value that identifies the block66 * 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.67 * type. The @size field specifies the size of the block, including this
68 * header.
59 *69 *
60 * The @flags field is a bitmask of per-block flags V4L2_PARAMS_ISP_FL_* and70 * The @flags field is a bitmask of per-block flags. If a block is used for
61 * driver-specific flags specified by the driver header.71 * configuration parameters this field can be a combination of
72 * V4L2_ISP_PARAMS_FL_* and driver-specific flags. If a block is used
73 * for statistics this fields is used to report optional
74 * driver-specific flags, if any.
62 */75 */
63struct v4l2_isp_params_block_header {76struct v4l2_isp_block_header {
64 __u16 type;77 __u16 type;
65 __u16 flags;78 __u16 flags;
66 __u32 size;79 __u32 size;
67} __attribute__((aligned(8)));80} __attribute__((aligned(8)));
6881
69/**82/**
70 * struct v4l2_isp_params_buffer - V4L2 extensible parameters configuration83 * v4l2_isp_params_block_header - V4L2 extensible parameters block header
71 * @version: The parameters buffer version (driver-specific)84 *
72 * @data_size: The configuration data effective size, excluding this header85 * Compatibility with existing users of v4l2_isp_params_block_header
73 * @data: The configuration data86 * which pre-date the introduction of v4l2_isp_block_header.
87 */
88#define v4l2_isp_params_block_header v4l2_isp_block_header
89
90/**
91 * struct v4l2_isp_buffer - V4L2 extensible buffer
92 * @version: The extensible buffer version (driver-specific)
93 * @data_size: The data effective size, excluding this header
94 * @data: The configuration or statistics data
74 *95 *
75 * This structure contains the configuration parameters of the ISP algorithms,96 * This structure contains ISP configuration parameters or ISP hardware
76 * serialized by userspace into a data buffer. Each configuration parameter97 * statistics serialized into a data buffer. Each block is represented by a
77 * block is represented by a block-specific structure which contains a98 * block-specific structure which contains a :c:type:`v4l2_isp_block_header`
78 * :c:type:`v4l2_isp_params_block_header` entry as first member. Userspace99 * entry as first member.
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 *100 *
84 * The parameters buffer is versioned by the @version field to allow modifying101 * When used for ISP parameters, userspace populates the @data buffer with
85 * and extending its definition. Userspace shall populate the @version field to102 * configuration parameters for the blocks that it intends to configure. As a
86 * inform the driver about the version it intends to use. The driver will parse103 * consequence, the data buffer effective size changes according to the number
87 * and handle the @data buffer according to the data layout specific to the104 * of ISP blocks that userspace intends to configure.
88 * indicated version and return an error if the desired version is not105 *
106 * When used to report ISP statistics, the driver populates the @data buffer
107 * with statistics for each supported measurement block.
108 *
109 * The buffer is versioned by the @version field to allow modifying
110 * and extending its definition. The writer shall populate the @version field
111 * to inform the reader about the version it intends to use. The reader will
112 * parse and handle the @data buffer according to the data layout specific to
113 * the indicated version and return an error if the desired version is not
89 * supported.114 * supported.
90 *115 *
91 * For each ISP block that userspace wants to configure, a block-specific116 * For each ISP block, a block-specific structure is appended to the @data
92 * structure is appended to the @data buffer, one after the other without gaps117 * buffer, one after the other without gaps in between. The writer shall
93 * in between. Userspace shall populate the @data_size field with the effective118 * populate the @data_size field with the effective size, in bytes, of the
94 * size, in bytes, of the @data buffer.119 * @data buffer.
95 */120 */
96struct v4l2_isp_params_buffer {121struct v4l2_isp_buffer {
97 __u32 version;122 __u32 version;
98 __u32 data_size;123 __u32 data_size;
99 __u8 data[] __counted_by(data_size);124 __u8 data[] __counted_by(data_size);
100};125};
101126
127/**
128 * v4l2_isp_params_buffer - V4L2 extensible parameters compatibility
129 *
130 * Compatibility with existing users of v4l2_isp_params_buffer which
131 * pre-date the introduction of v4l2_isp_buffer.
132 */
133#define v4l2_isp_params_buffer v4l2_isp_buffer
134
102#endif /* _V4L2_ISP_H_ */135#endif /* _V4L2_ISP_H_ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/mempolicy.h+1-1
...@@ -16,7 +16,7 @@...@@ -16,7 +16,7 @@
16 */16 */
1717
18/* Policies */18/* Policies */
19enum {19enum mempolicy_mode {
20 MPOL_DEFAULT,20 MPOL_DEFAULT,
21 MPOL_PREFERRED,21 MPOL_PREFERRED,
22 MPOL_BIND,22 MPOL_BIND,
lib/libc/include/any-linux-any/linux/netdev.h+1
...@@ -219,6 +219,7 @@ enum {...@@ -219,6 +219,7 @@ enum {
219 NETDEV_A_DMABUF_QUEUES,219 NETDEV_A_DMABUF_QUEUES,
220 NETDEV_A_DMABUF_FD,220 NETDEV_A_DMABUF_FD,
221 NETDEV_A_DMABUF_ID,221 NETDEV_A_DMABUF_ID,
222 NETDEV_A_DMABUF_RX_PAGE_SIZE,
222223
223 __NETDEV_A_DMABUF_MAX,224 __NETDEV_A_DMABUF_MAX,
224 NETDEV_A_DMABUF_MAX = (__NETDEV_A_DMABUF_MAX - 1)225 NETDEV_A_DMABUF_MAX = (__NETDEV_A_DMABUF_MAX - 1)
lib/libc/include/any-linux-any/linux/nexthop.h+3
...@@ -83,6 +83,9 @@ enum {...@@ -83,6 +83,9 @@ enum {
83 /* u32; read-only; whether any driver collects HW stats */83 /* u32; read-only; whether any driver collects HW stats */
84 NHA_HW_STATS_USED,84 NHA_HW_STATS_USED,
8585
86 /* be16; UDP destination port for an fdb nexthop (e.g. VXLAN) */
87 NHA_DST_PORT,
88
86 __NHA_MAX,89 __NHA_MAX,
87};90};
8891
lib/libc/include/any-linux-any/linux/nfs4.h-2
...@@ -17,11 +17,9 @@...@@ -17,11 +17,9 @@
17#include <linux/types.h>17#include <linux/types.h>
1818
19#define NFS4_BITMAP_SIZE 319#define NFS4_BITMAP_SIZE 3
20#define NFS4_VERIFIER_SIZE 8
21#define NFS4_STATEID_SEQID_SIZE 420#define NFS4_STATEID_SEQID_SIZE 4
22#define NFS4_STATEID_OTHER_SIZE 1221#define NFS4_STATEID_OTHER_SIZE 12
23#define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)22#define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)
24#define NFS4_FHSIZE 128
25#define NFS4_MAXPATHLEN PATH_MAX23#define NFS4_MAXPATHLEN PATH_MAX
26#define NFS4_MAXNAMLEN NAME_MAX24#define NFS4_MAXNAMLEN NAME_MAX
27#define NFS4_OPAQUE_LIMIT 102425#define NFS4_OPAQUE_LIMIT 1024
lib/libc/include/any-linux-any/linux/nfsd_netlink.h+36
...@@ -225,6 +225,41 @@ enum {...@@ -225,6 +225,41 @@ enum {
225 NFSD_A_UNLOCK_EXPORT_MAX = (__NFSD_A_UNLOCK_EXPORT_MAX - 1)225 NFSD_A_UNLOCK_EXPORT_MAX = (__NFSD_A_UNLOCK_EXPORT_MAX - 1)
226};226};
227227
228enum {
229 NFSD_A_SERVER_PROC_ENTRY_OP = 1,
230 NFSD_A_SERVER_PROC_ENTRY_COUNT,
231 NFSD_A_SERVER_PROC_ENTRY_PAD,
232
233 __NFSD_A_SERVER_PROC_ENTRY_MAX,
234 NFSD_A_SERVER_PROC_ENTRY_MAX = (__NFSD_A_SERVER_PROC_ENTRY_MAX - 1)
235};
236
237enum {
238 NFSD_A_SERVER_STATS_RC_HITS = 1,
239 NFSD_A_SERVER_STATS_RC_MISSES,
240 NFSD_A_SERVER_STATS_RC_NOCACHE,
241 NFSD_A_SERVER_STATS_PAD,
242 NFSD_A_SERVER_STATS_FH_STALE,
243 NFSD_A_SERVER_STATS_IO_READ,
244 NFSD_A_SERVER_STATS_IO_WRITE,
245 NFSD_A_SERVER_STATS_NETCNT,
246 NFSD_A_SERVER_STATS_NETUDPCNT,
247 NFSD_A_SERVER_STATS_NETTCPCNT,
248 NFSD_A_SERVER_STATS_NETTCPCONN,
249 NFSD_A_SERVER_STATS_RPCCNT,
250 NFSD_A_SERVER_STATS_RPCBADFMT,
251 NFSD_A_SERVER_STATS_RPCBADAUTH,
252 NFSD_A_SERVER_STATS_RPCBADCLNT,
253 NFSD_A_SERVER_STATS_PROC2_OPS,
254 NFSD_A_SERVER_STATS_PROC3_OPS,
255 NFSD_A_SERVER_STATS_PROC4_OPS,
256 NFSD_A_SERVER_STATS_PROC4OPS_OPS,
257 NFSD_A_SERVER_STATS_PROC4CB_OPS,
258
259 __NFSD_A_SERVER_STATS_MAX,
260 NFSD_A_SERVER_STATS_MAX = (__NFSD_A_SERVER_STATS_MAX - 1)
261};
262
228enum {263enum {
229 NFSD_CMD_RPC_STATUS_GET = 1,264 NFSD_CMD_RPC_STATUS_GET = 1,
230 NFSD_CMD_THREADS_SET,265 NFSD_CMD_THREADS_SET,
...@@ -244,6 +279,7 @@ enum {...@@ -244,6 +279,7 @@ enum {
244 NFSD_CMD_UNLOCK_IP,279 NFSD_CMD_UNLOCK_IP,
245 NFSD_CMD_UNLOCK_FILESYSTEM,280 NFSD_CMD_UNLOCK_FILESYSTEM,
246 NFSD_CMD_UNLOCK_EXPORT,281 NFSD_CMD_UNLOCK_EXPORT,
282 NFSD_CMD_SERVER_STATS_GET,
247283
248 __NFSD_CMD_MAX,284 __NFSD_CMD_MAX,
249 NFSD_CMD_MAX = (__NFSD_CMD_MAX - 1)285 NFSD_CMD_MAX = (__NFSD_CMD_MAX - 1)
lib/libc/include/any-linux-any/linux/nl80211.h+36-10
...@@ -922,13 +922,15 @@...@@ -922,13 +922,15 @@
922 * and wasn't already in a 4-addr VLAN. The event will be sent similarly922 * and wasn't already in a 4-addr VLAN. The event will be sent similarly
923 * to the %NL80211_CMD_UNEXPECTED_FRAME event, to the same listener.923 * to the %NL80211_CMD_UNEXPECTED_FRAME event, to the same listener.
924 *924 *
925 * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface925 * @NL80211_CMD_PROBE_PEER: Probe a connected peer by sending a null data
926 * by sending a null data frame to it and reporting when the frame is926 * frame and reporting when the frame is acknowledged.
927 * acknowledged. This is used to allow timing out inactive clients. Uses927 * In AP/GO mode, %NL80211_ATTR_MAC is required to identify the client.
928 * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a928 * In STA/P2P-client mode, %NL80211_ATTR_MAC must be omitted (the AP is
929 * direct reply with an %NL80211_ATTR_COOKIE that is later used to match929 * implied); the driver must advertise %NL80211_EXT_FEATURE_PROBE_AP.
930 * up the event with the request. The event includes the same data and930 * The command returns a direct reply with an %NL80211_ATTR_COOKIE that
931 * has %NL80211_ATTR_ACK set if the frame was ACKed.931 * is later used to match up the event with the request. The event
932 * includes the same data and has %NL80211_ATTR_ACK set if the frame
933 * was ACKed.
932 *934 *
933 * @NL80211_CMD_REGISTER_BEACONS: Register this socket to receive beacons from935 * @NL80211_CMD_REGISTER_BEACONS: Register this socket to receive beacons from
934 * other BSSes when any interfaces are in AP mode. This helps implement936 * other BSSes when any interfaces are in AP mode. This helps implement
...@@ -1558,7 +1560,7 @@ enum nl80211_commands {...@@ -1558,7 +1560,7 @@ enum nl80211_commands {
15581560
1559 NL80211_CMD_UNEXPECTED_FRAME,1561 NL80211_CMD_UNEXPECTED_FRAME,
15601562
1561 NL80211_CMD_PROBE_CLIENT,1563 NL80211_CMD_PROBE_PEER,
15621564
1563 NL80211_CMD_REGISTER_BEACONS,1565 NL80211_CMD_REGISTER_BEACONS,
15641566
...@@ -1729,6 +1731,7 @@ enum nl80211_commands {...@@ -1729,6 +1731,7 @@ enum nl80211_commands {
1729#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG1731#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
1730#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG1732#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG
1731#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE1733#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE
1734#define NL80211_CMD_PROBE_CLIENT NL80211_CMD_PROBE_PEER
17321735
1733/**1736/**
1734 * enum nl80211_attrs - nl80211 netlink attributes1737 * enum nl80211_attrs - nl80211 netlink attributes
...@@ -3165,6 +3168,23 @@ enum nl80211_commands {...@@ -3165,6 +3168,23 @@ enum nl80211_commands {
3165 * @NL80211_ATTR_NPCA_PRIMARY_FREQ: NPCA primary channel (u32)3168 * @NL80211_ATTR_NPCA_PRIMARY_FREQ: NPCA primary channel (u32)
3166 * @NL80211_ATTR_NPCA_PUNCT_BITMAP: NPCA puncturing bitmap (u32)3169 * @NL80211_ATTR_NPCA_PUNCT_BITMAP: NPCA puncturing bitmap (u32)
3167 *3170 *
3171 * @NL80211_ATTR_STA_DUMP_LINK_STATS: Request flag for %NL80211_CMD_GET_STATION
3172 * (dump mode only). When set on an MLD station, the dump produces two
3173 * %NL80211_CMD_NEW_STATION messages per station per dump call:
3174 *
3175 * 1. An aggregated-stats message whose top-level %NL80211_ATTR_STA_INFO
3176 * contains MLO-combined statistics (same content as a dump without
3177 * this flag).
3178 *
3179 * 2. For each active link, a per-link message containing
3180 * %NL80211_ATTR_MLO_LINKS with a single link entry. Each entry holds
3181 * %NL80211_ATTR_MLO_LINK_ID, the link-specific %NL80211_ATTR_MAC,
3182 * and %NL80211_ATTR_STA_INFO with per-link statistics (see
3183 * &enum nl80211_sta_info).
3184 *
3185 * The aggregated message always precedes the per-link messages for the
3186 * same station within a dump sequence.
3187 *
3168 * @NUM_NL80211_ATTR: total number of nl80211_attrs available3188 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
3169 * @NL80211_ATTR_MAX: highest attribute number currently defined3189 * @NL80211_ATTR_MAX: highest attribute number currently defined
3170 * @__NL80211_ATTR_AFTER_LAST: internal use3190 * @__NL80211_ATTR_AFTER_LAST: internal use
...@@ -3763,6 +3783,8 @@ enum nl80211_attrs {...@@ -3763,6 +3783,8 @@ enum nl80211_attrs {
3763 NL80211_ATTR_NPCA_PRIMARY_FREQ,3783 NL80211_ATTR_NPCA_PRIMARY_FREQ,
3764 NL80211_ATTR_NPCA_PUNCT_BITMAP,3784 NL80211_ATTR_NPCA_PUNCT_BITMAP,
37653785
3786 NL80211_ATTR_STA_DUMP_LINK_STATS,
3787
3766 /* add attributes here, update the policy in nl80211.c */3788 /* add attributes here, update the policy in nl80211.c */
37673789
3768 __NL80211_ATTR_AFTER_LAST,3790 __NL80211_ATTR_AFTER_LAST,
...@@ -4474,8 +4496,8 @@ enum nl80211_mpath_info {...@@ -4474,8 +4496,8 @@ enum nl80211_mpath_info {
4474 * capabilities IE4496 * capabilities IE
4475 * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as4497 * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as
4476 * defined in HE capabilities IE4498 * defined in HE capabilities IE
4477 * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),4499 * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities,
4478 * given for all 6 GHz band channels4500 * given for all 6 GHz band channels (binary, element content)
4479 * @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are4501 * @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are
4480 * advertised on this band/for this iftype (binary)4502 * advertised on this band/for this iftype (binary)
4481 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC: EHT MAC capabilities as in EHT4503 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC: EHT MAC capabilities as in EHT
...@@ -7085,6 +7107,9 @@ enum nl80211_feature_flags {...@@ -7085,6 +7107,9 @@ enum nl80211_feature_flags {
7085 * LTF key seed via %NL80211_KEY_LTF_SEED. The seed is used to generate7107 * LTF key seed via %NL80211_KEY_LTF_SEED. The seed is used to generate
7086 * secure LTF keys for secure LTF measurement sessions.7108 * secure LTF keys for secure LTF measurement sessions.
7087 *7109 *
7110 * @NL80211_EXT_FEATURE_PROBE_AP: Driver supports probing the associated AP
7111 * in STA mode using @NL80211_CMD_PROBE_PEER.
7112 *
7088 * @NUM_NL80211_EXT_FEATURES: number of extended features.7113 * @NUM_NL80211_EXT_FEATURES: number of extended features.
7089 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.7114 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
7090 */7115 */
...@@ -7166,6 +7191,7 @@ enum nl80211_ext_feature_index {...@@ -7166,6 +7191,7 @@ enum nl80211_ext_feature_index {
7166 NL80211_EXT_FEATURE_IEEE8021X_AUTH,7191 NL80211_EXT_FEATURE_IEEE8021X_AUTH,
7167 NL80211_EXT_FEATURE_ROC_ADDR_FILTER,7192 NL80211_EXT_FEATURE_ROC_ADDR_FILTER,
7168 NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,7193 NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,
7194 NL80211_EXT_FEATURE_PROBE_AP,
71697195
7170 /* add new features before the definition below */7196 /* add new features before the definition below */
7171 NUM_NL80211_EXT_FEATURES,7197 NUM_NL80211_EXT_FEATURES,
lib/libc/include/any-linux-any/linux/nsfs.h+4-3
...@@ -90,9 +90,10 @@ enum ns_type {...@@ -90,9 +90,10 @@ enum ns_type {
90 * struct ns_id_req - namespace ID request structure90 * struct ns_id_req - namespace ID request structure
91 * @size: size of this structure91 * @size: size of this structure
92 * @spare: reserved for future use92 * @spare: reserved for future use
93 * @filter: filter mask93 * @ns_id: last namespace ID
94 * @ns_id: last namespace id94 * @ns_type: bit mask of namespace types to include
95 * @user_ns_id: owning user namespace ID95 * @spare2: reserved for future use
96 * @user_ns_id: filter on this user namespace ID (or 0)
96 *97 *
97 * Structure for passing namespace ID and miscellaneous parameters to98 * Structure for passing namespace ID and miscellaneous parameters to
98 * statns(2) and listns(2).99 * statns(2) and listns(2).
lib/libc/include/any-linux-any/linux/openvswitch.h+26-5
...@@ -244,13 +244,33 @@ enum ovs_vport_cmd {...@@ -244,13 +244,33 @@ enum ovs_vport_cmd {
244 OVS_VPORT_CMD_SET244 OVS_VPORT_CMD_SET
245};245};
246246
247/**
248 * enum ovs_vport_type - OVS vport types for %OVS_VPORT_ATTR_TYPE.
249 * @OVS_VPORT_TYPE_NETDEV: Existing network device attached as a vport.
250 * @OVS_VPORT_TYPE_INTERNAL: Network device implemented by the OVS datapath.
251 * @OVS_VPORT_TYPE_GRE: Legacy GRE tunnel. Not supported, see below.
252 * @OVS_VPORT_TYPE_VXLAN: Legacy VXLAN tunnel. Not supported, see below.
253 * @OVS_VPORT_TYPE_GENEVE: Legacy Geneve tunnel. Not supported, see below.
254 *
255 * The tunnel vport types are not supported. Instead, create the tunnel device
256 * using %RTM_NEWLINK with the appropriate %IFLA_INFO_KIND (e.g. ``gre``,
257 * ``gretap``, ``vxlan``, ``geneve``, or other tunnel types) and add it as
258 * %OVS_VPORT_TYPE_NETDEV. To match and set tunnel parameters on a per-flow
259 * basis, the tunnel device should collect metadata. To do that, some tunnel
260 * types require an explicit flag such as %IFLA_VXLAN_COLLECT_METADATA for
261 * ``vxlan``, while others such as ``bareudp`` collect metadata
262 * unconditionally.
263 */
247enum ovs_vport_type {264enum ovs_vport_type {
265 /* private: */
248 OVS_VPORT_TYPE_UNSPEC,266 OVS_VPORT_TYPE_UNSPEC,
267 /* public: */
249 OVS_VPORT_TYPE_NETDEV, /* network device */268 OVS_VPORT_TYPE_NETDEV, /* network device */
250 OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */269 OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */
251 OVS_VPORT_TYPE_GRE, /* GRE tunnel. */270 OVS_VPORT_TYPE_GRE, /* GRE tunnel (legacy, not supported). */
252 OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */271 OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel (legacy, not supported). */
253 OVS_VPORT_TYPE_GENEVE, /* Geneve tunnel. */272 OVS_VPORT_TYPE_GENEVE, /* Geneve tunnel (legacy, not supported). */
273 /* private: */
254 __OVS_VPORT_TYPE_MAX274 __OVS_VPORT_TYPE_MAX
255};275};
256276
...@@ -284,7 +304,7 @@ enum ovs_vport_type {...@@ -284,7 +304,7 @@ enum ovs_vport_type {
284 * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is304 * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is
285 * optional; if not specified a free port number is automatically selected.305 * optional; if not specified a free port number is automatically selected.
286 * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type306 * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type
287 * of vport.307 * of vport. None of currently supported vport types support options.
288 *308 *
289 * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to309 * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to
290 * look up the vport to operate on; otherwise dp_idx from the &struct310 * look up the vport to operate on; otherwise dp_idx from the &struct
...@@ -336,7 +356,8 @@ enum {...@@ -336,7 +356,8 @@ enum {
336#define OVS_VXLAN_EXT_MAX (__OVS_VXLAN_EXT_MAX - 1)356#define OVS_VXLAN_EXT_MAX (__OVS_VXLAN_EXT_MAX - 1)
337357
338358
339/* OVS_VPORT_ATTR_OPTIONS attributes for tunnels.359/* OVS_VPORT_ATTR_OPTIONS attributes for legacy tunnel vports.
360 * Not supported, see the note for enum ovs_vport_type.
340 */361 */
341enum {362enum {
342 OVS_TUNNEL_ATTR_UNSPEC,363 OVS_TUNNEL_ATTR_UNSPEC,
lib/libc/include/any-linux-any/linux/personality.h-1
...@@ -62,7 +62,6 @@ enum {...@@ -62,7 +62,6 @@ enum {
62 PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,62 PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
63 PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,63 PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
64 PER_OSF4 = 0x000f, /* OSF/1 v4 */64 PER_OSF4 = 0x000f, /* OSF/1 v4 */
65 PER_HPUX = 0x0010,
66 PER_MASK = 0x00ff,65 PER_MASK = 0x00ff,
67};66};
6867
lib/libc/include/any-linux-any/linux/psp-sfs.h+2-2
...@@ -12,7 +12,7 @@...@@ -12,7 +12,7 @@
1212
13#include <linux/types.h>13#include <linux/types.h>
1414
15/**15/*
16 * SFS: AMD Seamless Firmware Support (SFS) interface16 * SFS: AMD Seamless Firmware Support (SFS) interface
17 */17 */
1818
...@@ -43,7 +43,7 @@ struct sfs_user_update_package {...@@ -43,7 +43,7 @@ struct sfs_user_update_package {
43 __u32 sfs_extended_status;43 __u32 sfs_extended_status;
44} __attribute__((packed));44} __attribute__((packed));
4545
46/**46/*
47 * Seamless Firmware Support (SFS) IOC47 * Seamless Firmware Support (SFS) IOC
48 *48 *
49 * possible return codes for all SFS IOCTLs:49 * possible return codes for all SFS IOCTLs:
lib/libc/include/any-linux-any/linux/random.h+1-1
...@@ -58,7 +58,7 @@ struct rand_pool_info {...@@ -58,7 +58,7 @@ struct rand_pool_info {
58/**58/**
59 * struct vgetrandom_opaque_params - arguments for allocating memory for vgetrandom59 * struct vgetrandom_opaque_params - arguments for allocating memory for vgetrandom
60 *60 *
61 * @size_per_opaque_state: Size of each state that is to be passed to vgetrandom().61 * @size_of_opaque_state: Size of each state passed to vgetrandom().
62 * @mmap_prot: Value of the prot argument in mmap(2).62 * @mmap_prot: Value of the prot argument in mmap(2).
63 * @mmap_flags: Value of the flags argument in mmap(2).63 * @mmap_flags: Value of the flags argument in mmap(2).
64 * @reserved: Reserved for future use.64 * @reserved: Reserved for future use.
lib/libc/include/any-linux-any/linux/rtnetlink.h+25
...@@ -399,6 +399,7 @@ enum rtattr_type_t {...@@ -399,6 +399,7 @@ enum rtattr_type_t {
399 RTA_DPORT,399 RTA_DPORT,
400 RTA_NH_ID,400 RTA_NH_ID,
401 RTA_FLOWLABEL,401 RTA_FLOWLABEL,
402 RTA_DEL_REASON,
402 __RTA_MAX403 __RTA_MAX
403};404};
404405
...@@ -407,6 +408,30 @@ enum rtattr_type_t {...@@ -407,6 +408,30 @@ enum rtattr_type_t {
407#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))408#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
408#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))409#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
409410
411/* RTA_DEL_REASON: why the kernel deleted the route. u32.
412 * Emitted only on RTM_DELROUTE notifications, and only when the deletion
413 * path records a cause. Absence means either an older kernel or a
414 * deletion path that does not (yet) record its cause - consumers must
415 * treat "absent" and "unspec" identically. New causes may be appended.
416 * Currently only IPv6 deletion paths record a cause.
417 *
418 * The attribute is notification-only: the kernel rejects it in
419 * requests, so a notification must not be echoed back verbatim.
420 *
421 * The value space is family-agnostic: a value must never be
422 * reinterpreted per address family. A cause that only one family can
423 * produce still gets its own value rather than reusing another
424 * family's.
425 */
426enum rt_del_reason {
427 RT_DEL_REASON_UNSPEC, /* cause not recorded */
428 RT_DEL_REASON_EXPIRED, /* RTF_EXPIRES lifetime ran out (GC) */
429 RT_DEL_REASON_RA_WITHDRAWN, /* zero-lifetime RA / PIO / RIO */
430 __RT_DEL_REASON_MAX
431};
432
433#define RT_DEL_REASON_MAX (__RT_DEL_REASON_MAX - 1)
434
410/* RTM_MULTIPATH --- array of struct rtnexthop.435/* RTM_MULTIPATH --- array of struct rtnexthop.
411 *436 *
412 * "struct rtnexthop" describes all necessary nexthop information,437 * "struct rtnexthop" describes all necessary nexthop information,
lib/libc/include/any-linux-any/linux/sched.h+1-1
...@@ -53,7 +53,7 @@...@@ -53,7 +53,7 @@
53 */53 */
54#define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */54#define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
5555
56#ifndef __ASSEMBLY__56#ifndef __ASSEMBLER__
57/**57/**
58 * struct clone_args - arguments for the clone3 syscall58 * struct clone_args - arguments for the clone3 syscall
59 * @flags: Flags for the new process as listed above.59 * @flags: Flags for the new process as listed above.
lib/libc/include/any-linux-any/linux/seg6_iptunnel.h+1
...@@ -21,6 +21,7 @@ enum {...@@ -21,6 +21,7 @@ enum {
21 SEG6_IPTUNNEL_UNSPEC,21 SEG6_IPTUNNEL_UNSPEC,
22 SEG6_IPTUNNEL_SRH,22 SEG6_IPTUNNEL_SRH,
23 SEG6_IPTUNNEL_SRC, /* struct in6_addr */23 SEG6_IPTUNNEL_SRC, /* struct in6_addr */
24 SEG6_IPTUNNEL_TABLE, /* __u32 FIB table for post-encap SID lookup */
24 __SEG6_IPTUNNEL_MAX,25 __SEG6_IPTUNNEL_MAX,
25};26};
26#define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)27#define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)
lib/libc/include/any-linux-any/linux/serial.h+1
...@@ -72,6 +72,7 @@ struct serial_struct {...@@ -72,6 +72,7 @@ struct serial_struct {
72#define SERIAL_IO_TSI 572#define SERIAL_IO_TSI 5
73#define SERIAL_IO_MEM32BE 673#define SERIAL_IO_MEM32BE 6
74#define SERIAL_IO_MEM16 774#define SERIAL_IO_MEM16 7
75#define SERIAL_IO_BUS 8
7576
76#define UART_CLEAR_FIFO 0x0177#define UART_CLEAR_FIFO 0x01
77#define UART_USE_FIFO 0x0278#define UART_USE_FIFO 0x02
lib/libc/include/any-linux-any/linux/serial_core.h+3
...@@ -100,6 +100,9 @@...@@ -100,6 +100,9 @@
100/* TXX9 type number */100/* TXX9 type number */
101#define PORT_TXX9 64101#define PORT_TXX9 64
102102
103/* Moxa MUEx50 UART */
104#define PORT_MUEX50 65
105
103/*Digi jsm */106/*Digi jsm */
104#define PORT_JSM 69107#define PORT_JSM 69
105108
lib/libc/include/any-linux-any/linux/time_types.h+1-1
...@@ -30,7 +30,7 @@ struct __kernel_old_timeval {...@@ -30,7 +30,7 @@ struct __kernel_old_timeval {
3030
31struct __kernel_old_timespec {31struct __kernel_old_timespec {
32 __kernel_old_time_t tv_sec; /* seconds */32 __kernel_old_time_t tv_sec; /* seconds */
33 long tv_nsec; /* nanoseconds */33 __kernel_long_t tv_nsec; /* nanoseconds */
34};34};
3535
36struct __kernel_old_itimerval {36struct __kernel_old_itimerval {
lib/libc/include/any-linux-any/linux/types.h+2-2
...@@ -4,7 +4,7 @@...@@ -4,7 +4,7 @@
44
5#include <asm/types.h>5#include <asm/types.h>
66
7#ifndef __ASSEMBLY__7#ifndef __ASSEMBLER__
88
9#include <linux/posix_types.h>9#include <linux/posix_types.h>
1010
...@@ -54,5 +54,5 @@ typedef __u32 __bitwise __wsum;...@@ -54,5 +54,5 @@ typedef __u32 __bitwise __wsum;
5454
55typedef unsigned __bitwise __poll_t;55typedef unsigned __bitwise __poll_t;
5656
57#endif /* __ASSEMBLY__ */57#endif /* __ASSEMBLER__ */
58#endif /* _LINUX_TYPES_H */58#endif /* _LINUX_TYPES_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/ublk_cmd.h+4-1
...@@ -417,6 +417,9 @@ struct ublk_shmem_buf_reg {...@@ -417,6 +417,9 @@ struct ublk_shmem_buf_reg {
417 */417 */
418#define UBLK_F_SHMEM_ZC (1ULL << 19)418#define UBLK_F_SHMEM_ZC (1ULL << 19)
419419
420/* ublksrv_io_desc size is specified by ublksrv_ctrl_dev_info's io_desc_size */
421#define UBLK_F_IO_DESC_SIZE (1ULL << 20)
422
420/* device state */423/* device state */
421#define UBLK_S_DEV_DEAD 0424#define UBLK_S_DEV_DEAD 0
422#define UBLK_S_DEV_LIVE 1425#define UBLK_S_DEV_LIVE 1
...@@ -452,7 +455,7 @@ struct ublksrv_ctrl_dev_info {...@@ -452,7 +455,7 @@ struct ublksrv_ctrl_dev_info {
452 __u16 nr_hw_queues;455 __u16 nr_hw_queues;
453 __u16 queue_depth;456 __u16 queue_depth;
454 __u16 state;457 __u16 state;
455 __u16 pad0;458 __u16 io_desc_size;
456459
457 __u32 max_io_buf_bytes;460 __u32 max_io_buf_bytes;
458 __u32 dev_id;461 __u32 dev_id;
lib/libc/include/any-linux-any/linux/usb/functionfs.h+24
...@@ -25,6 +25,7 @@ enum functionfs_flags {...@@ -25,6 +25,7 @@ enum functionfs_flags {
25 FUNCTIONFS_EVENTFD = 32,25 FUNCTIONFS_EVENTFD = 32,
26 FUNCTIONFS_ALL_CTRL_RECIP = 64,26 FUNCTIONFS_ALL_CTRL_RECIP = 64,
27 FUNCTIONFS_CONFIG0_SETUP = 128,27 FUNCTIONFS_CONFIG0_SETUP = 128,
28 FUNCTIONFS_RW_PROXY_EPS = 256,
28};29};
2930
30/* Descriptor of an non-audio endpoint */31/* Descriptor of an non-audio endpoint */
...@@ -412,4 +413,27 @@ struct usb_functionfs_event {...@@ -412,4 +413,27 @@ struct usb_functionfs_event {
412#define FUNCTIONFS_DMABUF_TRANSFER _IOW('g', 133, \413#define FUNCTIONFS_DMABUF_TRANSFER _IOW('g', 133, \
413 struct usb_ffs_dmabuf_transfer_req)414 struct usb_ffs_dmabuf_transfer_req)
414415
416/*
417 * Enable or disable automatic zero-length packet (ZLP) appending for the
418 * endpoint. The argument is a pointer to a __u32: 0 to disable, non-zero to
419 * enable.
420 *
421 * When enabled, the kernel will automatically append a ZLP at the end of
422 * a transfer if the payload length is an exact multiple of the endpoint's
423 * max packet size.
424 *
425 * This is useful for compatibility with legacy protocols which require
426 * automatic ZLP appending to data written from userspace.
427 *
428 * This ioctl can only be used on IN endpoints. It can be called at any time
429 * after the FunctionFS instance is active, even before the host has connected
430 * or enabled the endpoint.
431 *
432 * Returns zero on success, or a negative errno value on error:
433 * -ENODEV: The FunctionFS instance is not active.
434 * -EINVAL: The endpoint is not an IN endpoint.
435 * -EFAULT: Invalid user space pointer for the argument.
436 */
437#define FUNCTIONFS_ENDPOINT_ENABLE_ZLP _IOW('g', 134, __u32)
438
415#endif /* __LINUX_FUNCTIONFS_H__ */439#endif /* __LINUX_FUNCTIONFS_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/userfaultfd.h+50-4
...@@ -25,7 +25,8 @@...@@ -25,7 +25,8 @@
25#define UFFD_API ((__u64)0xAA)25#define UFFD_API ((__u64)0xAA)
26#define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | \26#define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | \
27 UFFDIO_REGISTER_MODE_WP | \27 UFFDIO_REGISTER_MODE_WP | \
28 UFFDIO_REGISTER_MODE_MINOR)28 UFFDIO_REGISTER_MODE_MINOR | \
29 UFFDIO_REGISTER_MODE_RWP)
29#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \30#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \
30 UFFD_FEATURE_EVENT_FORK | \31 UFFD_FEATURE_EVENT_FORK | \
31 UFFD_FEATURE_EVENT_REMAP | \32 UFFD_FEATURE_EVENT_REMAP | \
...@@ -42,10 +43,13 @@...@@ -42,10 +43,13 @@
42 UFFD_FEATURE_WP_UNPOPULATED | \43 UFFD_FEATURE_WP_UNPOPULATED | \
43 UFFD_FEATURE_POISON | \44 UFFD_FEATURE_POISON | \
44 UFFD_FEATURE_WP_ASYNC | \45 UFFD_FEATURE_WP_ASYNC | \
45 UFFD_FEATURE_MOVE)46 UFFD_FEATURE_MOVE | \
47 UFFD_FEATURE_RWP | \
48 UFFD_FEATURE_RWP_ASYNC)
46#define UFFD_API_IOCTLS \49#define UFFD_API_IOCTLS \
47 ((__u64)1 << _UFFDIO_REGISTER | \50 ((__u64)1 << _UFFDIO_REGISTER | \
48 (__u64)1 << _UFFDIO_UNREGISTER | \51 (__u64)1 << _UFFDIO_UNREGISTER | \
52 (__u64)1 << _UFFDIO_SET_MODE | \
49 (__u64)1 << _UFFDIO_API)53 (__u64)1 << _UFFDIO_API)
50#define UFFD_API_RANGE_IOCTLS \54#define UFFD_API_RANGE_IOCTLS \
51 ((__u64)1 << _UFFDIO_WAKE | \55 ((__u64)1 << _UFFDIO_WAKE | \
...@@ -54,13 +58,15 @@...@@ -54,13 +58,15 @@
54 (__u64)1 << _UFFDIO_MOVE | \58 (__u64)1 << _UFFDIO_MOVE | \
55 (__u64)1 << _UFFDIO_WRITEPROTECT | \59 (__u64)1 << _UFFDIO_WRITEPROTECT | \
56 (__u64)1 << _UFFDIO_CONTINUE | \60 (__u64)1 << _UFFDIO_CONTINUE | \
57 (__u64)1 << _UFFDIO_POISON)61 (__u64)1 << _UFFDIO_POISON | \
62 (__u64)1 << _UFFDIO_RWPROTECT)
58#define UFFD_API_RANGE_IOCTLS_BASIC \63#define UFFD_API_RANGE_IOCTLS_BASIC \
59 ((__u64)1 << _UFFDIO_WAKE | \64 ((__u64)1 << _UFFDIO_WAKE | \
60 (__u64)1 << _UFFDIO_COPY | \65 (__u64)1 << _UFFDIO_COPY | \
61 (__u64)1 << _UFFDIO_WRITEPROTECT | \66 (__u64)1 << _UFFDIO_WRITEPROTECT | \
62 (__u64)1 << _UFFDIO_CONTINUE | \67 (__u64)1 << _UFFDIO_CONTINUE | \
63 (__u64)1 << _UFFDIO_POISON)68 (__u64)1 << _UFFDIO_POISON | \
69 (__u64)1 << _UFFDIO_RWPROTECT)
6470
65/*71/*
66 * Valid ioctl command number range with this API is from 0x00 to72 * Valid ioctl command number range with this API is from 0x00 to
...@@ -79,6 +85,8 @@...@@ -79,6 +85,8 @@
79#define _UFFDIO_WRITEPROTECT (0x06)85#define _UFFDIO_WRITEPROTECT (0x06)
80#define _UFFDIO_CONTINUE (0x07)86#define _UFFDIO_CONTINUE (0x07)
81#define _UFFDIO_POISON (0x08)87#define _UFFDIO_POISON (0x08)
88#define _UFFDIO_RWPROTECT (0x09)
89#define _UFFDIO_SET_MODE (0x0A)
82#define _UFFDIO_API (0x3F)90#define _UFFDIO_API (0x3F)
8391
84/* userfaultfd ioctl ids */92/* userfaultfd ioctl ids */
...@@ -103,6 +111,10 @@...@@ -103,6 +111,10 @@
103 struct uffdio_continue)111 struct uffdio_continue)
104#define UFFDIO_POISON _IOWR(UFFDIO, _UFFDIO_POISON, \112#define UFFDIO_POISON _IOWR(UFFDIO, _UFFDIO_POISON, \
105 struct uffdio_poison)113 struct uffdio_poison)
114#define UFFDIO_RWPROTECT _IOWR(UFFDIO, _UFFDIO_RWPROTECT, \
115 struct uffdio_rwprotect)
116#define UFFDIO_SET_MODE _IOW(UFFDIO, _UFFDIO_SET_MODE, \
117 struct uffdio_set_mode)
106118
107/* read() structure */119/* read() structure */
108struct uffd_msg {120struct uffd_msg {
...@@ -158,6 +170,7 @@ struct uffd_msg {...@@ -158,6 +170,7 @@ struct uffd_msg {
158#define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */170#define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */
159#define UFFD_PAGEFAULT_FLAG_WP (1<<1) /* If reason is VM_UFFD_WP */171#define UFFD_PAGEFAULT_FLAG_WP (1<<1) /* If reason is VM_UFFD_WP */
160#define UFFD_PAGEFAULT_FLAG_MINOR (1<<2) /* If reason is VM_UFFD_MINOR */172#define UFFD_PAGEFAULT_FLAG_MINOR (1<<2) /* If reason is VM_UFFD_MINOR */
173#define UFFD_PAGEFAULT_FLAG_RWP (1<<3) /* If reason is VM_UFFD_RWP */
161174
162struct uffdio_api {175struct uffdio_api {
163 /* userland asks for an API number and the features to enable */176 /* userland asks for an API number and the features to enable */
...@@ -230,6 +243,18 @@ struct uffdio_api {...@@ -230,6 +243,18 @@ struct uffdio_api {
230 *243 *
231 * UFFD_FEATURE_MOVE indicates that the kernel supports moving an244 * UFFD_FEATURE_MOVE indicates that the kernel supports moving an
232 * existing page contents from userspace.245 * existing page contents from userspace.
246 *
247 * UFFD_FEATURE_RWP indicates that the kernel supports
248 * UFFDIO_REGISTER_MODE_RWP for read-write protection tracking.
249 * Pages are made inaccessible via UFFDIO_RWPROTECT and faults
250 * are delivered when the pages are re-accessed.
251 *
252 * UFFD_FEATURE_RWP_ASYNC indicates asynchronous mode for
253 * UFFDIO_REGISTER_MODE_RWP. When set, faults on read-write
254 * protected pages are auto-resolved by the kernel (PTE
255 * permissions restored immediately) without delivering a message
256 * to the userfaultfd handler. Use PAGEMAP_SCAN with inverted
257 * PAGE_IS_ACCESSED to find pages that were not re-accessed.
233 */258 */
234#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)259#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)
235#define UFFD_FEATURE_EVENT_FORK (1<<1)260#define UFFD_FEATURE_EVENT_FORK (1<<1)
...@@ -248,6 +273,8 @@ struct uffdio_api {...@@ -248,6 +273,8 @@ struct uffdio_api {
248#define UFFD_FEATURE_POISON (1<<14)273#define UFFD_FEATURE_POISON (1<<14)
249#define UFFD_FEATURE_WP_ASYNC (1<<15)274#define UFFD_FEATURE_WP_ASYNC (1<<15)
250#define UFFD_FEATURE_MOVE (1<<16)275#define UFFD_FEATURE_MOVE (1<<16)
276#define UFFD_FEATURE_RWP (1<<17)
277#define UFFD_FEATURE_RWP_ASYNC (1<<18)
251 __u64 features;278 __u64 features;
252279
253 __u64 ioctls;280 __u64 ioctls;
...@@ -263,6 +290,7 @@ struct uffdio_register {...@@ -263,6 +290,7 @@ struct uffdio_register {
263#define UFFDIO_REGISTER_MODE_MISSING ((__u64)1<<0)290#define UFFDIO_REGISTER_MODE_MISSING ((__u64)1<<0)
264#define UFFDIO_REGISTER_MODE_WP ((__u64)1<<1)291#define UFFDIO_REGISTER_MODE_WP ((__u64)1<<1)
265#define UFFDIO_REGISTER_MODE_MINOR ((__u64)1<<2)292#define UFFDIO_REGISTER_MODE_MINOR ((__u64)1<<2)
293#define UFFDIO_REGISTER_MODE_RWP ((__u64)1<<3)
266 __u64 mode;294 __u64 mode;
267295
268 /*296 /*
...@@ -356,6 +384,14 @@ struct uffdio_poison {...@@ -356,6 +384,14 @@ struct uffdio_poison {
356 __s64 updated;384 __s64 updated;
357};385};
358386
387struct uffdio_rwprotect {
388 struct uffdio_range range;
389 /* !RWP means undo RWP-protection */
390#define UFFDIO_RWPROTECT_MODE_RWP ((__u64)1<<0)
391#define UFFDIO_RWPROTECT_MODE_DONTWAKE ((__u64)1<<1)
392 __u64 mode;
393};
394
359struct uffdio_move {395struct uffdio_move {
360 __u64 dst;396 __u64 dst;
361 __u64 src;397 __u64 src;
...@@ -374,6 +410,16 @@ struct uffdio_move {...@@ -374,6 +410,16 @@ struct uffdio_move {
374 __s64 move;410 __s64 move;
375};411};
376412
413struct uffdio_set_mode {
414 /*
415 * Toggle async mode for features at runtime.
416 * Supported: UFFD_FEATURE_RWP_ASYNC.
417 * Setting a bit in both enable and disable is invalid.
418 */
419 __u64 enable;
420 __u64 disable;
421};
422
377/*423/*
378 * Flags for the userfaultfd(2) system call itself.424 * Flags for the userfaultfd(2) system call itself.
379 */425 */
lib/libc/include/any-linux-any/linux/vduse.h+28
...@@ -14,6 +14,12 @@...@@ -14,6 +14,12 @@
1414
15#define VDUSE_API_VERSION_1 115#define VDUSE_API_VERSION_1 1
1616
17/* The VDUSE instance expects a request for vq ready */
18#define VDUSE_F_QUEUE_READY 0
19
20/* The VDUSE instance expects a request for suspend */
21#define VDUSE_F_SUSPEND 1
22
17/*23/*
18 * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).24 * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).
19 * This is used for future extension.25 * This is used for future extension.
...@@ -63,6 +69,12 @@ struct vduse_dev_config {...@@ -63,6 +69,12 @@ struct vduse_dev_config {
63 */69 */
64#define VDUSE_DESTROY_DEV _IOW(VDUSE_BASE, 0x03, char[VDUSE_NAME_MAX])70#define VDUSE_DESTROY_DEV _IOW(VDUSE_BASE, 0x03, char[VDUSE_NAME_MAX])
6571
72/* Get the VDUSE supported features */
73#define VDUSE_GET_FEATURES _IOR(VDUSE_BASE, 0x04, __u64)
74
75/* Set the VDUSE features */
76#define VDUSE_SET_FEATURES _IOW(VDUSE_BASE, 0x05, __u64)
77
66/* The ioctls for VDUSE device (/dev/vduse/$NAME) */78/* The ioctls for VDUSE device (/dev/vduse/$NAME) */
6779
68/**80/**
...@@ -325,6 +337,8 @@ enum vduse_req_type {...@@ -325,6 +337,8 @@ enum vduse_req_type {
325 VDUSE_SET_STATUS,337 VDUSE_SET_STATUS,
326 VDUSE_UPDATE_IOTLB,338 VDUSE_UPDATE_IOTLB,
327 VDUSE_SET_VQ_GROUP_ASID,339 VDUSE_SET_VQ_GROUP_ASID,
340 VDUSE_SET_VQ_READY,
341 VDUSE_SUSPEND,
328};342};
329343
330/**344/**
...@@ -372,6 +386,15 @@ struct vduse_iova_range_v2 {...@@ -372,6 +386,15 @@ struct vduse_iova_range_v2 {
372 __u32 padding;386 __u32 padding;
373};387};
374388
389/**
390 * struct vduse_vq_ready - Virtqueue ready request message
391 * @num: Virtqueue number
392 */
393struct vduse_vq_ready {
394 __u32 num;
395 __u32 ready;
396};
397
375/**398/**
376 * struct vduse_dev_request - control request399 * struct vduse_dev_request - control request
377 * @type: request type400 * @type: request type
...@@ -382,6 +405,7 @@ struct vduse_iova_range_v2 {...@@ -382,6 +405,7 @@ struct vduse_iova_range_v2 {
382 * @iova: IOVA range for updating405 * @iova: IOVA range for updating
383 * @iova_v2: IOVA range for updating if API_VERSION >= 1406 * @iova_v2: IOVA range for updating if API_VERSION >= 1
384 * @vq_group_asid: ASID of a virtqueue group407 * @vq_group_asid: ASID of a virtqueue group
408 * @vq_ready: Virtqueue ready request
385 * @padding: padding409 * @padding: padding
386 *410 *
387 * Structure used by read(2) on /dev/vduse/$NAME.411 * Structure used by read(2) on /dev/vduse/$NAME.
...@@ -399,6 +423,10 @@ struct vduse_dev_request {...@@ -399,6 +423,10 @@ struct vduse_dev_request {
399 */423 */
400 struct vduse_iova_range_v2 iova_v2;424 struct vduse_iova_range_v2 iova_v2;
401 struct vduse_vq_group_asid vq_group_asid;425 struct vduse_vq_group_asid vq_group_asid;
426
427 /* Only if VDUSE_F_QUEUE_READY is negotiated */
428 struct vduse_vq_ready vq_ready;
429
402 __u32 padding[32];430 __u32 padding[32];
403 };431 };
404};432};
lib/libc/include/any-linux-any/linux/version.h+2-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1#define LINUX_VERSION_CODE 4592641#define LINUX_VERSION_CODE 459520
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 73#define LINUX_VERSION_MAJOR 7
4#define LINUX_VERSION_PATCHLEVEL 24#define LINUX_VERSION_PATCHLEVEL 3
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+21
...@@ -1534,6 +1534,27 @@ struct vfio_device_feature_dma_buf {...@@ -1534,6 +1534,27 @@ struct vfio_device_feature_dma_buf {
1534 */1534 */
1535#define VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2 121535#define VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2 12
15361536
1537/**
1538 * VFIO_DEVICE_FEATURE_ZPCI_ERROR feature provides PCI error information to
1539 * userspace for vfio-pci devices on s390. On s390, PCI error recovery
1540 * involves platform firmware and notification to operating systems is done
1541 * by architecture specific mechanism. Exposing this information to
1542 * userspace allows it to take appropriate actions to handle an
1543 * error on the device.
1544 *
1545 * Userspace provides an opaque buffer of fixed length, and the kernel
1546 * fills it with the zpci_ccdf_err data structure. The length of
1547 * zpci_ccdf_err is provided to userspace via the
1548 * VFIO_DEVICE_INFO_CAP_ZPCI_BASE capability.
1549 *
1550 * The ioctl returns -ENOMSG if there are no pending PCI errors.
1551 */
1552struct vfio_device_feature_zpci_err {
1553 __aligned_u64 data;
1554};
1555
1556#define VFIO_DEVICE_FEATURE_ZPCI_ERROR 13
1557
1537/* -------- API for Type1 VFIO IOMMU -------- */1558/* -------- API for Type1 VFIO IOMMU -------- */
15381559
1539/**1560/**
lib/libc/include/any-linux-any/linux/vfio_zdev.h+2
...@@ -32,6 +32,8 @@ struct vfio_device_info_cap_zpci_base {...@@ -32,6 +32,8 @@ struct vfio_device_info_cap_zpci_base {
32 /* End of version 1 */32 /* End of version 1 */
33 __u32 fh; /* PCI function handle */33 __u32 fh; /* PCI function handle */
34 /* End of version 2 */34 /* End of version 2 */
35 __u32 ccdf_err_length; /* PCI CCDF length */
36 /* End of version 3 */
35};37};
3638
37/**39/**
lib/libc/include/any-linux-any/linux/videodev2.h+4
...@@ -862,6 +862,10 @@ struct v4l2_pix_format {...@@ -862,6 +862,10 @@ struct v4l2_pix_format {
862#define V4L2_META_FMT_MALI_C55_PARAMS v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */862#define V4L2_META_FMT_MALI_C55_PARAMS v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */
863#define V4L2_META_FMT_MALI_C55_STATS v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */863#define V4L2_META_FMT_MALI_C55_STATS v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */
864864
865/* Vendor specific - used for Dreamchip RPP-X1 ISP */
866#define V4L2_META_FMT_RPPX1_PARAMS v4l2_fourcc('D', 'R', '1', 'P') /* Dreamchip RPP-X1 Parameters */
867#define V4L2_META_FMT_RPPX1_STATS v4l2_fourcc('D', 'R', '1', 'S') /* Dreamchip RPP-X1 Statistics */
868
865869
866/* priv field value to indicates that subsequent fields are valid. */870/* priv field value to indicates that subsequent fields are valid. */
867#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe871#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
lib/libc/include/any-linux-any/linux/virtio_ids.h+1
...@@ -69,6 +69,7 @@...@@ -69,6 +69,7 @@
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 */71#define VIRTIO_ID_SPI 45 /* virtio spi */
72#define VIRTIO_ID_MEDIA 48 /* virtio media */
7273
73/*74/*
74 * Virtio Transitional IDs75 * Virtio Transitional IDs
lib/libc/include/any-linux-any/misc/amd-apml.h+23
...@@ -73,6 +73,13 @@ struct apml_reg_xfer_msg {...@@ -73,6 +73,13 @@ struct apml_reg_xfer_msg {
73 __u8 rflag;73 __u8 rflag;
74};74};
7575
76struct apml_tsi_xfer_msg {
77 __u8 reg_addr; /* TSI register address offset */
78 __u8 data_in_out; /* Register data for read/write */
79 __u8 rflag; /* Register read or write */
80 __u8 pad; /* Explicit padding */
81};
82
76/*83/*
77 * AMD sideband interface base IOCTL84 * AMD sideband interface base IOCTL
78 */85 */
...@@ -149,4 +156,20 @@ struct apml_reg_xfer_msg {...@@ -149,4 +156,20 @@ struct apml_reg_xfer_msg {
149 */156 */
150#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)157#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)
151158
159/**
160 * DOC: SBTSI_IOCTL_REG_XFER_CMD
161 *
162 * @Parameters
163 *
164 * @struct apml_tsi_xfer_msg
165 * Pointer to the &struct apml_tsi_xfer_msg that will contain the protocol
166 * information
167 *
168 * @Description
169 * IOCTL command for APML TSI messages using generic _IOWR
170 * The IOCTL provides userspace access to AMD sideband TSI register xfer protocol
171 * - TSI protocol to read/write temperature sensor registers
172 */
173#define SBTSI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 4, struct apml_tsi_xfer_msg)
174
152#endif /*_AMD_APML_H_*/175#endif /*_AMD_APML_H_*/
\ No newline at end of file
lib/libc/include/any-linux-any/misc/fastrpc.h+29
...@@ -16,6 +16,7 @@...@@ -16,6 +16,7 @@
16#define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)16#define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)
17#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)17#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
18#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)18#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
19#define FASTRPC_IOCTL_SET_OPTION _IOWR('R', 12, struct fastrpc_ioctl_set_option)
19#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)20#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
2021
21/**22/**
...@@ -67,6 +68,28 @@ enum fastrpc_proc_attr {...@@ -67,6 +68,28 @@ enum fastrpc_proc_attr {
67/* Fastrpc attribute for memory protection of buffers */68/* Fastrpc attribute for memory protection of buffers */
68#define FASTRPC_ATTR_SECUREMAP (1)69#define FASTRPC_ATTR_SECUREMAP (1)
6970
71/**
72 * FASTRPC_POLL_MODE - Enable/disable poll mode for FastRPC invocations
73 *
74 * Poll mode is an optimization that allows the CPU to poll shared memory
75 * for completion instead of waiting for an interrupt-based response.
76 * This reduces latency for fast-completing operations.
77 *
78 * Restrictions:
79 * - Only supported for USER_PD (User Protection Domain)
80 * - Only applies to dynamic modules (handle > 20)
81 * - Static modules always use interrupt-based completion
82 *
83 * Values:
84 * - 0: Disable poll mode (use interrupt-based completion)
85 * - 1: Enable poll mode (poll shared memory for completion)
86 */
87#define FASTRPC_POLL_MODE (1)
88
89/* Values for FASTRPC_POLL_MODE request */
90#define FASTRPC_POLL_MODE_DISABLE 0
91#define FASTRPC_POLL_MODE_ENABLE 1
92
70struct fastrpc_invoke_args {93struct fastrpc_invoke_args {
71 __u64 ptr;94 __u64 ptr;
72 __u64 length;95 __u64 length;
...@@ -133,6 +156,12 @@ struct fastrpc_mem_unmap {...@@ -133,6 +156,12 @@ struct fastrpc_mem_unmap {
133 __s32 reserved[5];156 __s32 reserved[5];
134};157};
135158
159struct fastrpc_ioctl_set_option {
160 __u32 request_id; /* Request type (e.g., FASTRPC_POLL_MODE) */
161 __u32 value; /* Request-specific value */
162 __s32 reserved[6];
163};
164
136struct fastrpc_ioctl_capability {165struct fastrpc_ioctl_capability {
137 __u32 unused; /* deprecated, ignored by the kernel */166 __u32 unused; /* deprecated, ignored by the kernel */
138 __u32 attribute_id;167 __u32 attribute_id;
lib/libc/include/any-linux-any/mtd/ubi-user.h+9-1
...@@ -289,6 +289,13 @@ enum {...@@ -289,6 +289,13 @@ enum {
289 * If @disable_fm is not zero, ubi doesn't create new fastmap even the module289 * If @disable_fm is not zero, ubi doesn't create new fastmap even the module
290 * param 'fm_autoconvert' is set, and existed old fastmap will be destroyed290 * param 'fm_autoconvert' is set, and existed old fastmap will be destroyed
291 * after doing full scanning.291 * after doing full scanning.
292 *
293 * The @wl_threshold defines the maximum difference between the highest and the
294 * lowest erase counter value of eraseblocks of this UBI device. When this
295 * threshold is exceeded, UBI starts performing wear leveling by means of
296 * moving data from eraseblock with low erase counter to eraseblocks with high
297 * erase counter. If @wl_threshold is zero, the default kernel value of
298 * %CONFIG_MTD_UBI_WL_THRESHOLD is used. The accepted range is 2-65536.
292 */299 */
293struct ubi_attach_req {300struct ubi_attach_req {
294 __s32 ubi_num;301 __s32 ubi_num;
...@@ -297,7 +304,8 @@ struct ubi_attach_req {...@@ -297,7 +304,8 @@ struct ubi_attach_req {
297 __s16 max_beb_per1024;304 __s16 max_beb_per1024;
298 __s8 disable_fm;305 __s8 disable_fm;
299 __s8 need_resv_pool;306 __s8 need_resv_pool;
300 __s8 padding[8];307 __s32 wl_threshold;
308 __s8 padding[4];
301};309};
302310
303/*311/*
lib/libc/include/any-linux-any/rdma/bnxt_re-abi.h+4-1
...@@ -57,6 +57,7 @@ enum {...@@ -57,6 +57,7 @@ enum {
57 BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,57 BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,
58 BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,58 BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,
59 BNXT_RE_UCNTX_CMASK_QP_RATE_LIMIT_ENABLED = 0x80ULL,59 BNXT_RE_UCNTX_CMASK_QP_RATE_LIMIT_ENABLED = 0x80ULL,
60 BNXT_RE_UCNTX_CMASK_TOGGLE_MEM_UOBJ_SUPPORT = 0x400000ULL,
60};61};
6162
62enum bnxt_re_wqe_mode {63enum bnxt_re_wqe_mode {
...@@ -218,6 +219,8 @@ enum bnxt_re_var_toggle_mem_attrs {...@@ -218,6 +219,8 @@ enum bnxt_re_var_toggle_mem_attrs {
218 BNXT_RE_TOGGLE_MEM_MMAP_PAGE,219 BNXT_RE_TOGGLE_MEM_MMAP_PAGE,
219 BNXT_RE_TOGGLE_MEM_MMAP_OFFSET,220 BNXT_RE_TOGGLE_MEM_MMAP_OFFSET,
220 BNXT_RE_TOGGLE_MEM_MMAP_LENGTH,221 BNXT_RE_TOGGLE_MEM_MMAP_LENGTH,
222 BNXT_RE_TOGGLE_MEM_CQ_HANDLE,
223 BNXT_RE_TOGGLE_MEM_SRQ_HANDLE,
221};224};
222225
223enum bnxt_re_toggle_mem_attrs {226enum bnxt_re_toggle_mem_attrs {
...@@ -247,7 +250,7 @@ struct bnxt_re_query_device_ex_resp {...@@ -247,7 +250,7 @@ struct bnxt_re_query_device_ex_resp {
247struct bnxt_re_db_region {250struct bnxt_re_db_region {
248 __u32 dpi;251 __u32 dpi;
249 __u32 reserved;252 __u32 reserved;
250 __aligned_u64 umdbr;253 __aligned_u64 reserved2;
251};254};
252255
253enum bnxt_re_obj_dbr_alloc_attrs {256enum bnxt_re_obj_dbr_alloc_attrs {
lib/libc/include/any-linux-any/rdma/efa-abi.h+10-1
...@@ -56,7 +56,8 @@ struct efa_ibv_alloc_pd_resp {...@@ -56,7 +56,8 @@ struct efa_ibv_alloc_pd_resp {
5656
57enum {57enum {
58 EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0,58 EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0,
59 EFA_CREATE_CQ_WITH_SGID = 1 << 1,59 EFA_CREATE_CQ_WITH_SGID = 1 << 1,
60 EFA_CREATE_CQ_WITH_SQ_COMP_64_BIT_REQ_ID = 1 << 2,
60};61};
6162
62struct efa_ibv_create_cq {63struct efa_ibv_create_cq {
...@@ -88,6 +89,7 @@ enum {...@@ -88,6 +89,7 @@ enum {
8889
89enum {90enum {
90 EFA_CREATE_QP_WITH_UNSOLICITED_WRITE_RECV = 1 << 0,91 EFA_CREATE_QP_WITH_UNSOLICITED_WRITE_RECV = 1 << 0,
92 EFA_CREATE_QP_WITH_SQ_64_BIT_REQ_ID = 1 << 1,
91};93};
9294
93struct efa_ibv_create_qp {95struct efa_ibv_create_qp {
...@@ -133,6 +135,8 @@ enum {...@@ -133,6 +135,8 @@ enum {
133 EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,135 EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
134 EFA_QUERY_DEVICE_CAPS_UNSOLICITED_WRITE_RECV = 1 << 6,136 EFA_QUERY_DEVICE_CAPS_UNSOLICITED_WRITE_RECV = 1 << 6,
135 EFA_QUERY_DEVICE_CAPS_CQ_WITH_EXT_MEM = 1 << 7,137 EFA_QUERY_DEVICE_CAPS_CQ_WITH_EXT_MEM = 1 << 7,
138 EFA_QUERY_DEVICE_CAPS_COMP_CNTR = 1 << 8,
139 EFA_QUERY_DEVICE_CAPS_SQ_64_BIT_REQ_ID = 1 << 9,
136};140};
137141
138struct efa_ibv_ex_query_device_resp {142struct efa_ibv_ex_query_device_resp {
...@@ -163,4 +167,9 @@ enum efa_mr_methods {...@@ -163,4 +167,9 @@ enum efa_mr_methods {
163 EFA_IB_METHOD_MR_QUERY = (1U << UVERBS_ID_NS_SHIFT),167 EFA_IB_METHOD_MR_QUERY = (1U << UVERBS_ID_NS_SHIFT),
164};168};
165169
170enum efa_comp_cntr_create_attrs {
171 EFA_IB_ATTR_CREATE_COMP_CNTR_COMP_BUFFER = (1U << UVERBS_ID_NS_SHIFT),
172 EFA_IB_ATTR_CREATE_COMP_CNTR_ERR_BUFFER,
173};
174
166#endif /* EFA_ABI_USER_H */175#endif /* EFA_ABI_USER_H */
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h+44
...@@ -57,6 +57,7 @@ enum uverbs_default_objects {...@@ -57,6 +57,7 @@ enum uverbs_default_objects {
57 UVERBS_OBJECT_ASYNC_EVENT,57 UVERBS_OBJECT_ASYNC_EVENT,
58 UVERBS_OBJECT_DMAH,58 UVERBS_OBJECT_DMAH,
59 UVERBS_OBJECT_DMABUF,59 UVERBS_OBJECT_DMABUF,
60 UVERBS_OBJECT_COMP_CNTR,
60};61};
6162
62enum {63enum {
...@@ -75,6 +76,7 @@ enum uverbs_methods_device {...@@ -75,6 +76,7 @@ enum uverbs_methods_device {
75 UVERBS_METHOD_QUERY_GID_TABLE,76 UVERBS_METHOD_QUERY_GID_TABLE,
76 UVERBS_METHOD_QUERY_GID_ENTRY,77 UVERBS_METHOD_QUERY_GID_ENTRY,
77 UVERBS_METHOD_QUERY_PORT_SPEED,78 UVERBS_METHOD_QUERY_PORT_SPEED,
79 UVERBS_METHOD_QUERY_COMP_CNTR_CAPS,
78};80};
7981
80enum uverbs_attrs_invoke_write_cmd_attr_ids {82enum uverbs_attrs_invoke_write_cmd_attr_ids {
...@@ -93,6 +95,12 @@ enum uverbs_attrs_query_port_speed_cmd_attr_ids {...@@ -93,6 +95,12 @@ enum uverbs_attrs_query_port_speed_cmd_attr_ids {
93 UVERBS_ATTR_QUERY_PORT_SPEED_RESP,95 UVERBS_ATTR_QUERY_PORT_SPEED_RESP,
94};96};
9597
98enum uverbs_attrs_query_comp_cntr_caps_attr_ids {
99 UVERBS_ATTR_QUERY_COMP_CNTR_CAPS_MAX_COUNTERS,
100 UVERBS_ATTR_QUERY_COMP_CNTR_CAPS_MAX_VALUE,
101 UVERBS_ATTR_QUERY_COMP_CNTR_CAPS_SUPPORTED_QP_ATTACH_OPS,
102};
103
96enum uverbs_attrs_get_context_attr_ids {104enum uverbs_attrs_get_context_attr_ids {
97 UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,105 UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,
98 UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,106 UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,
...@@ -169,9 +177,16 @@ enum uverbs_attrs_destroy_qp_cmd_attr_ids {...@@ -169,9 +177,16 @@ enum uverbs_attrs_destroy_qp_cmd_attr_ids {
169 UVERBS_ATTR_DESTROY_QP_RESP,177 UVERBS_ATTR_DESTROY_QP_RESP,
170};178};
171179
180enum uverbs_attrs_qp_attach_comp_cntr_cmd_attr_ids {
181 UVERBS_ATTR_QP_ATTACH_COMP_CNTR_HANDLE,
182 UVERBS_ATTR_QP_ATTACH_COMP_CNTR_CNTR_HANDLE,
183 UVERBS_ATTR_QP_ATTACH_COMP_CNTR_OP_MASK,
184};
185
172enum uverbs_methods_qp {186enum uverbs_methods_qp {
173 UVERBS_METHOD_QP_CREATE,187 UVERBS_METHOD_QP_CREATE,
174 UVERBS_METHOD_QP_DESTROY,188 UVERBS_METHOD_QP_DESTROY,
189 UVERBS_METHOD_QP_ATTACH_COMP_CNTR,
175};190};
176191
177enum uverbs_attrs_create_srq_cmd_attr_ids {192enum uverbs_attrs_create_srq_cmd_attr_ids {
...@@ -189,6 +204,7 @@ enum uverbs_attrs_create_srq_cmd_attr_ids {...@@ -189,6 +204,7 @@ enum uverbs_attrs_create_srq_cmd_attr_ids {
189 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_WR,204 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_WR,
190 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_SGE,205 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_SGE,
191 UVERBS_ATTR_CREATE_SRQ_RESP_SRQ_NUM,206 UVERBS_ATTR_CREATE_SRQ_RESP_SRQ_NUM,
207 UVERBS_ATTR_CREATE_SRQ_BUF_UMEM,
192};208};
193209
194enum uverbs_attrs_destroy_srq_cmd_attr_ids {210enum uverbs_attrs_destroy_srq_cmd_attr_ids {
...@@ -438,4 +454,32 @@ enum uverbs_attrs_query_gid_entry_cmd_attr_ids {...@@ -438,4 +454,32 @@ enum uverbs_attrs_query_gid_entry_cmd_attr_ids {
438 UVERBS_ATTR_QUERY_GID_ENTRY_RESP_ENTRY,454 UVERBS_ATTR_QUERY_GID_ENTRY_RESP_ENTRY,
439};455};
440456
457enum uverbs_methods_comp_cntr {
458 UVERBS_METHOD_COMP_CNTR_CREATE,
459 UVERBS_METHOD_COMP_CNTR_DESTROY,
460 UVERBS_METHOD_COMP_CNTR_MODIFY,
461 UVERBS_METHOD_COMP_CNTR_READ,
462};
463
464enum uverbs_attrs_create_comp_cntr_cmd_attr_ids {
465 UVERBS_ATTR_CREATE_COMP_CNTR_HANDLE,
466};
467
468enum uverbs_attrs_destroy_comp_cntr_cmd_attr_ids {
469 UVERBS_ATTR_DESTROY_COMP_CNTR_HANDLE,
470};
471
472enum uverbs_attrs_modify_comp_cntr_cmd_attr_ids {
473 UVERBS_ATTR_MODIFY_COMP_CNTR_HANDLE,
474 UVERBS_ATTR_MODIFY_COMP_CNTR_ENTRY,
475 UVERBS_ATTR_MODIFY_COMP_CNTR_OP,
476 UVERBS_ATTR_MODIFY_COMP_CNTR_VALUE,
477};
478
479enum uverbs_attrs_read_comp_cntr_cmd_attr_ids {
480 UVERBS_ATTR_READ_COMP_CNTR_HANDLE,
481 UVERBS_ATTR_READ_COMP_CNTR_ENTRY,
482 UVERBS_ATTR_READ_COMP_CNTR_RESP_VALUE,
483};
484
441#endif485#endif
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h+19
...@@ -300,4 +300,23 @@ struct ib_uverbs_buffer_desc {...@@ -300,4 +300,23 @@ struct ib_uverbs_buffer_desc {
300 __aligned_u64 length;300 __aligned_u64 length;
301};301};
302302
303enum ib_uverbs_comp_cntr_entry {
304 IB_UVERBS_COMP_CNTR_ENTRY_COMP,
305 IB_UVERBS_COMP_CNTR_ENTRY_ERR,
306};
307
308enum ib_uverbs_comp_cntr_modify_op {
309 IB_UVERBS_COMP_CNTR_MODIFY_OP_SET,
310 IB_UVERBS_COMP_CNTR_MODIFY_OP_INC,
311};
312
313enum ib_uverbs_qp_attach_comp_cntr_op {
314 IB_UVERBS_QP_ATTACH_COMP_CNTR_OP_SEND = 1 << 0,
315 IB_UVERBS_QP_ATTACH_COMP_CNTR_OP_RECV = 1 << 1,
316 IB_UVERBS_QP_ATTACH_COMP_CNTR_OP_RDMA_READ = 1 << 2,
317 IB_UVERBS_QP_ATTACH_COMP_CNTR_OP_REMOTE_RDMA_READ = 1 << 3,
318 IB_UVERBS_QP_ATTACH_COMP_CNTR_OP_RDMA_WRITE = 1 << 4,
319 IB_UVERBS_QP_ATTACH_COMP_CNTR_OP_REMOTE_RDMA_WRITE = 1 << 5,
320};
321
303#endif322#endif
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ib_user_mad.h+48-47
...@@ -51,24 +51,24 @@...@@ -51,24 +51,24 @@
51 */51 */
5252
53/**53/**
54 * ib_user_mad_hdr_old - Old version of MAD packet header without pkey_index54 * struct ib_user_mad_hdr_old - Old version of MAD packet header without pkey_index
55 * @id - ID of agent MAD received with/to be sent with55 * @id: ID of agent MAD received with/to be sent with
56 * @status - 0 on successful receive, ETIMEDOUT if no response56 * @status: 0 on successful receive, ETIMEDOUT if no response
57 * received (transaction ID in data[] will be set to TID of original57 * received (transaction ID in data[] will be set to TID of original
58 * request) (ignored on send)58 * request) (ignored on send)
59 * @timeout_ms - Milliseconds to wait for response (unset on receive)59 * @timeout_ms: Milliseconds to wait for response (unset on receive)
60 * @retries - Number of automatic retries to attempt60 * @retries: Number of automatic retries to attempt
61 * @qpn - Remote QP number received from/to be sent to61 * @qpn: Remote QP number received from/to be sent to
62 * @qkey - Remote Q_Key to be sent with (unset on receive)62 * @qkey: Remote Q_Key to be sent with (unset on receive)
63 * @lid - Remote lid received from/to be sent to63 * @lid: Remote lid received from/to be sent to
64 * @sl - Service level received with/to be sent with64 * @sl: Service level received with/to be sent with
65 * @path_bits - Local path bits received with/to be sent with65 * @path_bits: Local path bits received with/to be sent with
66 * @grh_present - If set, GRH was received/should be sent66 * @grh_present: If set, GRH was received/should be sent
67 * @gid_index - Local GID index to send with (unset on receive)67 * @gid_index: Local GID index to send with (unset on receive)
68 * @hop_limit - Hop limit in GRH68 * @hop_limit: Hop limit in GRH
69 * @traffic_class - Traffic class in GRH69 * @traffic_class: Traffic class in GRH
70 * @gid - Remote GID in GRH70 * @gid: Remote GID in GRH
71 * @flow_label - Flow label in GRH71 * @flow_label: Flow label in GRH
72 */72 */
73struct ib_user_mad_hdr_old {73struct ib_user_mad_hdr_old {
74 __u32 id;74 __u32 id;
...@@ -90,29 +90,29 @@ struct ib_user_mad_hdr_old {...@@ -90,29 +90,29 @@ struct ib_user_mad_hdr_old {
90};90};
9191
92/**92/**
93 * ib_user_mad_hdr - MAD packet header93 * struct ib_user_mad_hdr - MAD packet header
94 * This layout allows specifying/receiving the P_Key index. To use94 * This layout allows specifying/receiving the P_Key index. To use
95 * this capability, an application must call the95 * this capability, an application must call the
96 * IB_USER_MAD_ENABLE_PKEY ioctl on the user MAD file handle before96 * IB_USER_MAD_ENABLE_PKEY ioctl on the user MAD file handle before
97 * any other actions with the file handle.97 * any other actions with the file handle.
98 * @id - ID of agent MAD received with/to be sent with98 * @id: ID of agent MAD received with/to be sent with
99 * @status - 0 on successful receive, ETIMEDOUT if no response99 * @status: 0 on successful receive, ETIMEDOUT if no response
100 * received (transaction ID in data[] will be set to TID of original100 * received (transaction ID in data[] will be set to TID of original
101 * request) (ignored on send)101 * request) (ignored on send)
102 * @timeout_ms - Milliseconds to wait for response (unset on receive)102 * @timeout_ms: Milliseconds to wait for response (unset on receive)
103 * @retries - Number of automatic retries to attempt103 * @retries: Number of automatic retries to attempt
104 * @qpn - Remote QP number received from/to be sent to104 * @qpn: Remote QP number received from/to be sent to
105 * @qkey - Remote Q_Key to be sent with (unset on receive)105 * @qkey: Remote Q_Key to be sent with (unset on receive)
106 * @lid - Remote lid received from/to be sent to106 * @lid: Remote lid received from/to be sent to
107 * @sl - Service level received with/to be sent with107 * @sl: Service level received with/to be sent with
108 * @path_bits - Local path bits received with/to be sent with108 * @path_bits: Local path bits received with/to be sent with
109 * @grh_present - If set, GRH was received/should be sent109 * @grh_present: If set, GRH was received/should be sent
110 * @gid_index - Local GID index to send with (unset on receive)110 * @gid_index: Local GID index to send with (unset on receive)
111 * @hop_limit - Hop limit in GRH111 * @hop_limit: Hop limit in GRH
112 * @traffic_class - Traffic class in GRH112 * @traffic_class: Traffic class in GRH
113 * @gid - Remote GID in GRH113 * @gid: Remote GID in GRH
114 * @flow_label - Flow label in GRH114 * @flow_label: Flow label in GRH
115 * @pkey_index - P_Key index115 * @pkey_index: P_Key index
116 */116 */
117struct ib_user_mad_hdr {117struct ib_user_mad_hdr {
118 __u32 id;118 __u32 id;
...@@ -136,9 +136,9 @@ struct ib_user_mad_hdr {...@@ -136,9 +136,9 @@ struct ib_user_mad_hdr {
136};136};
137137
138/**138/**
139 * ib_user_mad - MAD packet139 * struct ib_user_mad - MAD packet
140 * @hdr - MAD packet header140 * @hdr: MAD packet header
141 * @data - Contents of MAD141 * @data: Contents of MAD
142 *142 *
143 */143 */
144struct ib_user_mad {144struct ib_user_mad {
...@@ -167,15 +167,15 @@ typedef unsigned long __attribute__((aligned(4))) packed_ulong;...@@ -167,15 +167,15 @@ typedef unsigned long __attribute__((aligned(4))) packed_ulong;
167#define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long)))167#define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long)))
168168
169/**169/**
170 * ib_user_mad_reg_req - MAD registration request170 * struct ib_user_mad_reg_req - MAD registration request
171 * @id - Set by the kernel; used to identify agent in future requests.171 * @id: Set by the kernel; used to identify agent in future requests.
172 * @qpn - Queue pair number; must be 0 or 1.172 * @qpn: Queue pair number; must be 0 or 1.
173 * @method_mask - The caller will receive unsolicited MADs for any method173 * @method_mask: The caller will receive unsolicited MADs for any method
174 * where @method_mask = 1.174 * where @method_mask = 1.
175 * @mgmt_class - Indicates which management class of MADs should be receive175 * @mgmt_class: Indicates which management class of MADs should be receive
176 * by the caller. This field is only required if the user wishes to176 * by the caller. This field is only required if the user wishes to
177 * receive unsolicited MADs, otherwise it should be 0.177 * receive unsolicited MADs, otherwise it should be 0.
178 * @mgmt_class_version - Indicates which version of MADs for the given178 * @mgmt_class_version: Indicates which version of MADs for the given
179 * management class to receive.179 * management class to receive.
180 * @oui: Indicates IEEE OUI when mgmt_class is a vendor class180 * @oui: Indicates IEEE OUI when mgmt_class is a vendor class
181 * in the range from 0x30 to 0x4f. Otherwise not used.181 * in the range from 0x30 to 0x4f. Otherwise not used.
...@@ -193,7 +193,7 @@ struct ib_user_mad_reg_req {...@@ -193,7 +193,7 @@ struct ib_user_mad_reg_req {
193};193};
194194
195/**195/**
196 * ib_user_mad_reg_req2 - MAD registration request196 * struct ib_user_mad_reg_req2 - MAD registration request
197 *197 *
198 * @id - Set by the _kernel_; used by userspace to identify the198 * @id - Set by the _kernel_; used by userspace to identify the
199 * registered agent in future requests.199 * registered agent in future requests.
...@@ -214,10 +214,6 @@ struct ib_user_mad_reg_req {...@@ -214,10 +214,6 @@ struct ib_user_mad_reg_req {
214 * used.214 * used.
215 * @rmpp_version - If set, indicates the RMPP version to use.215 * @rmpp_version - If set, indicates the RMPP version to use.
216 */216 */
217enum {
218 IB_USER_MAD_USER_RMPP = (1 << 0),
219};
220#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
221struct ib_user_mad_reg_req2 {217struct ib_user_mad_reg_req2 {
222 __u32 id;218 __u32 id;
223 __u32 qpn;219 __u32 qpn;
...@@ -231,4 +227,9 @@ struct ib_user_mad_reg_req2 {...@@ -231,4 +227,9 @@ struct ib_user_mad_reg_req2 {
231 __u8 reserved[3];227 __u8 reserved[3];
232};228};
233229
230enum {
231 IB_USER_MAD_USER_RMPP = (1 << 0),
232};
233#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
234
234#endif /* IB_USER_MAD_H */235#endif /* IB_USER_MAD_H */
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ib_user_verbs.h+33
...@@ -1379,4 +1379,37 @@ enum ib_uverbs_raw_packet_caps {...@@ -1379,4 +1379,37 @@ enum ib_uverbs_raw_packet_caps {
1379 IB_UVERBS_RAW_PACKET_CAP_DELAY_DROP = 1 << 3,1379 IB_UVERBS_RAW_PACKET_CAP_DELAY_DROP = 1 << 3,
1380};1380};
13811381
1382/*
1383 * struct ib_uverbs_clock_info - timecounter state shared with userspace
1384 *
1385 * Drivers that use a software timecounter over a free-running hardware
1386 * cycle counter can map this page read-only into userspace, allowing
1387 * conversion of hardware timestamps to system time without a syscall.
1388 *
1389 * Synchronization uses a sequence counter (@sign): the kernel sets bit 0
1390 * before updating, then advances by 2 after. Userspace must retry the read
1391 * if @sign is odd or changed during the read.
1392 *
1393 * @sign: Sequence counter (bit 0 = update in progress)
1394 * @resv: Reserved
1395 * @nsec: Nanoseconds at last update
1396 * @cycles: Cycle counter value at last update
1397 * @frac: Fractional nanoseconds at last update
1398 * @mult: Cycle-to-nanosecond multiplier
1399 * @shift: Cycle-to-nanosecond shift
1400 * @mask: Cycle counter bitmask
1401 * @overflow_period: Max interval (nsec) between reads before counter wraps
1402 */
1403struct ib_uverbs_clock_info {
1404 __u32 sign;
1405 __u32 resv;
1406 __aligned_u64 nsec;
1407 __aligned_u64 cycles;
1408 __aligned_u64 frac;
1409 __u32 mult;
1410 __u32 shift;
1411 __aligned_u64 mask;
1412 __aligned_u64 overflow_period;
1413};
1414
1382#endif /* IB_USER_VERBS_H */1415#endif /* IB_USER_VERBS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ionic-abi.h+1
...@@ -48,6 +48,7 @@ struct ionic_ctx_resp {...@@ -48,6 +48,7 @@ struct ionic_ctx_resp {
48 __u8 expdb_qtypes;48 __u8 expdb_qtypes;
4949
50 __u8 rsvd2[3];50 __u8 rsvd2[3];
51 __aligned_u64 phc_offset;
51};52};
5253
53struct ionic_qdesc {54struct ionic_qdesc {
lib/libc/include/any-linux-any/rdma/irdma-abi.h+1
...@@ -88,6 +88,7 @@ struct irdma_create_srq_resp {...@@ -88,6 +88,7 @@ struct irdma_create_srq_resp {
88struct irdma_create_qp_req {88struct irdma_create_qp_req {
89 __aligned_u64 user_wqe_bufs;89 __aligned_u64 user_wqe_bufs;
90 __aligned_u64 user_compl_ctx;90 __aligned_u64 user_compl_ctx;
91 __aligned_u64 legacy_dontuse[2];
91};92};
9293
93struct irdma_mem_reg_req {94struct irdma_mem_reg_req {
lib/libc/include/any-linux-any/rdma/mana-abi.h+34-1
...@@ -25,7 +25,7 @@ enum mana_ib_create_cq_flags {...@@ -25,7 +25,7 @@ enum mana_ib_create_cq_flags {
2525
26struct mana_ib_create_cq {26struct mana_ib_create_cq {
27 __aligned_u64 buf_addr;27 __aligned_u64 buf_addr;
28 __u16 flags;28 __u16 comp_mask;
29 __u16 reserved0;29 __u16 reserved0;
30 __u32 reserved1;30 __u32 reserved1;
31};31};
...@@ -57,6 +57,17 @@ struct mana_ib_create_rc_qp_resp {...@@ -57,6 +57,17 @@ struct mana_ib_create_rc_qp_resp {
57 __u32 queue_id[4];57 __u32 queue_id[4];
58};58};
5959
60struct mana_ib_create_uc_qp {
61 __aligned_u64 queue_buf[3];
62 __u32 queue_size[3];
63 __u32 comp_mask;
64};
65
66struct mana_ib_create_uc_qp_resp {
67 __u32 queue_id[3];
68 __u32 reserved;
69};
70
60struct mana_ib_create_wq {71struct mana_ib_create_wq {
61 __aligned_u64 wq_buf_addr;72 __aligned_u64 wq_buf_addr;
62 __u32 wq_buf_size;73 __u32 wq_buf_size;
...@@ -87,4 +98,26 @@ struct mana_ib_create_qp_rss_resp {...@@ -87,4 +98,26 @@ struct mana_ib_create_qp_rss_resp {
87 struct rss_resp_entry entries[64];98 struct rss_resp_entry entries[64];
88};99};
89100
101enum mana_ib_ucontext_support {
102 MANA_IB_UCNTX_ALLOC_PDN_SUPPORT = 1 << 0,
103};
104
105struct mana_ib_alloc_ucontext_resp {
106 __aligned_u64 comp_mask;
107};
108
109enum mana_ib_create_pd_flags {
110 MANA_IB_PD_SHORT_PDN = 1 << 0,
111};
112
113struct mana_ib_alloc_pd {
114 __u32 comp_mask;
115 __u32 reserved;
116};
117
118struct mana_ib_alloc_pd_resp {
119 __u32 pdn;
120 __u32 reserved;
121};
122
90#endif123#endif
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/mlx5-abi.h+4-11
...@@ -472,17 +472,10 @@ struct mlx5_ib_modify_wq {...@@ -472,17 +472,10 @@ struct mlx5_ib_modify_wq {
472 __u32 reserved;472 __u32 reserved;
473};473};
474474
475struct mlx5_ib_clock_info {475/*
476 __u32 sign;476 * deprecated, see struct ib_uverbs_clock_info from ib_user_verbs.h
477 __u32 resv;477 */
478 __aligned_u64 nsec;478#define mlx5_ib_clock_info ib_uverbs_clock_info
479 __aligned_u64 cycles;
480 __aligned_u64 frac;
481 __u32 mult;
482 __u32 shift;
483 __aligned_u64 mask;
484 __aligned_u64 overflow_period;
485};
486479
487enum mlx5_ib_mmap_cmd {480enum mlx5_ib_mmap_cmd {
488 MLX5_IB_MMAP_REGULAR_PAGE = 0,481 MLX5_IB_MMAP_REGULAR_PAGE = 0,
lib/libc/include/any-linux-any/rdma/mlx5_user_ioctl_cmds.h+4
...@@ -281,6 +281,10 @@ enum mlx5_ib_create_qp_attrs {...@@ -281,6 +281,10 @@ enum mlx5_ib_create_qp_attrs {
281 MLX5_IB_ATTR_CREATE_QP_DBR_BUF_UMEM = UVERBS_ID_DRIVER_NS_WITH_UHW,281 MLX5_IB_ATTR_CREATE_QP_DBR_BUF_UMEM = UVERBS_ID_DRIVER_NS_WITH_UHW,
282};282};
283283
284enum mlx5_ib_create_srq_attrs {
285 MLX5_IB_ATTR_CREATE_SRQ_DBR_BUF_UMEM = UVERBS_ID_DRIVER_NS_WITH_UHW,
286};
287
284enum mlx5_ib_reg_dmabuf_mr_attrs {288enum mlx5_ib_reg_dmabuf_mr_attrs {
285 MLX5_IB_ATTR_REG_DMABUF_MR_ACCESS_FLAGS = (1U << UVERBS_ID_NS_SHIFT),289 MLX5_IB_ATTR_REG_DMABUF_MR_ACCESS_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
286};290};
lib/libc/include/any-linux-any/rdma/rdma_netlink.h+9-1
...@@ -516,7 +516,10 @@ enum rdma_nldev_attr {...@@ -516,7 +516,10 @@ enum rdma_nldev_attr {
516 RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */516 RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */
517517
518 /*518 /*
519 * File descriptor handle of the net namespace object519 * File descriptor handle of the net namespace object. May be combined
520 * with RDMA_NLDEV_ATTR_DEV_NAME (a literal device name) to also rename
521 * the device in the destination namespace; the move fails with -EEXIST
522 * if that name is already taken there.
520 */523 */
521 RDMA_NLDEV_NET_NS_FD, /* u32 */524 RDMA_NLDEV_NET_NS_FD, /* u32 */
522 /*525 /*
...@@ -604,6 +607,11 @@ enum rdma_nldev_attr {...@@ -604,6 +607,11 @@ enum rdma_nldev_attr {
604 RDMA_NLDEV_ATTR_FRMR_POOL_PINNED_HANDLES, /* u32 */607 RDMA_NLDEV_ATTR_FRMR_POOL_PINNED_HANDLES, /* u32 */
605 RDMA_NLDEV_ATTR_FRMR_POOL_KEY_KERNEL_VENDOR_KEY, /* u64 */608 RDMA_NLDEV_ATTR_FRMR_POOL_KEY_KERNEL_VENDOR_KEY, /* u64 */
606609
610 /*
611 * Resource summary entry maximum value.
612 */
613 RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_MAX, /* u64 */
614
607 /*615 /*
608 * Always the end616 * Always the end
609 */617 */
lib/libc/include/any-linux-any/sound/asequencer.h+4-14
...@@ -308,16 +308,6 @@ struct snd_seq_ump_event {...@@ -308,16 +308,6 @@ struct snd_seq_ump_event {
308 };308 };
309};309};
310310
311/*
312 * bounce event - stored as variable size data
313 */
314struct snd_seq_event_bounce {
315 int err;
316 struct snd_seq_event event;
317 /* external data follows here. */
318};
319
320
321 /* system information */311 /* system information */
322struct snd_seq_system_info {312struct snd_seq_system_info {
323 int queues; /* maximum queues count */313 int queues; /* maximum queues count */
...@@ -348,10 +338,10 @@ struct snd_seq_running_info {...@@ -348,10 +338,10 @@ struct snd_seq_running_info {
348338
349339
350 /* client types */340 /* client types */
351typedef int __bitwise snd_seq_client_type_t;341typedef int snd_seq_client_type_t;
352#define NO_CLIENT ((snd_seq_client_type_t) 0)342#define NO_CLIENT 0
353#define USER_CLIENT ((snd_seq_client_type_t) 1)343#define USER_CLIENT 1
354#define KERNEL_CLIENT ((snd_seq_client_type_t) 2)344#define KERNEL_CLIENT 2
355 345
356 /* event filter flags */346 /* event filter flags */
357#define SNDRV_SEQ_FILTER_BROADCAST (1U<<0) /* accept broadcast messages */347#define SNDRV_SEQ_FILTER_BROADCAST (1U<<0) /* accept broadcast messages */
lib/libc/include/any-linux-any/sound/asound.h+110-90
...@@ -167,72 +167,72 @@ enum {...@@ -167,72 +167,72 @@ enum {
167 SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,167 SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
168};168};
169169
170typedef int __bitwise snd_pcm_access_t;170typedef int snd_pcm_access_t;
171#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((snd_pcm_access_t) 0) /* interleaved mmap */171#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED 0 /* interleaved mmap */
172#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((snd_pcm_access_t) 1) /* noninterleaved mmap */172#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED 1 /* noninterleaved mmap */
173#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t) 2) /* complex mmap */173#define SNDRV_PCM_ACCESS_MMAP_COMPLEX 2 /* complex mmap */
174#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((snd_pcm_access_t) 3) /* readi/writei */174#define SNDRV_PCM_ACCESS_RW_INTERLEAVED 3 /* readi/writei */
175#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((snd_pcm_access_t) 4) /* readn/writen */175#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED 4 /* readn/writen */
176#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED176#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
177177
178typedef int __bitwise snd_pcm_format_t;178typedef int snd_pcm_format_t;
179#define SNDRV_PCM_FORMAT_S8 ((snd_pcm_format_t) 0)179#define SNDRV_PCM_FORMAT_S8 0
180#define SNDRV_PCM_FORMAT_U8 ((snd_pcm_format_t) 1)180#define SNDRV_PCM_FORMAT_U8 1
181#define SNDRV_PCM_FORMAT_S16_LE ((snd_pcm_format_t) 2)181#define SNDRV_PCM_FORMAT_S16_LE 2
182#define SNDRV_PCM_FORMAT_S16_BE ((snd_pcm_format_t) 3)182#define SNDRV_PCM_FORMAT_S16_BE 3
183#define SNDRV_PCM_FORMAT_U16_LE ((snd_pcm_format_t) 4)183#define SNDRV_PCM_FORMAT_U16_LE 4
184#define SNDRV_PCM_FORMAT_U16_BE ((snd_pcm_format_t) 5)184#define SNDRV_PCM_FORMAT_U16_BE 5
185#define SNDRV_PCM_FORMAT_S24_LE ((snd_pcm_format_t) 6) /* low three bytes */185#define SNDRV_PCM_FORMAT_S24_LE 6 /* low three bytes */
186#define SNDRV_PCM_FORMAT_S24_BE ((snd_pcm_format_t) 7) /* low three bytes */186#define SNDRV_PCM_FORMAT_S24_BE 7 /* low three bytes */
187#define SNDRV_PCM_FORMAT_U24_LE ((snd_pcm_format_t) 8) /* low three bytes */187#define SNDRV_PCM_FORMAT_U24_LE 8 /* low three bytes */
188#define SNDRV_PCM_FORMAT_U24_BE ((snd_pcm_format_t) 9) /* low three bytes */188#define SNDRV_PCM_FORMAT_U24_BE 9 /* low three bytes */
189/*189/*
190 * For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the190 * For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the
191 * available bit count in most significant bit. It's for the case of so-called 'left-justified' or191 * available bit count in most significant bit. It's for the case of so-called 'left-justified' or
192 * `right-padding` sample which has less width than 32 bit.192 * `right-padding` sample which has less width than 32 bit.
193 */193 */
194#define SNDRV_PCM_FORMAT_S32_LE ((snd_pcm_format_t) 10)194#define SNDRV_PCM_FORMAT_S32_LE 10
195#define SNDRV_PCM_FORMAT_S32_BE ((snd_pcm_format_t) 11)195#define SNDRV_PCM_FORMAT_S32_BE 11
196#define SNDRV_PCM_FORMAT_U32_LE ((snd_pcm_format_t) 12)196#define SNDRV_PCM_FORMAT_U32_LE 12
197#define SNDRV_PCM_FORMAT_U32_BE ((snd_pcm_format_t) 13)197#define SNDRV_PCM_FORMAT_U32_BE 13
198#define SNDRV_PCM_FORMAT_FLOAT_LE ((snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */198#define SNDRV_PCM_FORMAT_FLOAT_LE 14 /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
199#define SNDRV_PCM_FORMAT_FLOAT_BE ((snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */199#define SNDRV_PCM_FORMAT_FLOAT_BE 15 /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
200#define SNDRV_PCM_FORMAT_FLOAT64_LE ((snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */200#define SNDRV_PCM_FORMAT_FLOAT64_LE 16 /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
201#define SNDRV_PCM_FORMAT_FLOAT64_BE ((snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */201#define SNDRV_PCM_FORMAT_FLOAT64_BE 17 /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
202#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */202#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE 18 /* IEC-958 subframe, Little Endian */
203#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */203#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE 19 /* IEC-958 subframe, Big Endian */
204#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t) 20)204#define SNDRV_PCM_FORMAT_MU_LAW 20
205#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t) 21)205#define SNDRV_PCM_FORMAT_A_LAW 21
206#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t) 22)206#define SNDRV_PCM_FORMAT_IMA_ADPCM 22
207#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t) 23)207#define SNDRV_PCM_FORMAT_MPEG 23
208#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t) 24)208#define SNDRV_PCM_FORMAT_GSM 24
209#define SNDRV_PCM_FORMAT_S20_LE ((snd_pcm_format_t) 25) /* in four bytes, LSB justified */209#define SNDRV_PCM_FORMAT_S20_LE 25 /* in four bytes, LSB justified */
210#define SNDRV_PCM_FORMAT_S20_BE ((snd_pcm_format_t) 26) /* in four bytes, LSB justified */210#define SNDRV_PCM_FORMAT_S20_BE 26 /* in four bytes, LSB justified */
211#define SNDRV_PCM_FORMAT_U20_LE ((snd_pcm_format_t) 27) /* in four bytes, LSB justified */211#define SNDRV_PCM_FORMAT_U20_LE 27 /* in four bytes, LSB justified */
212#define SNDRV_PCM_FORMAT_U20_BE ((snd_pcm_format_t) 28) /* in four bytes, LSB justified */212#define SNDRV_PCM_FORMAT_U20_BE 28 /* in four bytes, LSB justified */
213/* gap in the numbering for a future standard linear format */213/* gap in the numbering for a future standard linear format */
214#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t) 31)214#define SNDRV_PCM_FORMAT_SPECIAL 31
215#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t) 32) /* in three bytes */215#define SNDRV_PCM_FORMAT_S24_3LE 32 /* in three bytes */
216#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t) 33) /* in three bytes */216#define SNDRV_PCM_FORMAT_S24_3BE 33 /* in three bytes */
217#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t) 34) /* in three bytes */217#define SNDRV_PCM_FORMAT_U24_3LE 34 /* in three bytes */
218#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t) 35) /* in three bytes */218#define SNDRV_PCM_FORMAT_U24_3BE 35 /* in three bytes */
219#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t) 36) /* in three bytes */219#define SNDRV_PCM_FORMAT_S20_3LE 36 /* in three bytes */
220#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t) 37) /* in three bytes */220#define SNDRV_PCM_FORMAT_S20_3BE 37 /* in three bytes */
221#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t) 38) /* in three bytes */221#define SNDRV_PCM_FORMAT_U20_3LE 38 /* in three bytes */
222#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t) 39) /* in three bytes */222#define SNDRV_PCM_FORMAT_U20_3BE 39 /* in three bytes */
223#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t) 40) /* in three bytes */223#define SNDRV_PCM_FORMAT_S18_3LE 40 /* in three bytes */
224#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t) 41) /* in three bytes */224#define SNDRV_PCM_FORMAT_S18_3BE 41 /* in three bytes */
225#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t) 42) /* in three bytes */225#define SNDRV_PCM_FORMAT_U18_3LE 42 /* in three bytes */
226#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t) 43) /* in three bytes */226#define SNDRV_PCM_FORMAT_U18_3BE 43 /* in three bytes */
227#define SNDRV_PCM_FORMAT_G723_24 ((snd_pcm_format_t) 44) /* 8 samples in 3 bytes */227#define SNDRV_PCM_FORMAT_G723_24 44 /* 8 samples in 3 bytes */
228#define SNDRV_PCM_FORMAT_G723_24_1B ((snd_pcm_format_t) 45) /* 1 sample in 1 byte */228#define SNDRV_PCM_FORMAT_G723_24_1B 45 /* 1 sample in 1 byte */
229#define SNDRV_PCM_FORMAT_G723_40 ((snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */229#define SNDRV_PCM_FORMAT_G723_40 46 /* 8 Samples in 5 bytes */
230#define SNDRV_PCM_FORMAT_G723_40_1B ((snd_pcm_format_t) 47) /* 1 sample in 1 byte */230#define SNDRV_PCM_FORMAT_G723_40_1B 47 /* 1 sample in 1 byte */
231#define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */231#define SNDRV_PCM_FORMAT_DSD_U8 48 /* DSD, 1-byte samples DSD (x8) */
232#define SNDRV_PCM_FORMAT_DSD_U16_LE ((snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */232#define SNDRV_PCM_FORMAT_DSD_U16_LE 49 /* DSD, 2-byte samples DSD (x16), little endian */
233#define SNDRV_PCM_FORMAT_DSD_U32_LE ((snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */233#define SNDRV_PCM_FORMAT_DSD_U32_LE 50 /* DSD, 4-byte samples DSD (x32), little endian */
234#define SNDRV_PCM_FORMAT_DSD_U16_BE ((snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */234#define SNDRV_PCM_FORMAT_DSD_U16_BE 51 /* DSD, 2-byte samples DSD (x16), big endian */
235#define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */235#define SNDRV_PCM_FORMAT_DSD_U32_BE 52 /* DSD, 4-byte samples DSD (x32), big endian */
236#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE236#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
237#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8237#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
238238
...@@ -263,11 +263,11 @@ typedef int __bitwise snd_pcm_format_t;...@@ -263,11 +263,11 @@ typedef int __bitwise snd_pcm_format_t;
263#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE263#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE
264#endif264#endif
265265
266typedef int __bitwise snd_pcm_subformat_t;266typedef int snd_pcm_subformat_t;
267#define SNDRV_PCM_SUBFORMAT_STD ((snd_pcm_subformat_t) 0)267#define SNDRV_PCM_SUBFORMAT_STD 0
268#define SNDRV_PCM_SUBFORMAT_MSBITS_MAX ((snd_pcm_subformat_t) 1)268#define SNDRV_PCM_SUBFORMAT_MSBITS_MAX 1
269#define SNDRV_PCM_SUBFORMAT_MSBITS_20 ((snd_pcm_subformat_t) 2)269#define SNDRV_PCM_SUBFORMAT_MSBITS_20 2
270#define SNDRV_PCM_SUBFORMAT_MSBITS_24 ((snd_pcm_subformat_t) 3)270#define SNDRV_PCM_SUBFORMAT_MSBITS_24 3
271#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_MSBITS_24271#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_MSBITS_24
272272
273#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */273#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */
...@@ -301,16 +301,16 @@ typedef int __bitwise snd_pcm_subformat_t;...@@ -301,16 +301,16 @@ typedef int __bitwise snd_pcm_subformat_t;
301#define __SND_STRUCT_TIME64301#define __SND_STRUCT_TIME64
302#endif302#endif
303303
304typedef int __bitwise snd_pcm_state_t;304typedef int snd_pcm_state_t;
305#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t) 0) /* stream is open */305#define SNDRV_PCM_STATE_OPEN 0 /* stream is open */
306#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t) 1) /* stream has a setup */306#define SNDRV_PCM_STATE_SETUP 1 /* stream has a setup */
307#define SNDRV_PCM_STATE_PREPARED ((snd_pcm_state_t) 2) /* stream is ready to start */307#define SNDRV_PCM_STATE_PREPARED 2 /* stream is ready to start */
308#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t) 3) /* stream is running */308#define SNDRV_PCM_STATE_RUNNING 3 /* stream is running */
309#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t) 4) /* stream reached an xrun */309#define SNDRV_PCM_STATE_XRUN 4 /* stream reached an xrun */
310#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t) 5) /* stream is draining */310#define SNDRV_PCM_STATE_DRAINING 5 /* stream is draining */
311#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t) 6) /* stream is paused */311#define SNDRV_PCM_STATE_PAUSED 6 /* stream is paused */
312#define SNDRV_PCM_STATE_SUSPENDED ((snd_pcm_state_t) 7) /* hardware is suspended */312#define SNDRV_PCM_STATE_SUSPENDED 7 /* hardware is suspended */
313#define SNDRV_PCM_STATE_DISCONNECTED ((snd_pcm_state_t) 8) /* hardware is disconnected */313#define SNDRV_PCM_STATE_DISCONNECTED 8 /* hardware is disconnected */
314#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED314#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
315315
316enum {316enum {
...@@ -1044,7 +1044,7 @@ struct snd_timer_tread {...@@ -1044,7 +1044,7 @@ struct snd_timer_tread {
1044 * *1044 * *
1045 ****************************************************************************/1045 ****************************************************************************/
10461046
1047#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9)1047#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 10)
10481048
1049struct snd_ctl_card_info {1049struct snd_ctl_card_info {
1050 int card; /* card number */1050 int card; /* card number */
...@@ -1058,24 +1058,43 @@ struct snd_ctl_card_info {...@@ -1058,24 +1058,43 @@ struct snd_ctl_card_info {
1058 unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */1058 unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */
1059};1059};
10601060
1061typedef int __bitwise snd_ctl_elem_type_t;1061/*
1062#define SNDRV_CTL_ELEM_TYPE_NONE ((snd_ctl_elem_type_t) 0) /* invalid */1062 * Card components can exceed the fixed 128 bytes in snd_ctl_card_info.
1063#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((snd_ctl_elem_type_t) 1) /* boolean type */1063 * Use SNDRV_CTL_IOCTL_CARD_BYTES with type SND_CTL_CARD_BTYPE_COMPONENTS
1064#define SNDRV_CTL_ELEM_TYPE_INTEGER ((snd_ctl_elem_type_t) 2) /* integer type */1064 * to retrieve the full string.
1065#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((snd_ctl_elem_type_t) 3) /* enumerated type */1065 */
1066#define SNDRV_CTL_ELEM_TYPE_BYTES ((snd_ctl_elem_type_t) 4) /* byte array */1066
1067#define SNDRV_CTL_ELEM_TYPE_IEC958 ((snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */1067/* Type values for struct snd_ctl_card_bytes::type */
1068#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((snd_ctl_elem_type_t) 6) /* 64-bit integer type */1068enum {
1069 SND_CTL_CARD_BTYPE_COMPONENTS = 1, /* full card components string */
1070};
1071
1072struct snd_ctl_card_bytes {
1073 __u32 type; /* SND_CTL_CARD_BTYPE_* */
1074 __u32 data_allocated; /* size of @data buffer in bytes */
1075 __u32 data_len; /* in/out: actual data length in bytes */
1076 __u32 reserved; /* explicit pad */
1077 __u64 data; /* user buffer (pointer stored as __u64) */
1078};
1079
1080typedef int snd_ctl_elem_type_t;
1081#define SNDRV_CTL_ELEM_TYPE_NONE 0 /* invalid */
1082#define SNDRV_CTL_ELEM_TYPE_BOOLEAN 1 /* boolean type */
1083#define SNDRV_CTL_ELEM_TYPE_INTEGER 2 /* integer type */
1084#define SNDRV_CTL_ELEM_TYPE_ENUMERATED 3 /* enumerated type */
1085#define SNDRV_CTL_ELEM_TYPE_BYTES 4 /* byte array */
1086#define SNDRV_CTL_ELEM_TYPE_IEC958 5 /* IEC958 (S/PDIF) setup */
1087#define SNDRV_CTL_ELEM_TYPE_INTEGER64 6 /* 64-bit integer type */
1069#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER641088#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
10701089
1071typedef int __bitwise snd_ctl_elem_iface_t;1090typedef int snd_ctl_elem_iface_t;
1072#define SNDRV_CTL_ELEM_IFACE_CARD ((snd_ctl_elem_iface_t) 0) /* global control */1091#define SNDRV_CTL_ELEM_IFACE_CARD 0 /* global control */
1073#define SNDRV_CTL_ELEM_IFACE_HWDEP ((snd_ctl_elem_iface_t) 1) /* hardware dependent device */1092#define SNDRV_CTL_ELEM_IFACE_HWDEP 1 /* hardware dependent device */
1074#define SNDRV_CTL_ELEM_IFACE_MIXER ((snd_ctl_elem_iface_t) 2) /* virtual mixer device */1093#define SNDRV_CTL_ELEM_IFACE_MIXER 2 /* virtual mixer device */
1075#define SNDRV_CTL_ELEM_IFACE_PCM ((snd_ctl_elem_iface_t) 3) /* PCM device */1094#define SNDRV_CTL_ELEM_IFACE_PCM 3 /* PCM device */
1076#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((snd_ctl_elem_iface_t) 4) /* RawMidi device */1095#define SNDRV_CTL_ELEM_IFACE_RAWMIDI 4 /* RawMidi device */
1077#define SNDRV_CTL_ELEM_IFACE_TIMER ((snd_ctl_elem_iface_t) 5) /* timer device */1096#define SNDRV_CTL_ELEM_IFACE_TIMER 5 /* timer device */
1078#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((snd_ctl_elem_iface_t) 6) /* sequencer client */1097#define SNDRV_CTL_ELEM_IFACE_SEQUENCER 6 /* sequencer client */
1079#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER1098#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
10801099
1081#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0)1100#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0)
...@@ -1184,6 +1203,7 @@ struct snd_ctl_tlv {...@@ -1184,6 +1203,7 @@ struct snd_ctl_tlv {
11841203
1185#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)1204#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
1186#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)1205#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
1206#define SNDRV_CTL_IOCTL_CARD_BYTES _IOWR('U', 0x02, struct snd_ctl_card_bytes)
1187#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)1207#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
1188#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)1208#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
1189#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)1209#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
lib/libc/include/any-linux-any/sound/firewire.h+15-9
...@@ -79,11 +79,12 @@ struct snd_firewire_event_motu_register_dsp_change {...@@ -79,11 +79,12 @@ struct snd_firewire_event_motu_register_dsp_change {
79 *79 *
80 * @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE.80 * @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE.
81 * @message_count: The number of messages.81 * @message_count: The number of messages.
82 * @messages: Array of @message_count messages
82 * @messages.message: The messages expressing hardware knob operation.83 * @messages.message: The messages expressing hardware knob operation.
83 * @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous84 * @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous
84 * transaction was sent to deliver the message. It has 16 bit unsigned integer85 * transaction was sent to deliver the message. It has 16-bit unsigned integer
85 * value. The higher 3 bits of value expresses the lower three bits of second86 * value. The higher 3 bits of value expresses the lower three bits of second
86 * field in the format of CYCLE_TIME, up to 7. The rest 13 bits expresses cycle87 * field in the format of CYCLE_TIME, up to 7. The remaining 13 bits express cycle
87 * field up to 7999.88 * field up to 7999.
88 *89 *
89 * The structure expresses message transmitted by Fireface 400 when operating hardware knob.90 * The structure expresses message transmitted by Fireface 400 when operating hardware knob.
...@@ -191,8 +192,9 @@ struct snd_firewire_motu_register_dsp_meter {...@@ -191,8 +192,9 @@ struct snd_firewire_motu_register_dsp_meter {
191#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)192#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)
192193
193/**194/**
194 * snd_firewire_motu_register_dsp_parameter - the container for parameters of DSP controlled195 * struct snd_firewire_motu_register_dsp_parameter - the container for parameters
195 * by register access.196 * of DSP controlled by register access.
197 * @mixer: aggregate of @mixer.source and @mixer.output
196 * @mixer.source.gain: The gain of source to mixer.198 * @mixer.source.gain: The gain of source to mixer.
197 * @mixer.source.pan: The L/R balance of source to mixer.199 * @mixer.source.pan: The L/R balance of source to mixer.
198 * @mixer.source.flag: The flag of source to mixer, including mute, solo.200 * @mixer.source.flag: The flag of source to mixer, including mute, solo.
...@@ -200,21 +202,25 @@ struct snd_firewire_motu_register_dsp_meter {...@@ -200,21 +202,25 @@ struct snd_firewire_motu_register_dsp_meter {
200 * Audio Express.202 * Audio Express.
201 * @mixer.source.paired_width: The width of paired source to mixer, only for 4 pre and203 * @mixer.source.paired_width: The width of paired source to mixer, only for 4 pre and
202 * Audio Express.204 * Audio Express.
205 * @mixer.output: FIXME
203 * @mixer.output.paired_volume: The volume of paired output from mixer.206 * @mixer.output.paired_volume: The volume of paired output from mixer.
204 * @mixer.output.paired_flag: The flag of paired output from mixer.207 * @mixer.output.paired_flag: The flag of paired output from mixer.
208 * @output: output parameters
205 * @output.main_paired_volume: The volume of paired main output.209 * @output.main_paired_volume: The volume of paired main output.
206 * @output.hp_paired_volume: The volume of paired hp output.210 * @output.hp_paired_volume: The volume of paired hp output.
207 * @output.hp_paired_assignment: The source assigned to paired hp output.211 * @output.hp_paired_assignment: The source assigned to paired hp output.
208 * @output.reserved: Padding for 32 bit alignment for future extension.212 * @output.reserved: Padding for 32-bit alignment for future extension.
213 * @line_input: line input parameters
209 * @line_input.boost_flag: The flags of boost for line inputs, only for 828mk2 and Traveler.214 * @line_input.boost_flag: The flags of boost for line inputs, only for 828mk2 and Traveler.
210 * @line_input.nominal_level_flag: The flags of nominal level for line inputs, only for 828mk2 and215 * @line_input.nominal_level_flag: The flags of nominal level for line inputs, only for 828mk2 and
211 * Traveler.216 * Traveler.
212 * @line_input.reserved: Padding for 32 bit alignment for future extension.217 * @line_input.reserved: Padding for 32-bit alignment for future extension.
218 * @input: input parameters
213 * @input.gain_and_invert: The value including gain and invert for input, only for Ultralite, 4 pre219 * @input.gain_and_invert: The value including gain and invert for input, only for Ultralite, 4 pre
214 * and Audio Express.220 * and Audio Express.
215 * @input.flag: The flag of input; e.g. jack detection, phantom power, and pad, only for Ultralite,221 * @input.flag: The flag of input; e.g. jack detection, phantom power, and pad, only for Ultralite,
216 * 4 pre and Audio express.222 * 4 pre and Audio express.
217 * @reserved: Padding so that the size of structure is kept to 512 byte, but for future extension.223 * @reserved: Padding so that the size of structure is kept to 512 bytes, but for future extension.
218 *224 *
219 * The structure expresses the set of parameters for DSP controlled by register access.225 * The structure expresses the set of parameters for DSP controlled by register access.
220 */226 */
...@@ -272,8 +278,8 @@ struct snd_firewire_motu_register_dsp_parameter {...@@ -272,8 +278,8 @@ struct snd_firewire_motu_register_dsp_parameter {
272 * controlled by command278 * controlled by command
273 * @data: Signal level meters. The mapping between position and signal channel is model-dependent.279 * @data: Signal level meters. The mapping between position and signal channel is model-dependent.
274 *280 *
275 * The structure expresses the part of DSP status for hardware meter. The 32 bit storage is281 * The structure expresses the part of DSP status for hardware meter. The 32-bit storage is
276 * estimated to include IEEE 764 32 bit single precision floating point (binary32) value. It is282 * estimated to include IEEE 764 32-bit single precision floating point (binary32) value. It is
277 * expected to be linear value (not logarithm) for audio signal level between 0.0 and +1.0.283 * expected to be linear value (not logarithm) for audio signal level between 0.0 and +1.0.
278 */284 */
279struct snd_firewire_motu_command_dsp_meter {285struct snd_firewire_motu_command_dsp_meter {
lib/libc/include/any-linux-any/sound/skl-tplg-interface.h deleted-168
...@@ -1,168 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * skl-tplg-interface.h - Intel DSP FW private data interface
4 *
5 * Copyright (C) 2015 Intel Corp
6 * Author: Jeeja KP <jeeja.kp@intel.com>
7 * Nilofer, Samreen <samreen.nilofer@intel.com>
8 */
9
10#ifndef __HDA_TPLG_INTERFACE_H__
11#define __HDA_TPLG_INTERFACE_H__
12
13#include <linux/types.h>
14
15/*
16 * Default types range from 0~12. type can range from 0 to 0xff
17 * SST types start at higher to avoid any overlapping in future
18 */
19#define SKL_CONTROL_TYPE_BYTE_TLV 0x100
20#define SKL_CONTROL_TYPE_MIC_SELECT 0x102
21#define SKL_CONTROL_TYPE_MULTI_IO_SELECT 0x103
22#define SKL_CONTROL_TYPE_MULTI_IO_SELECT_DMIC 0x104
23
24#define HDA_SST_CFG_MAX 900 /* size of copier cfg*/
25#define MAX_IN_QUEUE 8
26#define MAX_OUT_QUEUE 8
27
28#define SKL_UUID_STR_SZ 40
29/* Event types goes here */
30/* Reserve event type 0 for no event handlers */
31enum skl_event_types {
32 SKL_EVENT_NONE = 0,
33 SKL_MIXER_EVENT,
34 SKL_MUX_EVENT,
35 SKL_VMIXER_EVENT,
36 SKL_PGA_EVENT
37};
38
39/**
40 * enum skl_ch_cfg - channel configuration
41 *
42 * @SKL_CH_CFG_MONO: One channel only
43 * @SKL_CH_CFG_STEREO: L & R
44 * @SKL_CH_CFG_2_1: L, R & LFE
45 * @SKL_CH_CFG_3_0: L, C & R
46 * @SKL_CH_CFG_3_1: L, C, R & LFE
47 * @SKL_CH_CFG_QUATRO: L, R, Ls & Rs
48 * @SKL_CH_CFG_4_0: L, C, R & Cs
49 * @SKL_CH_CFG_5_0: L, C, R, Ls & Rs
50 * @SKL_CH_CFG_5_1: L, C, R, Ls, Rs & LFE
51 * @SKL_CH_CFG_DUAL_MONO: One channel replicated in two
52 * @SKL_CH_CFG_I2S_DUAL_STEREO_0: Stereo(L,R) in 4 slots, 1st stream:[ L, R, -, - ]
53 * @SKL_CH_CFG_I2S_DUAL_STEREO_1: Stereo(L,R) in 4 slots, 2nd stream:[ -, -, L, R ]
54 * @SKL_CH_CFG_INVALID: Invalid
55 */
56enum skl_ch_cfg {
57 SKL_CH_CFG_MONO = 0,
58 SKL_CH_CFG_STEREO = 1,
59 SKL_CH_CFG_2_1 = 2,
60 SKL_CH_CFG_3_0 = 3,
61 SKL_CH_CFG_3_1 = 4,
62 SKL_CH_CFG_QUATRO = 5,
63 SKL_CH_CFG_4_0 = 6,
64 SKL_CH_CFG_5_0 = 7,
65 SKL_CH_CFG_5_1 = 8,
66 SKL_CH_CFG_DUAL_MONO = 9,
67 SKL_CH_CFG_I2S_DUAL_STEREO_0 = 10,
68 SKL_CH_CFG_I2S_DUAL_STEREO_1 = 11,
69 SKL_CH_CFG_7_1 = 12,
70 SKL_CH_CFG_4_CHANNEL = SKL_CH_CFG_7_1,
71 SKL_CH_CFG_INVALID
72};
73
74enum skl_module_type {
75 SKL_MODULE_TYPE_MIXER = 0,
76 SKL_MODULE_TYPE_COPIER,
77 SKL_MODULE_TYPE_UPDWMIX,
78 SKL_MODULE_TYPE_SRCINT,
79 SKL_MODULE_TYPE_ALGO,
80 SKL_MODULE_TYPE_BASE_OUTFMT,
81 SKL_MODULE_TYPE_KPB,
82 SKL_MODULE_TYPE_MIC_SELECT,
83};
84
85enum skl_core_affinity {
86 SKL_AFFINITY_CORE_0 = 0,
87 SKL_AFFINITY_CORE_1,
88 SKL_AFFINITY_CORE_MAX
89};
90
91enum skl_pipe_conn_type {
92 SKL_PIPE_CONN_TYPE_NONE = 0,
93 SKL_PIPE_CONN_TYPE_FE,
94 SKL_PIPE_CONN_TYPE_BE
95};
96
97enum skl_hw_conn_type {
98 SKL_CONN_NONE = 0,
99 SKL_CONN_SOURCE = 1,
100 SKL_CONN_SINK = 2
101};
102
103enum skl_dev_type {
104 SKL_DEVICE_BT = 0x0,
105 SKL_DEVICE_DMIC = 0x1,
106 SKL_DEVICE_I2S = 0x2,
107 SKL_DEVICE_SLIMBUS = 0x3,
108 SKL_DEVICE_HDALINK = 0x4,
109 SKL_DEVICE_HDAHOST = 0x5,
110 SKL_DEVICE_NONE
111};
112
113/**
114 * enum skl_interleaving - interleaving style
115 *
116 * @SKL_INTERLEAVING_PER_CHANNEL: [s1_ch1...s1_chN,...,sM_ch1...sM_chN]
117 * @SKL_INTERLEAVING_PER_SAMPLE: [s1_ch1...sM_ch1,...,s1_chN...sM_chN]
118 */
119enum skl_interleaving {
120 SKL_INTERLEAVING_PER_CHANNEL = 0,
121 SKL_INTERLEAVING_PER_SAMPLE = 1,
122};
123
124enum skl_sample_type {
125 SKL_SAMPLE_TYPE_INT_MSB = 0,
126 SKL_SAMPLE_TYPE_INT_LSB = 1,
127 SKL_SAMPLE_TYPE_INT_SIGNED = 2,
128 SKL_SAMPLE_TYPE_INT_UNSIGNED = 3,
129 SKL_SAMPLE_TYPE_FLOAT = 4
130};
131
132enum module_pin_type {
133 /* All pins of the module takes same PCM inputs or outputs
134 * e.g. mixout
135 */
136 SKL_PIN_TYPE_HOMOGENEOUS,
137 /* All pins of the module takes different PCM inputs or outputs
138 * e.g mux
139 */
140 SKL_PIN_TYPE_HETEROGENEOUS,
141};
142
143enum skl_module_param_type {
144 SKL_PARAM_DEFAULT = 0,
145 SKL_PARAM_INIT,
146 SKL_PARAM_SET,
147 SKL_PARAM_BIND
148};
149
150struct skl_dfw_algo_data {
151 __u32 set_params:2;
152 __u32 rsvd:30;
153 __u32 param_id;
154 __u32 max;
155 char params[];
156} __attribute__((packed));
157
158enum skl_tkn_dir {
159 SKL_DIR_IN,
160 SKL_DIR_OUT
161};
162
163enum skl_tuple_type {
164 SKL_TYPE_TUPLE,
165 SKL_TYPE_DATA
166};
167
168#endif
\ No newline at end of file
lib/libc/include/any-linux-any/sound/snd_ar_tokens.h+94-1
...@@ -58,7 +58,7 @@ enum ar_event_types {...@@ -58,7 +58,7 @@ enum ar_event_types {
58#define SND_SOC_AR_TPLG_FE_BE_GRAPH_CTL_MIX 25658#define SND_SOC_AR_TPLG_FE_BE_GRAPH_CTL_MIX 256
59#define SND_SOC_AR_TPLG_VOL_CTL 25759#define SND_SOC_AR_TPLG_VOL_CTL 257
6060
61/**61/*
62 * %AR_TKN_U32_SUB_GRAPH_INSTANCE_ID: Sub Graph Instance Id62 * %AR_TKN_U32_SUB_GRAPH_INSTANCE_ID: Sub Graph Instance Id
63 *63 *
64 * %AR_TKN_U32_SUB_GRAPH_PERF_MODE: Performance mode of subgraph64 * %AR_TKN_U32_SUB_GRAPH_PERF_MODE: Performance mode of subgraph
...@@ -168,6 +168,60 @@ enum ar_event_types {...@@ -168,6 +168,60 @@ enum ar_event_types {
168 * LOG_WAIT = 0,168 * LOG_WAIT = 0,
169 * LOG_IMMEDIATELY = 1169 * LOG_IMMEDIATELY = 1
170 *170 *
171 * %AR_TKN_U16_MODULE_SYNC_SRC: Frame sync source
172 * AR_AUDIO_IF_SYNC_SRC_EXTERNAL = 0,
173 * AR_AUDIO_IF_SYNC_SRC_INTERNAL = 1
174 *
175 * %AR_TKN_U16_MODULE_CTRL_DATA_OUT_ENABLE: Enable data-out tri-state control
176 * AR_AUDIO_IF_CTRL_DATA_OE_DISABLE = 0,
177 * AR_AUDIO_IF_CTRL_DATA_OE_ENABLE = 1
178 *
179 * %AR_TKN_U32_MODULE_SLOT_MASK: Active TDM slot bitmask
180 *
181 * %AR_TKN_U16_MODULE_NSLOTS_PER_FRAME: Number of slots per TDM frame
182 *
183 * %AR_TKN_U16_MODULE_SLOT_WIDTH: Slot width in bits (16 or 32)
184 *
185 * %AR_TKN_U16_MODULE_SYNC_MODE: Frame sync mode
186 * AR_AUDIO_IF_FRAME_SYNC_MODE_SHORT = 0,
187 * AR_AUDIO_IF_FRAME_SYNC_MODE_ONE_SLOT = 1,
188 * AR_AUDIO_IF_FRAME_SYNC_MODE_LONG = 2
189 *
190 * %AR_TKN_U16_MODULE_CTRL_INVERT_SYNC_PULSE: Invert frame sync pulse polarity
191 * AR_AUDIO_IF_SYNC_NORMAL = 0,
192 * AR_AUDIO_IF_SYNC_INVERTED = 1
193 *
194 * %AR_TKN_U16_MODULE_CTRL_SYNC_DATA_DELAY: Data delay relative to frame sync
195 * AR_AUDIO_IF_DATA_DELAY_NONE = 0,
196 * AR_AUDIO_IF_DATA_DELAY_1_CYCLE = 1,
197 * AR_AUDIO_IF_DATA_DELAY_2_CYCLE = 2
198 *
199 * %AR_TKN_U16_MODULE_INTF_MODE: Audio IF interface mode
200 * AR_AUDIO_IF_INTF_MODE_TDM = 0,
201 * AR_AUDIO_IF_INTF_MODE_PCM = 1,
202 * AR_AUDIO_IF_INTF_MODE_I2S = 2
203 *
204 * %AR_TKN_U16_MODULE_QAIF_TYPE: QAIF hardware port type index
205 * AR_AUDIO_IF_QAIF = 0,
206 * AR_AUDIO_IF_QAIF_VA = 1
207 *
208 * %AR_TKN_U32_MODULE_ACTIVE_LANE_MASK: Active lane bitmask for multi-lane
209 *
210 * %AR_TKN_U32_MODULE_FRAME_SYNC_RATE: Frame sync rate in Hz
211 *
212 * %AR_TKN_U16_MODULE_BIT_CLK_TYPE: Bit clock type
213 * AR_AUDIO_IF_BIT_CLK_INTERNAL = 0,
214 * AR_AUDIO_IF_BIT_CLK_EXTERNAL = 1,
215 * AR_AUDIO_IF_BIT_CLK_SKIP = 2
216 *
217 * %AR_TKN_U8_MODULE_INV_INT_BIT_CLK: Invert internal bit clock
218 * AR_AUDIO_IF_CLK_NORMAL = 0,
219 * AR_AUDIO_IF_CLK_INVERTED = 1
220 *
221 * %AR_TKN_U8_MODULE_INV_EXT_BIT_CLK: Invert external bit clock
222 * AR_AUDIO_IF_CLK_NORMAL = 0,
223 * AR_AUDIO_IF_CLK_INVERTED = 1
224 *
171 * %AR_TKN_DAI_INDEX: dai index225 * %AR_TKN_DAI_INDEX: dai index
172 *226 *
173 */227 */
...@@ -240,6 +294,45 @@ enum ar_event_types {...@@ -240,6 +294,45 @@ enum ar_event_types {
240#define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260294#define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
241#define AR_TKN_U32_MODULE_LOG_MODE 261295#define AR_TKN_U32_MODULE_LOG_MODE 261
242296
297#define AR_TKN_U16_MODULE_SYNC_SRC 262
298#define AR_TKN_U16_MODULE_CTRL_DATA_OUT_ENABLE 263
299#define AR_TKN_U32_MODULE_SLOT_MASK 264
300#define AR_TKN_U16_MODULE_NSLOTS_PER_FRAME 265
301#define AR_TKN_U16_MODULE_SLOT_WIDTH 266
302#define AR_TKN_U16_MODULE_SYNC_MODE 267
303#define AR_TKN_U16_MODULE_CTRL_INVERT_SYNC_PULSE 268
304#define AR_TKN_U16_MODULE_CTRL_SYNC_DATA_DELAY 269
305#define AR_TKN_U16_MODULE_INTF_MODE 270
306#define AR_TKN_U16_MODULE_QAIF_TYPE 271
307#define AR_TKN_U32_MODULE_ACTIVE_LANE_MASK 272
308#define AR_TKN_U32_MODULE_FRAME_SYNC_RATE 273
309#define AR_TKN_U16_MODULE_BIT_CLK_TYPE 274
310#define AR_TKN_U8_MODULE_INV_INT_BIT_CLK 275
311#define AR_TKN_U8_MODULE_INV_EXT_BIT_CLK 276
312
313#define AR_AUDIO_IF_SYNC_SRC_EXTERNAL 0
314#define AR_AUDIO_IF_SYNC_SRC_INTERNAL 1
315#define AR_AUDIO_IF_CTRL_DATA_OE_DISABLE 0
316#define AR_AUDIO_IF_CTRL_DATA_OE_ENABLE 1
317#define AR_AUDIO_IF_INTF_MODE_TDM 0
318#define AR_AUDIO_IF_INTF_MODE_PCM 1
319#define AR_AUDIO_IF_INTF_MODE_I2S 2
320#define AR_AUDIO_IF_QAIF 0
321#define AR_AUDIO_IF_QAIF_VA 1
322#define AR_AUDIO_IF_FRAME_SYNC_MODE_SHORT 0
323#define AR_AUDIO_IF_FRAME_SYNC_MODE_ONE_SLOT 1
324#define AR_AUDIO_IF_FRAME_SYNC_MODE_LONG 2
325#define AR_AUDIO_IF_SYNC_NORMAL 0
326#define AR_AUDIO_IF_SYNC_INVERTED 1
327#define AR_AUDIO_IF_DATA_DELAY_NONE 0
328#define AR_AUDIO_IF_DATA_DELAY_1_CYCLE 1
329#define AR_AUDIO_IF_DATA_DELAY_2_CYCLE 2
330#define AR_AUDIO_IF_BIT_CLK_INTERNAL 0
331#define AR_AUDIO_IF_BIT_CLK_EXTERNAL 1
332#define AR_AUDIO_IF_BIT_CLK_SKIP 2
333#define AR_AUDIO_IF_CLK_NORMAL 0
334#define AR_AUDIO_IF_CLK_INVERTED 1
335
243#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006336#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
244struct audioreach_module_priv_data {337struct audioreach_module_priv_data {
245 __le32 size; /* size in bytes of the array, including all elements */338 __le32 size; /* size in bytes of the array, including all elements */
lib/libc/include/any-linux-any/sound/snd_sst_tokens.h deleted-324
...@@ -1,324 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * snd_sst_tokens.h - Intel SST tokens definition
4 *
5 * Copyright (C) 2016 Intel Corp
6 * Author: Shreyas NC <shreyas.nc@intel.com>
7 */
8#ifndef __SND_SST_TOKENS_H__
9#define __SND_SST_TOKENS_H__
10
11/**
12 * %SKL_TKN_UUID: Module UUID
13 *
14 * %SKL_TKN_U8_BLOCK_TYPE: Type of the private data block.Can be:
15 * tuples, bytes, short and words
16 *
17 * %SKL_TKN_U8_IN_PIN_TYPE: Input pin type,
18 * homogenous=0, heterogenous=1
19 *
20 * %SKL_TKN_U8_OUT_PIN_TYPE: Output pin type,
21 * homogenous=0, heterogenous=1
22 * %SKL_TKN_U8_DYN_IN_PIN: Configure Input pin dynamically
23 * if true
24 *
25 * %SKL_TKN_U8_DYN_OUT_PIN: Configure Output pin dynamically
26 * if true
27 *
28 * %SKL_TKN_U8_IN_QUEUE_COUNT: Store the number of Input pins
29 *
30 * %SKL_TKN_U8_OUT_QUEUE_COUNT: Store the number of Output pins
31 *
32 * %SKL_TKN_U8_TIME_SLOT: TDM slot number
33 *
34 * %SKL_TKN_U8_CORE_ID: Stores module affinity value.Can take
35 * the values:
36 * SKL_AFFINITY_CORE_0 = 0,
37 * SKL_AFFINITY_CORE_1,
38 * SKL_AFFINITY_CORE_MAX
39 *
40 * %SKL_TKN_U8_MOD_TYPE: Module type value.
41 *
42 * %SKL_TKN_U8_CONN_TYPE: Module connection type can be a FE,
43 * BE or NONE as defined :
44 * SKL_PIPE_CONN_TYPE_NONE = 0,
45 * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA)
46 * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA)
47 *
48 * %SKL_TKN_U8_DEV_TYPE: Type of device to which the module is
49 * connected
50 * Can take the values:
51 * SKL_DEVICE_BT = 0x0,
52 * SKL_DEVICE_DMIC = 0x1,
53 * SKL_DEVICE_I2S = 0x2,
54 * SKL_DEVICE_SLIMBUS = 0x3,
55 * SKL_DEVICE_HDALINK = 0x4,
56 * SKL_DEVICE_HDAHOST = 0x5,
57 * SKL_DEVICE_NONE
58 *
59 * %SKL_TKN_U8_HW_CONN_TYPE: Connection type of the HW to which the
60 * module is connected
61 * SKL_CONN_NONE = 0,
62 * SKL_CONN_SOURCE = 1,
63 * SKL_CONN_SINK = 2
64 *
65 * %SKL_TKN_U16_PIN_INST_ID: Stores the pin instance id
66 *
67 * %SKL_TKN_U16_MOD_INST_ID: Stores the mdule instance id
68 *
69 * %SKL_TKN_U32_MAX_MCPS: Module max mcps value
70 *
71 * %SKL_TKN_U32_MEM_PAGES: Module resource pages
72 *
73 * %SKL_TKN_U32_OBS: Stores Output Buffer size
74 *
75 * %SKL_TKN_U32_IBS: Stores input buffer size
76 *
77 * %SKL_TKN_U32_VBUS_ID: Module VBUS_ID. PDM=0, SSP0=0,
78 * SSP1=1,SSP2=2,
79 * SSP3=3, SSP4=4,
80 * SSP5=5, SSP6=6,INVALID
81 *
82 * %SKL_TKN_U32_PARAMS_FIXUP: Module Params fixup mask
83 * %SKL_TKN_U32_CONVERTER: Module params converter mask
84 * %SKL_TKN_U32_PIPE_ID: Stores the pipe id
85 *
86 * %SKL_TKN_U32_PIPE_CONN_TYPE: Type of the token to which the pipe is
87 * connected to. It can be
88 * SKL_PIPE_CONN_TYPE_NONE = 0,
89 * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA),
90 * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA),
91 *
92 * %SKL_TKN_U32_PIPE_PRIORITY: Pipe priority value
93 * %SKL_TKN_U32_PIPE_MEM_PGS: Pipe resource pages
94 *
95 * %SKL_TKN_U32_DIR_PIN_COUNT: Value for the direction to set input/output
96 * formats and the pin count.
97 * The first 4 bits have the direction
98 * value and the next 4 have
99 * the pin count value.
100 * SKL_DIR_IN = 0, SKL_DIR_OUT = 1.
101 * The input and output formats
102 * share the same set of tokens
103 * with the distinction between input
104 * and output made by reading direction
105 * token.
106 *
107 * %SKL_TKN_U32_FMT_CH: Supported channel count
108 *
109 * %SKL_TKN_U32_FMT_FREQ: Supported frequency/sample rate
110 *
111 * %SKL_TKN_U32_FMT_BIT_DEPTH: Supported container size
112 *
113 * %SKL_TKN_U32_FMT_SAMPLE_SIZE:Number of samples in the container
114 *
115 * %SKL_TKN_U32_FMT_CH_CONFIG: Supported channel configurations for the
116 * input/output.
117 *
118 * %SKL_TKN_U32_FMT_INTERLEAVE: Interleaving style which can be per
119 * channel or per sample. The values can be :
120 * SKL_INTERLEAVING_PER_CHANNEL = 0,
121 * SKL_INTERLEAVING_PER_SAMPLE = 1,
122 *
123 * %SKL_TKN_U32_FMT_SAMPLE_TYPE:
124 * Specifies the sample type. Can take the
125 * values: SKL_SAMPLE_TYPE_INT_MSB = 0,
126 * SKL_SAMPLE_TYPE_INT_LSB = 1,
127 * SKL_SAMPLE_TYPE_INT_SIGNED = 2,
128 * SKL_SAMPLE_TYPE_INT_UNSIGNED = 3,
129 * SKL_SAMPLE_TYPE_FLOAT = 4
130 *
131 * %SKL_TKN_U32_CH_MAP: Channel map values
132 * %SKL_TKN_U32_MOD_SET_PARAMS: It can take these values:
133 * SKL_PARAM_DEFAULT, SKL_PARAM_INIT,
134 * SKL_PARAM_SET, SKL_PARAM_BIND
135 *
136 * %SKL_TKN_U32_MOD_PARAM_ID: ID of the module params
137 *
138 * %SKL_TKN_U32_CAPS_SET_PARAMS:
139 * Set params value
140 *
141 * %SKL_TKN_U32_CAPS_PARAMS_ID: Params ID
142 *
143 * %SKL_TKN_U32_CAPS_SIZE: Caps size
144 *
145 * %SKL_TKN_U32_PROC_DOMAIN: Specify processing domain
146 *
147 * %SKL_TKN_U32_LIB_COUNT: Specifies the number of libraries
148 *
149 * %SKL_TKN_STR_LIB_NAME: Specifies the library name
150 *
151 * %SKL_TKN_U32_PMODE: Specifies the power mode for pipe
152 *
153 * %SKL_TKL_U32_D0I3_CAPS: Specifies the D0i3 capability for module
154 *
155 * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec
156 *
157 * %SKL_TKN_U32_PIPE_DIR: Specifies pipe direction. Can be
158 * playback/capture.
159 *
160 * %SKL_TKN_U32_NUM_CONFIGS: Number of pipe configs
161 *
162 * %SKL_TKN_U32_PATH_MEM_PGS: Size of memory (in pages) required for pipeline
163 * and its data
164 *
165 * %SKL_TKN_U32_PIPE_CONFIG_ID: Config id for the modules in the pipe
166 * and PCM params supported by that pipe
167 * config. This is used as index to fill
168 * up the pipe config and module config
169 * structure.
170 *
171 * %SKL_TKN_U32_CFG_FREQ:
172 * %SKL_TKN_U8_CFG_CHAN:
173 * %SKL_TKN_U8_CFG_BPS: PCM params (freq, channels, bits per sample)
174 * supported for each of the pipe configs.
175 *
176 * %SKL_TKN_CFG_MOD_RES_ID: Module's resource index for each of the
177 * pipe config
178 *
179 * %SKL_TKN_CFG_MOD_FMT_ID: Module's interface index for each of the
180 * pipe config
181 *
182 * %SKL_TKN_U8_NUM_MOD: Number of modules in the manifest
183 *
184 * %SKL_TKN_MM_U8_MOD_IDX: Current index of the module in the manifest
185 *
186 * %SKL_TKN_MM_U8_NUM_RES: Number of resources for the module
187 *
188 * %SKL_TKN_MM_U8_NUM_INTF: Number of interfaces for the module
189 *
190 * %SKL_TKN_MM_U32_RES_ID: Resource index for the resource info to
191 * be filled into.
192 * A module can support multiple resource
193 * configuration and is represnted as a
194 * resource table. This index is used to
195 * fill information into appropriate index.
196 *
197 * %SKL_TKN_MM_U32_CPS: DSP cycles per second
198 *
199 * %SKL_TKN_MM_U32_DMA_SIZE: Allocated buffer size for gateway DMA
200 *
201 * %SKL_TKN_MM_U32_CPC: DSP cycles allocated per frame
202 *
203 * %SKL_TKN_MM_U32_RES_PIN_ID: Resource pin index in the module
204 *
205 * %SKL_TKN_MM_U32_INTF_PIN_ID: Interface index in the module
206 *
207 * %SKL_TKN_MM_U32_PIN_BUF: Buffer size of the module pin
208 *
209 * %SKL_TKN_MM_U32_FMT_ID: Format index for each of the interface/
210 * format information to be filled into.
211 *
212 * %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats
213 * %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats
214 *
215 * %SKL_TKN_U32_ASTATE_IDX: Table Index for the A-State entry to be filled
216 * with kcps and clock source
217 *
218 * %SKL_TKN_U32_ASTATE_COUNT: Number of valid entries in A-State table
219 *
220 * %SKL_TKN_U32_ASTATE_KCPS: Specifies the core load threshold (in kilo
221 * cycles per second) below which DSP is clocked
222 * from source specified by clock source.
223 *
224 * %SKL_TKN_U32_ASTATE_CLK_SRC: Clock source for A-State entry
225 *
226 * %SKL_TKN_U32_FMT_CFG_IDX: Format config index
227 *
228 * module_id and loadable flags dont have tokens as these values will be
229 * read from the DSP FW manifest
230 *
231 * Tokens defined can be used either in the manifest or widget private data.
232 *
233 * SKL_TKN_MM is used as a suffix for all tokens that represent
234 * module data in the manifest.
235 */
236enum SKL_TKNS {
237 SKL_TKN_UUID = 1,
238 SKL_TKN_U8_NUM_BLOCKS,
239 SKL_TKN_U8_BLOCK_TYPE,
240 SKL_TKN_U8_IN_PIN_TYPE,
241 SKL_TKN_U8_OUT_PIN_TYPE,
242 SKL_TKN_U8_DYN_IN_PIN,
243 SKL_TKN_U8_DYN_OUT_PIN,
244 SKL_TKN_U8_IN_QUEUE_COUNT,
245 SKL_TKN_U8_OUT_QUEUE_COUNT,
246 SKL_TKN_U8_TIME_SLOT,
247 SKL_TKN_U8_CORE_ID,
248 SKL_TKN_U8_MOD_TYPE,
249 SKL_TKN_U8_CONN_TYPE,
250 SKL_TKN_U8_DEV_TYPE,
251 SKL_TKN_U8_HW_CONN_TYPE,
252 SKL_TKN_U16_MOD_INST_ID,
253 SKL_TKN_U16_BLOCK_SIZE,
254 SKL_TKN_U32_MAX_MCPS,
255 SKL_TKN_U32_MEM_PAGES,
256 SKL_TKN_U32_OBS,
257 SKL_TKN_U32_IBS,
258 SKL_TKN_U32_VBUS_ID,
259 SKL_TKN_U32_PARAMS_FIXUP,
260 SKL_TKN_U32_CONVERTER,
261 SKL_TKN_U32_PIPE_ID,
262 SKL_TKN_U32_PIPE_CONN_TYPE,
263 SKL_TKN_U32_PIPE_PRIORITY,
264 SKL_TKN_U32_PIPE_MEM_PGS,
265 SKL_TKN_U32_DIR_PIN_COUNT,
266 SKL_TKN_U32_FMT_CH,
267 SKL_TKN_U32_FMT_FREQ,
268 SKL_TKN_U32_FMT_BIT_DEPTH,
269 SKL_TKN_U32_FMT_SAMPLE_SIZE,
270 SKL_TKN_U32_FMT_CH_CONFIG,
271 SKL_TKN_U32_FMT_INTERLEAVE,
272 SKL_TKN_U32_FMT_SAMPLE_TYPE,
273 SKL_TKN_U32_FMT_CH_MAP,
274 SKL_TKN_U32_PIN_MOD_ID,
275 SKL_TKN_U32_PIN_INST_ID,
276 SKL_TKN_U32_MOD_SET_PARAMS,
277 SKL_TKN_U32_MOD_PARAM_ID,
278 SKL_TKN_U32_CAPS_SET_PARAMS,
279 SKL_TKN_U32_CAPS_PARAMS_ID,
280 SKL_TKN_U32_CAPS_SIZE,
281 SKL_TKN_U32_PROC_DOMAIN,
282 SKL_TKN_U32_LIB_COUNT,
283 SKL_TKN_STR_LIB_NAME,
284 SKL_TKN_U32_PMODE,
285 SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */
286 SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS,
287 SKL_TKN_U32_DMA_BUF_SIZE,
288
289 SKL_TKN_U32_PIPE_DIRECTION,
290 SKL_TKN_U32_PIPE_CONFIG_ID,
291 SKL_TKN_U32_NUM_CONFIGS,
292 SKL_TKN_U32_PATH_MEM_PGS,
293
294 SKL_TKN_U32_CFG_FREQ,
295 SKL_TKN_U8_CFG_CHAN,
296 SKL_TKN_U8_CFG_BPS,
297 SKL_TKN_CFG_MOD_RES_ID,
298 SKL_TKN_CFG_MOD_FMT_ID,
299 SKL_TKN_U8_NUM_MOD,
300
301 SKL_TKN_MM_U8_MOD_IDX,
302 SKL_TKN_MM_U8_NUM_RES,
303 SKL_TKN_MM_U8_NUM_INTF,
304 SKL_TKN_MM_U32_RES_ID,
305 SKL_TKN_MM_U32_CPS,
306 SKL_TKN_MM_U32_DMA_SIZE,
307 SKL_TKN_MM_U32_CPC,
308 SKL_TKN_MM_U32_RES_PIN_ID,
309 SKL_TKN_MM_U32_INTF_PIN_ID,
310 SKL_TKN_MM_U32_PIN_BUF,
311 SKL_TKN_MM_U32_FMT_ID,
312 SKL_TKN_MM_U32_NUM_IN_FMT,
313 SKL_TKN_MM_U32_NUM_OUT_FMT,
314
315 SKL_TKN_U32_ASTATE_IDX,
316 SKL_TKN_U32_ASTATE_COUNT,
317 SKL_TKN_U32_ASTATE_KCPS,
318 SKL_TKN_U32_ASTATE_CLK_SRC,
319
320 SKL_TKN_U32_FMT_CFG_IDX = 96,
321 SKL_TKN_MAX = SKL_TKN_U32_FMT_CFG_IDX,
322};
323
324#endif
\ No newline at end of file
lib/libc/include/any-linux-any/sound/sof/tokens.h+3-2
...@@ -111,8 +111,8 @@...@@ -111,8 +111,8 @@
111111
112#define SOF_TKN_COMP_SCHED_DOMAIN 418112#define SOF_TKN_COMP_SCHED_DOMAIN 418
113#define SOF_TKN_COMP_DOMAIN_ID 419113#define SOF_TKN_COMP_DOMAIN_ID 419
114#define SOF_TKN_COMP_HEAP_BYTES_REQUIREMENT 420114#define SOF_TKN_COMP_STACK_BYTES_REQUIREMENT 420
115#define SOF_TKN_COMP_STACK_BYTES_REQUIREMENT 421115#define SOF_TKN_COMP_HEAP_BYTES_REQUIREMENT 421
116116
117/* SSP */117/* SSP */
118#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500118#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
...@@ -223,6 +223,7 @@...@@ -223,6 +223,7 @@
223#define SOF_TKN_AMD_ACPI2S_RATE 1700223#define SOF_TKN_AMD_ACPI2S_RATE 1700
224#define SOF_TKN_AMD_ACPI2S_CH 1701224#define SOF_TKN_AMD_ACPI2S_CH 1701
225#define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702225#define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702
226#define SOF_TKN_AMD_ACPI2S_FORMAT 1703
226227
227/* MICFIL PDM */228/* MICFIL PDM */
228#define SOF_TKN_IMX_MICFIL_RATE 2000229#define SOF_TKN_IMX_MICFIL_RATE 2000
lib/libc/include/arc-linux-any/asm/unistd_32.h+1
...@@ -352,6 +352,7 @@...@@ -352,6 +352,7 @@
352#define __NR_file_setattr 469352#define __NR_file_setattr 469
353#define __NR_listns 470353#define __NR_listns 470
354#define __NR_rseq_slice_yield 471354#define __NR_rseq_slice_yield 471
355#define __NR_fchroot 472
355356
356357
357#endif /* _ASM_UNISTD_32_H */358#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/arm-linux-any/asm/ptrace.h+2-2
...@@ -97,7 +97,7 @@...@@ -97,7 +97,7 @@
97#define PT_DATA_ADDR 0x1000497#define PT_DATA_ADDR 0x10004
98#define PT_TEXT_END_ADDR 0x1000898#define PT_TEXT_END_ADDR 0x10008
9999
100#ifndef __ASSEMBLY__100#ifndef __ASSEMBLER__
101101
102/*102/*
103 * This struct defines the way the registers are stored on the103 * This struct defines the way the registers are stored on the
...@@ -134,6 +134,6 @@ struct pt_regs {...@@ -134,6 +134,6 @@ struct pt_regs {
134#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )134#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )
135135
136136
137#endif /* __ASSEMBLY__ */137#endif /* __ASSEMBLER__ */
138138
139#endif /* __ASM_ARM_PTRACE_H */139#endif /* __ASM_ARM_PTRACE_H */
\ No newline at end of file
lib/libc/include/arm-linux-any/asm/unistd-eabi.h+1
...@@ -425,5 +425,6 @@...@@ -425,5 +425,6 @@
425#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)425#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
426#define __NR_listns (__NR_SYSCALL_BASE + 470)426#define __NR_listns (__NR_SYSCALL_BASE + 470)
427#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)427#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
428#define __NR_fchroot (__NR_SYSCALL_BASE + 472)
428429
429#endif /* _ASM_UNISTD_EABI_H */430#endif /* _ASM_UNISTD_EABI_H */
\ No newline at end of file
lib/libc/include/arm-linux-any/asm/unistd-oabi.h+1
...@@ -437,5 +437,6 @@...@@ -437,5 +437,6 @@
437#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)437#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
438#define __NR_listns (__NR_SYSCALL_BASE + 470)438#define __NR_listns (__NR_SYSCALL_BASE + 470)
439#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)439#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
440#define __NR_fchroot (__NR_SYSCALL_BASE + 472)
440441
441#endif /* _ASM_UNISTD_OABI_H */442#endif /* _ASM_UNISTD_OABI_H */
\ No newline at end of file
lib/libc/include/csky-linux-any/asm/unistd_32.h+1
...@@ -348,6 +348,7 @@...@@ -348,6 +348,7 @@
348#define __NR_file_setattr 469348#define __NR_file_setattr 469
349#define __NR_listns 470349#define __NR_listns 470
350#define __NR_rseq_slice_yield 471350#define __NR_rseq_slice_yield 471
351#define __NR_fchroot 472
351352
352353
353#endif /* _ASM_UNISTD_32_H */354#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/hexagon-linux-any/asm/registers.h+1-1
...@@ -7,7 +7,7 @@...@@ -7,7 +7,7 @@
7#ifndef _ASM_REGISTERS_H7#ifndef _ASM_REGISTERS_H
8#define _ASM_REGISTERS_H8#define _ASM_REGISTERS_H
99
10#ifndef __ASSEMBLY__10#ifndef __ASSEMBLER__
1111
12/* See kernel/entry.S for further documentation. */12/* See kernel/entry.S for further documentation. */
1313
lib/libc/include/hexagon-linux-any/asm/unistd_32.h+1
...@@ -347,6 +347,7 @@...@@ -347,6 +347,7 @@
347#define __NR_file_setattr 469347#define __NR_file_setattr 469
348#define __NR_listns 470348#define __NR_listns 470
349#define __NR_rseq_slice_yield 471349#define __NR_rseq_slice_yield 471
350#define __NR_fchroot 472
350351
351352
352#endif /* _ASM_UNISTD_32_H */353#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/unistd_32.h+1
...@@ -317,6 +317,7 @@...@@ -317,6 +317,7 @@
317#define __NR_file_setattr 469317#define __NR_file_setattr 469
318#define __NR_listns 470318#define __NR_listns 470
319#define __NR_rseq_slice_yield 471319#define __NR_rseq_slice_yield 471
320#define __NR_fchroot 472
320321
321322
322#endif /* _ASM_UNISTD_32_H */323#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/loongarch-linux-any/asm/unistd_64.h+1
...@@ -325,6 +325,7 @@...@@ -325,6 +325,7 @@
325#define __NR_file_setattr 469325#define __NR_file_setattr 469
326#define __NR_listns 470326#define __NR_listns 470
327#define __NR_rseq_slice_yield 471327#define __NR_rseq_slice_yield 471
328#define __NR_fchroot 472
328329
329330
330#endif /* _ASM_UNISTD_64_H */331#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/m68k-linux-any/asm/unistd_32.h+1
...@@ -444,6 +444,7 @@...@@ -444,6 +444,7 @@
444#define __NR_file_setattr 469444#define __NR_file_setattr 469
445#define __NR_listns 470445#define __NR_listns 470
446#define __NR_rseq_slice_yield 471446#define __NR_rseq_slice_yield 471
447#define __NR_fchroot 472
447448
448449
449#endif /* _ASM_UNISTD_32_H */450#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/socket.h+2
...@@ -166,6 +166,8 @@...@@ -166,6 +166,8 @@
166#define SO_INQ 84166#define SO_INQ 84
167#define SCM_INQ SO_INQ167#define SCM_INQ SO_INQ
168168
169#define SO_RIGHTS_NOTRUNC 85
170
169171
170#if __BITS_PER_LONG == 64172#if __BITS_PER_LONG == 64
171#define SO_TIMESTAMP SO_TIMESTAMP_OLD173#define SO_TIMESTAMP SO_TIMESTAMP_OLD
lib/libc/include/mips-linux-any/asm/unistd_n32.h+1
...@@ -400,5 +400,6 @@...@@ -400,5 +400,6 @@
400#define __NR_file_setattr (__NR_Linux + 469)400#define __NR_file_setattr (__NR_Linux + 469)
401#define __NR_listns (__NR_Linux + 470)401#define __NR_listns (__NR_Linux + 470)
402#define __NR_rseq_slice_yield (__NR_Linux + 471)402#define __NR_rseq_slice_yield (__NR_Linux + 471)
403#define __NR_fchroot (__NR_Linux + 472)
403404
404#endif /* _ASM_UNISTD_N32_H */405#endif /* _ASM_UNISTD_N32_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/unistd_n64.h+1
...@@ -376,5 +376,6 @@...@@ -376,5 +376,6 @@
376#define __NR_file_setattr (__NR_Linux + 469)376#define __NR_file_setattr (__NR_Linux + 469)
377#define __NR_listns (__NR_Linux + 470)377#define __NR_listns (__NR_Linux + 470)
378#define __NR_rseq_slice_yield (__NR_Linux + 471)378#define __NR_rseq_slice_yield (__NR_Linux + 471)
379#define __NR_fchroot (__NR_Linux + 472)
379380
380#endif /* _ASM_UNISTD_N64_H */381#endif /* _ASM_UNISTD_N64_H */
\ No newline at end of file
lib/libc/include/mips-linux-any/asm/unistd_o32.h+1
...@@ -446,5 +446,6 @@...@@ -446,5 +446,6 @@
446#define __NR_file_setattr (__NR_Linux + 469)446#define __NR_file_setattr (__NR_Linux + 469)
447#define __NR_listns (__NR_Linux + 470)447#define __NR_listns (__NR_Linux + 470)
448#define __NR_rseq_slice_yield (__NR_Linux + 471)448#define __NR_rseq_slice_yield (__NR_Linux + 471)
449#define __NR_fchroot (__NR_Linux + 472)
449450
450#endif /* _ASM_UNISTD_O32_H */451#endif /* _ASM_UNISTD_O32_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/cputable.h+2
...@@ -52,6 +52,8 @@...@@ -52,6 +52,8 @@
52#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM w/out suspended state */52#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM w/out suspended state */
53#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1 */53#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1 */
54#define PPC_FEATURE2_MMA 0x00020000 /* Matrix Multiply Assist */54#define PPC_FEATURE2_MMA 0x00020000 /* Matrix Multiply Assist */
55#define PPC_FEATURE2_ARCH_3_2 0x00010000 /* ISA 3.2 */
56#define PPC_FEATURE2_DMF 0x00008000 /* Dense Math Facility */
5557
56/*58/*
57 * IMPORTANT!59 * IMPORTANT!
lib/libc/include/powerpc-linux-any/asm/kvm.h+18
...@@ -437,6 +437,24 @@ struct kvm_ppc_cpu_char {...@@ -437,6 +437,24 @@ struct kvm_ppc_cpu_char {
437 __u64 behaviour_mask; /* valid bits in behaviour */437 __u64 behaviour_mask; /* valid bits in behaviour */
438};438};
439439
440/* For KVM_PPC_GET_COMPAT_CAPS */
441struct kvm_ppc_compat_caps {
442 __u64 size; /* Size of this structure */
443 __u64 flags; /* Reserved for future use */
444 __u64 compat_capabilities; /* Capabilities supported by the host */
445};
446#define KVM_PPC_COMPAT_CAPS_SIZE_VER0 24 /* sizeof first published struct */
447
448/*
449 * Capability bits for compat_capabilities field in kvm_ppc_compat_caps.
450 * These bits indicate which processor compatibility modes are supported.
451 */
452#define KVM_PPC_COMPAT_CAP_POWER9 (1ULL << 62)
453#define KVM_PPC_COMPAT_CAP_POWER10 (1ULL << 61)
454#define KVM_PPC_COMPAT_CAP_POWER11 (1ULL << 60)
455#define KVM_PPC_COMPAT_BITMASK (KVM_PPC_COMPAT_CAP_POWER9 | \
456 KVM_PPC_COMPAT_CAP_POWER10 | \
457 KVM_PPC_COMPAT_CAP_POWER11)
440/*458/*
441 * Values for character and character_mask.459 * Values for character and character_mask.
442 * These are identical to the values used by H_GET_CPU_CHARACTERISTICS.460 * These are identical to the values used by H_GET_CPU_CHARACTERISTICS.
lib/libc/include/powerpc-linux-any/asm/unistd_32.h+1
...@@ -453,6 +453,7 @@...@@ -453,6 +453,7 @@
453#define __NR_file_setattr 469453#define __NR_file_setattr 469
454#define __NR_listns 470454#define __NR_listns 470
455#define __NR_rseq_slice_yield 471455#define __NR_rseq_slice_yield 471
456#define __NR_fchroot 472
456457
457458
458#endif /* _ASM_UNISTD_32_H */459#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/powerpc-linux-any/asm/unistd_64.h+1
...@@ -425,6 +425,7 @@...@@ -425,6 +425,7 @@
425#define __NR_file_setattr 469425#define __NR_file_setattr 469
426#define __NR_listns 470426#define __NR_listns 470
427#define __NR_rseq_slice_yield 471427#define __NR_rseq_slice_yield 471
428#define __NR_fchroot 472
428429
429430
430#endif /* _ASM_UNISTD_64_H */431#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/hwprobe.h+79-73
...@@ -7,6 +7,7 @@...@@ -7,6 +7,7 @@
7#define _ASM_HWPROBE_H7#define _ASM_HWPROBE_H
88
9#include <linux/types.h>9#include <linux/types.h>
10#include <linux/const.h>
1011
11/*12/*
12 * Interface for probing hardware capabilities from userspace, see13 * Interface for probing hardware capabilities from userspace, see
...@@ -21,80 +22,80 @@ struct riscv_hwprobe {...@@ -21,80 +22,80 @@ struct riscv_hwprobe {
21#define RISCV_HWPROBE_KEY_MARCHID 122#define RISCV_HWPROBE_KEY_MARCHID 1
22#define RISCV_HWPROBE_KEY_MIMPID 223#define RISCV_HWPROBE_KEY_MIMPID 2
23#define RISCV_HWPROBE_KEY_BASE_BEHAVIOR 324#define RISCV_HWPROBE_KEY_BASE_BEHAVIOR 3
24#define RISCV_HWPROBE_BASE_BEHAVIOR_IMA (1 << 0)25#define RISCV_HWPROBE_BASE_BEHAVIOR_IMA _BITULL(0)
25#define RISCV_HWPROBE_KEY_IMA_EXT_0 426#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
26#define RISCV_HWPROBE_IMA_FD (1 << 0)27#define RISCV_HWPROBE_IMA_FD _BITULL(0)
27#define RISCV_HWPROBE_IMA_C (1 << 1)28#define RISCV_HWPROBE_IMA_C _BITULL(1)
28#define RISCV_HWPROBE_IMA_V (1 << 2)29#define RISCV_HWPROBE_IMA_V _BITULL(2)
29#define RISCV_HWPROBE_EXT_ZBA (1 << 3)30#define RISCV_HWPROBE_EXT_ZBA _BITULL(3)
30#define RISCV_HWPROBE_EXT_ZBB (1 << 4)31#define RISCV_HWPROBE_EXT_ZBB _BITULL(4)
31#define RISCV_HWPROBE_EXT_ZBS (1 << 5)32#define RISCV_HWPROBE_EXT_ZBS _BITULL(5)
32#define RISCV_HWPROBE_EXT_ZICBOZ (1 << 6)33#define RISCV_HWPROBE_EXT_ZICBOZ _BITULL(6)
33#define RISCV_HWPROBE_EXT_ZBC (1 << 7)34#define RISCV_HWPROBE_EXT_ZBC _BITULL(7)
34#define RISCV_HWPROBE_EXT_ZBKB (1 << 8)35#define RISCV_HWPROBE_EXT_ZBKB _BITULL(8)
35#define RISCV_HWPROBE_EXT_ZBKC (1 << 9)36#define RISCV_HWPROBE_EXT_ZBKC _BITULL(9)
36#define RISCV_HWPROBE_EXT_ZBKX (1 << 10)37#define RISCV_HWPROBE_EXT_ZBKX _BITULL(10)
37#define RISCV_HWPROBE_EXT_ZKND (1 << 11)38#define RISCV_HWPROBE_EXT_ZKND _BITULL(11)
38#define RISCV_HWPROBE_EXT_ZKNE (1 << 12)39#define RISCV_HWPROBE_EXT_ZKNE _BITULL(12)
39#define RISCV_HWPROBE_EXT_ZKNH (1 << 13)40#define RISCV_HWPROBE_EXT_ZKNH _BITULL(13)
40#define RISCV_HWPROBE_EXT_ZKSED (1 << 14)41#define RISCV_HWPROBE_EXT_ZKSED _BITULL(14)
41#define RISCV_HWPROBE_EXT_ZKSH (1 << 15)42#define RISCV_HWPROBE_EXT_ZKSH _BITULL(15)
42#define RISCV_HWPROBE_EXT_ZKT (1 << 16)43#define RISCV_HWPROBE_EXT_ZKT _BITULL(16)
43#define RISCV_HWPROBE_EXT_ZVBB (1 << 17)44#define RISCV_HWPROBE_EXT_ZVBB _BITULL(17)
44#define RISCV_HWPROBE_EXT_ZVBC (1 << 18)45#define RISCV_HWPROBE_EXT_ZVBC _BITULL(18)
45#define RISCV_HWPROBE_EXT_ZVKB (1 << 19)46#define RISCV_HWPROBE_EXT_ZVKB _BITULL(19)
46#define RISCV_HWPROBE_EXT_ZVKG (1 << 20)47#define RISCV_HWPROBE_EXT_ZVKG _BITULL(20)
47#define RISCV_HWPROBE_EXT_ZVKNED (1 << 21)48#define RISCV_HWPROBE_EXT_ZVKNED _BITULL(21)
48#define RISCV_HWPROBE_EXT_ZVKNHA (1 << 22)49#define RISCV_HWPROBE_EXT_ZVKNHA _BITULL(22)
49#define RISCV_HWPROBE_EXT_ZVKNHB (1 << 23)50#define RISCV_HWPROBE_EXT_ZVKNHB _BITULL(23)
50#define RISCV_HWPROBE_EXT_ZVKSED (1 << 24)51#define RISCV_HWPROBE_EXT_ZVKSED _BITULL(24)
51#define RISCV_HWPROBE_EXT_ZVKSH (1 << 25)52#define RISCV_HWPROBE_EXT_ZVKSH _BITULL(25)
52#define RISCV_HWPROBE_EXT_ZVKT (1 << 26)53#define RISCV_HWPROBE_EXT_ZVKT _BITULL(26)
53#define RISCV_HWPROBE_EXT_ZFH (1 << 27)54#define RISCV_HWPROBE_EXT_ZFH _BITULL(27)
54#define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28)55#define RISCV_HWPROBE_EXT_ZFHMIN _BITULL(28)
55#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29)56#define RISCV_HWPROBE_EXT_ZIHINTNTL _BITULL(29)
56#define RISCV_HWPROBE_EXT_ZVFH (1 << 30)57#define RISCV_HWPROBE_EXT_ZVFH _BITULL(30)
57#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31)58#define RISCV_HWPROBE_EXT_ZVFHMIN _BITULL(31)
58#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32)59#define RISCV_HWPROBE_EXT_ZFA _BITULL(32)
59#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)60#define RISCV_HWPROBE_EXT_ZTSO _BITULL(33)
60#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)61#define RISCV_HWPROBE_EXT_ZACAS _BITULL(34)
61#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35)62#define RISCV_HWPROBE_EXT_ZICOND _BITULL(35)
62#define RISCV_HWPROBE_EXT_ZIHINTPAUSE (1ULL << 36)63#define RISCV_HWPROBE_EXT_ZIHINTPAUSE _BITULL(36)
63#define RISCV_HWPROBE_EXT_ZVE32X (1ULL << 37)64#define RISCV_HWPROBE_EXT_ZVE32X _BITULL(37)
64#define RISCV_HWPROBE_EXT_ZVE32F (1ULL << 38)65#define RISCV_HWPROBE_EXT_ZVE32F _BITULL(38)
65#define RISCV_HWPROBE_EXT_ZVE64X (1ULL << 39)66#define RISCV_HWPROBE_EXT_ZVE64X _BITULL(39)
66#define RISCV_HWPROBE_EXT_ZVE64F (1ULL << 40)67#define RISCV_HWPROBE_EXT_ZVE64F _BITULL(40)
67#define RISCV_HWPROBE_EXT_ZVE64D (1ULL << 41)68#define RISCV_HWPROBE_EXT_ZVE64D _BITULL(41)
68#define RISCV_HWPROBE_EXT_ZIMOP (1ULL << 42)69#define RISCV_HWPROBE_EXT_ZIMOP _BITULL(42)
69#define RISCV_HWPROBE_EXT_ZCA (1ULL << 43)70#define RISCV_HWPROBE_EXT_ZCA _BITULL(43)
70#define RISCV_HWPROBE_EXT_ZCB (1ULL << 44)71#define RISCV_HWPROBE_EXT_ZCB _BITULL(44)
71#define RISCV_HWPROBE_EXT_ZCD (1ULL << 45)72#define RISCV_HWPROBE_EXT_ZCD _BITULL(45)
72#define RISCV_HWPROBE_EXT_ZCF (1ULL << 46)73#define RISCV_HWPROBE_EXT_ZCF _BITULL(46)
73#define RISCV_HWPROBE_EXT_ZCMOP (1ULL << 47)74#define RISCV_HWPROBE_EXT_ZCMOP _BITULL(47)
74#define RISCV_HWPROBE_EXT_ZAWRS (1ULL << 48)75#define RISCV_HWPROBE_EXT_ZAWRS _BITULL(48)
75#define RISCV_HWPROBE_EXT_SUPM (1ULL << 49)76#define RISCV_HWPROBE_EXT_SUPM _BITULL(49)
76#define RISCV_HWPROBE_EXT_ZICNTR (1ULL << 50)77#define RISCV_HWPROBE_EXT_ZICNTR _BITULL(50)
77#define RISCV_HWPROBE_EXT_ZIHPM (1ULL << 51)78#define RISCV_HWPROBE_EXT_ZIHPM _BITULL(51)
78#define RISCV_HWPROBE_EXT_ZFBFMIN (1ULL << 52)79#define RISCV_HWPROBE_EXT_ZFBFMIN _BITULL(52)
79#define RISCV_HWPROBE_EXT_ZVFBFMIN (1ULL << 53)80#define RISCV_HWPROBE_EXT_ZVFBFMIN _BITULL(53)
80#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 54)81#define RISCV_HWPROBE_EXT_ZVFBFWMA _BITULL(54)
81#define RISCV_HWPROBE_EXT_ZICBOM (1ULL << 55)82#define RISCV_HWPROBE_EXT_ZICBOM _BITULL(55)
82#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)83#define RISCV_HWPROBE_EXT_ZAAMO _BITULL(56)
83#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)84#define RISCV_HWPROBE_EXT_ZALRSC _BITULL(57)
84#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)85#define RISCV_HWPROBE_EXT_ZABHA _BITULL(58)
85#define RISCV_HWPROBE_EXT_ZALASR (1ULL << 59)86#define RISCV_HWPROBE_EXT_ZALASR _BITULL(59)
86#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)87#define RISCV_HWPROBE_EXT_ZICBOP _BITULL(60)
87#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)88#define RISCV_HWPROBE_EXT_ZILSD _BITULL(61)
88#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)89#define RISCV_HWPROBE_EXT_ZCLSD _BITULL(62)
89#define RISCV_HWPROBE_EXT_ZICFILP (1ULL << 63)90#define RISCV_HWPROBE_EXT_ZICFILP _BITULL(63)
9091
91#define RISCV_HWPROBE_KEY_CPUPERF_0 592#define RISCV_HWPROBE_KEY_CPUPERF_0 5
92#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)93#define RISCV_HWPROBE_MISALIGNED_UNKNOWN 0
93#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)94#define RISCV_HWPROBE_MISALIGNED_EMULATED 1
94#define RISCV_HWPROBE_MISALIGNED_SLOW (2 << 0)95#define RISCV_HWPROBE_MISALIGNED_SLOW 2
95#define RISCV_HWPROBE_MISALIGNED_FAST (3 << 0)96#define RISCV_HWPROBE_MISALIGNED_FAST 3
96#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0)97#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED 4
97#define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0)98#define RISCV_HWPROBE_MISALIGNED_MASK 7
98#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 699#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 6
99#define RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS 7100#define RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS 7
100#define RISCV_HWPROBE_KEY_TIME_CSR_FREQ 8101#define RISCV_HWPROBE_KEY_TIME_CSR_FREQ 8
...@@ -115,11 +116,16 @@ struct riscv_hwprobe {...@@ -115,11 +116,16 @@ struct riscv_hwprobe {
115#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14116#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14
116#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15117#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15
117#define RISCV_HWPROBE_KEY_IMA_EXT_1 16118#define RISCV_HWPROBE_KEY_IMA_EXT_1 16
118#define RISCV_HWPROBE_EXT_ZICFISS (1ULL << 0)119#define RISCV_HWPROBE_EXT_ZICFISS _BITULL(0)
120#define RISCV_HWPROBE_EXT_ZICCLSM _BITULL(1)
121#define RISCV_HWPROBE_EXT_ZICCAMOA _BITULL(2)
122#define RISCV_HWPROBE_EXT_ZICCIF _BITULL(3)
123#define RISCV_HWPROBE_EXT_ZICCRSE _BITULL(4)
124#define RISCV_HWPROBE_EXT_ZA64RS _BITULL(5)
119125
120/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */126/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
121127
122/* Flags */128/* Flags */
123#define RISCV_HWPROBE_WHICH_CPUS (1 << 0)129#define RISCV_HWPROBE_WHICH_CPUS _BITUL(0)
124130
125#endif131#endif
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/kvm.h+13
...@@ -102,6 +102,11 @@ struct kvm_riscv_smstateen_csr {...@@ -102,6 +102,11 @@ struct kvm_riscv_smstateen_csr {
102 unsigned long sstateen0;102 unsigned long sstateen0;
103};103};
104104
105/* Zicfiss CSR for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
106struct kvm_riscv_zicfiss_csr {
107 unsigned long ssp;
108};
109
105/* TIMER registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */110/* TIMER registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
106struct kvm_riscv_timer {111struct kvm_riscv_timer {
107 __u64 frequency;112 __u64 frequency;
...@@ -199,6 +204,8 @@ enum KVM_RISCV_ISA_EXT_ID {...@@ -199,6 +204,8 @@ enum KVM_RISCV_ISA_EXT_ID {
199 KVM_RISCV_ISA_EXT_ZCLSD,204 KVM_RISCV_ISA_EXT_ZCLSD,
200 KVM_RISCV_ISA_EXT_ZILSD,205 KVM_RISCV_ISA_EXT_ZILSD,
201 KVM_RISCV_ISA_EXT_ZALASR,206 KVM_RISCV_ISA_EXT_ZALASR,
207 KVM_RISCV_ISA_EXT_ZICFILP,
208 KVM_RISCV_ISA_EXT_ZICFISS,
202 KVM_RISCV_ISA_EXT_MAX,209 KVM_RISCV_ISA_EXT_MAX,
203};210};
204211
...@@ -240,6 +247,9 @@ struct kvm_riscv_sbi_fwft_feature {...@@ -240,6 +247,9 @@ struct kvm_riscv_sbi_fwft_feature {
240struct kvm_riscv_sbi_fwft {247struct kvm_riscv_sbi_fwft {
241 struct kvm_riscv_sbi_fwft_feature misaligned_deleg;248 struct kvm_riscv_sbi_fwft_feature misaligned_deleg;
242 struct kvm_riscv_sbi_fwft_feature pointer_masking;249 struct kvm_riscv_sbi_fwft_feature pointer_masking;
250 struct kvm_riscv_sbi_fwft_feature pte_ad_hw_updating;
251 struct kvm_riscv_sbi_fwft_feature landing_pad;
252 struct kvm_riscv_sbi_fwft_feature shadow_stack;
243};253};
244254
245/* If you need to interpret the index values, here is the key: */255/* If you need to interpret the index values, here is the key: */
...@@ -263,12 +273,15 @@ struct kvm_riscv_sbi_fwft {...@@ -263,12 +273,15 @@ struct kvm_riscv_sbi_fwft {
263#define KVM_REG_RISCV_CSR_GENERAL (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)273#define KVM_REG_RISCV_CSR_GENERAL (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)
264#define KVM_REG_RISCV_CSR_AIA (0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT)274#define KVM_REG_RISCV_CSR_AIA (0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT)
265#define KVM_REG_RISCV_CSR_SMSTATEEN (0x2 << KVM_REG_RISCV_SUBTYPE_SHIFT)275#define KVM_REG_RISCV_CSR_SMSTATEEN (0x2 << KVM_REG_RISCV_SUBTYPE_SHIFT)
276#define KVM_REG_RISCV_CSR_ZICFISS (0x3 << KVM_REG_RISCV_SUBTYPE_SHIFT)
266#define KVM_REG_RISCV_CSR_REG(name) \277#define KVM_REG_RISCV_CSR_REG(name) \
267 (offsetof(struct kvm_riscv_csr, name) / sizeof(unsigned long))278 (offsetof(struct kvm_riscv_csr, name) / sizeof(unsigned long))
268#define KVM_REG_RISCV_CSR_AIA_REG(name) \279#define KVM_REG_RISCV_CSR_AIA_REG(name) \
269 (offsetof(struct kvm_riscv_aia_csr, name) / sizeof(unsigned long))280 (offsetof(struct kvm_riscv_aia_csr, name) / sizeof(unsigned long))
270#define KVM_REG_RISCV_CSR_SMSTATEEN_REG(name) \281#define KVM_REG_RISCV_CSR_SMSTATEEN_REG(name) \
271 (offsetof(struct kvm_riscv_smstateen_csr, name) / sizeof(unsigned long))282 (offsetof(struct kvm_riscv_smstateen_csr, name) / sizeof(unsigned long))
283#define KVM_REG_RISCV_CSR_ZICFISS_REG(name) \
284 (offsetof(struct kvm_riscv_zicfiss_csr, name) / sizeof(unsigned long))
272285
273/* Timer registers are mapped as type 4 */286/* Timer registers are mapped as type 4 */
274#define KVM_REG_RISCV_TIMER (0x04 << KVM_REG_RISCV_TYPE_SHIFT)287#define KVM_REG_RISCV_TIMER (0x04 << KVM_REG_RISCV_TYPE_SHIFT)
lib/libc/include/riscv-linux-any/asm/unistd_32.h+1
...@@ -319,6 +319,7 @@...@@ -319,6 +319,7 @@
319#define __NR_file_setattr 469319#define __NR_file_setattr 469
320#define __NR_listns 470320#define __NR_listns 470
321#define __NR_rseq_slice_yield 471321#define __NR_rseq_slice_yield 471
322#define __NR_fchroot 472
322323
323324
324#endif /* _ASM_UNISTD_32_H */325#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/unistd_64.h+1
...@@ -329,6 +329,7 @@...@@ -329,6 +329,7 @@
329#define __NR_file_setattr 469329#define __NR_file_setattr 469
330#define __NR_listns 470330#define __NR_listns 470
331#define __NR_rseq_slice_yield 471331#define __NR_rseq_slice_yield 471
332#define __NR_fchroot 472
332333
333334
334#endif /* _ASM_UNISTD_64_H */335#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/riscv-linux-any/asm/vendor/mips.h+3-1
...@@ -1,3 +1,5 @@...@@ -1,3 +1,5 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22
3#define RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL BIT(0)
\ No newline at end of file
3#include <linux/const.h>
4
5#define RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL _BITULL(0)
\ No newline at end of file
lib/libc/include/s390x-linux-any/asm/unistd_64.h+1
...@@ -391,6 +391,7 @@...@@ -391,6 +391,7 @@
391#define __NR_file_setattr 469391#define __NR_file_setattr 469
392#define __NR_listns 470392#define __NR_listns 470
393#define __NR_rseq_slice_yield 471393#define __NR_rseq_slice_yield 471
394#define __NR_fchroot 472
394395
395396
396#endif /* _ASM_UNISTD_64_H */397#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/socket.h+2
...@@ -148,6 +148,8 @@...@@ -148,6 +148,8 @@
148#define SO_INQ 0x005d148#define SO_INQ 0x005d
149#define SCM_INQ SO_INQ149#define SCM_INQ SO_INQ
150150
151#define SO_RIGHTS_NOTRUNC 0x005e
152
151153
152154
153#if __BITS_PER_LONG == 64155#if __BITS_PER_LONG == 64
lib/libc/include/sparc-linux-any/asm/unistd_32.h+1
...@@ -442,6 +442,7 @@...@@ -442,6 +442,7 @@
442#define __NR_file_setattr 469442#define __NR_file_setattr 469
443#define __NR_listns 470443#define __NR_listns 470
444#define __NR_rseq_slice_yield 471444#define __NR_rseq_slice_yield 471
445#define __NR_fchroot 472
445446
446447
447#endif /* _ASM_UNISTD_32_H */448#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/unistd_64.h+1
...@@ -405,6 +405,7 @@...@@ -405,6 +405,7 @@
405#define __NR_file_setattr 469405#define __NR_file_setattr 469
406#define __NR_listns 470406#define __NR_listns 470
407#define __NR_rseq_slice_yield 471407#define __NR_rseq_slice_yield 471
408#define __NR_fchroot 472
408409
409410
410#endif /* _ASM_UNISTD_64_H */411#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/amd_hsmp.h+206-16
...@@ -53,9 +53,21 @@ enum hsmp_message_ids {...@@ -53,9 +53,21 @@ enum hsmp_message_ids {
53 HSMP_SET_XGMI_PSTATE_RANGE, /* 26h Set xGMI P-state range */53 HSMP_SET_XGMI_PSTATE_RANGE, /* 26h Set xGMI P-state range */
54 HSMP_CPU_RAIL_ISO_FREQ_POLICY, /* 27h Get/Set Cpu Iso frequency policy */54 HSMP_CPU_RAIL_ISO_FREQ_POLICY, /* 27h Get/Set Cpu Iso frequency policy */
55 HSMP_DFC_ENABLE_CTRL, /* 28h Enable/Disable DF C-state */55 HSMP_DFC_ENABLE_CTRL, /* 28h Enable/Disable DF C-state */
56 HSMP_PC6_ENABLE, /* 29h Get/Set PC6 enable/disable status */
57 HSMP_CC6_ENABLE, /* 2Ah Get/Set CC6 enable/disable status */
56 HSMP_GET_RAPL_UNITS = 0x30, /* 30h Get scaling factor for energy */58 HSMP_GET_RAPL_UNITS = 0x30, /* 30h Get scaling factor for energy */
57 HSMP_GET_RAPL_CORE_COUNTER, /* 31h Get core energy counter value */59 HSMP_GET_RAPL_CORE_COUNTER, /* 31h Get core energy counter value */
58 HSMP_GET_RAPL_PACKAGE_COUNTER, /* 32h Get package energy counter value */60 HSMP_GET_RAPL_PACKAGE_COUNTER, /* 32h Get package energy counter value */
61 HSMP_DIMM_SB_RD, /* 33h Get DIMM sideband data */
62 HSMP_READ_CCD_POWER, /* 34h Get average CCD power */
63 HSMP_READ_TDELTA, /* 35h Get thermal behaviour */
64 HSMP_GET_SVI3_VR_CTRL_TEMP, /* 36h Get SVI3 VR controller rail temp */
65 HSMP_GET_ENABLED_HSMP_CMDS, /* 37h Get supported HSMP commands */
66 HSMP_SET_GET_FLOOR_LIMIT, /* 38h Get/Set core floor frequency limit */
67 HSMP_DIMM_SB_WR, /* 39h Set DIMM sideband data */
68 HSMP_SDPS_LIMIT, /* 3Ah Get/Set SDPS limit */
69 HSMP_PQOS_TRAFFIC_PRIORITY, /* 3Bh Get/Set traffic priority */
70 HSMP_PQOS_FLOATING_BW, /* 3Ch Get/Set max floating bandwidth */
59 HSMP_MSG_ID_MAX,71 HSMP_MSG_ID_MAX,
60};72};
6173
...@@ -170,16 +182,27 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]...@@ -170,16 +182,27 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
170 {0, 1, HSMP_GET},182 {0, 1, HSMP_GET},
171183
172 /*184 /*
173 * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0185 * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0/1
174 * input: args[0] = min link width[15:8] + max link width[7:0]186 * input: args[0] = set/get XGMI Link width[31] (0 = set, 1 = get) +
187 * min link width[15:8] + max link width[7:0]
188 * Link width encoding: 0 = x4, 1 = x8, 2 = x16.
189 * On SET, max must be >= min. On GET, [15:0] are reserved.
190 * output: args[0] = reserved[31:16] + min link width[15:8] +
191 * max link width[7:0]
175 */192 */
176 {1, 0, HSMP_SET},193 {1, 1, HSMP_SET_GET},
177194
178 /*195 /*
179 * HSMP_SET_DF_PSTATE, num_args = 1, response_sz = 0196 * HSMP_SET_DF_PSTATE (APBDisable), num_args = 1, response_sz = 0/1
180 * input: args[0] = df pstate[7:0]197 * input: args[0] = set APB_DISABLE / get APB state[31]
198 * (0 = set & lock DF P-state, 1 = get) +
199 * reserved[30:8] +
200 * DF P-state[7:0] (0..2; reserved on GET)
201 * output: args[0] = reserved[31:9] +
202 * APB state[8] (1 = disabled, 0 = enabled) +
203 * locked DF P-state[7:0] if [8] = 1, else reserved
181 */204 */
182 {1, 0, HSMP_SET},205 {1, 1, HSMP_SET_GET},
183206
184 /* HSMP_SET_AUTO_DF_PSTATE, num_args = 0, response_sz = 0 */207 /* HSMP_SET_AUTO_DF_PSTATE, num_args = 0, response_sz = 0 */
185 {0, 0, HSMP_SET},208 {0, 0, HSMP_SET},
...@@ -305,16 +328,32 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]...@@ -305,16 +328,32 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
305 {1, 1, HSMP_SET},328 {1, 1, HSMP_SET},
306329
307 /*330 /*
308 * HSMP_SET_POWER_MODE, num_args = 1, response_sz = 0331 * HSMP_SET_POWER_MODE (PwrEfficiencyModeSelection),
309 * input: args[0] = power efficiency mode[2:0]332 * num_args = 1, response_sz = 1
333 * input: args[0] = set/get policy[31] (0 = set, 1 = get) +
334 * high util point[30:24] +
335 * low util point[23:17] +
336 * PPT limit[16:5] +
337 * reserved[4:3] + mode selection[2:0]
338 * [30:5] are valid only when [2:0] is a balanced core mode
339 * (4 or 5). [2:0] is reserved when getting (bit[31] = 1).
340 * output: args[0] same layout, [31] reserved, [2:0] = arbitrated
341 * current efficiency mode.
310 */342 */
311 {1, 1, HSMP_SET_GET},343 {1, 1, HSMP_SET_GET},
312344
313 /*345 /*
314 * HSMP_SET_PSTATE_MAX_MIN, num_args = 1, response_sz = 0346 * HSMP_SET_PSTATE_MAX_MIN (DfPstateRange), num_args = 1, response_sz = 0/1
315 * input: args[0] = min df pstate[15:8] + max df pstate[7:0]347 * input: args[0] = set/get DF P-state range[31] (0 = set, 1 = get) +
348 * reserved[30:16] +
349 * min DF P-state[15:8] + max DF P-state[7:0]
350 * DF P-state encoding: 0 = DFP0 (high performance),
351 * 1 = DFP1, 2 = DFP2 (low performance).
352 * [15:0] are reserved when getting (args[0] bit[31] = 1).
353 * output: args[0] = reserved[31:16] + min DF P-state[15:8] +
354 * max DF P-state[7:0]
316 */355 */
317 {1, 0, HSMP_SET},356 {1, 1, HSMP_SET_GET},
318357
319 /*358 /*
320 * HSMP_GET_METRIC_TABLE_VER, num_args = 0, response_sz = 1359 * HSMP_GET_METRIC_TABLE_VER, num_args = 0, response_sz = 1
...@@ -328,11 +367,12 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]...@@ -328,11 +367,12 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
328 {0, 0, HSMP_GET},367 {0, 0, HSMP_GET},
329368
330 /*369 /*
331 * HSMP_GET_METRIC_TABLE_DRAM_ADDR, num_args = 0, response_sz = 2370 * HSMP_GET_METRIC_TABLE_DRAM_ADDR, num_args = 0, response_sz = 3
332 * output: args[0] = lower 32 bits of the address371 * output: args[0] = lower 32 bits of the address
333 * output: args[1] = upper 32 bits of the address372 * output: args[1] = upper 32 bits of the address
373 * output: args[2] = DRAM region size in bytes
334 */374 */
335 {0, 2, HSMP_GET},375 {0, 3, HSMP_GET},
336376
337 /*377 /*
338 * HSMP_SET_XGMI_PSTATE_RANGE, num_args = 1, response_sz = 0378 * HSMP_SET_XGMI_PSTATE_RANGE, num_args = 1, response_sz = 0
...@@ -355,9 +395,31 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]...@@ -355,9 +395,31 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
355 */395 */
356 {1, 1, HSMP_SET_GET},396 {1, 1, HSMP_SET_GET},
357397
358 /* RESERVED(0x29-0x2f) */398 /*
359 {0, 0, HSMP_RSVD},399 * HSMP_PC6_ENABLE (Pc6Enable), num_args = 1, response_sz = 0/1
360 {0, 0, HSMP_RSVD},400 * input: args[0] = set/get PC6 control[31] (0 = set, 1 = get) +
401 * reserved[30:1] +
402 * enable PC6[0] (0 = disable, 1 = enable;
403 * reserved on GET)
404 * output: args[0] = reserved[31:1] + current PC6 control[0]
405 * (last value configured via HSMP or APML)
406 */
407 {1, 1, HSMP_SET_GET},
408
409 /*
410 * HSMP_CC6_ENABLE (CC6Enable), num_args = 1, response_sz = 0/1
411 * Configures CC6 enable for all cores; changing the setting does
412 * not by itself transition cores in or out of CC6.
413 * input: args[0] = set/get CC6 control[31] (0 = set, 1 = get) +
414 * reserved[30:1] +
415 * enable CC6[0] (0 = disable, 1 = enable;
416 * reserved on GET)
417 * output: args[0] = reserved[31:1] + current CC6 control[0]
418 * (last value configured via HSMP or APML)
419 */
420 {1, 1, HSMP_SET_GET},
421
422 /* RESERVED(0x2B-0x2F) */
361 {0, 0, HSMP_RSVD},423 {0, 0, HSMP_RSVD},
362 {0, 0, HSMP_RSVD},424 {0, 0, HSMP_RSVD},
363 {0, 0, HSMP_RSVD},425 {0, 0, HSMP_RSVD},
...@@ -385,6 +447,89 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]...@@ -385,6 +447,89 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
385 */447 */
386 {0, 2, HSMP_GET},448 {0, 2, HSMP_GET},
387449
450 /*
451 * HSMP_DIMM_SB_RD, num_args = 1, response_sz = 1
452 * input: args[0] = reg space[23] + reg offset[22:12] +
453 * device LID[11:8] + DIMM address[7:0]
454 * output: args[0] = read data byte[3:0]
455 */
456 {1, 1, HSMP_GET},
457
458 /*
459 * HSMP_READ_CCD_POWER, num_args = 1, response_sz = 1
460 * input: args[0] = apic id of core[15:0]
461 * output: args[0] = CCD power(mWatts)[31:0]
462 */
463 {1, 1, HSMP_GET},
464
465 /*
466 * HSMP_READ_TDELTA, num_args = 0, response_sz = 1
467 * output: args[0] = thermal behaviour[31:0]
468 */
469 {0, 1, HSMP_GET},
470
471 /*
472 * HSMP_GET_SVI3_VR_CTRL_TEMP, num_args = 1, response_sz = 1
473 * input: args[0] = SVI3 rail index[3:1] + read temperature[0]
474 * output: args[0] = SVI3 rail index[30:28] +
475 * rail temperature in degree C[27:0]
476 */
477 {1, 1, HSMP_GET},
478
479 /*
480 * HSMP_GET_ENABLED_HSMP_CMDS, num_args = 1, response_sz = 3
481 * input: args[0] = HSMP command mask[0]
482 * output: status of HSMP command = args[0], args[1], args[2]
483 */
484 {1, 3, HSMP_GET},
485
486 /*
487 * HSMP_SET_GET_FLOOR_LIMIT, num_args = 1, response_sz = 1
488 * input: args[0] = op[31:30] + reserved[29:28] +
489 * apic id[27:16] + floor frequency MHz[15:0]
490 * op encoding: 00 = set per-core floor,
491 * 01 = set all-cores floor (apic id reserved),
492 * 10 = get per-core floor,
493 * 11 = get per-core effective floor.
494 * Floor frequency field is reserved on GET (bit[31] = 1).
495 * output: args[0] = floor frequency MHz[15:0]
496 * (effective for op 11, configured for op 10;
497 * reserved on SET)
498 */
499 {1, 1, HSMP_SET_GET},
500
501 /*
502 * HSMP_DIMM_SB_WR, num_args = 1, response_sz = 0
503 * input: args[0] = write data[31:24] + reg space[23] +
504 * reg offset[22:12] + device LID[11:8] +
505 * DIMM address[7:0]
506 */
507 {1, 0, HSMP_SET},
508
509 /*
510 * HSMP_SDPS_LIMIT, num_args = 1, response_sz = 1
511 * input: args[0] = set/get SDPS limit[31] (0 = set, 1 = get) +
512 * SDPS limit[30:0]
513 * output: args[0] = SDPS limit[30:0]
514 */
515 {1, 1, HSMP_SET_GET},
516
517 /*
518 * HSMP_PQOS_TRAFFIC_PRIORITY, num_args = 1, response_sz = 1
519 * input: args[0] = op[31:30] + priority sel[27:26] +
520 * priority val[21:20] + input[19:0]
521 * output: args[0] = supported priorities or priority val[1:0]
522 */
523 {1, 1, HSMP_SET_GET},
524
525 /*
526 * HSMP_PQOS_FLOATING_BW, num_args = 1, response_sz = 2
527 * input: args[0] = op[31] + sub-op[30:29] + params[28:0]
528 * output: args[0] = discovery bits or floating/global memory BW (Gbps)
529 * output: args[1] = reserved or config (drop adj, sampling delay,
530 * hysteresis)
531 */
532 {1, 2, HSMP_SET_GET},
388};533};
389534
390/* Metrics table (supported only with proto version 6) */535/* Metrics table (supported only with proto version 6) */
...@@ -467,6 +612,39 @@ struct hsmp_metric_table {...@@ -467,6 +612,39 @@ struct hsmp_metric_table {
467 __u32 gfxclk_frequency[8];612 __u32 gfxclk_frequency[8];
468};613};
469614
615/**
616 * struct hsmp_telemetry_data - Request descriptor for HSMP telemetry IOCTL
617 * @buf: Input. Userspace pointer (encoded as __u64 to keep the layout
618 * stable between 32-bit and 64-bit callers) to the destination
619 * buffer that receives the metric table.
620 * @size: Input. Size in bytes of the buffer pointed to by @buf, and the
621 * number of bytes copied out on success. Must be non-zero and no
622 * larger than the metric table size firmware reports for this
623 * socket; a larger value is rejected with -EINVAL rather than
624 * short-written. A smaller value returns the leading @size bytes
625 * of the snapshot. The kernel does not write this field back.
626 * @sock_ind: Input. Socket index from which the metric table is read.
627 * @reserved: Reserved for future use. Callers should set this to zero;
628 * future kernels may begin interpreting the field, so passing
629 * a non-zero value today is not forwards compatible.
630 *
631 * Placing @buf first lets all fields fall on their natural alignment under
632 * the surrounding #pragma pack(4), so the struct is a tight 16 bytes with
633 * the same wire layout on 32-bit and 64-bit userspace.
634 *
635 * The metric table layout depends on the HSMP protocol version reported by
636 * firmware, which userspace can read from the protocol_version sysfs
637 * attribute. Protocol version 6 uses struct hsmp_metric_table, so callers on
638 * that version pass sizeof(struct hsmp_metric_table). Later version metrics
639 * table layout is documented in the Public PPR.
640 */
641struct hsmp_telemetry_data {
642 __u64 buf;
643 __u32 size;
644 __u16 sock_ind;
645 __u16 reserved;
646};
647
470/* Reset to default packing */648/* Reset to default packing */
471#pragma pack()649#pragma pack()
472650
...@@ -474,4 +652,16 @@ struct hsmp_metric_table {...@@ -474,4 +652,16 @@ struct hsmp_metric_table {
474#define HSMP_BASE_IOCTL_NR 0xF8652#define HSMP_BASE_IOCTL_NR 0xF8
475#define HSMP_IOCTL_CMD _IOWR(HSMP_BASE_IOCTL_NR, 0, struct hsmp_message)653#define HSMP_IOCTL_CMD _IOWR(HSMP_BASE_IOCTL_NR, 0, struct hsmp_message)
476654
655/*
656 * Fetch the firmware metric (telemetry) table for a given socket via the
657 * HSMP character device. This avoids the PAGE_SIZE limitation of the
658 * sysfs binary attribute path for tables larger than one page (such as the
659 * ~13 KB table used by HSMP protocol version 7).
660 *
661 * The direction is _IOW because the kernel only reads the request struct;
662 * the table itself is written to the buffer that @buf points at.
663 */
664#define HSMP_IOCTL_GET_TELEMETRY_DATA \
665 _IOW(HSMP_BASE_IOCTL_NR, 1, struct hsmp_telemetry_data)
666
477#endif /*_ASM_X86_AMD_HSMP_H_*/667#endif /*_ASM_X86_AMD_HSMP_H_*/
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/ptrace-abi.h+2-2
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2#ifndef _ASM_X86_PTRACE_ABI_H2#ifndef _ASM_X86_PTRACE_ABI_H
3#define _ASM_X86_PTRACE_ABI_H3#define _ASM_X86_PTRACE_ABI_H
44
5#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
5#ifdef __i386__6#ifdef __i386__
67
7#define EBX 08#define EBX 0
...@@ -25,7 +26,6 @@...@@ -25,7 +26,6 @@
2526
26#else /* __i386__ */27#else /* __i386__ */
2728
28#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
29/*29/*
30 * C ABI says these regs are callee-preserved. They aren't saved on kernel entry30 * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
31 * unless syscall needs a complete, fully filled "struct pt_regs".31 * unless syscall needs a complete, fully filled "struct pt_regs".
...@@ -57,12 +57,12 @@...@@ -57,12 +57,12 @@
57#define EFLAGS 14457#define EFLAGS 144
58#define RSP 15258#define RSP 152
59#define SS 16059#define SS 160
60#endif /* __ASSEMBLER__ */
6160
62/* top of stack page */61/* top of stack page */
63#define FRAME_SIZE 16862#define FRAME_SIZE 168
6463
65#endif /* !__i386__ */64#endif /* !__i386__ */
65#endif /* defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS) */
6666
67/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */67/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
68#define PTRACE_GETREGS 1268#define PTRACE_GETREGS 12
lib/libc/include/x86-linux-any/asm/unistd_32.h+1
...@@ -462,6 +462,7 @@...@@ -462,6 +462,7 @@
462#define __NR_file_setattr 469462#define __NR_file_setattr 469
463#define __NR_listns 470463#define __NR_listns 470
464#define __NR_rseq_slice_yield 471464#define __NR_rseq_slice_yield 471
465#define __NR_fchroot 472
465466
466467
467#endif /* _ASM_UNISTD_32_H */468#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/unistd_64.h+1
...@@ -386,6 +386,7 @@...@@ -386,6 +386,7 @@
386#define __NR_file_setattr 469386#define __NR_file_setattr 469
387#define __NR_listns 470387#define __NR_listns 470
388#define __NR_rseq_slice_yield 471388#define __NR_rseq_slice_yield 471
389#define __NR_fchroot 472
389390
390391
391#endif /* _ASM_UNISTD_64_H */392#endif /* _ASM_UNISTD_64_H */
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/unistd_x32.h+1
...@@ -339,6 +339,7 @@...@@ -339,6 +339,7 @@
339#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)339#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)
340#define __NR_listns (__X32_SYSCALL_BIT + 470)340#define __NR_listns (__X32_SYSCALL_BIT + 470)
341#define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471)341#define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471)
342#define __NR_fchroot (__X32_SYSCALL_BIT + 472)
342#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)343#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
343#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)344#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
344#define __NR_ioctl (__X32_SYSCALL_BIT + 514)345#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
lib/libc/include/xtensa-linux-any/asm/unistd_32.h+1
...@@ -418,6 +418,7 @@...@@ -418,6 +418,7 @@
418#define __NR_file_setattr 469418#define __NR_file_setattr 469
419#define __NR_listns 470419#define __NR_listns 470
420#define __NR_rseq_slice_yield 471420#define __NR_rseq_slice_yield 471
421#define __NR_fchroot 472
421422
422423
423#endif /* _ASM_UNISTD_32_H */424#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file