authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-18 12:28:43+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-18 12:28:55+02:00
log72e00c8384133c201b4805c03cb74003c50b6c2b
treef607b30cbbe8c2b321c086616f5219eeae0d3967
parent86085362cbbb3ab40b6d09e84198ab862c67edbe
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

libc: update Linux headers to 7.2


92 files changed, 2853 insertions(+), 1232 deletions(-)

lib/libc/include/aarch64-linux-any/asm/fcntl.h+4-4
......@@ -20,10 +20,10 @@
2020/*
2121 * Using our own definitions for AArch32 (compat) support.
2222 */
23#define O_DIRECTORY 040000 /* must be a directory */
24#define O_NOFOLLOW 0100000 /* don't follow links */
25#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
26#define O_LARGEFILE 0400000
23#define O_DIRECTORY (1 << 14) /* must be a directory */
24#define O_NOFOLLOW (1 << 15) /* don't follow links */
25#define O_DIRECT (1 << 16) /* direct disk access hint - currently ignored */
26#define O_LARGEFILE (1 << 17)
2727
2828#include <asm-generic/fcntl.h>
2929
lib/libc/include/aarch64-linux-any/asm/hwcap.h+8
......@@ -147,5 +147,13 @@
147147#define HWCAP3_MTE_STORE_ONLY (1UL << 1)
148148#define HWCAP3_LSFE (1UL << 2)
149149#define HWCAP3_LS64 (1UL << 3)
150#define HWCAP3_SVE_B16MM (1UL << 4)
151#define HWCAP3_SVE2P3 (1UL << 5)
152#define HWCAP3_SME_LUT6 (1UL << 6)
153#define HWCAP3_SME2P3 (1UL << 7)
154#define HWCAP3_F16MM (1UL << 8)
155#define HWCAP3_F16F32DOT (1UL << 9)
156#define HWCAP3_F16F32MM (1UL << 10)
157#define HWCAP3_SVE_LUT6 (1UL << 11)
150158
151159#endif /* __ASM_HWCAP_H */
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/errno.h+2
......@@ -122,4 +122,6 @@
122122
123123#define EHWPOISON 133 /* Memory page has hardware error */
124124
125#define EFTYPE 134 /* Wrong file type for the intended operation */
126
125127#endif
\ No newline at end of file
lib/libc/include/any-linux-any/asm-generic/fcntl.h+33-21
......@@ -15,51 +15,55 @@
1515 * When introducing new O_* bits, please check its uniqueness in fcntl_init().
1616 */
1717
18#define O_ACCMODE 00000003
19#define O_RDONLY 00000000
20#define O_WRONLY 00000001
21#define O_RDWR 00000002
18#define O_ACCMODE 3
19#define O_RDONLY 0
20#define O_WRONLY (1 << 0)
21#define O_RDWR (1 << 1)
22/* (1 << 2) must not be used -- it collides with flags on alpha, sparc */
23/* (1 << 3) must not be used -- it collides with flags on alpha, mips, parisc, sparc */
24/* (1 << 4) must not be used -- it collides with flags on mips */
25/* (1 << 5) is free */
2226#ifndef O_CREAT
23#define O_CREAT 00000100 /* not fcntl */
27#define O_CREAT (1 << 6) /* not fcntl */
2428#endif
2529#ifndef O_EXCL
26#define O_EXCL 00000200 /* not fcntl */
30#define O_EXCL (1 << 7) /* not fcntl */
2731#endif
2832#ifndef O_NOCTTY
29#define O_NOCTTY 00000400 /* not fcntl */
33#define O_NOCTTY (1 << 8) /* not fcntl */
3034#endif
3135#ifndef O_TRUNC
32#define O_TRUNC 00001000 /* not fcntl */
36#define O_TRUNC (1 << 9) /* not fcntl */
3337#endif
3438#ifndef O_APPEND
35#define O_APPEND 00002000
39#define O_APPEND (1 << 10)
3640#endif
3741#ifndef O_NONBLOCK
38#define O_NONBLOCK 00004000
42#define O_NONBLOCK (1 << 11)
3943#endif
4044#ifndef O_DSYNC
41#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
45#define O_DSYNC (1 << 12) /* used to be O_SYNC, see below */
4246#endif
4347#ifndef FASYNC
44#define FASYNC 00020000 /* fcntl, for BSD compatibility */
48#define FASYNC (1 << 13) /* fcntl, for BSD compatibility */
4549#endif
4650#ifndef O_DIRECT
47#define O_DIRECT 00040000 /* direct disk access hint */
51#define O_DIRECT (1 << 14) /* direct disk access hint */
4852#endif
4953#ifndef O_LARGEFILE
50#define O_LARGEFILE 00100000
54#define O_LARGEFILE (1 << 15)
5155#endif
5256#ifndef O_DIRECTORY
53#define O_DIRECTORY 00200000 /* must be a directory */
57#define O_DIRECTORY (1 << 16) /* must be a directory */
5458#endif
5559#ifndef O_NOFOLLOW
56#define O_NOFOLLOW 00400000 /* don't follow links */
60#define O_NOFOLLOW (1 << 17) /* don't follow links */
5761#endif
5862#ifndef O_NOATIME
59#define O_NOATIME 01000000
63#define O_NOATIME (1 << 18)
6064#endif
6165#ifndef O_CLOEXEC
62#define O_CLOEXEC 02000000 /* set close_on_exec */
66#define O_CLOEXEC (1 << 19) /* set close_on_exec */
6367#endif
6468
6569/*
......@@ -76,16 +80,20 @@
7680 * Note: __O_SYNC must never be used directly.
7781 */
7882#ifndef O_SYNC
79#define __O_SYNC 04000000
83#define __O_SYNC (1 << 20)
8084#define O_SYNC (__O_SYNC|O_DSYNC)
8185#endif
8286
8387#ifndef O_PATH
84#define O_PATH 010000000
88#define O_PATH (1 << 21)
8589#endif
8690
8791#ifndef __O_TMPFILE
88#define __O_TMPFILE 020000000
92#define __O_TMPFILE (1 << 22)
93#endif
94
95#ifndef O_EMPTYPATH
96#define O_EMPTYPATH (1 << 26) /* allow empty path */
8997#endif
9098
9199/* a horrid kludge trying to make sure that this will fail on old kernels */
......@@ -95,6 +103,10 @@
95103#define O_NDELAY O_NONBLOCK
96104#endif
97105
106/* (1 << 23) must not be used -- it collides with flags on alpha, parisc, sparc */
107/* (1 << 24) must not be used -- it collides with flags on alpha, sparc */
108/* (1 << 25) must not be used -- it collides with flags on sparc */
109
98110#define F_DUPFD 0 /* dup */
99111#define F_GETFD 1 /* get close_on_exec */
100112#define F_SETFD 2 /* set/clear close_on_exec */
lib/libc/include/any-linux-any/drm/amdxdna_accel.h+25-2
......@@ -18,6 +18,7 @@ extern "C" {
1818#define AMDXDNA_INVALID_CTX_HANDLE 0
1919#define AMDXDNA_INVALID_BO_HANDLE 0
2020#define AMDXDNA_INVALID_FENCE_HANDLE 0
21#define AMDXDNA_INVALID_DOORBELL_OFFSET (~0U)
2122
2223/*
2324 * Define hardware context priority
......@@ -29,7 +30,9 @@ extern "C" {
2930
3031enum amdxdna_device_type {
3132 AMDXDNA_DEV_TYPE_UNKNOWN = -1,
32 AMDXDNA_DEV_TYPE_KMQ,
33 AMDXDNA_DEV_TYPE_KMQ = 0,
34 AMDXDNA_DEV_TYPE_UMQ = 1,
35 AMDXDNA_DEV_TYPE_PF = 2,
3336};
3437
3538enum amdxdna_drm_ioctl_id {
......@@ -42,7 +45,8 @@ enum amdxdna_drm_ioctl_id {
4245 DRM_AMDXDNA_EXEC_CMD,
4346 DRM_AMDXDNA_GET_INFO,
4447 DRM_AMDXDNA_SET_STATE,
45 DRM_AMDXDNA_GET_ARRAY = 10,
48 DRM_AMDXDNA_WAIT_CMD,
49 DRM_AMDXDNA_GET_ARRAY,
4650};
4751
4852/**
......@@ -271,6 +275,21 @@ struct amdxdna_drm_exec_cmd {
271275 __u64 seq;
272276};
273277
278/**
279 * struct amdxdna_drm_wait_cmd - Wait execution command.
280 *
281 * @hwctx: Context handle.
282 * @timeout: timeout in ms, 0 implies infinite wait.
283 * @seq: sequence number of the command returned by execute command.
284 *
285 * Wait a command specified by seq to be completed.
286 */
287struct amdxdna_drm_wait_cmd {
288 __u32 hwctx;
289 __u32 timeout;
290 __u64 seq;
291};
292
274293/**
275294 * struct amdxdna_drm_query_aie_status - Query the status of the AIE hardware
276295 * @buffer: The user space buffer that will return the AIE status.
......@@ -736,6 +755,10 @@ struct amdxdna_drm_set_power_mode {
736755 DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_ARRAY, \
737756 struct amdxdna_drm_get_array)
738757
758#define DRM_IOCTL_AMDXDNA_WAIT_CMD \
759 DRM_IOW(DRM_COMMAND_BASE + DRM_AMDXDNA_WAIT_CMD, \
760 struct amdxdna_drm_wait_cmd)
761
739762#if defined(__cplusplus)
740763} /* extern c end */
741764#endif
lib/libc/include/any-linux-any/drm/drm.h+8-19
......@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: MIT */
12/*
23 * Header for the Direct Rendering Manager
34 *
......@@ -11,25 +12,6 @@
1112 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
1213 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
1314 * All rights reserved.
14 *
15 * Permission is hereby granted, free of charge, to any person obtaining a
16 * copy of this software and associated documentation files (the "Software"),
17 * to deal in the Software without restriction, including without limitation
18 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
19 * and/or sell copies of the Software, and to permit persons to whom the
20 * Software is furnished to do so, subject to the following conditions:
21 *
22 * The above copyright notice and this permission notice (including the next
23 * paragraph) shall be included in all copies or substantial portions of the
24 * Software.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
30 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
31 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
32 * OTHER DEALINGS IN THE SOFTWARE.
3315 */
3416
3517#ifndef _DRM_H_
......@@ -1317,6 +1299,13 @@ extern "C" {
13171299 */
13181300#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
13191301
1302/**
1303 * DRM_IOCTL_SYNCOBJ_EVENTFD - Register an eventfd to be signalled by a syncobj.
1304 *
1305 * This can be used to integrate a syncobj in an event loop.
1306 *
1307 * The IOCTL argument is a struct drm_syncobj_eventfd.
1308 */
13201309#define DRM_IOCTL_SYNCOBJ_EVENTFD DRM_IOWR(0xCF, struct drm_syncobj_eventfd)
13211310
13221311/**
lib/libc/include/any-linux-any/drm/drm_fourcc.h+32-22
......@@ -1,24 +1,6 @@
1/* SPDX-License-Identifier: MIT */
12/*
23 * Copyright 2011 Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
224 */
235
246#ifndef DRM_FOURCC_H
......@@ -242,9 +224,9 @@ extern "C" {
242224 * [31:0] sign:exponent:mantissa 1:8:23
243225 */
244226#define DRM_FORMAT_R32F fourcc_code('R', ' ', ' ', 'F') /* [31:0] R 32 little endian */
245#define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] R:G 32:32 little endian */
246#define DRM_FORMAT_BGR323232F fourcc_code('B', 'G', 'R', 'F') /* [95:0] R:G:B 32:32:32 little endian */
247#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') /* [127:0] R:G:B:A 32:32:32:32 little endian */
227#define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] G:R 32:32 little endian */
228#define DRM_FORMAT_BGR323232F fourcc_code('B', 'G', 'R', 'F') /* [95:0] B:G:R 32:32:32 little endian */
229#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') /* [127:0] A:B:G:R 32:32:32:32 little endian */
248230
249231/*
250232 * RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits
......@@ -264,6 +246,7 @@ extern "C" {
264246#define DRM_FORMAT_XVUY8888 fourcc_code('X', 'V', 'U', 'Y') /* [31:0] X:Cr:Cb:Y 8:8:8:8 little endian */
265247#define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4') /* [23:0] Cr:Cb:Y 8:8:8 little endian */
266248#define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0') /* Y followed by U then V, 10:10:10. Non-linear modifier only */
249#define DRM_FORMAT_XVUY2101010 fourcc_code('X', 'Y', '3', '0') /* [31:0] x:Cr:Cb:Y 2:10:10:10 little endian */
267250
268251/*
269252 * packed Y2xx indicate for each component, xx valid data occupy msb
......@@ -379,6 +362,14 @@ extern "C" {
379362 */
380363#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */
381364
365/*
366 * 2 plane YCbCr422.
367 * 3 10 bit components and 2 padding bits packed into 4 bytes.
368 * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian
369 * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian
370 */
371#define DRM_FORMAT_P230 fourcc_code('P', '2', '3', '0') /* 2x1 subsampled Cr:Cb plane 10 bits per channel packed */
372
382373/* 3 plane non-subsampled (444) YCbCr
383374 * 16 bits per component, but only 10 bits are used and 6 bits are padded
384375 * index 0: Y plane, [15:0] Y:x [10:6] little endian
......@@ -395,6 +386,15 @@ extern "C" {
395386 */
396387#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1')
397388
389/*
390 * 3 plane non-subsampled (444) YCbCr LSB aligned
391 * 10 bpc, 30 bits per sample image data in a single contiguous buffer.
392 * index 0: Y plane, [31:0] x:Y2:Y1:Y0 [2:10:10:10] little endian
393 * index 1: Cb plane, [31:0] x:Cb2:Cb1:Cb0 [2:10:10:10] little endian
394 * index 2: Cr plane, [31:0] x:Cr2:Cr1:Cr0 [2:10:10:10] little endian
395 */
396#define DRM_FORMAT_T430 fourcc_code('T', '4', '3', '0')
397
398398/*
399399 * 3 plane YCbCr LSB aligned
400400 * In order to use these formats in a similar fashion to MSB aligned ones
......@@ -451,6 +451,16 @@ extern "C" {
451451#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
452452#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
453453
454/*
455 * Y-only (greyscale) formats
456 *
457 * The Y-only formats are handled similarly to the YCbCr formats in the display
458 * pipeline, with the Cb and Cr implicitly neutral (0.0 in nominal values). This
459 * also means that COLOR_RANGE property applies to the Y-only formats.
460 */
461
462#define DRM_FORMAT_Y8 fourcc_code('G', 'R', 'E', 'Y') /* 8-bit Y-only */
463#define DRM_FORMAT_XYYY2101010 fourcc_code('Y', 'P', 'A', '4') /* [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian */
454464
455465/*
456466 * Format Modifiers:
lib/libc/include/any-linux-any/drm/drm_mode.h+1-18
......@@ -1,27 +1,10 @@
1/* SPDX-License-Identifier: MIT */
12/*
23 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
34 * Copyright (c) 2007 Jakob Bornecrantz <wallbraker@gmail.com>
45 * Copyright (c) 2008 Red Hat Inc.
56 * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
67 * Copyright (c) 2007-2008 Intel Corporation
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 * IN THE SOFTWARE.
258 */
269
2710#ifndef _DRM_MODE_H
lib/libc/include/any-linux-any/drm/drm_ras.h+1
......@@ -41,6 +41,7 @@ enum {
4141enum {
4242 DRM_RAS_CMD_LIST_NODES = 1,
4343 DRM_RAS_CMD_GET_ERROR_COUNTER,
44 DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
4445
4546 __DRM_RAS_CMD_MAX,
4647 DRM_RAS_CMD_MAX = (__DRM_RAS_CMD_MAX - 1)
lib/libc/include/any-linux-any/drm/drm_sarea.h+1-19
......@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: MIT */
12/**
23 * \file drm_sarea.h
34 * \brief SAREA definitions
......@@ -8,25 +9,6 @@
89/*
910 * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
1011 * All Rights Reserved.
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice (including the next
20 * paragraph) shall be included in all copies or substantial portions of the
21 * Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 * OTHER DEALINGS IN THE SOFTWARE.
3012 */
3113
3214#ifndef _DRM_SAREA_H_
lib/libc/include/any-linux-any/drm/msm_drm.h+48
......@@ -491,6 +491,52 @@ struct drm_msm_submitqueue_query {
491491 __u32 pad;
492492};
493493
494#define MSM_PERFCNTR_STREAM 0x00000001
495#define MSM_PERFCNTR_UPDATE 0x00000002
496#define MSM_PERFCNTR_FLAGS ( \
497 MSM_PERFCNTR_STREAM | \
498 MSM_PERFCNTR_UPDATE | \
499 0)
500
501struct drm_msm_perfcntr_group {
502 char group_name[16];
503 __u32 nr_countables;
504 __u32 pad; /* mbz */
505 __u64 countables; /* pointer to an array of nr_countables u32 */
506};
507
508/*
509 * Note, for MSM_PERFCNTR_STREAM, the ioctl returns an fd to read recorded
510 * counters. This only works because the ioctl is DRM_IOW(), if we returned
511 * a out param in the ioctl struct the copy_to_user() (in drm_ioctl())
512 * could fault, causing us to leak the fd.
513 *
514 * If the ioctl returns with error E2BIG, that means more counters/countables
515 * are requested than are currently available. If MSM_PERFCNTR_UPDATE flag
516 * is set, drm_msm_perfcntr_group::nr_countables will be updated to return
517 * the actual # of counters available.
518 *
519 * The data read from the has the following format for each sampling period:
520 *
521 * uint64_t timestamp; // CP_ALWAYS_ON_COUNTER captured at sample time
522 * uint32_t seqno; // increments by 1 each period, reset to 0 on discontinuity
523 * uint32_t mbz; // pad out counters to 64b
524 * struct {
525 * uint64_t counter[nr_countables];
526 * } groups[nr_groups];
527 *
528 * The ordering of groups and counters matches the order in PERFCNTR_CONFIG
529 * ioctl.
530 */
531struct drm_msm_perfcntr_config {
532 __u32 flags; /* bitmask of MSM_PERFCNTR_x */
533 __u32 nr_groups; /* # of entries in groups array */
534 __u64 groups; /* pointer to array of drm_msm_perfcntr_group */
535 __u64 period; /* sampling period in ns */
536 __u32 bufsz_shift; /* sample buffer size in bytes is 1<<bufsz_shift */
537 __u32 group_stride; /* sizeof(struct drm_msm_perfcntr_group) */
538};
539
494540#define DRM_MSM_GET_PARAM 0x00
495541#define DRM_MSM_SET_PARAM 0x01
496542#define DRM_MSM_GEM_NEW 0x02
......@@ -507,6 +553,7 @@ struct drm_msm_submitqueue_query {
507553#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B
508554#define DRM_MSM_SUBMITQUEUE_QUERY 0x0C
509555#define DRM_MSM_VM_BIND 0x0D
556#define DRM_MSM_PERFCNTR_CONFIG 0x0E
510557
511558#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
512559#define DRM_IOCTL_MSM_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param)
......@@ -521,6 +568,7 @@ struct drm_msm_submitqueue_query {
521568#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32)
522569#define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query)
523570#define DRM_IOCTL_MSM_VM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_VM_BIND, struct drm_msm_vm_bind)
571#define DRM_IOCTL_MSM_PERFCNTR_CONFIG DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_PERFCNTR_CONFIG, struct drm_msm_perfcntr_config)
524572
525573#if defined(__cplusplus)
526574}
lib/libc/include/any-linux-any/drm/tegra_drm.h+16
......@@ -304,6 +304,7 @@ struct drm_tegra_cmdbuf {
304304 * struct drm_tegra_reloc - GEM object relocation structure
305305 */
306306struct drm_tegra_reloc {
307 /** @cmdbuf: cmd information */
307308 struct {
308309 /**
309310 * @cmdbuf.handle:
......@@ -321,6 +322,7 @@ struct drm_tegra_reloc {
321322 */
322323 __u32 offset;
323324 } cmdbuf;
325 /** @target: relocate target information */
324326 struct {
325327 /**
326328 * @target.handle:
......@@ -778,6 +780,9 @@ struct drm_tegra_channel_unmap {
778780/* Submission */
779781
780782/**
783 * define DRM_TEGRA_SUBMIT_RELOC_SECTOR_LAYOUT - \
784 * Select sector layout swizzling for in-memory buffers.
785 *
781786 * Specify that bit 39 of the patched-in address should be set to switch
782787 * swizzling between Tegra and non-Tegra sector layout on systems that store
783788 * surfaces in system memory in non-Tegra sector layout.
......@@ -830,16 +835,27 @@ struct drm_tegra_submit_buf {
830835};
831836
832837/**
838 * define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR - \
839 * Execute Host1x opcodes from user pointer.
840 *
833841 * Execute `words` words of Host1x opcodes specified in the `gather_data_ptr`
834842 * buffer. Each GATHER_UPTR command uses successive words from the buffer.
835843 */
836844#define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR 0
845
837846/**
847 * define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT - \
848 * Wait for syncpoint (absolute).
849 *
838850 * Wait for a syncpoint to reach a value before continuing with further
839851 * commands.
840852 */
841853#define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT 1
854
842855/**
856 * define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT_RELATIVE - \
857 * Wait for syncpoint (relative).
858 *
843859 * Wait for a syncpoint to reach a value before continuing with further
844860 * commands. The threshold is calculated relative to the start of the job.
845861 */
lib/libc/include/any-linux-any/drm/virtgpu_drm.h+5
......@@ -98,6 +98,7 @@ struct drm_virtgpu_execbuffer {
9898#define VIRTGPU_PARAM_CONTEXT_INIT 6 /* DRM_VIRTGPU_CONTEXT_INIT */
9999#define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs 7 /* Bitmask of supported capability set ids */
100100#define VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME 8 /* Ability to set debug name from userspace */
101#define VIRTGPU_PARAM_BLOB_ALIGNMENT 9 /* Device alignment requirements for blobs */
101102
102103struct drm_virtgpu_getparam {
103104 __u64 param;
......@@ -200,6 +201,10 @@ struct drm_virtgpu_resource_create_blob {
200201 __u32 cmd_size;
201202 __u64 cmd;
202203 __u64 blob_id;
204
205#define DRM_VIRTGPU_BLOB_FLAG_HINT_DEFER_MAPPING 0x0001
206 __u32 blob_hints;
207 __u32 pad2;
203208};
204209
205210#define VIRTGPU_CONTEXT_PARAM_CAPSET_ID 0x0001
lib/libc/include/any-linux-any/drm/xe_drm.h+103-103
......@@ -83,6 +83,7 @@ extern "C" {
8383 * - &DRM_IOCTL_XE_OBSERVATION
8484 * - &DRM_IOCTL_XE_MADVISE
8585 * - &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
86 * - &DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY
8687 * - &DRM_IOCTL_XE_VM_GET_PROPERTY
8788 */
8889
......@@ -167,7 +168,7 @@ extern "C" {
167168 * Typically the struct drm_xe_user_extension would be embedded in some uAPI
168169 * struct, and in this case we would feed it the head of the chain(i.e ext1),
169170 * which would then apply all of the above extensions.
170*/
171 */
171172
172173/**
173174 * struct drm_xe_user_extension - Base class for defining a chain of extensions
......@@ -229,9 +230,9 @@ struct drm_xe_ext_set_property {
229230/**
230231 * struct drm_xe_engine_class_instance - instance of an engine class
231232 *
232 * It is returned as part of the @drm_xe_engine, but it also is used as
233 * the input of engine selection for both @drm_xe_exec_queue_create and
234 * @drm_xe_query_engine_cycles
233 * It is returned as part of the &struct drm_xe_engine, but it also is used as
234 * the input of engine selection for both &struct drm_xe_exec_queue_create and
235 * &struct drm_xe_query_engine_cycles
235236 *
236237 * The @engine_class can be:
237238 * - %DRM_XE_ENGINE_CLASS_RENDER
......@@ -264,7 +265,7 @@ struct drm_xe_engine_class_instance {
264265 * struct drm_xe_engine - describe hardware engine
265266 */
266267struct drm_xe_engine {
267 /** @instance: The @drm_xe_engine_class_instance */
268 /** @instance: The &struct drm_xe_engine_class_instance */
268269 struct drm_xe_engine_class_instance instance;
269270
270271 /** @reserved: Reserved */
......@@ -274,9 +275,9 @@ struct drm_xe_engine {
274275/**
275276 * struct drm_xe_query_engines - describe engines
276277 *
277 * If a query is made with a struct @drm_xe_device_query where .query
278 * If a query is made with a &struct drm_xe_device_query where .query
278279 * is equal to %DRM_XE_DEVICE_QUERY_ENGINES, then the reply uses an array of
279 * struct @drm_xe_query_engines in .data.
280 * &struct drm_xe_query_engines in .data.
280281 */
281282struct drm_xe_query_engines {
282283 /** @num_engines: number of engines returned in @engines */
......@@ -349,7 +350,7 @@ struct drm_xe_mem_region {
349350 * is smaller than @total_size then this is referred to as a
350351 * small BAR system.
351352 *
352 * On systems without small BAR (full BAR), the probed_size will
353 * On systems without small BAR (full BAR), the @cpu_visible_size will
353354 * always equal the @total_size, since all of it will be CPU
354355 * accessible.
355356 *
......@@ -410,7 +411,7 @@ struct drm_xe_query_mem_regions {
410411 * device supports the userspace hint %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION.
411412 * This is exposed only on Xe2+.
412413 * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_DISABLE_STATE_CACHE_PERF_FIX - Flag is set
413 * if a queue can be creaed with
414 * if a queue can be created with
414415 * %DRM_XE_EXEC_QUEUE_SET_DISABLE_STATE_CACHE_PERF_FIX
415416 * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
416417 * required by this device, typically SZ_4K or SZ_64K
......@@ -705,7 +706,10 @@ struct drm_xe_query_pxp_status {
705706 * attributes.
706707 * - %DRM_XE_DEVICE_QUERY_GT_TOPOLOGY
707708 * - %DRM_XE_DEVICE_QUERY_ENGINE_CYCLES
709 * - %DRM_XE_DEVICE_QUERY_UC_FW_VERSION
710 * - %DRM_XE_DEVICE_QUERY_OA_UNITS
708711 * - %DRM_XE_DEVICE_QUERY_PXP_STATUS
712 * - %DRM_XE_DEVICE_QUERY_EU_STALL
709713 *
710714 * If size is set to 0, the driver fills it with the required size for
711715 * the requested type of data to query. If size is equal to the required
......@@ -825,7 +829,7 @@ struct drm_xe_device_query {
825829 *
826830 * This ioctl supports setting the following properties via the
827831 * %DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY extension, which uses the
828 * generic @drm_xe_ext_set_property struct:
832 * generic &struct drm_xe_ext_set_property:
829833 *
830834 * - %DRM_XE_GEM_CREATE_SET_PROPERTY_PXP_TYPE - set the type of PXP session
831835 * this object will be used with. Valid values are listed in enum
......@@ -862,8 +866,7 @@ struct drm_xe_gem_create {
862866#define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2)
863867#define DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION (1 << 3)
864868 /**
865 * @flags: Flags, currently a mask of memory instances of where BO can
866 * be placed
869 * @flags: Flags for the GEM object, see DRM_XE_GEM_CREATE_FLAG_*
867870 */
868871 __u32 flags;
869872
......@@ -888,7 +891,7 @@ struct drm_xe_gem_create {
888891#define DRM_XE_GEM_CPU_CACHING_WC 2
889892 /**
890893 * @cpu_caching: The CPU caching mode to select for this object. If
891 * mmaping the object the mode selected here will also be used. The
894 * mmapping the object the mode selected here will also be used. The
892895 * exception is when mapping system memory (including data evicted
893896 * to system) on discrete GPUs. The caching mode selected will
894897 * then be overridden to DRM_XE_GEM_CPU_CACHING_WB, and coherency
......@@ -931,7 +934,7 @@ struct drm_xe_gem_create {
931934 *
932935 * err = ioctl(fd, DRM_IOCTL_XE_GEM_MMAP_OFFSET, &mmo);
933936 * map = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, mmo.offset);
934 * map[i] = 0xdeadbeaf; // issue barrier
937 * map[i] = 0xdeadbeef; // issue barrier
935938 */
936939struct drm_xe_gem_mmap_offset {
937940 /** @extensions: Pointer to the first extension struct, if any */
......@@ -958,8 +961,8 @@ struct drm_xe_gem_mmap_offset {
958961 * - %DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE - Map the whole virtual address
959962 * space of the VM to scratch page. A vm_bind would overwrite the scratch
960963 * page mapping. This flag is mutually exclusive with the
961 * %DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception of on x2 and
962 * xe3 platform.
964 * %DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception on Xe2 and
965 * Xe3 platforms.
963966 * - %DRM_XE_VM_CREATE_FLAG_LR_MODE - An LR, or Long Running VM accepts
964967 * exec submissions to its exec_queues that don't have an upper time
965968 * limit on the job execution time. But exec submissions to these
......@@ -1045,7 +1048,7 @@ struct drm_xe_vm_destroy {
10451048 * set, no mappings are created rather the range is reserved for CPU address
10461049 * mirroring which will be populated on GPU page faults or prefetches. Only
10471050 * valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address
1048 * mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
1051 * mirror flag is only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
10491052 * handle MBZ, and the BO offset MBZ.
10501053 * - %DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET - Can be used in combination with
10511054 * %DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR to reset madvises when the underlying
......@@ -1061,6 +1064,7 @@ struct drm_xe_vm_destroy {
10611064 * not invoke autoreset. Neither will stack variables going out of scope.
10621065 * Therefore it's recommended to always explicitly reset the madvises when
10631066 * freeing the memory backing a region used in a &DRM_IOCTL_XE_MADVISE call.
1067 *
10641068 * - %DRM_XE_VM_BIND_FLAG_DECOMPRESS - Request on-device decompression for a MAP.
10651069 * When set on a MAP bind operation, request the driver schedule an on-device
10661070 * in-place decompression (via the migrate/resolve path) for the GPU mapping
......@@ -1109,7 +1113,7 @@ struct drm_xe_vm_bind_op {
11091113 * ppGTT WT -> COH_NONE
11101114 * ppGTT WB -> COH_AT_LEAST_1WAY
11111115 *
1112 * In practice UC/WC/WT should only ever used for scanout surfaces on
1116 * In practice UC/WC/WT should only ever be used for scanout surfaces on
11131117 * such platforms (or perhaps in general for dma-buf if shared with
11141118 * another device) since it is only the display engine that is actually
11151119 * incoherent. Everything else should typically use WB given that we
......@@ -1199,10 +1203,10 @@ struct drm_xe_vm_bind_op {
11991203/**
12001204 * struct drm_xe_vm_bind - Input of &DRM_IOCTL_XE_VM_BIND
12011205 *
1202 * Below is an example of a minimal use of @drm_xe_vm_bind to
1206 * Below is an example of a minimal use of &struct drm_xe_vm_bind to
12031207 * asynchronously bind the buffer `data` at address `BIND_ADDRESS` to
12041208 * illustrate `userptr`. It can be synchronized by using the example
1205 * provided for @drm_xe_sync.
1209 * provided for &struct drm_xe_sync.
12061210 *
12071211 * .. code-block:: C
12081212 *
......@@ -1355,7 +1359,7 @@ struct drm_xe_vm_get_property {
13551359 *
13561360 * This ioctl supports setting the following properties via the
13571361 * %DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY extension, which uses the
1358 * generic @drm_xe_ext_set_property struct:
1362 * generic &struct drm_xe_ext_set_property:
13591363 *
13601364 * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY - set the queue priority.
13611365 * CAP_SYS_NICE is required to set a value above normal.
......@@ -1366,7 +1370,7 @@ struct drm_xe_vm_get_property {
13661370 * drm_xe_pxp_session_type. %DRM_XE_PXP_TYPE_NONE is the default behavior, so
13671371 * there is no need to explicitly set that. When a queue of type
13681372 * %DRM_XE_PXP_TYPE_HWDRM is created, the PXP default HWDRM session
1369 * (%XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if isn't already running.
1373 * (%DRM_XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if it isn't already running.
13701374 * The user is expected to query the PXP status via the query ioctl (see
13711375 * %DRM_XE_DEVICE_QUERY_PXP_STATUS) and to wait for PXP to be ready before
13721376 * attempting to create a queue with this property. When a queue is created
......@@ -1390,9 +1394,9 @@ struct drm_xe_vm_get_property {
13901394 * enable render color cache keying on BTP+BTI instead of just BTI
13911395 * (only valid for render queues).
13921396 *
1393 * The example below shows how to use @drm_xe_exec_queue_create to create
1397 * The example below shows how to use &struct drm_xe_exec_queue_create to create
13941398 * a simple exec_queue (no parallel submission) of class
1395 * &DRM_XE_ENGINE_CLASS_RENDER.
1399 * %DRM_XE_ENGINE_CLASS_RENDER.
13961400 *
13971401 * .. code-block:: C
13981402 *
......@@ -1402,23 +1406,25 @@ struct drm_xe_vm_get_property {
14021406 * struct drm_xe_exec_queue_create exec_queue_create = {
14031407 * .extensions = 0,
14041408 * .vm_id = vm,
1405 * .num_bb_per_exec = 1,
1406 * .num_eng_per_bb = 1,
1409 * .width = 1,
1410 * .num_placements = 1,
14071411 * .instances = to_user_pointer(&instance),
14081412 * };
14091413 * ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create);
14101414 *
1411 * Allow users to provide a hint to kernel for cases demanding low latency
1412 * profile. Please note it will have impact on power consumption. User can
1413 * indicate low latency hint with flag while creating exec queue as
1414 * mentioned below,
1415 * Allow users to provide a hint to kernel for cases demanding low latency
1416 * profile. Please note it will have impact on power consumption. User can
1417 * indicate low latency hint with flag while creating exec queue as
1418 * mentioned below:
1419 *
1420 * .. code-block:: C
14151421 *
14161422 * struct drm_xe_exec_queue_create exec_queue_create = {
14171423 * .flags = DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT,
14181424 * .extensions = 0,
14191425 * .vm_id = vm,
1420 * .num_bb_per_exec = 1,
1421 * .num_eng_per_bb = 1,
1426 * .width = 1,
1427 * .num_placements = 1,
14221428 * .instances = to_user_pointer(&instance),
14231429 * };
14241430 * ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create);
......@@ -1515,7 +1521,7 @@ struct drm_xe_exec_queue_get_property {
15151521 * and the @flags can be:
15161522 * - %DRM_XE_SYNC_FLAG_SIGNAL
15171523 *
1518 * A minimal use of @drm_xe_sync looks like this:
1524 * A minimal use of &struct drm_xe_sync looks like this:
15191525 *
15201526 * .. code-block:: C
15211527 *
......@@ -1546,7 +1552,7 @@ struct drm_xe_sync {
15461552#define DRM_XE_SYNC_TYPE_SYNCOBJ 0x0
15471553#define DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ 0x1
15481554#define DRM_XE_SYNC_TYPE_USER_FENCE 0x2
1549 /** @type: Type of the this sync object */
1555 /** @type: Type of this sync object */
15501556 __u32 type;
15511557
15521558#define DRM_XE_SYNC_FLAG_SIGNAL (1 << 0)
......@@ -1559,9 +1565,9 @@ struct drm_xe_sync {
15591565
15601566 /**
15611567 * @addr: Address of user fence. When sync is passed in via exec
1562 * IOCTL this is a GPU address in the VM. When sync passed in via
1568 * IOCTL this is a GPU address in the VM. When sync is passed in via
15631569 * VM bind IOCTL this is a user pointer. In either case, it is
1564 * the users responsibility that this address is present and
1570 * the user's responsibility that this address is present and
15651571 * mapped when the user fence is signalled. Must be qword
15661572 * aligned.
15671573 */
......@@ -1581,10 +1587,10 @@ struct drm_xe_sync {
15811587/**
15821588 * struct drm_xe_exec - Input of &DRM_IOCTL_XE_EXEC
15831589 *
1584 * This is an example to use @drm_xe_exec for execution of the object
1585 * at BIND_ADDRESS (see example in @drm_xe_vm_bind) by an exec_queue
1586 * (see example in @drm_xe_exec_queue_create). It can be synchronized
1587 * by using the example provided for @drm_xe_sync.
1590 * This is an example to use &struct drm_xe_exec for execution of the object
1591 * at BIND_ADDRESS (see example in &struct drm_xe_vm_bind) by an exec_queue
1592 * (see example in &struct drm_xe_exec_queue_create). It can be synchronized
1593 * by using the example provided for &struct drm_xe_sync.
15881594 *
15891595 * .. code-block:: C
15901596 *
......@@ -1651,7 +1657,6 @@ struct drm_xe_exec {
16511657 *
16521658 * and the @flags can be:
16531659 * - %DRM_XE_UFENCE_WAIT_FLAG_ABSTIME
1654 * - %DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP
16551660 *
16561661 * The @mask values can be for example:
16571662 * - 0xffu for u8
......@@ -1664,7 +1669,7 @@ struct drm_xe_wait_user_fence {
16641669 __u64 extensions;
16651670
16661671 /**
1667 * @addr: user pointer address to wait on, must qword aligned
1672 * @addr: user pointer address to wait on, must be qword aligned
16681673 */
16691674 __u64 addr;
16701675
......@@ -1695,9 +1700,9 @@ struct drm_xe_wait_user_fence {
16951700 * Without DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag set (relative timeout)
16961701 * it contains timeout expressed in nanoseconds to wait (fence will
16971702 * expire at now() + timeout).
1698 * When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flat is set (absolute timeout) wait
1699 * will end at timeout (uses system MONOTONIC_CLOCK).
1700 * Passing negative timeout leads to neverending wait.
1703 * When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag is set (absolute timeout) wait
1704 * will end at timeout (uses system CLOCK_MONOTONIC).
1705 * Passing negative timeout leads to never ending wait.
17011706 *
17021707 * On relative timeout this value is updated with timeout left
17031708 * (for restarting the call in case of signal delivery).
......@@ -1741,7 +1746,7 @@ enum drm_xe_observation_op {
17411746};
17421747
17431748/**
1744 * struct drm_xe_observation_param - Input of &DRM_XE_OBSERVATION
1749 * struct drm_xe_observation_param - Input of &DRM_IOCTL_XE_OBSERVATION
17451750 *
17461751 * The observation layer enables multiplexing observation streams of
17471752 * multiple types. The actual params for a particular stream operation are
......@@ -1751,25 +1756,25 @@ enum drm_xe_observation_op {
17511756struct drm_xe_observation_param {
17521757 /** @extensions: Pointer to the first extension struct, if any */
17531758 __u64 extensions;
1754 /** @observation_type: observation stream type, of enum @drm_xe_observation_type */
1759 /** @observation_type: observation stream type, of &enum drm_xe_observation_type */
17551760 __u64 observation_type;
1756 /** @observation_op: observation stream op, of enum @drm_xe_observation_op */
1761 /** @observation_op: observation stream op, of &enum drm_xe_observation_op */
17571762 __u64 observation_op;
17581763 /** @param: Pointer to actual stream params */
17591764 __u64 param;
17601765};
17611766
17621767/**
1763 * enum drm_xe_observation_ioctls - Observation stream fd ioctl's
1768 * enum drm_xe_observation_ioctls - Observation stream fd ioctls
17641769 *
17651770 * Information exchanged between userspace and kernel for observation fd
1766 * ioctl's is stream type specific
1771 * ioctls is stream type specific
17671772 */
17681773enum drm_xe_observation_ioctls {
17691774 /** @DRM_XE_OBSERVATION_IOCTL_ENABLE: Enable data capture for an observation stream */
17701775 DRM_XE_OBSERVATION_IOCTL_ENABLE = _IO('i', 0x0),
17711776
1772 /** @DRM_XE_OBSERVATION_IOCTL_DISABLE: Disable data capture for a observation stream */
1777 /** @DRM_XE_OBSERVATION_IOCTL_DISABLE: Disable data capture for an observation stream */
17731778 DRM_XE_OBSERVATION_IOCTL_DISABLE = _IO('i', 0x1),
17741779
17751780 /** @DRM_XE_OBSERVATION_IOCTL_CONFIG: Change observation stream configuration */
......@@ -1812,7 +1817,7 @@ struct drm_xe_oa_unit {
18121817 /** @oa_unit_id: OA unit ID */
18131818 __u32 oa_unit_id;
18141819
1815 /** @oa_unit_type: OA unit type of @drm_xe_oa_unit_type */
1820 /** @oa_unit_type: OA unit type of &enum drm_xe_oa_unit_type */
18161821 __u32 oa_unit_type;
18171822
18181823 /** @capabilities: OA capabilities bit-mask */
......@@ -1875,7 +1880,7 @@ struct drm_xe_query_oa_units {
18751880 /** @pad: MBZ */
18761881 __u32 pad;
18771882 /**
1878 * @oa_units: struct @drm_xe_oa_unit array returned for this device.
1883 * @oa_units: &struct drm_xe_oa_unit array returned for this device.
18791884 * Written below as a u64 array to avoid problems with nested flexible
18801885 * arrays with some compilers
18811886 */
......@@ -1902,24 +1907,24 @@ enum drm_xe_oa_format_type {
19021907};
19031908
19041909/**
1905 * enum drm_xe_oa_property_id - OA stream property id's
1910 * enum drm_xe_oa_property_id - OA stream property IDs
19061911 *
1907 * Stream params are specified as a chain of @drm_xe_ext_set_property
1908 * struct's, with @property values from enum @drm_xe_oa_property_id and
1909 * @drm_xe_user_extension base.name set to @DRM_XE_OA_EXTENSION_SET_PROPERTY.
1910 * @param field in struct @drm_xe_observation_param points to the first
1911 * @drm_xe_ext_set_property struct.
1912 * Stream params are specified as a chain of &struct drm_xe_ext_set_property
1913 * structs, with property values from &enum drm_xe_oa_property_id and
1914 * &struct drm_xe_user_extension base.name set to %DRM_XE_OA_EXTENSION_SET_PROPERTY.
1915 * The param field in &struct drm_xe_observation_param points to the first
1916 * &struct drm_xe_ext_set_property struct.
19121917 *
19131918 * Exactly the same mechanism is also used for stream reconfiguration using the
1914 * @DRM_XE_OBSERVATION_IOCTL_CONFIG observation stream fd ioctl, though only a
1919 * %DRM_XE_OBSERVATION_IOCTL_CONFIG observation stream fd ioctl, though only a
19151920 * subset of properties below can be specified for stream reconfiguration.
19161921 */
19171922enum drm_xe_oa_property_id {
19181923#define DRM_XE_OA_EXTENSION_SET_PROPERTY 0
19191924 /**
19201925 * @DRM_XE_OA_PROPERTY_OA_UNIT_ID: ID of the OA unit on which to open
1921 * the OA stream, see @oa_unit_id in 'struct
1922 * drm_xe_query_oa_units'. Defaults to 0 if not provided.
1926 * the OA stream, see oa_unit_id in &struct drm_xe_oa_unit.
1927 * Defaults to 0 if not provided.
19231928 */
19241929 DRM_XE_OA_PROPERTY_OA_UNIT_ID = 1,
19251930
......@@ -1932,7 +1937,7 @@ enum drm_xe_oa_property_id {
19321937
19331938 /**
19341939 * @DRM_XE_OA_PROPERTY_OA_METRIC_SET: OA metrics defining contents of OA
1935 * reports, previously added via @DRM_XE_OBSERVATION_OP_ADD_CONFIG.
1940 * reports, previously added via %DRM_XE_OBSERVATION_OP_ADD_CONFIG.
19361941 */
19371942 DRM_XE_OA_PROPERTY_OA_METRIC_SET,
19381943
......@@ -1940,7 +1945,7 @@ enum drm_xe_oa_property_id {
19401945 DRM_XE_OA_PROPERTY_OA_FORMAT,
19411946 /*
19421947 * OA_FORMAT's are specified the same way as in PRM/Bspec 52198/60942,
1943 * in terms of the following quantities: a. enum @drm_xe_oa_format_type
1948 * in terms of the following quantities: a. &enum drm_xe_oa_format_type
19441949 * b. Counter select c. Counter size and d. BC report. Also refer to the
19451950 * oa_formats array in drivers/gpu/drm/xe/xe_oa.c.
19461951 */
......@@ -1957,19 +1962,19 @@ enum drm_xe_oa_property_id {
19571962
19581963 /**
19591964 * @DRM_XE_OA_PROPERTY_OA_DISABLED: A value of 1 will open the OA
1960 * stream in a DISABLED state (see @DRM_XE_OBSERVATION_IOCTL_ENABLE).
1965 * stream in a DISABLED state (see %DRM_XE_OBSERVATION_IOCTL_ENABLE).
19611966 */
19621967 DRM_XE_OA_PROPERTY_OA_DISABLED,
19631968
19641969 /**
19651970 * @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID: Open the stream for a specific
1966 * @exec_queue_id. OA queries can be executed on this exec queue.
1971 * exec_queue_id. OA queries can be executed on this exec queue.
19671972 */
19681973 DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID,
19691974
19701975 /**
19711976 * @DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE: Optional engine instance to
1972 * pass along with @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
1977 * pass along with %DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
19731978 */
19741979 DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE,
19751980
......@@ -1981,16 +1986,16 @@ enum drm_xe_oa_property_id {
19811986
19821987 /**
19831988 * @DRM_XE_OA_PROPERTY_NUM_SYNCS: Number of syncs in the sync array
1984 * specified in @DRM_XE_OA_PROPERTY_SYNCS
1989 * specified in %DRM_XE_OA_PROPERTY_SYNCS
19851990 */
19861991 DRM_XE_OA_PROPERTY_NUM_SYNCS,
19871992
19881993 /**
1989 * @DRM_XE_OA_PROPERTY_SYNCS: Pointer to struct @drm_xe_sync array
1990 * with array size specified via @DRM_XE_OA_PROPERTY_NUM_SYNCS. OA
1994 * @DRM_XE_OA_PROPERTY_SYNCS: Pointer to &struct drm_xe_sync array
1995 * with array size specified via %DRM_XE_OA_PROPERTY_NUM_SYNCS. OA
19911996 * configuration will wait till input fences signal. Output fences
19921997 * will signal after the new OA configuration takes effect. For
1993 * @DRM_XE_SYNC_TYPE_USER_FENCE, @addr is a user pointer, similar
1998 * %DRM_XE_SYNC_TYPE_USER_FENCE, addr is a user pointer, similar
19941999 * to the VM bind case.
19952000 */
19962001 DRM_XE_OA_PROPERTY_SYNCS,
......@@ -2013,15 +2018,15 @@ enum drm_xe_oa_property_id {
20132018/**
20142019 * struct drm_xe_oa_config - OA metric configuration
20152020 *
2016 * Multiple OA configs can be added using @DRM_XE_OBSERVATION_OP_ADD_CONFIG. A
2021 * Multiple OA configs can be added using %DRM_XE_OBSERVATION_OP_ADD_CONFIG. A
20172022 * particular config can be specified when opening an OA stream using
2018 * @DRM_XE_OA_PROPERTY_OA_METRIC_SET property.
2023 * %DRM_XE_OA_PROPERTY_OA_METRIC_SET property.
20192024 */
20202025struct drm_xe_oa_config {
20212026 /** @extensions: Pointer to the first extension struct, if any */
20222027 __u64 extensions;
20232028
2024 /** @uuid: String formatted like "%\08x-%\04x-%\04x-%\04x-%\012x" */
2029 /** @uuid: String formatted like "%08x-%04x-%04x-%04x-%012x" */
20252030 char uuid[36];
20262031
20272032 /** @n_regs: Number of regs in @regs_ptr */
......@@ -2036,7 +2041,7 @@ struct drm_xe_oa_config {
20362041
20372042/**
20382043 * struct drm_xe_oa_stream_status - OA stream status returned from
2039 * @DRM_XE_OBSERVATION_IOCTL_STATUS observation stream fd ioctl. Userspace can
2044 * %DRM_XE_OBSERVATION_IOCTL_STATUS observation stream fd ioctl. Userspace can
20402045 * call the ioctl to query stream status in response to EIO errno from
20412046 * observation fd read().
20422047 */
......@@ -2057,7 +2062,7 @@ struct drm_xe_oa_stream_status {
20572062
20582063/**
20592064 * struct drm_xe_oa_stream_info - OA stream info returned from
2060 * @DRM_XE_OBSERVATION_IOCTL_INFO observation stream fd ioctl
2065 * %DRM_XE_OBSERVATION_IOCTL_INFO observation stream fd ioctl
20612066 */
20622067struct drm_xe_oa_stream_info {
20632068 /** @extensions: Pointer to the first extension struct, if any */
......@@ -2094,27 +2099,27 @@ enum drm_xe_pxp_session_type {
20942099 * enum drm_xe_eu_stall_property_id - EU stall sampling input property ids.
20952100 *
20962101 * These properties are passed to the driver at open as a chain of
2097 * @drm_xe_ext_set_property structures with @property set to these
2098 * properties' enums and @value set to the corresponding values of these
2099 * properties. @drm_xe_user_extension base.name should be set to
2100 * @DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY.
2102 * &struct drm_xe_ext_set_property structures with property set to these
2103 * properties' enums and value set to the corresponding values of these
2104 * properties. &struct drm_xe_user_extension base.name should be set to
2105 * %DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY.
21012106 *
21022107 * With the file descriptor obtained from open, user space must enable
2103 * the EU stall stream fd with @DRM_XE_OBSERVATION_IOCTL_ENABLE before
2108 * the EU stall stream fd with %DRM_XE_OBSERVATION_IOCTL_ENABLE before
21042109 * calling read(). EIO errno from read() indicates HW dropped data
21052110 * due to full buffer.
21062111 */
21072112enum drm_xe_eu_stall_property_id {
21082113#define DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY 0
21092114 /**
2110 * @DRM_XE_EU_STALL_PROP_GT_ID: @gt_id of the GT on which
2115 * @DRM_XE_EU_STALL_PROP_GT_ID: gt_id of the GT on which
21112116 * EU stall data will be captured.
21122117 */
21132118 DRM_XE_EU_STALL_PROP_GT_ID = 1,
21142119
21152120 /**
21162121 * @DRM_XE_EU_STALL_PROP_SAMPLE_RATE: Sampling rate in
2117 * GPU cycles from @sampling_rates in struct @drm_xe_query_eu_stall
2122 * GPU cycles from sampling_rates in &struct drm_xe_query_eu_stall
21182123 */
21192124 DRM_XE_EU_STALL_PROP_SAMPLE_RATE,
21202125
......@@ -2129,9 +2134,9 @@ enum drm_xe_eu_stall_property_id {
21292134/**
21302135 * struct drm_xe_query_eu_stall - Information about EU stall sampling.
21312136 *
2132 * If a query is made with a struct @drm_xe_device_query where .query
2133 * is equal to @DRM_XE_DEVICE_QUERY_EU_STALL, then the reply uses
2134 * struct @drm_xe_query_eu_stall in .data.
2137 * If a query is made with a &struct drm_xe_device_query where .query
2138 * is equal to %DRM_XE_DEVICE_QUERY_EU_STALL, then the reply uses
2139 * &struct drm_xe_query_eu_stall in .data.
21352140 */
21362141struct drm_xe_query_eu_stall {
21372142 /** @extensions: Pointer to the first extension struct, if any */
......@@ -2183,7 +2188,7 @@ struct drm_xe_query_eu_stall {
21832188 * .start = 0x100000,
21842189 * .range = 0x2000,
21852190 * .type = DRM_XE_MEM_RANGE_ATTR_ATOMIC,
2186 * .atomic_val = DRM_XE_ATOMIC_DEVICE,
2191 * .atomic.val = DRM_XE_ATOMIC_DEVICE,
21872192 * };
21882193 *
21892194 * ioctl(fd, DRM_IOCTL_XE_MADVISE, &madvise);
......@@ -2242,7 +2247,7 @@ struct drm_xe_madvise {
22422247
22432248 /**
22442249 * @preferred_mem_loc.region_instance : Region instance.
2245 * MBZ if @devmem_fd <= &DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE.
2250 * MBZ if @devmem_fd <= %DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE.
22462251 * Otherwise should point to the desired device
22472252 * VRAM instance of the device indicated by
22482253 * @preferred_mem_loc.devmem_fd.
......@@ -2369,24 +2374,19 @@ struct drm_xe_madvise {
23692374};
23702375
23712376/**
2372 * struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS
2377 * struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
23732378 *
23742379 * This structure is provided by userspace and filled by KMD in response to the
2375 * DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS ioctl. It describes memory attributes of
2376 * a memory ranges within a user specified address range in a VM.
2380 * DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS ioctl. It describes memory attributes of
2381 * memory ranges within a user specified address range in a VM.
23772382 *
23782383 * The structure includes information such as atomic access policy,
23792384 * page attribute table (PAT) index, and preferred memory location.
23802385 * Userspace allocates an array of these structures and passes a pointer to the
2381 * ioctl to retrieve attributes for each memory ranges
2382 *
2383 * @extensions: Pointer to the first extension struct, if any
2384 * @start: Start address of the memory range
2385 * @end: End address of the virtual memory range
2386 *
2386 * ioctl to retrieve attributes for each memory range.
23872387 */
23882388struct drm_xe_mem_range_attr {
2389 /** @extensions: Pointer to the first extension struct, if any */
2389 /** @extensions: Pointer to the first extension struct, if any */
23902390 __u64 extensions;
23912391
23922392 /** @start: start of the memory range */
......@@ -2413,7 +2413,7 @@ struct drm_xe_mem_range_attr {
24132413 __u32 reserved;
24142414 } atomic;
24152415
2416 /** @pat_index: Page attribute table index */
2416 /** @pat_index: Page attribute table index */
24172417 struct {
24182418 /** @pat_index.val: PAT index */
24192419 __u32 val;
......@@ -2427,7 +2427,7 @@ struct drm_xe_mem_range_attr {
24272427};
24282428
24292429/**
2430 * struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_ATTRIBUTES
2430 * struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
24312431 *
24322432 * This structure is used to query memory attributes of memory regions
24332433 * within a user specified address range in a VM. It provides detailed
......@@ -2435,15 +2435,15 @@ struct drm_xe_mem_range_attr {
24352435 * page attribute table (PAT) index, and preferred memory location.
24362436 *
24372437 * Userspace first calls the ioctl with @num_mem_ranges = 0,
2438 * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL to retrieve
2438 * @sizeof_mem_range_attr = 0 and @vector_of_mem_attr = NULL to retrieve
24392439 * the number of memory regions and size of each memory range attribute.
24402440 * Then, it allocates a buffer of that size and calls the ioctl again to fill
24412441 * the buffer with memory range attributes.
24422442 *
24432443 * If second call fails with -ENOSPC, it means memory ranges changed between
24442444 * first call and now, retry IOCTL again with @num_mem_ranges = 0,
2445 * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL followed by
2446 * Second ioctl call.
2445 * @sizeof_mem_range_attr = 0 and @vector_of_mem_attr = NULL followed by
2446 * second ioctl call.
24472447 *
24482448 * Example:
24492449 *
lib/libc/include/any-linux-any/linux/atm_eni.h deleted-24
......@@ -1,24 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atm_eni.h - Driver-specific declarations of the ENI driver (for use by
3 driver-specific utilities) */
4
5/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
6
7
8#ifndef LINUX_ATM_ENI_H
9#define LINUX_ATM_ENI_H
10
11#include <linux/atmioc.h>
12
13
14struct eni_multipliers {
15 int tx,rx; /* values are in percent and must be > 100 */
16};
17
18
19#define ENI_MEMDUMP _IOW('a',ATMIOC_SARPRV,struct atmif_sioc)
20 /* printk memory map */
21#define ENI_SETMULT _IOW('a',ATMIOC_SARPRV+7,struct atmif_sioc)
22 /* set buffer multipliers */
23
24#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atm_he.h deleted-21
......@@ -1,21 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atm_he.h */
3
4#ifndef LINUX_ATM_HE_H
5#define LINUX_ATM_HE_H
6
7#include <linux/atmioc.h>
8
9#define HE_GET_REG _IOW('a', ATMIOC_SARPRV, struct atmif_sioc)
10
11#define HE_REGTYPE_PCI 1
12#define HE_REGTYPE_RCM 2
13#define HE_REGTYPE_TCM 3
14#define HE_REGTYPE_MBOX 4
15
16struct he_ioctl_reg {
17 unsigned addr, val;
18 char type;
19};
20
21#endif /* LINUX_ATM_HE_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atm_idt77105.h deleted-29
......@@ -1,29 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atm_idt77105.h - Driver-specific declarations of the IDT77105 driver (for
3 * use by driver-specific utilities) */
4
5/* Written 1999 by Greg Banks <gnb@linuxfan.com>. Copied from atm_suni.h. */
6
7
8#ifndef LINUX_ATM_IDT77105_H
9#define LINUX_ATM_IDT77105_H
10
11#include <linux/types.h>
12#include <linux/atmioc.h>
13#include <linux/atmdev.h>
14
15/*
16 * Structure for IDT77105_GETSTAT and IDT77105_GETSTATZ ioctls.
17 * Pointed to by `arg' in atmif_sioc.
18 */
19struct idt77105_stats {
20 __u32 symbol_errors; /* wire symbol errors */
21 __u32 tx_cells; /* cells transmitted */
22 __u32 rx_cells; /* cells received */
23 __u32 rx_hec_errors; /* Header Error Check errors on receive */
24};
25
26#define IDT77105_GETSTAT _IOW('a',ATMIOC_PHYPRV+2,struct atmif_sioc) /* get stats */
27#define IDT77105_GETSTATZ _IOW('a',ATMIOC_PHYPRV+3,struct atmif_sioc) /* get stats and zero */
28
29#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atm_nicstar.h deleted-54
......@@ -1,54 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/******************************************************************************
3 *
4 * atm_nicstar.h
5 *
6 * Driver-specific declarations for use by NICSTAR driver specific utils.
7 *
8 * Author: Rui Prior
9 *
10 * (C) INESC 1998
11 *
12 ******************************************************************************/
13
14
15#ifndef LINUX_ATM_NICSTAR_H
16#define LINUX_ATM_NICSTAR_H
17
18/* Note: non-kernel programs including this file must also include
19 * sys/types.h for struct timeval
20 */
21
22#include <linux/atmapi.h>
23#include <linux/atmioc.h>
24
25#define NS_GETPSTAT _IOWR('a',ATMIOC_SARPRV+1,struct atmif_sioc)
26 /* get pool statistics */
27#define NS_SETBUFLEV _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
28 /* set buffer level markers */
29#define NS_ADJBUFLEV _IO('a',ATMIOC_SARPRV+3)
30 /* adjust buffer level */
31
32typedef struct buf_nr
33{
34 unsigned min;
35 unsigned init;
36 unsigned max;
37}buf_nr;
38
39
40typedef struct pool_levels
41{
42 int buftype;
43 int count; /* (At least for now) only used in NS_GETPSTAT */
44 buf_nr level;
45} pool_levels;
46
47/* type must be one of the following: */
48#define NS_BUFTYPE_SMALL 1
49#define NS_BUFTYPE_LARGE 2
50#define NS_BUFTYPE_HUGE 3
51#define NS_BUFTYPE_IOVEC 4
52
53
54#endif /* LINUX_ATM_NICSTAR_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atm_tcp.h deleted-62
......@@ -1,62 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atm_tcp.h - Driver-specific declarations of the ATMTCP driver (for use by
3 driver-specific utilities) */
4
5/* Written 1997-2000 by Werner Almesberger, EPFL LRC/ICA */
6
7
8#ifndef LINUX_ATM_TCP_H
9#define LINUX_ATM_TCP_H
10
11#include <linux/atmapi.h>
12#include <linux/atm.h>
13#include <linux/atmioc.h>
14#include <linux/types.h>
15
16
17/*
18 * All values in struct atmtcp_hdr are in network byte order
19 */
20
21struct atmtcp_hdr {
22 __u16 vpi;
23 __u16 vci;
24 __u32 length; /* ... of data part */
25};
26
27/*
28 * All values in struct atmtcp_command are in host byte order
29 */
30
31#define ATMTCP_HDR_MAGIC (~0) /* this length indicates a command */
32#define ATMTCP_CTRL_OPEN 1 /* request/reply */
33#define ATMTCP_CTRL_CLOSE 2 /* request/reply */
34
35struct atmtcp_control {
36 struct atmtcp_hdr hdr; /* must be first */
37 int type; /* message type; both directions */
38 atm_kptr_t vcc; /* both directions */
39 struct sockaddr_atmpvc addr; /* suggested value from kernel */
40 struct atm_qos qos; /* both directions */
41 int result; /* to kernel only */
42} __ATM_API_ALIGN;
43
44/*
45 * Field usage:
46 * Messge type dir. hdr.v?i type addr qos vcc result
47 * ----------- ---- ------- ---- ---- --- --- ------
48 * OPEN K->D Y Y Y Y Y 0
49 * OPEN D->K - Y Y Y Y Y
50 * CLOSE K->D - - Y - Y 0
51 * CLOSE D->K - - - - Y Y
52 */
53
54#define SIOCSIFATMTCP _IO('a',ATMIOC_ITF) /* set ATMTCP mode */
55#define ATMTCP_CREATE _IO('a',ATMIOC_ITF+14) /* create persistent ATMTCP
56 interface */
57#define ATMTCP_REMOVE _IO('a',ATMIOC_ITF+15) /* destroy persistent ATMTCP
58 interface */
59
60
61
62#endif /* LINUX_ATM_TCP_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atm_zatm.h deleted-47
......@@ -1,47 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atm_zatm.h - Driver-specific declarations of the ZATM driver (for use by
3 driver-specific utilities) */
4
5/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
6
7
8#ifndef LINUX_ATM_ZATM_H
9#define LINUX_ATM_ZATM_H
10
11/*
12 * Note: non-kernel programs including this file must also include
13 * sys/types.h for struct timeval
14 */
15
16#include <linux/atmapi.h>
17#include <linux/atmioc.h>
18
19#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
20 /* get pool statistics */
21#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
22 /* get statistics and zero */
23#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
24 /* set pool parameters */
25
26struct zatm_pool_info {
27 int ref_count; /* free buffer pool usage counters */
28 int low_water,high_water; /* refill parameters */
29 int rqa_count,rqu_count; /* queue condition counters */
30 int offset,next_off; /* alignment optimizations: offset */
31 int next_cnt,next_thres; /* repetition counter and threshold */
32};
33
34struct zatm_pool_req {
35 int pool_num; /* pool number */
36 struct zatm_pool_info info; /* actual information */
37};
38
39#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */
40#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */
41#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */
42#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
43
44#define ZATM_TIMER_HISTORY_SIZE 16 /* number of timer adjustments to
45 record; must be 2^n */
46
47#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atmarp.h deleted-42
......@@ -1,42 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atmarp.h - ATM ARP protocol and kernel-demon interface definitions */
3
4/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
5
6
7#ifndef _LINUX_ATMARP_H
8#define _LINUX_ATMARP_H
9
10#include <linux/types.h>
11#include <linux/atmapi.h>
12#include <linux/atmioc.h>
13
14
15#define ATMARP_RETRY_DELAY 30 /* request next resolution or forget
16 NAK after 30 sec - should go into
17 atmclip.h */
18#define ATMARP_MAX_UNRES_PACKETS 5 /* queue that many packets while
19 waiting for the resolver */
20
21
22#define ATMARPD_CTRL _IO('a',ATMIOC_CLIP+1) /* become atmarpd ctrl sock */
23#define ATMARP_MKIP _IO('a',ATMIOC_CLIP+2) /* attach socket to IP */
24#define ATMARP_SETENTRY _IO('a',ATMIOC_CLIP+3) /* fill or hide ARP entry */
25#define ATMARP_ENCAP _IO('a',ATMIOC_CLIP+5) /* change encapsulation */
26
27
28enum atmarp_ctrl_type {
29 act_invalid, /* catch uninitialized structures */
30 act_need, /* need address resolution */
31 act_up, /* interface is coming up */
32 act_down, /* interface is going down */
33 act_change /* interface configuration has changed */
34};
35
36struct atmarp_ctrl {
37 enum atmarp_ctrl_type type; /* message type */
38 int itf_num;/* interface number (if present) */
39 __be32 ip; /* IP address (act_need only) */
40};
41
42#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atmclip.h deleted-22
......@@ -1,22 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atmclip.h - Classical IP over ATM */
3
4/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
5
6
7#ifndef LINUX_ATMCLIP_H
8#define LINUX_ATMCLIP_H
9
10#include <linux/sockios.h>
11#include <linux/atmioc.h>
12
13
14#define RFC1483LLC_LEN 8 /* LLC+OUI+PID = 8 */
15#define RFC1626_MTU 9180 /* RFC1626 default MTU */
16
17#define CLIP_DEFAULT_IDLETIMER 1200 /* 20 minutes, see RFC1755 */
18#define CLIP_CHECK_INTERVAL 10 /* check every ten seconds */
19
20#define SIOCMKCLIP _IO('a',ATMIOC_CLIP) /* create IP interface */
21
22#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atmdev.h-18
......@@ -60,14 +60,6 @@ struct atm_dev_stats {
6060 /* get interface type name */
6161#define ATM_GETESI _IOW('a',ATMIOC_ITF+5,struct atmif_sioc)
6262 /* get interface ESI */
63#define ATM_GETADDR _IOW('a',ATMIOC_ITF+6,struct atmif_sioc)
64 /* get itf's local ATM addr. list */
65#define ATM_RSTADDR _IOW('a',ATMIOC_ITF+7,struct atmif_sioc)
66 /* reset itf's ATM address list */
67#define ATM_ADDADDR _IOW('a',ATMIOC_ITF+8,struct atmif_sioc)
68 /* add a local ATM address */
69#define ATM_DELADDR _IOW('a',ATMIOC_ITF+9,struct atmif_sioc)
70 /* remove a local ATM address */
7163#define ATM_GETCIRANGE _IOW('a',ATMIOC_ITF+10,struct atmif_sioc)
7264 /* get connection identifier range */
7365#define ATM_SETCIRANGE _IOW('a',ATMIOC_ITF+11,struct atmif_sioc)
......@@ -76,12 +68,6 @@ struct atm_dev_stats {
7668 /* set interface ESI */
7769#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
7870 /* force interface ESI */
79#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
80 /* register a LECS address */
81#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
82 /* unregister a LECS address */
83#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
84 /* retrieve LECS address(es) */
8571
8672#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
8773 /* get AAL layer statistics */
......@@ -99,10 +85,6 @@ struct atm_dev_stats {
9985 /* set backend handler */
10086#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
10187 /* use backend to make new if */
102#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
103 /* add party to p2mp call */
104#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
105 /* drop party from p2mp call */
10688
10789/*
10890 * These are backend handkers that can be set via the ATM_SETBACKEND call
lib/libc/include/any-linux-any/linux/atmlec.h deleted-92
......@@ -1,92 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * ATM Lan Emulation Daemon driver interface
4 *
5 * Marko Kiiskila <mkiiskila@yahoo.com>
6 */
7
8#ifndef _ATMLEC_H_
9#define _ATMLEC_H_
10
11#include <linux/atmapi.h>
12#include <linux/atmioc.h>
13#include <linux/atm.h>
14#include <linux/if_ether.h>
15#include <linux/types.h>
16
17/* ATM lec daemon control socket */
18#define ATMLEC_CTRL _IO('a', ATMIOC_LANE)
19#define ATMLEC_DATA _IO('a', ATMIOC_LANE+1)
20#define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2)
21
22/* Maximum number of LEC interfaces (tweakable) */
23#define MAX_LEC_ITF 48
24
25typedef enum {
26 l_set_mac_addr,
27 l_del_mac_addr,
28 l_svc_setup,
29 l_addr_delete,
30 l_topology_change,
31 l_flush_complete,
32 l_arp_update,
33 l_narp_req, /* LANE2 mandates the use of this */
34 l_config,
35 l_flush_tran_id,
36 l_set_lecid,
37 l_arp_xmt,
38 l_rdesc_arp_xmt,
39 l_associate_req,
40 l_should_bridge /* should we bridge this MAC? */
41} atmlec_msg_type;
42
43#define ATMLEC_MSG_TYPE_MAX l_should_bridge
44
45struct atmlec_config_msg {
46 unsigned int maximum_unknown_frame_count;
47 unsigned int max_unknown_frame_time;
48 unsigned short max_retry_count;
49 unsigned int aging_time;
50 unsigned int forward_delay_time;
51 unsigned int arp_response_time;
52 unsigned int flush_timeout;
53 unsigned int path_switching_delay;
54 unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */
55 int mtu;
56 int is_proxy;
57};
58
59struct atmlec_msg {
60 atmlec_msg_type type;
61 int sizeoftlvs; /* LANE2: if != 0, tlvs follow */
62 union {
63 struct {
64 unsigned char mac_addr[ETH_ALEN];
65 unsigned char atm_addr[ATM_ESA_LEN];
66 unsigned int flag; /*
67 * Topology_change flag,
68 * remoteflag, permanent flag,
69 * lecid, transaction id
70 */
71 unsigned int targetless_le_arp; /* LANE2 */
72 unsigned int no_source_le_narp; /* LANE2 */
73 } normal;
74 struct atmlec_config_msg config;
75 struct {
76 __u16 lec_id; /* requestor lec_id */
77 __u32 tran_id; /* transaction id */
78 unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */
79 unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */
80 } proxy; /*
81 * For mapping LE_ARP requests to responses. Filled by
82 * zeppelin, returned by kernel. Used only when proxying
83 */
84 } content;
85} __ATM_API_ALIGN;
86
87struct atmlec_ioc {
88 int dev_num;
89 unsigned char atm_addr[ATM_ESA_LEN];
90 unsigned char receive; /* 1= receive vcc, 0 = send vcc */
91};
92#endif /* _ATMLEC_H_ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atmmpc.h deleted-127
......@@ -1,127 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _ATMMPC_H_
3#define _ATMMPC_H_
4
5#include <linux/atmapi.h>
6#include <linux/atmioc.h>
7#include <linux/atm.h>
8#include <linux/types.h>
9
10#define ATMMPC_CTRL _IO('a', ATMIOC_MPOA)
11#define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1)
12
13#define MPC_SOCKET_INGRESS 1
14#define MPC_SOCKET_EGRESS 2
15
16struct atmmpc_ioc {
17 int dev_num;
18 __be32 ipaddr; /* the IP address of the shortcut */
19 int type; /* ingress or egress */
20};
21
22typedef struct in_ctrl_info {
23 __u8 Last_NHRP_CIE_code;
24 __u8 Last_Q2931_cause_value;
25 __u8 eg_MPC_ATM_addr[ATM_ESA_LEN];
26 __be32 tag;
27 __be32 in_dst_ip; /* IP address this ingress MPC sends packets to */
28 __u16 holding_time;
29 __u32 request_id;
30} in_ctrl_info;
31
32typedef struct eg_ctrl_info {
33 __u8 DLL_header[256];
34 __u8 DH_length;
35 __be32 cache_id;
36 __be32 tag;
37 __be32 mps_ip;
38 __be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */
39 __u8 in_MPC_data_ATM_addr[ATM_ESA_LEN];
40 __u16 holding_time;
41} eg_ctrl_info;
42
43struct mpc_parameters {
44 __u16 mpc_p1; /* Shortcut-Setup Frame Count */
45 __u16 mpc_p2; /* Shortcut-Setup Frame Time */
46 __u8 mpc_p3[8]; /* Flow-detection Protocols */
47 __u16 mpc_p4; /* MPC Initial Retry Time */
48 __u16 mpc_p5; /* MPC Retry Time Maximum */
49 __u16 mpc_p6; /* Hold Down Time */
50} ;
51
52struct k_message {
53 __u16 type;
54 __be32 ip_mask;
55 __u8 MPS_ctrl[ATM_ESA_LEN];
56 union {
57 in_ctrl_info in_info;
58 eg_ctrl_info eg_info;
59 struct mpc_parameters params;
60 } content;
61 struct atm_qos qos;
62} __ATM_API_ALIGN;
63
64struct llc_snap_hdr {
65 /* RFC 1483 LLC/SNAP encapsulation for routed IP PDUs */
66 __u8 dsap; /* Destination Service Access Point (0xAA) */
67 __u8 ssap; /* Source Service Access Point (0xAA) */
68 __u8 ui; /* Unnumbered Information (0x03) */
69 __u8 org[3]; /* Organizational identification (0x000000) */
70 __u8 type[2]; /* Ether type (for IP) (0x0800) */
71};
72
73/* TLVs this MPC recognizes */
74#define TLV_MPOA_DEVICE_TYPE 0x00a03e2a
75
76/* MPOA device types in MPOA Device Type TLV */
77#define NON_MPOA 0
78#define MPS 1
79#define MPC 2
80#define MPS_AND_MPC 3
81
82
83/* MPC parameter defaults */
84
85#define MPC_P1 10 /* Shortcut-Setup Frame Count */
86#define MPC_P2 1 /* Shortcut-Setup Frame Time */
87#define MPC_P3 0 /* Flow-detection Protocols */
88#define MPC_P4 5 /* MPC Initial Retry Time */
89#define MPC_P5 40 /* MPC Retry Time Maximum */
90#define MPC_P6 160 /* Hold Down Time */
91#define HOLDING_TIME_DEFAULT 1200 /* same as MPS-p7 */
92
93/* MPC constants */
94
95#define MPC_C1 2 /* Retry Time Multiplier */
96#define MPC_C2 60 /* Initial Keep-Alive Lifetime */
97
98/* Message types - to MPOA daemon */
99
100#define SND_MPOA_RES_RQST 201
101#define SET_MPS_CTRL_ADDR 202
102#define SND_MPOA_RES_RTRY 203 /* Different type in a retry due to req id */
103#define STOP_KEEP_ALIVE_SM 204
104#define EGRESS_ENTRY_REMOVED 205
105#define SND_EGRESS_PURGE 206
106#define DIE 207 /* tell the daemon to exit() */
107#define DATA_PLANE_PURGE 208 /* Data plane purge because of egress cache hit miss or dead MPS */
108#define OPEN_INGRESS_SVC 209
109
110/* Message types - from MPOA daemon */
111
112#define MPOA_TRIGGER_RCVD 101
113#define MPOA_RES_REPLY_RCVD 102
114#define INGRESS_PURGE_RCVD 103
115#define EGRESS_PURGE_RCVD 104
116#define MPS_DEATH 105
117#define CACHE_IMPOS_RCVD 106
118#define SET_MPC_CTRL_ADDR 107 /* Our MPC's control ATM address */
119#define SET_MPS_MAC_ADDR 108
120#define CLEAN_UP_AND_EXIT 109
121#define SET_MPC_PARAMS 110 /* MPC configuration parameters */
122
123/* Message types - bidirectional */
124
125#define RELOAD 301 /* kill -HUP the daemon for reload */
126
127#endif /* _ATMMPC_H_ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/atmsvc.h deleted-56
......@@ -1,56 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atmsvc.h - ATM signaling kernel-demon interface definitions */
3
4/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
5
6
7#ifndef _LINUX_ATMSVC_H
8#define _LINUX_ATMSVC_H
9
10#include <linux/atmapi.h>
11#include <linux/atm.h>
12#include <linux/atmioc.h>
13
14
15#define ATMSIGD_CTRL _IO('a',ATMIOC_SPECIAL)
16 /* become ATM signaling demon control socket */
17
18enum atmsvc_msg_type { as_catch_null, as_bind, as_connect, as_accept, as_reject,
19 as_listen, as_okay, as_error, as_indicate, as_close,
20 as_itf_notify, as_modify, as_identify, as_terminate,
21 as_addparty, as_dropparty };
22
23struct atmsvc_msg {
24 enum atmsvc_msg_type type;
25 atm_kptr_t vcc;
26 atm_kptr_t listen_vcc; /* indicate */
27 int reply; /* for okay and close: */
28 /* < 0: error before active */
29 /* (sigd has discarded ctx) */
30 /* ==0: success */
31 /* > 0: error when active (still */
32 /* need to close) */
33 struct sockaddr_atmpvc pvc; /* indicate, okay (connect) */
34 struct sockaddr_atmsvc local; /* local SVC address */
35 struct atm_qos qos; /* QOS parameters */
36 struct atm_sap sap; /* SAP */
37 unsigned int session; /* for p2pm */
38 struct sockaddr_atmsvc svc; /* SVC address */
39} __ATM_API_ALIGN;
40
41/*
42 * Message contents: see ftp://icaftp.epfl.ch/pub/linux/atm/docs/isp-*.tar.gz
43 */
44
45/*
46 * Some policy stuff for atmsigd and for net/atm/svc.c. Both have to agree on
47 * what PCR is used to request bandwidth from the device driver. net/atm/svc.c
48 * tries to do better than that, but only if there's no routing decision (i.e.
49 * if signaling only uses one ATM interface).
50 */
51
52#define SELECT_TOP_PCR(tp) ((tp).pcr ? (tp).pcr : \
53 (tp).max_pcr && (tp).max_pcr != ATM_MAX_PCR ? (tp).max_pcr : \
54 (tp).min_pcr ? (tp).min_pcr : ATM_MAX_PCR)
55
56#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/batadv_packet.h+3-3
......@@ -518,16 +518,16 @@ struct batadv_mcast_packet {
518518 * @packet_type: batman-adv packet type, part of the general header
519519 * @version: batman-adv protocol version, part of the general header
520520 * @ttl: time to live for this packet, part of the general header
521 * @first_ttvn: tt-version number of first included packet
521522 * @first_source: original source of first included packet
522523 * @first_orig_dest: original destination of first included packet
523524 * @first_crc: checksum of first included packet
524 * @first_ttvn: tt-version number of first included packet
525525 * @second_ttl: ttl of second packet
526 * @second_ttvn: tt version number of second included packet
526527 * @second_dest: second receiver of this coded packet
527528 * @second_source: original source of second included packet
528529 * @second_orig_dest: original destination of second included packet
529530 * @second_crc: checksum of second included packet
530 * @second_ttvn: tt version number of second included packet
531531 * @coded_len: length of network coded part of the payload
532532 */
533533struct batadv_coded_packet {
......@@ -554,8 +554,8 @@ struct batadv_coded_packet {
554554 * @version: batman-adv protocol version, part of the general header
555555 * @ttl: time to live for this packet, part of the general header
556556 * @reserved: reserved field (for packet alignment)
557 * @src: address of the source
558557 * @dst: address of the destination
558 * @src: address of the source
559559 * @tvlv_len: length of tvlv data following the unicast tvlv header
560560 * @align: 2 bytes to align the header to a 4 byte boundary
561561 */
lib/libc/include/any-linux-any/linux/bpf.h+31-1
......@@ -994,6 +994,7 @@ enum bpf_cmd {
994994 BPF_PROG_STREAM_READ_BY_FD,
995995 BPF_PROG_ASSOC_STRUCT_OPS,
996996 __MAX_BPF_CMD,
997 BPF_COMMON_ATTRS = 1 << 16, /* Indicate carrying syscall common attrs. */
997998};
998999
9991000enum bpf_map_type {
......@@ -1046,6 +1047,7 @@ enum bpf_map_type {
10461047 BPF_MAP_TYPE_CGRP_STORAGE,
10471048 BPF_MAP_TYPE_ARENA,
10481049 BPF_MAP_TYPE_INSN_ARRAY,
1050 BPF_MAP_TYPE_RHASH,
10491051 __MAX_BPF_MAP_TYPE
10501052};
10511053
......@@ -1154,6 +1156,9 @@ enum bpf_attach_type {
11541156 BPF_TRACE_KPROBE_SESSION,
11551157 BPF_TRACE_UPROBE_SESSION,
11561158 BPF_TRACE_FSESSION,
1159 BPF_TRACE_FENTRY_MULTI,
1160 BPF_TRACE_FEXIT_MULTI,
1161 BPF_TRACE_FSESSION_MULTI,
11571162 __MAX_BPF_ATTACH_TYPE
11581163};
11591164
......@@ -1178,6 +1183,7 @@ enum bpf_link_type {
11781183 BPF_LINK_TYPE_UPROBE_MULTI = 12,
11791184 BPF_LINK_TYPE_NETKIT = 13,
11801185 BPF_LINK_TYPE_SOCKMAP = 14,
1186 BPF_LINK_TYPE_TRACING_MULTI = 15,
11811187 __MAX_BPF_LINK_TYPE,
11821188};
11831189
......@@ -1321,7 +1327,11 @@ enum {
13211327 * BPF_TRACE_UPROBE_MULTI attach type to create return probe.
13221328 */
13231329enum {
1324 BPF_F_UPROBE_MULTI_RETURN = (1U << 0)
1330 /* Get return uprobe. */
1331 BPF_F_UPROBE_MULTI_RETURN = (1U << 0),
1332
1333 /* Get path from provided path_fd. */
1334 BPF_F_UPROBE_MULTI_PATH_FD = (1U << 1),
13251335};
13261336
13271337/* link_create.netfilter.flags used in LINK_CREATE command for
......@@ -1500,6 +1510,13 @@ struct bpf_stack_build_id {
15001510 };
15011511};
15021512
1513struct bpf_common_attr {
1514 __aligned_u64 log_buf;
1515 __u32 log_size;
1516 __u32 log_level;
1517 __u32 log_true_size;
1518};
1519
15031520#define BPF_OBJ_NAME_LEN 16U
15041521
15051522enum {
......@@ -1537,6 +1554,11 @@ union bpf_attr {
15371554 *
15381555 * BPF_MAP_TYPE_ARENA - contains the address where user space
15391556 * is going to mmap() the arena. It has to be page aligned.
1557 *
1558 * BPF_MAP_TYPE_RHASH - initial table size hint
1559 * (nelem_hint). 0 = use rhashtable default. Must be
1560 * <= min(max_entries, U16_MAX). Upper 32 bits reserved,
1561 * must be zero.
15401562 */
15411563 __u64 map_extra;
15421564
......@@ -1846,6 +1868,7 @@ union bpf_attr {
18461868 __u32 cnt;
18471869 __u32 flags;
18481870 __u32 pid;
1871 __u32 path_fd;
18491872 } uprobe_multi;
18501873 struct {
18511874 union {
......@@ -1861,6 +1884,11 @@ union bpf_attr {
18611884 };
18621885 __u64 expected_revision;
18631886 } cgroup;
1887 struct {
1888 __aligned_u64 ids;
1889 __aligned_u64 cookies;
1890 __u32 cnt;
1891 } tracing_multi;
18641892 };
18651893 } link_create;
18661894
......@@ -6698,6 +6726,7 @@ struct bpf_prog_info {
66986726 __u32 verified_insns;
66996727 __u32 attach_btf_obj_id;
67006728 __u32 attach_btf_id;
6729 __u32 :32;
67016730} __attribute__((aligned(8)));
67026731
67036732struct bpf_map_info {
......@@ -6719,6 +6748,7 @@ struct bpf_map_info {
67196748 __u64 map_extra;
67206749 __aligned_u64 hash;
67216750 __u32 hash_size;
6751 __u32 :32;
67226752} __attribute__((aligned(8)));
67236753
67246754struct bpf_btf_info {
lib/libc/include/any-linux-any/linux/btf.h+14-12
......@@ -33,20 +33,22 @@ struct btf_header {
3333 __u32 layout_len; /* length of layout section */
3434};
3535
36/* Max # of type identifier */
37#define BTF_MAX_TYPE 0x000fffff
38/* Max offset into the string section */
39#define BTF_MAX_NAME_OFFSET 0x00ffffff
40/* Max # of struct/union/enum members or func args */
41#define BTF_MAX_VLEN 0xffff
36enum btf_max {
37 /* Max possible kind */
38 BTF_MAX_KIND = 0x0000007f,
39 /* Max # of type identifier */
40 BTF_MAX_TYPE = 0x000fffff,
41 /* Max offset into the string section */
42 BTF_MAX_NAME_OFFSET = 0x00ffffff,
43 /* Max # of struct/union/enum members or func args */
44 BTF_MAX_VLEN = 0x00ffffff,
45};
4246
4347struct btf_type {
4448 __u32 name_off;
4549 /* "info" bits arrangement
46 * bits 0-15: vlen (e.g. # of struct's members)
47 * bits 16-23: unused
48 * bits 24-28: kind (e.g. int, ptr, array...etc)
49 * bits 29-30: unused
50 * bits 0-23: vlen (e.g. # of struct's members)
51 * bits 24-30: kind (e.g. int, ptr, array...etc)
5052 * bit 31: kind_flag, currently used by
5153 * struct, union, enum, fwd, enum64,
5254 * decl_tag and type_tag
......@@ -65,8 +67,8 @@ struct btf_type {
6567 };
6668};
6769
68#define BTF_INFO_KIND(info) (((info) >> 24) & 0x1f)
69#define BTF_INFO_VLEN(info) ((info) & 0xffff)
70#define BTF_INFO_KIND(info) (((info) >> 24) & 0x7f)
71#define BTF_INFO_VLEN(info) ((info) & 0xffffff)
7072#define BTF_INFO_KFLAG(info) ((info) >> 31)
7173
7274enum {
lib/libc/include/any-linux-any/linux/btrfs.h+35-1
......@@ -596,7 +596,7 @@ struct btrfs_ioctl_search_args_v2 {
596596 __u64 buf_size; /* in - size of buffer
597597 * out - on EOVERFLOW: needed size
598598 * to store item */
599 __u64 buf[]; /* out - found items */
599 __u8 buf[]; /* out - found items */
600600};
601601
602602/* With a @src_length of zero, the range from @src_offset->EOF is cloned! */
......@@ -1098,6 +1098,38 @@ enum btrfs_err_code {
10981098 BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
10991099};
11001100
1101/* Flags for struct btrfs_ioctl_get_csums_entry::type. */
1102#define BTRFS_GET_CSUMS_HAS_CSUMS (1U << 0)
1103#define BTRFS_GET_CSUMS_ZEROED (1U << 1)
1104#define BTRFS_GET_CSUMS_NODATASUM (1U << 2)
1105#define BTRFS_GET_CSUMS_COMPRESSED (1U << 3)
1106#define BTRFS_GET_CSUMS_ENCRYPTED (1U << 4)
1107#define BTRFS_GET_CSUMS_INLINE (1U << 5)
1108
1109struct btrfs_ioctl_get_csums_entry {
1110 /* File offset of this range. */
1111 __u64 offset;
1112 /* Length in bytes. */
1113 __u64 length;
1114 /* One of BTRFS_GET_CSUMS_* types. */
1115 __u32 type;
1116 /* Padding, must be 0. */
1117 __u32 reserved;
1118};
1119
1120struct btrfs_ioctl_get_csums_args {
1121 /* In/out: file offset in bytes. */
1122 __u64 offset;
1123 /* In/out: range length in bytes. */
1124 __u64 length;
1125 /* In/out: buffer capacity / bytes written. */
1126 __u64 buf_size;
1127 /* In: flags, must be 0 for now. */
1128 __u64 flags;
1129 /* Out: entries of type btrfs_ioctl_get_csums_entry + csum data */
1130 __u8 buf[];
1131};
1132
11011133/* Flags for IOC_SHUTDOWN, must match XFS_FSOP_GOING_FLAGS_* flags. */
11021134#define BTRFS_SHUTDOWN_FLAGS_DEFAULT 0x0
11031135#define BTRFS_SHUTDOWN_FLAGS_LOGFLUSH 0x1
......@@ -1224,6 +1256,8 @@ enum btrfs_err_code {
12241256 struct btrfs_ioctl_encoded_io_args)
12251257#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \
12261258 struct btrfs_ioctl_subvol_wait)
1259#define BTRFS_IOC_GET_CSUMS _IOWR(BTRFS_IOCTL_MAGIC, 66, \
1260 struct btrfs_ioctl_get_csums_args)
12271261
12281262/* Shutdown ioctl should follow XFS's interfaces, thus not using btrfs magic. */
12291263#define BTRFS_IOC_SHUTDOWN _IOR('X', 125, __u32)
lib/libc/include/any-linux-any/linux/cec-funcs.h+182
......@@ -1701,6 +1701,188 @@ static __inline__ void cec_ops_request_current_latency(const struct cec_msg *msg
17011701}
17021702
17031703
1704/* Latency Indication Protocol Feature */
1705/* Only for CEC 2.0 and up */
1706static __inline__ void cec_msg_request_lip_support(struct cec_msg *msg,
1707 int reply, __u16 phys_addr)
1708{
1709 msg->len = 4;
1710 msg->msg[1] = CEC_MSG_REQUEST_LIP_SUPPORT;
1711 msg->msg[2] = phys_addr >> 8;
1712 msg->msg[3] = phys_addr & 0xff;
1713 msg->reply = reply ? CEC_MSG_REPORT_LIP_SUPPORT : 0;
1714}
1715
1716static __inline__ void cec_ops_request_lip_support(const struct cec_msg *msg,
1717 __u16 *phys_addr)
1718{
1719 *phys_addr = (msg->msg[2] << 8) | msg->msg[3];
1720}
1721
1722static __inline__ void cec_msg_report_lip_support(struct cec_msg *msg, __u32 sqid)
1723{
1724 msg->len = 6;
1725 msg->msg[1] = CEC_MSG_REPORT_LIP_SUPPORT;
1726 msg->msg[2] = sqid >> 24;
1727 msg->msg[3] = (sqid >> 16) & 0xff;
1728 msg->msg[4] = (sqid >> 8) & 0xff;
1729 msg->msg[5] = sqid & 0xff;
1730}
1731
1732static __inline__ void cec_ops_report_lip_support(const struct cec_msg *msg,
1733 __u32 *sqid)
1734{
1735 *sqid = (msg->msg[2] << 24) | (msg->msg[3] << 16) |
1736 (msg->msg[4] << 8) | msg->msg[5];
1737}
1738
1739static __inline__ void cec_msg_request_audio_and_video_latency(struct cec_msg *msg,
1740 int reply, __u8 video_format,
1741 __u8 hdr_format, __u8 vrr_format,
1742 __u8 audio_format,
1743 __u8 audio_format_extension)
1744{
1745 msg->len = 6;
1746 msg->msg[1] = CEC_MSG_REQUEST_AUDIO_AND_VIDEO_LATENCY;
1747 msg->msg[2] = video_format;
1748 msg->msg[3] = hdr_format;
1749 msg->msg[4] = vrr_format;
1750 msg->msg[5] = audio_format;
1751 if (audio_format >= 1 && audio_format <= 31) {
1752 msg->msg[6] = audio_format_extension;
1753 msg->len++;
1754 }
1755 msg->reply = reply ? CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY : 0;
1756}
1757
1758static __inline__ void cec_ops_request_audio_and_video_latency(const struct cec_msg *msg,
1759 __u8 *video_format,
1760 __u8 *hdr_format,
1761 __u8 *vrr_format,
1762 __u8 *audio_format,
1763 __u8 *audio_format_extension)
1764{
1765 *video_format = msg->msg[2];
1766 *hdr_format = msg->msg[3];
1767 *vrr_format = msg->msg[4];
1768 *audio_format = msg->msg[5];
1769 *audio_format_extension = msg->len > 6 ? msg->msg[6] : 0;
1770}
1771
1772static __inline__ void cec_msg_report_audio_and_video_latency(struct cec_msg *msg,
1773 __u16 video_latency,
1774 __u16 audio_latency)
1775{
1776 msg->len = 6;
1777 msg->msg[1] = CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY;
1778 msg->msg[2] = video_latency >> 8;
1779 msg->msg[3] = video_latency & 0xff;
1780 msg->msg[4] = audio_latency >> 8;
1781 msg->msg[5] = audio_latency & 0xff;
1782}
1783
1784static __inline__ void cec_ops_report_audio_and_video_latency(const struct cec_msg *msg,
1785 __u16 *video_latency,
1786 __u16 *audio_latency)
1787{
1788 *video_latency = (msg->msg[2] << 8) | msg->msg[3];
1789 *audio_latency = (msg->msg[4] << 8) | msg->msg[5];
1790}
1791
1792static __inline__ void cec_msg_request_audio_latency(struct cec_msg *msg,
1793 int reply,
1794 __u8 audio_format,
1795 __u8 audio_format_extension)
1796{
1797 msg->len = 3;
1798 msg->msg[1] = CEC_MSG_REQUEST_AUDIO_LATENCY;
1799 msg->msg[2] = audio_format;
1800 if (audio_format >= 1 && audio_format <= 31) {
1801 msg->msg[3] = audio_format_extension;
1802 msg->len++;
1803 }
1804 msg->reply = reply ? CEC_MSG_REPORT_AUDIO_LATENCY : 0;
1805}
1806
1807static __inline__ void cec_ops_request_audio_latency(const struct cec_msg *msg,
1808 __u8 *audio_format,
1809 __u8 *audio_format_extension)
1810{
1811 *audio_format = msg->msg[2];
1812 *audio_format_extension = msg->len > 3 ? msg->msg[3] : 0;
1813}
1814
1815static __inline__ void cec_msg_report_audio_latency(struct cec_msg *msg,
1816 __u16 audio_latency)
1817{
1818 msg->len = 4;
1819 msg->msg[1] = CEC_MSG_REPORT_AUDIO_LATENCY;
1820 msg->msg[2] = audio_latency >> 8;
1821 msg->msg[3] = audio_latency & 0xff;
1822}
1823
1824static __inline__ void cec_ops_report_audio_latency(const struct cec_msg *msg,
1825 __u16 *audio_latency)
1826{
1827 *audio_latency = (msg->msg[2] << 8) | msg->msg[3];
1828}
1829
1830static __inline__ void cec_msg_request_video_latency(struct cec_msg *msg,
1831 int reply, __u8 video_format,
1832 __u8 hdr_format,
1833 __u8 vrr_format)
1834{
1835 msg->len = 5;
1836 msg->msg[1] = CEC_MSG_REQUEST_VIDEO_LATENCY;
1837 msg->msg[2] = video_format;
1838 msg->msg[3] = hdr_format;
1839 msg->msg[4] = vrr_format;
1840 msg->reply = reply ? CEC_MSG_REPORT_VIDEO_LATENCY : 0;
1841}
1842
1843static __inline__ void cec_ops_request_video_latency(const struct cec_msg *msg,
1844 __u8 *video_format,
1845 __u8 *hdr_format,
1846 __u8 *vrr_format)
1847{
1848 *video_format = msg->msg[2];
1849 *hdr_format = msg->msg[3];
1850 *vrr_format = msg->msg[4];
1851}
1852
1853static __inline__ void cec_msg_report_video_latency(struct cec_msg *msg,
1854 __u16 video_latency)
1855{
1856 msg->len = 4;
1857 msg->msg[1] = CEC_MSG_REPORT_VIDEO_LATENCY;
1858 msg->msg[2] = video_latency >> 8;
1859 msg->msg[3] = video_latency & 0xff;
1860}
1861
1862static __inline__ void cec_ops_report_video_latency(const struct cec_msg *msg,
1863 __u16 *video_latency)
1864{
1865 *video_latency = (msg->msg[2] << 8) | msg->msg[3];
1866}
1867
1868static __inline__ void cec_msg_update_sqid(struct cec_msg *msg, __u32 sqid)
1869{
1870 msg->len = 6;
1871 msg->msg[1] = CEC_MSG_UPDATE_SQID;
1872 msg->msg[2] = sqid >> 24;
1873 msg->msg[3] = (sqid >> 16) & 0xff;
1874 msg->msg[4] = (sqid >> 8) & 0xff;
1875 msg->msg[5] = sqid & 0xff;
1876}
1877
1878static __inline__ void cec_ops_update_sqid(const struct cec_msg *msg,
1879 __u32 *sqid)
1880{
1881 *sqid = (msg->msg[2] << 24) | (msg->msg[3] << 16) |
1882 (msg->msg[4] << 8) | msg->msg[5];
1883}
1884
1885
17041886/* Capability Discovery and Control Feature */
17051887static __inline__ void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg,
17061888 __u16 phys_addr1,
lib/libc/include/any-linux-any/linux/cec.h+27-4
......@@ -742,7 +742,7 @@ struct cec_event {
742742#define CEC_OP_PRIM_DEVTYPE_PROCESSOR 7
743743
744744#define CEC_MSG_SET_MENU_LANGUAGE 0x32
745#define CEC_MSG_REPORT_FEATURES 0xa6 /* HDMI 2.0 */
745#define CEC_MSG_REPORT_FEATURES 0xa6 /* CEC 2.0 */
746746/* All Device Types Operand (all_device_types) */
747747#define CEC_OP_ALL_DEVTYPE_TV 0x80
748748#define CEC_OP_ALL_DEVTYPE_RECORD 0x40
......@@ -777,7 +777,7 @@ struct cec_event {
777777#define CEC_OP_FEAT_DEV_SOURCE_HAS_ARC_RX 0x02
778778#define CEC_OP_FEAT_DEV_HAS_SET_AUDIO_VOLUME_LEVEL 0x01
779779
780#define CEC_MSG_GIVE_FEATURES 0xa5 /* HDMI 2.0 */
780#define CEC_MSG_GIVE_FEATURES 0xa5 /* CEC 2.0 */
781781
782782
783783/* Deck Control Feature */
......@@ -1067,7 +1067,7 @@ struct cec_event {
10671067#define CEC_OP_AUD_FMT_ID_CEA861 0
10681068#define CEC_OP_AUD_FMT_ID_CEA861_CXT 1
10691069
1070#define CEC_MSG_SET_AUDIO_VOLUME_LEVEL 0x73
1070#define CEC_MSG_SET_AUDIO_VOLUME_LEVEL 0x73 /* CEC 2.0 */
10711071
10721072/* Audio Rate Control Feature */
10731073#define CEC_MSG_SET_AUDIO_RATE 0x9a
......@@ -1091,7 +1091,6 @@ struct cec_event {
10911091
10921092
10931093/* Dynamic Audio Lipsync Feature */
1094/* Only for CEC 2.0 and up */
10951094#define CEC_MSG_REQUEST_CURRENT_LATENCY 0xa7
10961095#define CEC_MSG_REPORT_CURRENT_LATENCY 0xa8
10971096/* Low Latency Mode Operand (low_latency_mode) */
......@@ -1104,6 +1103,30 @@ struct cec_event {
11041103#define CEC_OP_AUD_OUT_COMPENSATED_PARTIAL_DELAY 3
11051104
11061105
1106/* Latency Indication Protocol Feature */
1107#define CEC_MSG_REQUEST_LIP_SUPPORT 0x50 /* CEC 2.0 */
1108#define CEC_MSG_REPORT_LIP_SUPPORT 0x51 /* CEC 2.0 */
1109#define CEC_MSG_REQUEST_AUDIO_AND_VIDEO_LATENCY 0x52 /* CEC 2.0 */
1110/* HDR Format Operand (hdr_format) */
1111#define CEC_OP_HDR_FORMAT_GAMMA_SDR 0
1112#define CEC_OP_HDR_FORMAT_GAMMA_HDR 1
1113#define CEC_OP_HDR_FORMAT_PQ 2
1114#define CEC_OP_HDR_FORMAT_HLG 3
1115#define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_1 8
1116#define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_2 9
1117#define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_4 11
1118#define CEC_OP_HDR_FORMAT_DV_SINK_LED 16
1119#define CEC_OP_HDR_FORMAT_DV_SOURCE_LED 17
1120#define CEC_OP_HDR_FORMAT_HDR10PLUS 24
1121#define CEC_OP_HDR_FORMAT_ETSI_TS_103_433 32
1122#define CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY 0x53 /* CEC 2.0 */
1123#define CEC_MSG_REQUEST_AUDIO_LATENCY 0x54 /* CEC 2.0 */
1124#define CEC_MSG_REPORT_AUDIO_LATENCY 0x55 /* CEC 2.0 */
1125#define CEC_MSG_REQUEST_VIDEO_LATENCY 0x56 /* CEC 2.0 */
1126#define CEC_MSG_REPORT_VIDEO_LATENCY 0x57 /* CEC 2.0 */
1127#define CEC_MSG_UPDATE_SQID 0x58 /* CEC 2.0 */
1128
1129
11071130/* Capability Discovery and Control Feature */
11081131#define CEC_MSG_CDC_MESSAGE 0xf8
11091132/* Ethernet-over-HDMI: nobody ever does this... */
lib/libc/include/any-linux-any/linux/devlink.h+1
......@@ -406,6 +406,7 @@ enum devlink_var_attr_type {
406406 DEVLINK_VAR_ATTR_TYPE_BINARY,
407407 __DEVLINK_VAR_ATTR_TYPE_CUSTOM_BASE = 0x80,
408408 /* Any possible custom types, unrelated to NLA_* values go below */
409 DEVLINK_VAR_ATTR_TYPE_U64_ARRAY,
409410};
410411
411412enum devlink_attr {
lib/libc/include/any-linux-any/linux/dpll.h+25
......@@ -109,10 +109,12 @@ enum dpll_clock_quality_level {
109109 * enum dpll_type - type of dpll, valid values for DPLL_A_TYPE attribute
110110 * @DPLL_TYPE_PPS: dpll produces Pulse-Per-Second signal
111111 * @DPLL_TYPE_EEC: dpll drives the Ethernet Equipment Clock
112 * @DPLL_TYPE_GENERIC: generic dpll type for devices outside PPS/EEC classes
112113 */
113114enum dpll_type {
114115 DPLL_TYPE_PPS = 1,
115116 DPLL_TYPE_EEC,
117 DPLL_TYPE_GENERIC,
116118
117119 /* private: */
118120 __DPLL_TYPE_MAX,
......@@ -178,6 +180,28 @@ enum dpll_pin_state {
178180 DPLL_PIN_STATE_MAX = (__DPLL_PIN_STATE_MAX - 1)
179181};
180182
183/**
184 * enum dpll_pin_operstate - defines possible operational states of a pin with
185 * respect to its parent DPLL device, valid values for DPLL_A_PIN_OPERSTATE
186 * attribute
187 * @DPLL_PIN_OPERSTATE_ACTIVE: pin is qualified and actively used by the DPLL
188 * @DPLL_PIN_OPERSTATE_STANDBY: pin is qualified but not actively used by the
189 * DPLL
190 * @DPLL_PIN_OPERSTATE_NO_SIGNAL: pin does not have a valid signal
191 * @DPLL_PIN_OPERSTATE_QUAL_FAILED: pin signal failed qualification (e.g.
192 * frequency or phase monitor)
193 */
194enum dpll_pin_operstate {
195 DPLL_PIN_OPERSTATE_ACTIVE = 1,
196 DPLL_PIN_OPERSTATE_STANDBY,
197 DPLL_PIN_OPERSTATE_NO_SIGNAL,
198 DPLL_PIN_OPERSTATE_QUAL_FAILED,
199
200 /* private: */
201 __DPLL_PIN_OPERSTATE_MAX,
202 DPLL_PIN_OPERSTATE_MAX = (__DPLL_PIN_OPERSTATE_MAX - 1)
203};
204
181205/**
182206 * enum dpll_pin_capabilities - defines possible capabilities of a pin, valid
183207 * flags on DPLL_A_PIN_CAPABILITIES attribute
......@@ -257,6 +281,7 @@ enum dpll_a_pin {
257281 DPLL_A_PIN_PHASE_ADJUST_GRAN,
258282 DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT,
259283 DPLL_A_PIN_MEASURED_FREQUENCY,
284 DPLL_A_PIN_OPERSTATE,
260285
261286 __DPLL_A_PIN_MAX,
262287 DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
lib/libc/include/any-linux-any/linux/drbd.h created+413
......@@ -0,0 +1,413 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
2/*
3 drbd.h
4 Kernel module for 2.6.x Kernels
5
6 This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
7
8 Copyright (C) 2001-2008, LINBIT Information Technologies GmbH.
9 Copyright (C) 2001-2008, Philipp Reisner <philipp.reisner@linbit.com>.
10 Copyright (C) 2001-2008, Lars Ellenberg <lars.ellenberg@linbit.com>.
11
12
13*/
14#ifndef _LINUX_DRBD_H
15#define _LINUX_DRBD_H
16#include <linux/types.h>
17#include <asm/byteorder.h>
18
19enum drbd_io_error_p {
20 EP_PASS_ON, /* FIXME should the better be named "Ignore"? */
21 EP_CALL_HELPER,
22 EP_DETACH
23};
24
25enum drbd_fencing_p {
26 FP_NOT_AVAIL = -1, /* Not a policy */
27 FP_DONT_CARE = 0,
28 FP_RESOURCE,
29 FP_STONITH
30};
31
32enum drbd_disconnect_p {
33 DP_RECONNECT,
34 DP_DROP_NET_CONF,
35 DP_FREEZE_IO
36};
37
38enum drbd_after_sb_p {
39 ASB_DISCONNECT,
40 ASB_DISCARD_YOUNGER_PRI,
41 ASB_DISCARD_OLDER_PRI,
42 ASB_DISCARD_ZERO_CHG,
43 ASB_DISCARD_LEAST_CHG,
44 ASB_DISCARD_LOCAL,
45 ASB_DISCARD_REMOTE,
46 ASB_CONSENSUS,
47 ASB_DISCARD_SECONDARY,
48 ASB_CALL_HELPER,
49 ASB_VIOLENTLY
50};
51
52enum drbd_on_no_data {
53 OND_IO_ERROR,
54 OND_SUSPEND_IO
55};
56
57enum drbd_on_congestion {
58 OC_BLOCK,
59 OC_PULL_AHEAD,
60 OC_DISCONNECT,
61};
62
63enum drbd_read_balancing {
64 RB_PREFER_LOCAL,
65 RB_PREFER_REMOTE,
66 RB_ROUND_ROBIN,
67 RB_LEAST_PENDING,
68 RB_CONGESTED_REMOTE,
69 RB_32K_STRIPING,
70 RB_64K_STRIPING,
71 RB_128K_STRIPING,
72 RB_256K_STRIPING,
73 RB_512K_STRIPING,
74 RB_1M_STRIPING,
75};
76
77/* KEEP the order, do not delete or insert. Only append. */
78enum drbd_ret_code {
79 ERR_CODE_BASE = 100,
80 NO_ERROR = 101,
81 ERR_LOCAL_ADDR = 102,
82 ERR_PEER_ADDR = 103,
83 ERR_OPEN_DISK = 104,
84 ERR_OPEN_MD_DISK = 105,
85 ERR_DISK_NOT_BDEV = 107,
86 ERR_MD_NOT_BDEV = 108,
87 ERR_DISK_TOO_SMALL = 111,
88 ERR_MD_DISK_TOO_SMALL = 112,
89 ERR_BDCLAIM_DISK = 114,
90 ERR_BDCLAIM_MD_DISK = 115,
91 ERR_MD_IDX_INVALID = 116,
92 ERR_IO_MD_DISK = 118,
93 ERR_MD_INVALID = 119,
94 ERR_AUTH_ALG = 120,
95 ERR_AUTH_ALG_ND = 121,
96 ERR_NOMEM = 122,
97 ERR_DISCARD_IMPOSSIBLE = 123,
98 ERR_DISK_CONFIGURED = 124,
99 ERR_NET_CONFIGURED = 125,
100 ERR_MANDATORY_TAG = 126,
101 ERR_MINOR_INVALID = 127,
102 ERR_INTR = 129, /* EINTR */
103 ERR_RESIZE_RESYNC = 130,
104 ERR_NO_PRIMARY = 131,
105 ERR_RESYNC_AFTER = 132,
106 ERR_RESYNC_AFTER_CYCLE = 133,
107 ERR_PAUSE_IS_SET = 134,
108 ERR_PAUSE_IS_CLEAR = 135,
109 ERR_PACKET_NR = 137,
110 ERR_NO_DISK = 138,
111 ERR_NOT_PROTO_C = 139,
112 ERR_NOMEM_BITMAP = 140,
113 ERR_INTEGRITY_ALG = 141, /* DRBD 8.2 only */
114 ERR_INTEGRITY_ALG_ND = 142, /* DRBD 8.2 only */
115 ERR_CPU_MASK_PARSE = 143, /* DRBD 8.2 only */
116 ERR_CSUMS_ALG = 144, /* DRBD 8.2 only */
117 ERR_CSUMS_ALG_ND = 145, /* DRBD 8.2 only */
118 ERR_VERIFY_ALG = 146, /* DRBD 8.2 only */
119 ERR_VERIFY_ALG_ND = 147, /* DRBD 8.2 only */
120 ERR_CSUMS_RESYNC_RUNNING= 148, /* DRBD 8.2 only */
121 ERR_VERIFY_RUNNING = 149, /* DRBD 8.2 only */
122 ERR_DATA_NOT_CURRENT = 150,
123 ERR_CONNECTED = 151, /* DRBD 8.3 only */
124 ERR_PERM = 152,
125 ERR_NEED_APV_93 = 153,
126 ERR_STONITH_AND_PROT_A = 154,
127 ERR_CONG_NOT_PROTO_A = 155,
128 ERR_PIC_AFTER_DEP = 156,
129 ERR_PIC_PEER_DEP = 157,
130 ERR_RES_NOT_KNOWN = 158,
131 ERR_RES_IN_USE = 159,
132 ERR_MINOR_CONFIGURED = 160,
133 ERR_MINOR_OR_VOLUME_EXISTS = 161,
134 ERR_INVALID_REQUEST = 162,
135 ERR_NEED_APV_100 = 163,
136 ERR_NEED_ALLOW_TWO_PRI = 164,
137 ERR_MD_UNCLEAN = 165,
138 ERR_MD_LAYOUT_CONNECTED = 166,
139 ERR_MD_LAYOUT_TOO_BIG = 167,
140 ERR_MD_LAYOUT_TOO_SMALL = 168,
141 ERR_MD_LAYOUT_NO_FIT = 169,
142 ERR_IMPLICIT_SHRINK = 170,
143 /* insert new ones above this line */
144 AFTER_LAST_ERR_CODE
145};
146
147#define DRBD_PROT_A 1
148#define DRBD_PROT_B 2
149#define DRBD_PROT_C 3
150
151enum drbd_role {
152 R_UNKNOWN = 0,
153 R_PRIMARY = 1, /* role */
154 R_SECONDARY = 2, /* role */
155 R_MASK = 3,
156};
157
158/* The order of these constants is important.
159 * The lower ones (<C_WF_REPORT_PARAMS) indicate
160 * that there is no socket!
161 * >=C_WF_REPORT_PARAMS ==> There is a socket
162 */
163enum drbd_conns {
164 C_STANDALONE,
165 C_DISCONNECTING, /* Temporal state on the way to StandAlone. */
166 C_UNCONNECTED, /* >= C_UNCONNECTED -> inc_net() succeeds */
167
168 /* These temporal states are all used on the way
169 * from >= C_CONNECTED to Unconnected.
170 * The 'disconnect reason' states
171 * I do not allow to change between them. */
172 C_TIMEOUT,
173 C_BROKEN_PIPE,
174 C_NETWORK_FAILURE,
175 C_PROTOCOL_ERROR,
176 C_TEAR_DOWN,
177
178 C_WF_CONNECTION,
179 C_WF_REPORT_PARAMS, /* we have a socket */
180 C_CONNECTED, /* we have introduced each other */
181 C_STARTING_SYNC_S, /* starting full sync by admin request. */
182 C_STARTING_SYNC_T, /* starting full sync by admin request. */
183 C_WF_BITMAP_S,
184 C_WF_BITMAP_T,
185 C_WF_SYNC_UUID,
186
187 /* All SyncStates are tested with this comparison
188 * xx >= C_SYNC_SOURCE && xx <= C_PAUSED_SYNC_T */
189 C_SYNC_SOURCE,
190 C_SYNC_TARGET,
191 C_VERIFY_S,
192 C_VERIFY_T,
193 C_PAUSED_SYNC_S,
194 C_PAUSED_SYNC_T,
195
196 C_AHEAD,
197 C_BEHIND,
198
199 C_MASK = 31
200};
201
202enum drbd_disk_state {
203 D_DISKLESS,
204 D_ATTACHING, /* In the process of reading the meta-data */
205 D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */
206 /* when >= D_FAILED it is legal to access mdev->ldev */
207 D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */
208 D_INCONSISTENT,
209 D_OUTDATED,
210 D_UNKNOWN, /* Only used for the peer, never for myself */
211 D_CONSISTENT, /* Might be D_OUTDATED, might be D_UP_TO_DATE ... */
212 D_UP_TO_DATE, /* Only this disk state allows applications' IO ! */
213 D_MASK = 15
214};
215
216union drbd_state {
217/* According to gcc's docs is the ...
218 * The order of allocation of bit-fields within a unit (C90 6.5.2.1, C99 6.7.2.1).
219 * Determined by ABI.
220 * pointed out by Maxim Uvarov q<muvarov@ru.mvista.com>
221 * even though we transmit as "cpu_to_be32(state)",
222 * the offsets of the bitfields still need to be swapped
223 * on different endianness.
224 */
225 struct {
226#if defined(__LITTLE_ENDIAN_BITFIELD)
227 unsigned role:2 ; /* 3/4 primary/secondary/unknown */
228 unsigned peer:2 ; /* 3/4 primary/secondary/unknown */
229 unsigned conn:5 ; /* 17/32 cstates */
230 unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
231 unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
232 unsigned susp:1 ; /* 2/2 IO suspended no/yes (by user) */
233 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */
234 unsigned peer_isp:1 ;
235 unsigned user_isp:1 ;
236 unsigned susp_nod:1 ; /* IO suspended because no data */
237 unsigned susp_fen:1 ; /* IO suspended because fence peer handler runs*/
238 unsigned _pad:9; /* 0 unused */
239#elif defined(__BIG_ENDIAN_BITFIELD)
240 unsigned _pad:9;
241 unsigned susp_fen:1 ;
242 unsigned susp_nod:1 ;
243 unsigned user_isp:1 ;
244 unsigned peer_isp:1 ;
245 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */
246 unsigned susp:1 ; /* 2/2 IO suspended no/yes */
247 unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
248 unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
249 unsigned conn:5 ; /* 17/32 cstates */
250 unsigned peer:2 ; /* 3/4 primary/secondary/unknown */
251 unsigned role:2 ; /* 3/4 primary/secondary/unknown */
252#else
253# error "this endianness is not supported"
254#endif
255 };
256 unsigned int i;
257};
258
259enum drbd_state_rv {
260 SS_CW_NO_NEED = 4,
261 SS_CW_SUCCESS = 3,
262 SS_NOTHING_TO_DO = 2,
263 SS_SUCCESS = 1,
264 SS_UNKNOWN_ERROR = 0, /* Used to sleep longer in _drbd_request_state */
265 SS_TWO_PRIMARIES = -1,
266 SS_NO_UP_TO_DATE_DISK = -2,
267 SS_NO_LOCAL_DISK = -4,
268 SS_NO_REMOTE_DISK = -5,
269 SS_CONNECTED_OUTDATES = -6,
270 SS_PRIMARY_NOP = -7,
271 SS_RESYNC_RUNNING = -8,
272 SS_ALREADY_STANDALONE = -9,
273 SS_CW_FAILED_BY_PEER = -10,
274 SS_IS_DISKLESS = -11,
275 SS_DEVICE_IN_USE = -12,
276 SS_NO_NET_CONFIG = -13,
277 SS_NO_VERIFY_ALG = -14, /* drbd-8.2 only */
278 SS_NEED_CONNECTION = -15, /* drbd-8.2 only */
279 SS_LOWER_THAN_OUTDATED = -16,
280 SS_NOT_SUPPORTED = -17, /* drbd-8.2 only */
281 SS_IN_TRANSIENT_STATE = -18, /* Retry after the next state change */
282 SS_CONCURRENT_ST_CHG = -19, /* Concurrent cluster side state change! */
283 SS_O_VOL_PEER_PRI = -20,
284 SS_OUTDATE_WO_CONN = -21,
285 SS_AFTER_LAST_ERROR = -22, /* Keep this at bottom */
286};
287
288#define SHARED_SECRET_MAX 64
289
290#define MDF_CONSISTENT (1 << 0)
291#define MDF_PRIMARY_IND (1 << 1)
292#define MDF_CONNECTED_IND (1 << 2)
293#define MDF_FULL_SYNC (1 << 3)
294#define MDF_WAS_UP_TO_DATE (1 << 4)
295#define MDF_PEER_OUT_DATED (1 << 5)
296#define MDF_CRASHED_PRIMARY (1 << 6)
297#define MDF_AL_CLEAN (1 << 7)
298#define MDF_AL_DISABLED (1 << 8)
299
300#define MAX_PEERS 32
301
302enum drbd_uuid_index {
303 UI_CURRENT,
304 UI_BITMAP,
305 UI_HISTORY_START,
306 UI_HISTORY_END,
307 UI_SIZE, /* nl-packet: number of dirty bits */
308 UI_FLAGS, /* nl-packet: flags */
309 UI_EXTENDED_SIZE /* Everything. */
310};
311
312#define HISTORY_UUIDS MAX_PEERS
313
314#define DRBD_NL_UUIDS_SIZE (UI_SIZE * sizeof(__u64))
315#define DRBD_NL_HISTORY_UUIDS_SIZE (HISTORY_UUIDS * sizeof(__u64))
316
317enum drbd_timeout_flag {
318 UT_DEFAULT = 0,
319 UT_DEGRADED = 1,
320 UT_PEER_OUTDATED = 2,
321};
322
323enum drbd_notification_type {
324 NOTIFY_EXISTS,
325 NOTIFY_CREATE,
326 NOTIFY_CHANGE,
327 NOTIFY_DESTROY,
328 NOTIFY_CALL,
329 NOTIFY_RESPONSE,
330
331 NOTIFY_CONTINUES = 0x8000,
332 NOTIFY_FLAGS = NOTIFY_CONTINUES,
333};
334
335enum drbd_peer_state {
336 P_INCONSISTENT = 3,
337 P_OUTDATED = 4,
338 P_DOWN = 5,
339 P_PRIMARY = 6,
340 P_FENCING = 7,
341};
342
343#define UUID_JUST_CREATED ((__u64)4)
344
345enum write_ordering_e {
346 WO_NONE,
347 WO_DRAIN_IO,
348 WO_BDEV_FLUSH,
349 WO_BIO_BARRIER
350};
351
352/* magic numbers used in meta data and network packets */
353#define DRBD_MAGIC 0x83740267
354#define DRBD_MAGIC_BIG 0x835a
355#define DRBD_MAGIC_100 0x8620ec20
356
357#define DRBD_MD_MAGIC_07 (DRBD_MAGIC+3)
358#define DRBD_MD_MAGIC_08 (DRBD_MAGIC+4)
359#define DRBD_MD_MAGIC_84_UNCLEAN (DRBD_MAGIC+5)
360
361
362/* how I came up with this magic?
363 * base64 decode "actlog==" ;) */
364#define DRBD_AL_MAGIC 0x69cb65a2
365
366/* these are of type "int" */
367#define DRBD_MD_INDEX_INTERNAL -1
368#define DRBD_MD_INDEX_FLEX_EXT -2
369#define DRBD_MD_INDEX_FLEX_INT -3
370
371#define DRBD_CPU_MASK_SIZE 32
372
373/**
374 * struct drbd_genlmsghdr - DRBD specific header used in NETLINK_GENERIC requests
375 * @minor:
376 * For admin requests (user -> kernel): which minor device to operate on.
377 * For (unicast) replies or informational (broadcast) messages
378 * (kernel -> user): which minor device the information is about.
379 * If we do not operate on minors, but on connections or resources,
380 * the minor value shall be (~0), and the attribute DRBD_NLA_CFG_CONTEXT
381 * is used instead.
382 * @flags: possible operation modifiers (relevant only for user->kernel):
383 * DRBD_GENL_F_SET_DEFAULTS
384 * @volume:
385 * When creating a new minor (adding it to a resource), the resource needs
386 * to know which volume number within the resource this is supposed to be.
387 * The volume number corresponds to the same volume number on the remote side,
388 * whereas the minor number on the remote side may be different
389 * (union with flags).
390 * @ret_code: kernel->userland unicast cfg reply return code (union with flags);
391 */
392struct drbd_genlmsghdr {
393 __u32 minor;
394 union {
395 __u32 flags;
396 __s32 ret_code;
397 };
398};
399
400/* To be used in drbd_genlmsghdr.flags */
401enum {
402 DRBD_GENL_F_SET_DEFAULTS = 1,
403};
404
405enum drbd_state_info_bcast_reason {
406 SIB_GET_STATUS_REPLY = 1,
407 SIB_STATE_CHANGE = 2,
408 SIB_HELPER_PRE = 3,
409 SIB_HELPER_POST = 4,
410 SIB_SYNC_PROGRESS = 5,
411};
412
413#endif /* _LINUX_DRBD_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/drbd_genl.h created+359
......@@ -0,0 +1,359 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2
3#ifndef _LINUX_DRBD_GENL_H
4#define _LINUX_DRBD_GENL_H
5
6#define DRBD_FAMILY_NAME "drbd"
7#define DRBD_FAMILY_VERSION 1
8
9enum {
10 DRBD_NLA_CFG_REPLY = 1,
11 DRBD_NLA_CFG_CONTEXT,
12 DRBD_NLA_DISK_CONF,
13 DRBD_NLA_RESOURCE_OPTS,
14 DRBD_NLA_NET_CONF,
15 DRBD_NLA_SET_ROLE_PARMS,
16 DRBD_NLA_RESIZE_PARMS,
17 DRBD_NLA_STATE_INFO,
18 DRBD_NLA_START_OV_PARMS,
19 DRBD_NLA_NEW_C_UUID_PARMS,
20 DRBD_NLA_TIMEOUT_PARMS,
21 DRBD_NLA_DISCONNECT_PARMS,
22 DRBD_NLA_DETACH_PARMS,
23 DRBD_NLA_RESOURCE_INFO = 15,
24 DRBD_NLA_DEVICE_INFO,
25 DRBD_NLA_CONNECTION_INFO,
26 DRBD_NLA_PEER_DEVICE_INFO,
27 DRBD_NLA_RESOURCE_STATISTICS,
28 DRBD_NLA_DEVICE_STATISTICS,
29 DRBD_NLA_CONNECTION_STATISTICS,
30 DRBD_NLA_PEER_DEVICE_STATISTICS,
31 DRBD_NLA_NOTIFICATION_HEADER,
32 DRBD_NLA_HELPER,
33
34 __DRBD_NLA_MAX,
35 DRBD_NLA_MAX = (__DRBD_NLA_MAX - 1)
36};
37
38enum {
39 DRBD_A_DRBD_CFG_REPLY_INFO_TEXT = 1,
40
41 __DRBD_A_DRBD_CFG_REPLY_MAX,
42 DRBD_A_DRBD_CFG_REPLY_MAX = (__DRBD_A_DRBD_CFG_REPLY_MAX - 1)
43};
44
45enum {
46 DRBD_A_DRBD_CFG_CONTEXT_CTX_VOLUME = 1,
47 DRBD_A_DRBD_CFG_CONTEXT_CTX_RESOURCE_NAME,
48 DRBD_A_DRBD_CFG_CONTEXT_CTX_MY_ADDR,
49 DRBD_A_DRBD_CFG_CONTEXT_CTX_PEER_ADDR,
50
51 __DRBD_A_DRBD_CFG_CONTEXT_MAX,
52 DRBD_A_DRBD_CFG_CONTEXT_MAX = (__DRBD_A_DRBD_CFG_CONTEXT_MAX - 1)
53};
54
55enum {
56 DRBD_A_DISK_CONF_BACKING_DEV = 1,
57 DRBD_A_DISK_CONF_META_DEV,
58 DRBD_A_DISK_CONF_META_DEV_IDX,
59 DRBD_A_DISK_CONF_DISK_SIZE,
60 DRBD_A_DISK_CONF_MAX_BIO_BVECS,
61 DRBD_A_DISK_CONF_ON_IO_ERROR,
62 DRBD_A_DISK_CONF_FENCING,
63 DRBD_A_DISK_CONF_RESYNC_RATE,
64 DRBD_A_DISK_CONF_RESYNC_AFTER,
65 DRBD_A_DISK_CONF_AL_EXTENTS,
66 DRBD_A_DISK_CONF_C_PLAN_AHEAD,
67 DRBD_A_DISK_CONF_C_DELAY_TARGET,
68 DRBD_A_DISK_CONF_C_FILL_TARGET,
69 DRBD_A_DISK_CONF_C_MAX_RATE,
70 DRBD_A_DISK_CONF_C_MIN_RATE,
71 DRBD_A_DISK_CONF_DISK_BARRIER,
72 DRBD_A_DISK_CONF_DISK_FLUSHES,
73 DRBD_A_DISK_CONF_DISK_DRAIN,
74 DRBD_A_DISK_CONF_MD_FLUSHES,
75 DRBD_A_DISK_CONF_DISK_TIMEOUT,
76 DRBD_A_DISK_CONF_READ_BALANCING,
77 DRBD_A_DISK_CONF_AL_UPDATES = 23,
78 DRBD_A_DISK_CONF_DISCARD_ZEROES_IF_ALIGNED,
79 DRBD_A_DISK_CONF_RS_DISCARD_GRANULARITY,
80 DRBD_A_DISK_CONF_DISABLE_WRITE_SAME,
81
82 __DRBD_A_DISK_CONF_MAX,
83 DRBD_A_DISK_CONF_MAX = (__DRBD_A_DISK_CONF_MAX - 1)
84};
85
86enum {
87 DRBD_A_RES_OPTS_CPU_MASK = 1,
88 DRBD_A_RES_OPTS_ON_NO_DATA,
89
90 __DRBD_A_RES_OPTS_MAX,
91 DRBD_A_RES_OPTS_MAX = (__DRBD_A_RES_OPTS_MAX - 1)
92};
93
94enum {
95 DRBD_A_NET_CONF_SHARED_SECRET = 1,
96 DRBD_A_NET_CONF_CRAM_HMAC_ALG,
97 DRBD_A_NET_CONF_INTEGRITY_ALG,
98 DRBD_A_NET_CONF_VERIFY_ALG,
99 DRBD_A_NET_CONF_CSUMS_ALG,
100 DRBD_A_NET_CONF_WIRE_PROTOCOL,
101 DRBD_A_NET_CONF_CONNECT_INT,
102 DRBD_A_NET_CONF_TIMEOUT,
103 DRBD_A_NET_CONF_PING_INT,
104 DRBD_A_NET_CONF_PING_TIMEO,
105 DRBD_A_NET_CONF_SNDBUF_SIZE,
106 DRBD_A_NET_CONF_RCVBUF_SIZE,
107 DRBD_A_NET_CONF_KO_COUNT,
108 DRBD_A_NET_CONF_MAX_BUFFERS,
109 DRBD_A_NET_CONF_MAX_EPOCH_SIZE,
110 DRBD_A_NET_CONF_UNPLUG_WATERMARK,
111 DRBD_A_NET_CONF_AFTER_SB_0P,
112 DRBD_A_NET_CONF_AFTER_SB_1P,
113 DRBD_A_NET_CONF_AFTER_SB_2P,
114 DRBD_A_NET_CONF_RR_CONFLICT,
115 DRBD_A_NET_CONF_ON_CONGESTION,
116 DRBD_A_NET_CONF_CONG_FILL,
117 DRBD_A_NET_CONF_CONG_EXTENTS,
118 DRBD_A_NET_CONF_TWO_PRIMARIES,
119 DRBD_A_NET_CONF_DISCARD_MY_DATA,
120 DRBD_A_NET_CONF_TCP_CORK,
121 DRBD_A_NET_CONF_ALWAYS_ASBP,
122 DRBD_A_NET_CONF_TENTATIVE,
123 DRBD_A_NET_CONF_USE_RLE,
124 DRBD_A_NET_CONF_CSUMS_AFTER_CRASH_ONLY = 33,
125 DRBD_A_NET_CONF_SOCK_CHECK_TIMEO,
126
127 __DRBD_A_NET_CONF_MAX,
128 DRBD_A_NET_CONF_MAX = (__DRBD_A_NET_CONF_MAX - 1)
129};
130
131enum {
132 DRBD_A_SET_ROLE_PARMS_ASSUME_UPTODATE = 1,
133
134 __DRBD_A_SET_ROLE_PARMS_MAX,
135 DRBD_A_SET_ROLE_PARMS_MAX = (__DRBD_A_SET_ROLE_PARMS_MAX - 1)
136};
137
138enum {
139 DRBD_A_RESIZE_PARMS_RESIZE_SIZE = 1,
140 DRBD_A_RESIZE_PARMS_RESIZE_FORCE,
141 DRBD_A_RESIZE_PARMS_NO_RESYNC,
142 DRBD_A_RESIZE_PARMS_AL_STRIPES,
143 DRBD_A_RESIZE_PARMS_AL_STRIPE_SIZE,
144
145 __DRBD_A_RESIZE_PARMS_MAX,
146 DRBD_A_RESIZE_PARMS_MAX = (__DRBD_A_RESIZE_PARMS_MAX - 1)
147};
148
149enum {
150 DRBD_A_STATE_INFO_SIB_REASON = 1,
151 DRBD_A_STATE_INFO_CURRENT_STATE,
152 DRBD_A_STATE_INFO_CAPACITY,
153 DRBD_A_STATE_INFO_ED_UUID,
154 DRBD_A_STATE_INFO_PREV_STATE,
155 DRBD_A_STATE_INFO_NEW_STATE,
156 DRBD_A_STATE_INFO_UUIDS,
157 DRBD_A_STATE_INFO_DISK_FLAGS,
158 DRBD_A_STATE_INFO_BITS_TOTAL,
159 DRBD_A_STATE_INFO_BITS_OOS,
160 DRBD_A_STATE_INFO_BITS_RS_TOTAL,
161 DRBD_A_STATE_INFO_BITS_RS_FAILED,
162 DRBD_A_STATE_INFO_HELPER,
163 DRBD_A_STATE_INFO_HELPER_EXIT_CODE,
164 DRBD_A_STATE_INFO_SEND_CNT,
165 DRBD_A_STATE_INFO_RECV_CNT,
166 DRBD_A_STATE_INFO_READ_CNT,
167 DRBD_A_STATE_INFO_WRIT_CNT,
168 DRBD_A_STATE_INFO_AL_WRIT_CNT,
169 DRBD_A_STATE_INFO_BM_WRIT_CNT,
170 DRBD_A_STATE_INFO_AP_BIO_CNT,
171 DRBD_A_STATE_INFO_AP_PENDING_CNT,
172 DRBD_A_STATE_INFO_RS_PENDING_CNT,
173
174 __DRBD_A_STATE_INFO_MAX,
175 DRBD_A_STATE_INFO_MAX = (__DRBD_A_STATE_INFO_MAX - 1)
176};
177
178enum {
179 DRBD_A_START_OV_PARMS_OV_START_SECTOR = 1,
180 DRBD_A_START_OV_PARMS_OV_STOP_SECTOR,
181
182 __DRBD_A_START_OV_PARMS_MAX,
183 DRBD_A_START_OV_PARMS_MAX = (__DRBD_A_START_OV_PARMS_MAX - 1)
184};
185
186enum {
187 DRBD_A_NEW_C_UUID_PARMS_CLEAR_BM = 1,
188
189 __DRBD_A_NEW_C_UUID_PARMS_MAX,
190 DRBD_A_NEW_C_UUID_PARMS_MAX = (__DRBD_A_NEW_C_UUID_PARMS_MAX - 1)
191};
192
193enum {
194 DRBD_A_TIMEOUT_PARMS_TIMEOUT_TYPE = 1,
195
196 __DRBD_A_TIMEOUT_PARMS_MAX,
197 DRBD_A_TIMEOUT_PARMS_MAX = (__DRBD_A_TIMEOUT_PARMS_MAX - 1)
198};
199
200enum {
201 DRBD_A_DISCONNECT_PARMS_FORCE_DISCONNECT = 1,
202
203 __DRBD_A_DISCONNECT_PARMS_MAX,
204 DRBD_A_DISCONNECT_PARMS_MAX = (__DRBD_A_DISCONNECT_PARMS_MAX - 1)
205};
206
207enum {
208 DRBD_A_DETACH_PARMS_FORCE_DETACH = 1,
209
210 __DRBD_A_DETACH_PARMS_MAX,
211 DRBD_A_DETACH_PARMS_MAX = (__DRBD_A_DETACH_PARMS_MAX - 1)
212};
213
214enum {
215 DRBD_A_RESOURCE_INFO_RES_ROLE = 1,
216 DRBD_A_RESOURCE_INFO_RES_SUSP,
217 DRBD_A_RESOURCE_INFO_RES_SUSP_NOD,
218 DRBD_A_RESOURCE_INFO_RES_SUSP_FEN,
219
220 __DRBD_A_RESOURCE_INFO_MAX,
221 DRBD_A_RESOURCE_INFO_MAX = (__DRBD_A_RESOURCE_INFO_MAX - 1)
222};
223
224enum {
225 DRBD_A_DEVICE_INFO_DEV_DISK_STATE = 1,
226
227 __DRBD_A_DEVICE_INFO_MAX,
228 DRBD_A_DEVICE_INFO_MAX = (__DRBD_A_DEVICE_INFO_MAX - 1)
229};
230
231enum {
232 DRBD_A_CONNECTION_INFO_CONN_CONNECTION_STATE = 1,
233 DRBD_A_CONNECTION_INFO_CONN_ROLE,
234
235 __DRBD_A_CONNECTION_INFO_MAX,
236 DRBD_A_CONNECTION_INFO_MAX = (__DRBD_A_CONNECTION_INFO_MAX - 1)
237};
238
239enum {
240 DRBD_A_PEER_DEVICE_INFO_PEER_REPL_STATE = 1,
241 DRBD_A_PEER_DEVICE_INFO_PEER_DISK_STATE,
242 DRBD_A_PEER_DEVICE_INFO_PEER_RESYNC_SUSP_USER,
243 DRBD_A_PEER_DEVICE_INFO_PEER_RESYNC_SUSP_PEER,
244 DRBD_A_PEER_DEVICE_INFO_PEER_RESYNC_SUSP_DEPENDENCY,
245
246 __DRBD_A_PEER_DEVICE_INFO_MAX,
247 DRBD_A_PEER_DEVICE_INFO_MAX = (__DRBD_A_PEER_DEVICE_INFO_MAX - 1)
248};
249
250enum {
251 DRBD_A_RESOURCE_STATISTICS_RES_STAT_WRITE_ORDERING = 1,
252
253 __DRBD_A_RESOURCE_STATISTICS_MAX,
254 DRBD_A_RESOURCE_STATISTICS_MAX = (__DRBD_A_RESOURCE_STATISTICS_MAX - 1)
255};
256
257enum {
258 DRBD_A_DEVICE_STATISTICS_DEV_SIZE = 1,
259 DRBD_A_DEVICE_STATISTICS_DEV_READ,
260 DRBD_A_DEVICE_STATISTICS_DEV_WRITE,
261 DRBD_A_DEVICE_STATISTICS_DEV_AL_WRITES,
262 DRBD_A_DEVICE_STATISTICS_DEV_BM_WRITES,
263 DRBD_A_DEVICE_STATISTICS_DEV_UPPER_PENDING,
264 DRBD_A_DEVICE_STATISTICS_DEV_LOWER_PENDING,
265 DRBD_A_DEVICE_STATISTICS_DEV_UPPER_BLOCKED,
266 DRBD_A_DEVICE_STATISTICS_DEV_LOWER_BLOCKED,
267 DRBD_A_DEVICE_STATISTICS_DEV_AL_SUSPENDED,
268 DRBD_A_DEVICE_STATISTICS_DEV_EXPOSED_DATA_UUID,
269 DRBD_A_DEVICE_STATISTICS_DEV_CURRENT_UUID,
270 DRBD_A_DEVICE_STATISTICS_DEV_DISK_FLAGS,
271 DRBD_A_DEVICE_STATISTICS_HISTORY_UUIDS,
272
273 __DRBD_A_DEVICE_STATISTICS_MAX,
274 DRBD_A_DEVICE_STATISTICS_MAX = (__DRBD_A_DEVICE_STATISTICS_MAX - 1)
275};
276
277enum {
278 DRBD_A_CONNECTION_STATISTICS_CONN_CONGESTED = 1,
279
280 __DRBD_A_CONNECTION_STATISTICS_MAX,
281 DRBD_A_CONNECTION_STATISTICS_MAX = (__DRBD_A_CONNECTION_STATISTICS_MAX - 1)
282};
283
284enum {
285 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_RECEIVED = 1,
286 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_SENT,
287 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_PENDING,
288 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_UNACKED,
289 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_OUT_OF_SYNC,
290 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_RESYNC_FAILED,
291 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_BITMAP_UUID,
292 DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_FLAGS = 9,
293
294 __DRBD_A_PEER_DEVICE_STATISTICS_MAX,
295 DRBD_A_PEER_DEVICE_STATISTICS_MAX = (__DRBD_A_PEER_DEVICE_STATISTICS_MAX - 1)
296};
297
298enum {
299 DRBD_A_DRBD_NOTIFICATION_HEADER_NH_TYPE = 1,
300
301 __DRBD_A_DRBD_NOTIFICATION_HEADER_MAX,
302 DRBD_A_DRBD_NOTIFICATION_HEADER_MAX = (__DRBD_A_DRBD_NOTIFICATION_HEADER_MAX - 1)
303};
304
305enum {
306 DRBD_A_DRBD_HELPER_INFO_HELPER_NAME = 1,
307 DRBD_A_DRBD_HELPER_INFO_HELPER_STATUS,
308
309 __DRBD_A_DRBD_HELPER_INFO_MAX,
310 DRBD_A_DRBD_HELPER_INFO_MAX = (__DRBD_A_DRBD_HELPER_INFO_MAX - 1)
311};
312
313enum {
314 DRBD_ADM_EVENT = 1,
315 DRBD_ADM_GET_STATUS,
316 DRBD_ADM_NEW_MINOR = 5,
317 DRBD_ADM_DEL_MINOR,
318 DRBD_ADM_NEW_RESOURCE,
319 DRBD_ADM_DEL_RESOURCE,
320 DRBD_ADM_RESOURCE_OPTS,
321 DRBD_ADM_CONNECT,
322 DRBD_ADM_DISCONNECT,
323 DRBD_ADM_ATTACH,
324 DRBD_ADM_RESIZE,
325 DRBD_ADM_PRIMARY,
326 DRBD_ADM_SECONDARY,
327 DRBD_ADM_NEW_C_UUID,
328 DRBD_ADM_START_OV,
329 DRBD_ADM_DETACH,
330 DRBD_ADM_INVALIDATE,
331 DRBD_ADM_INVAL_PEER,
332 DRBD_ADM_PAUSE_SYNC,
333 DRBD_ADM_RESUME_SYNC,
334 DRBD_ADM_SUSPEND_IO,
335 DRBD_ADM_RESUME_IO,
336 DRBD_ADM_OUTDATE,
337 DRBD_ADM_GET_TIMEOUT_TYPE,
338 DRBD_ADM_DOWN,
339 DRBD_ADM_CHG_DISK_OPTS,
340 DRBD_ADM_CHG_NET_OPTS,
341 DRBD_ADM_GET_RESOURCES,
342 DRBD_ADM_GET_DEVICES,
343 DRBD_ADM_GET_CONNECTIONS,
344 DRBD_ADM_GET_PEER_DEVICES,
345 DRBD_ADM_RESOURCE_STATE,
346 DRBD_ADM_DEVICE_STATE,
347 DRBD_ADM_CONNECTION_STATE,
348 DRBD_ADM_PEER_DEVICE_STATE,
349 DRBD_ADM_GET_INITIAL_STATE,
350 DRBD_ADM_HELPER = 40,
351 DRBD_ADM_INITIAL_STATE_DONE,
352
353 __DRBD_ADM_MAX,
354 DRBD_ADM_MAX = (__DRBD_ADM_MAX - 1)
355};
356
357#define DRBD_MCGRP_EVENTS "events"
358
359#endif /* _LINUX_DRBD_GENL_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/drbd_limits.h created+251
......@@ -0,0 +1,251 @@
1/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2/*
3 drbd_limits.h
4 This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
5*/
6
7/*
8 * Our current limitations.
9 * Some of them are hard limits,
10 * some of them are arbitrary range limits, that make it easier to provide
11 * feedback about nonsense settings for certain configurable values.
12 */
13
14#ifndef _LINUX_DRBD_LIMITS_H
15#define _LINUX_DRBD_LIMITS_H
16
17#include <linux/drbd.h>
18
19#define DRBD_MINOR_COUNT_MIN 1U
20#define DRBD_MINOR_COUNT_MAX 255U
21#define DRBD_MINOR_COUNT_DEF 32U
22#define DRBD_MINOR_COUNT_SCALE '1'
23
24#define DRBD_VOLUME_MAX 65534U
25
26#define DRBD_DIALOG_REFRESH_MIN 0U
27#define DRBD_DIALOG_REFRESH_MAX 600U
28#define DRBD_DIALOG_REFRESH_SCALE '1'
29
30/* valid port number */
31#define DRBD_PORT_MIN 1U
32#define DRBD_PORT_MAX 0xffffU
33#define DRBD_PORT_SCALE '1'
34
35/* startup { */
36 /* if you want more than 3.4 days, disable */
37#define DRBD_WFC_TIMEOUT_MIN 0U
38#define DRBD_WFC_TIMEOUT_MAX 300000U
39#define DRBD_WFC_TIMEOUT_DEF 0U
40#define DRBD_WFC_TIMEOUT_SCALE '1'
41
42#define DRBD_DEGR_WFC_TIMEOUT_MIN 0U
43#define DRBD_DEGR_WFC_TIMEOUT_MAX 300000U
44#define DRBD_DEGR_WFC_TIMEOUT_DEF 0U
45#define DRBD_DEGR_WFC_TIMEOUT_SCALE '1'
46
47#define DRBD_OUTDATED_WFC_TIMEOUT_MIN 0U
48#define DRBD_OUTDATED_WFC_TIMEOUT_MAX 300000U
49#define DRBD_OUTDATED_WFC_TIMEOUT_DEF 0U
50#define DRBD_OUTDATED_WFC_TIMEOUT_SCALE '1'
51/* }*/
52
53/* net { */
54 /* timeout, unit centi seconds
55 * more than one minute timeout is not useful */
56#define DRBD_TIMEOUT_MIN 1U
57#define DRBD_TIMEOUT_MAX 600U
58#define DRBD_TIMEOUT_DEF 60U /* 6 seconds */
59#define DRBD_TIMEOUT_SCALE '1'
60
61 /* If backing disk takes longer than disk_timeout, mark the disk as failed */
62#define DRBD_DISK_TIMEOUT_MIN 0U /* 0 = disabled */
63#define DRBD_DISK_TIMEOUT_MAX 6000U /* 10 Minutes */
64#define DRBD_DISK_TIMEOUT_DEF 0U /* disabled */
65#define DRBD_DISK_TIMEOUT_SCALE '1'
66
67 /* active connection retries when C_WF_CONNECTION */
68#define DRBD_CONNECT_INT_MIN 1U
69#define DRBD_CONNECT_INT_MAX 120U
70#define DRBD_CONNECT_INT_DEF 10U /* seconds */
71#define DRBD_CONNECT_INT_SCALE '1'
72
73 /* keep-alive probes when idle */
74#define DRBD_PING_INT_MIN 1U
75#define DRBD_PING_INT_MAX 120U
76#define DRBD_PING_INT_DEF 10U
77#define DRBD_PING_INT_SCALE '1'
78
79 /* timeout for the ping packets.*/
80#define DRBD_PING_TIMEO_MIN 1U
81#define DRBD_PING_TIMEO_MAX 300U
82#define DRBD_PING_TIMEO_DEF 5U
83#define DRBD_PING_TIMEO_SCALE '1'
84
85 /* max number of write requests between write barriers */
86#define DRBD_MAX_EPOCH_SIZE_MIN 1U
87#define DRBD_MAX_EPOCH_SIZE_MAX 20000U
88#define DRBD_MAX_EPOCH_SIZE_DEF 2048U
89#define DRBD_MAX_EPOCH_SIZE_SCALE '1'
90
91 /* I don't think that a tcp send buffer of more than 10M is useful */
92#define DRBD_SNDBUF_SIZE_MIN 0U
93#define DRBD_SNDBUF_SIZE_MAX (10U<<20)
94#define DRBD_SNDBUF_SIZE_DEF 0U
95#define DRBD_SNDBUF_SIZE_SCALE '1'
96
97#define DRBD_RCVBUF_SIZE_MIN 0U
98#define DRBD_RCVBUF_SIZE_MAX (10U<<20)
99#define DRBD_RCVBUF_SIZE_DEF 0U
100#define DRBD_RCVBUF_SIZE_SCALE '1'
101
102 /* @4k PageSize -> 128kB - 512MB */
103#define DRBD_MAX_BUFFERS_MIN 32U
104#define DRBD_MAX_BUFFERS_MAX 131072U
105#define DRBD_MAX_BUFFERS_DEF 2048U
106#define DRBD_MAX_BUFFERS_SCALE '1'
107
108 /* @4k PageSize -> 4kB - 512MB */
109#define DRBD_UNPLUG_WATERMARK_MIN 1U
110#define DRBD_UNPLUG_WATERMARK_MAX 131072U
111#define DRBD_UNPLUG_WATERMARK_DEF (DRBD_MAX_BUFFERS_DEF/16)
112#define DRBD_UNPLUG_WATERMARK_SCALE '1'
113
114 /* 0 is disabled.
115 * 200 should be more than enough even for very short timeouts */
116#define DRBD_KO_COUNT_MIN 0U
117#define DRBD_KO_COUNT_MAX 200U
118#define DRBD_KO_COUNT_DEF 7U
119#define DRBD_KO_COUNT_SCALE '1'
120/* } */
121
122/* syncer { */
123 /* FIXME allow rate to be zero? */
124#define DRBD_RESYNC_RATE_MIN 1U
125/* channel bonding 10 GbE, or other hardware */
126#define DRBD_RESYNC_RATE_MAX (4 << 20)
127#define DRBD_RESYNC_RATE_DEF 250U
128#define DRBD_RESYNC_RATE_SCALE 'k' /* kilobytes */
129
130#define DRBD_AL_EXTENTS_MIN 67U
131 /* we use u16 as "slot number", (u16)~0 is "FREE".
132 * If you use >= 292 kB on-disk ring buffer,
133 * this is the maximum you can use: */
134#define DRBD_AL_EXTENTS_MAX 0xfffeU
135#define DRBD_AL_EXTENTS_DEF 1237U
136#define DRBD_AL_EXTENTS_SCALE '1'
137
138#define DRBD_MINOR_NUMBER_MIN -1
139#define DRBD_MINOR_NUMBER_MAX ((1 << 20) - 1)
140#define DRBD_MINOR_NUMBER_DEF -1
141#define DRBD_MINOR_NUMBER_SCALE '1'
142
143/* } */
144
145/* drbdsetup XY resize -d Z
146 * you are free to reduce the device size to nothing, if you want to.
147 * the upper limit with 64bit kernel, enough ram and flexible meta data
148 * is 1 PiB, currently. */
149/* DRBD_MAX_SECTORS */
150#define DRBD_DISK_SIZE_MIN 0LLU
151#define DRBD_DISK_SIZE_MAX (1LLU * (2LLU << 40))
152#define DRBD_DISK_SIZE_DEF 0LLU /* = disabled = no user size... */
153#define DRBD_DISK_SIZE_SCALE 's' /* sectors */
154
155#define DRBD_ON_IO_ERROR_DEF EP_DETACH
156#define DRBD_FENCING_DEF FP_DONT_CARE
157#define DRBD_AFTER_SB_0P_DEF ASB_DISCONNECT
158#define DRBD_AFTER_SB_1P_DEF ASB_DISCONNECT
159#define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT
160#define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT
161#define DRBD_ON_NO_DATA_DEF OND_IO_ERROR
162#define DRBD_ON_CONGESTION_DEF OC_BLOCK
163#define DRBD_READ_BALANCING_DEF RB_PREFER_LOCAL
164
165#define DRBD_MAX_BIO_BVECS_MIN 0U
166#define DRBD_MAX_BIO_BVECS_MAX 128U
167#define DRBD_MAX_BIO_BVECS_DEF 0U
168#define DRBD_MAX_BIO_BVECS_SCALE '1'
169
170#define DRBD_C_PLAN_AHEAD_MIN 0U
171#define DRBD_C_PLAN_AHEAD_MAX 300U
172#define DRBD_C_PLAN_AHEAD_DEF 20U
173#define DRBD_C_PLAN_AHEAD_SCALE '1'
174
175#define DRBD_C_DELAY_TARGET_MIN 1U
176#define DRBD_C_DELAY_TARGET_MAX 100U
177#define DRBD_C_DELAY_TARGET_DEF 10U
178#define DRBD_C_DELAY_TARGET_SCALE '1'
179
180#define DRBD_C_FILL_TARGET_MIN 0U
181#define DRBD_C_FILL_TARGET_MAX (1U<<20) /* 500MByte in sec */
182#define DRBD_C_FILL_TARGET_DEF 100U /* Try to place 50KiB in socket send buffer during resync */
183#define DRBD_C_FILL_TARGET_SCALE 's' /* sectors */
184
185#define DRBD_C_MAX_RATE_MIN 250U
186#define DRBD_C_MAX_RATE_MAX (4U << 20)
187#define DRBD_C_MAX_RATE_DEF 102400U
188#define DRBD_C_MAX_RATE_SCALE 'k' /* kilobytes */
189
190#define DRBD_C_MIN_RATE_MIN 0U
191#define DRBD_C_MIN_RATE_MAX (4U << 20)
192#define DRBD_C_MIN_RATE_DEF 250U
193#define DRBD_C_MIN_RATE_SCALE 'k' /* kilobytes */
194
195#define DRBD_CONG_FILL_MIN 0U
196#define DRBD_CONG_FILL_MAX (10U<<21) /* 10GByte in sectors */
197#define DRBD_CONG_FILL_DEF 0U
198#define DRBD_CONG_FILL_SCALE 's' /* sectors */
199
200#define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN
201#define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX
202#define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF
203#define DRBD_CONG_EXTENTS_SCALE DRBD_AL_EXTENTS_SCALE
204
205#define DRBD_PROTOCOL_DEF DRBD_PROT_C
206
207#define DRBD_DISK_BARRIER_DEF 0U
208#define DRBD_DISK_FLUSHES_DEF 1U
209#define DRBD_DISK_DRAIN_DEF 1U
210#define DRBD_MD_FLUSHES_DEF 1U
211#define DRBD_TCP_CORK_DEF 1U
212#define DRBD_AL_UPDATES_DEF 1U
213
214/* We used to ignore the discard_zeroes_data setting.
215 * To not change established (and expected) behaviour,
216 * by default assume that, for discard_zeroes_data=0,
217 * we can make that an effective discard_zeroes_data=1,
218 * if we only explicitly zero-out unaligned partial chunks. */
219#define DRBD_DISCARD_ZEROES_IF_ALIGNED_DEF 1U
220
221/* Some backends pretend to support WRITE SAME,
222 * but fail such requests when they are actually submitted.
223 * This is to tell DRBD to not even try. */
224#define DRBD_DISABLE_WRITE_SAME_DEF 0U
225
226#define DRBD_ALLOW_TWO_PRIMARIES_DEF 0U
227#define DRBD_ALWAYS_ASBP_DEF 0U
228#define DRBD_USE_RLE_DEF 1U
229#define DRBD_CSUMS_AFTER_CRASH_ONLY_DEF 0U
230
231#define DRBD_AL_STRIPES_MIN 1U
232#define DRBD_AL_STRIPES_MAX 1024U
233#define DRBD_AL_STRIPES_DEF 1U
234#define DRBD_AL_STRIPES_SCALE '1'
235
236#define DRBD_AL_STRIPE_SIZE_MIN 4U
237#define DRBD_AL_STRIPE_SIZE_MAX 16777216U
238#define DRBD_AL_STRIPE_SIZE_DEF 32U
239#define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */
240
241#define DRBD_SOCKET_CHECK_TIMEO_MIN 0U
242#define DRBD_SOCKET_CHECK_TIMEO_MAX DRBD_PING_TIMEO_MAX
243#define DRBD_SOCKET_CHECK_TIMEO_DEF 0U
244#define DRBD_SOCKET_CHECK_TIMEO_SCALE '1'
245
246#define DRBD_RS_DISCARD_GRANULARITY_MIN 0U
247#define DRBD_RS_DISCARD_GRANULARITY_MAX (1U<<20) /* 1MiByte */
248#define DRBD_RS_DISCARD_GRANULARITY_DEF 0U /* disabled by default */
249#define DRBD_RS_DISCARD_GRANULARITY_SCALE '1' /* bytes */
250
251#endif /* _LINUX_DRBD_LIMITS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/ethtool.h+3
......@@ -291,6 +291,9 @@ enum phy_tunable_id {
291291 ETHTOOL_PHY_DOWNSHIFT,
292292 ETHTOOL_PHY_FAST_LINK_DOWN,
293293 ETHTOOL_PHY_EDPD,
294 ETHTOOL_PHY_SHORT_CABLE_PRESET,
295 ETHTOOL_PHY_LPF_BW,
296 ETHTOOL_PHY_DSP_EQ_INIT_VALUE,
294297 /*
295298 * Add your fresh new phy tunable attribute above and remember to update
296299 * phy_tunable_strings[] in net/ethtool/common.c
lib/libc/include/any-linux-any/linux/fs.h+17-1
......@@ -250,6 +250,13 @@ struct file_attr {
250250#define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */
251251#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */
252252#define FS_XFLAG_VERITY 0x00020000 /* fs-verity enabled */
253/*
254 * Case handling flags (read-only, cannot be set via ioctl).
255 * Default (neither set) indicates POSIX semantics: case-sensitive
256 * lookups and case-preserving storage.
257 */
258#define FS_XFLAG_CASEFOLD 0x00040000 /* case-insensitive lookups */
259#define FS_XFLAG_CASENONPRESERVING 0x00080000 /* case not preserved */
253260#define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
254261
255262/* the read-only stuff doesn't really belong here, but any other place is
......@@ -384,7 +391,16 @@ struct file_attr {
384391#define FS_DAX_FL 0x02000000 /* Inode is DAX */
385392#define FS_INLINE_DATA_FL 0x10000000 /* Reserved for ext4 */
386393#define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */
387#define FS_CASEFOLD_FL 0x40000000 /* Folder is case insensitive */
394/*
395 * FS_CASEFOLD_FL indicates case-insensitive name lookup. The
396 * bit is most often reported on directories, where it controls
397 * lookups of entries within. Filesystems that derive
398 * case-insensitivity from mount or volume state may also report
399 * it on non-directory inodes; userspace must not assume the bit
400 * is directory-only. FS_XFLAG_CASEFOLD reports the same
401 * information read-only via FS_IOC_FSGETXATTR.
402 */
403#define FS_CASEFOLD_FL 0x40000000
388404#define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
389405
390406#define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
lib/libc/include/any-linux-any/linux/fsl_hypervisor.h+2-2
......@@ -114,9 +114,9 @@ struct fsl_hv_ioctl_stop {
114114 * @target: the partition ID of the target partition, or -1 for this
115115 * partition
116116 * @reserved: reserved, must be set to 0
117 * @local_addr: user-space virtual address of a buffer in the local
117 * @local_vaddr: user-space virtual address of a buffer in the local
118118 * partition
119 * @remote_addr: guest physical address of a buffer in the
119 * @remote_paddr: guest physical address of a buffer in the
120120 * remote partition
121121 * @count: the number of bytes to copy. Both the local and remote
122122 * buffers must be at least 'count' bytes long
lib/libc/include/any-linux-any/linux/futex.h+45-15
......@@ -25,23 +25,49 @@
2525
2626#define FUTEX_PRIVATE_FLAG 128
2727#define FUTEX_CLOCK_REALTIME 256
28#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
29
30#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
31#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
32#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
33#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
34#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
35#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
36#define FUTEX_LOCK_PI2_PRIVATE (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG)
37#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
38#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
28#define FUTEX_ROBUST_UNLOCK 512
29#define FUTEX_ROBUST_LIST32 1024
30
31#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME | \
32 FUTEX_ROBUST_UNLOCK | FUTEX_ROBUST_LIST32)
33
34#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
35#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
36#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
37#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
38#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
39#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
40#define FUTEX_LOCK_PI2_PRIVATE (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG)
41#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
42#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
3943#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
4044#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
41#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \
42 FUTEX_PRIVATE_FLAG)
43#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \
44 FUTEX_PRIVATE_FLAG)
45#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
46#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
47
48/*
49 * Operations to unlock a futex, clear the robust list pending op pointer and
50 * wake waiters.
51 */
52#define FUTEX_UNLOCK_PI_LIST64 (FUTEX_UNLOCK_PI | FUTEX_ROBUST_UNLOCK)
53#define FUTEX_UNLOCK_PI_LIST64_PRIVATE (FUTEX_UNLOCK_PI_LIST64 | FUTEX_PRIVATE_FLAG)
54#define FUTEX_UNLOCK_PI_LIST32 (FUTEX_UNLOCK_PI | FUTEX_ROBUST_UNLOCK | \
55 FUTEX_ROBUST_LIST32)
56#define FUTEX_UNLOCK_PI_LIST32_PRIVATE (FUTEX_UNLOCK_PI_LIST32 | FUTEX_PRIVATE_FLAG)
57
58#define FUTEX_UNLOCK_WAKE_LIST64 (FUTEX_WAKE | FUTEX_ROBUST_UNLOCK)
59#define FUTEX_UNLOCK_WAKE_LIST64_PRIVATE (FUTEX_UNLOCK_WAKE_LIST64 | FUTEX_PRIVATE_FLAG)
60
61#define FUTEX_UNLOCK_WAKE_LIST32 (FUTEX_WAKE | FUTEX_ROBUST_UNLOCK | \
62 FUTEX_ROBUST_LIST32)
63#define FUTEX_UNLOCK_WAKE_LIST32_PRIVATE (FUTEX_UNLOCK_WAKE_LIST32 | FUTEX_PRIVATE_FLAG)
64
65#define FUTEX_UNLOCK_BITSET_LIST64 (FUTEX_WAKE_BITSET | FUTEX_ROBUST_UNLOCK)
66#define FUTEX_UNLOCK_BITSET_LIST64_PRIVATE (FUTEX_UNLOCK_BITSET_LIST64 | FUTEX_PRIVATE_FLAG)
67
68#define FUTEX_UNLOCK_BITSET_LIST32 (FUTEX_WAKE_BITSET | FUTEX_ROBUST_UNLOCK | \
69 FUTEX_ROBUST_LIST32)
70#define FUTEX_UNLOCK_BITSET_LIST32_PRIVATE (FUTEX_UNLOCK_BITSET_LIST32 | FUTEX_PRIVATE_FLAG)
4571
4672/*
4773 * Flags for futex2 syscalls.
......@@ -177,6 +203,10 @@ struct robust_list_head {
177203 */
178204#define ROBUST_LIST_LIMIT 2048
179205
206/* Modifiers for robust_list_head::list_op_pending */
207#define FUTEX_ROBUST_MOD_PI (0x1UL)
208#define FUTEX_ROBUST_MOD_MASK (FUTEX_ROBUST_MOD_PI)
209
180210/*
181211 * bitset with all bits set for the FUTEX_xxx_BITSET OPs to request a
182212 * match of any bit.
lib/libc/include/any-linux-any/linux/if_bridge.h+1
......@@ -526,6 +526,7 @@ enum {
526526 BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS,
527527 BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS,
528528 BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS,
529 BRIDGE_VLANDB_ENTRY_NEIGH_FORWARD_GRAT,
529530 __BRIDGE_VLANDB_ENTRY_MAX,
530531};
531532#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
lib/libc/include/any-linux-any/linux/if_ether.h+6
......@@ -82,6 +82,7 @@
8282#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
8383#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
8484#define ETH_P_LINK_CTL 0x886c /* HPNA, wlan link local tunnel */
85#define ETH_P_8021AC 0x8870 /* 802.1AC LLC > 1500 bytes */
8586#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
8687 * over Ethernet
8788 */
......@@ -123,6 +124,7 @@
123124#define ETH_P_DSA_A5PSW 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */
124125#define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */
125126#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
127#define ETH_P_NXP_NETC 0xFD3A /* NXP NETC DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
126128
127129#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is more than this value
128130 * then the frame is Ethernet II. Else it is 802.3 */
......@@ -163,6 +165,10 @@
163165#define ETH_P_MCTP 0x00FA /* Management component transport
164166 * protocol packets
165167 */
168#define ETH_P_GRE_OSI 0x00FE /* GRE tunnels: LLC "fe fe 03" analog,
169 * used primarily for IS-IS over GRE
170 * WARNING: not internal, used on wire!
171 */
166172
167173/*
168174 * This is an Ethernet frame header.
lib/libc/include/any-linux-any/linux/if_link.h+20
......@@ -1083,6 +1083,22 @@ enum {
10831083 * Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS*
10841084 * is enabled for a given port.
10851085 *
1086 * @IFLA_BRPORT_NEIGH_FORWARD_GRAT
1087 * Controls whether gratuitous ARP packets and unsolicited Neighbor
1088 * Advertisement packets are forwarded on a given port even when neighbor
1089 * suppression is enabled.
1090 * By default this flag is off, meaning gratuitous ARP and unsolicited NA
1091 * packets will be suppressed when neighbor suppression is enabled.
1092 * Setting this flag to on allows these packets to be forwarded even
1093 * when *IFLA_BRPORT_NEIGH_SUPPRESS* or *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS*
1094 * is enabled.
1095 *
1096 * Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS*
1097 * or *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS* is enabled for a given port.
1098 * When *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS* is set, this port-level flag is
1099 * ignored and per-VLAN control is available via
1100 * *BRIDGE_VLANDB_ENTRY_NEIGH_FORWARD_GRAT*.
1101 *
10861102 * @IFLA_BRPORT_BACKUP_NHID
10871103 * The FDB nexthop object ID to attach to packets being redirected to a
10881104 * backup port that has VLAN tunnel mapping enabled (via the
......@@ -1135,6 +1151,7 @@ enum {
11351151 IFLA_BRPORT_MCAST_MAX_GROUPS,
11361152 IFLA_BRPORT_NEIGH_VLAN_SUPPRESS,
11371153 IFLA_BRPORT_BACKUP_NHID,
1154 IFLA_BRPORT_NEIGH_FORWARD_GRAT,
11381155 __IFLA_BRPORT_MAX
11391156};
11401157#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
......@@ -1487,6 +1504,8 @@ enum {
14871504 IFLA_GENEVE_INNER_PROTO_INHERIT,
14881505 IFLA_GENEVE_PORT_RANGE,
14891506 IFLA_GENEVE_GRO_HINT,
1507 IFLA_GENEVE_LOCAL,
1508 IFLA_GENEVE_LOCAL6,
14901509 __IFLA_GENEVE_MAX
14911510};
14921511#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
......@@ -1582,6 +1601,7 @@ enum {
15821601 IFLA_BOND_NS_IP6_TARGET,
15831602 IFLA_BOND_COUPLED_CONTROL,
15841603 IFLA_BOND_BROADCAST_NEIGH,
1604 IFLA_BOND_LACP_STRICT,
15851605 __IFLA_BOND_MAX,
15861606};
15871607
lib/libc/include/any-linux-any/linux/iio/types.h+2
......@@ -53,6 +53,7 @@ enum iio_chan_type {
5353 IIO_CHROMATICITY,
5454 IIO_ATTENTION,
5555 IIO_ALTCURRENT,
56 IIO_COVERAGE,
5657};
5758
5859enum iio_modifier {
......@@ -113,6 +114,7 @@ enum iio_modifier {
113114 IIO_MOD_ACTIVE,
114115 IIO_MOD_REACTIVE,
115116 IIO_MOD_APPARENT,
117 IIO_MOD_QUATERNION_AXIS,
116118};
117119
118120enum iio_event_type {
lib/libc/include/any-linux-any/linux/io_uring/bpf_filter.h+16
......@@ -27,6 +27,22 @@ struct io_uring_bpf_ctx {
2727 __u64 mode;
2828 __u64 resolve;
2929 } open;
30 /*
31 * For CONNECT: fields are populated only when addr_len covers
32 * them; unpopulated fields are zero from the caller-side memset
33 * in io_uring_populate_bpf_ctx(). port and v4_addr are network
34 * byte order. Filters may only issue BPF_LD|BPF_W|BPF_ABS at
35 * 4-byte aligned offsets; load + mask for sub-word fields.
36 */
37 struct {
38 __u32 family; /* sa_family_t zero-extended */
39 __be16 port;
40 __u8 pad[2];
41 union {
42 __be32 v4_addr;
43 __u8 v6_addr[16];
44 };
45 } connect;
3046 };
3147};
3248
lib/libc/include/any-linux-any/linux/io_uring/query.h+12
......@@ -23,6 +23,7 @@ enum {
2323 IO_URING_QUERY_OPCODES = 0,
2424 IO_URING_QUERY_ZCRX = 1,
2525 IO_URING_QUERY_SCQ = 2,
26 IO_URING_QUERY_ZCRX_EVENT = 3,
2627
2728 __IO_URING_QUERY_MAX,
2829};
......@@ -62,6 +63,17 @@ struct io_uring_query_zcrx {
6263 __u64 __resv2;
6364};
6465
66struct io_uring_query_zcrx_event {
67 /* Bitmask of supported ZCRX_EVENT_* flags */
68 __u32 event_flags;
69 /* Size of zcrx_stats */
70 __u32 stats_size;
71 /* Required alignment for the stats struct within the region (ie stats_offset) */
72 __u32 stats_off_alignment;
73 __u32 __resv1;
74 __u64 __resv2[4];
75};
76
6577struct io_uring_query_scq {
6678 /* The SQ/CQ rings header size */
6779 __u64 hdr_size;
lib/libc/include/any-linux-any/linux/io_uring/zcrx.h+35-1
......@@ -65,6 +65,32 @@ enum zcrx_features {
6565 * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
6666 */
6767 ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
68 ZCRX_FEATURE_EVENT = 1 << 1,
69};
70
71enum zcrx_event_type {
72 ZCRX_EVENT_ALLOC_FAIL,
73 ZCRX_EVENT_COPY,
74
75 __ZCRX_EVENT_TYPE_LAST,
76};
77
78enum zcrx_event_desc_flags {
79 /* If set, stats_offset holds a valid offset to a zcrx_stats struct */
80 ZCRX_EVENT_DESC_FLAG_STATS = 1 << 0,
81};
82
83struct zcrx_stats {
84 __u64 copy_count; /* cumulative copy-fallback CQEs */
85 __u64 copy_bytes; /* cumulative bytes copied */
86};
87
88struct zcrx_event_desc {
89 __u64 user_data;
90 __u32 type_mask;
91 __u32 flags; /* see enum zcrx_event_desc_flags */
92 __u64 stats_offset; /* offset from the beginning of refill ring region for stats */
93 __u64 __resv2[9];
6894};
6995
7096/*
......@@ -82,12 +108,14 @@ struct io_uring_zcrx_ifq_reg {
82108 struct io_uring_zcrx_offsets offsets;
83109 __u32 zcrx_id;
84110 __u32 rx_buf_len;
85 __u64 __resv[3];
111 __u64 event_desc; /* see struct zcrx_event_desc */
112 __u64 __resv[2];
86113};
87114
88115enum zcrx_ctrl_op {
89116 ZCRX_CTRL_FLUSH_RQ,
90117 ZCRX_CTRL_EXPORT,
118 ZCRX_CTRL_ARM_EVENT,
91119
92120 __ZCRX_CTRL_LAST,
93121};
......@@ -101,6 +129,11 @@ struct zcrx_ctrl_export {
101129 __u32 __resv1[11];
102130};
103131
132struct zcrx_ctrl_arm_event {
133 __u32 event_type; /* see enum zcrx_event_type */
134 __u32 __resv[11];
135};
136
104137struct zcrx_ctrl {
105138 __u32 zcrx_id;
106139 __u32 op; /* see enum zcrx_ctrl_op */
......@@ -109,6 +142,7 @@ struct zcrx_ctrl {
109142 union {
110143 struct zcrx_ctrl_export zc_export;
111144 struct zcrx_ctrl_flush_rq zc_flush;
145 struct zcrx_ctrl_arm_event zc_arm_event;
112146 };
113147};
114148
lib/libc/include/any-linux-any/linux/iommufd.h+8-4
......@@ -224,13 +224,17 @@ struct iommu_ioas_map {
224224 * @size: sizeof(struct iommu_ioas_map_file)
225225 * @flags: same as for iommu_ioas_map
226226 * @ioas_id: same as for iommu_ioas_map
227 * @fd: the memfd to map
228 * @start: byte offset from start of file to map from
227 * @fd: the memfd or supported dma-buf file to map
228 * @start: byte offset from start of the file to map from
229229 * @length: same as for iommu_ioas_map
230230 * @iova: same as for iommu_ioas_map
231231 *
232 * Set an IOVA mapping from a memfd file. All other arguments and semantics
233 * match those of IOMMU_IOAS_MAP.
232 * Set an IOVA mapping from a memfd file. On kernels with dma-buf support,
233 * supported dma-buf files may also be accepted. This is not a generic
234 * dma-buf import path; currently supported dma-bufs include single-range
235 * VFIO PCI dma-bufs exported through VFIO_DEVICE_FEATURE_DMA_BUF, and
236 * other dma-bufs may be rejected. All other arguments and semantics match
237 * those of IOMMU_IOAS_MAP.
234238 */
235239struct iommu_ioas_map_file {
236240 __u32 size;
lib/libc/include/any-linux-any/linux/ip_vs.h-6
......@@ -28,12 +28,6 @@
2828#define IP_VS_SVC_F_SCHED_SH_FALLBACK IP_VS_SVC_F_SCHED1 /* SH fallback */
2929#define IP_VS_SVC_F_SCHED_SH_PORT IP_VS_SVC_F_SCHED2 /* SH use port */
3030
31/*
32 * Destination Server Flags
33 */
34#define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */
35#define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */
36
3731/*
3832 * IPVS sync daemon states
3933 */
lib/libc/include/any-linux-any/linux/kfd_ioctl.h+36-2
......@@ -48,9 +48,10 @@
4848 * - 1.20 - Trap handler support for expert scheduling mode available
4949 * - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions
5050 * - 1.22 - Add queue creation with metadata ring base address
51 * - 1.23 - Add profiler control ioctl to enable/disable profiler on a process
5152 */
5253#define KFD_IOCTL_MAJOR_VERSION 1
53#define KFD_IOCTL_MINOR_VERSION 22
54#define KFD_IOCTL_MINOR_VERSION 23
5455
5556struct kfd_ioctl_get_version_args {
5657 __u32 major_version; /* from KFD */
......@@ -1558,6 +1559,36 @@ struct kfd_ioctl_dbg_trap_args {
15581559 };
15591560};
15601561
1562#define KFD_IOC_PROFILER_VERSION_NUM 1
1563enum kfd_profiler_ops {
1564 KFD_IOC_PROFILER_PMC = 0,
1565 KFD_IOC_PROFILER_VERSION = 2,
1566 KFD_IOC_PROFILER_PTL_CONTROL = 3,
1567};
1568
1569/**
1570 * Enables/Disables GPU Specific profiler settings
1571 */
1572struct kfd_ioctl_pmc_settings {
1573 __u32 gpu_id; /* This is the user_gpu_id */
1574 __u32 lock; /* Lock GPU for Profiling */
1575 __u32 perfcount_enable; /* Force Perfcount Enable for queues on GPU */
1576};
1577
1578struct kfd_ioctl_ptl_control {
1579 __u32 gpu_id; /* user_gpu_id */
1580 __u32 enable; /* set 1 to enable PTL, set 0 to disable PTL */
1581};
1582
1583struct kfd_ioctl_profiler_args {
1584 __u32 op; /* kfd_profiler_op */
1585 union {
1586 struct kfd_ioctl_pmc_settings pmc;
1587 struct kfd_ioctl_ptl_control ptl;
1588 __u32 version; /* KFD_IOC_PROFILER_VERSION_NUM */
1589 };
1590};
1591
15611592#define AMDKFD_IOCTL_BASE 'K'
15621593#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
15631594#define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
......@@ -1681,7 +1712,10 @@ struct kfd_ioctl_dbg_trap_args {
16811712#define AMDKFD_IOC_CREATE_PROCESS \
16821713 AMDKFD_IO(0x27)
16831714
1715#define AMDKFD_IOC_PROFILER \
1716 AMDKFD_IOWR(0x28, struct kfd_ioctl_profiler_args)
1717
16841718#define AMDKFD_COMMAND_START 0x01
1685#define AMDKFD_COMMAND_END 0x28
1719#define AMDKFD_COMMAND_END 0x29
16861720
16871721#endif
\ No newline at end of file
lib/libc/include/any-linux-any/linux/kvm.h+1
......@@ -985,6 +985,7 @@ struct kvm_enable_cap {
985985#define KVM_CAP_S390_USER_OPEREXEC 246
986986#define KVM_CAP_S390_KEYOP 247
987987#define KVM_CAP_S390_VSIE_ESAMODE 248
988#define KVM_CAP_S390_HPAGE_2G 249
988989
989990struct kvm_irq_routing_irqchip {
990991 __u32 irqchip;
lib/libc/include/any-linux-any/linux/landlock.h+93-4
......@@ -32,6 +32,19 @@
3232 * *handle* a wide range or all access rights that they know about at build time
3333 * (and that they have tested with a kernel that supported them all).
3434 *
35 * @quiet_access_fs and @quiet_access_net are bitmasks of actions for which a
36 * denial by this layer will not trigger a log if the corresponding object (or
37 * its children, for filesystem rules) is marked with the "quiet" bit via
38 * %LANDLOCK_ADD_RULE_QUIET, even if logging would normally take place per
39 * landlock_restrict_self() flags. @quiet_scoped is similar, except that it
40 * does not require marking any objects as quiet - if the ruleset is created
41 * with any bits set in @quiet_scoped, then denial of such scoped resources will
42 * not trigger any log. These 3 fields are available since Landlock ABI version
43 * 10.
44 *
45 * @quiet_access_fs, @quiet_access_net and @quiet_scoped must be a subset of
46 * @handled_access_fs, @handled_access_net and @scoped respectively.
47 *
3548 * This structure can grow in future Landlock versions.
3649 */
3750struct landlock_ruleset_attr {
......@@ -51,6 +64,20 @@ struct landlock_ruleset_attr {
5164 * resources (e.g. IPCs).
5265 */
5366 __u64 scoped;
67 /**
68 * @quiet_access_fs: Bitmask of filesystem actions which should not be
69 * logged if per-object quiet flag is set.
70 */
71 __u64 quiet_access_fs;
72 /**
73 * @quiet_access_net: Bitmask of network actions which should not be
74 * logged if per-object quiet flag is set.
75 */
76 __u64 quiet_access_net;
77 /**
78 * @quiet_scoped: Bitmask of scoped actions which should not be logged.
79 */
80 __u64 quiet_scoped;
5481};
5582
5683/**
......@@ -69,6 +96,39 @@ struct landlock_ruleset_attr {
6996#define LANDLOCK_CREATE_RULESET_ERRATA (1U << 1)
7097/* clang-format on */
7198
99/**
100 * DOC: landlock_add_rule_flags
101 *
102 * **Flags**
103 *
104 * %LANDLOCK_ADD_RULE_QUIET
105 * Together with the quiet_* fields in struct landlock_ruleset_attr,
106 * this flag controls whether Landlock will log audit messages when
107 * access to the objects covered by this rule is denied by this layer.
108 *
109 * If logging is enabled, when Landlock denies an access, it will
110 * suppress the log if all of the following are true:
111 *
112 * - this layer is the innermost layer that denied the access;
113 * - all accesses denied by this layer are part of the quiet_* fields
114 * in the related struct landlock_ruleset_attr;
115 * - the object (or one of its parents, for filesystem rules) is
116 * marked as "quiet" via %LANDLOCK_ADD_RULE_QUIET.
117 *
118 * Because logging is only suppressed by a layer if the layer denies
119 * access, a sandboxed program cannot use this flag to "hide" access
120 * denials, without denying itself the access in the first place.
121 *
122 * The effect of this flag does not depend on the value of
123 * allowed_access in the passed in rule_attr. When this flag is
124 * present, the caller is also allowed to pass in an empty
125 * allowed_access.
126 */
127
128/* clang-format off */
129#define LANDLOCK_ADD_RULE_QUIET (1U << 0)
130/* clang-format on */
131
72132/**
73133 * DOC: landlock_restrict_self_flags
74134 *
......@@ -200,10 +260,10 @@ struct landlock_net_port_attr {
200260 * (also used for IPv6), and within that range, on a per-socket basis
201261 * with ``setsockopt(IP_LOCAL_PORT_RANGE)``.
202262 *
203 * A Landlock rule with port 0 and the %LANDLOCK_ACCESS_NET_BIND_TCP
204 * right means that requesting to bind on port 0 is allowed and it will
205 * automatically translate to binding on a kernel-assigned ephemeral
206 * port.
263 * A Landlock rule with port 0 and the %LANDLOCK_ACCESS_NET_BIND_TCP or
264 * %LANDLOCK_ACCESS_NET_BIND_UDP right means that requesting to bind on
265 * port 0 is allowed and it will automatically translate to binding on a
266 * kernel-assigned ephemeral port.
207267 */
208268 __u64 port;
209269};
......@@ -373,10 +433,39 @@ struct landlock_net_port_attr {
373433 * port. Support added in Landlock ABI version 4.
374434 * - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect TCP sockets to the given
375435 * remote port. Support added in Landlock ABI version 4.
436 *
437 * And similarly for UDP port numbers:
438 *
439 * - %LANDLOCK_ACCESS_NET_BIND_UDP: Bind UDP sockets to the given local
440 * port. Support added in Landlock ABI version 10.
441 * - %LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP: Set the remote port of UDP
442 * sockets to the given port, or send datagrams to the given remote port
443 * ignoring any destination pre-set on a socket. Support added in
444 * Landlock ABI version 10.
445 *
446 * .. note:: Setting a remote address or sending a first datagram
447 * auto-binds UDP sockets to an ephemeral local source port if not
448 * already bound. To allow this if both %LANDLOCK_ACCESS_NET_BIND_UDP
449 * and %LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP are handled, you need to
450 * either:
451 *
452 * - use a socket already bound to a port before the ruleset started
453 * being enforced;
454 * - or grant %LANDLOCK_ACCESS_NET_BIND_UDP on port 0, meaning "any
455 * port in the ephemeral port range";
456 * - or grant %LANDLOCK_ACCESS_NET_BIND_UDP on a specific port, and
457 * call :manpage:`bind(2)` on that port before trying to
458 * :manpage:`connect(2)` or send datagrams.
459 *
460 * .. note:: Sending datagrams to an ``AF_UNSPEC`` destination address
461 * family is not supported for IPv6 UDP sockets: you will need to use a
462 * ``NULL`` address instead.
376463 */
377464/* clang-format off */
378465#define LANDLOCK_ACCESS_NET_BIND_TCP (1ULL << 0)
379466#define LANDLOCK_ACCESS_NET_CONNECT_TCP (1ULL << 1)
467#define LANDLOCK_ACCESS_NET_BIND_UDP (1ULL << 2)
468#define LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP (1ULL << 3)
380469/* clang-format on */
381470
382471/**
lib/libc/include/any-linux-any/linux/liveupdate.h+24-1
......@@ -59,6 +59,7 @@ enum {
5959 LIVEUPDATE_CMD_SESSION_PRESERVE_FD = LIVEUPDATE_CMD_SESSION_BASE,
6060 LIVEUPDATE_CMD_SESSION_RETRIEVE_FD = 0x41,
6161 LIVEUPDATE_CMD_SESSION_FINISH = 0x42,
62 LIVEUPDATE_CMD_SESSION_GET_NAME = 0x43,
6263};
6364
6465/**
......@@ -168,7 +169,9 @@ struct liveupdate_session_preserve_fd {
168169 * associated with the token and populates the @fd field with a new file
169170 * descriptor referencing the restored resource in the current (new) kernel.
170171 * This operation must be performed *before* signaling completion via
171 * %LIVEUPDATE_IOCTL_FINISH.
172 * %LIVEUPDATE_IOCTL_FINISH. If a retrieve of a token fails, subsequent
173 * attempts to retrieve the token fail with the same error code. Failed
174 * retrieves are not retried.
172175 *
173176 * Return: 0 on success, negative error code on failure (e.g., invalid token).
174177 */
......@@ -213,4 +216,24 @@ struct liveupdate_session_finish {
213216#define LIVEUPDATE_SESSION_FINISH \
214217 _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_FINISH)
215218
219/**
220 * struct liveupdate_session_get_name - ioctl(LIVEUPDATE_SESSION_GET_NAME)
221 * @size: Input; sizeof(struct liveupdate_session_get_name)
222 * @reserved: Input; Must be zero. Reserved for future use.
223 * @name: Output; A null-terminated string with the full session name.
224 *
225 * Retrieves the full name of the session associated with this file descriptor.
226 * This is useful because the kernel may truncate the name shown in /proc.
227 *
228 * Return: 0 on success, negative error code on failure.
229 */
230struct liveupdate_session_get_name {
231 __u32 size;
232 __u32 reserved;
233 __u8 name[LIVEUPDATE_SESSION_NAME_LENGTH];
234};
235
236#define LIVEUPDATE_SESSION_GET_NAME \
237 _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_GET_NAME)
238
216239#endif /* _LIVEUPDATE_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/llc.h-7
......@@ -3,13 +3,6 @@
33 * IEEE 802.2 User Interface SAPs for Linux, data structures and indicators.
44 *
55 * Copyright (c) 2001 by Jay Schulist <jschlst@samba.org>
6 *
7 * This program can be redistributed or modified under the terms of the
8 * GNU General Public License as published by the Free Software Foundation.
9 * This program is distributed without any warranty or implied warranty
10 * of merchantability or fitness for a particular purpose.
11 *
12 * See the GNU General Public License for more details.
136 */
147#ifndef __LINUX_LLC_H
158#define __LINUX_LLC_H
lib/libc/include/any-linux-any/linux/mdio.h+10
......@@ -23,6 +23,10 @@
2323#define MDIO_MMD_DTEXS 5 /* DTE Extender Sublayer */
2424#define MDIO_MMD_TC 6 /* Transmission Convergence */
2525#define MDIO_MMD_AN 7 /* Auto-Negotiation */
26#define MDIO_MMD_SEP_PMA1 8 /* Separated PMA (1) */
27#define MDIO_MMD_SEP_PMA2 9 /* Separated PMA (2) */
28#define MDIO_MMD_SEP_PMA3 10 /* Separated PMA (3) */
29#define MDIO_MMD_SEP_PMA4 11 /* Separated PMA (4) */
2630#define MDIO_MMD_POWER_UNIT 13 /* PHY Power Unit */
2731#define MDIO_MMD_C22EXT 29 /* Clause 22 extension */
2832#define MDIO_MMD_VEND1 30 /* Vendor specific 1 */
......@@ -63,6 +67,8 @@
6367 * Lanes B-D are numbered 134-136. */
6468#define MDIO_PMA_10GBR_FSRT_CSR 147 /* 10GBASE-R fast retrain status and control */
6569#define MDIO_PMA_10GBR_FECABLE 170 /* 10GBASE-R FEC ability */
70#define MDIO_PMA_RSFEC_CTRL 200 /* RSFEC control */
71#define MDIO_PMA_RSFEC_LANE_MAP 206 /* RSFEC lane mapping */
6672#define MDIO_PCS_10GBX_STAT1 24 /* 10GBASE-X PCS status 1 */
6773#define MDIO_PCS_10GBRT_STAT1 32 /* 10GBASE-R/-T PCS status 1 */
6874#define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */
......@@ -175,6 +181,10 @@
175181#define MDIO_DEVS_DTEXS MDIO_DEVS_PRESENT(MDIO_MMD_DTEXS)
176182#define MDIO_DEVS_TC MDIO_DEVS_PRESENT(MDIO_MMD_TC)
177183#define MDIO_DEVS_AN MDIO_DEVS_PRESENT(MDIO_MMD_AN)
184#define MDIO_DEVS_SEP_PMA1 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA1)
185#define MDIO_DEVS_SEP_PMA2 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA2)
186#define MDIO_DEVS_SEP_PMA3 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA3)
187#define MDIO_DEVS_SEP_PMA4 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA4)
178188#define MDIO_DEVS_C22EXT MDIO_DEVS_PRESENT(MDIO_MMD_C22EXT)
179189#define MDIO_DEVS_VEND1 MDIO_DEVS_PRESENT(MDIO_MMD_VEND1)
180190#define MDIO_DEVS_VEND2 MDIO_DEVS_PRESENT(MDIO_MMD_VEND2)
lib/libc/include/any-linux-any/linux/netdev.h+2
......@@ -97,6 +97,8 @@ enum {
9797};
9898
9999enum {
100 NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN = 1,
101
100102 __NETDEV_A_IO_URING_PROVIDER_INFO_MAX,
101103 NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1)
102104};
lib/libc/include/any-linux-any/linux/nfsd_netlink.h+156
......@@ -10,6 +10,53 @@
1010#define NFSD_FAMILY_NAME "nfsd"
1111#define NFSD_FAMILY_VERSION 1
1212
13enum nfsd_cache_type {
14 NFSD_CACHE_TYPE_SVC_EXPORT = 1,
15 NFSD_CACHE_TYPE_EXPKEY = 2,
16};
17
18/*
19 * These flags are ordered to match the NFSEXP_* flags in
20 * include/linux/nfsd/export.h
21 */
22enum nfsd_export_flags {
23 NFSD_EXPORT_FLAGS_READONLY = 1,
24 NFSD_EXPORT_FLAGS_INSECURE_PORT = 2,
25 NFSD_EXPORT_FLAGS_ROOTSQUASH = 4,
26 NFSD_EXPORT_FLAGS_ALLSQUASH = 8,
27 NFSD_EXPORT_FLAGS_ASYNC = 16,
28 NFSD_EXPORT_FLAGS_GATHERED_WRITES = 32,
29 NFSD_EXPORT_FLAGS_NOREADDIRPLUS = 64,
30 NFSD_EXPORT_FLAGS_SECURITY_LABEL = 128,
31 NFSD_EXPORT_FLAGS_SIGN_FH = 256,
32 NFSD_EXPORT_FLAGS_NOHIDE = 512,
33 NFSD_EXPORT_FLAGS_NOSUBTREECHECK = 1024,
34 NFSD_EXPORT_FLAGS_NOAUTHNLM = 2048,
35 NFSD_EXPORT_FLAGS_MSNFS = 4096,
36 NFSD_EXPORT_FLAGS_FSID = 8192,
37 NFSD_EXPORT_FLAGS_CROSSMOUNT = 16384,
38 NFSD_EXPORT_FLAGS_NOACL = 32768,
39 NFSD_EXPORT_FLAGS_V4ROOT = 65536,
40 NFSD_EXPORT_FLAGS_PNFS = 131072,
41};
42
43/*
44 * These flags are ordered to match the NFSEXP_XPRTSEC_* flags in
45 * include/linux/nfsd/export.h
46 */
47enum nfsd_xprtsec_mode {
48 NFSD_XPRTSEC_MODE_NONE = 1,
49 NFSD_XPRTSEC_MODE_TLS = 2,
50 NFSD_XPRTSEC_MODE_MTLS = 4,
51};
52
53enum {
54 NFSD_A_CACHE_NOTIFY_CACHE_TYPE = 1,
55
56 __NFSD_A_CACHE_NOTIFY_MAX,
57 NFSD_A_CACHE_NOTIFY_MAX = (__NFSD_A_CACHE_NOTIFY_MAX - 1)
58};
59
1360enum {
1461 NFSD_A_RPC_STATUS_XID = 1,
1562 NFSD_A_RPC_STATUS_FLAGS,
......@@ -81,6 +128,103 @@ enum {
81128 NFSD_A_POOL_MODE_MAX = (__NFSD_A_POOL_MODE_MAX - 1)
82129};
83130
131enum {
132 NFSD_A_FSLOCATION_HOST = 1,
133 NFSD_A_FSLOCATION_PATH,
134
135 __NFSD_A_FSLOCATION_MAX,
136 NFSD_A_FSLOCATION_MAX = (__NFSD_A_FSLOCATION_MAX - 1)
137};
138
139enum {
140 NFSD_A_FSLOCATIONS_LOCATION = 1,
141
142 __NFSD_A_FSLOCATIONS_MAX,
143 NFSD_A_FSLOCATIONS_MAX = (__NFSD_A_FSLOCATIONS_MAX - 1)
144};
145
146enum {
147 NFSD_A_AUTH_FLAVOR_PSEUDOFLAVOR = 1,
148 NFSD_A_AUTH_FLAVOR_FLAGS,
149
150 __NFSD_A_AUTH_FLAVOR_MAX,
151 NFSD_A_AUTH_FLAVOR_MAX = (__NFSD_A_AUTH_FLAVOR_MAX - 1)
152};
153
154enum {
155 NFSD_A_SVC_EXPORT_SEQNO = 1,
156 NFSD_A_SVC_EXPORT_CLIENT,
157 NFSD_A_SVC_EXPORT_PATH,
158 NFSD_A_SVC_EXPORT_NEGATIVE,
159 NFSD_A_SVC_EXPORT_EXPIRY,
160 NFSD_A_SVC_EXPORT_ANON_UID,
161 NFSD_A_SVC_EXPORT_ANON_GID,
162 NFSD_A_SVC_EXPORT_FSLOCATIONS,
163 NFSD_A_SVC_EXPORT_UUID,
164 NFSD_A_SVC_EXPORT_SECINFO,
165 NFSD_A_SVC_EXPORT_XPRTSEC,
166 NFSD_A_SVC_EXPORT_FLAGS,
167 NFSD_A_SVC_EXPORT_FSID,
168
169 __NFSD_A_SVC_EXPORT_MAX,
170 NFSD_A_SVC_EXPORT_MAX = (__NFSD_A_SVC_EXPORT_MAX - 1)
171};
172
173enum {
174 NFSD_A_SVC_EXPORT_REQS_REQUESTS = 1,
175
176 __NFSD_A_SVC_EXPORT_REQS_MAX,
177 NFSD_A_SVC_EXPORT_REQS_MAX = (__NFSD_A_SVC_EXPORT_REQS_MAX - 1)
178};
179
180enum {
181 NFSD_A_EXPKEY_SEQNO = 1,
182 NFSD_A_EXPKEY_CLIENT,
183 NFSD_A_EXPKEY_FSIDTYPE,
184 NFSD_A_EXPKEY_FSID,
185 NFSD_A_EXPKEY_NEGATIVE,
186 NFSD_A_EXPKEY_EXPIRY,
187 NFSD_A_EXPKEY_PATH,
188
189 __NFSD_A_EXPKEY_MAX,
190 NFSD_A_EXPKEY_MAX = (__NFSD_A_EXPKEY_MAX - 1)
191};
192
193enum {
194 NFSD_A_EXPKEY_REQS_REQUESTS = 1,
195
196 __NFSD_A_EXPKEY_REQS_MAX,
197 NFSD_A_EXPKEY_REQS_MAX = (__NFSD_A_EXPKEY_REQS_MAX - 1)
198};
199
200enum {
201 NFSD_A_CACHE_FLUSH_MASK = 1,
202
203 __NFSD_A_CACHE_FLUSH_MAX,
204 NFSD_A_CACHE_FLUSH_MAX = (__NFSD_A_CACHE_FLUSH_MAX - 1)
205};
206
207enum {
208 NFSD_A_UNLOCK_IP_ADDRESS = 1,
209
210 __NFSD_A_UNLOCK_IP_MAX,
211 NFSD_A_UNLOCK_IP_MAX = (__NFSD_A_UNLOCK_IP_MAX - 1)
212};
213
214enum {
215 NFSD_A_UNLOCK_FILESYSTEM_PATH = 1,
216
217 __NFSD_A_UNLOCK_FILESYSTEM_MAX,
218 NFSD_A_UNLOCK_FILESYSTEM_MAX = (__NFSD_A_UNLOCK_FILESYSTEM_MAX - 1)
219};
220
221enum {
222 NFSD_A_UNLOCK_EXPORT_PATH = 1,
223
224 __NFSD_A_UNLOCK_EXPORT_MAX,
225 NFSD_A_UNLOCK_EXPORT_MAX = (__NFSD_A_UNLOCK_EXPORT_MAX - 1)
226};
227
84228enum {
85229 NFSD_CMD_RPC_STATUS_GET = 1,
86230 NFSD_CMD_THREADS_SET,
......@@ -91,9 +235,21 @@ enum {
91235 NFSD_CMD_LISTENER_GET,
92236 NFSD_CMD_POOL_MODE_SET,
93237 NFSD_CMD_POOL_MODE_GET,
238 NFSD_CMD_CACHE_NOTIFY,
239 NFSD_CMD_SVC_EXPORT_GET_REQS,
240 NFSD_CMD_SVC_EXPORT_SET_REQS,
241 NFSD_CMD_EXPKEY_GET_REQS,
242 NFSD_CMD_EXPKEY_SET_REQS,
243 NFSD_CMD_CACHE_FLUSH,
244 NFSD_CMD_UNLOCK_IP,
245 NFSD_CMD_UNLOCK_FILESYSTEM,
246 NFSD_CMD_UNLOCK_EXPORT,
94247
95248 __NFSD_CMD_MAX,
96249 NFSD_CMD_MAX = (__NFSD_CMD_MAX - 1)
97250};
98251
252#define NFSD_MCGRP_NONE "none"
253#define NFSD_MCGRP_EXPORTD "exportd"
254
99255#endif /* _LINUX_NFSD_NETLINK_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/nl80211.h+290-13
......@@ -729,7 +729,9 @@
729729 * to remain on the channel. This command is also used as an event to
730730 * notify when the requested duration starts (it may take a while for the
731731 * driver to schedule this time due to other concurrent needs for the
732 * radio).
732 * radio). An optional attribute %NL80211_ATTR_MAC can be used to filter
733 * incoming frames during remain-on-channel, such that frames
734 * addressed to the specified destination MAC are reported.
733735 * When called, this operation returns a cookie (%NL80211_ATTR_COOKIE)
734736 * that will be included with any events pertaining to this request;
735737 * the cookie is also used to cancel the request.
......@@ -1204,10 +1206,12 @@
12041206 * user space through the connect result as the user space would have
12051207 * initiated the connection through the connect request.
12061208 *
1207 * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's
1208 * ht opmode or vht opmode changes using any of %NL80211_ATTR_SMPS_MODE,
1209 * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its
1210 * address(specified in %NL80211_ATTR_MAC).
1209 * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notifies that a station's
1210 * HT opmode or VHT opmode changed using any of %NL80211_ATTR_SMPS_MODE,
1211 * %NL80211_ATTR_CHANNEL_WIDTH, %NL80211_ATTR_NSS attributes with its
1212 * address (specified in %NL80211_ATTR_MAC).
1213 * Note that 80+80 and 160 MHz might not be differentiated, i.e. may
1214 * report %NL80211_CHAN_WIDTH_160 instead of %NL80211_CHAN_WIDTH_80P80.
12111215 *
12121216 * @NL80211_CMD_GET_FTM_RESPONDER_STATS: Retrieve FTM responder statistics, in
12131217 * the %NL80211_ATTR_FTM_RESPONDER_STATS attribute.
......@@ -1415,6 +1419,12 @@
14151419 * identifying the evacuated channel.
14161420 * User space may reconfigure the local schedule in response to this
14171421 * notification.
1422 * @NL80211_CMD_START_PD: Start PD operation, identified by its
1423 * %NL80211_ATTR_WDEV interface. This interface must have been previously
1424 * created with %NL80211_CMD_NEW_INTERFACE.
1425 * @NL80211_CMD_STOP_PD: Stop the PD operation, identified by
1426 * its %NL80211_ATTR_WDEV interface.
1427 *
14181428 * @NL80211_CMD_MAX: highest used command number
14191429 * @__NL80211_CMD_AFTER_LAST: internal use
14201430 */
......@@ -1690,6 +1700,9 @@ enum nl80211_commands {
16901700
16911701 NL80211_CMD_NAN_CHANNEL_EVAC,
16921702
1703 NL80211_CMD_START_PD,
1704 NL80211_CMD_STOP_PD,
1705
16931706 /* add new commands above here */
16941707
16951708 /* used to define NL80211_CMD_MAX below */
......@@ -2991,11 +3004,13 @@ enum nl80211_commands {
29913004 * @NL80211_ATTR_EPCS: Flag attribute indicating that EPCS is enabled for a
29923005 * station interface.
29933006 *
2994 * @NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS: Extended MLD capabilities and
2995 * operations that userspace implements to use during association/ML
2996 * link reconfig, currently only "BTM MLD Recommendation For Multiple
2997 * APs Support". Drivers may set additional flags that they support
2998 * in the kernel or device.
3007 * @NL80211_ATTR_EXT_MLD_CAPA_AND_OPS: Extended MLD capabilities and operations.
3008 * For association and link reconfiguration, indicates extra capabilities
3009 * that userspace implements, currently only "BTM MLD Recommendation For
3010 * Multiple APs Support".
3011 * For wiphy information, additional flags that drivers will set, but
3012 * this is informational only for userspace (it's not expected to set
3013 * these.)
29993014 *
30003015 * @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index
30013016 * of the radio in interest. Internally a value of -1 is used to
......@@ -3140,6 +3155,16 @@ enum nl80211_commands {
31403155 * association response etc., since it's abridged in the beacon. Used
31413156 * for START_AP etc.
31423157 *
3158 * @NL80211_ATTR_ASSOC_ENCRYPTED: Flag attribute, used only with the
3159 * %NL80211_CMD_CONNECT event in SME-in-driver mode. The driver should
3160 * set this flag to indicate that both the (Re)Association Request frame
3161 * and the corresponding (Re)Association Response frame are transmitted
3162 * encrypted over the air. Enhanced Privacy Protection (EPP), as defined
3163 * in IEEE P802.11bi/D4.0, mandates this encryption.
3164 *
3165 * @NL80211_ATTR_NPCA_PRIMARY_FREQ: NPCA primary channel (u32)
3166 * @NL80211_ATTR_NPCA_PUNCT_BITMAP: NPCA puncturing bitmap (u32)
3167 *
31433168 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
31443169 * @NL80211_ATTR_MAX: highest attribute number currently defined
31453170 * @__NL80211_ATTR_AFTER_LAST: internal use
......@@ -3695,7 +3720,7 @@ enum nl80211_attrs {
36953720 NL80211_ATTR_MLO_RECONF_REM_LINKS,
36963721 NL80211_ATTR_EPCS,
36973722
3698 NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
3723 NL80211_ATTR_EXT_MLD_CAPA_AND_OPS,
36993724
37003725 NL80211_ATTR_WIPHY_RADIO_INDEX,
37013726
......@@ -3733,6 +3758,11 @@ enum nl80211_attrs {
37333758 NL80211_ATTR_NAN_MAX_CHAN_SWITCH_TIME,
37343759 NL80211_ATTR_NAN_PEER_MAPS,
37353760
3761 NL80211_ATTR_ASSOC_ENCRYPTED,
3762
3763 NL80211_ATTR_NPCA_PRIMARY_FREQ,
3764 NL80211_ATTR_NPCA_PUNCT_BITMAP,
3765
37363766 /* add attributes here, update the policy in nl80211.c */
37373767
37383768 __NL80211_ATTR_AFTER_LAST,
......@@ -3747,6 +3777,7 @@ enum nl80211_attrs {
37473777#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
37483778#define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON
37493779#define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP
3780#define NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS NL80211_ATTR_EXT_MLD_CAPA_AND_OPS
37503781
37513782/*
37523783 * Allow user space programs to use #ifdef on new attributes by defining them
......@@ -3829,6 +3860,7 @@ enum nl80211_attrs {
38293860 * @NL80211_IFTYPE_NAN_DATA: NAN data interface type (netdev); NAN data
38303861 * interfaces can only be brought up (IFF_UP) when a NAN interface
38313862 * already exists and NAN has been started (using %NL80211_CMD_START_NAN).
3863 * @NL80211_IFTYPE_PD: PD device interface type (not a netdev)
38323864 * @NL80211_IFTYPE_MAX: highest interface type number currently defined
38333865 * @NUM_NL80211_IFTYPES: number of defined interface types
38343866 *
......@@ -3851,6 +3883,7 @@ enum nl80211_iftype {
38513883 NL80211_IFTYPE_OCB,
38523884 NL80211_IFTYPE_NAN,
38533885 NL80211_IFTYPE_NAN_DATA,
3886 NL80211_IFTYPE_PD,
38543887
38553888 /* keep last */
38563889 NUM_NL80211_IFTYPES,
......@@ -5790,6 +5823,18 @@ enum nl80211_key_default_types {
57905823 * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
57915824 * Defaults to @NL80211_KEY_RX_TX.
57925825 * @NL80211_KEY_DEFAULT_BEACON: flag indicating default Beacon frame key
5826 * @NL80211_KEY_LTF_SEED: LTF key seed is used by the driver to generate
5827 * secure LTF keys used in case of peer measurement request with FTM
5828 * request type as either %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
5829 * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED. Secure LTF key seeds
5830 * will help enable PHY security in peer measurement session.
5831 * The LTF key seed is installed along with the TK (Temporal Key) using
5832 * %NL80211_CMD_NEW_KEY. The TK is configured using the
5833 * %NL80211_ATTR_KEY_DATA attribute, while the LTF key seed is configured
5834 * using this attribute. Both keys must be configured before initiation
5835 * of peer measurement to ensure peer measurement session is secure.
5836 * Only valid if %NL80211_EXT_FEATURE_SET_KEY_LTF_SEED is set. This
5837 * attribute is restricted to pairwise keys (%NL80211_KEYTYPE_PAIRWISE).
57935838 *
57945839 * @__NL80211_KEY_AFTER_LAST: internal
57955840 * @NL80211_KEY_MAX: highest key attribute
......@@ -5806,6 +5851,7 @@ enum nl80211_key_attributes {
58065851 NL80211_KEY_DEFAULT_TYPES,
58075852 NL80211_KEY_MODE,
58085853 NL80211_KEY_DEFAULT_BEACON,
5854 NL80211_KEY_LTF_SEED,
58095855
58105856 /* keep last */
58115857 __NL80211_KEY_AFTER_LAST,
......@@ -7029,6 +7075,16 @@ enum nl80211_feature_flags {
70297075 * (NL80211_CMD_AUTHENTICATE) in non-AP STA mode, as specified in
70307076 * "IEEE P802.11bi/D4.0, 12.16.5".
70317077 *
7078 * @NL80211_EXT_FEATURE_ROC_ADDR_FILTER: Driver supports MAC address
7079 * filtering during remain-on-channel. When %NL80211_ATTR_MAC is
7080 * provided with %NL80211_CMD_REMAIN_ON_CHANNEL, the driver will
7081 * forward frames with a matching MAC address to userspace during
7082 * the off-channel period.
7083 *
7084 * @NL80211_EXT_FEATURE_SET_KEY_LTF_SEED: Driver supports installing the
7085 * LTF key seed via %NL80211_KEY_LTF_SEED. The seed is used to generate
7086 * secure LTF keys for secure LTF measurement sessions.
7087 *
70327088 * @NUM_NL80211_EXT_FEATURES: number of extended features.
70337089 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
70347090 */
......@@ -7108,6 +7164,8 @@ enum nl80211_ext_feature_index {
71087164 NL80211_EXT_FEATURE_EPPKE,
71097165 NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION,
71107166 NL80211_EXT_FEATURE_IEEE8021X_AUTH,
7167 NL80211_EXT_FEATURE_ROC_ADDR_FILTER,
7168 NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,
71117169
71127170 /* add new features before the definition below */
71137171 NUM_NL80211_EXT_FEATURES,
......@@ -7960,6 +8018,26 @@ enum nl80211_peer_measurement_resp {
79608018 NL80211_PMSR_RESP_ATTR_MAX = NUM_NL80211_PMSR_RESP_ATTRS - 1
79618019};
79628020
8021/**
8022 * enum nl80211_peer_measurement_ftm_req_type - FTM ranging request type,
8023 * used with %NL80211_PMSR_PEER_ATTR_REQ_TYPE
8024 *
8025 * @NL80211_PMSR_FTM_REQ_TYPE_INFRA: infrastructure ranging, i.e. STA-to-AP
8026 * @NL80211_PMSR_FTM_REQ_TYPE_PD: peer-to-peer ranging as defined in the
8027 * Wi-Fi Alliance specification "Proximity Ranging (PR) Implementation
8028 * Consideration Draft 1.9 Rev 1"
8029 * @NUM_NL80211_PMSR_FTM_REQ_TYPE: internal
8030 * @NL80211_PMSR_FTM_REQ_TYPE_MAX: highest request type value
8031 */
8032enum nl80211_peer_measurement_ftm_req_type {
8033 NL80211_PMSR_FTM_REQ_TYPE_INFRA,
8034 NL80211_PMSR_FTM_REQ_TYPE_PD,
8035
8036 /* keep last */
8037 NUM_NL80211_PMSR_FTM_REQ_TYPE,
8038 NL80211_PMSR_FTM_REQ_TYPE_MAX = NUM_NL80211_PMSR_FTM_REQ_TYPE - 1
8039};
8040
79638041/**
79648042 * enum nl80211_peer_measurement_peer_attrs - peer attributes for measurement
79658043 * @__NL80211_PMSR_PEER_ATTR_INVALID: invalid
......@@ -7973,6 +8051,9 @@ enum nl80211_peer_measurement_resp {
79738051 * @NL80211_PMSR_PEER_ATTR_RESP: This is a nested attribute indexed by
79748052 * measurement type, with attributes from the
79758053 * &enum nl80211_peer_measurement_resp inside.
8054 * @NL80211_PMSR_PEER_ATTR_REQ_TYPE: u32 attribute specifying the ranging
8055 * request type, using values from &enum nl80211_peer_measurement_ftm_req_type.
8056 * If absent, defaults to %NL80211_PMSR_FTM_REQ_TYPE_INFRA.
79768057 *
79778058 * @NUM_NL80211_PMSR_PEER_ATTRS: internal
79788059 * @NL80211_PMSR_PEER_ATTR_MAX: highest attribute number
......@@ -7984,6 +8065,7 @@ enum nl80211_peer_measurement_peer_attrs {
79848065 NL80211_PMSR_PEER_ATTR_CHAN,
79858066 NL80211_PMSR_PEER_ATTR_REQ,
79868067 NL80211_PMSR_PEER_ATTR_RESP,
8068 NL80211_PMSR_PEER_ATTR_REQ_TYPE,
79878069
79888070 /* keep last */
79898071 NUM_NL80211_PMSR_PEER_ATTRS,
......@@ -8010,6 +8092,18 @@ enum nl80211_peer_measurement_peer_attrs {
80108092 * meaningless, just a list of peers to measure with, with the
80118093 * sub-attributes taken from
80128094 * &enum nl80211_peer_measurement_peer_attrs.
8095 * @NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE: u32 attribute indicating the
8096 * maximum number of peers supported when the device operates in the
8097 * ISTA (Initiator STA) role. If absent, no role-specific peer limit
8098 * applies. The sum of %NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE and
8099 * %NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE is enforced when the device
8100 * supports concurrent ISTA/RSTA operation.
8101 * @NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE: u32 attribute indicating the
8102 * maximum number of peers supported when the device operates in the
8103 * RSTA (Responder STA) role. If absent, no role-specific peer limit
8104 * applies. The sum of %NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE and
8105 * %NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE is enforced when the device
8106 * supports concurrent ISTA/RSTA operation.
80138107 *
80148108 * @NUM_NL80211_PMSR_ATTR: internal
80158109 * @NL80211_PMSR_ATTR_MAX: highest attribute number
......@@ -8022,6 +8116,8 @@ enum nl80211_peer_measurement_attrs {
80228116 NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR,
80238117 NL80211_PMSR_ATTR_TYPE_CAPA,
80248118 NL80211_PMSR_ATTR_PEERS,
8119 NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE,
8120 NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE,
80258121
80268122 /* keep last */
80278123 NUM_NL80211_PMSR_ATTR,
......@@ -8080,6 +8176,54 @@ enum nl80211_peer_measurement_attrs {
80808176 * This limits the allowed combinations of LTF repetitions and STS.
80818177 * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT: flag attribute indicating the
80828178 * device supports operating as the RSTA in PMSR FTM request
8179 * @NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS: nested attribute containing ISTA
8180 * (initiator) role capabilities. Uses the same sub-attributes as
8181 * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS.
8182 * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS: nested attribute containing RSTA
8183 * (responder) role capabilities.
8184 * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_NTB: flag attribute (used inside
8185 * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
8186 * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating NTB ranging support.
8187 * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_TB: flag attribute (used inside
8188 * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
8189 * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating TB ranging support.
8190 * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_EDCA: flag attribute (used inside
8191 * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
8192 * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating EDCA based ranging
8193 * support.
8194 * @NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS: nested attribute containing ranging
8195 * type capabilities. Uses sub-attributes from
8196 * &enum nl80211_peer_measurement_ftm_type_capa.
8197 * @NL80211_PMSR_FTM_CAPA_ATTR_CONCURRENT_ISTA_RSTA_SUPPORT: flag attribute
8198 * indicating that the device can simultaneously act as initiator and
8199 * responder in a multi-peer measurement request. Only valid if
8200 * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT is set.
8201 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_TX_ANTENNAS: u32 attribute indicating
8202 * the maximum number of transmit antennas supported for EDCA based ranging
8203 * (0 means unknown)
8204 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_RX_ANTENNAS: u32 attribute indicating
8205 * the maximum number of receive antennas supported for EDCA based ranging
8206 * (0 means unknown)
8207 * @NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_EDCA: u32 attribute indicating
8208 * the minimum EDCA ranging interval supported by the device
8209 * in milli seconds. (0 means unknown). Applications can use this value
8210 * to estimate the burst period to be given in the FTM request for the
8211 * EDCA based ranging case. If non-zero, this value will be used to
8212 * validate the burst period in the FTM request.
8213 * @NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_NTB: u32 attribute indicating
8214 * the minimum NTB ranging interval supported by the device
8215 * in milli seconds. (0 means unknown). Applications can use this value
8216 * to estimate the burst period to be given in the FTM request for the
8217 * NTB ranging case. If non-zero, this value will be used to validate
8218 * the nominal time in the FTM request.
8219 * @NL80211_PMSR_FTM_CAPA_ATTR_PD_PREAMBLES: u32 bitmap of values from
8220 * &enum nl80211_preamble indicating the supported preambles for PD
8221 * ranging requests. Only valid if %NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT
8222 * is set.
8223 * @NL80211_PMSR_FTM_CAPA_ATTR_PD_BANDWIDTHS: u32 bitmap of values from
8224 * &enum nl80211_chan_width indicating the supported channel bandwidths
8225 * for PD ranging requests. Only valid if
8226 * %NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT is set.
80838227 *
80848228 * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
80858229 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
......@@ -8105,12 +8249,52 @@ enum nl80211_peer_measurement_ftm_capa {
81058249 NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX,
81068250 NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX,
81078251 NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT,
8252 NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS,
8253 NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS,
8254 NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_NTB,
8255 NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_TB,
8256 NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_EDCA,
8257 NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS,
8258 NL80211_PMSR_FTM_CAPA_ATTR_CONCURRENT_ISTA_RSTA_SUPPORT,
8259 NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_TX_ANTENNAS,
8260 NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_RX_ANTENNAS,
8261 NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_EDCA,
8262 NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_NTB,
8263 NL80211_PMSR_FTM_CAPA_ATTR_PD_PREAMBLES,
8264 NL80211_PMSR_FTM_CAPA_ATTR_PD_BANDWIDTHS,
81088265
81098266 /* keep last */
81108267 NUM_NL80211_PMSR_FTM_CAPA_ATTR,
81118268 NL80211_PMSR_FTM_CAPA_ATTR_MAX = NUM_NL80211_PMSR_FTM_CAPA_ATTR - 1
81128269};
81138270
8271/**
8272 * enum nl80211_peer_measurement_ftm_type_capa - FTM ranging type capability
8273 * sub-attributes, used inside %NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS
8274 * @__NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INVALID: invalid
8275 *
8276 * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INFRA_SUPPORT: flag attribute indicating
8277 * that the device supports infrastructure ranging (STA-to-AP or
8278 * AP-to-STA) as part of Proximity Detection
8279 * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT: flag attribute indicating that
8280 * the device supports peer-to-peer ranging as mentioned in the
8281 * specification "PR Implementation Consideration Draft 1.9 rev 1" where
8282 * PD stands for proximity detection
8283 *
8284 * @NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR: internal
8285 * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_MAX: highest attribute number
8286 */
8287enum nl80211_peer_measurement_ftm_type_capa {
8288 __NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INVALID,
8289
8290 NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INFRA_SUPPORT,
8291 NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT,
8292
8293 /* keep last */
8294 NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR,
8295 NL80211_PMSR_FTM_TYPE_CAPA_ATTR_MAX = NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR - 1
8296};
8297
81148298/**
81158299 * enum nl80211_peer_measurement_ftm_req - FTM request attributes
81168300 * @__NL80211_PMSR_FTM_REQ_ATTR_INVALID: invalid
......@@ -8129,9 +8313,11 @@ enum nl80211_peer_measurement_ftm_capa {
81298313 * default 15 i.e. "no preference"). For non-EDCA ranging, this is the
81308314 * burst duration in milliseconds (optional with default 0, i.e. let the
81318315 * device decide).
8132 * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames
8133 * requested per burst
8316 * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: (Optional) number of successful
8317 * FTM frames requested per burst
81348318 * (u8, 0-31, optional with default 0 i.e. "no preference")
8319 * If the attribute is absent ("no preference"), the driver or firmware can
8320 * choose a suitable value.
81358321 * @NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES: number of FTMR frame retries
81368322 * (u8, default 3)
81378323 * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI: request LCI data (flag)
......@@ -8165,6 +8351,50 @@ enum nl80211_peer_measurement_ftm_capa {
81658351 * Only valid if %NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK is set (so the
81668352 * RSTA will have the measurement results to report back in the FTM
81678353 * response).
8354 * @NL80211_PMSR_FTM_REQ_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS: minimum time
8355 * between two consecutive range measurements in units of 100 microseconds,
8356 * for non-trigger based ranging (u32). Should be set as short as possible
8357 * to minimize turnaround time, since two-way ranging with delayed LMR
8358 * requires two measurements. Only valid if
8359 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
8360 * @NL80211_PMSR_FTM_REQ_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS: maximum time
8361 * between two consecutive range measurements in units of 10 milliseconds,
8362 * for non-trigger based ranging (u32). Acts as a session timeout; if
8363 * exceeded, the ranging session should be terminated. Only valid if
8364 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
8365 * @NL80211_PMSR_FTM_REQ_ATTR_NOMINAL_TIME: The nominal time field shall be
8366 * set to the nominal duration between adjacent Availability Windows in
8367 * units of milli seconds (u32). Mandatory if
8368 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
8369 * @NL80211_PMSR_FTM_REQ_ATTR_AW_DURATION: (Optional) The AW duration field
8370 * shall be set to the duration of the AW in units of 1ms (0-255 ms) (u32).
8371 * Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
8372 * If the attribute is absent ("no preference"), the driver or firmware
8373 * can choose a suitable value.
8374 * @NL80211_PMSR_FTM_REQ_ATTR_NUM_MEASUREMENTS: (Optional) number of
8375 * Availability Windows (AWs) to schedule for non-trigger-based ranging.
8376 * Each AW may contain multiple FTM exchanges as configured by
8377 * %NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST. Only valid if
8378 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
8379 * If the attribute is absent ("no preference"), the driver or firmware
8380 * can choose a suitable value.
8381 * @NL80211_PMSR_FTM_REQ_ATTR_PAD: ignore, for u64/s64 padding only.
8382 * @NL80211_PMSR_FTM_REQ_ATTR_INGRESS: optional u64 attribute in units of mm.
8383 * When specified, the measurement result of the peer needs to be
8384 * indicated if the device moves into this range.
8385 * @NL80211_PMSR_FTM_REQ_ATTR_EGRESS: optional u64 attribute in units of mm.
8386 * When specified, the measurement result of the peer needs to be
8387 * indicated if the device moves out of this range.
8388 * If neither or only one of @NL80211_PMSR_FTM_REQ_ATTR_INGRESS and
8389 * @NL80211_PMSR_FTM_REQ_ATTR_EGRESS is specified, only the specified
8390 * threshold is used. If both are specified, both thresholds are applied.
8391 * If neither is specified, results are reported without threshold
8392 * filtering.
8393 * @NL80211_PMSR_FTM_REQ_ATTR_PD_SUPPRESS_RESULTS: Flag to suppress ranging
8394 * results for PD requests. When set, ranging measurements are performed
8395 * but results are not reported to userspace, regardless of ranging role
8396 * or type. Only valid when %NL80211_PMSR_PEER_ATTR_REQ_TYPE is set to
8397 * %NL80211_PMSR_FTM_REQ_TYPE_PD.
81688398 *
81698399 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
81708400 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
......@@ -8186,6 +8416,15 @@ enum nl80211_peer_measurement_ftm_req {
81868416 NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
81878417 NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,
81888418 NL80211_PMSR_FTM_REQ_ATTR_RSTA,
8419 NL80211_PMSR_FTM_REQ_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS,
8420 NL80211_PMSR_FTM_REQ_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS,
8421 NL80211_PMSR_FTM_REQ_ATTR_NOMINAL_TIME,
8422 NL80211_PMSR_FTM_REQ_ATTR_AW_DURATION,
8423 NL80211_PMSR_FTM_REQ_ATTR_NUM_MEASUREMENTS,
8424 NL80211_PMSR_FTM_REQ_ATTR_PAD,
8425 NL80211_PMSR_FTM_REQ_ATTR_INGRESS,
8426 NL80211_PMSR_FTM_REQ_ATTR_EGRESS,
8427 NL80211_PMSR_FTM_REQ_ATTR_PD_SUPPRESS_RESULTS,
81898428
81908429 /* keep last */
81918430 NUM_NL80211_PMSR_FTM_REQ_ATTR,
......@@ -8272,6 +8511,33 @@ enum nl80211_peer_measurement_ftm_failure_reasons {
82728511 * @NL80211_PMSR_FTM_RESP_ATTR_PAD: ignore, for u64/s64 padding only
82738512 * @NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD: actual burst period used by
82748513 * the responder (similar to request, u16)
8514 * @NL80211_PMSR_FTM_RESP_ATTR_TX_LTF_REPETITION_COUNT: negotiated value of
8515 * number of tx ltf repetitions in NDP frames (u32, optional)
8516 * @NL80211_PMSR_FTM_RESP_ATTR_RX_LTF_REPETITION_COUNT: negotiated value of
8517 * number of rx ltf repetitions in NDP frames (u32, optional)
8518 * @NL80211_PMSR_FTM_RESP_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS: negotiated value
8519 * where latest time by which the ISTA needs to complete the next round of
8520 * measurements, in units of 10 ms (u32, optional)
8521 * @NL80211_PMSR_FTM_RESP_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS: negotiated
8522 * minimum time between two consecutive range measurements initiated by an
8523 * ISTA, in units of 100 us (u32, optional)
8524 * @NL80211_PMSR_FTM_RESP_ATTR_NUM_TX_SPATIAL_STREAMS: number of Tx space-time
8525 * streams used in NDP frames during the measurement sounding phase
8526 * (u32, optional).
8527 * @NL80211_PMSR_FTM_RESP_ATTR_NUM_RX_SPATIAL_STREAMS: number of Rx space-time
8528 * streams used in the NDP frames during the measurement sounding phase
8529 * (u32, optional)
8530 * @NL80211_PMSR_FTM_RESP_ATTR_NOMINAL_TIME: negotiated nominal time used in
8531 * this session in milliseconds. (u32, optional)
8532 * @NL80211_PMSR_FTM_RESP_ATTR_AVAILABILITY_WINDOW: negotiated availability
8533 * window time used in this session, in units of milli seconds.
8534 * (u32, optional)
8535 * @NL80211_PMSR_FTM_RESP_ATTR_CHANNEL_WIDTH: u32 attribute indicating channel
8536 * width used for measurement, see &enum nl80211_chan_width (optional).
8537 * @NL80211_PMSR_FTM_RESP_ATTR_PREAMBLE: u32 attribute indicating the preamble
8538 * type used for the measurement, see &enum nl80211_preamble (optional).
8539 * @NL80211_PMSR_FTM_RESP_ATTR_IS_DELAYED_LMR: flag, indicates if the
8540 * current result is delayed LMR data.
82758541 *
82768542 * @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal
82778543 * @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number
......@@ -8301,6 +8567,17 @@ enum nl80211_peer_measurement_ftm_resp {
83018567 NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
83028568 NL80211_PMSR_FTM_RESP_ATTR_PAD,
83038569 NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD,
8570 NL80211_PMSR_FTM_RESP_ATTR_TX_LTF_REPETITION_COUNT,
8571 NL80211_PMSR_FTM_RESP_ATTR_RX_LTF_REPETITION_COUNT,
8572 NL80211_PMSR_FTM_RESP_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS,
8573 NL80211_PMSR_FTM_RESP_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS,
8574 NL80211_PMSR_FTM_RESP_ATTR_NUM_TX_SPATIAL_STREAMS,
8575 NL80211_PMSR_FTM_RESP_ATTR_NUM_RX_SPATIAL_STREAMS,
8576 NL80211_PMSR_FTM_RESP_ATTR_NOMINAL_TIME,
8577 NL80211_PMSR_FTM_RESP_ATTR_AVAILABILITY_WINDOW,
8578 NL80211_PMSR_FTM_RESP_ATTR_CHANNEL_WIDTH,
8579 NL80211_PMSR_FTM_RESP_ATTR_PREAMBLE,
8580 NL80211_PMSR_FTM_RESP_ATTR_IS_DELAYED_LMR,
83048581
83058582 /* keep last */
83068583 NUM_NL80211_PMSR_FTM_RESP_ATTR,
lib/libc/include/any-linux-any/linux/openat2.h+7
......@@ -22,6 +22,13 @@ struct open_how {
2222 __u64 resolve;
2323};
2424
25/*
26 * how->flags bits exclusive to openat2(2). These live in the upper 32 bits
27 * of @flags so that they cannot be expressed by open(2) / openat(2), whose
28 * @flags argument is a C int.
29 */
30#define OPENAT2_REGULAR ((__u64)1 << 32) /* Only open regular files. */
31
2532/* how->resolve flags for openat2(2). */
2633#define RESOLVE_NO_XDEV 0x01 /* Block mount-point crossings
2734 (includes bind-mounts). */
lib/libc/include/any-linux-any/linux/pci_regs.h+2
......@@ -1349,6 +1349,7 @@
13491349/* CXL r4.0, 8.1.3: PCIe DVSEC for CXL Device */
13501350#define PCI_DVSEC_CXL_DEVICE 0
13511351#define PCI_DVSEC_CXL_CAP 0xA
1352#define PCI_DVSEC_CXL_CACHE_CAPABLE _BITUL(0)
13521353#define PCI_DVSEC_CXL_MEM_CAPABLE _BITUL(2)
13531354#define PCI_DVSEC_CXL_HDM_COUNT __GENMASK(5, 4)
13541355#define PCI_DVSEC_CXL_CTRL 0xC
......@@ -1357,6 +1358,7 @@
13571358#define PCI_DVSEC_CXL_RANGE_SIZE_LOW(i) (0x1C + (i * 0x10))
13581359#define PCI_DVSEC_CXL_MEM_INFO_VALID _BITUL(0)
13591360#define PCI_DVSEC_CXL_MEM_ACTIVE _BITUL(1)
1361#define PCI_DVSEC_CXL_MEM_ACTIVE_TIMEOUT __GENMASK(15, 13)
13601362#define PCI_DVSEC_CXL_MEM_SIZE_LOW __GENMASK(31, 28)
13611363#define PCI_DVSEC_CXL_RANGE_BASE_HIGH(i) (0x20 + (i * 0x10))
13621364#define PCI_DVSEC_CXL_RANGE_BASE_LOW(i) (0x24 + (i * 0x10))
lib/libc/include/any-linux-any/linux/pkt_sched.h+10
......@@ -569,6 +569,16 @@ struct tc_netem_gemodel {
569569#define NETEM_DIST_SCALE 8192
570570#define NETEM_DIST_MAX 16384
571571
572struct tc_netem_xstats {
573 __u64 delayed; /* packets delayed */
574 __u64 dropped; /* packets dropped by loss model */
575 __u64 corrupted; /* packets with bit errors injected */
576 __u64 duplicated; /* duplicate packets generated */
577 __u64 reordered; /* packets sent out of order */
578 __u64 ecn_marked; /* packets ECN CE-marked (not dropped)*/
579 __u64 allocation_errors;
580};
581
572582/* DRR */
573583
574584enum {
lib/libc/include/any-linux-any/linux/pps.h+1-1
......@@ -26,7 +26,7 @@
2626#include <linux/types.h>
2727
2828#define PPS_VERSION "5.3.6"
29#define PPS_MAX_SOURCES 16 /* should be enough... */
29#define PPS_MAX_SOURCES 256 /* should be enough... */
3030
3131/* Implementation note: the logical states ``assert'' and ``clear''
3232 * are implemented in terms of the chip register, i.e. ``assert''
lib/libc/include/any-linux-any/linux/psp.h+13
......@@ -17,11 +17,22 @@ enum psp_version {
1717 PSP_VERSION_HDR0_AES_GMAC_256,
1818};
1919
20enum {
21 PSP_A_ASSOC_DEV_INFO_IFINDEX = 1,
22 PSP_A_ASSOC_DEV_INFO_NSID,
23
24 __PSP_A_ASSOC_DEV_INFO_MAX,
25 PSP_A_ASSOC_DEV_INFO_MAX = (__PSP_A_ASSOC_DEV_INFO_MAX - 1)
26};
27
2028enum {
2129 PSP_A_DEV_ID = 1,
2230 PSP_A_DEV_IFINDEX,
2331 PSP_A_DEV_PSP_VERSIONS_CAP,
2432 PSP_A_DEV_PSP_VERSIONS_ENA,
33 PSP_A_DEV_ASSOC_LIST,
34 PSP_A_DEV_NSID,
35 PSP_A_DEV_BY_ASSOCIATION,
2536
2637 __PSP_A_DEV_MAX,
2738 PSP_A_DEV_MAX = (__PSP_A_DEV_MAX - 1)
......@@ -74,6 +85,8 @@ enum {
7485 PSP_CMD_RX_ASSOC,
7586 PSP_CMD_TX_ASSOC,
7687 PSP_CMD_GET_STATS,
88 PSP_CMD_DEV_ASSOC,
89 PSP_CMD_DEV_DISASSOC,
7790
7891 __PSP_CMD_MAX,
7992 PSP_CMD_MAX = (__PSP_CMD_MAX - 1)
lib/libc/include/any-linux-any/linux/rkisp1-config.h+109-4
......@@ -964,6 +964,92 @@ struct rkisp1_cif_isp_wdr_config {
964964 __u8 use_iref;
965965};
966966
967/*
968 * enum rkisp1_cif_isp_cac_h_clip_mode - horizontal clipping mode
969 *
970 * @RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4PX: +/- 4 pixels
971 * @RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4_5PX: +/- 4/5 pixels depending on bayer position
972 */
973enum rkisp1_cif_isp_cac_h_clip_mode {
974 RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4PX = 0,
975 RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4_5PX = 1,
976};
977
978/**
979 * enum rkisp1_cif_isp_cac_v_clip_mode - vertical clipping mode
980 *
981 * @RKISP1_CIF_ISP_CAC_V_CLIP_MODE_2PX: +/- 2 pixels
982 * @RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3PX: +/- 3 pixels
983 * @RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3_4PX: +/- 3/4 pixels depending on bayer position
984 */
985enum rkisp1_cif_isp_cac_v_clip_mode {
986 RKISP1_CIF_ISP_CAC_V_CLIP_MODE_2PX = 0,
987 RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3PX = 1,
988 RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3_4PX = 2,
989};
990
991/**
992 * struct rkisp1_cif_isp_cac_config - chromatic aberration correction configuration
993 *
994 * The correction is carried out by shifting the red and blue pixels relative
995 * to the green ones, depending on the distance from the optical center:
996 *
997 * @h_count_start: horizontal coordinate of the optical center (13-bit unsigned integer; [1,8191])
998 * @v_count_start: vertical coordinate of the optical center (13-bit unsigned integer; [1,8191])
999 *
1000 * For each pixel, the x/y distances from the optical center are calculated and
1001 * then transformed into the [0,255] range based on the following formula:
1002 *
1003 * (((d << 4) >> ns) * nf) >> 5
1004 *
1005 * where `d` is the distance, `ns` and `nf` are the normalization parameters:
1006 *
1007 * @x_nf: horizontal normalization scale parameter (5-bit unsigned integer; [0,31])
1008 * @x_ns: horizontal normalization shift parameter (4-bit unsigned integer; [0,15])
1009 *
1010 * @y_nf: vertical normalization scale parameter (5-bit unsigned integer; [0,31])
1011 * @y_ns: vertical normalization shift parameter (4-bit unsigned integer; [0,15])
1012 *
1013 * These parameters should be chosen based on the image resolution, the position
1014 * of the optical center, and the shape of pixels, so that no normalized distance
1015 * is larger than 255. If the pixels have square shape, the two sets of parameters
1016 * should be equal.
1017 *
1018 * The actual amount of correction is calculated with a third degree polynomial:
1019 *
1020 * c[0] * r + c[1] * r^2 + c[2] * r^3
1021 *
1022 * where `c` is the set of coefficients for the given color, and `r` is distance:
1023 *
1024 * @red: red coefficients (5.4 two's complement; [-16,15.9375])
1025 * @blue: blue coefficients (5.4 two's complement; [-16,15.9375])
1026 *
1027 * Finally, the amount is clipped as requested:
1028 *
1029 * @h_clip_mode: maximum horizontal shift (from enum rkisp1_cif_isp_cac_h_clip_mode)
1030 * @v_clip_mode: maximum vertical shift (from enum rkisp1_cif_isp_cac_v_clip_mode)
1031 *
1032 * A positive result will shift away from the optical center, while a negative
1033 * one will shift towards the optical center. In the latter case, the pixel
1034 * values at the edges are duplicated.
1035 */
1036struct rkisp1_cif_isp_cac_config {
1037 __u8 h_clip_mode;
1038 __u8 v_clip_mode;
1039
1040 __u16 h_count_start;
1041 __u16 v_count_start;
1042
1043 __u16 red[3];
1044 __u16 blue[3];
1045
1046 __u8 x_nf;
1047 __u8 x_ns;
1048
1049 __u8 y_nf;
1050 __u8 y_ns;
1051};
1052
9671053/*---------- PART2: Measurement Statistics ------------*/
9681054
9691055/**
......@@ -1135,6 +1221,7 @@ struct rkisp1_stat_buffer {
11351221 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve
11361222 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve
11371223 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR: Wide dynamic range
1224 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CAC: Chromatic aberration correction
11381225 */
11391226enum rkisp1_ext_params_block_type {
11401227 RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,
......@@ -1158,6 +1245,7 @@ enum rkisp1_ext_params_block_type {
11581245 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,
11591246 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,
11601247 RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,
1248 RKISP1_EXT_PARAMS_BLOCK_TYPE_CAC,
11611249};
11621250
11631251/* For backward compatibility */
......@@ -1504,6 +1592,22 @@ struct rkisp1_ext_params_wdr_config {
15041592 struct rkisp1_cif_isp_wdr_config config;
15051593} __attribute__((aligned(8)));
15061594
1595/**
1596 * struct rkisp1_ext_params_cac_config - RkISP1 extensible params CAC config
1597 *
1598 * RkISP1 extensible parameters CAC block.
1599 * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CAC`.
1600 *
1601 * @header: The RkISP1 extensible parameters header, see
1602 * :c:type:`rkisp1_ext_params_block_header`
1603 * @config: CAC configuration, see
1604 * :c:type:`rkisp1_cif_isp_cac_config`
1605 */
1606struct rkisp1_ext_params_cac_config {
1607 struct rkisp1_ext_params_block_header header;
1608 struct rkisp1_cif_isp_cac_config config;
1609} __attribute__((aligned(8)));
1610
15071611/*
15081612 * The rkisp1_ext_params_compand_curve_config structure is counted twice as it
15091613 * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.
......@@ -1529,14 +1633,15 @@ struct rkisp1_ext_params_wdr_config {
15291633 sizeof(struct rkisp1_ext_params_compand_bls_config) +\
15301634 sizeof(struct rkisp1_ext_params_compand_curve_config) +\
15311635 sizeof(struct rkisp1_ext_params_compand_curve_config) +\
1532 sizeof(struct rkisp1_ext_params_wdr_config))
1636 sizeof(struct rkisp1_ext_params_wdr_config) +\
1637 sizeof(struct rkisp1_ext_params_cac_config))
15331638
15341639/**
1535 * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version
1640 * enum rkisp1_ext_param_buffer_version - RkISP1 extensible parameters version
15361641 *
15371642 * @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters
15381643 */
1539enum rksip1_ext_param_buffer_version {
1644enum rkisp1_ext_param_buffer_version {
15401645 RKISP1_EXT_PARAM_BUFFER_V1 = V4L2_ISP_PARAMS_VERSION_V1,
15411646};
15421647
......@@ -1598,7 +1703,7 @@ enum rksip1_ext_param_buffer_version {
15981703 * +---------------------------------------------------------------------+
15991704 *
16001705 * @version: The RkISP1 extensible parameters buffer version, see
1601 * :c:type:`rksip1_ext_param_buffer_version`
1706 * :c:type:`rkisp1_ext_param_buffer_version`
16021707 * @data_size: The RkISP1 configuration data effective size, excluding this
16031708 * header
16041709 * @data: The RkISP1 extensible configuration data blocks
lib/libc/include/any-linux-any/linux/rtnetlink.h+1
......@@ -838,6 +838,7 @@ enum {
838838#define RTEXT_FILTER_CFM_CONFIG (1 << 5)
839839#define RTEXT_FILTER_CFM_STATUS (1 << 6)
840840#define RTEXT_FILTER_MST (1 << 7)
841#define RTEXT_FILTER_NAME_ONLY (1 << 8)
841842
842843/* End of information exported to user level */
843844
lib/libc/include/any-linux-any/linux/sunrpc_netlink.h created+84
......@@ -0,0 +1,84 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2/* Do not edit directly, auto-generated from: */
3/* Documentation/netlink/specs/sunrpc_cache.yaml */
4/* YNL-GEN uapi header */
5/* To regenerate run: tools/net/ynl/ynl-regen.sh */
6
7#ifndef _LINUX_SUNRPC_NETLINK_H
8#define _LINUX_SUNRPC_NETLINK_H
9
10#define SUNRPC_FAMILY_NAME "sunrpc"
11#define SUNRPC_FAMILY_VERSION 1
12
13enum sunrpc_cache_type {
14 SUNRPC_CACHE_TYPE_IP_MAP = 1,
15 SUNRPC_CACHE_TYPE_UNIX_GID = 2,
16};
17
18enum {
19 SUNRPC_A_CACHE_NOTIFY_CACHE_TYPE = 1,
20
21 __SUNRPC_A_CACHE_NOTIFY_MAX,
22 SUNRPC_A_CACHE_NOTIFY_MAX = (__SUNRPC_A_CACHE_NOTIFY_MAX - 1)
23};
24
25enum {
26 SUNRPC_A_IP_MAP_SEQNO = 1,
27 SUNRPC_A_IP_MAP_CLASS,
28 SUNRPC_A_IP_MAP_ADDR,
29 SUNRPC_A_IP_MAP_DOMAIN,
30 SUNRPC_A_IP_MAP_NEGATIVE,
31 SUNRPC_A_IP_MAP_EXPIRY,
32
33 __SUNRPC_A_IP_MAP_MAX,
34 SUNRPC_A_IP_MAP_MAX = (__SUNRPC_A_IP_MAP_MAX - 1)
35};
36
37enum {
38 SUNRPC_A_IP_MAP_REQS_REQUESTS = 1,
39
40 __SUNRPC_A_IP_MAP_REQS_MAX,
41 SUNRPC_A_IP_MAP_REQS_MAX = (__SUNRPC_A_IP_MAP_REQS_MAX - 1)
42};
43
44enum {
45 SUNRPC_A_UNIX_GID_SEQNO = 1,
46 SUNRPC_A_UNIX_GID_UID,
47 SUNRPC_A_UNIX_GID_GIDS,
48 SUNRPC_A_UNIX_GID_NEGATIVE,
49 SUNRPC_A_UNIX_GID_EXPIRY,
50
51 __SUNRPC_A_UNIX_GID_MAX,
52 SUNRPC_A_UNIX_GID_MAX = (__SUNRPC_A_UNIX_GID_MAX - 1)
53};
54
55enum {
56 SUNRPC_A_UNIX_GID_REQS_REQUESTS = 1,
57
58 __SUNRPC_A_UNIX_GID_REQS_MAX,
59 SUNRPC_A_UNIX_GID_REQS_MAX = (__SUNRPC_A_UNIX_GID_REQS_MAX - 1)
60};
61
62enum {
63 SUNRPC_A_CACHE_FLUSH_MASK = 1,
64
65 __SUNRPC_A_CACHE_FLUSH_MAX,
66 SUNRPC_A_CACHE_FLUSH_MAX = (__SUNRPC_A_CACHE_FLUSH_MAX - 1)
67};
68
69enum {
70 SUNRPC_CMD_CACHE_NOTIFY = 1,
71 SUNRPC_CMD_IP_MAP_GET_REQS,
72 SUNRPC_CMD_IP_MAP_SET_REQS,
73 SUNRPC_CMD_UNIX_GID_GET_REQS,
74 SUNRPC_CMD_UNIX_GID_SET_REQS,
75 SUNRPC_CMD_CACHE_FLUSH,
76
77 __SUNRPC_CMD_MAX,
78 SUNRPC_CMD_MAX = (__SUNRPC_CMD_MAX - 1)
79};
80
81#define SUNRPC_MCGRP_NONE "none"
82#define SUNRPC_MCGRP_EXPORTD "exportd"
83
84#endif /* _LINUX_SUNRPC_NETLINK_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/synclink.h deleted-301
......@@ -1,301 +0,0 @@
1/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
2/*
3 * SyncLink Multiprotocol Serial Adapter Driver
4 *
5 * $Id: synclink.h,v 3.14 2006/07/17 20:15:43 paulkf Exp $
6 *
7 * Copyright (C) 1998-2000 by Microgate Corporation
8 *
9 * Redistribution of this file is permitted under
10 * the terms of the GNU Public License (GPL)
11 */
12
13#ifndef _SYNCLINK_H_
14#define _SYNCLINK_H_
15#define SYNCLINK_H_VERSION 3.6
16
17#include <linux/types.h>
18
19#define BIT0 0x0001
20#define BIT1 0x0002
21#define BIT2 0x0004
22#define BIT3 0x0008
23#define BIT4 0x0010
24#define BIT5 0x0020
25#define BIT6 0x0040
26#define BIT7 0x0080
27#define BIT8 0x0100
28#define BIT9 0x0200
29#define BIT10 0x0400
30#define BIT11 0x0800
31#define BIT12 0x1000
32#define BIT13 0x2000
33#define BIT14 0x4000
34#define BIT15 0x8000
35#define BIT16 0x00010000
36#define BIT17 0x00020000
37#define BIT18 0x00040000
38#define BIT19 0x00080000
39#define BIT20 0x00100000
40#define BIT21 0x00200000
41#define BIT22 0x00400000
42#define BIT23 0x00800000
43#define BIT24 0x01000000
44#define BIT25 0x02000000
45#define BIT26 0x04000000
46#define BIT27 0x08000000
47#define BIT28 0x10000000
48#define BIT29 0x20000000
49#define BIT30 0x40000000
50#define BIT31 0x80000000
51
52
53#define HDLC_MAX_FRAME_SIZE 65535
54#define MAX_ASYNC_TRANSMIT 4096
55#define MAX_ASYNC_BUFFER_SIZE 4096
56
57#define ASYNC_PARITY_NONE 0
58#define ASYNC_PARITY_EVEN 1
59#define ASYNC_PARITY_ODD 2
60#define ASYNC_PARITY_SPACE 3
61
62#define HDLC_FLAG_UNDERRUN_ABORT7 0x0000
63#define HDLC_FLAG_UNDERRUN_ABORT15 0x0001
64#define HDLC_FLAG_UNDERRUN_FLAG 0x0002
65#define HDLC_FLAG_UNDERRUN_CRC 0x0004
66#define HDLC_FLAG_SHARE_ZERO 0x0010
67#define HDLC_FLAG_AUTO_CTS 0x0020
68#define HDLC_FLAG_AUTO_DCD 0x0040
69#define HDLC_FLAG_AUTO_RTS 0x0080
70#define HDLC_FLAG_RXC_DPLL 0x0100
71#define HDLC_FLAG_RXC_BRG 0x0200
72#define HDLC_FLAG_RXC_TXCPIN 0x8000
73#define HDLC_FLAG_RXC_RXCPIN 0x0000
74#define HDLC_FLAG_TXC_DPLL 0x0400
75#define HDLC_FLAG_TXC_BRG 0x0800
76#define HDLC_FLAG_TXC_TXCPIN 0x0000
77#define HDLC_FLAG_TXC_RXCPIN 0x0008
78#define HDLC_FLAG_DPLL_DIV8 0x1000
79#define HDLC_FLAG_DPLL_DIV16 0x2000
80#define HDLC_FLAG_DPLL_DIV32 0x0000
81#define HDLC_FLAG_HDLC_LOOPMODE 0x4000
82
83#define HDLC_CRC_NONE 0
84#define HDLC_CRC_16_CCITT 1
85#define HDLC_CRC_32_CCITT 2
86#define HDLC_CRC_MASK 0x00ff
87#define HDLC_CRC_RETURN_EX 0x8000
88
89#define RX_OK 0
90#define RX_CRC_ERROR 1
91
92#define HDLC_TXIDLE_FLAGS 0
93#define HDLC_TXIDLE_ALT_ZEROS_ONES 1
94#define HDLC_TXIDLE_ZEROS 2
95#define HDLC_TXIDLE_ONES 3
96#define HDLC_TXIDLE_ALT_MARK_SPACE 4
97#define HDLC_TXIDLE_SPACE 5
98#define HDLC_TXIDLE_MARK 6
99#define HDLC_TXIDLE_CUSTOM_8 0x10000000
100#define HDLC_TXIDLE_CUSTOM_16 0x20000000
101
102#define HDLC_ENCODING_NRZ 0
103#define HDLC_ENCODING_NRZB 1
104#define HDLC_ENCODING_NRZI_MARK 2
105#define HDLC_ENCODING_NRZI_SPACE 3
106#define HDLC_ENCODING_NRZI HDLC_ENCODING_NRZI_SPACE
107#define HDLC_ENCODING_BIPHASE_MARK 4
108#define HDLC_ENCODING_BIPHASE_SPACE 5
109#define HDLC_ENCODING_BIPHASE_LEVEL 6
110#define HDLC_ENCODING_DIFF_BIPHASE_LEVEL 7
111
112#define HDLC_PREAMBLE_LENGTH_8BITS 0
113#define HDLC_PREAMBLE_LENGTH_16BITS 1
114#define HDLC_PREAMBLE_LENGTH_32BITS 2
115#define HDLC_PREAMBLE_LENGTH_64BITS 3
116
117#define HDLC_PREAMBLE_PATTERN_NONE 0
118#define HDLC_PREAMBLE_PATTERN_ZEROS 1
119#define HDLC_PREAMBLE_PATTERN_FLAGS 2
120#define HDLC_PREAMBLE_PATTERN_10 3
121#define HDLC_PREAMBLE_PATTERN_01 4
122#define HDLC_PREAMBLE_PATTERN_ONES 5
123
124#define MGSL_MODE_ASYNC 1
125#define MGSL_MODE_HDLC 2
126#define MGSL_MODE_MONOSYNC 3
127#define MGSL_MODE_BISYNC 4
128#define MGSL_MODE_RAW 6
129#define MGSL_MODE_BASE_CLOCK 7
130#define MGSL_MODE_XSYNC 8
131
132#define MGSL_BUS_TYPE_ISA 1
133#define MGSL_BUS_TYPE_EISA 2
134#define MGSL_BUS_TYPE_PCI 5
135
136#define MGSL_INTERFACE_MASK 0xf
137#define MGSL_INTERFACE_DISABLE 0
138#define MGSL_INTERFACE_RS232 1
139#define MGSL_INTERFACE_V35 2
140#define MGSL_INTERFACE_RS422 3
141#define MGSL_INTERFACE_RTS_EN 0x10
142#define MGSL_INTERFACE_LL 0x20
143#define MGSL_INTERFACE_RL 0x40
144#define MGSL_INTERFACE_MSB_FIRST 0x80
145
146typedef struct _MGSL_PARAMS
147{
148 /* Common */
149
150 unsigned long mode; /* Asynchronous or HDLC */
151 unsigned char loopback; /* internal loopback mode */
152
153 /* HDLC Only */
154
155 unsigned short flags;
156 unsigned char encoding; /* NRZ, NRZI, etc. */
157 unsigned long clock_speed; /* external clock speed in bits per second */
158 unsigned char addr_filter; /* receive HDLC address filter, 0xFF = disable */
159 unsigned short crc_type; /* None, CRC16-CCITT, or CRC32-CCITT */
160 unsigned char preamble_length;
161 unsigned char preamble;
162
163 /* Async Only */
164
165 unsigned long data_rate; /* bits per second */
166 unsigned char data_bits; /* 7 or 8 data bits */
167 unsigned char stop_bits; /* 1 or 2 stop bits */
168 unsigned char parity; /* none, even, or odd */
169
170} MGSL_PARAMS, *PMGSL_PARAMS;
171
172#define MICROGATE_VENDOR_ID 0x13c0
173#define SYNCLINK_DEVICE_ID 0x0010
174#define MGSCC_DEVICE_ID 0x0020
175#define SYNCLINK_SCA_DEVICE_ID 0x0030
176#define SYNCLINK_GT_DEVICE_ID 0x0070
177#define SYNCLINK_GT4_DEVICE_ID 0x0080
178#define SYNCLINK_AC_DEVICE_ID 0x0090
179#define SYNCLINK_GT2_DEVICE_ID 0x00A0
180#define MGSL_MAX_SERIAL_NUMBER 30
181
182/*
183** device diagnostics status
184*/
185
186#define DiagStatus_OK 0
187#define DiagStatus_AddressFailure 1
188#define DiagStatus_AddressConflict 2
189#define DiagStatus_IrqFailure 3
190#define DiagStatus_IrqConflict 4
191#define DiagStatus_DmaFailure 5
192#define DiagStatus_DmaConflict 6
193#define DiagStatus_PciAdapterNotFound 7
194#define DiagStatus_CantAssignPciResources 8
195#define DiagStatus_CantAssignPciMemAddr 9
196#define DiagStatus_CantAssignPciIoAddr 10
197#define DiagStatus_CantAssignPciIrq 11
198#define DiagStatus_MemoryError 12
199
200#define SerialSignal_DCD 0x01 /* Data Carrier Detect */
201#define SerialSignal_TXD 0x02 /* Transmit Data */
202#define SerialSignal_RI 0x04 /* Ring Indicator */
203#define SerialSignal_RXD 0x08 /* Receive Data */
204#define SerialSignal_CTS 0x10 /* Clear to Send */
205#define SerialSignal_RTS 0x20 /* Request to Send */
206#define SerialSignal_DSR 0x40 /* Data Set Ready */
207#define SerialSignal_DTR 0x80 /* Data Terminal Ready */
208
209
210/*
211 * Counters of the input lines (CTS, DSR, RI, CD) interrupts
212 */
213struct mgsl_icount {
214 __u32 cts, dsr, rng, dcd, tx, rx;
215 __u32 frame, parity, overrun, brk;
216 __u32 buf_overrun;
217 __u32 txok;
218 __u32 txunder;
219 __u32 txabort;
220 __u32 txtimeout;
221 __u32 rxshort;
222 __u32 rxlong;
223 __u32 rxabort;
224 __u32 rxover;
225 __u32 rxcrc;
226 __u32 rxok;
227 __u32 exithunt;
228 __u32 rxidle;
229};
230
231struct gpio_desc {
232 __u32 state;
233 __u32 smask;
234 __u32 dir;
235 __u32 dmask;
236};
237
238#define DEBUG_LEVEL_DATA 1
239#define DEBUG_LEVEL_ERROR 2
240#define DEBUG_LEVEL_INFO 3
241#define DEBUG_LEVEL_BH 4
242#define DEBUG_LEVEL_ISR 5
243
244/*
245** Event bit flags for use with MgslWaitEvent
246*/
247
248#define MgslEvent_DsrActive 0x0001
249#define MgslEvent_DsrInactive 0x0002
250#define MgslEvent_Dsr 0x0003
251#define MgslEvent_CtsActive 0x0004
252#define MgslEvent_CtsInactive 0x0008
253#define MgslEvent_Cts 0x000c
254#define MgslEvent_DcdActive 0x0010
255#define MgslEvent_DcdInactive 0x0020
256#define MgslEvent_Dcd 0x0030
257#define MgslEvent_RiActive 0x0040
258#define MgslEvent_RiInactive 0x0080
259#define MgslEvent_Ri 0x00c0
260#define MgslEvent_ExitHuntMode 0x0100
261#define MgslEvent_IdleReceived 0x0200
262
263/* Private IOCTL codes:
264 *
265 * MGSL_IOCSPARAMS set MGSL_PARAMS structure values
266 * MGSL_IOCGPARAMS get current MGSL_PARAMS structure values
267 * MGSL_IOCSTXIDLE set current transmit idle mode
268 * MGSL_IOCGTXIDLE get current transmit idle mode
269 * MGSL_IOCTXENABLE enable or disable transmitter
270 * MGSL_IOCRXENABLE enable or disable receiver
271 * MGSL_IOCTXABORT abort transmitting frame (HDLC)
272 * MGSL_IOCGSTATS return current statistics
273 * MGSL_IOCWAITEVENT wait for specified event to occur
274 * MGSL_LOOPTXDONE transmit in HDLC LoopMode done
275 * MGSL_IOCSIF set the serial interface type
276 * MGSL_IOCGIF get the serial interface type
277 */
278#define MGSL_MAGIC_IOC 'm'
279#define MGSL_IOCSPARAMS _IOW(MGSL_MAGIC_IOC,0,struct _MGSL_PARAMS)
280#define MGSL_IOCGPARAMS _IOR(MGSL_MAGIC_IOC,1,struct _MGSL_PARAMS)
281#define MGSL_IOCSTXIDLE _IO(MGSL_MAGIC_IOC,2)
282#define MGSL_IOCGTXIDLE _IO(MGSL_MAGIC_IOC,3)
283#define MGSL_IOCTXENABLE _IO(MGSL_MAGIC_IOC,4)
284#define MGSL_IOCRXENABLE _IO(MGSL_MAGIC_IOC,5)
285#define MGSL_IOCTXABORT _IO(MGSL_MAGIC_IOC,6)
286#define MGSL_IOCGSTATS _IO(MGSL_MAGIC_IOC,7)
287#define MGSL_IOCWAITEVENT _IOWR(MGSL_MAGIC_IOC,8,int)
288#define MGSL_IOCCLRMODCOUNT _IO(MGSL_MAGIC_IOC,15)
289#define MGSL_IOCLOOPTXDONE _IO(MGSL_MAGIC_IOC,9)
290#define MGSL_IOCSIF _IO(MGSL_MAGIC_IOC,10)
291#define MGSL_IOCGIF _IO(MGSL_MAGIC_IOC,11)
292#define MGSL_IOCSGPIO _IOW(MGSL_MAGIC_IOC,16,struct gpio_desc)
293#define MGSL_IOCGGPIO _IOR(MGSL_MAGIC_IOC,17,struct gpio_desc)
294#define MGSL_IOCWAITGPIO _IOWR(MGSL_MAGIC_IOC,18,struct gpio_desc)
295#define MGSL_IOCSXSYNC _IO(MGSL_MAGIC_IOC, 19)
296#define MGSL_IOCGXSYNC _IO(MGSL_MAGIC_IOC, 20)
297#define MGSL_IOCSXCTRL _IO(MGSL_MAGIC_IOC, 21)
298#define MGSL_IOCGXCTRL _IO(MGSL_MAGIC_IOC, 22)
299
300
301#endif /* _SYNCLINK_H_ */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/tls.h+1-1
......@@ -203,6 +203,6 @@ enum {
203203#define TLS_CONF_BASE 1
204204#define TLS_CONF_SW 2
205205#define TLS_CONF_HW 3
206#define TLS_CONF_HW_RECORD 4
206#define TLS_CONF_HW_RECORD 4 /* unused */
207207
208208#endif /* _LINUX_TLS_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/userio.h+5-2
......@@ -2,7 +2,7 @@
22/*
33 * userio: virtual serio device support
44 * Copyright (C) 2015 Red Hat
5 * Copyright (C) 2015 Lyude (Stephen Chandler Paul) <cpaul@redhat.com>
5 * Copyright (C) 2015 Lyude Paul <thatslyude@gmail.com>
66 *
77 * This program is free software; you can redistribute it and/or modify it
88 * under the terms of the GNU Lesser General Public License as published by the
......@@ -27,7 +27,10 @@
2727enum userio_cmd_type {
2828 USERIO_CMD_REGISTER = 0,
2929 USERIO_CMD_SET_PORT_TYPE = 1,
30 USERIO_CMD_SEND_INTERRUPT = 2
30 USERIO_CMD_SEND_INTERRUPT = 2,
31 USERIO_CMD_SET_PORT_EXTRA = 3,
32 USERIO_CMD_SET_PORT_ID = 4,
33 USERIO_CMD_SET_PORT_PROTO = 5,
3134};
3235
3336/*
lib/libc/include/any-linux-any/linux/v4l2-controls.h+2
......@@ -460,6 +460,8 @@ enum v4l2_mpeg_video_intra_refresh_period_type {
460460 V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC = 1,
461461};
462462
463#define V4L2_CID_MPEG_VIDEO_BACKGROUND_DETECTION (V4L2_CID_CODEC_BASE + 238)
464
463465/* CIDs for the MPEG-2 Part 2 (H.262) codec */
464466#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270)
465467enum v4l2_mpeg_video_mpeg2_level {
lib/libc/include/any-linux-any/linux/version.h+2-2
......@@ -1,5 +1,5 @@
1#define LINUX_VERSION_CODE 459008
1#define LINUX_VERSION_CODE 459264
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 1
4#define LINUX_VERSION_PATCHLEVEL 2
55#define LINUX_VERSION_SUBLEVEL 0
\ No newline at end of file
lib/libc/include/any-linux-any/linux/virtio_can.h created+78
......@@ -0,0 +1,78 @@
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright (C) 2021-2023 OpenSynergy GmbH
4 * Copyright Red Hat, Inc. 2025
5 */
6#ifndef _LINUX_VIRTIO_VIRTIO_CAN_H
7#define _LINUX_VIRTIO_VIRTIO_CAN_H
8
9#include <linux/types.h>
10#include <linux/virtio_types.h>
11#include <linux/virtio_ids.h>
12#include <linux/virtio_config.h>
13
14/* Feature bit numbers */
15#define VIRTIO_CAN_F_CAN_CLASSIC 0
16#define VIRTIO_CAN_F_CAN_FD 1
17#define VIRTIO_CAN_F_RTR_FRAMES 2
18#define VIRTIO_CAN_F_LATE_TX_ACK 3
19
20/* CAN Result Types */
21#define VIRTIO_CAN_RESULT_OK 0
22#define VIRTIO_CAN_RESULT_NOT_OK 1
23
24/* CAN flags to determine type of CAN Id */
25#define VIRTIO_CAN_FLAGS_EXTENDED 0x8000
26#define VIRTIO_CAN_FLAGS_FD 0x4000
27#define VIRTIO_CAN_FLAGS_RTR 0x2000
28
29#define VIRTIO_CAN_MAX_DLEN 64 /* this is like CANFD_MAX_DLEN */
30
31struct virtio_can_config {
32#define VIRTIO_CAN_S_CTRL_BUSOFF (1u << 0) /* Controller BusOff */
33 /* CAN controller status */
34 __le16 status;
35};
36
37/* TX queue message types */
38struct virtio_can_tx_out {
39#define VIRTIO_CAN_TX 0x0001
40 __le16 msg_type;
41 __le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
42 __u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
43 __u8 padding;
44 __le16 reserved_xl_priority; /* May be needed for CAN XL priority */
45 __le32 flags;
46 __le32 can_id;
47 __u8 sdu[] __counted_by_le(length);
48};
49
50struct virtio_can_tx_in {
51 __u8 result;
52};
53
54/* RX queue message types */
55struct virtio_can_rx {
56#define VIRTIO_CAN_RX 0x0101
57 __le16 msg_type;
58 __le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
59 __u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
60 __u8 padding;
61 __le16 reserved_xl_priority; /* May be needed for CAN XL priority */
62 __le32 flags;
63 __le32 can_id;
64 __u8 sdu[] __counted_by_le(length);
65};
66
67/* Control queue message types */
68struct virtio_can_control_out {
69#define VIRTIO_CAN_SET_CTRL_MODE_START 0x0201
70#define VIRTIO_CAN_SET_CTRL_MODE_STOP 0x0202
71 __le16 msg_type;
72};
73
74struct virtio_can_control_in {
75 __u8 result;
76};
77
78#endif /* #ifndef _LINUX_VIRTIO_VIRTIO_CAN_H */
\ No newline at end of file
lib/libc/include/any-linux-any/linux/virtio_console.h+1-1
......@@ -44,7 +44,7 @@
4444#define VIRTIO_CONSOLE_BAD_ID (~(__u32)0)
4545
4646struct virtio_console_config {
47 /* colums of the screens */
47 /* columns of the screens */
4848 __virtio16 cols;
4949 /* rows of the screens */
5050 __virtio16 rows;
lib/libc/include/any-linux-any/linux/virtio_gpu.h+9
......@@ -64,6 +64,14 @@
6464 * context_init and multiple timelines
6565 */
6666#define VIRTIO_GPU_F_CONTEXT_INIT 4
67/*
68 * The device provides a valid blob_alignment
69 * field in its configuration and both
70 * VIRTIO_GPU_CMD_RESOURCE_CREATE_BLOB and
71 * VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB requests
72 * must be aligned to that value.
73 */
74#define VIRTIO_GPU_F_BLOB_ALIGNMENT 5
6775
6876enum virtio_gpu_ctrl_type {
6977 VIRTIO_GPU_UNDEFINED = 0,
......@@ -365,6 +373,7 @@ struct virtio_gpu_config {
365373 __le32 events_clear;
366374 __le32 num_scanouts;
367375 __le32 num_capsets;
376 __le32 blob_alignment;
368377};
369378
370379/* simple formats for fbcon/X use */
lib/libc/include/any-linux-any/linux/watchdog.h+2
......@@ -36,6 +36,7 @@ struct watchdog_info {
3636#define WDIOF_UNKNOWN -1 /* Unknown flag error */
3737#define WDIOS_UNKNOWN -1 /* Unknown status error */
3838
39/* Bit masks for watchdog_info.options, GETSTATUS and GETBOOTSTATUS ioctls */
3940#define WDIOF_OVERHEAT 0x0001 /* Reset due to CPU overheat */
4041#define WDIOF_FANFAULT 0x0002 /* Fan failed */
4142#define WDIOF_EXTERN1 0x0004 /* External relay 1 */
......@@ -50,6 +51,7 @@ struct watchdog_info {
5051 other external alarm not a reboot */
5152#define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */
5253
54/* Bit masks for WDIOC_SETOPTIONS ioctl */
5355#define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */
5456#define WDIOS_ENABLECARD 0x0002 /* Turn on the watchdog timer */
5557#define WDIOS_TEMPPANIC 0x0004 /* Kernel panic on temperature trip */
lib/libc/include/any-linux-any/linux/xfrm.h+25
......@@ -227,6 +227,9 @@ enum {
227227#define XFRM_MSG_SETDEFAULT XFRM_MSG_SETDEFAULT
228228 XFRM_MSG_GETDEFAULT,
229229#define XFRM_MSG_GETDEFAULT XFRM_MSG_GETDEFAULT
230
231 XFRM_MSG_MIGRATE_STATE,
232#define XFRM_MSG_MIGRATE_STATE XFRM_MSG_MIGRATE_STATE
230233 __XFRM_MSG_MAX
231234};
232235#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)
......@@ -507,6 +510,28 @@ struct xfrm_user_migrate {
507510 __u16 new_family;
508511};
509512
513struct xfrm_user_migrate_state {
514 struct xfrm_usersa_id id;
515 xfrm_address_t new_daddr;
516 xfrm_address_t new_saddr;
517 struct xfrm_mark old_mark;
518 struct xfrm_selector new_sel;
519 __u32 new_reqid;
520 __u32 flags;
521 __u16 new_family;
522 __u16 reserved;
523};
524
525/* Flags for xfrm_user_migrate_state.flags */
526enum xfrm_migrate_state_flags {
527 XFRM_MIGRATE_STATE_CLEAR_OFFLOAD = 1, /* do not inherit offload from existing SA */
528 XFRM_MIGRATE_STATE_UPDATE_H2H_SEL = 2, /* update H2H selector from new daddr/saddr */
529};
530
531/* All flags defined as of this header version; unknown bits are rejected. */
532#define XFRM_MIGRATE_STATE_KNOWN_FLAGS \
533 (XFRM_MIGRATE_STATE_CLEAR_OFFLOAD | XFRM_MIGRATE_STATE_UPDATE_H2H_SEL)
534
510535struct xfrm_user_mapping {
511536 struct xfrm_usersa_id id;
512537 __u32 reqid;
lib/libc/include/any-linux-any/rdma/bnxt_re-abi.h+6-1
......@@ -126,7 +126,7 @@ struct bnxt_re_resize_cq_req {
126126};
127127
128128enum bnxt_re_qp_mask {
129 BNXT_RE_QP_REQ_MASK_VAR_WQE_SQ_SLOTS = 0x1,
129 BNXT_RE_QP_REQ_MASK_FIXED_QUE_ATTR = 0x1,
130130};
131131
132132struct bnxt_re_qp_req {
......@@ -135,6 +135,11 @@ struct bnxt_re_qp_req {
135135 __aligned_u64 qp_handle;
136136 __aligned_u64 comp_mask;
137137 __u32 sq_slots;
138 __u32 sq_npsn;
139};
140
141enum bnxt_re_create_qp_attrs {
142 BNXT_RE_CREATE_QP_ATTR_DBR_HANDLE = UVERBS_ID_DRIVER_NS_WITH_UHW,
138143};
139144
140145struct bnxt_re_qp_resp {
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h+4
......@@ -117,6 +117,7 @@ enum uverbs_attrs_create_cq_cmd_attr_ids {
117117 UVERBS_ATTR_CREATE_CQ_BUFFER_LENGTH,
118118 UVERBS_ATTR_CREATE_CQ_BUFFER_FD,
119119 UVERBS_ATTR_CREATE_CQ_BUFFER_OFFSET,
120 UVERBS_ATTR_CREATE_CQ_BUF_UMEM,
120121};
121122
122123enum uverbs_attrs_destroy_cq_cmd_attr_ids {
......@@ -158,6 +159,9 @@ enum uverbs_attrs_create_qp_cmd_attr_ids {
158159 UVERBS_ATTR_CREATE_QP_EVENT_FD,
159160 UVERBS_ATTR_CREATE_QP_RESP_CAP,
160161 UVERBS_ATTR_CREATE_QP_RESP_QP_NUM,
162 UVERBS_ATTR_CREATE_QP_BUF_UMEM,
163 UVERBS_ATTR_CREATE_QP_RQ_BUF_UMEM,
164 UVERBS_ATTR_CREATE_QP_SQ_BUF_UMEM,
161165};
162166
163167enum uverbs_attrs_destroy_qp_cmd_attr_ids {
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_verbs.h+27
......@@ -273,4 +273,31 @@ struct ib_uverbs_gid_entry {
273273 __u32 netdev_ifindex; /* It is 0 if there is no netdev associated with it */
274274};
275275
276enum ib_uverbs_buffer_type {
277 IB_UVERBS_BUFFER_TYPE_DMABUF,
278 IB_UVERBS_BUFFER_TYPE_VA,
279};
280
281/*
282 * Describes a single buffer backed by dma-buf or user virtual address.
283 * Used as the payload of a per-attribute UVERBS_ATTR_UMEM-typed attribute.
284 *
285 * @type: buffer type from enum ib_uverbs_buffer_type
286 * @fd: dma-buf file descriptor (valid for IB_UVERBS_BUFFER_TYPE_DMABUF)
287 * @flags: required flags; the kernel rejects the call with -EINVAL if any
288 * bit is not understood. No bits are defined yet.
289 * @optional_flags: advisory flags; bits the kernel does not understand are
290 * silently ignored. No bits are defined yet.
291 * @addr: offset within dma-buf, or user virtual address for VA
292 * @length: buffer length in bytes
293 */
294struct ib_uverbs_buffer_desc {
295 __u32 type;
296 __s32 fd;
297 __u32 flags;
298 __u32 optional_flags;
299 __aligned_u64 addr;
300 __aligned_u64 length;
301};
302
276303#endif
\ No newline at end of file
lib/libc/include/any-linux-any/rdma/ib_user_verbs.h+2
......@@ -1368,6 +1368,8 @@ enum ib_uverbs_device_cap_flags {
13681368 IB_UVERBS_DEVICE_FLUSH_PERSISTENT = 1ULL << 39,
13691369 /* Atomic write attributes */
13701370 IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40,
1371 /* CoCo guest with DMA bounce buffering required */
1372 IB_UVERBS_DEVICE_CC_DMA_BOUNCE = 1ULL << 41,
13711373};
13721374
13731375enum ib_uverbs_raw_packet_caps {
lib/libc/include/any-linux-any/rdma/mlx5_user_ioctl_cmds.h+5
......@@ -274,6 +274,11 @@ enum mlx5_ib_device_query_context_attrs {
274274
275275enum mlx5_ib_create_cq_attrs {
276276 MLX5_IB_ATTR_CREATE_CQ_UAR_INDEX = UVERBS_ID_DRIVER_NS_WITH_UHW,
277 MLX5_IB_ATTR_CREATE_CQ_DBR_BUF_UMEM,
278};
279
280enum mlx5_ib_create_qp_attrs {
281 MLX5_IB_ATTR_CREATE_QP_DBR_BUF_UMEM = UVERBS_ID_DRIVER_NS_WITH_UHW,
277282};
278283
279284enum mlx5_ib_reg_dmabuf_mr_attrs {
lib/libc/include/arm-linux-any/asm/fcntl.h+4-4
......@@ -2,10 +2,10 @@
22#ifndef _ARM_FCNTL_H
33#define _ARM_FCNTL_H
44
5#define O_DIRECTORY 040000 /* must be a directory */
6#define O_NOFOLLOW 0100000 /* don't follow links */
7#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
8#define O_LARGEFILE 0400000
5#define O_DIRECTORY (1 << 14) /* must be a directory */
6#define O_NOFOLLOW (1 << 15) /* don't follow links */
7#define O_DIRECT (1 << 16) /* direct disk access hint - currently ignored */
8#define O_LARGEFILE (1 << 17)
99
1010#include <asm-generic/fcntl.h>
1111
lib/libc/include/m68k-linux-any/asm/fcntl.h+4-4
......@@ -2,10 +2,10 @@
22#ifndef _M68K_FCNTL_H
33#define _M68K_FCNTL_H
44
5#define O_DIRECTORY 040000 /* must be a directory */
6#define O_NOFOLLOW 0100000 /* don't follow links */
7#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
8#define O_LARGEFILE 0400000
5#define O_DIRECTORY (1 << 14) /* must be a directory */
6#define O_NOFOLLOW (1 << 15) /* don't follow links */
7#define O_DIRECT (1 << 16) /* direct disk access hint - currently ignored */
8#define O_LARGEFILE (1 << 17)
99
1010#include <asm-generic/fcntl.h>
1111
lib/libc/include/mips-linux-any/asm/errno.h+2
......@@ -126,6 +126,8 @@
126126
127127#define EHWPOISON 168 /* Memory page has hardware error */
128128
129#define EFTYPE 169 /* Wrong file type for the intended operation */
130
129131#define EDQUOT 1133 /* Quota exceeded */
130132
131133
lib/libc/include/mips-linux-any/asm/fcntl.h+11-11
......@@ -11,15 +11,15 @@
1111
1212#include <asm/sgidefs.h>
1313
14#define O_APPEND 0x0008
15#define O_DSYNC 0x0010 /* used to be O_SYNC, see below */
16#define O_NONBLOCK 0x0080
17#define O_CREAT 0x0100 /* not fcntl */
18#define O_TRUNC 0x0200 /* not fcntl */
19#define O_EXCL 0x0400 /* not fcntl */
20#define O_NOCTTY 0x0800 /* not fcntl */
21#define FASYNC 0x1000 /* fcntl, for BSD compatibility */
22#define O_LARGEFILE 0x2000 /* allow large file opens */
14#define O_APPEND (1 << 3)
15#define O_DSYNC (1 << 4) /* used to be O_SYNC, see below */
16#define O_NONBLOCK (1 << 7)
17#define O_CREAT (1 << 8) /* not fcntl */
18#define O_TRUNC (1 << 9) /* not fcntl */
19#define O_EXCL (1 << 10) /* not fcntl */
20#define O_NOCTTY (1 << 11) /* not fcntl */
21#define FASYNC (1 << 12) /* fcntl, for BSD compatibility */
22#define O_LARGEFILE (1 << 13) /* allow large file opens */
2323/*
2424 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
2525 * the O_SYNC flag. We continue to use the existing numerical value
......@@ -33,9 +33,9 @@
3333 *
3434 * Note: __O_SYNC must never be used directly.
3535 */
36#define __O_SYNC 0x4000
36#define __O_SYNC (1 << 14)
3737#define O_SYNC (__O_SYNC|O_DSYNC)
38#define O_DIRECT 0x8000 /* direct disk access hint */
38#define O_DIRECT (1 << 15) /* direct disk access hint */
3939
4040#define F_GETLK 14
4141#define F_SETLK 6
lib/libc/include/powerpc-linux-any/asm/fcntl.h+4-4
......@@ -2,10 +2,10 @@
22#ifndef _ASM_FCNTL_H
33#define _ASM_FCNTL_H
44
5#define O_DIRECTORY 040000 /* must be a directory */
6#define O_NOFOLLOW 0100000 /* don't follow links */
7#define O_LARGEFILE 0200000
8#define O_DIRECT 0400000 /* direct disk access hint */
5#define O_DIRECTORY (1 << 14) /* must be a directory */
6#define O_NOFOLLOW (1 << 15) /* don't follow links */
7#define O_LARGEFILE (1 << 16)
8#define O_DIRECT (1 << 17) /* direct disk access hint */
99
1010#include <asm-generic/fcntl.h>
1111
lib/libc/include/s390x-linux-any/asm/kvm.h+1
......@@ -444,6 +444,7 @@ struct kvm_s390_vm_cpu_machine {
444444#define KVM_S390_VM_CPU_FEAT_PFMFI 11
445445#define KVM_S390_VM_CPU_FEAT_SIGPIF 12
446446#define KVM_S390_VM_CPU_FEAT_KSS 13
447#define KVM_S390_VM_CPU_FEAT_ASTFLEIE2 14
447448struct kvm_s390_vm_cpu_feat {
448449 __u64 feat[16];
449450};
lib/libc/include/sparc-linux-any/asm/errno.h+2
......@@ -117,4 +117,6 @@
117117
118118#define EHWPOISON 135 /* Memory page has hardware error */
119119
120#define EFTYPE 136 /* Wrong file type for the intended operation */
121
120122#endif
\ No newline at end of file
lib/libc/include/sparc-linux-any/asm/fcntl.h+17-17
......@@ -2,23 +2,23 @@
22#ifndef _SPARC_FCNTL_H
33#define _SPARC_FCNTL_H
44
5#define O_APPEND 0x0008
6#define FASYNC 0x0040 /* fcntl, for BSD compatibility */
7#define O_CREAT 0x0200 /* not fcntl */
8#define O_TRUNC 0x0400 /* not fcntl */
9#define O_EXCL 0x0800 /* not fcntl */
10#define O_DSYNC 0x2000 /* used to be O_SYNC, see below */
11#define O_NONBLOCK 0x4000
5#define O_APPEND (1 << 3)
6#define FASYNC (1 << 6) /* fcntl, for BSD compatibility */
7#define O_CREAT (1 << 9) /* not fcntl */
8#define O_TRUNC (1 << 10) /* not fcntl */
9#define O_EXCL (1 << 11) /* not fcntl */
10#define O_DSYNC (1 << 13) /* used to be O_SYNC, see below */
11#define O_NONBLOCK (1 << 14)
1212#if defined(__sparc__) && defined(__arch64__)
13#define O_NDELAY 0x0004
13#define O_NDELAY (1 << 2)
1414#else
15#define O_NDELAY (0x0004 | O_NONBLOCK)
15#define O_NDELAY ((1 << 2) | O_NONBLOCK)
1616#endif
17#define O_NOCTTY 0x8000 /* not fcntl */
18#define O_LARGEFILE 0x40000
19#define O_DIRECT 0x100000 /* direct disk access hint */
20#define O_NOATIME 0x200000
21#define O_CLOEXEC 0x400000
17#define O_NOCTTY (1 << 15) /* not fcntl */
18#define O_LARGEFILE (1 << 18)
19#define O_DIRECT (1 << 20) /* direct disk access hint */
20#define O_NOATIME (1 << 21)
21#define O_CLOEXEC (1 << 22)
2222/*
2323 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
2424 * the O_SYNC flag. We continue to use the existing numerical value
......@@ -32,11 +32,11 @@
3232 *
3333 * Note: __O_SYNC must never be used directly.
3434 */
35#define __O_SYNC 0x800000
35#define __O_SYNC (1 << 23)
3636#define O_SYNC (__O_SYNC|O_DSYNC)
3737
38#define O_PATH 0x1000000
39#define __O_TMPFILE 0x2000000
38#define O_PATH (1 << 24)
39#define __O_TMPFILE (1 << 25)
4040
4141#define F_GETOWN 5 /* for sockets. */
4242#define F_SETOWN 6 /* for sockets. */
lib/libc/include/sparc-linux-any/asm/ucontext.h created+3
......@@ -0,0 +1,3 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3#include <asm/uctx.h>
\ No newline at end of file
lib/libc/include/x86-linux-any/asm/kvm.h+2
......@@ -475,6 +475,7 @@ struct kvm_sync_regs {
475475#define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8)
476476#define KVM_X86_QUIRK_IGNORE_GUEST_PAT (1 << 9)
477477#define KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM (1 << 10)
478#define KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT (1 << 11)
478479
479480#define KVM_STATE_NESTED_FORMAT_VMX 0
480481#define KVM_STATE_NESTED_FORMAT_SVM 1
......@@ -530,6 +531,7 @@ struct kvm_svm_nested_state_data {
530531
531532struct kvm_svm_nested_state_hdr {
532533 __u64 vmcb_pa;
534 __u64 gpat;
533535};
534536
535537/* for KVM_CAP_NESTED_STATE */