authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-20 09:53:06+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-20 09:53:06+02:00
log6d24378a301076621bd84f484bc4e128ed21da78
tree97f8062ae1d9523666314cbeeeb10359587b8f26
parente771583d88f18548b3b012df004ea9ef5201e5cf
parent3513dc36958d54ff40a74cf8209f1de974db88c6

Merge pull request 'Linux 7.3' (#37333) from alexrp/zig:linux-7.3 into master

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

143 files changed, 3179 insertions(+), 1158 deletions(-)

lib/libc/include/aarch64-linux-any/asm/kvm.h+1
......@@ -106,6 +106,7 @@ struct kvm_regs {
106106#define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */
107107#define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */
108108#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
110111struct kvm_vcpu_init {
111112 __u32 target;
lib/libc/include/aarch64-linux-any/asm/ptrace.h+6-6
......@@ -93,7 +93,7 @@ struct user_pt_regs {
9393};
9494
9595struct user_fpsimd_state {
96 __uint128_t vregs[32];
96 __u128 vregs[32];
9797 __u32 fpsr;
9898 __u32 fpcr;
9999 __u32 __reserved[2];
......@@ -258,14 +258,14 @@ struct user_pac_mask {
258258/* pointer authentication keys (NT_ARM_PACA_KEYS, NT_ARM_PACG_KEYS) */
259259
260260struct user_pac_address_keys {
261 __uint128_t apiakey;
262 __uint128_t apibkey;
263 __uint128_t apdakey;
264 __uint128_t apdbkey;
261 __u128 apiakey;
262 __u128 apibkey;
263 __u128 apdakey;
264 __u128 apdbkey;
265265};
266266
267267struct user_pac_generic_keys {
268 __uint128_t apgakey;
268 __u128 apgakey;
269269};
270270
271271/* ZA state (NT_ARM_ZA) */
lib/libc/include/aarch64-linux-any/asm/sigcontext.h+3-3
......@@ -78,7 +78,7 @@ struct fpsimd_context {
7878 struct _aarch64_ctx head;
7979 __u32 fpsr;
8080 __u32 fpcr;
81 __uint128_t vregs[32];
81 __u128 vregs[32];
8282};
8383
8484/*
......@@ -266,8 +266,8 @@ struct gcs_context {
266266 * - ---- -----------
267267 * REGS the entire SVE context
268268 *
269 * ZREGS __uint128_t[SVE_NUM_ZREGS][vq] all Z-registers
270 * ZREG __uint128_t[vq] individual Z-register Zn
269 * ZREGS __u128[SVE_NUM_ZREGS][vq] all Z-registers
270 * ZREG __u128[vq] individual Z-register Zn
271271 *
272272 * PREGS uint16_t[SVE_NUM_PREGS][vq] all P-registers
273273 * PREG uint16_t[vq] individual P-register Pn
lib/libc/include/aarch64-linux-any/asm/unistd_64.h+1
......@@ -328,6 +328,7 @@
328328#define __NR_file_setattr 469
329329#define __NR_listns 470
330330#define __NR_rseq_slice_yield 471
331#define __NR_fchroot 472
331332
332333
333334#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 @@
1111
1212#include <asm/bitsperlong.h>
1313
14#ifndef __ASSEMBLY__
14#ifndef __ASSEMBLER__
1515/*
1616 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
1717 * header files exported to user space
......@@ -29,7 +29,7 @@ typedef unsigned int __u32;
2929typedef __signed__ long __s64;
3030typedef unsigned long __u64;
3131
32#endif /* __ASSEMBLY__ */
32#endif /* __ASSEMBLER__ */
3333
3434
3535#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 @@
1111
1212#include <asm/bitsperlong.h>
1313
14#ifndef __ASSEMBLY__
14#ifndef __ASSEMBLER__
1515/*
1616 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
1717 * header files exported to user space
......@@ -34,7 +34,7 @@ typedef __signed__ long long __s64;
3434typedef unsigned long long __u64;
3535#endif
3636
37#endif /* __ASSEMBLY__ */
37#endif /* __ASSEMBLER__ */
3838
3939
4040#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 @@
7878#define SIG_SETMASK 2 /* for setting the signal mask */
7979#endif
8080
81#ifndef __ASSEMBLY__
81#ifndef __ASSEMBLER__
8282typedef void __signalfn_t(int);
8383typedef __signalfn_t *__sighandler_t;
8484
lib/libc/include/any-linux-any/asm-generic/signal.h+2-2
......@@ -57,7 +57,7 @@
5757#define SIGSTKSZ 8192
5858#endif
5959
60#ifndef __ASSEMBLY__
60#ifndef __ASSEMBLER__
6161typedef struct {
6262 unsigned long sig[_NSIG_WORDS];
6363} sigset_t;
......@@ -86,6 +86,6 @@ typedef struct sigaltstack {
8686 __kernel_size_t ss_size;
8787} stack_t;
8888
89#endif /* __ASSEMBLY__ */
89#endif /* __ASSEMBLER__ */
9090
9191#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 @@
150150#define SO_INQ 84
151151#define SCM_INQ SO_INQ
152152
153#define SO_RIGHTS_NOTRUNC 85
154
153155
154156#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
155157/* 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)
863863#define __NR_rseq_slice_yield 471
864864__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
866870#undef __NR_syscalls
867#define __NR_syscalls 472
871#define __NR_syscalls 473
868872
869873/*
870874 * 32 bit systems traditionally used different
lib/libc/include/any-linux-any/drm/amdgpu_drm.h+22-1
......@@ -58,6 +58,7 @@ extern "C" {
5858#define DRM_AMDGPU_USERQ_SIGNAL 0x17
5959#define DRM_AMDGPU_USERQ_WAIT 0x18
6060#define DRM_AMDGPU_GEM_LIST_HANDLES 0x19
61#define DRM_AMDGPU_PROC_OPTIONS 0x1A
6162
6263#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
6364#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" {
7980#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)
8081#define DRM_IOCTL_AMDGPU_USERQ_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait)
8182#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
8385/**
8486 * DOC: memory domains
......@@ -1510,6 +1512,7 @@ struct drm_amdgpu_info_device {
15101512 __u64 high_va_max;
15111513 /* gfx10 pa_sc_tile_steering_override */
15121514 __u32 pa_sc_tile_steering_override;
1515 __u32 pad;
15131516 /* disabled TCCs */
15141517 __u64 tcc_disabled_mask;
15151518 __u64 min_engine_clock;
......@@ -1534,7 +1537,6 @@ struct drm_amdgpu_info_device {
15341537 __u32 csa_alignment;
15351538 /* Userq IP mask (1 << AMDGPU_HW_IP_*) */
15361539 __u32 userq_ip_mask;
1537 __u32 pad;
15381540};
15391541
15401542struct drm_amdgpu_info_hw_ip {
......@@ -1673,6 +1675,25 @@ struct drm_amdgpu_info_uq_metadata {
16731675#define AMDGPU_FAMILY_GC_11_5_4 154 /* GC 11.5.4 */
16741676#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
16761697#if defined(__cplusplus)
16771698}
16781699#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)
16461646 * For multi-plane formats the above surfaces get merged into one plane for
16471647 * each format plane, based on the required alignment only.
16481648 *
1649 * Bits Parameter Notes
1650 * ----- ------------------------ ---------------------------------------------
1649 * Bits Parameter Notes
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
16511682 *
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
16671683 */
16681684#define AMD_FMT_MOD fourcc_mod_code(AMD, 0)
16691685
16701686#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
16731689#define AMD_FMT_MOD_TILE_VER_GFX9 1
16741690#define AMD_FMT_MOD_TILE_VER_GFX10 2
16751691#define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 3
16761692#define AMD_FMT_MOD_TILE_VER_GFX11 4
16771693#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
16791712/*
16801713 * 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical
16811714 * version.
......@@ -1774,6 +1807,146 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
17741807#define AMD_FMT_MOD_PIPE_SHIFT 33
17751808#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
17771950#define AMD_FMT_MOD_SET(field, value) \
17781951 ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)
17791952#define AMD_FMT_MOD_GET(field, value) \
lib/libc/include/any-linux-any/drm/drm_mode.h+1
......@@ -155,6 +155,7 @@ extern "C" {
155155/* Panel type property */
156156#define DRM_MODE_PANEL_TYPE_UNKNOWN 0
157157#define DRM_MODE_PANEL_TYPE_OLED 1
158#define DRM_MODE_PANEL_TYPE_LCD 2
158159
159160/*
160161 * 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 {
4343
4444 /** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */
4545 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,
4651};
4752
4853/**
......@@ -79,6 +84,7 @@ struct drm_ethosu_npu_info {
7984 __u32 config;
8085
8186 __u32 sram_size;
87 __u32 pmu_counters;
8288};
8389
8490/**
......@@ -220,10 +226,54 @@ struct drm_ethosu_submit {
220226 /** Input: Number of jobs passed in. */
221227 __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;
224245 __u32 pad;
225246};
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
227277/**
228278 * DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number
229279 * @__access: Access type. Must be R, W or RW.
......@@ -252,6 +302,14 @@ enum {
252302 DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),
253303 DRM_IOCTL_ETHOSU_SUBMIT =
254304 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),
255313};
256314
257315#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 {
228228
229229struct drm_msm_syncobj {
230230 __u32 handle; /* in, syncobj handle. */
231 __u32 flags; /* in, from MSM_SUBMIT_SYNCOBJ_FLAGS */
231 __u32 flags; /* in, from MSM_SYNCOBJ_FLAGS */
232232 __u64 point; /* in, timepoint for timeline syncobjs. */
233233};
234234
......@@ -393,9 +393,9 @@ struct drm_msm_vm_bind {
393393 __s32 fence_fd;
394394 /** @queue_id: in, submitqueue id */
395395 __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 */
397397 __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 */
399399 __u64 out_syncobjs;
400400 /** @nr_in_syncobjs: in, number of entries in in_syncobj */
401401 __u32 nr_in_syncobjs;
lib/libc/include/any-linux-any/drm/nouveau_drm.h+1
......@@ -89,6 +89,7 @@ struct drm_nouveau_getparam {
8989#define NOUVEAU_FIFO_ENGINE_PPP 0x04
9090#define NOUVEAU_FIFO_ENGINE_BSP 0x08
9191#define NOUVEAU_FIFO_ENGINE_CE 0x30
92#define NOUVEAU_FIFO_ENGINE_NVDEC 0x300
9293
9394struct drm_nouveau_channel_alloc {
9495 __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 {
253253 * @DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO: Query allowed group priorities information.
254254 */
255255 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,
256259};
257260
258261/**
......@@ -487,6 +490,16 @@ struct drm_panthor_timestamp_info {
487490 __u64 cpu_timestamp_nsec;
488491};
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
490503/**
491504 * struct drm_panthor_group_priorities_info - Group priorities information
492505 *
......@@ -601,6 +614,18 @@ enum drm_panthor_vm_bind_op_flags {
601614 */
602615 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
604629 /**
605630 * @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation.
606631 */
......@@ -664,7 +689,6 @@ struct drm_panthor_vm_bind_op {
664689 * This array shall not be empty for sync-only operations.
665690 */
666691 struct drm_panthor_obj_array syncs;
667
668692};
669693
670694/**
lib/libc/include/any-linux-any/drm/xe_drm.h+13-4
......@@ -2537,21 +2537,21 @@ struct drm_xe_exec_queue_set_property {
25372537 * Refer to Documentation/netlink/specs/drm_ras.yaml for complete interface specification.
25382538 *
25392539 * Node Registration
2540 * =================
2540 * -----------------
25412541 *
25422542 * The driver registers DRM RAS nodes for each error severity level.
25432543 * enum drm_xe_ras_error_severity defines the node-id, while DRM_XE_RAS_ERROR_SEVERITY_NAMES maps
25442544 * node-id to node-name.
25452545 *
25462546 * Error Classification
2547 * ====================
2547 * --------------------
25482548 *
25492549 * Each node contains a list of error counters. Each error is identified by a error-id and
25502550 * an error-name. enum drm_xe_ras_error_component defines the error-id, while
25512551 * DRM_XE_RAS_ERROR_COMPONENT_NAMES maps error-id to error-name.
25522552 *
25532553 * User Interface
2554 * ==============
2554 * --------------
25552555 *
25562556 * To retrieve error values of a error counter, userspace applications should
25572557 * follow the below steps:
......@@ -2589,6 +2589,12 @@ enum drm_xe_ras_error_component {
25892589 DRM_XE_RAS_ERR_COMP_CORE_COMPUTE = 1,
25902590 /** @DRM_XE_RAS_ERR_COMP_SOC_INTERNAL: SoC Internal Error */
25912591 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,
25922598 /** @DRM_XE_RAS_ERR_COMP_MAX: Max Error */
25932599 DRM_XE_RAS_ERR_COMP_MAX /* non-ABI */
25942600};
......@@ -2606,7 +2612,10 @@ enum drm_xe_ras_error_component {
26062612 */
26072613#define DRM_XE_RAS_ERROR_COMPONENT_NAMES { \
26082614 [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", \
26102619}
26112620
26122621#if defined(__cplusplus)
lib/libc/include/any-linux-any/fwctl/bnxt.h+4
......@@ -12,6 +12,7 @@ enum fwctl_bnxt_commands {
1212 FWCTL_BNXT_INLINE_COMMANDS = 0,
1313 FWCTL_BNXT_QUERY_COMMANDS,
1414 FWCTL_BNXT_SEND_COMMANDS,
15 FWCTL_BNXT_DMA_COMMANDS,
1516};
1617
1718/**
......@@ -23,4 +24,7 @@ enum fwctl_bnxt_commands {
2324struct fwctl_info_bnxt {
2425 __u32 uctx_caps;
2526};
27
28#define FWCTL_BNXT_MAX_DMABUF 0x10000 /* 64 KiB */
29
2630#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/a.out.h+2-2
......@@ -10,7 +10,7 @@
1010
1111#endif /* __STRUCT_EXEC_OVERRIDE__ */
1212
13#ifndef __ASSEMBLY__
13#ifndef __ASSEMBLER__
1414
1515/* these go in the N_MACHTYPE field */
1616enum machine_type {
......@@ -243,5 +243,5 @@ struct relocation_info
243243};
244244#endif /* no N_RELOCATION_INFO_DECLARED. */
245245
246#endif /*__ASSEMBLY__ */
246#endif /*__ASSEMBLER__ */
247247#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 @@
2222#define SDEI_1_0_FN_SDEI_PE_UNMASK SDEI_1_0_FN(0x0C)
2323#define SDEI_1_0_FN_SDEI_INTERRUPT_BIND SDEI_1_0_FN(0x0D)
2424#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)
2526#define SDEI_1_0_FN_SDEI_PRIVATE_RESET SDEI_1_0_FN(0x11)
2627#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 {
192192};
193193
194194#pragma pack(2)
195/* the destination hardware field in the ARP frame is used to
196 * transport the claim type and the group id
195/**
196 * 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
197203 */
198204struct batadv_bla_claim_dst {
199 __u8 magic[3]; /* FF:43:05 */
200 __u8 type; /* bla_claimframe */
201 __be16 group; /* group id */
205 __u8 magic[3];
206 __u8 type;
207 __be16 group;
202208};
203209
204210/**
lib/libc/include/any-linux-any/linux/binfmts.h+7
......@@ -22,4 +22,11 @@ struct pt_regs;
2222#define AT_FLAGS_PRESERVE_ARGV0_BIT 0
2323#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
2532#endif /* _LINUX_BINFMTS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/blkdev.h+1
......@@ -10,5 +10,6 @@
1010 * It's a different number space from ioctl(), reuse the block's code 0x12.
1111 */
1212#define BLOCK_URING_CMD_DISCARD _IO(0x12, 0)
13#define BLOCK_URING_CMD_ZONE_RESET_ALL _IO(0x12, 1)
1314
1415#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 {
30383038 *
30393039 * * **BPF_F_ADJ_ROOM_DECAP_L3_IPV4**,
30403040 * **BPF_F_ADJ_ROOM_DECAP_L3_IPV6**:
3041 * Indicate the new IP header version after decapsulating the outer
3042 * IP header. Used when the inner and outer IP versions are different.
3041 * Indicate the new IP header version after decapsulating the
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.
30433069 *
30443070 * A call to this helper is susceptible to change the underlying
30453071 * packet buffer. Therefore, at load time, all checks on pointers
......@@ -3532,6 +3558,47 @@ union bpf_attr {
35323558 * Use the mark present in *params*->mark for the fib lookup.
35333559 * This option should not be used with BPF_FIB_LOOKUP_DIRECT,
35343560 * 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**).
35353602 *
35363603 * *ctx* is either **struct xdp_md** for XDP programs or
35373604 * **struct sk_buff** tc cls_act programs.
......@@ -4694,6 +4761,7 @@ union bpf_attr {
46944761 * * **BPF_RB_RING_SIZE**: The size of ring buffer.
46954762 * * **BPF_RB_CONS_POS**: Consumer position (can wrap around).
46964763 * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
4764 * * **BPF_RB_OVERWRITE_POS**: Overwrite position (can wrap around).
46974765 *
46984766 * Data returned is just a momentary snapshot of actual values
46994767 * and could be inaccurate, so this facility should be used to
......@@ -5079,17 +5147,19 @@ union bpf_attr {
50795147 * Description
50805148 * Redirect the packet to another net device of index *ifindex*.
50815149 * This helper is somewhat similar to **bpf_redirect**\ (), except
5082 * that the redirection happens to the *ifindex*' peer device and
5083 * the netns switch takes place from ingress to ingress without
5084 * going through the CPU's backlog queue.
5150 * that the redirection happens to the *ifindex*' peer device. If
5151 * *flags* is 0, the netns switch takes place from ingress to
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.
50855155 *
50865156 * *skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during
50875157 * the netns switch.
50885158 *
5089 * The *flags* argument is reserved and must be 0. The helper is
5090 * currently only supported for tc BPF program types at the
5091 * ingress hook and for veth and netkit target device types. The
5092 * peer device must reside in a different network namespace.
5159 * If the *flags* argument is 0, the helper is currently only
5160 * supported for tc BPF program types at the ingress hook and for
5161 * veth and netkit target device types. The peer device must reside
5162 * in a different network namespace.
50935163 * Return
50945164 * The helper returns **TC_ACT_REDIRECT** on success or
50955165 * **TC_ACT_SHOT** on error.
......@@ -6239,7 +6309,7 @@ enum {
62396309};
62406310
62416311/* BPF_FUNC_skb_adjust_room flags. */
6242enum {
6312enum bpf_adj_room_flags {
62436313 BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0),
62446314 BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = (1ULL << 1),
62456315 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2),
......@@ -6249,6 +6319,10 @@ enum {
62496319 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = (1ULL << 6),
62506320 BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = (1ULL << 7),
62516321 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),
62526326};
62536327
62546328enum {
......@@ -6336,9 +6410,10 @@ enum {
63366410/* Flags for bpf_redirect and bpf_redirect_map helpers */
63376411enum {
63386412 BPF_F_INGRESS = (1ULL << 0), /* used for skb path */
6413 BPF_F_EGRESS = (1ULL << 1), /* used for skb path */
63396414 BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */
63406415 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)
63426417};
63436418
63446419#define __bpf_md_ptr(type, name) \
......@@ -6839,6 +6914,15 @@ struct bpf_link_info {
68396914 __u32 flags;
68406915 __u32 pid;
68416916 } 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;
68426926 struct {
68436927 __u32 type; /* enum bpf_perf_event_type */
68446928 __u32 :32;
......@@ -7327,6 +7411,8 @@ enum {
73277411 BPF_FIB_LOOKUP_TBID = (1U << 3),
73287412 BPF_FIB_LOOKUP_SRC = (1U << 4),
73297413 BPF_FIB_LOOKUP_MARK = (1U << 5),
7414 BPF_FIB_LOOKUP_VLAN = (1U << 6),
7415 BPF_FIB_LOOKUP_VLAN_INPUT = (1U << 7),
73307416};
73317417
73327418enum {
......@@ -7340,6 +7426,7 @@ enum {
73407426 BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */
73417427 BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */
73427428 BPF_FIB_LKUP_RET_NO_SRC_ADDR, /* failed to derive IP src addr */
7429 BPF_FIB_LKUP_RET_VLAN_FAILURE, /* VLAN egress, parent unresolvable */
73437430};
73447431
73457432struct bpf_fib_lookup {
......@@ -7393,7 +7480,13 @@ struct bpf_fib_lookup {
73937480
73947481 union {
73957482 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 */
73977490 __be16 h_vlan_proto;
73987491 __be16 h_vlan_TCI;
73997492 };
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 {
102102
103103
104104
105/**
106 ** POSIX-draft defined capabilities.
107 **/
105/*
106 * POSIX-draft defined capabilities.
107 */
108108
109109/* In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, this
110110 overrides the restriction of changing file ownership and group
......@@ -157,9 +157,9 @@ struct vfs_ns_cap_data {
157157#define CAP_SETUID 7
158158
159159
160/**
161 ** Linux-specific capabilities
162 **/
160/*
161 * Linux-specific capabilities
162 */
163163
164164/* Without VFS support for capabilities:
165165 * 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{
8585#define CCISS_RESCANDISK _IO(CCISS_IOC_MAGIC, 16)
8686#define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)
8787#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
8990#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 {
403403#define CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU (1 << 1)
404404/* CDC-Only device: supports only CDC messages */
405405#define CEC_LOG_ADDRS_FL_CDC_ONLY (1 << 2)
406/* Configuration failed */
407#define CEC_LOG_ADDRS_FL_CONFIG_FAILED (1 << 3)
406408
407409/**
408410 * 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 @@
1313 * leave it unchanged in asm.
1414 */
1515
16#ifdef __ASSEMBLY__
16#ifdef __ASSEMBLER__
1717#define _AC(X,Y) X
1818#define _AT(T,X) X
1919#else
......@@ -28,7 +28,7 @@
2828#define _BITUL(x) (_UL(1) << (x))
2929#define _BITULL(x) (_ULL(1) << (x))
3030
31#if !defined(__ASSEMBLY__)
31#if !defined(__ASSEMBLER__)
3232/*
3333 * Missing __asm__ support
3434 *
lib/libc/include/any-linux-any/linux/devlink.h+2
......@@ -648,6 +648,8 @@ enum devlink_attr {
648648 DEVLINK_ATTR_INDEX, /* uint */
649649 DEVLINK_ATTR_RESOURCE_SCOPE_MASK, /* u32 */
650650
651 DEVLINK_ATTR_PARENT_DEV, /* nested */
652
651653 /* Add new attributes above here, update the spec in
652654 * Documentation/netlink/specs/devlink.yaml and re-generate
653655 * net/devlink/netlink_gen.c.
lib/libc/include/any-linux-any/linux/dpll.h+8
......@@ -129,6 +129,9 @@ enum dpll_type {
129129 * @DPLL_PIN_TYPE_SYNCE_ETH_PORT: ethernet port PHY's recovered clock
130130 * @DPLL_PIN_TYPE_INT_OSCILLATOR: device internal oscillator
131131 * @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.
132135 */
133136enum dpll_pin_type {
134137 DPLL_PIN_TYPE_MUX = 1,
......@@ -136,6 +139,7 @@ enum dpll_pin_type {
136139 DPLL_PIN_TYPE_SYNCE_ETH_PORT,
137140 DPLL_PIN_TYPE_INT_OSCILLATOR,
138141 DPLL_PIN_TYPE_GNSS,
142 DPLL_PIN_TYPE_INT_NCO,
139143
140144 /* private: */
141145 __DPLL_PIN_TYPE_MAX,
......@@ -208,11 +212,15 @@ enum dpll_pin_operstate {
208212 * @DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE: pin direction can be changed
209213 * @DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE: pin priority can be changed
210214 * @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.
211218 */
212219enum dpll_pin_capabilities {
213220 DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE = 1,
214221 DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE = 2,
215222 DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE = 4,
223 DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE = 8,
216224};
217225
218226#define DPLL_PHASE_OFFSET_DIVIDER 1000
lib/libc/include/any-linux-any/linux/edd.h+2-2
......@@ -53,7 +53,7 @@
5353#define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF
5454 in boot_params - treat this as 1 byte */
5555
56#ifndef __ASSEMBLY__
56#ifndef __ASSEMBLER__
5757
5858#define EDD_EXT_FIXED_DISK_ACCESS (1 << 0)
5959#define EDD_EXT_DEVICE_LOCKING_AND_EJECTING (1 << 1)
......@@ -187,6 +187,6 @@ struct edd {
187187 unsigned char edd_info_nr;
188188};
189189
190#endif /*!__ASSEMBLY__ */
190#endif /*!__ASSEMBLER__ */
191191
192192#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 {
20132013 ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39,
20142014 ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40,
20152015 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 */
20162021 ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 42,
2022
20172023 ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 43,
20182024 ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44,
20192025 ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45,
lib/libc/include/any-linux-any/linux/f2fs.h+7
......@@ -45,6 +45,9 @@
4545#define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25)
4646#define F2FS_IOC_GET_DEV_ALIAS_FILE _IOR(F2FS_IOCTL_MAGIC, 26, __u32)
4747#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
4952/*
5053 * should be same as XFS_IOC_GOINGDOWN.
......@@ -70,6 +73,10 @@ enum {
7073 F2FS_IOPRIO_MAX,
7174};
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
7380struct f2fs_gc_range {
7481 __u32 sync;
7582 __u64 start;
lib/libc/include/any-linux-any/linux/fcntl.h+1
......@@ -124,6 +124,7 @@ struct delegation {
124124
125125#define FD_PIDFS_ROOT -10002 /* Root of the pidfs filesystem */
126126#define FD_NSFS_ROOT -10003 /* Root of the nsfs filesystem */
127#define FD_FAILFS_ROOT -10004 /* Root of the failfs filesystem */
127128#define FD_INVALID -10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */
128129
129130/* 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;
467467#define PAGE_IS_HUGE (1 << 6)
468468#define PAGE_IS_SOFT_DIRTY (1 << 7)
469469#define PAGE_IS_GUARD (1 << 8)
470#define PAGE_IS_ACCESSED (1 << 9)
470471
471472/*
472473 * struct page_region - Page region with flags
lib/libc/include/any-linux-any/linux/fscrypt.h-1
......@@ -30,7 +30,6 @@
3030#define FSCRYPT_MODE_SM4_CTS 8
3131#define FSCRYPT_MODE_ADIANTUM 9
3232#define FSCRYPT_MODE_AES_256_HCTR2 10
33/* If adding a mode number > 10, update FSCRYPT_MODE_MAX in fscrypt_private.h */
3433
3534/*
3635 * 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 @@
240240 * - add FUSE_COPY_FILE_RANGE_64
241241 * - add struct fuse_copy_file_range_out
242242 * - 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
243251 */
244252
245253#ifndef _LINUX_FUSE_H
......@@ -271,7 +279,7 @@
271279#define FUSE_KERNEL_VERSION 7
272280
273281/** Minor version number of this interface */
274#define FUSE_KERNEL_MINOR_VERSION 45
282#define FUSE_KERNEL_MINOR_VERSION 46
275283
276284/** The node ID of the root inode */
277285#define FUSE_ROOT_ID 1
......@@ -379,6 +387,12 @@ struct fuse_file_lock {
379387 * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE)
380388 * FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode
381389 * 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.
382396 */
383397#define FOPEN_DIRECT_IO (1 << 0)
384398#define FOPEN_KEEP_CACHE (1 << 1)
......@@ -388,6 +402,7 @@ struct fuse_file_lock {
388402#define FOPEN_NOFLUSH (1 << 5)
389403#define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6)
390404#define FOPEN_PASSTHROUGH (1 << 7)
405#define FOPEN_IO_URING_ZERO_COPY (1 << 8)
391406
392407/**
393408 * INIT request/reply flags
......@@ -444,6 +459,7 @@ struct fuse_file_lock {
444459 * FUSE_OVER_IO_URING: Indicate that client supports io-uring
445460 * FUSE_REQUEST_TIMEOUT: kernel supports timing out requests.
446461 * init_out.request_timeout contains the timeout (in secs)
462 * FUSE_HAS_IO_URING_BUFPOOL: kernel supports io-uring buffer pools
447463 */
448464#define FUSE_ASYNC_READ (1 << 0)
449465#define FUSE_POSIX_LOCKS (1 << 1)
......@@ -491,6 +507,7 @@ struct fuse_file_lock {
491507#define FUSE_ALLOW_IDMAP (1ULL << 40)
492508#define FUSE_OVER_IO_URING (1ULL << 41)
493509#define FUSE_REQUEST_TIMEOUT (1ULL << 42)
510#define FUSE_HAS_IO_URING_BUFPOOL (1ULL << 43)
494511
495512/**
496513 * CUSE INIT request/reply flags
......@@ -1247,6 +1264,13 @@ struct fuse_supp_groups {
12471264#define FUSE_URING_IN_OUT_HEADER_SZ 128
12481265#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
12501274/* Used as part of the fuse_uring_req_header */
12511275struct fuse_uring_ent_in_out {
12521276 uint64_t flags;
......@@ -1259,7 +1283,9 @@ struct fuse_uring_ent_in_out {
12591283
12601284 /* size of user payload buffer */
12611285 uint32_t payload_sz;
1262 uint32_t padding;
1286
1287 /* Offset into the bufpool, if bufpools are used */
1288 uint32_t offset;
12631289
12641290 uint64_t reserved;
12651291};
......@@ -1288,8 +1314,22 @@ enum fuse_uring_cmd {
12881314
12891315 /* commit fuse request result and fetch next request */
12901316 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,
12911323};
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
12931333/**
12941334 * In the 80B command area of the SQE.
12951335 */
......@@ -1302,6 +1342,25 @@ struct fuse_uring_cmd_req {
13021342 /* queue the command is for (queue index) */
13031343 uint16_t qid;
13041344 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 };
13051364};
13061365
13071366#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 @@
3535#define LMI_CCITT 3 /* ITU-T Annex A */
3636#define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */
3737
38#ifndef __ASSEMBLY__
38#ifndef __ASSEMBLER__
3939
4040typedef struct {
4141 unsigned int clock_rate; /* bits per second */
......@@ -90,5 +90,5 @@ typedef struct {
9090
9191/* PPP doesn't need any info now - supply length = 0 to ioctl */
9292
93#endif /* __ASSEMBLY__ */
93#endif /* __ASSEMBLER__ */
9494#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 {
3636 IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */
3737 IFA_TARGET_NETNSID,
3838 IFA_PROTO, /* u8, address protocol */
39 IFA_MC_USERS, /* u32, multicast group users */
3940 __IFA_MAX,
4041};
4142
lib/libc/include/any-linux-any/linux/if_tun.h+4
......@@ -69,6 +69,10 @@
6969#define IFF_NAPI_FRAGS 0x0020
7070/* Used in TUNSETIFF to bring up tun/tap without carrier */
7171#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
7276#define IFF_NO_PI 0x1000
7377/* This flag has no real effect */
7478#define IFF_ONE_QUEUE 0x2000
lib/libc/include/any-linux-any/linux/if_xdp.h+1
......@@ -149,6 +149,7 @@ struct xsk_tx_metadata {
149149 __u16 csum_start;
150150 /* Offset from csum_start where checksum should be stored. */
151151 __u16 csum_offset;
152 __u32 reserved;
152153
153154 /* XDP_TXMD_FLAGS_LAUNCH_TIME */
154155 /* 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 {
5454 IIO_ATTENTION,
5555 IIO_ALTCURRENT,
5656 IIO_COVERAGE,
57 IIO_VOLUMEFLOW,
5758};
5859
5960enum iio_modifier {
lib/libc/include/any-linux-any/linux/input-event-codes.h+6
......@@ -970,6 +970,12 @@
970970
971971/*
972972 * 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.
973979 */
974980
975981#define LED_NUML 0x00
lib/libc/include/any-linux-any/linux/io_uring/zcrx.h+7
......@@ -116,6 +116,7 @@ enum zcrx_ctrl_op {
116116 ZCRX_CTRL_FLUSH_RQ,
117117 ZCRX_CTRL_EXPORT,
118118 ZCRX_CTRL_ARM_EVENT,
119 ZCRX_CTRL_ADD_AREA,
119120
120121 __ZCRX_CTRL_LAST,
121122};
......@@ -134,6 +135,11 @@ struct zcrx_ctrl_arm_event {
134135 __u32 __resv[11];
135136};
136137
138struct zcrx_ctrl_add_area {
139 __u64 area_ptr; /* pointer to struct io_uring_zcrx_area_reg */
140 __u64 __resv[5];
141};
142
137143struct zcrx_ctrl {
138144 __u32 zcrx_id;
139145 __u32 op; /* see enum zcrx_ctrl_op */
......@@ -143,6 +149,7 @@ struct zcrx_ctrl {
143149 struct zcrx_ctrl_export zc_export;
144150 struct zcrx_ctrl_flush_rq zc_flush;
145151 struct zcrx_ctrl_arm_event zc_arm_event;
152 struct zcrx_ctrl_add_area zc_area;
146153 };
147154};
148155
lib/libc/include/any-linux-any/linux/iommufd.h+42-3
......@@ -57,6 +57,7 @@ enum {
5757 IOMMUFD_CMD_IOAS_CHANGE_PROCESS = 0x92,
5858 IOMMUFD_CMD_VEVENTQ_ALLOC = 0x93,
5959 IOMMUFD_CMD_HW_QUEUE_ALLOC = 0x94,
60 IOMMUFD_CMD_IOAS_NOIOMMU_GET_PA = 0x95,
6061};
6162
6263/**
......@@ -219,6 +220,33 @@ struct iommu_ioas_map {
219220};
220221#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
222250/**
223251 * struct iommu_ioas_map_file - ioctl(IOMMU_IOAS_MAP_FILE)
224252 * @size: sizeof(struct iommu_ioas_map_file)
......@@ -574,11 +602,22 @@ struct iommu_hw_info_vtd {
574602 __aligned_u64 ecap_reg;
575603};
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
577616/**
578617 * struct iommu_hw_info_arm_smmuv3 - ARM SMMUv3 hardware information
579618 * (IOMMU_HW_INFO_TYPE_ARM_SMMUV3)
580619 *
581 * @flags: Must be set to 0
620 * @flags: Combination of enum iommu_hw_info_arm_smmuv3_flags
582621 * @__reserved: Must be 0
583622 * @idr: Implemented features for ARM SMMU Non-secure programming interface
584623 * @iidr: Information about the implementation and implementer of ARM SMMU,
......@@ -594,7 +633,7 @@ struct iommu_hw_info_vtd {
594633 * idr[0]: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN , CD2L, ASID16, TTF
595634 * idr[1]: SIDSIZE, SSIDSIZE
596635 * idr[3]: BBML, RIL
597 * idr[5]: VAX, GRAN64K, GRAN16K, GRAN4K
636 * idr[5]: VAX, GRAN64K, GRAN16K, GRAN4K, DS
598637 *
599638 * - S1P should be assumed to be true if a NESTED HWPT can be created
600639 * - VFIO/iommufd only support platforms with COHACC, it should be assumed to be
......@@ -602,7 +641,7 @@ struct iommu_hw_info_vtd {
602641 * - ATS is a per-device property. If the VMM describes any devices as ATS
603642 * capable in ACPI/DT it should set the corresponding idr.
604643 *
605 * This list may expand in future (eg E0PD, AIE, PBHA, D128, DS etc). It is
644 * This list may expand in future (eg E0PD, AIE, PBHA, D128 etc). It is
606645 * important that VMMs do not read bits outside the list to allow for
607646 * compatibility with future kernels. Several features in the SMMUv3
608647 * 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 {
690690};
691691
692692/**
693 * kfd_ioctl_criu_args - Arguments perform CRIU operation
693 * struct kfd_ioctl_criu_args - Arguments perform CRIU operation
694694 * @devices: [in/out] User pointer to memory location for devices information.
695695 * This is an array of type kfd_criu_device_bucket.
696696 * @bos: [in/out] User pointer to memory location for BOs information
......@@ -698,11 +698,11 @@ enum kfd_criu_op {
698698 * @priv_data: [in/out] User pointer to memory location for private data
699699 * @priv_data_size: [in/out] Size of priv_data in bytes
700700 * @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.
702702 * @num_objects: [in/out] Number of objects used by process. Objects are opaque to
703703 * user application.
704704 * @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)
706706 *
707707 * Return: 0 on success, -errno on failure
708708 */
......@@ -764,7 +764,7 @@ enum kfd_mmio_remap {
764764#define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080
765765
766766/**
767 * kfd_ioctl_svm_op - SVM ioctl operations
767 * enum kfd_ioctl_svm_op - SVM ioctl operations
768768 *
769769 * @KFD_IOCTL_SVM_OP_SET_ATTR: Modify one or more attributes
770770 * @KFD_IOCTL_SVM_OP_GET_ATTR: Query one or more attributes
......@@ -786,7 +786,7 @@ enum kfd_ioctl_svm_location {
786786};
787787
788788/**
789 * kfd_ioctl_svm_attr_type - SVM attribute types
789 * enum kfd_ioctl_svm_attr_type - SVM attribute types
790790 *
791791 * @KFD_IOCTL_SVM_ATTR_PREFERRED_LOC: gpuid of the preferred location, 0 for
792792 * system memory
......@@ -815,7 +815,7 @@ enum kfd_ioctl_svm_attr_type {
815815};
816816
817817/**
818 * kfd_ioctl_svm_attribute - Attributes as pairs of type and value
818 * struct kfd_ioctl_svm_attribute - Attributes as pairs of type and value
819819 *
820820 * The meaning of the @value depends on the attribute type.
821821 *
......@@ -828,7 +828,7 @@ struct kfd_ioctl_svm_attribute {
828828};
829829
830830/**
831 * kfd_ioctl_svm_args - Arguments for SVM ioctl
831 * struct kfd_ioctl_svm_args - Arguments for SVM ioctl
832832 *
833833 * @op specifies the operation to perform (see enum
834834 * @kfd_ioctl_svm_op). @start_addr and @size are common for all
......@@ -875,7 +875,7 @@ struct kfd_ioctl_svm_args {
875875};
876876
877877/**
878 * kfd_ioctl_set_xnack_mode_args - Arguments for set_xnack_mode
878 * struct kfd_ioctl_set_xnack_mode_args - Arguments for set_xnack_mode
879879 *
880880 * @xnack_enabled: [in/out] Whether to enable XNACK mode for this process
881881 *
......@@ -1055,15 +1055,15 @@ struct kfd_runtime_info {
10551055#define KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK 2
10561056
10571057/**
1058 * kfd_ioctl_runtime_enable_args - Arguments for runtime enable
1058 * struct kfd_ioctl_runtime_enable_args - Arguments for runtime enable
10591059 *
10601060 * Coordinates debug exception signalling and debug device enablement with runtime.
10611061 *
1062 * @r_debug - pointer to user struct for sharing information between ROCr and the debuggger
1063 * @mode_mask - mask to set mode
1062 * @r_debug: pointer to user struct for sharing information between ROCr and the debuggger
1063 * @mode_mask: mask to set mode
10641064 * KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK - enable runtime for debugging, otherwise disable
10651065 * KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK - enable trap temporary setup (ignore on disable)
1066 * @capabilities_mask - mask to notify runtime on what KFD supports
1066 * @capabilities_mask: mask to notify runtime on what KFD supports
10671067 *
10681068 * Return - 0 on SUCCESS.
10691069 * - EBUSY if runtime enable call already pending.
......@@ -1158,17 +1158,15 @@ enum kfd_dbg_trap_operations {
11581158};
11591159
11601160/**
1161 * kfd_ioctl_dbg_trap_enable_args
1162 *
1163 * Arguments for KFD_IOC_DBG_TRAP_ENABLE.
1161 * struct kfd_ioctl_dbg_trap_enable_args - Arguments for KFD_IOC_DBG_TRAP_ENABLE.
11641162 *
11651163 * Enables debug session for target process. Call @op KFD_IOC_DBG_TRAP_DISABLE in
11661164 * kfd_ioctl_dbg_trap_args to disable debug session.
11671165 *
1168 * @exception_mask (IN) - exceptions to raise to the debugger
1169 * @rinfo_ptr (IN) - pointer to runtime info buffer (see kfd_runtime_info)
1170 * @rinfo_size (IN/OUT) - size of runtime info buffer in bytes
1171 * @dbg_fd (IN) - fd the KFD will nofify the debugger with of raised
1166 * @exception_mask: (IN) - exceptions to raise to the debugger
1167 * @rinfo_ptr: (IN) - pointer to runtime info buffer (see kfd_runtime_info)
1168 * @rinfo_size: (IN/OUT) - size of runtime info buffer in bytes
1169 * @dbg_fd: (IN) - fd the KFD will nofify the debugger with of raised
11721170 * exceptions set in exception_mask.
11731171 *
11741172 * Generic errors apply (see kfd_dbg_trap_operations).
......@@ -1188,15 +1186,14 @@ struct kfd_ioctl_dbg_trap_enable_args {
11881186};
11891187
11901188/**
1191 * kfd_ioctl_dbg_trap_send_runtime_event_args
1192 *
1189 * struct kfd_ioctl_dbg_trap_send_runtime_event_args - Arguments for
1190 * KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT.
11931191 *
1194 * Arguments for KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT.
11951192 * Raises exceptions to runtime.
11961193 *
1197 * @exception_mask (IN) - exceptions to raise to runtime
1198 * @gpu_id (IN) - target device id
1199 * @queue_id (IN) - target queue id
1194 * @exception_mask: (IN) - exceptions to raise to runtime
1195 * @gpu_id: (IN) - target device id
1196 * @queue_id: (IN) - target queue id
12001197 *
12011198 * Generic errors apply (see kfd_dbg_trap_operations).
12021199 * Return - 0 on SUCCESS.
......@@ -1213,12 +1210,12 @@ struct kfd_ioctl_dbg_trap_send_runtime_event_args {
12131210};
12141211
12151212/**
1216 * kfd_ioctl_dbg_trap_set_exceptions_enabled_args
1213 * struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args - Arguments for
1214 * KFD_IOC_SET_EXCEPTIONS_ENABLED
12171215 *
1218 * Arguments for KFD_IOC_SET_EXCEPTIONS_ENABLED
12191216 * Set new exceptions to be raised to the debugger.
12201217 *
1221 * @exception_mask (IN) - new exceptions to raise the debugger
1218 * @exception_mask: (IN) - new exceptions to raise the debugger
12221219 *
12231220 * Generic errors apply (see kfd_dbg_trap_operations).
12241221 * Return - 0 on SUCCESS.
......@@ -1228,16 +1225,16 @@ struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args {
12281225};
12291226
12301227/**
1231 * kfd_ioctl_dbg_trap_set_wave_launch_override_args
1228 * struct kfd_ioctl_dbg_trap_set_wave_launch_override_args - Arguments for
1229 * KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE
12321230 *
1233 * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE
12341231 * Enable HW exceptions to raise trap.
12351232 *
1236 * @override_mode (IN) - see kfd_dbg_trap_override_mode
1237 * @enable_mask (IN/OUT) - reference kfd_dbg_trap_mask.
1233 * @override_mode: (IN) - see kfd_dbg_trap_override_mode
1234 * @enable_mask: (IN/OUT) - reference kfd_dbg_trap_mask.
12381235 * IN is the override modes requested to be enabled.
12391236 * 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.
12411238 * IN is the override modes requested for support check.
12421239 * OUT is referenced in Return below.
12431240 *
......@@ -1254,36 +1251,38 @@ struct kfd_ioctl_dbg_trap_set_wave_launch_override_args {
12541251 __u32 override_mode;
12551252 __u32 enable_mask;
12561253 __u32 support_request_mask;
1254 /* private: */
12571255 __u32 pad;
12581256};
12591257
12601258/**
1261 * kfd_ioctl_dbg_trap_set_wave_launch_mode_args
1259 * struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args - Arguments for
1260 * KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE
12621261 *
1263 * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE
12641262 * Set wave launch mode.
12651263 *
1266 * @mode (IN) - see kfd_dbg_trap_wave_launch_mode
1264 * @launch_mode: (IN) - see kfd_dbg_trap_wave_launch_mode
12671265 *
12681266 * Generic errors apply (see kfd_dbg_trap_operations).
12691267 * Return - 0 on SUCCESS.
12701268 */
12711269struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args {
12721270 __u32 launch_mode;
1271 /* private: */
12731272 __u32 pad;
12741273};
12751274
12761275/**
1277 * kfd_ioctl_dbg_trap_suspend_queues_ags
1276 * struct kfd_ioctl_dbg_trap_suspend_queues_args - Arguments for
1277 * KFD_IOC_DBG_TRAP_SUSPEND_QUEUES
12781278 *
1279 * Arguments for KFD_IOC_DBG_TRAP_SUSPEND_QUEUES
12801279 * Suspend queues.
12811280 *
1282 * @exception_mask (IN) - raised exceptions to clear
1283 * @queue_array_ptr (IN) - pointer to array of queue ids (u32 per queue id)
1281 * @exception_mask: (IN) - raised exceptions to clear
1282 * @queue_array_ptr: (IN) - pointer to array of queue ids (u32 per queue id)
12841283 * to suspend
1285 * @num_queues (IN) - number of queues to suspend in @queue_array_ptr
1286 * @grace_period (IN) - wave time allowance before preemption
1284 * @num_queues: (IN) - number of queues to suspend in @queue_array_ptr
1285 * @grace_period: (IN) - wave time allowance before preemption
12871286 * per 1K GPU clock cycle unit
12881287 *
12891288 * Generic errors apply (see kfd_dbg_trap_operations).
......@@ -1311,14 +1310,14 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args {
13111310};
13121311
13131312/**
1314 * kfd_ioctl_dbg_trap_resume_queues_args
1313 * struct kfd_ioctl_dbg_trap_resume_queues_args - Arguments for
1314 * KFD_IOC_DBG_TRAP_RESUME_QUEUES
13151315 *
1316 * Arguments for KFD_IOC_DBG_TRAP_RESUME_QUEUES
13171316 * Resume queues.
13181317 *
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)
13201319 * to resume
1321 * @num_queues (IN) - number of queues to resume in @queue_array_ptr
1320 * @num_queues: (IN) - number of queues to resume in @queue_array_ptr
13221321 *
13231322 * Generic errors apply (see kfd_dbg_trap_operations).
13241323 * Return - Number of queues resumed on SUCCESS.
......@@ -1331,20 +1330,21 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args {
13311330struct kfd_ioctl_dbg_trap_resume_queues_args {
13321331 __u64 queue_array_ptr;
13331332 __u32 num_queues;
1333 /* private: */
13341334 __u32 pad;
13351335};
13361336
13371337/**
1338 * kfd_ioctl_dbg_trap_set_node_address_watch_args
1338 * struct kfd_ioctl_dbg_trap_set_node_address_watch_args - Arguments for
1339 * KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH
13391340 *
1340 * Arguments for KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH
13411341 * Sets address watch for device.
13421342 *
1343 * @address (IN) - watch address to set
1344 * @mode (IN) - see kfd_dbg_trap_address_watch_mode
1345 * @mask (IN) - watch address mask
1346 * @gpu_id (IN) - target gpu to set watch point
1347 * @id (OUT) - watch id allocated
1343 * @address: (IN) - watch address to set
1344 * @mode: (IN) - see kfd_dbg_trap_address_watch_mode
1345 * @mask: (IN) - watch address mask
1346 * @gpu_id: (IN) - target gpu to set watch point
1347 * @id: (OUT) - watch id allocated
13481348 *
13491349 * Generic errors apply (see kfd_dbg_trap_operations).
13501350 * Return - 0 on SUCCESS.
......@@ -1361,13 +1361,13 @@ struct kfd_ioctl_dbg_trap_set_node_address_watch_args {
13611361};
13621362
13631363/**
1364 * kfd_ioctl_dbg_trap_clear_node_address_watch_args
1364 * struct kfd_ioctl_dbg_trap_clear_node_address_watch_args - Arguments for
1365 * KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH
13651366 *
1366 * Arguments for KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH
13671367 * Clear address watch for device.
13681368 *
1369 * @gpu_id (IN) - target device to clear watch point
1370 * @id (IN) - allocated watch id to clear
1369 * @gpu_id: (IN) - target device to clear watch point
1370 * @id: (IN) - allocated watch id to clear
13711371 *
13721372 * Generic errors apply (see kfd_dbg_trap_operations).
13731373 * Return - 0 on SUCCESS.
......@@ -1380,12 +1380,12 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args {
13801380};
13811381
13821382/**
1383 * kfd_ioctl_dbg_trap_set_flags_args
1383 * struct kfd_ioctl_dbg_trap_set_flags_args - Arguments for
1384 * KFD_IOC_DBG_TRAP_SET_FLAGS
13841385 *
1385 * Arguments for KFD_IOC_DBG_TRAP_SET_FLAGS
13861386 * Sets flags for wave behaviour.
13871387 *
1388 * @flags (IN/OUT) - IN = flags to enable, OUT = flags previously enabled
1388 * @flags: (IN/OUT) - IN = flags to enable, OUT = flags previously enabled
13891389 *
13901390 * Generic errors apply (see kfd_dbg_trap_operations).
13911391 * Return - 0 on SUCCESS.
......@@ -1393,13 +1393,13 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args {
13931393 */
13941394struct kfd_ioctl_dbg_trap_set_flags_args {
13951395 __u32 flags;
1396 /* private: */
13961397 __u32 pad;
13971398};
13981399
13991400/**
1400 * kfd_ioctl_dbg_trap_query_debug_event_args
1401 *
1402 * Arguments for KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT
1401 * struct kfd_ioctl_dbg_trap_query_debug_event_args - Arguments for
1402 * KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT
14031403 *
14041404 * Find one or more raised exceptions. This function can return multiple
14051405 * 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 {
14091409 * However, clearing an exception prevents retrieving further information
14101410 * about it with KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO.
14111411 *
1412 * @exception_mask (IN/OUT) - exception to clear (IN) and raised (OUT)
1413 * @gpu_id (OUT) - gpu id of exceptions raised
1414 * @queue_id (OUT) - queue id of exceptions raised
1412 * @exception_mask: (IN/OUT) - exception to clear (IN) and raised (OUT)
1413 * @gpu_id: (OUT) - gpu id of exceptions raised
1414 * @queue_id: (OUT) - queue id of exceptions raised
14151415 *
14161416 * Generic errors apply (see kfd_dbg_trap_operations).
14171417 * Return - 0 on raised exception found
......@@ -1426,16 +1426,16 @@ struct kfd_ioctl_dbg_trap_query_debug_event_args {
14261426};
14271427
14281428/**
1429 * kfd_ioctl_dbg_trap_query_exception_info_args
1429 * struct kfd_ioctl_dbg_trap_query_exception_info_args - Arguments for
1430 * KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO
14301431 *
1431 * Arguments KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO
14321432 * Get additional info on raised exception.
14331433 *
1434 * @info_ptr (IN) - pointer to exception info buffer to copy to
1435 * @info_size (IN/OUT) - exception info buffer size (bytes)
1436 * @source_id (IN) - target gpu or queue id
1437 * @exception_code (IN) - target exception
1438 * @clear_exception (IN) - clear raised @exception_code exception
1434 * @info_ptr: (IN) - pointer to exception info buffer to copy to
1435 * @info_size: (IN/OUT) - exception info buffer size (bytes)
1436 * @source_id: (IN) - target gpu or queue id
1437 * @exception_code: (IN) - target exception
1438 * @clear_exception: (IN) - clear raised @exception_code exception
14391439 * (0 = false, 1 = true)
14401440 *
14411441 * Generic errors apply (see kfd_dbg_trap_operations).
......@@ -1455,20 +1455,20 @@ struct kfd_ioctl_dbg_trap_query_exception_info_args {
14551455};
14561456
14571457/**
1458 * kfd_ioctl_dbg_trap_get_queue_snapshot_args
1458 * struct kfd_ioctl_dbg_trap_queue_snapshot_args - Arguments for
1459 * KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT
14591460 *
1460 * Arguments KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT
14611461 * Get queue information.
14621462 *
1463 * @exception_mask (IN) - exceptions raised to clear
1464 * @snapshot_buf_ptr (IN) - queue snapshot entry buffer (see kfd_queue_snapshot_entry)
1465 * @num_queues (IN/OUT) - number of queue snapshot entries
1463 * @exception_mask: (IN) - exceptions raised to clear
1464 * @snapshot_buf_ptr: (IN) - queue snapshot entry buffer (see kfd_queue_snapshot_entry)
1465 * @num_queues: (IN/OUT) - number of queue snapshot entries
14661466 * The debugger specifies the size of the array allocated in @num_queues.
14671467 * KFD returns the number of queues that actually existed. If this is
14681468 * larger than the size specified by the debugger, KFD will not overflow
14691469 * the array allocated by the debugger.
14701470 *
1471 * @entry_size (IN/OUT) - size per entry in bytes
1471 * @entry_size: (IN/OUT) - size per entry in bytes
14721472 * The debugger specifies sizeof(struct kfd_queue_snapshot_entry) in
14731473 * @entry_size. KFD returns the number of bytes actually populated per
14741474 * entry. The debugger should use the KFD_IOCTL_MINOR_VERSION to determine,
......@@ -1491,20 +1491,20 @@ struct kfd_ioctl_dbg_trap_queue_snapshot_args {
14911491};
14921492
14931493/**
1494 * kfd_ioctl_dbg_trap_get_device_snapshot_args
1494 * struct kfd_ioctl_dbg_trap_device_snapshot_args - Arguments for
1495 * KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT
14951496 *
1496 * Arguments for KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT
14971497 * Get device information.
14981498 *
1499 * @exception_mask (IN) - exceptions raised to clear
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 snapshot
1499 * @exception_mask: (IN) - exceptions raised to clear
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 snapshot
15021502 * The debugger specifies the size of the array allocated in @num_devices.
15031503 * KFD returns the number of devices that actually existed. If this is
15041504 * larger than the size specified by the debugger, KFD will not overflow
15051505 * the array allocated by the debugger.
15061506 *
1507 * @entry_size (IN/OUT) - size per entry in bytes
1507 * @entry_size: (IN/OUT) - size per entry in bytes
15081508 * The debugger specifies sizeof(struct kfd_dbg_device_info_entry) in
15091509 * @entry_size. KFD returns the number of bytes actually populated. The
15101510 * debugger should use KFD_IOCTL_MINOR_VERSION to determine, which fields
......@@ -1527,12 +1527,10 @@ struct kfd_ioctl_dbg_trap_device_snapshot_args {
15271527};
15281528
15291529/**
1530 * kfd_ioctl_dbg_trap_args
1531 *
1532 * Arguments to debug target process.
1530 * struct kfd_ioctl_dbg_trap_args - Arguments to debug target process.
15331531 *
1534 * @pid - target process to debug
1535 * @op - debug operation (see kfd_dbg_trap_operations)
1532 * @pid: target process to debug
1533 * @op: debug operation (see kfd_dbg_trap_operations)
15361534 *
15371535 * @op determines which union struct args to use.
15381536 * Refer to kern docs for each kfd_ioctl_dbg_trap_*_args struct.
......@@ -1567,7 +1565,7 @@ enum kfd_profiler_ops {
15671565};
15681566
15691567/**
1570 * Enables/Disables GPU Specific profiler settings
1568 * struct kfd_ioctl_pmc_settings - Enables/Disables GPU Specific profiler settings
15711569 */
15721570struct kfd_ioctl_pmc_settings {
15731571 __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 {
986986#define KVM_CAP_S390_KEYOP 247
987987#define KVM_CAP_S390_VSIE_ESAMODE 248
988988#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
990992struct kvm_irq_routing_irqchip {
991993 __u32 irqchip;
......@@ -1330,6 +1332,8 @@ struct kvm_s390_keyop {
13301332/* Available with KVM_CAP_COUNTER_OFFSET */
13311333#define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset)
13321334#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
13341338/* ioctl for vm fd */
13351339#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 {
191191 *
192192 * If the calling thread is running with no_new_privs, this operation
193193 * 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.
194206 */
195207/* clang-format off */
196208#define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)
197209#define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON (1U << 1)
198210#define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF (1U << 2)
199211#define LANDLOCK_RESTRICT_SELF_TSYNC (1U << 3)
212#define LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS (1U << 4)
200213/* clang-format on */
201214
202215/**
......@@ -315,16 +328,16 @@ struct landlock_net_port_attr {
315328 * :manpage:`connect(2)` as well as calls to :manpage:`sendmsg(2)` with an
316329 * explicit recipient address.
317330 *
318 * This access right only applies to connections to UNIX server sockets which
331 * This access right applies only to connections to UNIX server sockets which
319332 * were created outside of the newly created Landlock domain (e.g. from within
320333 * a parent domain or from an unrestricted process). Newly created UNIX
321334 * servers within the same Landlock domain continue to be accessible. In this
322335 * regard, %LANDLOCK_ACCESS_FS_RESOLVE_UNIX has the same semantics as the
323336 * ``LANDLOCK_SCOPE_*`` flags.
324337 *
325 * If a resolve attempt is denied, the operation returns an ``EACCES`` error,
326 * in line with other filesystem access rights (but different to denials for
327 * abstract UNIX domain sockets).
338 * If a resolution attempt is denied, the operation returns an ``EACCES``
339 * error, in line with other filesystem access rights (but different to
340 * denials for abstract UNIX domain sockets).
328341 *
329342 * This access right is available since the ninth version of the Landlock ABI.
330343 *
......@@ -351,6 +364,7 @@ struct landlock_net_port_attr {
351364 * device.
352365 * - %LANDLOCK_ACCESS_FS_MAKE_DIR: Create (or rename) a directory.
353366 * - %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.
354368 * - %LANDLOCK_ACCESS_FS_MAKE_SOCK: Create (or rename or link) a UNIX domain
355369 * socket.
356370 * - %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 @@
88#define AUTOFS_SUPER_MAGIC 0x0187
99#define CEPH_SUPER_MAGIC 0x00c36400
1010#define CODA_SUPER_MAGIC 0x73757245
11#define CONFIGFS_MAGIC 0x62656570 /* some random number */
1112#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */
1213#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */
1314#define DEBUGFS_MAGIC 0x64626720
......@@ -105,5 +106,6 @@
105106#define PID_FS_MAGIC 0x50494446 /* "PIDF" */
106107#define GUEST_MEMFD_MAGIC 0x474d454d /* "GMEM" */
107108#define NULL_FS_MAGIC 0x4E554C4C /* "NULL" */
109#define FAIL_FS_MAGIC 0x4641494C /* "FAIL" */
108110
109111#endif /* __LINUX_MAGIC_H__ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/mdio.h+5
......@@ -332,8 +332,13 @@
332332#define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */
333333#define MDIO_AN_10GBT_CTRL_ADV5G 0x0100 /* Advertise 5GBASE-T */
334334#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
336339/* 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) */
337342#define MDIO_AN_10GBT_STAT_LP2_5G 0x0020 /* LP is 2.5GBT capable */
338343#define MDIO_AN_10GBT_STAT_LP5G 0x0040 /* LP is 5GBT capable */
339344#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 @@
3636 */
3737#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
3942/**
4043 * struct mali_c55_ae_1024bin_hist - Auto Exposure 1024-bin histogram statistics
4144 *
......@@ -219,6 +222,9 @@ struct mali_c55_stats_buffer {
219222 * @MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP: Auto-white balance gains for AEXP-0 tap
220223 * @MALI_C55_PARAM_MESH_SHADING_CONFIG : Mesh shading tables configuration
221224 * @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
222228 */
223229enum mali_c55_param_block_type {
224230 MALI_C55_PARAM_BLOCK_SENSOR_OFFS,
......@@ -232,6 +238,9 @@ enum mali_c55_param_block_type {
232238 MALI_C55_PARAM_BLOCK_AWB_GAINS_AEXP,
233239 MALI_C55_PARAM_MESH_SHADING_CONFIG,
234240 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,
235244};
236245
237246/**
......@@ -757,6 +766,78 @@ struct mali_c55_params_mesh_shading_selection {
757766 __u16 mesh_strength;
758767};
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
760841/**
761842 * define MALI_C55_PARAMS_MAX_SIZE - Maximum size of all Mali C55 Parameters
762843 *
......@@ -780,6 +861,9 @@ struct mali_c55_params_mesh_shading_selection {
780861 sizeof(struct mali_c55_params_awb_config) + \
781862 sizeof(struct mali_c55_params_awb_gains) + \
782863 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
785869#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 @@
1313#include <linux/types.h>
1414
1515/**
16 * enum v4l2_isp_params_version - V4L2 ISP parameters versioning
16 * enum v4l2_isp_version - V4L2 ISP serialization format versioning
1717 *
18 * @V4L2_ISP_PARAMS_VERSION_V0: First version of the V4L2 ISP parameters format
19 * (for compatibility)
20 * @V4L2_ISP_PARAMS_VERSION_V1: First version of the V4L2 ISP parameters format
18 * @V4L2_ISP_VERSION_V0: First version of the V4L2 ISP serialization format
19 * (for compatibility)
20 * @V4L2_ISP_VERSION_V1: First version of the V4L2 ISP serialization format
2121 *
2222 * V0 and V1 are identical in order to support drivers compatible with the V4L2
23 * ISP parameters format already upstreamed which use either 0 or 1 as their
24 * versioning identifier. Both V0 and V1 refers to the first version of the
25 * V4L2 ISP parameters format.
23 * ISP format already upstreamed which use either 0 or 1 as their versioning
24 * identifier. Both V0 and V1 refers to the first version of the V4L2 ISP
25 * serialization format.
2626 *
27 * Future revisions of the V4L2 ISP parameters format should start from the
27 * Future revisions of the V4L2 ISP serialization format should start from the
2828 * value of 2.
2929 */
30enum v4l2_isp_params_version {
31 V4L2_ISP_PARAMS_VERSION_V0 = 0,
32 V4L2_ISP_PARAMS_VERSION_V1
30enum v4l2_isp_version {
31 V4L2_ISP_VERSION_V0 = 0,
32 V4L2_ISP_VERSION_V1
3333};
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
3543#define V4L2_ISP_PARAMS_FL_BLOCK_DISABLE (1U << 0)
3644#define V4L2_ISP_PARAMS_FL_BLOCK_ENABLE (1U << 1)
3745
......@@ -39,64 +47,89 @@ enum v4l2_isp_params_version {
3947 * Reserve the first 8 bits for V4L2_ISP_PARAMS_FL_* flag.
4048 *
4149 * Driver-specific flags should be defined as:
42 * #define DRIVER_SPECIFIC_FLAG0 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(0))
43 * #define DRIVER_SPECIFIC_FLAG1 ((1U << V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(1))
50 * #define DRIVER_SPECIFIC_FLAG0 ((1U << V4L2_ISP_FL_DRIVER_FLAGS(0))
51 * #define DRIVER_SPECIFIC_FLAG1 ((1U << V4L2_ISP_FL_DRIVER_FLAGS(1))
4452 */
45#define V4L2_ISP_PARAMS_FL_DRIVER_FLAGS(n) ((n) + 8)
53#define V4L2_ISP_FL_DRIVER_FLAGS(n) ((n) + 8)
4654
4755/**
48 * struct v4l2_isp_params_block_header - V4L2 extensible parameters block header
49 * @type: The parameters block type (driver-specific)
56 * struct v4l2_isp_block_header - V4L2 extensible block header
57 * @type: The parameters or statistics block type (driver-specific)
5058 * @flags: A bitmask of block flags (driver-specific)
51 * @size: Size (in bytes) of the parameters block, including this header
59 * @size: Size (in bytes) of the block, including this header
5260 *
53 * This structure represents the common part of all the ISP configuration
54 * blocks. Each parameters block shall embed an instance of this structure type
55 * as its first member, followed by the block-specific configuration data.
61 * This structure represents the common part of all the ISP configuration or
62 * statistic blocks. Each block shall embed an instance of this structure type
63 * as its first member, followed by the block-specific configuration or
64 * statistic data.
5665 *
5766 * 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.
5969 *
60 * The @flags field is a bitmask of per-block flags V4L2_PARAMS_ISP_FL_* and
61 * driver-specific flags specified by the driver header.
70 * The @flags field is a bitmask of per-block flags. If a block is used for
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.
6275 */
63struct v4l2_isp_params_block_header {
76struct v4l2_isp_block_header {
6477 __u16 type;
6578 __u16 flags;
6679 __u32 size;
6780} __attribute__((aligned(8)));
6881
6982/**
70 * struct v4l2_isp_params_buffer - V4L2 extensible parameters configuration
71 * @version: The parameters buffer version (driver-specific)
72 * @data_size: The configuration data effective size, excluding this header
73 * @data: The configuration data
83 * v4l2_isp_params_block_header - V4L2 extensible parameters block header
84 *
85 * Compatibility with existing users of v4l2_isp_params_block_header
86 * 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
7495 *
75 * This structure contains the configuration parameters of the ISP algorithms,
76 * serialized by userspace into a data buffer. Each configuration parameter
77 * block is represented by a block-specific structure which contains a
78 * :c:type:`v4l2_isp_params_block_header` entry as first member. Userspace
79 * populates the @data buffer with configuration parameters for the blocks that
80 * it intends to configure. As a consequence, the data buffer effective size
81 * changes according to the number of ISP blocks that userspace intends to
82 * configure and is set by userspace in the @data_size field.
96 * This structure contains ISP configuration parameters or ISP hardware
97 * statistics serialized into a data buffer. Each block is represented by a
98 * block-specific structure which contains a :c:type:`v4l2_isp_block_header`
99 * entry as first member.
83100 *
84 * The parameters buffer is versioned by the @version field to allow modifying
85 * and extending its definition. Userspace shall populate the @version field to
86 * inform the driver about the version it intends to use. The driver will parse
87 * and handle the @data buffer according to the data layout specific to the
88 * indicated version and return an error if the desired version is not
101 * When used for ISP parameters, userspace populates the @data buffer with
102 * configuration parameters for the blocks that it intends to configure. As a
103 * consequence, the data buffer effective size changes according to the number
104 * of ISP blocks that userspace intends to configure.
105 *
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
89114 * supported.
90115 *
91 * For each ISP block that userspace wants to configure, a block-specific
92 * structure is appended to the @data buffer, one after the other without gaps
93 * in between. Userspace shall populate the @data_size field with the effective
94 * size, in bytes, of the @data buffer.
116 * For each ISP block, a block-specific structure is appended to the @data
117 * buffer, one after the other without gaps in between. The writer shall
118 * populate the @data_size field with the effective size, in bytes, of the
119 * @data buffer.
95120 */
96struct v4l2_isp_params_buffer {
121struct v4l2_isp_buffer {
97122 __u32 version;
98123 __u32 data_size;
99124 __u8 data[] __counted_by(data_size);
100125};
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
102135#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 @@
1616 */
1717
1818/* Policies */
19enum {
19enum mempolicy_mode {
2020 MPOL_DEFAULT,
2121 MPOL_PREFERRED,
2222 MPOL_BIND,
lib/libc/include/any-linux-any/linux/netdev.h+1
......@@ -219,6 +219,7 @@ enum {
219219 NETDEV_A_DMABUF_QUEUES,
220220 NETDEV_A_DMABUF_FD,
221221 NETDEV_A_DMABUF_ID,
222 NETDEV_A_DMABUF_RX_PAGE_SIZE,
222223
223224 __NETDEV_A_DMABUF_MAX,
224225 NETDEV_A_DMABUF_MAX = (__NETDEV_A_DMABUF_MAX - 1)
lib/libc/include/any-linux-any/linux/nexthop.h+3
......@@ -83,6 +83,9 @@ enum {
8383 /* u32; read-only; whether any driver collects HW stats */
8484 NHA_HW_STATS_USED,
8585
86 /* be16; UDP destination port for an fdb nexthop (e.g. VXLAN) */
87 NHA_DST_PORT,
88
8689 __NHA_MAX,
8790};
8891
lib/libc/include/any-linux-any/linux/nfs4.h-2
......@@ -17,11 +17,9 @@
1717#include <linux/types.h>
1818
1919#define NFS4_BITMAP_SIZE 3
20#define NFS4_VERIFIER_SIZE 8
2120#define NFS4_STATEID_SEQID_SIZE 4
2221#define NFS4_STATEID_OTHER_SIZE 12
2322#define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)
24#define NFS4_FHSIZE 128
2523#define NFS4_MAXPATHLEN PATH_MAX
2624#define NFS4_MAXNAMLEN NAME_MAX
2725#define NFS4_OPAQUE_LIMIT 1024
lib/libc/include/any-linux-any/linux/nfsd_netlink.h+36
......@@ -225,6 +225,41 @@ enum {
225225 NFSD_A_UNLOCK_EXPORT_MAX = (__NFSD_A_UNLOCK_EXPORT_MAX - 1)
226226};
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
228263enum {
229264 NFSD_CMD_RPC_STATUS_GET = 1,
230265 NFSD_CMD_THREADS_SET,
......@@ -244,6 +279,7 @@ enum {
244279 NFSD_CMD_UNLOCK_IP,
245280 NFSD_CMD_UNLOCK_FILESYSTEM,
246281 NFSD_CMD_UNLOCK_EXPORT,
282 NFSD_CMD_SERVER_STATS_GET,
247283
248284 __NFSD_CMD_MAX,
249285 NFSD_CMD_MAX = (__NFSD_CMD_MAX - 1)
lib/libc/include/any-linux-any/linux/nl80211.h+36-10
......@@ -922,13 +922,15 @@
922922 * and wasn't already in a 4-addr VLAN. The event will be sent similarly
923923 * to the %NL80211_CMD_UNEXPECTED_FRAME event, to the same listener.
924924 *
925 * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface
926 * by sending a null data frame to it and reporting when the frame is
927 * acknowledged. This is used to allow timing out inactive clients. Uses
928 * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a
929 * direct reply with an %NL80211_ATTR_COOKIE that is later used to match
930 * up the event with the request. The event includes the same data and
931 * has %NL80211_ATTR_ACK set if the frame was ACKed.
925 * @NL80211_CMD_PROBE_PEER: Probe a connected peer by sending a null data
926 * frame and reporting when the frame is acknowledged.
927 * In AP/GO mode, %NL80211_ATTR_MAC is required to identify the client.
928 * In STA/P2P-client mode, %NL80211_ATTR_MAC must be omitted (the AP is
929 * implied); the driver must advertise %NL80211_EXT_FEATURE_PROBE_AP.
930 * The command returns a direct reply with an %NL80211_ATTR_COOKIE that
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.
932934 *
933935 * @NL80211_CMD_REGISTER_BEACONS: Register this socket to receive beacons from
934936 * other BSSes when any interfaces are in AP mode. This helps implement
......@@ -1558,7 +1560,7 @@ enum nl80211_commands {
15581560
15591561 NL80211_CMD_UNEXPECTED_FRAME,
15601562
1561 NL80211_CMD_PROBE_CLIENT,
1563 NL80211_CMD_PROBE_PEER,
15621564
15631565 NL80211_CMD_REGISTER_BEACONS,
15641566
......@@ -1729,6 +1731,7 @@ enum nl80211_commands {
17291731#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
17301732#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG
17311733#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE
1734#define NL80211_CMD_PROBE_CLIENT NL80211_CMD_PROBE_PEER
17321735
17331736/**
17341737 * enum nl80211_attrs - nl80211 netlink attributes
......@@ -3165,6 +3168,23 @@ enum nl80211_commands {
31653168 * @NL80211_ATTR_NPCA_PRIMARY_FREQ: NPCA primary channel (u32)
31663169 * @NL80211_ATTR_NPCA_PUNCT_BITMAP: NPCA puncturing bitmap (u32)
31673170 *
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 *
31683188 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
31693189 * @NL80211_ATTR_MAX: highest attribute number currently defined
31703190 * @__NL80211_ATTR_AFTER_LAST: internal use
......@@ -3763,6 +3783,8 @@ enum nl80211_attrs {
37633783 NL80211_ATTR_NPCA_PRIMARY_FREQ,
37643784 NL80211_ATTR_NPCA_PUNCT_BITMAP,
37653785
3786 NL80211_ATTR_STA_DUMP_LINK_STATS,
3787
37663788 /* add attributes here, update the policy in nl80211.c */
37673789
37683790 __NL80211_ATTR_AFTER_LAST,
......@@ -4474,8 +4496,8 @@ enum nl80211_mpath_info {
44744496 * capabilities IE
44754497 * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as
44764498 * defined in HE capabilities IE
4477 * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),
4478 * given for all 6 GHz band channels
4499 * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities,
4500 * given for all 6 GHz band channels (binary, element content)
44794501 * @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are
44804502 * advertised on this band/for this iftype (binary)
44814503 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC: EHT MAC capabilities as in EHT
......@@ -7085,6 +7107,9 @@ enum nl80211_feature_flags {
70857107 * LTF key seed via %NL80211_KEY_LTF_SEED. The seed is used to generate
70867108 * secure LTF keys for secure LTF measurement sessions.
70877109 *
7110 * @NL80211_EXT_FEATURE_PROBE_AP: Driver supports probing the associated AP
7111 * in STA mode using @NL80211_CMD_PROBE_PEER.
7112 *
70887113 * @NUM_NL80211_EXT_FEATURES: number of extended features.
70897114 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
70907115 */
......@@ -7166,6 +7191,7 @@ enum nl80211_ext_feature_index {
71667191 NL80211_EXT_FEATURE_IEEE8021X_AUTH,
71677192 NL80211_EXT_FEATURE_ROC_ADDR_FILTER,
71687193 NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,
7194 NL80211_EXT_FEATURE_PROBE_AP,
71697195
71707196 /* add new features before the definition below */
71717197 NUM_NL80211_EXT_FEATURES,
lib/libc/include/any-linux-any/linux/nsfs.h+4-3
......@@ -90,9 +90,10 @@ enum ns_type {
9090 * struct ns_id_req - namespace ID request structure
9191 * @size: size of this structure
9292 * @spare: reserved for future use
93 * @filter: filter mask
94 * @ns_id: last namespace id
95 * @user_ns_id: owning user namespace ID
93 * @ns_id: last namespace ID
94 * @ns_type: bit mask of namespace types to include
95 * @spare2: reserved for future use
96 * @user_ns_id: filter on this user namespace ID (or 0)
9697 *
9798 * Structure for passing namespace ID and miscellaneous parameters to
9899 * statns(2) and listns(2).
lib/libc/include/any-linux-any/linux/openvswitch.h+26-5
......@@ -244,13 +244,33 @@ enum ovs_vport_cmd {
244244 OVS_VPORT_CMD_SET
245245};
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 */
247264enum ovs_vport_type {
265 /* private: */
248266 OVS_VPORT_TYPE_UNSPEC,
267 /* public: */
249268 OVS_VPORT_TYPE_NETDEV, /* network device */
250269 OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */
251 OVS_VPORT_TYPE_GRE, /* GRE tunnel. */
252 OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */
253 OVS_VPORT_TYPE_GENEVE, /* Geneve tunnel. */
270 OVS_VPORT_TYPE_GRE, /* GRE tunnel (legacy, not supported). */
271 OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel (legacy, not supported). */
272 OVS_VPORT_TYPE_GENEVE, /* Geneve tunnel (legacy, not supported). */
273 /* private: */
254274 __OVS_VPORT_TYPE_MAX
255275};
256276
......@@ -284,7 +304,7 @@ enum ovs_vport_type {
284304 * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is
285305 * optional; if not specified a free port number is automatically selected.
286306 * 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.
288308 *
289309 * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to
290310 * look up the vport to operate on; otherwise dp_idx from the &struct
......@@ -336,7 +356,8 @@ enum {
336356#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.
340361 */
341362enum {
342363 OVS_TUNNEL_ATTR_UNSPEC,
lib/libc/include/any-linux-any/linux/personality.h-1
......@@ -62,7 +62,6 @@ enum {
6262 PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
6363 PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
6464 PER_OSF4 = 0x000f, /* OSF/1 v4 */
65 PER_HPUX = 0x0010,
6665 PER_MASK = 0x00ff,
6766};
6867
lib/libc/include/any-linux-any/linux/psp-sfs.h+2-2
......@@ -12,7 +12,7 @@
1212
1313#include <linux/types.h>
1414
15/**
15/*
1616 * SFS: AMD Seamless Firmware Support (SFS) interface
1717 */
1818
......@@ -43,7 +43,7 @@ struct sfs_user_update_package {
4343 __u32 sfs_extended_status;
4444} __attribute__((packed));
4545
46/**
46/*
4747 * Seamless Firmware Support (SFS) IOC
4848 *
4949 * 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 {
5858/**
5959 * struct vgetrandom_opaque_params - arguments for allocating memory for vgetrandom
6060 *
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().
6262 * @mmap_prot: Value of the prot argument in mmap(2).
6363 * @mmap_flags: Value of the flags argument in mmap(2).
6464 * @reserved: Reserved for future use.
lib/libc/include/any-linux-any/linux/rtnetlink.h+25
......@@ -399,6 +399,7 @@ enum rtattr_type_t {
399399 RTA_DPORT,
400400 RTA_NH_ID,
401401 RTA_FLOWLABEL,
402 RTA_DEL_REASON,
402403 __RTA_MAX
403404};
404405
......@@ -407,6 +408,30 @@ enum rtattr_type_t {
407408#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
408409#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
410435/* RTM_MULTIPATH --- array of struct rtnexthop.
411436 *
412437 * "struct rtnexthop" describes all necessary nexthop information,
lib/libc/include/any-linux-any/linux/sched.h+1-1
......@@ -53,7 +53,7 @@
5353 */
5454#define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
5555
56#ifndef __ASSEMBLY__
56#ifndef __ASSEMBLER__
5757/**
5858 * struct clone_args - arguments for the clone3 syscall
5959 * @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 {
2121 SEG6_IPTUNNEL_UNSPEC,
2222 SEG6_IPTUNNEL_SRH,
2323 SEG6_IPTUNNEL_SRC, /* struct in6_addr */
24 SEG6_IPTUNNEL_TABLE, /* __u32 FIB table for post-encap SID lookup */
2425 __SEG6_IPTUNNEL_MAX,
2526};
2627#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 {
7272#define SERIAL_IO_TSI 5
7373#define SERIAL_IO_MEM32BE 6
7474#define SERIAL_IO_MEM16 7
75#define SERIAL_IO_BUS 8
7576
7677#define UART_CLEAR_FIFO 0x01
7778#define UART_USE_FIFO 0x02
lib/libc/include/any-linux-any/linux/serial_core.h+3
......@@ -100,6 +100,9 @@
100100/* TXX9 type number */
101101#define PORT_TXX9 64
102102
103/* Moxa MUEx50 UART */
104#define PORT_MUEX50 65
105
103106/*Digi jsm */
104107#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 {
3030
3131struct __kernel_old_timespec {
3232 __kernel_old_time_t tv_sec; /* seconds */
33 long tv_nsec; /* nanoseconds */
33 __kernel_long_t tv_nsec; /* nanoseconds */
3434};
3535
3636struct __kernel_old_itimerval {
lib/libc/include/any-linux-any/linux/types.h+2-2
......@@ -4,7 +4,7 @@
44
55#include <asm/types.h>
66
7#ifndef __ASSEMBLY__
7#ifndef __ASSEMBLER__
88
99#include <linux/posix_types.h>
1010
......@@ -54,5 +54,5 @@ typedef __u32 __bitwise __wsum;
5454
5555typedef unsigned __bitwise __poll_t;
5656
57#endif /* __ASSEMBLY__ */
57#endif /* __ASSEMBLER__ */
5858#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 {
417417 */
418418#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
420423/* device state */
421424#define UBLK_S_DEV_DEAD 0
422425#define UBLK_S_DEV_LIVE 1
......@@ -452,7 +455,7 @@ struct ublksrv_ctrl_dev_info {
452455 __u16 nr_hw_queues;
453456 __u16 queue_depth;
454457 __u16 state;
455 __u16 pad0;
458 __u16 io_desc_size;
456459
457460 __u32 max_io_buf_bytes;
458461 __u32 dev_id;
lib/libc/include/any-linux-any/linux/usb/functionfs.h+24
......@@ -25,6 +25,7 @@ enum functionfs_flags {
2525 FUNCTIONFS_EVENTFD = 32,
2626 FUNCTIONFS_ALL_CTRL_RECIP = 64,
2727 FUNCTIONFS_CONFIG0_SETUP = 128,
28 FUNCTIONFS_RW_PROXY_EPS = 256,
2829};
2930
3031/* Descriptor of an non-audio endpoint */
......@@ -412,4 +413,27 @@ struct usb_functionfs_event {
412413#define FUNCTIONFS_DMABUF_TRANSFER _IOW('g', 133, \
413414 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
415439#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 @@
2525#define UFFD_API ((__u64)0xAA)
2626#define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | \
2727 UFFDIO_REGISTER_MODE_WP | \
28 UFFDIO_REGISTER_MODE_MINOR)
28 UFFDIO_REGISTER_MODE_MINOR | \
29 UFFDIO_REGISTER_MODE_RWP)
2930#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \
3031 UFFD_FEATURE_EVENT_FORK | \
3132 UFFD_FEATURE_EVENT_REMAP | \
......@@ -42,10 +43,13 @@
4243 UFFD_FEATURE_WP_UNPOPULATED | \
4344 UFFD_FEATURE_POISON | \
4445 UFFD_FEATURE_WP_ASYNC | \
45 UFFD_FEATURE_MOVE)
46 UFFD_FEATURE_MOVE | \
47 UFFD_FEATURE_RWP | \
48 UFFD_FEATURE_RWP_ASYNC)
4649#define UFFD_API_IOCTLS \
4750 ((__u64)1 << _UFFDIO_REGISTER | \
4851 (__u64)1 << _UFFDIO_UNREGISTER | \
52 (__u64)1 << _UFFDIO_SET_MODE | \
4953 (__u64)1 << _UFFDIO_API)
5054#define UFFD_API_RANGE_IOCTLS \
5155 ((__u64)1 << _UFFDIO_WAKE | \
......@@ -54,13 +58,15 @@
5458 (__u64)1 << _UFFDIO_MOVE | \
5559 (__u64)1 << _UFFDIO_WRITEPROTECT | \
5660 (__u64)1 << _UFFDIO_CONTINUE | \
57 (__u64)1 << _UFFDIO_POISON)
61 (__u64)1 << _UFFDIO_POISON | \
62 (__u64)1 << _UFFDIO_RWPROTECT)
5863#define UFFD_API_RANGE_IOCTLS_BASIC \
5964 ((__u64)1 << _UFFDIO_WAKE | \
6065 (__u64)1 << _UFFDIO_COPY | \
6166 (__u64)1 << _UFFDIO_WRITEPROTECT | \
6267 (__u64)1 << _UFFDIO_CONTINUE | \
63 (__u64)1 << _UFFDIO_POISON)
68 (__u64)1 << _UFFDIO_POISON | \
69 (__u64)1 << _UFFDIO_RWPROTECT)
6470
6571/*
6672 * Valid ioctl command number range with this API is from 0x00 to
......@@ -79,6 +85,8 @@
7985#define _UFFDIO_WRITEPROTECT (0x06)
8086#define _UFFDIO_CONTINUE (0x07)
8187#define _UFFDIO_POISON (0x08)
88#define _UFFDIO_RWPROTECT (0x09)
89#define _UFFDIO_SET_MODE (0x0A)
8290#define _UFFDIO_API (0x3F)
8391
8492/* userfaultfd ioctl ids */
......@@ -103,6 +111,10 @@
103111 struct uffdio_continue)
104112#define UFFDIO_POISON _IOWR(UFFDIO, _UFFDIO_POISON, \
105113 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
107119/* read() structure */
108120struct uffd_msg {
......@@ -158,6 +170,7 @@ struct uffd_msg {
158170#define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */
159171#define UFFD_PAGEFAULT_FLAG_WP (1<<1) /* If reason is VM_UFFD_WP */
160172#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
162175struct uffdio_api {
163176 /* userland asks for an API number and the features to enable */
......@@ -230,6 +243,18 @@ struct uffdio_api {
230243 *
231244 * UFFD_FEATURE_MOVE indicates that the kernel supports moving an
232245 * 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.
233258 */
234259#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)
235260#define UFFD_FEATURE_EVENT_FORK (1<<1)
......@@ -248,6 +273,8 @@ struct uffdio_api {
248273#define UFFD_FEATURE_POISON (1<<14)
249274#define UFFD_FEATURE_WP_ASYNC (1<<15)
250275#define UFFD_FEATURE_MOVE (1<<16)
276#define UFFD_FEATURE_RWP (1<<17)
277#define UFFD_FEATURE_RWP_ASYNC (1<<18)
251278 __u64 features;
252279
253280 __u64 ioctls;
......@@ -263,6 +290,7 @@ struct uffdio_register {
263290#define UFFDIO_REGISTER_MODE_MISSING ((__u64)1<<0)
264291#define UFFDIO_REGISTER_MODE_WP ((__u64)1<<1)
265292#define UFFDIO_REGISTER_MODE_MINOR ((__u64)1<<2)
293#define UFFDIO_REGISTER_MODE_RWP ((__u64)1<<3)
266294 __u64 mode;
267295
268296 /*
......@@ -356,6 +384,14 @@ struct uffdio_poison {
356384 __s64 updated;
357385};
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
359395struct uffdio_move {
360396 __u64 dst;
361397 __u64 src;
......@@ -374,6 +410,16 @@ struct uffdio_move {
374410 __s64 move;
375411};
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
377423/*
378424 * Flags for the userfaultfd(2) system call itself.
379425 */
lib/libc/include/any-linux-any/linux/vduse.h+28
......@@ -14,6 +14,12 @@
1414
1515#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
1723/*
1824 * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).
1925 * This is used for future extension.
......@@ -63,6 +69,12 @@ struct vduse_dev_config {
6369 */
6470#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
6678/* The ioctls for VDUSE device (/dev/vduse/$NAME) */
6779
6880/**
......@@ -325,6 +337,8 @@ enum vduse_req_type {
325337 VDUSE_SET_STATUS,
326338 VDUSE_UPDATE_IOTLB,
327339 VDUSE_SET_VQ_GROUP_ASID,
340 VDUSE_SET_VQ_READY,
341 VDUSE_SUSPEND,
328342};
329343
330344/**
......@@ -372,6 +386,15 @@ struct vduse_iova_range_v2 {
372386 __u32 padding;
373387};
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
375398/**
376399 * struct vduse_dev_request - control request
377400 * @type: request type
......@@ -382,6 +405,7 @@ struct vduse_iova_range_v2 {
382405 * @iova: IOVA range for updating
383406 * @iova_v2: IOVA range for updating if API_VERSION >= 1
384407 * @vq_group_asid: ASID of a virtqueue group
408 * @vq_ready: Virtqueue ready request
385409 * @padding: padding
386410 *
387411 * Structure used by read(2) on /dev/vduse/$NAME.
......@@ -399,6 +423,10 @@ struct vduse_dev_request {
399423 */
400424 struct vduse_iova_range_v2 iova_v2;
401425 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
402430 __u32 padding[32];
403431 };
404432};
lib/libc/include/any-linux-any/linux/version.h+2-2
......@@ -1,5 +1,5 @@
1#define LINUX_VERSION_CODE 459264
1#define LINUX_VERSION_CODE 459520
22#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
33#define LINUX_VERSION_MAJOR 7
4#define LINUX_VERSION_PATCHLEVEL 2
4#define LINUX_VERSION_PATCHLEVEL 3
55#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 {
15341534 */
15351535#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
15371558/* -------- API for Type1 VFIO IOMMU -------- */
15381559
15391560/**
lib/libc/include/any-linux-any/linux/vfio_zdev.h+2
......@@ -32,6 +32,8 @@ struct vfio_device_info_cap_zpci_base {
3232 /* End of version 1 */
3333 __u32 fh; /* PCI function handle */
3434 /* End of version 2 */
35 __u32 ccdf_err_length; /* PCI CCDF length */
36 /* End of version 3 */
3537};
3638
3739/**
lib/libc/include/any-linux-any/linux/videodev2.h+4
......@@ -862,6 +862,10 @@ struct v4l2_pix_format {
862862#define V4L2_META_FMT_MALI_C55_PARAMS v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */
863863#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
866870/* priv field value to indicates that subsequent fields are valid. */
867871#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
lib/libc/include/any-linux-any/linux/virtio_ids.h+1
......@@ -69,6 +69,7 @@
6969#define VIRTIO_ID_BT 40 /* virtio bluetooth */
7070#define VIRTIO_ID_GPIO 41 /* virtio gpio */
7171#define VIRTIO_ID_SPI 45 /* virtio spi */
72#define VIRTIO_ID_MEDIA 48 /* virtio media */
7273
7374/*
7475 * Virtio Transitional IDs
lib/libc/include/any-linux-any/misc/amd-apml.h+23
......@@ -73,6 +73,13 @@ struct apml_reg_xfer_msg {
7373 __u8 rflag;
7474};
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
7683/*
7784 * AMD sideband interface base IOCTL
7885 */
......@@ -149,4 +156,20 @@ struct apml_reg_xfer_msg {
149156 */
150157#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
152175#endif /*_AMD_APML_H_*/
\ No newline at end of file
lib/libc/include/any-linux-any/misc/fastrpc.h+29
......@@ -16,6 +16,7 @@
1616#define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)
1717#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
1818#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)
1920#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
2021
2122/**
......@@ -67,6 +68,28 @@ enum fastrpc_proc_attr {
6768/* Fastrpc attribute for memory protection of buffers */
6869#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
7093struct fastrpc_invoke_args {
7194 __u64 ptr;
7295 __u64 length;
......@@ -133,6 +156,12 @@ struct fastrpc_mem_unmap {
133156 __s32 reserved[5];
134157};
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
136165struct fastrpc_ioctl_capability {
137166 __u32 unused; /* deprecated, ignored by the kernel */
138167 __u32 attribute_id;
lib/libc/include/any-linux-any/mtd/ubi-user.h+9-1
......@@ -289,6 +289,13 @@ enum {
289289 * If @disable_fm is not zero, ubi doesn't create new fastmap even the module
290290 * param 'fm_autoconvert' is set, and existed old fastmap will be destroyed
291291 * 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.
292299 */
293300struct ubi_attach_req {
294301 __s32 ubi_num;
......@@ -297,7 +304,8 @@ struct ubi_attach_req {
297304 __s16 max_beb_per1024;
298305 __s8 disable_fm;
299306 __s8 need_resv_pool;
300 __s8 padding[8];
307 __s32 wl_threshold;
308 __s8 padding[4];
301309};
302310
303311/*
lib/libc/include/any-linux-any/rdma/bnxt_re-abi.h+4-1
......@@ -57,6 +57,7 @@ enum {
5757 BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,
5858 BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,
5959 BNXT_RE_UCNTX_CMASK_QP_RATE_LIMIT_ENABLED = 0x80ULL,
60 BNXT_RE_UCNTX_CMASK_TOGGLE_MEM_UOBJ_SUPPORT = 0x400000ULL,
6061};
6162
6263enum bnxt_re_wqe_mode {
......@@ -218,6 +219,8 @@ enum bnxt_re_var_toggle_mem_attrs {
218219 BNXT_RE_TOGGLE_MEM_MMAP_PAGE,
219220 BNXT_RE_TOGGLE_MEM_MMAP_OFFSET,
220221 BNXT_RE_TOGGLE_MEM_MMAP_LENGTH,
222 BNXT_RE_TOGGLE_MEM_CQ_HANDLE,
223 BNXT_RE_TOGGLE_MEM_SRQ_HANDLE,
221224};
222225
223226enum bnxt_re_toggle_mem_attrs {
......@@ -247,7 +250,7 @@ struct bnxt_re_query_device_ex_resp {
247250struct bnxt_re_db_region {
248251 __u32 dpi;
249252 __u32 reserved;
250 __aligned_u64 umdbr;
253 __aligned_u64 reserved2;
251254};
252255
253256enum 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 {
5656
5757enum {
5858 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,
6061};
6162
6263struct efa_ibv_create_cq {
......@@ -88,6 +89,7 @@ enum {
8889
8990enum {
9091 EFA_CREATE_QP_WITH_UNSOLICITED_WRITE_RECV = 1 << 0,
92 EFA_CREATE_QP_WITH_SQ_64_BIT_REQ_ID = 1 << 1,
9193};
9294
9395struct efa_ibv_create_qp {
......@@ -133,6 +135,8 @@ enum {
133135 EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
134136 EFA_QUERY_DEVICE_CAPS_UNSOLICITED_WRITE_RECV = 1 << 6,
135137 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,
136140};
137141
138142struct efa_ibv_ex_query_device_resp {
......@@ -163,4 +167,9 @@ enum efa_mr_methods {
163167 EFA_IB_METHOD_MR_QUERY = (1U << UVERBS_ID_NS_SHIFT),
164168};
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
166175#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 {
5757 UVERBS_OBJECT_ASYNC_EVENT,
5858 UVERBS_OBJECT_DMAH,
5959 UVERBS_OBJECT_DMABUF,
60 UVERBS_OBJECT_COMP_CNTR,
6061};
6162
6263enum {
......@@ -75,6 +76,7 @@ enum uverbs_methods_device {
7576 UVERBS_METHOD_QUERY_GID_TABLE,
7677 UVERBS_METHOD_QUERY_GID_ENTRY,
7778 UVERBS_METHOD_QUERY_PORT_SPEED,
79 UVERBS_METHOD_QUERY_COMP_CNTR_CAPS,
7880};
7981
8082enum uverbs_attrs_invoke_write_cmd_attr_ids {
......@@ -93,6 +95,12 @@ enum uverbs_attrs_query_port_speed_cmd_attr_ids {
9395 UVERBS_ATTR_QUERY_PORT_SPEED_RESP,
9496};
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
96104enum uverbs_attrs_get_context_attr_ids {
97105 UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,
98106 UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,
......@@ -169,9 +177,16 @@ enum uverbs_attrs_destroy_qp_cmd_attr_ids {
169177 UVERBS_ATTR_DESTROY_QP_RESP,
170178};
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
172186enum uverbs_methods_qp {
173187 UVERBS_METHOD_QP_CREATE,
174188 UVERBS_METHOD_QP_DESTROY,
189 UVERBS_METHOD_QP_ATTACH_COMP_CNTR,
175190};
176191
177192enum uverbs_attrs_create_srq_cmd_attr_ids {
......@@ -189,6 +204,7 @@ enum uverbs_attrs_create_srq_cmd_attr_ids {
189204 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_WR,
190205 UVERBS_ATTR_CREATE_SRQ_RESP_MAX_SGE,
191206 UVERBS_ATTR_CREATE_SRQ_RESP_SRQ_NUM,
207 UVERBS_ATTR_CREATE_SRQ_BUF_UMEM,
192208};
193209
194210enum uverbs_attrs_destroy_srq_cmd_attr_ids {
......@@ -438,4 +454,32 @@ enum uverbs_attrs_query_gid_entry_cmd_attr_ids {
438454 UVERBS_ATTR_QUERY_GID_ENTRY_RESP_ENTRY,
439455};
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
441485#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 {
300300 __aligned_u64 length;
301301};
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
303322#endif
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ib_user_mad.h+48-47
......@@ -51,24 +51,24 @@
5151 */
5252
5353/**
54 * 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 with
56 * @status - 0 on successful receive, ETIMEDOUT if no response
54 * 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 with
56 * @status: 0 on successful receive, ETIMEDOUT if no response
5757 * received (transaction ID in data[] will be set to TID of original
5858 * request) (ignored on send)
59 * @timeout_ms - Milliseconds to wait for response (unset on receive)
60 * @retries - Number of automatic retries to attempt
61 * @qpn - Remote QP number received from/to be sent to
62 * @qkey - Remote Q_Key to be sent with (unset on receive)
63 * @lid - Remote lid received from/to be sent to
64 * @sl - Service level received with/to be sent with
65 * @path_bits - Local path bits received with/to be sent with
66 * @grh_present - If set, GRH was received/should be sent
67 * @gid_index - Local GID index to send with (unset on receive)
68 * @hop_limit - Hop limit in GRH
69 * @traffic_class - Traffic class in GRH
70 * @gid - Remote GID in GRH
71 * @flow_label - Flow label in GRH
59 * @timeout_ms: Milliseconds to wait for response (unset on receive)
60 * @retries: Number of automatic retries to attempt
61 * @qpn: Remote QP number received from/to be sent to
62 * @qkey: Remote Q_Key to be sent with (unset on receive)
63 * @lid: Remote lid received from/to be sent to
64 * @sl: Service level received with/to be sent with
65 * @path_bits: Local path bits received with/to be sent with
66 * @grh_present: If set, GRH was received/should be sent
67 * @gid_index: Local GID index to send with (unset on receive)
68 * @hop_limit: Hop limit in GRH
69 * @traffic_class: Traffic class in GRH
70 * @gid: Remote GID in GRH
71 * @flow_label: Flow label in GRH
7272 */
7373struct ib_user_mad_hdr_old {
7474 __u32 id;
......@@ -90,29 +90,29 @@ struct ib_user_mad_hdr_old {
9090};
9191
9292/**
93 * ib_user_mad_hdr - MAD packet header
93 * struct ib_user_mad_hdr - MAD packet header
9494 * This layout allows specifying/receiving the P_Key index. To use
9595 * this capability, an application must call the
9696 * IB_USER_MAD_ENABLE_PKEY ioctl on the user MAD file handle before
9797 * any other actions with the file handle.
98 * @id - ID of agent MAD received with/to be sent with
99 * @status - 0 on successful receive, ETIMEDOUT if no response
98 * @id: ID of agent MAD received with/to be sent with
99 * @status: 0 on successful receive, ETIMEDOUT if no response
100100 * received (transaction ID in data[] will be set to TID of original
101101 * request) (ignored on send)
102 * @timeout_ms - Milliseconds to wait for response (unset on receive)
103 * @retries - Number of automatic retries to attempt
104 * @qpn - Remote QP number received from/to be sent to
105 * @qkey - Remote Q_Key to be sent with (unset on receive)
106 * @lid - Remote lid received from/to be sent to
107 * @sl - Service level received with/to be sent with
108 * @path_bits - Local path bits received with/to be sent with
109 * @grh_present - If set, GRH was received/should be sent
110 * @gid_index - Local GID index to send with (unset on receive)
111 * @hop_limit - Hop limit in GRH
112 * @traffic_class - Traffic class in GRH
113 * @gid - Remote GID in GRH
114 * @flow_label - Flow label in GRH
115 * @pkey_index - P_Key index
102 * @timeout_ms: Milliseconds to wait for response (unset on receive)
103 * @retries: Number of automatic retries to attempt
104 * @qpn: Remote QP number received from/to be sent to
105 * @qkey: Remote Q_Key to be sent with (unset on receive)
106 * @lid: Remote lid received from/to be sent to
107 * @sl: Service level received with/to be sent with
108 * @path_bits: Local path bits received with/to be sent with
109 * @grh_present: If set, GRH was received/should be sent
110 * @gid_index: Local GID index to send with (unset on receive)
111 * @hop_limit: Hop limit in GRH
112 * @traffic_class: Traffic class in GRH
113 * @gid: Remote GID in GRH
114 * @flow_label: Flow label in GRH
115 * @pkey_index: P_Key index
116116 */
117117struct ib_user_mad_hdr {
118118 __u32 id;
......@@ -136,9 +136,9 @@ struct ib_user_mad_hdr {
136136};
137137
138138/**
139 * ib_user_mad - MAD packet
140 * @hdr - MAD packet header
141 * @data - Contents of MAD
139 * struct ib_user_mad - MAD packet
140 * @hdr: MAD packet header
141 * @data: Contents of MAD
142142 *
143143 */
144144struct ib_user_mad {
......@@ -167,15 +167,15 @@ typedef unsigned long __attribute__((aligned(4))) packed_ulong;
167167#define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long)))
168168
169169/**
170 * ib_user_mad_reg_req - MAD registration request
171 * @id - Set by the kernel; used to identify agent in future requests.
172 * @qpn - Queue pair number; must be 0 or 1.
173 * @method_mask - The caller will receive unsolicited MADs for any method
170 * struct ib_user_mad_reg_req - MAD registration request
171 * @id: Set by the kernel; used to identify agent in future requests.
172 * @qpn: Queue pair number; must be 0 or 1.
173 * @method_mask: The caller will receive unsolicited MADs for any method
174174 * where @method_mask = 1.
175 * @mgmt_class - Indicates which management class of MADs should be receive
175 * @mgmt_class: Indicates which management class of MADs should be receive
176176 * by the caller. This field is only required if the user wishes to
177177 * receive unsolicited MADs, otherwise it should be 0.
178 * @mgmt_class_version - Indicates which version of MADs for the given
178 * @mgmt_class_version: Indicates which version of MADs for the given
179179 * management class to receive.
180180 * @oui: Indicates IEEE OUI when mgmt_class is a vendor class
181181 * in the range from 0x30 to 0x4f. Otherwise not used.
......@@ -193,7 +193,7 @@ struct ib_user_mad_reg_req {
193193};
194194
195195/**
196 * ib_user_mad_reg_req2 - MAD registration request
196 * struct ib_user_mad_reg_req2 - MAD registration request
197197 *
198198 * @id - Set by the _kernel_; used by userspace to identify the
199199 * registered agent in future requests.
......@@ -214,10 +214,6 @@ struct ib_user_mad_reg_req {
214214 * used.
215215 * @rmpp_version - If set, indicates the RMPP version to use.
216216 */
217enum {
218 IB_USER_MAD_USER_RMPP = (1 << 0),
219};
220#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
221217struct ib_user_mad_reg_req2 {
222218 __u32 id;
223219 __u32 qpn;
......@@ -231,4 +227,9 @@ struct ib_user_mad_reg_req2 {
231227 __u8 reserved[3];
232228};
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
234235#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 {
13791379 IB_UVERBS_RAW_PACKET_CAP_DELAY_DROP = 1 << 3,
13801380};
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
13821415#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 {
4848 __u8 expdb_qtypes;
4949
5050 __u8 rsvd2[3];
51 __aligned_u64 phc_offset;
5152};
5253
5354struct ionic_qdesc {
lib/libc/include/any-linux-any/rdma/irdma-abi.h+1
......@@ -88,6 +88,7 @@ struct irdma_create_srq_resp {
8888struct irdma_create_qp_req {
8989 __aligned_u64 user_wqe_bufs;
9090 __aligned_u64 user_compl_ctx;
91 __aligned_u64 legacy_dontuse[2];
9192};
9293
9394struct 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 {
2525
2626struct mana_ib_create_cq {
2727 __aligned_u64 buf_addr;
28 __u16 flags;
28 __u16 comp_mask;
2929 __u16 reserved0;
3030 __u32 reserved1;
3131};
......@@ -57,6 +57,17 @@ struct mana_ib_create_rc_qp_resp {
5757 __u32 queue_id[4];
5858};
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
6071struct mana_ib_create_wq {
6172 __aligned_u64 wq_buf_addr;
6273 __u32 wq_buf_size;
......@@ -87,4 +98,26 @@ struct mana_ib_create_qp_rss_resp {
8798 struct rss_resp_entry entries[64];
8899};
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
90123#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 {
472472 __u32 reserved;
473473};
474474
475struct mlx5_ib_clock_info {
476 __u32 sign;
477 __u32 resv;
478 __aligned_u64 nsec;
479 __aligned_u64 cycles;
480 __aligned_u64 frac;
481 __u32 mult;
482 __u32 shift;
483 __aligned_u64 mask;
484 __aligned_u64 overflow_period;
485};
475/*
476 * deprecated, see struct ib_uverbs_clock_info from ib_user_verbs.h
477 */
478#define mlx5_ib_clock_info ib_uverbs_clock_info
486479
487480enum mlx5_ib_mmap_cmd {
488481 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 {
281281 MLX5_IB_ATTR_CREATE_QP_DBR_BUF_UMEM = UVERBS_ID_DRIVER_NS_WITH_UHW,
282282};
283283
284enum mlx5_ib_create_srq_attrs {
285 MLX5_IB_ATTR_CREATE_SRQ_DBR_BUF_UMEM = UVERBS_ID_DRIVER_NS_WITH_UHW,
286};
287
284288enum mlx5_ib_reg_dmabuf_mr_attrs {
285289 MLX5_IB_ATTR_REG_DMABUF_MR_ACCESS_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
286290};
lib/libc/include/any-linux-any/rdma/rdma_netlink.h+9-1
......@@ -516,7 +516,10 @@ enum rdma_nldev_attr {
516516 RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */
517517
518518 /*
519 * File descriptor handle of the net namespace object
519 * 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.
520523 */
521524 RDMA_NLDEV_NET_NS_FD, /* u32 */
522525 /*
......@@ -604,6 +607,11 @@ enum rdma_nldev_attr {
604607 RDMA_NLDEV_ATTR_FRMR_POOL_PINNED_HANDLES, /* u32 */
605608 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
607615 /*
608616 * Always the end
609617 */
lib/libc/include/any-linux-any/sound/asequencer.h+4-14
......@@ -308,16 +308,6 @@ struct snd_seq_ump_event {
308308 };
309309};
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
321311 /* system information */
322312struct snd_seq_system_info {
323313 int queues; /* maximum queues count */
......@@ -348,10 +338,10 @@ struct snd_seq_running_info {
348338
349339
350340 /* client types */
351typedef int __bitwise snd_seq_client_type_t;
352#define NO_CLIENT ((snd_seq_client_type_t) 0)
353#define USER_CLIENT ((snd_seq_client_type_t) 1)
354#define KERNEL_CLIENT ((snd_seq_client_type_t) 2)
341typedef int snd_seq_client_type_t;
342#define NO_CLIENT 0
343#define USER_CLIENT 1
344#define KERNEL_CLIENT 2
355345
356346 /* event filter flags */
357347#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 {
167167 SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
168168};
169169
170typedef int __bitwise snd_pcm_access_t;
171#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((snd_pcm_access_t) 0) /* interleaved mmap */
172#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((snd_pcm_access_t) 1) /* noninterleaved mmap */
173#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t) 2) /* complex mmap */
174#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((snd_pcm_access_t) 3) /* readi/writei */
175#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((snd_pcm_access_t) 4) /* readn/writen */
170typedef int snd_pcm_access_t;
171#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED 0 /* interleaved mmap */
172#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED 1 /* noninterleaved mmap */
173#define SNDRV_PCM_ACCESS_MMAP_COMPLEX 2 /* complex mmap */
174#define SNDRV_PCM_ACCESS_RW_INTERLEAVED 3 /* readi/writei */
175#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED 4 /* readn/writen */
176176#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
177177
178typedef int __bitwise snd_pcm_format_t;
179#define SNDRV_PCM_FORMAT_S8 ((snd_pcm_format_t) 0)
180#define SNDRV_PCM_FORMAT_U8 ((snd_pcm_format_t) 1)
181#define SNDRV_PCM_FORMAT_S16_LE ((snd_pcm_format_t) 2)
182#define SNDRV_PCM_FORMAT_S16_BE ((snd_pcm_format_t) 3)
183#define SNDRV_PCM_FORMAT_U16_LE ((snd_pcm_format_t) 4)
184#define SNDRV_PCM_FORMAT_U16_BE ((snd_pcm_format_t) 5)
185#define SNDRV_PCM_FORMAT_S24_LE ((snd_pcm_format_t) 6) /* low three bytes */
186#define SNDRV_PCM_FORMAT_S24_BE ((snd_pcm_format_t) 7) /* low three bytes */
187#define SNDRV_PCM_FORMAT_U24_LE ((snd_pcm_format_t) 8) /* low three bytes */
188#define SNDRV_PCM_FORMAT_U24_BE ((snd_pcm_format_t) 9) /* low three bytes */
178typedef int snd_pcm_format_t;
179#define SNDRV_PCM_FORMAT_S8 0
180#define SNDRV_PCM_FORMAT_U8 1
181#define SNDRV_PCM_FORMAT_S16_LE 2
182#define SNDRV_PCM_FORMAT_S16_BE 3
183#define SNDRV_PCM_FORMAT_U16_LE 4
184#define SNDRV_PCM_FORMAT_U16_BE 5
185#define SNDRV_PCM_FORMAT_S24_LE 6 /* low three bytes */
186#define SNDRV_PCM_FORMAT_S24_BE 7 /* low three bytes */
187#define SNDRV_PCM_FORMAT_U24_LE 8 /* low three bytes */
188#define SNDRV_PCM_FORMAT_U24_BE 9 /* low three bytes */
189189/*
190190 * For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the
191191 * available bit count in most significant bit. It's for the case of so-called 'left-justified' or
192192 * `right-padding` sample which has less width than 32 bit.
193193 */
194#define SNDRV_PCM_FORMAT_S32_LE ((snd_pcm_format_t) 10)
195#define SNDRV_PCM_FORMAT_S32_BE ((snd_pcm_format_t) 11)
196#define SNDRV_PCM_FORMAT_U32_LE ((snd_pcm_format_t) 12)
197#define SNDRV_PCM_FORMAT_U32_BE ((snd_pcm_format_t) 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 */
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 */
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 */
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 */
202#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */
203#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */
204#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t) 20)
205#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t) 21)
206#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t) 22)
207#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t) 23)
208#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t) 24)
209#define SNDRV_PCM_FORMAT_S20_LE ((snd_pcm_format_t) 25) /* in four bytes, LSB justified */
210#define SNDRV_PCM_FORMAT_S20_BE ((snd_pcm_format_t) 26) /* in four bytes, LSB justified */
211#define SNDRV_PCM_FORMAT_U20_LE ((snd_pcm_format_t) 27) /* in four bytes, LSB justified */
212#define SNDRV_PCM_FORMAT_U20_BE ((snd_pcm_format_t) 28) /* in four bytes, LSB justified */
194#define SNDRV_PCM_FORMAT_S32_LE 10
195#define SNDRV_PCM_FORMAT_S32_BE 11
196#define SNDRV_PCM_FORMAT_U32_LE 12
197#define SNDRV_PCM_FORMAT_U32_BE 13
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 15 /* 4-byte float, IEEE-754 32-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 17 /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
202#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE 18 /* IEC-958 subframe, Little Endian */
203#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE 19 /* IEC-958 subframe, Big Endian */
204#define SNDRV_PCM_FORMAT_MU_LAW 20
205#define SNDRV_PCM_FORMAT_A_LAW 21
206#define SNDRV_PCM_FORMAT_IMA_ADPCM 22
207#define SNDRV_PCM_FORMAT_MPEG 23
208#define SNDRV_PCM_FORMAT_GSM 24
209#define SNDRV_PCM_FORMAT_S20_LE 25 /* 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 27 /* in four bytes, LSB justified */
212#define SNDRV_PCM_FORMAT_U20_BE 28 /* in four bytes, LSB justified */
213213/* gap in the numbering for a future standard linear format */
214#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t) 31)
215#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t) 32) /* in three bytes */
216#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t) 33) /* in three bytes */
217#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t) 34) /* in three bytes */
218#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t) 35) /* in three bytes */
219#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t) 36) /* in three bytes */
220#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t) 37) /* in three bytes */
221#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t) 38) /* in three bytes */
222#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t) 39) /* in three bytes */
223#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t) 40) /* in three bytes */
224#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t) 41) /* in three bytes */
225#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t) 42) /* in three bytes */
226#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t) 43) /* in three bytes */
227#define SNDRV_PCM_FORMAT_G723_24 ((snd_pcm_format_t) 44) /* 8 samples in 3 bytes */
228#define SNDRV_PCM_FORMAT_G723_24_1B ((snd_pcm_format_t) 45) /* 1 sample in 1 byte */
229#define SNDRV_PCM_FORMAT_G723_40 ((snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */
230#define SNDRV_PCM_FORMAT_G723_40_1B ((snd_pcm_format_t) 47) /* 1 sample in 1 byte */
231#define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_format_t) 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 */
233#define SNDRV_PCM_FORMAT_DSD_U32_LE ((snd_pcm_format_t) 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 */
235#define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */
214#define SNDRV_PCM_FORMAT_SPECIAL 31
215#define SNDRV_PCM_FORMAT_S24_3LE 32 /* in three bytes */
216#define SNDRV_PCM_FORMAT_S24_3BE 33 /* in three bytes */
217#define SNDRV_PCM_FORMAT_U24_3LE 34 /* in three bytes */
218#define SNDRV_PCM_FORMAT_U24_3BE 35 /* in three bytes */
219#define SNDRV_PCM_FORMAT_S20_3LE 36 /* in three bytes */
220#define SNDRV_PCM_FORMAT_S20_3BE 37 /* in three bytes */
221#define SNDRV_PCM_FORMAT_U20_3LE 38 /* in three bytes */
222#define SNDRV_PCM_FORMAT_U20_3BE 39 /* in three bytes */
223#define SNDRV_PCM_FORMAT_S18_3LE 40 /* in three bytes */
224#define SNDRV_PCM_FORMAT_S18_3BE 41 /* in three bytes */
225#define SNDRV_PCM_FORMAT_U18_3LE 42 /* in three bytes */
226#define SNDRV_PCM_FORMAT_U18_3BE 43 /* in three bytes */
227#define SNDRV_PCM_FORMAT_G723_24 44 /* 8 samples in 3 bytes */
228#define SNDRV_PCM_FORMAT_G723_24_1B 45 /* 1 sample in 1 byte */
229#define SNDRV_PCM_FORMAT_G723_40 46 /* 8 Samples in 5 bytes */
230#define SNDRV_PCM_FORMAT_G723_40_1B 47 /* 1 sample in 1 byte */
231#define SNDRV_PCM_FORMAT_DSD_U8 48 /* DSD, 1-byte samples DSD (x8) */
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 50 /* DSD, 4-byte samples DSD (x32), little 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 52 /* DSD, 4-byte samples DSD (x32), big endian */
236236#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
237237#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
238238
......@@ -263,11 +263,11 @@ typedef int __bitwise snd_pcm_format_t;
263263#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE
264264#endif
265265
266typedef int __bitwise snd_pcm_subformat_t;
267#define SNDRV_PCM_SUBFORMAT_STD ((snd_pcm_subformat_t) 0)
268#define SNDRV_PCM_SUBFORMAT_MSBITS_MAX ((snd_pcm_subformat_t) 1)
269#define SNDRV_PCM_SUBFORMAT_MSBITS_20 ((snd_pcm_subformat_t) 2)
270#define SNDRV_PCM_SUBFORMAT_MSBITS_24 ((snd_pcm_subformat_t) 3)
266typedef int snd_pcm_subformat_t;
267#define SNDRV_PCM_SUBFORMAT_STD 0
268#define SNDRV_PCM_SUBFORMAT_MSBITS_MAX 1
269#define SNDRV_PCM_SUBFORMAT_MSBITS_20 2
270#define SNDRV_PCM_SUBFORMAT_MSBITS_24 3
271271#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_MSBITS_24
272272
273273#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */
......@@ -301,16 +301,16 @@ typedef int __bitwise snd_pcm_subformat_t;
301301#define __SND_STRUCT_TIME64
302302#endif
303303
304typedef int __bitwise snd_pcm_state_t;
305#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t) 0) /* stream is open */
306#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t) 1) /* stream has a setup */
307#define SNDRV_PCM_STATE_PREPARED ((snd_pcm_state_t) 2) /* stream is ready to start */
308#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t) 3) /* stream is running */
309#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t) 4) /* stream reached an xrun */
310#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t) 5) /* stream is draining */
311#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t) 6) /* stream is paused */
312#define SNDRV_PCM_STATE_SUSPENDED ((snd_pcm_state_t) 7) /* hardware is suspended */
313#define SNDRV_PCM_STATE_DISCONNECTED ((snd_pcm_state_t) 8) /* hardware is disconnected */
304typedef int snd_pcm_state_t;
305#define SNDRV_PCM_STATE_OPEN 0 /* stream is open */
306#define SNDRV_PCM_STATE_SETUP 1 /* stream has a setup */
307#define SNDRV_PCM_STATE_PREPARED 2 /* stream is ready to start */
308#define SNDRV_PCM_STATE_RUNNING 3 /* stream is running */
309#define SNDRV_PCM_STATE_XRUN 4 /* stream reached an xrun */
310#define SNDRV_PCM_STATE_DRAINING 5 /* stream is draining */
311#define SNDRV_PCM_STATE_PAUSED 6 /* stream is paused */
312#define SNDRV_PCM_STATE_SUSPENDED 7 /* hardware is suspended */
313#define SNDRV_PCM_STATE_DISCONNECTED 8 /* hardware is disconnected */
314314#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
315315
316316enum {
......@@ -1044,7 +1044,7 @@ struct snd_timer_tread {
10441044 * *
10451045 ****************************************************************************/
10461046
1047#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9)
1047#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 10)
10481048
10491049struct snd_ctl_card_info {
10501050 int card; /* card number */
......@@ -1058,24 +1058,43 @@ struct snd_ctl_card_info {
10581058 unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */
10591059};
10601060
1061typedef int __bitwise snd_ctl_elem_type_t;
1062#define SNDRV_CTL_ELEM_TYPE_NONE ((snd_ctl_elem_type_t) 0) /* invalid */
1063#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((snd_ctl_elem_type_t) 1) /* boolean type */
1064#define SNDRV_CTL_ELEM_TYPE_INTEGER ((snd_ctl_elem_type_t) 2) /* integer type */
1065#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((snd_ctl_elem_type_t) 3) /* enumerated type */
1066#define SNDRV_CTL_ELEM_TYPE_BYTES ((snd_ctl_elem_type_t) 4) /* byte array */
1067#define SNDRV_CTL_ELEM_TYPE_IEC958 ((snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */
1068#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((snd_ctl_elem_type_t) 6) /* 64-bit integer type */
1061/*
1062 * Card components can exceed the fixed 128 bytes in snd_ctl_card_info.
1063 * Use SNDRV_CTL_IOCTL_CARD_BYTES with type SND_CTL_CARD_BTYPE_COMPONENTS
1064 * to retrieve the full string.
1065 */
1066
1067/* Type values for struct snd_ctl_card_bytes::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 */
10691088#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
10701089
1071typedef int __bitwise snd_ctl_elem_iface_t;
1072#define SNDRV_CTL_ELEM_IFACE_CARD ((snd_ctl_elem_iface_t) 0) /* global control */
1073#define SNDRV_CTL_ELEM_IFACE_HWDEP ((snd_ctl_elem_iface_t) 1) /* hardware dependent device */
1074#define SNDRV_CTL_ELEM_IFACE_MIXER ((snd_ctl_elem_iface_t) 2) /* virtual mixer device */
1075#define SNDRV_CTL_ELEM_IFACE_PCM ((snd_ctl_elem_iface_t) 3) /* PCM device */
1076#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((snd_ctl_elem_iface_t) 4) /* RawMidi device */
1077#define SNDRV_CTL_ELEM_IFACE_TIMER ((snd_ctl_elem_iface_t) 5) /* timer device */
1078#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((snd_ctl_elem_iface_t) 6) /* sequencer client */
1090typedef int snd_ctl_elem_iface_t;
1091#define SNDRV_CTL_ELEM_IFACE_CARD 0 /* global control */
1092#define SNDRV_CTL_ELEM_IFACE_HWDEP 1 /* hardware dependent device */
1093#define SNDRV_CTL_ELEM_IFACE_MIXER 2 /* virtual mixer device */
1094#define SNDRV_CTL_ELEM_IFACE_PCM 3 /* PCM device */
1095#define SNDRV_CTL_ELEM_IFACE_RAWMIDI 4 /* RawMidi device */
1096#define SNDRV_CTL_ELEM_IFACE_TIMER 5 /* timer device */
1097#define SNDRV_CTL_ELEM_IFACE_SEQUENCER 6 /* sequencer client */
10791098#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
10801099
10811100#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0)
......@@ -1184,6 +1203,7 @@ struct snd_ctl_tlv {
11841203
11851204#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
11861205#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)
11871207#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
11881208#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
11891209#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 {
7979 *
8080 * @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE.
8181 * @message_count: The number of messages.
82 * @messages: Array of @message_count messages
8283 * @messages.message: The messages expressing hardware knob operation.
8384 * @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 integer
85 * transaction was sent to deliver the message. It has 16-bit unsigned integer
8586 * 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 cycle
87 * field in the format of CYCLE_TIME, up to 7. The remaining 13 bits express cycle
8788 * field up to 7999.
8889 *
8990 * The structure expresses message transmitted by Fireface 400 when operating hardware knob.
......@@ -191,8 +192,9 @@ struct snd_firewire_motu_register_dsp_meter {
191192#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)
192193
193194/**
194 * snd_firewire_motu_register_dsp_parameter - the container for parameters of DSP controlled
195 * by register access.
195 * struct snd_firewire_motu_register_dsp_parameter - the container for parameters
196 * of DSP controlled by register access.
197 * @mixer: aggregate of @mixer.source and @mixer.output
196198 * @mixer.source.gain: The gain of source to mixer.
197199 * @mixer.source.pan: The L/R balance of source to mixer.
198200 * @mixer.source.flag: The flag of source to mixer, including mute, solo.
......@@ -200,21 +202,25 @@ struct snd_firewire_motu_register_dsp_meter {
200202 * Audio Express.
201203 * @mixer.source.paired_width: The width of paired source to mixer, only for 4 pre and
202204 * Audio Express.
205 * @mixer.output: FIXME
203206 * @mixer.output.paired_volume: The volume of paired output from mixer.
204207 * @mixer.output.paired_flag: The flag of paired output from mixer.
208 * @output: output parameters
205209 * @output.main_paired_volume: The volume of paired main output.
206210 * @output.hp_paired_volume: The volume of paired hp output.
207211 * @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
209214 * @line_input.boost_flag: The flags of boost for line inputs, only for 828mk2 and Traveler.
210215 * @line_input.nominal_level_flag: The flags of nominal level for line inputs, only for 828mk2 and
211216 * 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
213219 * @input.gain_and_invert: The value including gain and invert for input, only for Ultralite, 4 pre
214220 * and Audio Express.
215221 * @input.flag: The flag of input; e.g. jack detection, phantom power, and pad, only for Ultralite,
216222 * 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.
218224 *
219225 * The structure expresses the set of parameters for DSP controlled by register access.
220226 */
......@@ -272,8 +278,8 @@ struct snd_firewire_motu_register_dsp_parameter {
272278 * controlled by command
273279 * @data: Signal level meters. The mapping between position and signal channel is model-dependent.
274280 *
275 * 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 is
281 * The structure expresses the part of DSP status for hardware meter. The 32-bit storage is
282 * estimated to include IEEE 764 32-bit single precision floating point (binary32) value. It is
277283 * expected to be linear value (not logarithm) for audio signal level between 0.0 and +1.0.
278284 */
279285struct 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 {
5858#define SND_SOC_AR_TPLG_FE_BE_GRAPH_CTL_MIX 256
5959#define SND_SOC_AR_TPLG_VOL_CTL 257
6060
61/**
61/*
6262 * %AR_TKN_U32_SUB_GRAPH_INSTANCE_ID: Sub Graph Instance Id
6363 *
6464 * %AR_TKN_U32_SUB_GRAPH_PERF_MODE: Performance mode of subgraph
......@@ -168,6 +168,60 @@ enum ar_event_types {
168168 * LOG_WAIT = 0,
169169 * LOG_IMMEDIATELY = 1
170170 *
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 *
171225 * %AR_TKN_DAI_INDEX: dai index
172226 *
173227 */
......@@ -240,6 +294,45 @@ enum ar_event_types {
240294#define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
241295#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
243336#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
244337struct audioreach_module_priv_data {
245338 __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 @@
111111
112112#define SOF_TKN_COMP_SCHED_DOMAIN 418
113113#define SOF_TKN_COMP_DOMAIN_ID 419
114#define SOF_TKN_COMP_HEAP_BYTES_REQUIREMENT 420
115#define SOF_TKN_COMP_STACK_BYTES_REQUIREMENT 421
114#define SOF_TKN_COMP_STACK_BYTES_REQUIREMENT 420
115#define SOF_TKN_COMP_HEAP_BYTES_REQUIREMENT 421
116116
117117/* SSP */
118118#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
......@@ -223,6 +223,7 @@
223223#define SOF_TKN_AMD_ACPI2S_RATE 1700
224224#define SOF_TKN_AMD_ACPI2S_CH 1701
225225#define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702
226#define SOF_TKN_AMD_ACPI2S_FORMAT 1703
226227
227228/* MICFIL PDM */
228229#define SOF_TKN_IMX_MICFIL_RATE 2000
lib/libc/include/arc-linux-any/asm/unistd_32.h+1
......@@ -352,6 +352,7 @@
352352#define __NR_file_setattr 469
353353#define __NR_listns 470
354354#define __NR_rseq_slice_yield 471
355#define __NR_fchroot 472
355356
356357
357358#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 @@
9797#define PT_DATA_ADDR 0x10004
9898#define PT_TEXT_END_ADDR 0x10008
9999
100#ifndef __ASSEMBLY__
100#ifndef __ASSEMBLER__
101101
102102/*
103103 * This struct defines the way the registers are stored on the
......@@ -134,6 +134,6 @@ struct pt_regs {
134134#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )
135135
136136
137#endif /* __ASSEMBLY__ */
137#endif /* __ASSEMBLER__ */
138138
139139#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 @@
425425#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
426426#define __NR_listns (__NR_SYSCALL_BASE + 470)
427427#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
428#define __NR_fchroot (__NR_SYSCALL_BASE + 472)
428429
429430#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 @@
437437#define __NR_file_setattr (__NR_SYSCALL_BASE + 469)
438438#define __NR_listns (__NR_SYSCALL_BASE + 470)
439439#define __NR_rseq_slice_yield (__NR_SYSCALL_BASE + 471)
440#define __NR_fchroot (__NR_SYSCALL_BASE + 472)
440441
441442#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 @@
348348#define __NR_file_setattr 469
349349#define __NR_listns 470
350350#define __NR_rseq_slice_yield 471
351#define __NR_fchroot 472
351352
352353
353354#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 @@
77#ifndef _ASM_REGISTERS_H
88#define _ASM_REGISTERS_H
99
10#ifndef __ASSEMBLY__
10#ifndef __ASSEMBLER__
1111
1212/* See kernel/entry.S for further documentation. */
1313
lib/libc/include/hexagon-linux-any/asm/unistd_32.h+1
......@@ -347,6 +347,7 @@
347347#define __NR_file_setattr 469
348348#define __NR_listns 470
349349#define __NR_rseq_slice_yield 471
350#define __NR_fchroot 472
350351
351352
352353#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 @@
317317#define __NR_file_setattr 469
318318#define __NR_listns 470
319319#define __NR_rseq_slice_yield 471
320#define __NR_fchroot 472
320321
321322
322323#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 @@
325325#define __NR_file_setattr 469
326326#define __NR_listns 470
327327#define __NR_rseq_slice_yield 471
328#define __NR_fchroot 472
328329
329330
330331#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 @@
444444#define __NR_file_setattr 469
445445#define __NR_listns 470
446446#define __NR_rseq_slice_yield 471
447#define __NR_fchroot 472
447448
448449
449450#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 @@
166166#define SO_INQ 84
167167#define SCM_INQ SO_INQ
168168
169#define SO_RIGHTS_NOTRUNC 85
170
169171
170172#if __BITS_PER_LONG == 64
171173#define SO_TIMESTAMP SO_TIMESTAMP_OLD
lib/libc/include/mips-linux-any/asm/unistd_n32.h+1
......@@ -400,5 +400,6 @@
400400#define __NR_file_setattr (__NR_Linux + 469)
401401#define __NR_listns (__NR_Linux + 470)
402402#define __NR_rseq_slice_yield (__NR_Linux + 471)
403#define __NR_fchroot (__NR_Linux + 472)
403404
404405#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 @@
376376#define __NR_file_setattr (__NR_Linux + 469)
377377#define __NR_listns (__NR_Linux + 470)
378378#define __NR_rseq_slice_yield (__NR_Linux + 471)
379#define __NR_fchroot (__NR_Linux + 472)
379380
380381#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 @@
446446#define __NR_file_setattr (__NR_Linux + 469)
447447#define __NR_listns (__NR_Linux + 470)
448448#define __NR_rseq_slice_yield (__NR_Linux + 471)
449#define __NR_fchroot (__NR_Linux + 472)
449450
450451#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 @@
5252#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM w/out suspended state */
5353#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1 */
5454#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
5658/*
5759 * IMPORTANT!
lib/libc/include/powerpc-linux-any/asm/kvm.h+18
......@@ -437,6 +437,24 @@ struct kvm_ppc_cpu_char {
437437 __u64 behaviour_mask; /* valid bits in behaviour */
438438};
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)
440458/*
441459 * Values for character and character_mask.
442460 * 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 @@
453453#define __NR_file_setattr 469
454454#define __NR_listns 470
455455#define __NR_rseq_slice_yield 471
456#define __NR_fchroot 472
456457
457458
458459#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 @@
425425#define __NR_file_setattr 469
426426#define __NR_listns 470
427427#define __NR_rseq_slice_yield 471
428#define __NR_fchroot 472
428429
429430
430431#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 @@
77#define _ASM_HWPROBE_H
88
99#include <linux/types.h>
10#include <linux/const.h>
1011
1112/*
1213 * Interface for probing hardware capabilities from userspace, see
......@@ -21,80 +22,80 @@ struct riscv_hwprobe {
2122#define RISCV_HWPROBE_KEY_MARCHID 1
2223#define RISCV_HWPROBE_KEY_MIMPID 2
2324#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)
2526#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
26#define RISCV_HWPROBE_IMA_FD (1 << 0)
27#define RISCV_HWPROBE_IMA_C (1 << 1)
28#define RISCV_HWPROBE_IMA_V (1 << 2)
29#define RISCV_HWPROBE_EXT_ZBA (1 << 3)
30#define RISCV_HWPROBE_EXT_ZBB (1 << 4)
31#define RISCV_HWPROBE_EXT_ZBS (1 << 5)
32#define RISCV_HWPROBE_EXT_ZICBOZ (1 << 6)
33#define RISCV_HWPROBE_EXT_ZBC (1 << 7)
34#define RISCV_HWPROBE_EXT_ZBKB (1 << 8)
35#define RISCV_HWPROBE_EXT_ZBKC (1 << 9)
36#define RISCV_HWPROBE_EXT_ZBKX (1 << 10)
37#define RISCV_HWPROBE_EXT_ZKND (1 << 11)
38#define RISCV_HWPROBE_EXT_ZKNE (1 << 12)
39#define RISCV_HWPROBE_EXT_ZKNH (1 << 13)
40#define RISCV_HWPROBE_EXT_ZKSED (1 << 14)
41#define RISCV_HWPROBE_EXT_ZKSH (1 << 15)
42#define RISCV_HWPROBE_EXT_ZKT (1 << 16)
43#define RISCV_HWPROBE_EXT_ZVBB (1 << 17)
44#define RISCV_HWPROBE_EXT_ZVBC (1 << 18)
45#define RISCV_HWPROBE_EXT_ZVKB (1 << 19)
46#define RISCV_HWPROBE_EXT_ZVKG (1 << 20)
47#define RISCV_HWPROBE_EXT_ZVKNED (1 << 21)
48#define RISCV_HWPROBE_EXT_ZVKNHA (1 << 22)
49#define RISCV_HWPROBE_EXT_ZVKNHB (1 << 23)
50#define RISCV_HWPROBE_EXT_ZVKSED (1 << 24)
51#define RISCV_HWPROBE_EXT_ZVKSH (1 << 25)
52#define RISCV_HWPROBE_EXT_ZVKT (1 << 26)
53#define RISCV_HWPROBE_EXT_ZFH (1 << 27)
54#define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28)
55#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29)
56#define RISCV_HWPROBE_EXT_ZVFH (1 << 30)
57#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31)
58#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32)
59#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)
60#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)
61#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35)
62#define RISCV_HWPROBE_EXT_ZIHINTPAUSE (1ULL << 36)
63#define RISCV_HWPROBE_EXT_ZVE32X (1ULL << 37)
64#define RISCV_HWPROBE_EXT_ZVE32F (1ULL << 38)
65#define RISCV_HWPROBE_EXT_ZVE64X (1ULL << 39)
66#define RISCV_HWPROBE_EXT_ZVE64F (1ULL << 40)
67#define RISCV_HWPROBE_EXT_ZVE64D (1ULL << 41)
68#define RISCV_HWPROBE_EXT_ZIMOP (1ULL << 42)
69#define RISCV_HWPROBE_EXT_ZCA (1ULL << 43)
70#define RISCV_HWPROBE_EXT_ZCB (1ULL << 44)
71#define RISCV_HWPROBE_EXT_ZCD (1ULL << 45)
72#define RISCV_HWPROBE_EXT_ZCF (1ULL << 46)
73#define RISCV_HWPROBE_EXT_ZCMOP (1ULL << 47)
74#define RISCV_HWPROBE_EXT_ZAWRS (1ULL << 48)
75#define RISCV_HWPROBE_EXT_SUPM (1ULL << 49)
76#define RISCV_HWPROBE_EXT_ZICNTR (1ULL << 50)
77#define RISCV_HWPROBE_EXT_ZIHPM (1ULL << 51)
78#define RISCV_HWPROBE_EXT_ZFBFMIN (1ULL << 52)
79#define RISCV_HWPROBE_EXT_ZVFBFMIN (1ULL << 53)
80#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 54)
81#define RISCV_HWPROBE_EXT_ZICBOM (1ULL << 55)
82#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)
83#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)
84#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)
85#define RISCV_HWPROBE_EXT_ZALASR (1ULL << 59)
86#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)
87#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)
88#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)
89#define RISCV_HWPROBE_EXT_ZICFILP (1ULL << 63)
27#define RISCV_HWPROBE_IMA_FD _BITULL(0)
28#define RISCV_HWPROBE_IMA_C _BITULL(1)
29#define RISCV_HWPROBE_IMA_V _BITULL(2)
30#define RISCV_HWPROBE_EXT_ZBA _BITULL(3)
31#define RISCV_HWPROBE_EXT_ZBB _BITULL(4)
32#define RISCV_HWPROBE_EXT_ZBS _BITULL(5)
33#define RISCV_HWPROBE_EXT_ZICBOZ _BITULL(6)
34#define RISCV_HWPROBE_EXT_ZBC _BITULL(7)
35#define RISCV_HWPROBE_EXT_ZBKB _BITULL(8)
36#define RISCV_HWPROBE_EXT_ZBKC _BITULL(9)
37#define RISCV_HWPROBE_EXT_ZBKX _BITULL(10)
38#define RISCV_HWPROBE_EXT_ZKND _BITULL(11)
39#define RISCV_HWPROBE_EXT_ZKNE _BITULL(12)
40#define RISCV_HWPROBE_EXT_ZKNH _BITULL(13)
41#define RISCV_HWPROBE_EXT_ZKSED _BITULL(14)
42#define RISCV_HWPROBE_EXT_ZKSH _BITULL(15)
43#define RISCV_HWPROBE_EXT_ZKT _BITULL(16)
44#define RISCV_HWPROBE_EXT_ZVBB _BITULL(17)
45#define RISCV_HWPROBE_EXT_ZVBC _BITULL(18)
46#define RISCV_HWPROBE_EXT_ZVKB _BITULL(19)
47#define RISCV_HWPROBE_EXT_ZVKG _BITULL(20)
48#define RISCV_HWPROBE_EXT_ZVKNED _BITULL(21)
49#define RISCV_HWPROBE_EXT_ZVKNHA _BITULL(22)
50#define RISCV_HWPROBE_EXT_ZVKNHB _BITULL(23)
51#define RISCV_HWPROBE_EXT_ZVKSED _BITULL(24)
52#define RISCV_HWPROBE_EXT_ZVKSH _BITULL(25)
53#define RISCV_HWPROBE_EXT_ZVKT _BITULL(26)
54#define RISCV_HWPROBE_EXT_ZFH _BITULL(27)
55#define RISCV_HWPROBE_EXT_ZFHMIN _BITULL(28)
56#define RISCV_HWPROBE_EXT_ZIHINTNTL _BITULL(29)
57#define RISCV_HWPROBE_EXT_ZVFH _BITULL(30)
58#define RISCV_HWPROBE_EXT_ZVFHMIN _BITULL(31)
59#define RISCV_HWPROBE_EXT_ZFA _BITULL(32)
60#define RISCV_HWPROBE_EXT_ZTSO _BITULL(33)
61#define RISCV_HWPROBE_EXT_ZACAS _BITULL(34)
62#define RISCV_HWPROBE_EXT_ZICOND _BITULL(35)
63#define RISCV_HWPROBE_EXT_ZIHINTPAUSE _BITULL(36)
64#define RISCV_HWPROBE_EXT_ZVE32X _BITULL(37)
65#define RISCV_HWPROBE_EXT_ZVE32F _BITULL(38)
66#define RISCV_HWPROBE_EXT_ZVE64X _BITULL(39)
67#define RISCV_HWPROBE_EXT_ZVE64F _BITULL(40)
68#define RISCV_HWPROBE_EXT_ZVE64D _BITULL(41)
69#define RISCV_HWPROBE_EXT_ZIMOP _BITULL(42)
70#define RISCV_HWPROBE_EXT_ZCA _BITULL(43)
71#define RISCV_HWPROBE_EXT_ZCB _BITULL(44)
72#define RISCV_HWPROBE_EXT_ZCD _BITULL(45)
73#define RISCV_HWPROBE_EXT_ZCF _BITULL(46)
74#define RISCV_HWPROBE_EXT_ZCMOP _BITULL(47)
75#define RISCV_HWPROBE_EXT_ZAWRS _BITULL(48)
76#define RISCV_HWPROBE_EXT_SUPM _BITULL(49)
77#define RISCV_HWPROBE_EXT_ZICNTR _BITULL(50)
78#define RISCV_HWPROBE_EXT_ZIHPM _BITULL(51)
79#define RISCV_HWPROBE_EXT_ZFBFMIN _BITULL(52)
80#define RISCV_HWPROBE_EXT_ZVFBFMIN _BITULL(53)
81#define RISCV_HWPROBE_EXT_ZVFBFWMA _BITULL(54)
82#define RISCV_HWPROBE_EXT_ZICBOM _BITULL(55)
83#define RISCV_HWPROBE_EXT_ZAAMO _BITULL(56)
84#define RISCV_HWPROBE_EXT_ZALRSC _BITULL(57)
85#define RISCV_HWPROBE_EXT_ZABHA _BITULL(58)
86#define RISCV_HWPROBE_EXT_ZALASR _BITULL(59)
87#define RISCV_HWPROBE_EXT_ZICBOP _BITULL(60)
88#define RISCV_HWPROBE_EXT_ZILSD _BITULL(61)
89#define RISCV_HWPROBE_EXT_ZCLSD _BITULL(62)
90#define RISCV_HWPROBE_EXT_ZICFILP _BITULL(63)
9091
9192#define RISCV_HWPROBE_KEY_CPUPERF_0 5
92#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
93#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
94#define RISCV_HWPROBE_MISALIGNED_SLOW (2 << 0)
95#define RISCV_HWPROBE_MISALIGNED_FAST (3 << 0)
96#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0)
97#define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0)
93#define RISCV_HWPROBE_MISALIGNED_UNKNOWN 0
94#define RISCV_HWPROBE_MISALIGNED_EMULATED 1
95#define RISCV_HWPROBE_MISALIGNED_SLOW 2
96#define RISCV_HWPROBE_MISALIGNED_FAST 3
97#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED 4
98#define RISCV_HWPROBE_MISALIGNED_MASK 7
9899#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 6
99100#define RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS 7
100101#define RISCV_HWPROBE_KEY_TIME_CSR_FREQ 8
......@@ -115,11 +116,16 @@ struct riscv_hwprobe {
115116#define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14
116117#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15
117118#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
120126/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
121127
122128/* Flags */
123#define RISCV_HWPROBE_WHICH_CPUS (1 << 0)
129#define RISCV_HWPROBE_WHICH_CPUS _BITUL(0)
124130
125131#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 {
102102 unsigned long sstateen0;
103103};
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
105110/* TIMER registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */
106111struct kvm_riscv_timer {
107112 __u64 frequency;
......@@ -199,6 +204,8 @@ enum KVM_RISCV_ISA_EXT_ID {
199204 KVM_RISCV_ISA_EXT_ZCLSD,
200205 KVM_RISCV_ISA_EXT_ZILSD,
201206 KVM_RISCV_ISA_EXT_ZALASR,
207 KVM_RISCV_ISA_EXT_ZICFILP,
208 KVM_RISCV_ISA_EXT_ZICFISS,
202209 KVM_RISCV_ISA_EXT_MAX,
203210};
204211
......@@ -240,6 +247,9 @@ struct kvm_riscv_sbi_fwft_feature {
240247struct kvm_riscv_sbi_fwft {
241248 struct kvm_riscv_sbi_fwft_feature misaligned_deleg;
242249 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;
243253};
244254
245255/* If you need to interpret the index values, here is the key: */
......@@ -263,12 +273,15 @@ struct kvm_riscv_sbi_fwft {
263273#define KVM_REG_RISCV_CSR_GENERAL (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)
264274#define KVM_REG_RISCV_CSR_AIA (0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT)
265275#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)
266277#define KVM_REG_RISCV_CSR_REG(name) \
267278 (offsetof(struct kvm_riscv_csr, name) / sizeof(unsigned long))
268279#define KVM_REG_RISCV_CSR_AIA_REG(name) \
269280 (offsetof(struct kvm_riscv_aia_csr, name) / sizeof(unsigned long))
270281#define KVM_REG_RISCV_CSR_SMSTATEEN_REG(name) \
271282 (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
273286/* Timer registers are mapped as type 4 */
274287#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 @@
319319#define __NR_file_setattr 469
320320#define __NR_listns 470
321321#define __NR_rseq_slice_yield 471
322#define __NR_fchroot 472
322323
323324
324325#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 @@
329329#define __NR_file_setattr 469
330330#define __NR_listns 470
331331#define __NR_rseq_slice_yield 471
332#define __NR_fchroot 472
332333
333334
334335#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 @@
11/* 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 @@
391391#define __NR_file_setattr 469
392392#define __NR_listns 470
393393#define __NR_rseq_slice_yield 471
394#define __NR_fchroot 472
394395
395396
396397#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 @@
148148#define SO_INQ 0x005d
149149#define SCM_INQ SO_INQ
150150
151#define SO_RIGHTS_NOTRUNC 0x005e
152
151153
152154
153155#if __BITS_PER_LONG == 64
lib/libc/include/sparc-linux-any/asm/unistd_32.h+1
......@@ -442,6 +442,7 @@
442442#define __NR_file_setattr 469
443443#define __NR_listns 470
444444#define __NR_rseq_slice_yield 471
445#define __NR_fchroot 472
445446
446447
447448#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 @@
405405#define __NR_file_setattr 469
406406#define __NR_listns 470
407407#define __NR_rseq_slice_yield 471
408#define __NR_fchroot 472
408409
409410
410411#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 {
5353 HSMP_SET_XGMI_PSTATE_RANGE, /* 26h Set xGMI P-state range */
5454 HSMP_CPU_RAIL_ISO_FREQ_POLICY, /* 27h Get/Set Cpu Iso frequency policy */
5555 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 */
5658 HSMP_GET_RAPL_UNITS = 0x30, /* 30h Get scaling factor for energy */
5759 HSMP_GET_RAPL_CORE_COUNTER, /* 31h Get core energy counter value */
5860 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 */
5971 HSMP_MSG_ID_MAX,
6072};
6173
......@@ -170,16 +182,27 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
170182 {0, 1, HSMP_GET},
171183
172184 /*
173 * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0
174 * input: args[0] = min link width[15:8] + max link width[7:0]
185 * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0/1
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]
175192 */
176 {1, 0, HSMP_SET},
193 {1, 1, HSMP_SET_GET},
177194
178195 /*
179 * HSMP_SET_DF_PSTATE, num_args = 1, response_sz = 0
180 * input: args[0] = df pstate[7:0]
196 * HSMP_SET_DF_PSTATE (APBDisable), num_args = 1, response_sz = 0/1
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
181204 */
182 {1, 0, HSMP_SET},
205 {1, 1, HSMP_SET_GET},
183206
184207 /* HSMP_SET_AUTO_DF_PSTATE, num_args = 0, response_sz = 0 */
185208 {0, 0, HSMP_SET},
......@@ -305,16 +328,32 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
305328 {1, 1, HSMP_SET},
306329
307330 /*
308 * HSMP_SET_POWER_MODE, num_args = 1, response_sz = 0
309 * input: args[0] = power efficiency mode[2:0]
331 * HSMP_SET_POWER_MODE (PwrEfficiencyModeSelection),
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.
310342 */
311343 {1, 1, HSMP_SET_GET},
312344
313345 /*
314 * HSMP_SET_PSTATE_MAX_MIN, num_args = 1, response_sz = 0
315 * input: args[0] = min df pstate[15:8] + max df pstate[7:0]
346 * HSMP_SET_PSTATE_MAX_MIN (DfPstateRange), num_args = 1, response_sz = 0/1
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]
316355 */
317 {1, 0, HSMP_SET},
356 {1, 1, HSMP_SET_GET},
318357
319358 /*
320359 * 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[]
328367 {0, 0, HSMP_GET},
329368
330369 /*
331 * HSMP_GET_METRIC_TABLE_DRAM_ADDR, num_args = 0, response_sz = 2
370 * HSMP_GET_METRIC_TABLE_DRAM_ADDR, num_args = 0, response_sz = 3
332371 * output: args[0] = lower 32 bits of the address
333372 * output: args[1] = upper 32 bits of the address
373 * output: args[2] = DRAM region size in bytes
334374 */
335 {0, 2, HSMP_GET},
375 {0, 3, HSMP_GET},
336376
337377 /*
338378 * 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[]
355395 */
356396 {1, 1, HSMP_SET_GET},
357397
358 /* RESERVED(0x29-0x2f) */
359 {0, 0, HSMP_RSVD},
360 {0, 0, HSMP_RSVD},
398 /*
399 * HSMP_PC6_ENABLE (Pc6Enable), num_args = 1, response_sz = 0/1
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) */
361423 {0, 0, HSMP_RSVD},
362424 {0, 0, HSMP_RSVD},
363425 {0, 0, HSMP_RSVD},
......@@ -385,6 +447,89 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[]
385447 */
386448 {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},
388533};
389534
390535/* Metrics table (supported only with proto version 6) */
......@@ -467,6 +612,39 @@ struct hsmp_metric_table {
467612 __u32 gfxclk_frequency[8];
468613};
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
470648/* Reset to default packing */
471649#pragma pack()
472650
......@@ -474,4 +652,16 @@ struct hsmp_metric_table {
474652#define HSMP_BASE_IOCTL_NR 0xF8
475653#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
477667#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 @@
22#ifndef _ASM_X86_PTRACE_ABI_H
33#define _ASM_X86_PTRACE_ABI_H
44
5#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
56#ifdef __i386__
67
78#define EBX 0
......@@ -25,7 +26,6 @@
2526
2627#else /* __i386__ */
2728
28#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
2929/*
3030 * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
3131 * unless syscall needs a complete, fully filled "struct pt_regs".
......@@ -57,12 +57,12 @@
5757#define EFLAGS 144
5858#define RSP 152
5959#define SS 160
60#endif /* __ASSEMBLER__ */
6160
6261/* top of stack page */
6362#define FRAME_SIZE 168
6463
6564#endif /* !__i386__ */
65#endif /* defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS) */
6666
6767/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
6868#define PTRACE_GETREGS 12
lib/libc/include/x86-linux-any/asm/unistd_32.h+1
......@@ -462,6 +462,7 @@
462462#define __NR_file_setattr 469
463463#define __NR_listns 470
464464#define __NR_rseq_slice_yield 471
465#define __NR_fchroot 472
465466
466467
467468#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 @@
386386#define __NR_file_setattr 469
387387#define __NR_listns 470
388388#define __NR_rseq_slice_yield 471
389#define __NR_fchroot 472
389390
390391
391392#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 @@
339339#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)
340340#define __NR_listns (__X32_SYSCALL_BIT + 470)
341341#define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471)
342#define __NR_fchroot (__X32_SYSCALL_BIT + 472)
342343#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
343344#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
344345#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
lib/libc/include/xtensa-linux-any/asm/unistd_32.h+1
......@@ -418,6 +418,7 @@
418418#define __NR_file_setattr 469
419419#define __NR_listns 470
420420#define __NR_rseq_slice_yield 471
421#define __NR_fchroot 472
421422
422423
423424#endif /* _ASM_UNISTD_32_H */
\ No newline at end of file
lib/std/Target.zig+1-1
......@@ -447,7 +447,7 @@ pub const Os = struct {
447447
448448 break :blk default_min;
449449 },
450 .max = .{ .major = 7, .minor = 2, .patch = 0 },
450 .max = .{ .major = 7, .minor = 3, .patch = 0 },
451451 },
452452 .glibc = blk: {
453453 //
lib/std/os/linux/syscalls.zig+29-1
......@@ -1,5 +1,5 @@
11// This file is automatically generated by tools/generate_linux_syscalls.zig
2// This list current as of kernel: 7.1.0
2// This list current as of kernel: 7.3.0
33
44pub const X86 = enum(usize) {
55 restart_syscall = 0,
......@@ -463,6 +463,7 @@ pub const X86 = enum(usize) {
463463 file_setattr = 469,
464464 listns = 470,
465465 rseq_slice_yield = 471,
466 fchroot = 472,
466467};
467468
468469pub const X64 = enum(usize) {
......@@ -851,6 +852,7 @@ pub const X64 = enum(usize) {
851852 file_setattr = 469,
852853 listns = 470,
853854 rseq_slice_yield = 471,
855 fchroot = 472,
854856};
855857
856858pub const X32 = enum(usize) {
......@@ -1192,6 +1194,7 @@ pub const X32 = enum(usize) {
11921194 file_setattr = 1073742293,
11931195 listns = 1073742294,
11941196 rseq_slice_yield = 1073742295,
1197 fchroot = 1073742296,
11951198 rt_sigaction = 1073742336,
11961199 rt_sigreturn = 1073742337,
11971200 ioctl = 1073742338,
......@@ -1657,6 +1660,7 @@ pub const Arm = enum(usize) {
16571660 file_setattr = 469,
16581661 listns = 470,
16591662 rseq_slice_yield = 471,
1663 fchroot = 472,
16601664
16611665 breakpoint = arm_base + 1,
16621666 cacheflush = arm_base + 2,
......@@ -2108,6 +2112,7 @@ pub const Sparc = enum(usize) {
21082112 file_setattr = 469,
21092113 listns = 470,
21102114 rseq_slice_yield = 471,
2115 fchroot = 472,
21112116};
21122117
21132118pub const Sparc64 = enum(usize) {
......@@ -2515,6 +2520,7 @@ pub const Sparc64 = enum(usize) {
25152520 file_setattr = 469,
25162521 listns = 470,
25172522 rseq_slice_yield = 471,
2523 fchroot = 472,
25182524};
25192525
25202526pub const M68k = enum(usize) {
......@@ -2961,6 +2967,7 @@ pub const M68k = enum(usize) {
29612967 file_setattr = 469,
29622968 listns = 470,
29632969 rseq_slice_yield = 471,
2970 fchroot = 472,
29642971};
29652972
29662973pub const MipsO32 = enum(usize) {
......@@ -3401,6 +3408,7 @@ pub const MipsO32 = enum(usize) {
34013408 file_setattr = 4469,
34023409 listns = 4470,
34033410 rseq_slice_yield = 4471,
3411 fchroot = 4472,
34043412};
34053413
34063414pub const MipsN64 = enum(usize) {
......@@ -3777,6 +3785,7 @@ pub const MipsN64 = enum(usize) {
37773785 file_setattr = 5469,
37783786 listns = 5470,
37793787 rseq_slice_yield = 5471,
3788 fchroot = 5472,
37803789};
37813790
37823791pub const MipsN32 = enum(usize) {
......@@ -4177,6 +4186,7 @@ pub const MipsN32 = enum(usize) {
41774186 file_setattr = 6469,
41784187 listns = 6470,
41794188 rseq_slice_yield = 6471,
4189 fchroot = 6472,
41804190};
41814191
41824192pub const PowerPC = enum(usize) {
......@@ -4632,6 +4642,7 @@ pub const PowerPC = enum(usize) {
46324642 file_setattr = 469,
46334643 listns = 470,
46344644 rseq_slice_yield = 471,
4645 fchroot = 472,
46354646};
46364647
46374648pub const PowerPC64 = enum(usize) {
......@@ -5059,6 +5070,7 @@ pub const PowerPC64 = enum(usize) {
50595070 file_setattr = 469,
50605071 listns = 470,
50615072 rseq_slice_yield = 471,
5073 fchroot = 472,
50625074};
50635075
50645076pub const S390x = enum(usize) {
......@@ -5452,6 +5464,7 @@ pub const S390x = enum(usize) {
54525464 file_setattr = 469,
54535465 listns = 470,
54545466 rseq_slice_yield = 471,
5467 fchroot = 472,
54555468};
54565469
54575470pub const Xtensa = enum(usize) {
......@@ -5849,6 +5862,7 @@ pub const Xtensa = enum(usize) {
58495862 file_setattr = 469,
58505863 listns = 470,
58515864 rseq_slice_yield = 471,
5865 fchroot = 472,
58525866};
58535867
58545868pub const Alpha = enum(usize) {
......@@ -6351,6 +6365,7 @@ pub const Alpha = enum(usize) {
63516365 file_setattr = 579,
63526366 listns = 580,
63536367 rseq_slice_yield = 581,
6368 fchroot = 582,
63546369};
63556370
63566371pub const Arm64 = enum(usize) {
......@@ -6681,6 +6696,7 @@ pub const Arm64 = enum(usize) {
66816696 file_setattr = 469,
66826697 listns = 470,
66836698 rseq_slice_yield = 471,
6699 fchroot = 472,
66846700};
66856701
66866702pub const RiscV32 = enum(usize) {
......@@ -7002,6 +7018,7 @@ pub const RiscV32 = enum(usize) {
70027018 file_setattr = 469,
70037019 listns = 470,
70047020 rseq_slice_yield = 471,
7021 fchroot = 472,
70057022};
70067023
70077024pub const RiscV64 = enum(usize) {
......@@ -7333,6 +7350,7 @@ pub const RiscV64 = enum(usize) {
73337350 file_setattr = 469,
73347351 listns = 470,
73357352 rseq_slice_yield = 471,
7353 fchroot = 472,
73367354};
73377355
73387356pub const LoongArch32 = enum(usize) {
......@@ -7651,6 +7669,7 @@ pub const LoongArch32 = enum(usize) {
76517669 file_setattr = 469,
76527670 listns = 470,
76537671 rseq_slice_yield = 471,
7672 fchroot = 472,
76547673};
76557674
76567675pub const LoongArch64 = enum(usize) {
......@@ -7977,6 +7996,7 @@ pub const LoongArch64 = enum(usize) {
79777996 file_setattr = 469,
79787997 listns = 470,
79797998 rseq_slice_yield = 471,
7999 fchroot = 472,
79808000};
79818001
79828002pub const Arc = enum(usize) {
......@@ -8331,6 +8351,7 @@ pub const Arc = enum(usize) {
83318351 file_setattr = 469,
83328352 listns = 470,
83338353 rseq_slice_yield = 471,
8354 fchroot = 472,
83348355};
83358356
83368357pub const CSky = enum(usize) {
......@@ -8681,6 +8702,7 @@ pub const CSky = enum(usize) {
86818702 file_setattr = 469,
86828703 listns = 470,
86838704 rseq_slice_yield = 471,
8705 fchroot = 472,
86848706};
86858707
86868708pub const Hexagon = enum(usize) {
......@@ -9030,6 +9052,7 @@ pub const Hexagon = enum(usize) {
90309052 file_setattr = 469,
90319053 listns = 470,
90329054 rseq_slice_yield = 471,
9055 fchroot = 472,
90339056};
90349057
90359058pub const OpenRisc = enum(usize) {
......@@ -9380,6 +9403,7 @@ pub const OpenRisc = enum(usize) {
93809403 file_setattr = 469,
93819404 listns = 470,
93829405 rseq_slice_yield = 471,
9406 fchroot = 472,
93839407};
93849408
93859409pub const Hppa = enum(usize) {
......@@ -9790,6 +9814,7 @@ pub const Hppa = enum(usize) {
97909814 file_setattr = 469,
97919815 listns = 470,
97929816 rseq_slice_yield = 471,
9817 fchroot = 472,
97939818};
97949819
97959820pub const Hppa64 = enum(usize) {
......@@ -10179,6 +10204,7 @@ pub const Hppa64 = enum(usize) {
1017910204 file_setattr = 469,
1018010205 listns = 470,
1018110206 rseq_slice_yield = 471,
10207 fchroot = 472,
1018210208};
1018310209
1018410210pub const Sh = enum(usize) {
......@@ -10618,6 +10644,7 @@ pub const Sh = enum(usize) {
1061810644 file_setattr = 469,
1061910645 listns = 470,
1062010646 rseq_slice_yield = 471,
10647 fchroot = 472,
1062110648};
1062210649
1062310650pub const Microblaze = enum(usize) {
......@@ -11085,4 +11112,5 @@ pub const Microblaze = enum(usize) {
1108511112 file_setattr = 469,
1108611113 listns = 470,
1108711114 rseq_slice_yield = 471,
11115 fchroot = 472,
1108811116};