summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@kernel.org>2026-08-17 10:29:52 +0200
committerThomas Gleixner <tglx@kernel.org>2026-08-17 10:29:52 +0200
commit0eaed89c18aeedf0898baf2dbf5ff027c6795152 (patch)
tree4422cb10597581af05704ba6510018aabf25b268 /include/uapi
parentc66494c79ede1af529dbf67f9ed6fdbf42e05ef3 (diff)
parent8b4127f6db40381229f3564d34ac35f36311c201 (diff)
Merge tag 'timers-v7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/daniel.lezcano/linux into timers/clocksource
- Use designated initializers for sh_mtu2, sh_cmt, and sh_tmu, and drop the unused initializer in the platform_device_id table for sh_mtu2 (Uwe Kleine-König) - Remove redundant dev_err()/dev_err_probe() messages when devm_request_*_irq() fails, as the helper already logs an error message (Pan Chuang) - Fix a boot hang on Allwinner D1 when a forced minimum delta is used with the sun4i timer (Felix Yan) - Fix an IRQ leak in the cpuhp_setup_state() error path by freeing the IRQ on failure in the NXP PIT driver (WenTao Liang) - Fix incorrect unmapping of shared MMIO between the clocksource and clockevent drivers. If one of them fails to initialize, the error path unmaps the shared MMIO region, leaving the other driver with an invalid mapping on clps711x (Guangshuo Li) - Make the samsung_pwm driver compatible with PREEMPT_RT by replacing regular spinlocks with raw_spinlock_t in atomic contexts (Marek Szyprowski) - Use __raw_readl() and __raw_writel() instead of ioread32() and iowrite32() to support SWAP_IO_SPACE in the rtl-otto driver (Rustam Adilov) - Fix a missing clk_disable_unprepare() call in the timer initialization error path of the Armada driver (Yuho Choi) Link: https://lore.kernel.org/lkml/75feea31-683d-45a1-87f4-ab045e0152ae@oss.qualcomm.com
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/asm-generic/errno.h2
-rw-r--r--include/uapi/asm-generic/fcntl.h54
-rw-r--r--include/uapi/drm/amdxdna_accel.h27
-rw-r--r--include/uapi/drm/drm.h27
-rw-r--r--include/uapi/drm/drm_fourcc.h54
-rw-r--r--include/uapi/drm/drm_mode.h19
-rw-r--r--include/uapi/drm/drm_ras.h1
-rw-r--r--include/uapi/drm/drm_sarea.h20
-rw-r--r--include/uapi/drm/msm_drm.h48
-rw-r--r--include/uapi/drm/tegra_drm.h16
-rw-r--r--include/uapi/drm/virtgpu_drm.h5
-rw-r--r--include/uapi/drm/xe_drm.h206
-rw-r--r--include/uapi/linux/atm_eni.h24
-rw-r--r--include/uapi/linux/atm_he.h21
-rw-r--r--include/uapi/linux/atm_idt77105.h29
-rw-r--r--include/uapi/linux/atm_nicstar.h54
-rw-r--r--include/uapi/linux/atm_tcp.h62
-rw-r--r--include/uapi/linux/atm_zatm.h47
-rw-r--r--include/uapi/linux/atmarp.h42
-rw-r--r--include/uapi/linux/atmclip.h22
-rw-r--r--include/uapi/linux/atmdev.h18
-rw-r--r--include/uapi/linux/atmlec.h92
-rw-r--r--include/uapi/linux/atmmpc.h127
-rw-r--r--include/uapi/linux/atmsvc.h56
-rw-r--r--include/uapi/linux/batadv_packet.h6
-rw-r--r--include/uapi/linux/bpf.h32
-rw-r--r--include/uapi/linux/btf.h26
-rw-r--r--include/uapi/linux/btrfs.h34
-rw-r--r--include/uapi/linux/cec-funcs.h182
-rw-r--r--include/uapi/linux/cec.h31
-rw-r--r--include/uapi/linux/devlink.h1
-rw-r--r--include/uapi/linux/dpll.h25
-rw-r--r--include/uapi/linux/drbd.h413
-rw-r--r--include/uapi/linux/drbd_genl.h359
-rw-r--r--include/uapi/linux/drbd_limits.h251
-rw-r--r--include/uapi/linux/ethtool.h3
-rw-r--r--include/uapi/linux/fs.h18
-rw-r--r--include/uapi/linux/fsl_hypervisor.h4
-rw-r--r--include/uapi/linux/futex.h60
-rw-r--r--include/uapi/linux/if_bridge.h1
-rw-r--r--include/uapi/linux/if_ether.h6
-rw-r--r--include/uapi/linux/if_link.h20
-rw-r--r--include/uapi/linux/iio/types.h2
-rw-r--r--include/uapi/linux/io_uring/bpf_filter.h16
-rw-r--r--include/uapi/linux/io_uring/query.h12
-rw-r--r--include/uapi/linux/io_uring/zcrx.h36
-rw-r--r--include/uapi/linux/iommufd.h12
-rw-r--r--include/uapi/linux/kfd_ioctl.h38
-rw-r--r--include/uapi/linux/kvm.h1
-rw-r--r--include/uapi/linux/landlock.h97
-rw-r--r--include/uapi/linux/liveupdate.h25
-rw-r--r--include/uapi/linux/llc.h7
-rw-r--r--include/uapi/linux/mdio.h10
-rw-r--r--include/uapi/linux/netdev.h2
-rw-r--r--include/uapi/linux/netfilter/nf_conntrack_common.h1
-rw-r--r--include/uapi/linux/nfsd_netlink.h156
-rw-r--r--include/uapi/linux/nl80211.h303
-rw-r--r--include/uapi/linux/openat2.h7
-rw-r--r--include/uapi/linux/pci_regs.h2
-rw-r--r--include/uapi/linux/pkt_sched.h10
-rw-r--r--include/uapi/linux/pps.h2
-rw-r--r--include/uapi/linux/psp.h13
-rw-r--r--include/uapi/linux/rkisp1-config.h113
-rw-r--r--include/uapi/linux/rtnetlink.h1
-rw-r--r--include/uapi/linux/sunrpc_netlink.h84
-rw-r--r--include/uapi/linux/synclink.h301
-rw-r--r--include/uapi/linux/tee.h1
-rw-r--r--include/uapi/linux/tls.h2
-rw-r--r--include/uapi/linux/userio.h7
-rw-r--r--include/uapi/linux/v4l2-controls.h2
-rw-r--r--include/uapi/linux/virtio_can.h78
-rw-r--r--include/uapi/linux/virtio_console.h2
-rw-r--r--include/uapi/linux/virtio_gpu.h9
-rw-r--r--include/uapi/linux/watchdog.h2
-rw-r--r--include/uapi/linux/xfrm.h25
-rw-r--r--include/uapi/rdma/bnxt_re-abi.h7
-rw-r--r--include/uapi/rdma/ib_user_ioctl_cmds.h4
-rw-r--r--include/uapi/rdma/ib_user_ioctl_verbs.h27
-rw-r--r--include/uapi/rdma/ib_user_verbs.h2
-rw-r--r--include/uapi/rdma/mlx5_user_ioctl_cmds.h5
80 files changed, 2790 insertions, 1179 deletions
diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
index 92e7ae493ee3..bd78e69e0a43 100644
--- a/include/uapi/asm-generic/errno.h
+++ b/include/uapi/asm-generic/errno.h
@@ -122,4 +122,6 @@
#define EHWPOISON 133 /* Memory page has hardware error */
+#define EFTYPE 134 /* Wrong file type for the intended operation */
+
#endif
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
index 613475285643..883cfd7de2ef 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -15,51 +15,55 @@
* When introducing new O_* bits, please check its uniqueness in fcntl_init().
*/
-#define O_ACCMODE 00000003
-#define O_RDONLY 00000000
-#define O_WRONLY 00000001
-#define O_RDWR 00000002
+#define O_ACCMODE 3
+#define O_RDONLY 0
+#define O_WRONLY (1 << 0)
+#define O_RDWR (1 << 1)
+/* (1 << 2) must not be used -- it collides with flags on alpha, sparc */
+/* (1 << 3) must not be used -- it collides with flags on alpha, mips, parisc, sparc */
+/* (1 << 4) must not be used -- it collides with flags on mips */
+/* (1 << 5) is free */
#ifndef O_CREAT
-#define O_CREAT 00000100 /* not fcntl */
+#define O_CREAT (1 << 6) /* not fcntl */
#endif
#ifndef O_EXCL
-#define O_EXCL 00000200 /* not fcntl */
+#define O_EXCL (1 << 7) /* not fcntl */
#endif
#ifndef O_NOCTTY
-#define O_NOCTTY 00000400 /* not fcntl */
+#define O_NOCTTY (1 << 8) /* not fcntl */
#endif
#ifndef O_TRUNC
-#define O_TRUNC 00001000 /* not fcntl */
+#define O_TRUNC (1 << 9) /* not fcntl */
#endif
#ifndef O_APPEND
-#define O_APPEND 00002000
+#define O_APPEND (1 << 10)
#endif
#ifndef O_NONBLOCK
-#define O_NONBLOCK 00004000
+#define O_NONBLOCK (1 << 11)
#endif
#ifndef O_DSYNC
-#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
+#define O_DSYNC (1 << 12) /* used to be O_SYNC, see below */
#endif
#ifndef FASYNC
-#define FASYNC 00020000 /* fcntl, for BSD compatibility */
+#define FASYNC (1 << 13) /* fcntl, for BSD compatibility */
#endif
#ifndef O_DIRECT
-#define O_DIRECT 00040000 /* direct disk access hint */
+#define O_DIRECT (1 << 14) /* direct disk access hint */
#endif
#ifndef O_LARGEFILE
-#define O_LARGEFILE 00100000
+#define O_LARGEFILE (1 << 15)
#endif
#ifndef O_DIRECTORY
-#define O_DIRECTORY 00200000 /* must be a directory */
+#define O_DIRECTORY (1 << 16) /* must be a directory */
#endif
#ifndef O_NOFOLLOW
-#define O_NOFOLLOW 00400000 /* don't follow links */
+#define O_NOFOLLOW (1 << 17) /* don't follow links */
#endif
#ifndef O_NOATIME
-#define O_NOATIME 01000000
+#define O_NOATIME (1 << 18)
#endif
#ifndef O_CLOEXEC
-#define O_CLOEXEC 02000000 /* set close_on_exec */
+#define O_CLOEXEC (1 << 19) /* set close_on_exec */
#endif
/*
@@ -76,16 +80,20 @@
* Note: __O_SYNC must never be used directly.
*/
#ifndef O_SYNC
-#define __O_SYNC 04000000
+#define __O_SYNC (1 << 20)
#define O_SYNC (__O_SYNC|O_DSYNC)
#endif
#ifndef O_PATH
-#define O_PATH 010000000
+#define O_PATH (1 << 21)
#endif
#ifndef __O_TMPFILE
-#define __O_TMPFILE 020000000
+#define __O_TMPFILE (1 << 22)
+#endif
+
+#ifndef O_EMPTYPATH
+#define O_EMPTYPATH (1 << 26) /* allow empty path */
#endif
/* a horrid kludge trying to make sure that this will fail on old kernels */
@@ -95,6 +103,10 @@
#define O_NDELAY O_NONBLOCK
#endif
+/* (1 << 23) must not be used -- it collides with flags on alpha, parisc, sparc */
+/* (1 << 24) must not be used -- it collides with flags on alpha, sparc */
+/* (1 << 25) must not be used -- it collides with flags on sparc */
+
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
#define F_SETFD 2 /* set/clear close_on_exec */
diff --git a/include/uapi/drm/amdxdna_accel.h b/include/uapi/drm/amdxdna_accel.h
index 61d3686fa3b1..51a507561df6 100644
--- a/include/uapi/drm/amdxdna_accel.h
+++ b/include/uapi/drm/amdxdna_accel.h
@@ -18,6 +18,7 @@ extern "C" {
#define AMDXDNA_INVALID_CTX_HANDLE 0
#define AMDXDNA_INVALID_BO_HANDLE 0
#define AMDXDNA_INVALID_FENCE_HANDLE 0
+#define AMDXDNA_INVALID_DOORBELL_OFFSET (~0U)
/*
* Define hardware context priority
@@ -29,7 +30,9 @@ extern "C" {
enum amdxdna_device_type {
AMDXDNA_DEV_TYPE_UNKNOWN = -1,
- AMDXDNA_DEV_TYPE_KMQ,
+ AMDXDNA_DEV_TYPE_KMQ = 0,
+ AMDXDNA_DEV_TYPE_UMQ = 1,
+ AMDXDNA_DEV_TYPE_PF = 2,
};
enum amdxdna_drm_ioctl_id {
@@ -42,7 +45,8 @@ enum amdxdna_drm_ioctl_id {
DRM_AMDXDNA_EXEC_CMD,
DRM_AMDXDNA_GET_INFO,
DRM_AMDXDNA_SET_STATE,
- DRM_AMDXDNA_GET_ARRAY = 10,
+ DRM_AMDXDNA_WAIT_CMD,
+ DRM_AMDXDNA_GET_ARRAY,
};
/**
@@ -272,6 +276,21 @@ struct amdxdna_drm_exec_cmd {
};
/**
+ * struct amdxdna_drm_wait_cmd - Wait execution command.
+ *
+ * @hwctx: Context handle.
+ * @timeout: timeout in ms, 0 implies infinite wait.
+ * @seq: sequence number of the command returned by execute command.
+ *
+ * Wait a command specified by seq to be completed.
+ */
+struct amdxdna_drm_wait_cmd {
+ __u32 hwctx;
+ __u32 timeout;
+ __u64 seq;
+};
+
+/**
* struct amdxdna_drm_query_aie_status - Query the status of the AIE hardware
* @buffer: The user space buffer that will return the AIE status.
* @buffer_size: The size of the user space buffer.
@@ -736,6 +755,10 @@ struct amdxdna_drm_set_power_mode {
DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_ARRAY, \
struct amdxdna_drm_get_array)
+#define DRM_IOCTL_AMDXDNA_WAIT_CMD \
+ DRM_IOW(DRM_COMMAND_BASE + DRM_AMDXDNA_WAIT_CMD, \
+ struct amdxdna_drm_wait_cmd)
+
#if defined(__cplusplus)
} /* extern c end */
#endif
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 27cc159c1d27..bc7ef7684099 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
/*
* Header for the Direct Rendering Manager
*
@@ -11,25 +12,6 @@
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _DRM_H_
@@ -1323,6 +1305,13 @@ extern "C" {
*/
#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
+/**
+ * DRM_IOCTL_SYNCOBJ_EVENTFD - Register an eventfd to be signalled by a syncobj.
+ *
+ * This can be used to integrate a syncobj in an event loop.
+ *
+ * The IOCTL argument is a struct drm_syncobj_eventfd.
+ */
#define DRM_IOCTL_SYNCOBJ_EVENTFD DRM_IOWR(0xCF, struct drm_syncobj_eventfd)
/**
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index ac66fa93b5a3..3a4d4dc635bf 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -1,24 +1,6 @@
+/* SPDX-License-Identifier: MIT */
/*
* Copyright 2011 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef DRM_FOURCC_H
@@ -242,9 +224,9 @@ extern "C" {
* [31:0] sign:exponent:mantissa 1:8:23
*/
#define DRM_FORMAT_R32F fourcc_code('R', ' ', ' ', 'F') /* [31:0] R 32 little endian */
-#define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] R:G 32:32 little endian */
-#define DRM_FORMAT_BGR323232F fourcc_code('B', 'G', 'R', 'F') /* [95:0] R:G:B 32:32:32 little endian */
-#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') /* [127:0] R:G:B:A 32:32:32:32 little endian */
+#define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] G:R 32:32 little endian */
+#define DRM_FORMAT_BGR323232F fourcc_code('B', 'G', 'R', 'F') /* [95:0] B:G:R 32:32:32 little endian */
+#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') /* [127:0] A:B:G:R 32:32:32:32 little endian */
/*
* RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits
@@ -264,6 +246,7 @@ extern "C" {
#define DRM_FORMAT_XVUY8888 fourcc_code('X', 'V', 'U', 'Y') /* [31:0] X:Cr:Cb:Y 8:8:8:8 little endian */
#define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4') /* [23:0] Cr:Cb:Y 8:8:8 little endian */
#define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0') /* Y followed by U then V, 10:10:10. Non-linear modifier only */
+#define DRM_FORMAT_XVUY2101010 fourcc_code('X', 'Y', '3', '0') /* [31:0] x:Cr:Cb:Y 2:10:10:10 little endian */
/*
* packed Y2xx indicate for each component, xx valid data occupy msb
@@ -379,6 +362,14 @@ extern "C" {
*/
#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */
+/*
+ * 2 plane YCbCr422.
+ * 3 10 bit components and 2 padding bits packed into 4 bytes.
+ * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian
+ * 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
+ */
+#define DRM_FORMAT_P230 fourcc_code('P', '2', '3', '0') /* 2x1 subsampled Cr:Cb plane 10 bits per channel packed */
+
/* 3 plane non-subsampled (444) YCbCr
* 16 bits per component, but only 10 bits are used and 6 bits are padded
* index 0: Y plane, [15:0] Y:x [10:6] little endian
@@ -396,6 +387,15 @@ extern "C" {
#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1')
/*
+ * 3 plane non-subsampled (444) YCbCr LSB aligned
+ * 10 bpc, 30 bits per sample image data in a single contiguous buffer.
+ * index 0: Y plane, [31:0] x:Y2:Y1:Y0 [2:10:10:10] little endian
+ * index 1: Cb plane, [31:0] x:Cb2:Cb1:Cb0 [2:10:10:10] little endian
+ * index 2: Cr plane, [31:0] x:Cr2:Cr1:Cr0 [2:10:10:10] little endian
+ */
+#define DRM_FORMAT_T430 fourcc_code('T', '4', '3', '0')
+
+/*
* 3 plane YCbCr LSB aligned
* In order to use these formats in a similar fashion to MSB aligned ones
* implementation can multiply the values by 2^6=64. For that reason the padding
@@ -451,6 +451,16 @@ extern "C" {
#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
+/*
+ * Y-only (greyscale) formats
+ *
+ * The Y-only formats are handled similarly to the YCbCr formats in the display
+ * pipeline, with the Cb and Cr implicitly neutral (0.0 in nominal values). This
+ * also means that COLOR_RANGE property applies to the Y-only formats.
+ */
+
+#define DRM_FORMAT_Y8 fourcc_code('G', 'R', 'E', 'Y') /* 8-bit Y-only */
+#define DRM_FORMAT_XYYY2101010 fourcc_code('Y', 'P', 'A', '4') /* [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian */
/*
* Format Modifiers:
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index a4bdc4bd11bc..381a3e857d4e 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -1,27 +1,10 @@
+/* SPDX-License-Identifier: MIT */
/*
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
* Copyright (c) 2007 Jakob Bornecrantz <wallbraker@gmail.com>
* Copyright (c) 2008 Red Hat Inc.
* Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
* Copyright (c) 2007-2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
*/
#ifndef _DRM_MODE_H
diff --git a/include/uapi/drm/drm_ras.h b/include/uapi/drm/drm_ras.h
index 5f40fa5b869d..218a3ee86805 100644
--- a/include/uapi/drm/drm_ras.h
+++ b/include/uapi/drm/drm_ras.h
@@ -41,6 +41,7 @@ enum {
enum {
DRM_RAS_CMD_LIST_NODES = 1,
DRM_RAS_CMD_GET_ERROR_COUNTER,
+ DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
__DRM_RAS_CMD_MAX,
DRM_RAS_CMD_MAX = (__DRM_RAS_CMD_MAX - 1)
diff --git a/include/uapi/drm/drm_sarea.h b/include/uapi/drm/drm_sarea.h
index a951ced60ebe..1e38d028332d 100644
--- a/include/uapi/drm/drm_sarea.h
+++ b/include/uapi/drm/drm_sarea.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
/**
* \file drm_sarea.h
* \brief SAREA definitions
@@ -8,25 +9,6 @@
/*
* Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _DRM_SAREA_H_
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index b99098792371..7f2e594be4eb 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -491,6 +491,52 @@ struct drm_msm_submitqueue_query {
__u32 pad;
};
+#define MSM_PERFCNTR_STREAM 0x00000001
+#define MSM_PERFCNTR_UPDATE 0x00000002
+#define MSM_PERFCNTR_FLAGS ( \
+ MSM_PERFCNTR_STREAM | \
+ MSM_PERFCNTR_UPDATE | \
+ 0)
+
+struct drm_msm_perfcntr_group {
+ char group_name[16];
+ __u32 nr_countables;
+ __u32 pad; /* mbz */
+ __u64 countables; /* pointer to an array of nr_countables u32 */
+};
+
+/*
+ * Note, for MSM_PERFCNTR_STREAM, the ioctl returns an fd to read recorded
+ * counters. This only works because the ioctl is DRM_IOW(), if we returned
+ * a out param in the ioctl struct the copy_to_user() (in drm_ioctl())
+ * could fault, causing us to leak the fd.
+ *
+ * If the ioctl returns with error E2BIG, that means more counters/countables
+ * are requested than are currently available. If MSM_PERFCNTR_UPDATE flag
+ * is set, drm_msm_perfcntr_group::nr_countables will be updated to return
+ * the actual # of counters available.
+ *
+ * The data read from the has the following format for each sampling period:
+ *
+ * uint64_t timestamp; // CP_ALWAYS_ON_COUNTER captured at sample time
+ * uint32_t seqno; // increments by 1 each period, reset to 0 on discontinuity
+ * uint32_t mbz; // pad out counters to 64b
+ * struct {
+ * uint64_t counter[nr_countables];
+ * } groups[nr_groups];
+ *
+ * The ordering of groups and counters matches the order in PERFCNTR_CONFIG
+ * ioctl.
+ */
+struct drm_msm_perfcntr_config {
+ __u32 flags; /* bitmask of MSM_PERFCNTR_x */
+ __u32 nr_groups; /* # of entries in groups array */
+ __u64 groups; /* pointer to array of drm_msm_perfcntr_group */
+ __u64 period; /* sampling period in ns */
+ __u32 bufsz_shift; /* sample buffer size in bytes is 1<<bufsz_shift */
+ __u32 group_stride; /* sizeof(struct drm_msm_perfcntr_group) */
+};
+
#define DRM_MSM_GET_PARAM 0x00
#define DRM_MSM_SET_PARAM 0x01
#define DRM_MSM_GEM_NEW 0x02
@@ -507,6 +553,7 @@ struct drm_msm_submitqueue_query {
#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B
#define DRM_MSM_SUBMITQUEUE_QUERY 0x0C
#define DRM_MSM_VM_BIND 0x0D
+#define DRM_MSM_PERFCNTR_CONFIG 0x0E
#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
#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 {
#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32)
#define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query)
#define DRM_IOCTL_MSM_VM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_VM_BIND, struct drm_msm_vm_bind)
+#define DRM_IOCTL_MSM_PERFCNTR_CONFIG DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_PERFCNTR_CONFIG, struct drm_msm_perfcntr_config)
#if defined(__cplusplus)
}
diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h
index 94cfc306d50a..8f21f3a44832 100644
--- a/include/uapi/drm/tegra_drm.h
+++ b/include/uapi/drm/tegra_drm.h
@@ -304,6 +304,7 @@ struct drm_tegra_cmdbuf {
* struct drm_tegra_reloc - GEM object relocation structure
*/
struct drm_tegra_reloc {
+ /** @cmdbuf: cmd information */
struct {
/**
* @cmdbuf.handle:
@@ -321,6 +322,7 @@ struct drm_tegra_reloc {
*/
__u32 offset;
} cmdbuf;
+ /** @target: relocate target information */
struct {
/**
* @target.handle:
@@ -778,6 +780,9 @@ struct drm_tegra_channel_unmap {
/* Submission */
/**
+ * define DRM_TEGRA_SUBMIT_RELOC_SECTOR_LAYOUT - \
+ * Select sector layout swizzling for in-memory buffers.
+ *
* Specify that bit 39 of the patched-in address should be set to switch
* swizzling between Tegra and non-Tegra sector layout on systems that store
* surfaces in system memory in non-Tegra sector layout.
@@ -830,16 +835,27 @@ struct drm_tegra_submit_buf {
};
/**
+ * define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR - \
+ * Execute Host1x opcodes from user pointer.
+ *
* Execute `words` words of Host1x opcodes specified in the `gather_data_ptr`
* buffer. Each GATHER_UPTR command uses successive words from the buffer.
*/
#define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR 0
+
/**
+ * define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT - \
+ * Wait for syncpoint (absolute).
+ *
* Wait for a syncpoint to reach a value before continuing with further
* commands.
*/
#define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT 1
+
/**
+ * define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT_RELATIVE - \
+ * Wait for syncpoint (relative).
+ *
* Wait for a syncpoint to reach a value before continuing with further
* commands. The threshold is calculated relative to the start of the job.
*/
diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h
index 9debb320c34b..95587e12aed5 100644
--- a/include/uapi/drm/virtgpu_drm.h
+++ b/include/uapi/drm/virtgpu_drm.h
@@ -98,6 +98,7 @@ struct drm_virtgpu_execbuffer {
#define VIRTGPU_PARAM_CONTEXT_INIT 6 /* DRM_VIRTGPU_CONTEXT_INIT */
#define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs 7 /* Bitmask of supported capability set ids */
#define VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME 8 /* Ability to set debug name from userspace */
+#define VIRTGPU_PARAM_BLOB_ALIGNMENT 9 /* Device alignment requirements for blobs */
struct drm_virtgpu_getparam {
__u64 param;
@@ -200,6 +201,10 @@ struct drm_virtgpu_resource_create_blob {
__u32 cmd_size;
__u64 cmd;
__u64 blob_id;
+
+#define DRM_VIRTGPU_BLOB_FLAG_HINT_DEFER_MAPPING 0x0001
+ __u32 blob_hints;
+ __u32 pad2;
};
#define VIRTGPU_CONTEXT_PARAM_CAPSET_ID 0x0001
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index ae2fda23ce7c..48e9f1fdb78d 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -83,6 +83,7 @@ extern "C" {
* - &DRM_IOCTL_XE_OBSERVATION
* - &DRM_IOCTL_XE_MADVISE
* - &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
+ * - &DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY
* - &DRM_IOCTL_XE_VM_GET_PROPERTY
*/
@@ -167,7 +168,7 @@ extern "C" {
* Typically the struct drm_xe_user_extension would be embedded in some uAPI
* struct, and in this case we would feed it the head of the chain(i.e ext1),
* which would then apply all of the above extensions.
-*/
+ */
/**
* struct drm_xe_user_extension - Base class for defining a chain of extensions
@@ -229,9 +230,9 @@ struct drm_xe_ext_set_property {
/**
* struct drm_xe_engine_class_instance - instance of an engine class
*
- * It is returned as part of the @drm_xe_engine, but it also is used as
- * the input of engine selection for both @drm_xe_exec_queue_create and
- * @drm_xe_query_engine_cycles
+ * It is returned as part of the &struct drm_xe_engine, but it also is used as
+ * the input of engine selection for both &struct drm_xe_exec_queue_create and
+ * &struct drm_xe_query_engine_cycles
*
* The @engine_class can be:
* - %DRM_XE_ENGINE_CLASS_RENDER
@@ -264,7 +265,7 @@ struct drm_xe_engine_class_instance {
* struct drm_xe_engine - describe hardware engine
*/
struct drm_xe_engine {
- /** @instance: The @drm_xe_engine_class_instance */
+ /** @instance: The &struct drm_xe_engine_class_instance */
struct drm_xe_engine_class_instance instance;
/** @reserved: Reserved */
@@ -274,9 +275,9 @@ struct drm_xe_engine {
/**
* struct drm_xe_query_engines - describe engines
*
- * If a query is made with a struct @drm_xe_device_query where .query
+ * If a query is made with a &struct drm_xe_device_query where .query
* is equal to %DRM_XE_DEVICE_QUERY_ENGINES, then the reply uses an array of
- * struct @drm_xe_query_engines in .data.
+ * &struct drm_xe_query_engines in .data.
*/
struct drm_xe_query_engines {
/** @num_engines: number of engines returned in @engines */
@@ -349,7 +350,7 @@ struct drm_xe_mem_region {
* is smaller than @total_size then this is referred to as a
* small BAR system.
*
- * On systems without small BAR (full BAR), the probed_size will
+ * On systems without small BAR (full BAR), the @cpu_visible_size will
* always equal the @total_size, since all of it will be CPU
* accessible.
*
@@ -410,7 +411,7 @@ struct drm_xe_query_mem_regions {
* device supports the userspace hint %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION.
* This is exposed only on Xe2+.
* - %DRM_XE_QUERY_CONFIG_FLAG_HAS_DISABLE_STATE_CACHE_PERF_FIX - Flag is set
- * if a queue can be creaed with
+ * if a queue can be created with
* %DRM_XE_EXEC_QUEUE_SET_DISABLE_STATE_CACHE_PERF_FIX
* - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
* required by this device, typically SZ_4K or SZ_64K
@@ -705,7 +706,10 @@ struct drm_xe_query_pxp_status {
* attributes.
* - %DRM_XE_DEVICE_QUERY_GT_TOPOLOGY
* - %DRM_XE_DEVICE_QUERY_ENGINE_CYCLES
+ * - %DRM_XE_DEVICE_QUERY_UC_FW_VERSION
+ * - %DRM_XE_DEVICE_QUERY_OA_UNITS
* - %DRM_XE_DEVICE_QUERY_PXP_STATUS
+ * - %DRM_XE_DEVICE_QUERY_EU_STALL
*
* If size is set to 0, the driver fills it with the required size for
* the requested type of data to query. If size is equal to the required
@@ -825,7 +829,7 @@ struct drm_xe_device_query {
*
* This ioctl supports setting the following properties via the
* %DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY extension, which uses the
- * generic @drm_xe_ext_set_property struct:
+ * generic &struct drm_xe_ext_set_property:
*
* - %DRM_XE_GEM_CREATE_SET_PROPERTY_PXP_TYPE - set the type of PXP session
* this object will be used with. Valid values are listed in enum
@@ -862,8 +866,7 @@ struct drm_xe_gem_create {
#define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2)
#define DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION (1 << 3)
/**
- * @flags: Flags, currently a mask of memory instances of where BO can
- * be placed
+ * @flags: Flags for the GEM object, see DRM_XE_GEM_CREATE_FLAG_*
*/
__u32 flags;
@@ -888,7 +891,7 @@ struct drm_xe_gem_create {
#define DRM_XE_GEM_CPU_CACHING_WC 2
/**
* @cpu_caching: The CPU caching mode to select for this object. If
- * mmaping the object the mode selected here will also be used. The
+ * mmapping the object the mode selected here will also be used. The
* exception is when mapping system memory (including data evicted
* to system) on discrete GPUs. The caching mode selected will
* then be overridden to DRM_XE_GEM_CPU_CACHING_WB, and coherency
@@ -931,7 +934,7 @@ struct drm_xe_gem_create {
*
* err = ioctl(fd, DRM_IOCTL_XE_GEM_MMAP_OFFSET, &mmo);
* map = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, mmo.offset);
- * map[i] = 0xdeadbeaf; // issue barrier
+ * map[i] = 0xdeadbeef; // issue barrier
*/
struct drm_xe_gem_mmap_offset {
/** @extensions: Pointer to the first extension struct, if any */
@@ -958,8 +961,8 @@ struct drm_xe_gem_mmap_offset {
* - %DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE - Map the whole virtual address
* space of the VM to scratch page. A vm_bind would overwrite the scratch
* page mapping. This flag is mutually exclusive with the
- * %DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception of on x2 and
- * xe3 platform.
+ * %DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception on Xe2 and
+ * Xe3 platforms.
* - %DRM_XE_VM_CREATE_FLAG_LR_MODE - An LR, or Long Running VM accepts
* exec submissions to its exec_queues that don't have an upper time
* limit on the job execution time. But exec submissions to these
@@ -1045,7 +1048,7 @@ struct drm_xe_vm_destroy {
* set, no mappings are created rather the range is reserved for CPU address
* mirroring which will be populated on GPU page faults or prefetches. Only
* valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address
- * mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
+ * mirror flag is only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
* handle MBZ, and the BO offset MBZ.
* - %DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET - Can be used in combination with
* %DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR to reset madvises when the underlying
@@ -1061,6 +1064,7 @@ struct drm_xe_vm_destroy {
* not invoke autoreset. Neither will stack variables going out of scope.
* Therefore it's recommended to always explicitly reset the madvises when
* freeing the memory backing a region used in a &DRM_IOCTL_XE_MADVISE call.
+ *
* - %DRM_XE_VM_BIND_FLAG_DECOMPRESS - Request on-device decompression for a MAP.
* When set on a MAP bind operation, request the driver schedule an on-device
* in-place decompression (via the migrate/resolve path) for the GPU mapping
@@ -1109,7 +1113,7 @@ struct drm_xe_vm_bind_op {
* ppGTT WT -> COH_NONE
* ppGTT WB -> COH_AT_LEAST_1WAY
*
- * In practice UC/WC/WT should only ever used for scanout surfaces on
+ * In practice UC/WC/WT should only ever be used for scanout surfaces on
* such platforms (or perhaps in general for dma-buf if shared with
* another device) since it is only the display engine that is actually
* incoherent. Everything else should typically use WB given that we
@@ -1199,10 +1203,10 @@ struct drm_xe_vm_bind_op {
/**
* struct drm_xe_vm_bind - Input of &DRM_IOCTL_XE_VM_BIND
*
- * Below is an example of a minimal use of @drm_xe_vm_bind to
+ * Below is an example of a minimal use of &struct drm_xe_vm_bind to
* asynchronously bind the buffer `data` at address `BIND_ADDRESS` to
* illustrate `userptr`. It can be synchronized by using the example
- * provided for @drm_xe_sync.
+ * provided for &struct drm_xe_sync.
*
* .. code-block:: C
*
@@ -1355,7 +1359,7 @@ struct drm_xe_vm_get_property {
*
* This ioctl supports setting the following properties via the
* %DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY extension, which uses the
- * generic @drm_xe_ext_set_property struct:
+ * generic &struct drm_xe_ext_set_property:
*
* - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY - set the queue priority.
* CAP_SYS_NICE is required to set a value above normal.
@@ -1366,7 +1370,7 @@ struct drm_xe_vm_get_property {
* drm_xe_pxp_session_type. %DRM_XE_PXP_TYPE_NONE is the default behavior, so
* there is no need to explicitly set that. When a queue of type
* %DRM_XE_PXP_TYPE_HWDRM is created, the PXP default HWDRM session
- * (%XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if isn't already running.
+ * (%DRM_XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if it isn't already running.
* The user is expected to query the PXP status via the query ioctl (see
* %DRM_XE_DEVICE_QUERY_PXP_STATUS) and to wait for PXP to be ready before
* attempting to create a queue with this property. When a queue is created
@@ -1390,9 +1394,9 @@ struct drm_xe_vm_get_property {
* enable render color cache keying on BTP+BTI instead of just BTI
* (only valid for render queues).
*
- * The example below shows how to use @drm_xe_exec_queue_create to create
+ * The example below shows how to use &struct drm_xe_exec_queue_create to create
* a simple exec_queue (no parallel submission) of class
- * &DRM_XE_ENGINE_CLASS_RENDER.
+ * %DRM_XE_ENGINE_CLASS_RENDER.
*
* .. code-block:: C
*
@@ -1402,23 +1406,25 @@ struct drm_xe_vm_get_property {
* struct drm_xe_exec_queue_create exec_queue_create = {
* .extensions = 0,
* .vm_id = vm,
- * .num_bb_per_exec = 1,
- * .num_eng_per_bb = 1,
+ * .width = 1,
+ * .num_placements = 1,
* .instances = to_user_pointer(&instance),
* };
* ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create);
*
- * Allow users to provide a hint to kernel for cases demanding low latency
- * profile. Please note it will have impact on power consumption. User can
- * indicate low latency hint with flag while creating exec queue as
- * mentioned below,
+ * Allow users to provide a hint to kernel for cases demanding low latency
+ * profile. Please note it will have impact on power consumption. User can
+ * indicate low latency hint with flag while creating exec queue as
+ * mentioned below:
+ *
+ * .. code-block:: C
*
* struct drm_xe_exec_queue_create exec_queue_create = {
* .flags = DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT,
* .extensions = 0,
* .vm_id = vm,
- * .num_bb_per_exec = 1,
- * .num_eng_per_bb = 1,
+ * .width = 1,
+ * .num_placements = 1,
* .instances = to_user_pointer(&instance),
* };
* ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create);
@@ -1515,7 +1521,7 @@ struct drm_xe_exec_queue_get_property {
* and the @flags can be:
* - %DRM_XE_SYNC_FLAG_SIGNAL
*
- * A minimal use of @drm_xe_sync looks like this:
+ * A minimal use of &struct drm_xe_sync looks like this:
*
* .. code-block:: C
*
@@ -1546,7 +1552,7 @@ struct drm_xe_sync {
#define DRM_XE_SYNC_TYPE_SYNCOBJ 0x0
#define DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ 0x1
#define DRM_XE_SYNC_TYPE_USER_FENCE 0x2
- /** @type: Type of the this sync object */
+ /** @type: Type of this sync object */
__u32 type;
#define DRM_XE_SYNC_FLAG_SIGNAL (1 << 0)
@@ -1559,9 +1565,9 @@ struct drm_xe_sync {
/**
* @addr: Address of user fence. When sync is passed in via exec
- * IOCTL this is a GPU address in the VM. When sync passed in via
+ * IOCTL this is a GPU address in the VM. When sync is passed in via
* VM bind IOCTL this is a user pointer. In either case, it is
- * the users responsibility that this address is present and
+ * the user's responsibility that this address is present and
* mapped when the user fence is signalled. Must be qword
* aligned.
*/
@@ -1581,10 +1587,10 @@ struct drm_xe_sync {
/**
* struct drm_xe_exec - Input of &DRM_IOCTL_XE_EXEC
*
- * This is an example to use @drm_xe_exec for execution of the object
- * at BIND_ADDRESS (see example in @drm_xe_vm_bind) by an exec_queue
- * (see example in @drm_xe_exec_queue_create). It can be synchronized
- * by using the example provided for @drm_xe_sync.
+ * This is an example to use &struct drm_xe_exec for execution of the object
+ * at BIND_ADDRESS (see example in &struct drm_xe_vm_bind) by an exec_queue
+ * (see example in &struct drm_xe_exec_queue_create). It can be synchronized
+ * by using the example provided for &struct drm_xe_sync.
*
* .. code-block:: C
*
@@ -1651,7 +1657,6 @@ struct drm_xe_exec {
*
* and the @flags can be:
* - %DRM_XE_UFENCE_WAIT_FLAG_ABSTIME
- * - %DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP
*
* The @mask values can be for example:
* - 0xffu for u8
@@ -1664,7 +1669,7 @@ struct drm_xe_wait_user_fence {
__u64 extensions;
/**
- * @addr: user pointer address to wait on, must qword aligned
+ * @addr: user pointer address to wait on, must be qword aligned
*/
__u64 addr;
@@ -1695,9 +1700,9 @@ struct drm_xe_wait_user_fence {
* Without DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag set (relative timeout)
* it contains timeout expressed in nanoseconds to wait (fence will
* expire at now() + timeout).
- * When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flat is set (absolute timeout) wait
- * will end at timeout (uses system MONOTONIC_CLOCK).
- * Passing negative timeout leads to neverending wait.
+ * When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag is set (absolute timeout) wait
+ * will end at timeout (uses system CLOCK_MONOTONIC).
+ * Passing negative timeout leads to never ending wait.
*
* On relative timeout this value is updated with timeout left
* (for restarting the call in case of signal delivery).
@@ -1741,7 +1746,7 @@ enum drm_xe_observation_op {
};
/**
- * struct drm_xe_observation_param - Input of &DRM_XE_OBSERVATION
+ * struct drm_xe_observation_param - Input of &DRM_IOCTL_XE_OBSERVATION
*
* The observation layer enables multiplexing observation streams of
* multiple types. The actual params for a particular stream operation are
@@ -1751,25 +1756,25 @@ enum drm_xe_observation_op {
struct drm_xe_observation_param {
/** @extensions: Pointer to the first extension struct, if any */
__u64 extensions;
- /** @observation_type: observation stream type, of enum @drm_xe_observation_type */
+ /** @observation_type: observation stream type, of &enum drm_xe_observation_type */
__u64 observation_type;
- /** @observation_op: observation stream op, of enum @drm_xe_observation_op */
+ /** @observation_op: observation stream op, of &enum drm_xe_observation_op */
__u64 observation_op;
/** @param: Pointer to actual stream params */
__u64 param;
};
/**
- * enum drm_xe_observation_ioctls - Observation stream fd ioctl's
+ * enum drm_xe_observation_ioctls - Observation stream fd ioctls
*
* Information exchanged between userspace and kernel for observation fd
- * ioctl's is stream type specific
+ * ioctls is stream type specific
*/
enum drm_xe_observation_ioctls {
/** @DRM_XE_OBSERVATION_IOCTL_ENABLE: Enable data capture for an observation stream */
DRM_XE_OBSERVATION_IOCTL_ENABLE = _IO('i', 0x0),
- /** @DRM_XE_OBSERVATION_IOCTL_DISABLE: Disable data capture for a observation stream */
+ /** @DRM_XE_OBSERVATION_IOCTL_DISABLE: Disable data capture for an observation stream */
DRM_XE_OBSERVATION_IOCTL_DISABLE = _IO('i', 0x1),
/** @DRM_XE_OBSERVATION_IOCTL_CONFIG: Change observation stream configuration */
@@ -1812,7 +1817,7 @@ struct drm_xe_oa_unit {
/** @oa_unit_id: OA unit ID */
__u32 oa_unit_id;
- /** @oa_unit_type: OA unit type of @drm_xe_oa_unit_type */
+ /** @oa_unit_type: OA unit type of &enum drm_xe_oa_unit_type */
__u32 oa_unit_type;
/** @capabilities: OA capabilities bit-mask */
@@ -1875,7 +1880,7 @@ struct drm_xe_query_oa_units {
/** @pad: MBZ */
__u32 pad;
/**
- * @oa_units: struct @drm_xe_oa_unit array returned for this device.
+ * @oa_units: &struct drm_xe_oa_unit array returned for this device.
* Written below as a u64 array to avoid problems with nested flexible
* arrays with some compilers
*/
@@ -1902,24 +1907,24 @@ enum drm_xe_oa_format_type {
};
/**
- * enum drm_xe_oa_property_id - OA stream property id's
+ * enum drm_xe_oa_property_id - OA stream property IDs
*
- * Stream params are specified as a chain of @drm_xe_ext_set_property
- * struct's, with @property values from enum @drm_xe_oa_property_id and
- * @drm_xe_user_extension base.name set to @DRM_XE_OA_EXTENSION_SET_PROPERTY.
- * @param field in struct @drm_xe_observation_param points to the first
- * @drm_xe_ext_set_property struct.
+ * Stream params are specified as a chain of &struct drm_xe_ext_set_property
+ * structs, with property values from &enum drm_xe_oa_property_id and
+ * &struct drm_xe_user_extension base.name set to %DRM_XE_OA_EXTENSION_SET_PROPERTY.
+ * The param field in &struct drm_xe_observation_param points to the first
+ * &struct drm_xe_ext_set_property struct.
*
* Exactly the same mechanism is also used for stream reconfiguration using the
- * @DRM_XE_OBSERVATION_IOCTL_CONFIG observation stream fd ioctl, though only a
+ * %DRM_XE_OBSERVATION_IOCTL_CONFIG observation stream fd ioctl, though only a
* subset of properties below can be specified for stream reconfiguration.
*/
enum drm_xe_oa_property_id {
#define DRM_XE_OA_EXTENSION_SET_PROPERTY 0
/**
* @DRM_XE_OA_PROPERTY_OA_UNIT_ID: ID of the OA unit on which to open
- * the OA stream, see @oa_unit_id in 'struct
- * drm_xe_query_oa_units'. Defaults to 0 if not provided.
+ * the OA stream, see oa_unit_id in &struct drm_xe_oa_unit.
+ * Defaults to 0 if not provided.
*/
DRM_XE_OA_PROPERTY_OA_UNIT_ID = 1,
@@ -1932,7 +1937,7 @@ enum drm_xe_oa_property_id {
/**
* @DRM_XE_OA_PROPERTY_OA_METRIC_SET: OA metrics defining contents of OA
- * reports, previously added via @DRM_XE_OBSERVATION_OP_ADD_CONFIG.
+ * reports, previously added via %DRM_XE_OBSERVATION_OP_ADD_CONFIG.
*/
DRM_XE_OA_PROPERTY_OA_METRIC_SET,
@@ -1940,7 +1945,7 @@ enum drm_xe_oa_property_id {
DRM_XE_OA_PROPERTY_OA_FORMAT,
/*
* OA_FORMAT's are specified the same way as in PRM/Bspec 52198/60942,
- * in terms of the following quantities: a. enum @drm_xe_oa_format_type
+ * in terms of the following quantities: a. &enum drm_xe_oa_format_type
* b. Counter select c. Counter size and d. BC report. Also refer to the
* oa_formats array in drivers/gpu/drm/xe/xe_oa.c.
*/
@@ -1957,19 +1962,19 @@ enum drm_xe_oa_property_id {
/**
* @DRM_XE_OA_PROPERTY_OA_DISABLED: A value of 1 will open the OA
- * stream in a DISABLED state (see @DRM_XE_OBSERVATION_IOCTL_ENABLE).
+ * stream in a DISABLED state (see %DRM_XE_OBSERVATION_IOCTL_ENABLE).
*/
DRM_XE_OA_PROPERTY_OA_DISABLED,
/**
* @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID: Open the stream for a specific
- * @exec_queue_id. OA queries can be executed on this exec queue.
+ * exec_queue_id. OA queries can be executed on this exec queue.
*/
DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID,
/**
* @DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE: Optional engine instance to
- * pass along with @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
+ * pass along with %DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
*/
DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE,
@@ -1981,16 +1986,16 @@ enum drm_xe_oa_property_id {
/**
* @DRM_XE_OA_PROPERTY_NUM_SYNCS: Number of syncs in the sync array
- * specified in @DRM_XE_OA_PROPERTY_SYNCS
+ * specified in %DRM_XE_OA_PROPERTY_SYNCS
*/
DRM_XE_OA_PROPERTY_NUM_SYNCS,
/**
- * @DRM_XE_OA_PROPERTY_SYNCS: Pointer to struct @drm_xe_sync array
- * with array size specified via @DRM_XE_OA_PROPERTY_NUM_SYNCS. OA
+ * @DRM_XE_OA_PROPERTY_SYNCS: Pointer to &struct drm_xe_sync array
+ * with array size specified via %DRM_XE_OA_PROPERTY_NUM_SYNCS. OA
* configuration will wait till input fences signal. Output fences
* will signal after the new OA configuration takes effect. For
- * @DRM_XE_SYNC_TYPE_USER_FENCE, @addr is a user pointer, similar
+ * %DRM_XE_SYNC_TYPE_USER_FENCE, addr is a user pointer, similar
* to the VM bind case.
*/
DRM_XE_OA_PROPERTY_SYNCS,
@@ -2013,15 +2018,15 @@ enum drm_xe_oa_property_id {
/**
* struct drm_xe_oa_config - OA metric configuration
*
- * Multiple OA configs can be added using @DRM_XE_OBSERVATION_OP_ADD_CONFIG. A
+ * Multiple OA configs can be added using %DRM_XE_OBSERVATION_OP_ADD_CONFIG. A
* particular config can be specified when opening an OA stream using
- * @DRM_XE_OA_PROPERTY_OA_METRIC_SET property.
+ * %DRM_XE_OA_PROPERTY_OA_METRIC_SET property.
*/
struct drm_xe_oa_config {
/** @extensions: Pointer to the first extension struct, if any */
__u64 extensions;
- /** @uuid: String formatted like "%\08x-%\04x-%\04x-%\04x-%\012x" */
+ /** @uuid: String formatted like "%08x-%04x-%04x-%04x-%012x" */
char uuid[36];
/** @n_regs: Number of regs in @regs_ptr */
@@ -2036,7 +2041,7 @@ struct drm_xe_oa_config {
/**
* struct drm_xe_oa_stream_status - OA stream status returned from
- * @DRM_XE_OBSERVATION_IOCTL_STATUS observation stream fd ioctl. Userspace can
+ * %DRM_XE_OBSERVATION_IOCTL_STATUS observation stream fd ioctl. Userspace can
* call the ioctl to query stream status in response to EIO errno from
* observation fd read().
*/
@@ -2057,7 +2062,7 @@ struct drm_xe_oa_stream_status {
/**
* struct drm_xe_oa_stream_info - OA stream info returned from
- * @DRM_XE_OBSERVATION_IOCTL_INFO observation stream fd ioctl
+ * %DRM_XE_OBSERVATION_IOCTL_INFO observation stream fd ioctl
*/
struct drm_xe_oa_stream_info {
/** @extensions: Pointer to the first extension struct, if any */
@@ -2094,27 +2099,27 @@ enum drm_xe_pxp_session_type {
* enum drm_xe_eu_stall_property_id - EU stall sampling input property ids.
*
* These properties are passed to the driver at open as a chain of
- * @drm_xe_ext_set_property structures with @property set to these
- * properties' enums and @value set to the corresponding values of these
- * properties. @drm_xe_user_extension base.name should be set to
- * @DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY.
+ * &struct drm_xe_ext_set_property structures with property set to these
+ * properties' enums and value set to the corresponding values of these
+ * properties. &struct drm_xe_user_extension base.name should be set to
+ * %DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY.
*
* With the file descriptor obtained from open, user space must enable
- * the EU stall stream fd with @DRM_XE_OBSERVATION_IOCTL_ENABLE before
+ * the EU stall stream fd with %DRM_XE_OBSERVATION_IOCTL_ENABLE before
* calling read(). EIO errno from read() indicates HW dropped data
* due to full buffer.
*/
enum drm_xe_eu_stall_property_id {
#define DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY 0
/**
- * @DRM_XE_EU_STALL_PROP_GT_ID: @gt_id of the GT on which
+ * @DRM_XE_EU_STALL_PROP_GT_ID: gt_id of the GT on which
* EU stall data will be captured.
*/
DRM_XE_EU_STALL_PROP_GT_ID = 1,
/**
* @DRM_XE_EU_STALL_PROP_SAMPLE_RATE: Sampling rate in
- * GPU cycles from @sampling_rates in struct @drm_xe_query_eu_stall
+ * GPU cycles from sampling_rates in &struct drm_xe_query_eu_stall
*/
DRM_XE_EU_STALL_PROP_SAMPLE_RATE,
@@ -2129,9 +2134,9 @@ enum drm_xe_eu_stall_property_id {
/**
* struct drm_xe_query_eu_stall - Information about EU stall sampling.
*
- * If a query is made with a struct @drm_xe_device_query where .query
- * is equal to @DRM_XE_DEVICE_QUERY_EU_STALL, then the reply uses
- * struct @drm_xe_query_eu_stall in .data.
+ * If a query is made with a &struct drm_xe_device_query where .query
+ * is equal to %DRM_XE_DEVICE_QUERY_EU_STALL, then the reply uses
+ * &struct drm_xe_query_eu_stall in .data.
*/
struct drm_xe_query_eu_stall {
/** @extensions: Pointer to the first extension struct, if any */
@@ -2183,7 +2188,7 @@ struct drm_xe_query_eu_stall {
* .start = 0x100000,
* .range = 0x2000,
* .type = DRM_XE_MEM_RANGE_ATTR_ATOMIC,
- * .atomic_val = DRM_XE_ATOMIC_DEVICE,
+ * .atomic.val = DRM_XE_ATOMIC_DEVICE,
* };
*
* ioctl(fd, DRM_IOCTL_XE_MADVISE, &madvise);
@@ -2242,7 +2247,7 @@ struct drm_xe_madvise {
/**
* @preferred_mem_loc.region_instance : Region instance.
- * MBZ if @devmem_fd <= &DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE.
+ * MBZ if @devmem_fd <= %DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE.
* Otherwise should point to the desired device
* VRAM instance of the device indicated by
* @preferred_mem_loc.devmem_fd.
@@ -2369,24 +2374,19 @@ struct drm_xe_madvise {
};
/**
- * struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS
+ * struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
*
* This structure is provided by userspace and filled by KMD in response to the
- * DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS ioctl. It describes memory attributes of
- * a memory ranges within a user specified address range in a VM.
+ * DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS ioctl. It describes memory attributes of
+ * memory ranges within a user specified address range in a VM.
*
* The structure includes information such as atomic access policy,
* page attribute table (PAT) index, and preferred memory location.
* Userspace allocates an array of these structures and passes a pointer to the
- * ioctl to retrieve attributes for each memory ranges
- *
- * @extensions: Pointer to the first extension struct, if any
- * @start: Start address of the memory range
- * @end: End address of the virtual memory range
- *
+ * ioctl to retrieve attributes for each memory range.
*/
struct drm_xe_mem_range_attr {
- /** @extensions: Pointer to the first extension struct, if any */
+ /** @extensions: Pointer to the first extension struct, if any */
__u64 extensions;
/** @start: start of the memory range */
@@ -2413,7 +2413,7 @@ struct drm_xe_mem_range_attr {
__u32 reserved;
} atomic;
- /** @pat_index: Page attribute table index */
+ /** @pat_index: Page attribute table index */
struct {
/** @pat_index.val: PAT index */
__u32 val;
@@ -2427,7 +2427,7 @@ struct drm_xe_mem_range_attr {
};
/**
- * struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_ATTRIBUTES
+ * struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
*
* This structure is used to query memory attributes of memory regions
* within a user specified address range in a VM. It provides detailed
@@ -2435,15 +2435,15 @@ struct drm_xe_mem_range_attr {
* page attribute table (PAT) index, and preferred memory location.
*
* Userspace first calls the ioctl with @num_mem_ranges = 0,
- * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL to retrieve
+ * @sizeof_mem_range_attr = 0 and @vector_of_mem_attr = NULL to retrieve
* the number of memory regions and size of each memory range attribute.
* Then, it allocates a buffer of that size and calls the ioctl again to fill
* the buffer with memory range attributes.
*
* If second call fails with -ENOSPC, it means memory ranges changed between
* first call and now, retry IOCTL again with @num_mem_ranges = 0,
- * @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL followed by
- * Second ioctl call.
+ * @sizeof_mem_range_attr = 0 and @vector_of_mem_attr = NULL followed by
+ * second ioctl call.
*
* Example:
*
diff --git a/include/uapi/linux/atm_eni.h b/include/uapi/linux/atm_eni.h
deleted file mode 100644
index cf5bfd1a2691..000000000000
--- a/include/uapi/linux/atm_eni.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atm_eni.h - Driver-specific declarations of the ENI driver (for use by
- driver-specific utilities) */
-
-/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef LINUX_ATM_ENI_H
-#define LINUX_ATM_ENI_H
-
-#include <linux/atmioc.h>
-
-
-struct eni_multipliers {
- int tx,rx; /* values are in percent and must be > 100 */
-};
-
-
-#define ENI_MEMDUMP _IOW('a',ATMIOC_SARPRV,struct atmif_sioc)
- /* printk memory map */
-#define ENI_SETMULT _IOW('a',ATMIOC_SARPRV+7,struct atmif_sioc)
- /* set buffer multipliers */
-
-#endif
diff --git a/include/uapi/linux/atm_he.h b/include/uapi/linux/atm_he.h
deleted file mode 100644
index 9f4b43293988..000000000000
--- a/include/uapi/linux/atm_he.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atm_he.h */
-
-#ifndef LINUX_ATM_HE_H
-#define LINUX_ATM_HE_H
-
-#include <linux/atmioc.h>
-
-#define HE_GET_REG _IOW('a', ATMIOC_SARPRV, struct atmif_sioc)
-
-#define HE_REGTYPE_PCI 1
-#define HE_REGTYPE_RCM 2
-#define HE_REGTYPE_TCM 3
-#define HE_REGTYPE_MBOX 4
-
-struct he_ioctl_reg {
- unsigned addr, val;
- char type;
-};
-
-#endif /* LINUX_ATM_HE_H */
diff --git a/include/uapi/linux/atm_idt77105.h b/include/uapi/linux/atm_idt77105.h
deleted file mode 100644
index f0fd6912a14b..000000000000
--- a/include/uapi/linux/atm_idt77105.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atm_idt77105.h - Driver-specific declarations of the IDT77105 driver (for
- * use by driver-specific utilities) */
-
-/* Written 1999 by Greg Banks <gnb@linuxfan.com>. Copied from atm_suni.h. */
-
-
-#ifndef LINUX_ATM_IDT77105_H
-#define LINUX_ATM_IDT77105_H
-
-#include <linux/types.h>
-#include <linux/atmioc.h>
-#include <linux/atmdev.h>
-
-/*
- * Structure for IDT77105_GETSTAT and IDT77105_GETSTATZ ioctls.
- * Pointed to by `arg' in atmif_sioc.
- */
-struct idt77105_stats {
- __u32 symbol_errors; /* wire symbol errors */
- __u32 tx_cells; /* cells transmitted */
- __u32 rx_cells; /* cells received */
- __u32 rx_hec_errors; /* Header Error Check errors on receive */
-};
-
-#define IDT77105_GETSTAT _IOW('a',ATMIOC_PHYPRV+2,struct atmif_sioc) /* get stats */
-#define IDT77105_GETSTATZ _IOW('a',ATMIOC_PHYPRV+3,struct atmif_sioc) /* get stats and zero */
-
-#endif
diff --git a/include/uapi/linux/atm_nicstar.h b/include/uapi/linux/atm_nicstar.h
deleted file mode 100644
index 880d368b5b9a..000000000000
--- a/include/uapi/linux/atm_nicstar.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/******************************************************************************
- *
- * atm_nicstar.h
- *
- * Driver-specific declarations for use by NICSTAR driver specific utils.
- *
- * Author: Rui Prior
- *
- * (C) INESC 1998
- *
- ******************************************************************************/
-
-
-#ifndef LINUX_ATM_NICSTAR_H
-#define LINUX_ATM_NICSTAR_H
-
-/* Note: non-kernel programs including this file must also include
- * sys/types.h for struct timeval
- */
-
-#include <linux/atmapi.h>
-#include <linux/atmioc.h>
-
-#define NS_GETPSTAT _IOWR('a',ATMIOC_SARPRV+1,struct atmif_sioc)
- /* get pool statistics */
-#define NS_SETBUFLEV _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
- /* set buffer level markers */
-#define NS_ADJBUFLEV _IO('a',ATMIOC_SARPRV+3)
- /* adjust buffer level */
-
-typedef struct buf_nr
-{
- unsigned min;
- unsigned init;
- unsigned max;
-}buf_nr;
-
-
-typedef struct pool_levels
-{
- int buftype;
- int count; /* (At least for now) only used in NS_GETPSTAT */
- buf_nr level;
-} pool_levels;
-
-/* type must be one of the following: */
-#define NS_BUFTYPE_SMALL 1
-#define NS_BUFTYPE_LARGE 2
-#define NS_BUFTYPE_HUGE 3
-#define NS_BUFTYPE_IOVEC 4
-
-
-#endif /* LINUX_ATM_NICSTAR_H */
diff --git a/include/uapi/linux/atm_tcp.h b/include/uapi/linux/atm_tcp.h
deleted file mode 100644
index 7309e1bc8867..000000000000
--- a/include/uapi/linux/atm_tcp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atm_tcp.h - Driver-specific declarations of the ATMTCP driver (for use by
- driver-specific utilities) */
-
-/* Written 1997-2000 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef _UAPILINUX_ATM_TCP_H
-#define _UAPILINUX_ATM_TCP_H
-
-#include <linux/atmapi.h>
-#include <linux/atm.h>
-#include <linux/atmioc.h>
-#include <linux/types.h>
-
-
-/*
- * All values in struct atmtcp_hdr are in network byte order
- */
-
-struct atmtcp_hdr {
- __u16 vpi;
- __u16 vci;
- __u32 length; /* ... of data part */
-};
-
-/*
- * All values in struct atmtcp_command are in host byte order
- */
-
-#define ATMTCP_HDR_MAGIC (~0) /* this length indicates a command */
-#define ATMTCP_CTRL_OPEN 1 /* request/reply */
-#define ATMTCP_CTRL_CLOSE 2 /* request/reply */
-
-struct atmtcp_control {
- struct atmtcp_hdr hdr; /* must be first */
- int type; /* message type; both directions */
- atm_kptr_t vcc; /* both directions */
- struct sockaddr_atmpvc addr; /* suggested value from kernel */
- struct atm_qos qos; /* both directions */
- int result; /* to kernel only */
-} __ATM_API_ALIGN;
-
-/*
- * Field usage:
- * Messge type dir. hdr.v?i type addr qos vcc result
- * ----------- ---- ------- ---- ---- --- --- ------
- * OPEN K->D Y Y Y Y Y 0
- * OPEN D->K - Y Y Y Y Y
- * CLOSE K->D - - Y - Y 0
- * CLOSE D->K - - - - Y Y
- */
-
-#define SIOCSIFATMTCP _IO('a',ATMIOC_ITF) /* set ATMTCP mode */
-#define ATMTCP_CREATE _IO('a',ATMIOC_ITF+14) /* create persistent ATMTCP
- interface */
-#define ATMTCP_REMOVE _IO('a',ATMIOC_ITF+15) /* destroy persistent ATMTCP
- interface */
-
-
-
-#endif /* _UAPILINUX_ATM_TCP_H */
diff --git a/include/uapi/linux/atm_zatm.h b/include/uapi/linux/atm_zatm.h
deleted file mode 100644
index 5135027b93c1..000000000000
--- a/include/uapi/linux/atm_zatm.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atm_zatm.h - Driver-specific declarations of the ZATM driver (for use by
- driver-specific utilities) */
-
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef LINUX_ATM_ZATM_H
-#define LINUX_ATM_ZATM_H
-
-/*
- * Note: non-kernel programs including this file must also include
- * sys/types.h for struct timeval
- */
-
-#include <linux/atmapi.h>
-#include <linux/atmioc.h>
-
-#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
- /* get pool statistics */
-#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
- /* get statistics and zero */
-#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
- /* set pool parameters */
-
-struct zatm_pool_info {
- int ref_count; /* free buffer pool usage counters */
- int low_water,high_water; /* refill parameters */
- int rqa_count,rqu_count; /* queue condition counters */
- int offset,next_off; /* alignment optimizations: offset */
- int next_cnt,next_thres; /* repetition counter and threshold */
-};
-
-struct zatm_pool_req {
- int pool_num; /* pool number */
- struct zatm_pool_info info; /* actual information */
-};
-
-#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */
-#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */
-#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */
-#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
-
-#define ZATM_TIMER_HISTORY_SIZE 16 /* number of timer adjustments to
- record; must be 2^n */
-
-#endif
diff --git a/include/uapi/linux/atmarp.h b/include/uapi/linux/atmarp.h
deleted file mode 100644
index 8e44d121fde1..000000000000
--- a/include/uapi/linux/atmarp.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atmarp.h - ATM ARP protocol and kernel-demon interface definitions */
-
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef _LINUX_ATMARP_H
-#define _LINUX_ATMARP_H
-
-#include <linux/types.h>
-#include <linux/atmapi.h>
-#include <linux/atmioc.h>
-
-
-#define ATMARP_RETRY_DELAY 30 /* request next resolution or forget
- NAK after 30 sec - should go into
- atmclip.h */
-#define ATMARP_MAX_UNRES_PACKETS 5 /* queue that many packets while
- waiting for the resolver */
-
-
-#define ATMARPD_CTRL _IO('a',ATMIOC_CLIP+1) /* become atmarpd ctrl sock */
-#define ATMARP_MKIP _IO('a',ATMIOC_CLIP+2) /* attach socket to IP */
-#define ATMARP_SETENTRY _IO('a',ATMIOC_CLIP+3) /* fill or hide ARP entry */
-#define ATMARP_ENCAP _IO('a',ATMIOC_CLIP+5) /* change encapsulation */
-
-
-enum atmarp_ctrl_type {
- act_invalid, /* catch uninitialized structures */
- act_need, /* need address resolution */
- act_up, /* interface is coming up */
- act_down, /* interface is going down */
- act_change /* interface configuration has changed */
-};
-
-struct atmarp_ctrl {
- enum atmarp_ctrl_type type; /* message type */
- int itf_num;/* interface number (if present) */
- __be32 ip; /* IP address (act_need only) */
-};
-
-#endif
diff --git a/include/uapi/linux/atmclip.h b/include/uapi/linux/atmclip.h
deleted file mode 100644
index c818bb82b4e6..000000000000
--- a/include/uapi/linux/atmclip.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atmclip.h - Classical IP over ATM */
-
-/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef LINUX_ATMCLIP_H
-#define LINUX_ATMCLIP_H
-
-#include <linux/sockios.h>
-#include <linux/atmioc.h>
-
-
-#define RFC1483LLC_LEN 8 /* LLC+OUI+PID = 8 */
-#define RFC1626_MTU 9180 /* RFC1626 default MTU */
-
-#define CLIP_DEFAULT_IDLETIMER 1200 /* 20 minutes, see RFC1755 */
-#define CLIP_CHECK_INTERVAL 10 /* check every ten seconds */
-
-#define SIOCMKCLIP _IO('a',ATMIOC_CLIP) /* create IP interface */
-
-#endif
diff --git a/include/uapi/linux/atmdev.h b/include/uapi/linux/atmdev.h
index 20b0215084fc..a94e7b8360ee 100644
--- a/include/uapi/linux/atmdev.h
+++ b/include/uapi/linux/atmdev.h
@@ -60,14 +60,6 @@ struct atm_dev_stats {
/* get interface type name */
#define ATM_GETESI _IOW('a',ATMIOC_ITF+5,struct atmif_sioc)
/* get interface ESI */
-#define ATM_GETADDR _IOW('a',ATMIOC_ITF+6,struct atmif_sioc)
- /* get itf's local ATM addr. list */
-#define ATM_RSTADDR _IOW('a',ATMIOC_ITF+7,struct atmif_sioc)
- /* reset itf's ATM address list */
-#define ATM_ADDADDR _IOW('a',ATMIOC_ITF+8,struct atmif_sioc)
- /* add a local ATM address */
-#define ATM_DELADDR _IOW('a',ATMIOC_ITF+9,struct atmif_sioc)
- /* remove a local ATM address */
#define ATM_GETCIRANGE _IOW('a',ATMIOC_ITF+10,struct atmif_sioc)
/* get connection identifier range */
#define ATM_SETCIRANGE _IOW('a',ATMIOC_ITF+11,struct atmif_sioc)
@@ -76,12 +68,6 @@ struct atm_dev_stats {
/* set interface ESI */
#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
/* force interface ESI */
-#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
- /* register a LECS address */
-#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
- /* unregister a LECS address */
-#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
- /* retrieve LECS address(es) */
#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
/* get AAL layer statistics */
@@ -99,10 +85,6 @@ struct atm_dev_stats {
/* set backend handler */
#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
/* use backend to make new if */
-#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
- /* add party to p2mp call */
-#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
- /* drop party from p2mp call */
/*
* These are backend handkers that can be set via the ATM_SETBACKEND call
diff --git a/include/uapi/linux/atmlec.h b/include/uapi/linux/atmlec.h
deleted file mode 100644
index c68346bb40e6..000000000000
--- a/include/uapi/linux/atmlec.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * ATM Lan Emulation Daemon driver interface
- *
- * Marko Kiiskila <mkiiskila@yahoo.com>
- */
-
-#ifndef _ATMLEC_H_
-#define _ATMLEC_H_
-
-#include <linux/atmapi.h>
-#include <linux/atmioc.h>
-#include <linux/atm.h>
-#include <linux/if_ether.h>
-#include <linux/types.h>
-
-/* ATM lec daemon control socket */
-#define ATMLEC_CTRL _IO('a', ATMIOC_LANE)
-#define ATMLEC_DATA _IO('a', ATMIOC_LANE+1)
-#define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2)
-
-/* Maximum number of LEC interfaces (tweakable) */
-#define MAX_LEC_ITF 48
-
-typedef enum {
- l_set_mac_addr,
- l_del_mac_addr,
- l_svc_setup,
- l_addr_delete,
- l_topology_change,
- l_flush_complete,
- l_arp_update,
- l_narp_req, /* LANE2 mandates the use of this */
- l_config,
- l_flush_tran_id,
- l_set_lecid,
- l_arp_xmt,
- l_rdesc_arp_xmt,
- l_associate_req,
- l_should_bridge /* should we bridge this MAC? */
-} atmlec_msg_type;
-
-#define ATMLEC_MSG_TYPE_MAX l_should_bridge
-
-struct atmlec_config_msg {
- unsigned int maximum_unknown_frame_count;
- unsigned int max_unknown_frame_time;
- unsigned short max_retry_count;
- unsigned int aging_time;
- unsigned int forward_delay_time;
- unsigned int arp_response_time;
- unsigned int flush_timeout;
- unsigned int path_switching_delay;
- unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */
- int mtu;
- int is_proxy;
-};
-
-struct atmlec_msg {
- atmlec_msg_type type;
- int sizeoftlvs; /* LANE2: if != 0, tlvs follow */
- union {
- struct {
- unsigned char mac_addr[ETH_ALEN];
- unsigned char atm_addr[ATM_ESA_LEN];
- unsigned int flag; /*
- * Topology_change flag,
- * remoteflag, permanent flag,
- * lecid, transaction id
- */
- unsigned int targetless_le_arp; /* LANE2 */
- unsigned int no_source_le_narp; /* LANE2 */
- } normal;
- struct atmlec_config_msg config;
- struct {
- __u16 lec_id; /* requestor lec_id */
- __u32 tran_id; /* transaction id */
- unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */
- unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */
- } proxy; /*
- * For mapping LE_ARP requests to responses. Filled by
- * zeppelin, returned by kernel. Used only when proxying
- */
- } content;
-} __ATM_API_ALIGN;
-
-struct atmlec_ioc {
- int dev_num;
- unsigned char atm_addr[ATM_ESA_LEN];
- unsigned char receive; /* 1= receive vcc, 0 = send vcc */
-};
-#endif /* _ATMLEC_H_ */
diff --git a/include/uapi/linux/atmmpc.h b/include/uapi/linux/atmmpc.h
deleted file mode 100644
index cc17f4304839..000000000000
--- a/include/uapi/linux/atmmpc.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _ATMMPC_H_
-#define _ATMMPC_H_
-
-#include <linux/atmapi.h>
-#include <linux/atmioc.h>
-#include <linux/atm.h>
-#include <linux/types.h>
-
-#define ATMMPC_CTRL _IO('a', ATMIOC_MPOA)
-#define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1)
-
-#define MPC_SOCKET_INGRESS 1
-#define MPC_SOCKET_EGRESS 2
-
-struct atmmpc_ioc {
- int dev_num;
- __be32 ipaddr; /* the IP address of the shortcut */
- int type; /* ingress or egress */
-};
-
-typedef struct in_ctrl_info {
- __u8 Last_NHRP_CIE_code;
- __u8 Last_Q2931_cause_value;
- __u8 eg_MPC_ATM_addr[ATM_ESA_LEN];
- __be32 tag;
- __be32 in_dst_ip; /* IP address this ingress MPC sends packets to */
- __u16 holding_time;
- __u32 request_id;
-} in_ctrl_info;
-
-typedef struct eg_ctrl_info {
- __u8 DLL_header[256];
- __u8 DH_length;
- __be32 cache_id;
- __be32 tag;
- __be32 mps_ip;
- __be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */
- __u8 in_MPC_data_ATM_addr[ATM_ESA_LEN];
- __u16 holding_time;
-} eg_ctrl_info;
-
-struct mpc_parameters {
- __u16 mpc_p1; /* Shortcut-Setup Frame Count */
- __u16 mpc_p2; /* Shortcut-Setup Frame Time */
- __u8 mpc_p3[8]; /* Flow-detection Protocols */
- __u16 mpc_p4; /* MPC Initial Retry Time */
- __u16 mpc_p5; /* MPC Retry Time Maximum */
- __u16 mpc_p6; /* Hold Down Time */
-} ;
-
-struct k_message {
- __u16 type;
- __be32 ip_mask;
- __u8 MPS_ctrl[ATM_ESA_LEN];
- union {
- in_ctrl_info in_info;
- eg_ctrl_info eg_info;
- struct mpc_parameters params;
- } content;
- struct atm_qos qos;
-} __ATM_API_ALIGN;
-
-struct llc_snap_hdr {
- /* RFC 1483 LLC/SNAP encapsulation for routed IP PDUs */
- __u8 dsap; /* Destination Service Access Point (0xAA) */
- __u8 ssap; /* Source Service Access Point (0xAA) */
- __u8 ui; /* Unnumbered Information (0x03) */
- __u8 org[3]; /* Organizational identification (0x000000) */
- __u8 type[2]; /* Ether type (for IP) (0x0800) */
-};
-
-/* TLVs this MPC recognizes */
-#define TLV_MPOA_DEVICE_TYPE 0x00a03e2a
-
-/* MPOA device types in MPOA Device Type TLV */
-#define NON_MPOA 0
-#define MPS 1
-#define MPC 2
-#define MPS_AND_MPC 3
-
-
-/* MPC parameter defaults */
-
-#define MPC_P1 10 /* Shortcut-Setup Frame Count */
-#define MPC_P2 1 /* Shortcut-Setup Frame Time */
-#define MPC_P3 0 /* Flow-detection Protocols */
-#define MPC_P4 5 /* MPC Initial Retry Time */
-#define MPC_P5 40 /* MPC Retry Time Maximum */
-#define MPC_P6 160 /* Hold Down Time */
-#define HOLDING_TIME_DEFAULT 1200 /* same as MPS-p7 */
-
-/* MPC constants */
-
-#define MPC_C1 2 /* Retry Time Multiplier */
-#define MPC_C2 60 /* Initial Keep-Alive Lifetime */
-
-/* Message types - to MPOA daemon */
-
-#define SND_MPOA_RES_RQST 201
-#define SET_MPS_CTRL_ADDR 202
-#define SND_MPOA_RES_RTRY 203 /* Different type in a retry due to req id */
-#define STOP_KEEP_ALIVE_SM 204
-#define EGRESS_ENTRY_REMOVED 205
-#define SND_EGRESS_PURGE 206
-#define DIE 207 /* tell the daemon to exit() */
-#define DATA_PLANE_PURGE 208 /* Data plane purge because of egress cache hit miss or dead MPS */
-#define OPEN_INGRESS_SVC 209
-
-/* Message types - from MPOA daemon */
-
-#define MPOA_TRIGGER_RCVD 101
-#define MPOA_RES_REPLY_RCVD 102
-#define INGRESS_PURGE_RCVD 103
-#define EGRESS_PURGE_RCVD 104
-#define MPS_DEATH 105
-#define CACHE_IMPOS_RCVD 106
-#define SET_MPC_CTRL_ADDR 107 /* Our MPC's control ATM address */
-#define SET_MPS_MAC_ADDR 108
-#define CLEAN_UP_AND_EXIT 109
-#define SET_MPC_PARAMS 110 /* MPC configuration parameters */
-
-/* Message types - bidirectional */
-
-#define RELOAD 301 /* kill -HUP the daemon for reload */
-
-#endif /* _ATMMPC_H_ */
diff --git a/include/uapi/linux/atmsvc.h b/include/uapi/linux/atmsvc.h
deleted file mode 100644
index 137b5f853449..000000000000
--- a/include/uapi/linux/atmsvc.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/* atmsvc.h - ATM signaling kernel-demon interface definitions */
-
-/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef _LINUX_ATMSVC_H
-#define _LINUX_ATMSVC_H
-
-#include <linux/atmapi.h>
-#include <linux/atm.h>
-#include <linux/atmioc.h>
-
-
-#define ATMSIGD_CTRL _IO('a',ATMIOC_SPECIAL)
- /* become ATM signaling demon control socket */
-
-enum atmsvc_msg_type { as_catch_null, as_bind, as_connect, as_accept, as_reject,
- as_listen, as_okay, as_error, as_indicate, as_close,
- as_itf_notify, as_modify, as_identify, as_terminate,
- as_addparty, as_dropparty };
-
-struct atmsvc_msg {
- enum atmsvc_msg_type type;
- atm_kptr_t vcc;
- atm_kptr_t listen_vcc; /* indicate */
- int reply; /* for okay and close: */
- /* < 0: error before active */
- /* (sigd has discarded ctx) */
- /* ==0: success */
- /* > 0: error when active (still */
- /* need to close) */
- struct sockaddr_atmpvc pvc; /* indicate, okay (connect) */
- struct sockaddr_atmsvc local; /* local SVC address */
- struct atm_qos qos; /* QOS parameters */
- struct atm_sap sap; /* SAP */
- unsigned int session; /* for p2pm */
- struct sockaddr_atmsvc svc; /* SVC address */
-} __ATM_API_ALIGN;
-
-/*
- * Message contents: see ftp://icaftp.epfl.ch/pub/linux/atm/docs/isp-*.tar.gz
- */
-
-/*
- * Some policy stuff for atmsigd and for net/atm/svc.c. Both have to agree on
- * what PCR is used to request bandwidth from the device driver. net/atm/svc.c
- * tries to do better than that, but only if there's no routing decision (i.e.
- * if signaling only uses one ATM interface).
- */
-
-#define SELECT_TOP_PCR(tp) ((tp).pcr ? (tp).pcr : \
- (tp).max_pcr && (tp).max_pcr != ATM_MAX_PCR ? (tp).max_pcr : \
- (tp).min_pcr ? (tp).min_pcr : ATM_MAX_PCR)
-
-#endif
diff --git a/include/uapi/linux/batadv_packet.h b/include/uapi/linux/batadv_packet.h
index 439132a819ea..1241285b866c 100644
--- a/include/uapi/linux/batadv_packet.h
+++ b/include/uapi/linux/batadv_packet.h
@@ -518,16 +518,16 @@ struct batadv_mcast_packet {
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
+ * @first_ttvn: tt-version number of first included packet
* @first_source: original source of first included packet
* @first_orig_dest: original destination of first included packet
* @first_crc: checksum of first included packet
- * @first_ttvn: tt-version number of first included packet
* @second_ttl: ttl of second packet
+ * @second_ttvn: tt version number of second included packet
* @second_dest: second receiver of this coded packet
* @second_source: original source of second included packet
* @second_orig_dest: original destination of second included packet
* @second_crc: checksum of second included packet
- * @second_ttvn: tt version number of second included packet
* @coded_len: length of network coded part of the payload
*/
struct batadv_coded_packet {
@@ -554,8 +554,8 @@ struct batadv_coded_packet {
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
* @reserved: reserved field (for packet alignment)
- * @src: address of the source
* @dst: address of the destination
+ * @src: address of the source
* @tvlv_len: length of tvlv data following the unicast tvlv header
* @align: 2 bytes to align the header to a 4 byte boundary
*/
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 552bc5d9afbd..89b36de5fdbb 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -994,6 +994,7 @@ enum bpf_cmd {
BPF_PROG_STREAM_READ_BY_FD,
BPF_PROG_ASSOC_STRUCT_OPS,
__MAX_BPF_CMD,
+ BPF_COMMON_ATTRS = 1 << 16, /* Indicate carrying syscall common attrs. */
};
enum bpf_map_type {
@@ -1046,6 +1047,7 @@ enum bpf_map_type {
BPF_MAP_TYPE_CGRP_STORAGE,
BPF_MAP_TYPE_ARENA,
BPF_MAP_TYPE_INSN_ARRAY,
+ BPF_MAP_TYPE_RHASH,
__MAX_BPF_MAP_TYPE
};
@@ -1154,6 +1156,9 @@ enum bpf_attach_type {
BPF_TRACE_KPROBE_SESSION,
BPF_TRACE_UPROBE_SESSION,
BPF_TRACE_FSESSION,
+ BPF_TRACE_FENTRY_MULTI,
+ BPF_TRACE_FEXIT_MULTI,
+ BPF_TRACE_FSESSION_MULTI,
__MAX_BPF_ATTACH_TYPE
};
@@ -1178,6 +1183,7 @@ enum bpf_link_type {
BPF_LINK_TYPE_UPROBE_MULTI = 12,
BPF_LINK_TYPE_NETKIT = 13,
BPF_LINK_TYPE_SOCKMAP = 14,
+ BPF_LINK_TYPE_TRACING_MULTI = 15,
__MAX_BPF_LINK_TYPE,
};
@@ -1321,7 +1327,11 @@ enum {
* BPF_TRACE_UPROBE_MULTI attach type to create return probe.
*/
enum {
- BPF_F_UPROBE_MULTI_RETURN = (1U << 0)
+ /* Get return uprobe. */
+ BPF_F_UPROBE_MULTI_RETURN = (1U << 0),
+
+ /* Get path from provided path_fd. */
+ BPF_F_UPROBE_MULTI_PATH_FD = (1U << 1),
};
/* link_create.netfilter.flags used in LINK_CREATE command for
@@ -1500,6 +1510,13 @@ struct bpf_stack_build_id {
};
};
+struct bpf_common_attr {
+ __aligned_u64 log_buf;
+ __u32 log_size;
+ __u32 log_level;
+ __u32 log_true_size;
+};
+
#define BPF_OBJ_NAME_LEN 16U
enum {
@@ -1537,6 +1554,11 @@ union bpf_attr {
*
* BPF_MAP_TYPE_ARENA - contains the address where user space
* is going to mmap() the arena. It has to be page aligned.
+ *
+ * BPF_MAP_TYPE_RHASH - initial table size hint
+ * (nelem_hint). 0 = use rhashtable default. Must be
+ * <= min(max_entries, U16_MAX). Upper 32 bits reserved,
+ * must be zero.
*/
__u64 map_extra;
@@ -1846,6 +1868,7 @@ union bpf_attr {
__u32 cnt;
__u32 flags;
__u32 pid;
+ __u32 path_fd;
} uprobe_multi;
struct {
union {
@@ -1861,6 +1884,11 @@ union bpf_attr {
};
__u64 expected_revision;
} cgroup;
+ struct {
+ __aligned_u64 ids;
+ __aligned_u64 cookies;
+ __u32 cnt;
+ } tracing_multi;
};
} link_create;
@@ -6698,6 +6726,7 @@ struct bpf_prog_info {
__u32 verified_insns;
__u32 attach_btf_obj_id;
__u32 attach_btf_id;
+ __u32 :32;
} __attribute__((aligned(8)));
struct bpf_map_info {
@@ -6719,6 +6748,7 @@ struct bpf_map_info {
__u64 map_extra;
__aligned_u64 hash;
__u32 hash_size;
+ __u32 :32;
} __attribute__((aligned(8)));
struct bpf_btf_info {
diff --git a/include/uapi/linux/btf.h b/include/uapi/linux/btf.h
index 638615ebddc2..618167cab4e6 100644
--- a/include/uapi/linux/btf.h
+++ b/include/uapi/linux/btf.h
@@ -33,20 +33,22 @@ struct btf_header {
__u32 layout_len; /* length of layout section */
};
-/* Max # of type identifier */
-#define BTF_MAX_TYPE 0x000fffff
-/* Max offset into the string section */
-#define BTF_MAX_NAME_OFFSET 0x00ffffff
-/* Max # of struct/union/enum members or func args */
-#define BTF_MAX_VLEN 0xffff
+enum btf_max {
+ /* Max possible kind */
+ BTF_MAX_KIND = 0x0000007f,
+ /* Max # of type identifier */
+ BTF_MAX_TYPE = 0x000fffff,
+ /* Max offset into the string section */
+ BTF_MAX_NAME_OFFSET = 0x00ffffff,
+ /* Max # of struct/union/enum members or func args */
+ BTF_MAX_VLEN = 0x00ffffff,
+};
struct btf_type {
__u32 name_off;
/* "info" bits arrangement
- * bits 0-15: vlen (e.g. # of struct's members)
- * bits 16-23: unused
- * bits 24-28: kind (e.g. int, ptr, array...etc)
- * bits 29-30: unused
+ * bits 0-23: vlen (e.g. # of struct's members)
+ * bits 24-30: kind (e.g. int, ptr, array...etc)
* bit 31: kind_flag, currently used by
* struct, union, enum, fwd, enum64,
* decl_tag and type_tag
@@ -65,8 +67,8 @@ struct btf_type {
};
};
-#define BTF_INFO_KIND(info) (((info) >> 24) & 0x1f)
-#define BTF_INFO_VLEN(info) ((info) & 0xffff)
+#define BTF_INFO_KIND(info) (((info) >> 24) & 0x7f)
+#define BTF_INFO_VLEN(info) ((info) & 0xffffff)
#define BTF_INFO_KFLAG(info) ((info) >> 31)
enum {
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 9165154a274d..9b576603b3f1 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -1100,6 +1100,38 @@ enum btrfs_err_code {
BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
};
+/* Flags for struct btrfs_ioctl_get_csums_entry::type. */
+#define BTRFS_GET_CSUMS_HAS_CSUMS (1U << 0)
+#define BTRFS_GET_CSUMS_ZEROED (1U << 1)
+#define BTRFS_GET_CSUMS_NODATASUM (1U << 2)
+#define BTRFS_GET_CSUMS_COMPRESSED (1U << 3)
+#define BTRFS_GET_CSUMS_ENCRYPTED (1U << 4)
+#define BTRFS_GET_CSUMS_INLINE (1U << 5)
+
+struct btrfs_ioctl_get_csums_entry {
+ /* File offset of this range. */
+ __u64 offset;
+ /* Length in bytes. */
+ __u64 length;
+ /* One of BTRFS_GET_CSUMS_* types. */
+ __u32 type;
+ /* Padding, must be 0. */
+ __u32 reserved;
+};
+
+struct btrfs_ioctl_get_csums_args {
+ /* In/out: file offset in bytes. */
+ __u64 offset;
+ /* In/out: range length in bytes. */
+ __u64 length;
+ /* In/out: buffer capacity / bytes written. */
+ __u64 buf_size;
+ /* In: flags, must be 0 for now. */
+ __u64 flags;
+ /* Out: entries of type btrfs_ioctl_get_csums_entry + csum data */
+ __u8 buf[];
+};
+
/* Flags for IOC_SHUTDOWN, must match XFS_FSOP_GOING_FLAGS_* flags. */
#define BTRFS_SHUTDOWN_FLAGS_DEFAULT 0x0
#define BTRFS_SHUTDOWN_FLAGS_LOGFLUSH 0x1
@@ -1226,6 +1258,8 @@ enum btrfs_err_code {
struct btrfs_ioctl_encoded_io_args)
#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \
struct btrfs_ioctl_subvol_wait)
+#define BTRFS_IOC_GET_CSUMS _IOWR(BTRFS_IOCTL_MAGIC, 66, \
+ struct btrfs_ioctl_get_csums_args)
/* Shutdown ioctl should follow XFS's interfaces, thus not using btrfs magic. */
#define BTRFS_IOC_SHUTDOWN _IOR('X', 125, __u32)
diff --git a/include/uapi/linux/cec-funcs.h b/include/uapi/linux/cec-funcs.h
index 189ecf0e13cd..ba4b47de9bf0 100644
--- a/include/uapi/linux/cec-funcs.h
+++ b/include/uapi/linux/cec-funcs.h
@@ -1701,6 +1701,188 @@ static inline void cec_ops_request_current_latency(const struct cec_msg *msg,
}
+/* Latency Indication Protocol Feature */
+/* Only for CEC 2.0 and up */
+static inline void cec_msg_request_lip_support(struct cec_msg *msg,
+ int reply, __u16 phys_addr)
+{
+ msg->len = 4;
+ msg->msg[1] = CEC_MSG_REQUEST_LIP_SUPPORT;
+ msg->msg[2] = phys_addr >> 8;
+ msg->msg[3] = phys_addr & 0xff;
+ msg->reply = reply ? CEC_MSG_REPORT_LIP_SUPPORT : 0;
+}
+
+static inline void cec_ops_request_lip_support(const struct cec_msg *msg,
+ __u16 *phys_addr)
+{
+ *phys_addr = (msg->msg[2] << 8) | msg->msg[3];
+}
+
+static inline void cec_msg_report_lip_support(struct cec_msg *msg, __u32 sqid)
+{
+ msg->len = 6;
+ msg->msg[1] = CEC_MSG_REPORT_LIP_SUPPORT;
+ msg->msg[2] = sqid >> 24;
+ msg->msg[3] = (sqid >> 16) & 0xff;
+ msg->msg[4] = (sqid >> 8) & 0xff;
+ msg->msg[5] = sqid & 0xff;
+}
+
+static inline void cec_ops_report_lip_support(const struct cec_msg *msg,
+ __u32 *sqid)
+{
+ *sqid = (msg->msg[2] << 24) | (msg->msg[3] << 16) |
+ (msg->msg[4] << 8) | msg->msg[5];
+}
+
+static inline void cec_msg_request_audio_and_video_latency(struct cec_msg *msg,
+ int reply, __u8 video_format,
+ __u8 hdr_format, __u8 vrr_format,
+ __u8 audio_format,
+ __u8 audio_format_extension)
+{
+ msg->len = 6;
+ msg->msg[1] = CEC_MSG_REQUEST_AUDIO_AND_VIDEO_LATENCY;
+ msg->msg[2] = video_format;
+ msg->msg[3] = hdr_format;
+ msg->msg[4] = vrr_format;
+ msg->msg[5] = audio_format;
+ if (audio_format >= 1 && audio_format <= 31) {
+ msg->msg[6] = audio_format_extension;
+ msg->len++;
+ }
+ msg->reply = reply ? CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY : 0;
+}
+
+static inline void cec_ops_request_audio_and_video_latency(const struct cec_msg *msg,
+ __u8 *video_format,
+ __u8 *hdr_format,
+ __u8 *vrr_format,
+ __u8 *audio_format,
+ __u8 *audio_format_extension)
+{
+ *video_format = msg->msg[2];
+ *hdr_format = msg->msg[3];
+ *vrr_format = msg->msg[4];
+ *audio_format = msg->msg[5];
+ *audio_format_extension = msg->len > 6 ? msg->msg[6] : 0;
+}
+
+static inline void cec_msg_report_audio_and_video_latency(struct cec_msg *msg,
+ __u16 video_latency,
+ __u16 audio_latency)
+{
+ msg->len = 6;
+ msg->msg[1] = CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY;
+ msg->msg[2] = video_latency >> 8;
+ msg->msg[3] = video_latency & 0xff;
+ msg->msg[4] = audio_latency >> 8;
+ msg->msg[5] = audio_latency & 0xff;
+}
+
+static inline void cec_ops_report_audio_and_video_latency(const struct cec_msg *msg,
+ __u16 *video_latency,
+ __u16 *audio_latency)
+{
+ *video_latency = (msg->msg[2] << 8) | msg->msg[3];
+ *audio_latency = (msg->msg[4] << 8) | msg->msg[5];
+}
+
+static inline void cec_msg_request_audio_latency(struct cec_msg *msg,
+ int reply,
+ __u8 audio_format,
+ __u8 audio_format_extension)
+{
+ msg->len = 3;
+ msg->msg[1] = CEC_MSG_REQUEST_AUDIO_LATENCY;
+ msg->msg[2] = audio_format;
+ if (audio_format >= 1 && audio_format <= 31) {
+ msg->msg[3] = audio_format_extension;
+ msg->len++;
+ }
+ msg->reply = reply ? CEC_MSG_REPORT_AUDIO_LATENCY : 0;
+}
+
+static inline void cec_ops_request_audio_latency(const struct cec_msg *msg,
+ __u8 *audio_format,
+ __u8 *audio_format_extension)
+{
+ *audio_format = msg->msg[2];
+ *audio_format_extension = msg->len > 3 ? msg->msg[3] : 0;
+}
+
+static inline void cec_msg_report_audio_latency(struct cec_msg *msg,
+ __u16 audio_latency)
+{
+ msg->len = 4;
+ msg->msg[1] = CEC_MSG_REPORT_AUDIO_LATENCY;
+ msg->msg[2] = audio_latency >> 8;
+ msg->msg[3] = audio_latency & 0xff;
+}
+
+static inline void cec_ops_report_audio_latency(const struct cec_msg *msg,
+ __u16 *audio_latency)
+{
+ *audio_latency = (msg->msg[2] << 8) | msg->msg[3];
+}
+
+static inline void cec_msg_request_video_latency(struct cec_msg *msg,
+ int reply, __u8 video_format,
+ __u8 hdr_format,
+ __u8 vrr_format)
+{
+ msg->len = 5;
+ msg->msg[1] = CEC_MSG_REQUEST_VIDEO_LATENCY;
+ msg->msg[2] = video_format;
+ msg->msg[3] = hdr_format;
+ msg->msg[4] = vrr_format;
+ msg->reply = reply ? CEC_MSG_REPORT_VIDEO_LATENCY : 0;
+}
+
+static inline void cec_ops_request_video_latency(const struct cec_msg *msg,
+ __u8 *video_format,
+ __u8 *hdr_format,
+ __u8 *vrr_format)
+{
+ *video_format = msg->msg[2];
+ *hdr_format = msg->msg[3];
+ *vrr_format = msg->msg[4];
+}
+
+static inline void cec_msg_report_video_latency(struct cec_msg *msg,
+ __u16 video_latency)
+{
+ msg->len = 4;
+ msg->msg[1] = CEC_MSG_REPORT_VIDEO_LATENCY;
+ msg->msg[2] = video_latency >> 8;
+ msg->msg[3] = video_latency & 0xff;
+}
+
+static inline void cec_ops_report_video_latency(const struct cec_msg *msg,
+ __u16 *video_latency)
+{
+ *video_latency = (msg->msg[2] << 8) | msg->msg[3];
+}
+
+static inline void cec_msg_update_sqid(struct cec_msg *msg, __u32 sqid)
+{
+ msg->len = 6;
+ msg->msg[1] = CEC_MSG_UPDATE_SQID;
+ msg->msg[2] = sqid >> 24;
+ msg->msg[3] = (sqid >> 16) & 0xff;
+ msg->msg[4] = (sqid >> 8) & 0xff;
+ msg->msg[5] = sqid & 0xff;
+}
+
+static inline void cec_ops_update_sqid(const struct cec_msg *msg,
+ __u32 *sqid)
+{
+ *sqid = (msg->msg[2] << 24) | (msg->msg[3] << 16) |
+ (msg->msg[4] << 8) | msg->msg[5];
+}
+
+
/* Capability Discovery and Control Feature */
static inline void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg,
__u16 phys_addr1,
diff --git a/include/uapi/linux/cec.h b/include/uapi/linux/cec.h
index b2af1dddd4d7..81a05c9c0706 100644
--- a/include/uapi/linux/cec.h
+++ b/include/uapi/linux/cec.h
@@ -742,7 +742,7 @@ struct cec_event {
#define CEC_OP_PRIM_DEVTYPE_PROCESSOR 7
#define CEC_MSG_SET_MENU_LANGUAGE 0x32
-#define CEC_MSG_REPORT_FEATURES 0xa6 /* HDMI 2.0 */
+#define CEC_MSG_REPORT_FEATURES 0xa6 /* CEC 2.0 */
/* All Device Types Operand (all_device_types) */
#define CEC_OP_ALL_DEVTYPE_TV 0x80
#define CEC_OP_ALL_DEVTYPE_RECORD 0x40
@@ -777,7 +777,7 @@ struct cec_event {
#define CEC_OP_FEAT_DEV_SOURCE_HAS_ARC_RX 0x02
#define CEC_OP_FEAT_DEV_HAS_SET_AUDIO_VOLUME_LEVEL 0x01
-#define CEC_MSG_GIVE_FEATURES 0xa5 /* HDMI 2.0 */
+#define CEC_MSG_GIVE_FEATURES 0xa5 /* CEC 2.0 */
/* Deck Control Feature */
@@ -1067,7 +1067,7 @@ struct cec_event {
#define CEC_OP_AUD_FMT_ID_CEA861 0
#define CEC_OP_AUD_FMT_ID_CEA861_CXT 1
-#define CEC_MSG_SET_AUDIO_VOLUME_LEVEL 0x73
+#define CEC_MSG_SET_AUDIO_VOLUME_LEVEL 0x73 /* CEC 2.0 */
/* Audio Rate Control Feature */
#define CEC_MSG_SET_AUDIO_RATE 0x9a
@@ -1091,7 +1091,6 @@ struct cec_event {
/* Dynamic Audio Lipsync Feature */
-/* Only for CEC 2.0 and up */
#define CEC_MSG_REQUEST_CURRENT_LATENCY 0xa7
#define CEC_MSG_REPORT_CURRENT_LATENCY 0xa8
/* Low Latency Mode Operand (low_latency_mode) */
@@ -1104,6 +1103,30 @@ struct cec_event {
#define CEC_OP_AUD_OUT_COMPENSATED_PARTIAL_DELAY 3
+/* Latency Indication Protocol Feature */
+#define CEC_MSG_REQUEST_LIP_SUPPORT 0x50 /* CEC 2.0 */
+#define CEC_MSG_REPORT_LIP_SUPPORT 0x51 /* CEC 2.0 */
+#define CEC_MSG_REQUEST_AUDIO_AND_VIDEO_LATENCY 0x52 /* CEC 2.0 */
+/* HDR Format Operand (hdr_format) */
+#define CEC_OP_HDR_FORMAT_GAMMA_SDR 0
+#define CEC_OP_HDR_FORMAT_GAMMA_HDR 1
+#define CEC_OP_HDR_FORMAT_PQ 2
+#define CEC_OP_HDR_FORMAT_HLG 3
+#define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_1 8
+#define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_2 9
+#define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_4 11
+#define CEC_OP_HDR_FORMAT_DV_SINK_LED 16
+#define CEC_OP_HDR_FORMAT_DV_SOURCE_LED 17
+#define CEC_OP_HDR_FORMAT_HDR10PLUS 24
+#define CEC_OP_HDR_FORMAT_ETSI_TS_103_433 32
+#define CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY 0x53 /* CEC 2.0 */
+#define CEC_MSG_REQUEST_AUDIO_LATENCY 0x54 /* CEC 2.0 */
+#define CEC_MSG_REPORT_AUDIO_LATENCY 0x55 /* CEC 2.0 */
+#define CEC_MSG_REQUEST_VIDEO_LATENCY 0x56 /* CEC 2.0 */
+#define CEC_MSG_REPORT_VIDEO_LATENCY 0x57 /* CEC 2.0 */
+#define CEC_MSG_UPDATE_SQID 0x58 /* CEC 2.0 */
+
+
/* Capability Discovery and Control Feature */
#define CEC_MSG_CDC_MESSAGE 0xf8
/* Ethernet-over-HDMI: nobody ever does this... */
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 0b165eac7619..ca713bcc47b9 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -406,6 +406,7 @@ enum devlink_var_attr_type {
DEVLINK_VAR_ATTR_TYPE_BINARY,
__DEVLINK_VAR_ATTR_TYPE_CUSTOM_BASE = 0x80,
/* Any possible custom types, unrelated to NLA_* values go below */
+ DEVLINK_VAR_ATTR_TYPE_U64_ARRAY,
};
enum devlink_attr {
diff --git a/include/uapi/linux/dpll.h b/include/uapi/linux/dpll.h
index 871685f7c353..55eaa82f5f98 100644
--- a/include/uapi/linux/dpll.h
+++ b/include/uapi/linux/dpll.h
@@ -109,10 +109,12 @@ enum dpll_clock_quality_level {
* enum dpll_type - type of dpll, valid values for DPLL_A_TYPE attribute
* @DPLL_TYPE_PPS: dpll produces Pulse-Per-Second signal
* @DPLL_TYPE_EEC: dpll drives the Ethernet Equipment Clock
+ * @DPLL_TYPE_GENERIC: generic dpll type for devices outside PPS/EEC classes
*/
enum dpll_type {
DPLL_TYPE_PPS = 1,
DPLL_TYPE_EEC,
+ DPLL_TYPE_GENERIC,
/* private: */
__DPLL_TYPE_MAX,
@@ -179,6 +181,28 @@ enum dpll_pin_state {
};
/**
+ * enum dpll_pin_operstate - defines possible operational states of a pin with
+ * respect to its parent DPLL device, valid values for DPLL_A_PIN_OPERSTATE
+ * attribute
+ * @DPLL_PIN_OPERSTATE_ACTIVE: pin is qualified and actively used by the DPLL
+ * @DPLL_PIN_OPERSTATE_STANDBY: pin is qualified but not actively used by the
+ * DPLL
+ * @DPLL_PIN_OPERSTATE_NO_SIGNAL: pin does not have a valid signal
+ * @DPLL_PIN_OPERSTATE_QUAL_FAILED: pin signal failed qualification (e.g.
+ * frequency or phase monitor)
+ */
+enum dpll_pin_operstate {
+ DPLL_PIN_OPERSTATE_ACTIVE = 1,
+ DPLL_PIN_OPERSTATE_STANDBY,
+ DPLL_PIN_OPERSTATE_NO_SIGNAL,
+ DPLL_PIN_OPERSTATE_QUAL_FAILED,
+
+ /* private: */
+ __DPLL_PIN_OPERSTATE_MAX,
+ DPLL_PIN_OPERSTATE_MAX = (__DPLL_PIN_OPERSTATE_MAX - 1)
+};
+
+/**
* enum dpll_pin_capabilities - defines possible capabilities of a pin, valid
* flags on DPLL_A_PIN_CAPABILITIES attribute
* @DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE: pin direction can be changed
@@ -257,6 +281,7 @@ enum dpll_a_pin {
DPLL_A_PIN_PHASE_ADJUST_GRAN,
DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT,
DPLL_A_PIN_MEASURED_FREQUENCY,
+ DPLL_A_PIN_OPERSTATE,
__DPLL_A_PIN_MAX,
DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
diff --git a/include/uapi/linux/drbd.h b/include/uapi/linux/drbd.h
new file mode 100644
index 000000000000..cf1ec3eb872f
--- /dev/null
+++ b/include/uapi/linux/drbd.h
@@ -0,0 +1,413 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
+/*
+ drbd.h
+ Kernel module for 2.6.x Kernels
+
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
+
+ Copyright (C) 2001-2008, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2008, Philipp Reisner <philipp.reisner@linbit.com>.
+ Copyright (C) 2001-2008, Lars Ellenberg <lars.ellenberg@linbit.com>.
+
+
+*/
+#ifndef _UAPI_LINUX_DRBD_H
+#define _UAPI_LINUX_DRBD_H
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
+enum drbd_io_error_p {
+ EP_PASS_ON, /* FIXME should the better be named "Ignore"? */
+ EP_CALL_HELPER,
+ EP_DETACH
+};
+
+enum drbd_fencing_p {
+ FP_NOT_AVAIL = -1, /* Not a policy */
+ FP_DONT_CARE = 0,
+ FP_RESOURCE,
+ FP_STONITH
+};
+
+enum drbd_disconnect_p {
+ DP_RECONNECT,
+ DP_DROP_NET_CONF,
+ DP_FREEZE_IO
+};
+
+enum drbd_after_sb_p {
+ ASB_DISCONNECT,
+ ASB_DISCARD_YOUNGER_PRI,
+ ASB_DISCARD_OLDER_PRI,
+ ASB_DISCARD_ZERO_CHG,
+ ASB_DISCARD_LEAST_CHG,
+ ASB_DISCARD_LOCAL,
+ ASB_DISCARD_REMOTE,
+ ASB_CONSENSUS,
+ ASB_DISCARD_SECONDARY,
+ ASB_CALL_HELPER,
+ ASB_VIOLENTLY
+};
+
+enum drbd_on_no_data {
+ OND_IO_ERROR,
+ OND_SUSPEND_IO
+};
+
+enum drbd_on_congestion {
+ OC_BLOCK,
+ OC_PULL_AHEAD,
+ OC_DISCONNECT,
+};
+
+enum drbd_read_balancing {
+ RB_PREFER_LOCAL,
+ RB_PREFER_REMOTE,
+ RB_ROUND_ROBIN,
+ RB_LEAST_PENDING,
+ RB_CONGESTED_REMOTE,
+ RB_32K_STRIPING,
+ RB_64K_STRIPING,
+ RB_128K_STRIPING,
+ RB_256K_STRIPING,
+ RB_512K_STRIPING,
+ RB_1M_STRIPING,
+};
+
+/* KEEP the order, do not delete or insert. Only append. */
+enum drbd_ret_code {
+ ERR_CODE_BASE = 100,
+ NO_ERROR = 101,
+ ERR_LOCAL_ADDR = 102,
+ ERR_PEER_ADDR = 103,
+ ERR_OPEN_DISK = 104,
+ ERR_OPEN_MD_DISK = 105,
+ ERR_DISK_NOT_BDEV = 107,
+ ERR_MD_NOT_BDEV = 108,
+ ERR_DISK_TOO_SMALL = 111,
+ ERR_MD_DISK_TOO_SMALL = 112,
+ ERR_BDCLAIM_DISK = 114,
+ ERR_BDCLAIM_MD_DISK = 115,
+ ERR_MD_IDX_INVALID = 116,
+ ERR_IO_MD_DISK = 118,
+ ERR_MD_INVALID = 119,
+ ERR_AUTH_ALG = 120,
+ ERR_AUTH_ALG_ND = 121,
+ ERR_NOMEM = 122,
+ ERR_DISCARD_IMPOSSIBLE = 123,
+ ERR_DISK_CONFIGURED = 124,
+ ERR_NET_CONFIGURED = 125,
+ ERR_MANDATORY_TAG = 126,
+ ERR_MINOR_INVALID = 127,
+ ERR_INTR = 129, /* EINTR */
+ ERR_RESIZE_RESYNC = 130,
+ ERR_NO_PRIMARY = 131,
+ ERR_RESYNC_AFTER = 132,
+ ERR_RESYNC_AFTER_CYCLE = 133,
+ ERR_PAUSE_IS_SET = 134,
+ ERR_PAUSE_IS_CLEAR = 135,
+ ERR_PACKET_NR = 137,
+ ERR_NO_DISK = 138,
+ ERR_NOT_PROTO_C = 139,
+ ERR_NOMEM_BITMAP = 140,
+ ERR_INTEGRITY_ALG = 141, /* DRBD 8.2 only */
+ ERR_INTEGRITY_ALG_ND = 142, /* DRBD 8.2 only */
+ ERR_CPU_MASK_PARSE = 143, /* DRBD 8.2 only */
+ ERR_CSUMS_ALG = 144, /* DRBD 8.2 only */
+ ERR_CSUMS_ALG_ND = 145, /* DRBD 8.2 only */
+ ERR_VERIFY_ALG = 146, /* DRBD 8.2 only */
+ ERR_VERIFY_ALG_ND = 147, /* DRBD 8.2 only */
+ ERR_CSUMS_RESYNC_RUNNING= 148, /* DRBD 8.2 only */
+ ERR_VERIFY_RUNNING = 149, /* DRBD 8.2 only */
+ ERR_DATA_NOT_CURRENT = 150,
+ ERR_CONNECTED = 151, /* DRBD 8.3 only */
+ ERR_PERM = 152,
+ ERR_NEED_APV_93 = 153,
+ ERR_STONITH_AND_PROT_A = 154,
+ ERR_CONG_NOT_PROTO_A = 155,
+ ERR_PIC_AFTER_DEP = 156,
+ ERR_PIC_PEER_DEP = 157,
+ ERR_RES_NOT_KNOWN = 158,
+ ERR_RES_IN_USE = 159,
+ ERR_MINOR_CONFIGURED = 160,
+ ERR_MINOR_OR_VOLUME_EXISTS = 161,
+ ERR_INVALID_REQUEST = 162,
+ ERR_NEED_APV_100 = 163,
+ ERR_NEED_ALLOW_TWO_PRI = 164,
+ ERR_MD_UNCLEAN = 165,
+ ERR_MD_LAYOUT_CONNECTED = 166,
+ ERR_MD_LAYOUT_TOO_BIG = 167,
+ ERR_MD_LAYOUT_TOO_SMALL = 168,
+ ERR_MD_LAYOUT_NO_FIT = 169,
+ ERR_IMPLICIT_SHRINK = 170,
+ /* insert new ones above this line */
+ AFTER_LAST_ERR_CODE
+};
+
+#define DRBD_PROT_A 1
+#define DRBD_PROT_B 2
+#define DRBD_PROT_C 3
+
+enum drbd_role {
+ R_UNKNOWN = 0,
+ R_PRIMARY = 1, /* role */
+ R_SECONDARY = 2, /* role */
+ R_MASK = 3,
+};
+
+/* The order of these constants is important.
+ * The lower ones (<C_WF_REPORT_PARAMS) indicate
+ * that there is no socket!
+ * >=C_WF_REPORT_PARAMS ==> There is a socket
+ */
+enum drbd_conns {
+ C_STANDALONE,
+ C_DISCONNECTING, /* Temporal state on the way to StandAlone. */
+ C_UNCONNECTED, /* >= C_UNCONNECTED -> inc_net() succeeds */
+
+ /* These temporal states are all used on the way
+ * from >= C_CONNECTED to Unconnected.
+ * The 'disconnect reason' states
+ * I do not allow to change between them. */
+ C_TIMEOUT,
+ C_BROKEN_PIPE,
+ C_NETWORK_FAILURE,
+ C_PROTOCOL_ERROR,
+ C_TEAR_DOWN,
+
+ C_WF_CONNECTION,
+ C_WF_REPORT_PARAMS, /* we have a socket */
+ C_CONNECTED, /* we have introduced each other */
+ C_STARTING_SYNC_S, /* starting full sync by admin request. */
+ C_STARTING_SYNC_T, /* starting full sync by admin request. */
+ C_WF_BITMAP_S,
+ C_WF_BITMAP_T,
+ C_WF_SYNC_UUID,
+
+ /* All SyncStates are tested with this comparison
+ * xx >= C_SYNC_SOURCE && xx <= C_PAUSED_SYNC_T */
+ C_SYNC_SOURCE,
+ C_SYNC_TARGET,
+ C_VERIFY_S,
+ C_VERIFY_T,
+ C_PAUSED_SYNC_S,
+ C_PAUSED_SYNC_T,
+
+ C_AHEAD,
+ C_BEHIND,
+
+ C_MASK = 31
+};
+
+enum drbd_disk_state {
+ D_DISKLESS,
+ D_ATTACHING, /* In the process of reading the meta-data */
+ D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */
+ /* when >= D_FAILED it is legal to access mdev->ldev */
+ D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */
+ D_INCONSISTENT,
+ D_OUTDATED,
+ D_UNKNOWN, /* Only used for the peer, never for myself */
+ D_CONSISTENT, /* Might be D_OUTDATED, might be D_UP_TO_DATE ... */
+ D_UP_TO_DATE, /* Only this disk state allows applications' IO ! */
+ D_MASK = 15
+};
+
+union drbd_state {
+/* According to gcc's docs is the ...
+ * The order of allocation of bit-fields within a unit (C90 6.5.2.1, C99 6.7.2.1).
+ * Determined by ABI.
+ * pointed out by Maxim Uvarov q<muvarov@ru.mvista.com>
+ * even though we transmit as "cpu_to_be32(state)",
+ * the offsets of the bitfields still need to be swapped
+ * on different endianness.
+ */
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ unsigned role:2 ; /* 3/4 primary/secondary/unknown */
+ unsigned peer:2 ; /* 3/4 primary/secondary/unknown */
+ unsigned conn:5 ; /* 17/32 cstates */
+ unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
+ unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
+ unsigned susp:1 ; /* 2/2 IO suspended no/yes (by user) */
+ unsigned aftr_isp:1 ; /* isp .. imposed sync pause */
+ unsigned peer_isp:1 ;
+ unsigned user_isp:1 ;
+ unsigned susp_nod:1 ; /* IO suspended because no data */
+ unsigned susp_fen:1 ; /* IO suspended because fence peer handler runs*/
+ unsigned _pad:9; /* 0 unused */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ unsigned _pad:9;
+ unsigned susp_fen:1 ;
+ unsigned susp_nod:1 ;
+ unsigned user_isp:1 ;
+ unsigned peer_isp:1 ;
+ unsigned aftr_isp:1 ; /* isp .. imposed sync pause */
+ unsigned susp:1 ; /* 2/2 IO suspended no/yes */
+ unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
+ unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
+ unsigned conn:5 ; /* 17/32 cstates */
+ unsigned peer:2 ; /* 3/4 primary/secondary/unknown */
+ unsigned role:2 ; /* 3/4 primary/secondary/unknown */
+#else
+# error "this endianness is not supported"
+#endif
+ };
+ unsigned int i;
+};
+
+enum drbd_state_rv {
+ SS_CW_NO_NEED = 4,
+ SS_CW_SUCCESS = 3,
+ SS_NOTHING_TO_DO = 2,
+ SS_SUCCESS = 1,
+ SS_UNKNOWN_ERROR = 0, /* Used to sleep longer in _drbd_request_state */
+ SS_TWO_PRIMARIES = -1,
+ SS_NO_UP_TO_DATE_DISK = -2,
+ SS_NO_LOCAL_DISK = -4,
+ SS_NO_REMOTE_DISK = -5,
+ SS_CONNECTED_OUTDATES = -6,
+ SS_PRIMARY_NOP = -7,
+ SS_RESYNC_RUNNING = -8,
+ SS_ALREADY_STANDALONE = -9,
+ SS_CW_FAILED_BY_PEER = -10,
+ SS_IS_DISKLESS = -11,
+ SS_DEVICE_IN_USE = -12,
+ SS_NO_NET_CONFIG = -13,
+ SS_NO_VERIFY_ALG = -14, /* drbd-8.2 only */
+ SS_NEED_CONNECTION = -15, /* drbd-8.2 only */
+ SS_LOWER_THAN_OUTDATED = -16,
+ SS_NOT_SUPPORTED = -17, /* drbd-8.2 only */
+ SS_IN_TRANSIENT_STATE = -18, /* Retry after the next state change */
+ SS_CONCURRENT_ST_CHG = -19, /* Concurrent cluster side state change! */
+ SS_O_VOL_PEER_PRI = -20,
+ SS_OUTDATE_WO_CONN = -21,
+ SS_AFTER_LAST_ERROR = -22, /* Keep this at bottom */
+};
+
+#define SHARED_SECRET_MAX 64
+
+#define MDF_CONSISTENT (1 << 0)
+#define MDF_PRIMARY_IND (1 << 1)
+#define MDF_CONNECTED_IND (1 << 2)
+#define MDF_FULL_SYNC (1 << 3)
+#define MDF_WAS_UP_TO_DATE (1 << 4)
+#define MDF_PEER_OUT_DATED (1 << 5)
+#define MDF_CRASHED_PRIMARY (1 << 6)
+#define MDF_AL_CLEAN (1 << 7)
+#define MDF_AL_DISABLED (1 << 8)
+
+#define MAX_PEERS 32
+
+enum drbd_uuid_index {
+ UI_CURRENT,
+ UI_BITMAP,
+ UI_HISTORY_START,
+ UI_HISTORY_END,
+ UI_SIZE, /* nl-packet: number of dirty bits */
+ UI_FLAGS, /* nl-packet: flags */
+ UI_EXTENDED_SIZE /* Everything. */
+};
+
+#define HISTORY_UUIDS MAX_PEERS
+
+#define DRBD_NL_UUIDS_SIZE (UI_SIZE * sizeof(__u64))
+#define DRBD_NL_HISTORY_UUIDS_SIZE (HISTORY_UUIDS * sizeof(__u64))
+
+enum drbd_timeout_flag {
+ UT_DEFAULT = 0,
+ UT_DEGRADED = 1,
+ UT_PEER_OUTDATED = 2,
+};
+
+enum drbd_notification_type {
+ NOTIFY_EXISTS,
+ NOTIFY_CREATE,
+ NOTIFY_CHANGE,
+ NOTIFY_DESTROY,
+ NOTIFY_CALL,
+ NOTIFY_RESPONSE,
+
+ NOTIFY_CONTINUES = 0x8000,
+ NOTIFY_FLAGS = NOTIFY_CONTINUES,
+};
+
+enum drbd_peer_state {
+ P_INCONSISTENT = 3,
+ P_OUTDATED = 4,
+ P_DOWN = 5,
+ P_PRIMARY = 6,
+ P_FENCING = 7,
+};
+
+#define UUID_JUST_CREATED ((__u64)4)
+
+enum write_ordering_e {
+ WO_NONE,
+ WO_DRAIN_IO,
+ WO_BDEV_FLUSH,
+ WO_BIO_BARRIER
+};
+
+/* magic numbers used in meta data and network packets */
+#define DRBD_MAGIC 0x83740267
+#define DRBD_MAGIC_BIG 0x835a
+#define DRBD_MAGIC_100 0x8620ec20
+
+#define DRBD_MD_MAGIC_07 (DRBD_MAGIC+3)
+#define DRBD_MD_MAGIC_08 (DRBD_MAGIC+4)
+#define DRBD_MD_MAGIC_84_UNCLEAN (DRBD_MAGIC+5)
+
+
+/* how I came up with this magic?
+ * base64 decode "actlog==" ;) */
+#define DRBD_AL_MAGIC 0x69cb65a2
+
+/* these are of type "int" */
+#define DRBD_MD_INDEX_INTERNAL -1
+#define DRBD_MD_INDEX_FLEX_EXT -2
+#define DRBD_MD_INDEX_FLEX_INT -3
+
+#define DRBD_CPU_MASK_SIZE 32
+
+/**
+ * struct drbd_genlmsghdr - DRBD specific header used in NETLINK_GENERIC requests
+ * @minor:
+ * For admin requests (user -> kernel): which minor device to operate on.
+ * For (unicast) replies or informational (broadcast) messages
+ * (kernel -> user): which minor device the information is about.
+ * If we do not operate on minors, but on connections or resources,
+ * the minor value shall be (~0), and the attribute DRBD_NLA_CFG_CONTEXT
+ * is used instead.
+ * @flags: possible operation modifiers (relevant only for user->kernel):
+ * DRBD_GENL_F_SET_DEFAULTS
+ * @volume:
+ * When creating a new minor (adding it to a resource), the resource needs
+ * to know which volume number within the resource this is supposed to be.
+ * The volume number corresponds to the same volume number on the remote side,
+ * whereas the minor number on the remote side may be different
+ * (union with flags).
+ * @ret_code: kernel->userland unicast cfg reply return code (union with flags);
+ */
+struct drbd_genlmsghdr {
+ __u32 minor;
+ union {
+ __u32 flags;
+ __s32 ret_code;
+ };
+};
+
+/* To be used in drbd_genlmsghdr.flags */
+enum {
+ DRBD_GENL_F_SET_DEFAULTS = 1,
+};
+
+enum drbd_state_info_bcast_reason {
+ SIB_GET_STATUS_REPLY = 1,
+ SIB_STATE_CHANGE = 2,
+ SIB_HELPER_PRE = 3,
+ SIB_HELPER_POST = 4,
+ SIB_SYNC_PROGRESS = 5,
+};
+
+#endif /* _UAPI_LINUX_DRBD_H */
diff --git a/include/uapi/linux/drbd_genl.h b/include/uapi/linux/drbd_genl.h
new file mode 100644
index 000000000000..8b25f08d8a90
--- /dev/null
+++ b/include/uapi/linux/drbd_genl.h
@@ -0,0 +1,359 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+
+#ifndef _UAPI_LINUX_DRBD_GENL_H
+#define _UAPI_LINUX_DRBD_GENL_H
+
+#define DRBD_FAMILY_NAME "drbd"
+#define DRBD_FAMILY_VERSION 1
+
+enum {
+ DRBD_NLA_CFG_REPLY = 1,
+ DRBD_NLA_CFG_CONTEXT,
+ DRBD_NLA_DISK_CONF,
+ DRBD_NLA_RESOURCE_OPTS,
+ DRBD_NLA_NET_CONF,
+ DRBD_NLA_SET_ROLE_PARMS,
+ DRBD_NLA_RESIZE_PARMS,
+ DRBD_NLA_STATE_INFO,
+ DRBD_NLA_START_OV_PARMS,
+ DRBD_NLA_NEW_C_UUID_PARMS,
+ DRBD_NLA_TIMEOUT_PARMS,
+ DRBD_NLA_DISCONNECT_PARMS,
+ DRBD_NLA_DETACH_PARMS,
+ DRBD_NLA_RESOURCE_INFO = 15,
+ DRBD_NLA_DEVICE_INFO,
+ DRBD_NLA_CONNECTION_INFO,
+ DRBD_NLA_PEER_DEVICE_INFO,
+ DRBD_NLA_RESOURCE_STATISTICS,
+ DRBD_NLA_DEVICE_STATISTICS,
+ DRBD_NLA_CONNECTION_STATISTICS,
+ DRBD_NLA_PEER_DEVICE_STATISTICS,
+ DRBD_NLA_NOTIFICATION_HEADER,
+ DRBD_NLA_HELPER,
+
+ __DRBD_NLA_MAX,
+ DRBD_NLA_MAX = (__DRBD_NLA_MAX - 1)
+};
+
+enum {
+ DRBD_A_DRBD_CFG_REPLY_INFO_TEXT = 1,
+
+ __DRBD_A_DRBD_CFG_REPLY_MAX,
+ DRBD_A_DRBD_CFG_REPLY_MAX = (__DRBD_A_DRBD_CFG_REPLY_MAX - 1)
+};
+
+enum {
+ DRBD_A_DRBD_CFG_CONTEXT_CTX_VOLUME = 1,
+ DRBD_A_DRBD_CFG_CONTEXT_CTX_RESOURCE_NAME,
+ DRBD_A_DRBD_CFG_CONTEXT_CTX_MY_ADDR,
+ DRBD_A_DRBD_CFG_CONTEXT_CTX_PEER_ADDR,
+
+ __DRBD_A_DRBD_CFG_CONTEXT_MAX,
+ DRBD_A_DRBD_CFG_CONTEXT_MAX = (__DRBD_A_DRBD_CFG_CONTEXT_MAX - 1)
+};
+
+enum {
+ DRBD_A_DISK_CONF_BACKING_DEV = 1,
+ DRBD_A_DISK_CONF_META_DEV,
+ DRBD_A_DISK_CONF_META_DEV_IDX,
+ DRBD_A_DISK_CONF_DISK_SIZE,
+ DRBD_A_DISK_CONF_MAX_BIO_BVECS,
+ DRBD_A_DISK_CONF_ON_IO_ERROR,
+ DRBD_A_DISK_CONF_FENCING,
+ DRBD_A_DISK_CONF_RESYNC_RATE,
+ DRBD_A_DISK_CONF_RESYNC_AFTER,
+ DRBD_A_DISK_CONF_AL_EXTENTS,
+ DRBD_A_DISK_CONF_C_PLAN_AHEAD,
+ DRBD_A_DISK_CONF_C_DELAY_TARGET,
+ DRBD_A_DISK_CONF_C_FILL_TARGET,
+ DRBD_A_DISK_CONF_C_MAX_RATE,
+ DRBD_A_DISK_CONF_C_MIN_RATE,
+ DRBD_A_DISK_CONF_DISK_BARRIER,
+ DRBD_A_DISK_CONF_DISK_FLUSHES,
+ DRBD_A_DISK_CONF_DISK_DRAIN,
+ DRBD_A_DISK_CONF_MD_FLUSHES,
+ DRBD_A_DISK_CONF_DISK_TIMEOUT,
+ DRBD_A_DISK_CONF_READ_BALANCING,
+ DRBD_A_DISK_CONF_AL_UPDATES = 23,
+ DRBD_A_DISK_CONF_DISCARD_ZEROES_IF_ALIGNED,
+ DRBD_A_DISK_CONF_RS_DISCARD_GRANULARITY,
+ DRBD_A_DISK_CONF_DISABLE_WRITE_SAME,
+
+ __DRBD_A_DISK_CONF_MAX,
+ DRBD_A_DISK_CONF_MAX = (__DRBD_A_DISK_CONF_MAX - 1)
+};
+
+enum {
+ DRBD_A_RES_OPTS_CPU_MASK = 1,
+ DRBD_A_RES_OPTS_ON_NO_DATA,
+
+ __DRBD_A_RES_OPTS_MAX,
+ DRBD_A_RES_OPTS_MAX = (__DRBD_A_RES_OPTS_MAX - 1)
+};
+
+enum {
+ DRBD_A_NET_CONF_SHARED_SECRET = 1,
+ DRBD_A_NET_CONF_CRAM_HMAC_ALG,
+ DRBD_A_NET_CONF_INTEGRITY_ALG,
+ DRBD_A_NET_CONF_VERIFY_ALG,
+ DRBD_A_NET_CONF_CSUMS_ALG,
+ DRBD_A_NET_CONF_WIRE_PROTOCOL,
+ DRBD_A_NET_CONF_CONNECT_INT,
+ DRBD_A_NET_CONF_TIMEOUT,
+ DRBD_A_NET_CONF_PING_INT,
+ DRBD_A_NET_CONF_PING_TIMEO,
+ DRBD_A_NET_CONF_SNDBUF_SIZE,
+ DRBD_A_NET_CONF_RCVBUF_SIZE,
+ DRBD_A_NET_CONF_KO_COUNT,
+ DRBD_A_NET_CONF_MAX_BUFFERS,
+ DRBD_A_NET_CONF_MAX_EPOCH_SIZE,
+ DRBD_A_NET_CONF_UNPLUG_WATERMARK,
+ DRBD_A_NET_CONF_AFTER_SB_0P,
+ DRBD_A_NET_CONF_AFTER_SB_1P,
+ DRBD_A_NET_CONF_AFTER_SB_2P,
+ DRBD_A_NET_CONF_RR_CONFLICT,
+ DRBD_A_NET_CONF_ON_CONGESTION,
+ DRBD_A_NET_CONF_CONG_FILL,
+ DRBD_A_NET_CONF_CONG_EXTENTS,
+ DRBD_A_NET_CONF_TWO_PRIMARIES,
+ DRBD_A_NET_CONF_DISCARD_MY_DATA,
+ DRBD_A_NET_CONF_TCP_CORK,
+ DRBD_A_NET_CONF_ALWAYS_ASBP,
+ DRBD_A_NET_CONF_TENTATIVE,
+ DRBD_A_NET_CONF_USE_RLE,
+ DRBD_A_NET_CONF_CSUMS_AFTER_CRASH_ONLY = 33,
+ DRBD_A_NET_CONF_SOCK_CHECK_TIMEO,
+
+ __DRBD_A_NET_CONF_MAX,
+ DRBD_A_NET_CONF_MAX = (__DRBD_A_NET_CONF_MAX - 1)
+};
+
+enum {
+ DRBD_A_SET_ROLE_PARMS_ASSUME_UPTODATE = 1,
+
+ __DRBD_A_SET_ROLE_PARMS_MAX,
+ DRBD_A_SET_ROLE_PARMS_MAX = (__DRBD_A_SET_ROLE_PARMS_MAX - 1)
+};
+
+enum {
+ DRBD_A_RESIZE_PARMS_RESIZE_SIZE = 1,
+ DRBD_A_RESIZE_PARMS_RESIZE_FORCE,
+ DRBD_A_RESIZE_PARMS_NO_RESYNC,
+ DRBD_A_RESIZE_PARMS_AL_STRIPES,
+ DRBD_A_RESIZE_PARMS_AL_STRIPE_SIZE,
+
+ __DRBD_A_RESIZE_PARMS_MAX,
+ DRBD_A_RESIZE_PARMS_MAX = (__DRBD_A_RESIZE_PARMS_MAX - 1)
+};
+
+enum {
+ DRBD_A_STATE_INFO_SIB_REASON = 1,
+ DRBD_A_STATE_INFO_CURRENT_STATE,
+ DRBD_A_STATE_INFO_CAPACITY,
+ DRBD_A_STATE_INFO_ED_UUID,
+ DRBD_A_STATE_INFO_PREV_STATE,
+ DRBD_A_STATE_INFO_NEW_STATE,
+ DRBD_A_STATE_INFO_UUIDS,
+ DRBD_A_STATE_INFO_DISK_FLAGS,
+ DRBD_A_STATE_INFO_BITS_TOTAL,
+ DRBD_A_STATE_INFO_BITS_OOS,
+ DRBD_A_STATE_INFO_BITS_RS_TOTAL,
+ DRBD_A_STATE_INFO_BITS_RS_FAILED,
+ DRBD_A_STATE_INFO_HELPER,
+ DRBD_A_STATE_INFO_HELPER_EXIT_CODE,
+ DRBD_A_STATE_INFO_SEND_CNT,
+ DRBD_A_STATE_INFO_RECV_CNT,
+ DRBD_A_STATE_INFO_READ_CNT,
+ DRBD_A_STATE_INFO_WRIT_CNT,
+ DRBD_A_STATE_INFO_AL_WRIT_CNT,
+ DRBD_A_STATE_INFO_BM_WRIT_CNT,
+ DRBD_A_STATE_INFO_AP_BIO_CNT,
+ DRBD_A_STATE_INFO_AP_PENDING_CNT,
+ DRBD_A_STATE_INFO_RS_PENDING_CNT,
+
+ __DRBD_A_STATE_INFO_MAX,
+ DRBD_A_STATE_INFO_MAX = (__DRBD_A_STATE_INFO_MAX - 1)
+};
+
+enum {
+ DRBD_A_START_OV_PARMS_OV_START_SECTOR = 1,
+ DRBD_A_START_OV_PARMS_OV_STOP_SECTOR,
+
+ __DRBD_A_START_OV_PARMS_MAX,
+ DRBD_A_START_OV_PARMS_MAX = (__DRBD_A_START_OV_PARMS_MAX - 1)
+};
+
+enum {
+ DRBD_A_NEW_C_UUID_PARMS_CLEAR_BM = 1,
+
+ __DRBD_A_NEW_C_UUID_PARMS_MAX,
+ DRBD_A_NEW_C_UUID_PARMS_MAX = (__DRBD_A_NEW_C_UUID_PARMS_MAX - 1)
+};
+
+enum {
+ DRBD_A_TIMEOUT_PARMS_TIMEOUT_TYPE = 1,
+
+ __DRBD_A_TIMEOUT_PARMS_MAX,
+ DRBD_A_TIMEOUT_PARMS_MAX = (__DRBD_A_TIMEOUT_PARMS_MAX - 1)
+};
+
+enum {
+ DRBD_A_DISCONNECT_PARMS_FORCE_DISCONNECT = 1,
+
+ __DRBD_A_DISCONNECT_PARMS_MAX,
+ DRBD_A_DISCONNECT_PARMS_MAX = (__DRBD_A_DISCONNECT_PARMS_MAX - 1)
+};
+
+enum {
+ DRBD_A_DETACH_PARMS_FORCE_DETACH = 1,
+
+ __DRBD_A_DETACH_PARMS_MAX,
+ DRBD_A_DETACH_PARMS_MAX = (__DRBD_A_DETACH_PARMS_MAX - 1)
+};
+
+enum {
+ DRBD_A_RESOURCE_INFO_RES_ROLE = 1,
+ DRBD_A_RESOURCE_INFO_RES_SUSP,
+ DRBD_A_RESOURCE_INFO_RES_SUSP_NOD,
+ DRBD_A_RESOURCE_INFO_RES_SUSP_FEN,
+
+ __DRBD_A_RESOURCE_INFO_MAX,
+ DRBD_A_RESOURCE_INFO_MAX = (__DRBD_A_RESOURCE_INFO_MAX - 1)
+};
+
+enum {
+ DRBD_A_DEVICE_INFO_DEV_DISK_STATE = 1,
+
+ __DRBD_A_DEVICE_INFO_MAX,
+ DRBD_A_DEVICE_INFO_MAX = (__DRBD_A_DEVICE_INFO_MAX - 1)
+};
+
+enum {
+ DRBD_A_CONNECTION_INFO_CONN_CONNECTION_STATE = 1,
+ DRBD_A_CONNECTION_INFO_CONN_ROLE,
+
+ __DRBD_A_CONNECTION_INFO_MAX,
+ DRBD_A_CONNECTION_INFO_MAX = (__DRBD_A_CONNECTION_INFO_MAX - 1)
+};
+
+enum {
+ DRBD_A_PEER_DEVICE_INFO_PEER_REPL_STATE = 1,
+ DRBD_A_PEER_DEVICE_INFO_PEER_DISK_STATE,
+ DRBD_A_PEER_DEVICE_INFO_PEER_RESYNC_SUSP_USER,
+ DRBD_A_PEER_DEVICE_INFO_PEER_RESYNC_SUSP_PEER,
+ DRBD_A_PEER_DEVICE_INFO_PEER_RESYNC_SUSP_DEPENDENCY,
+
+ __DRBD_A_PEER_DEVICE_INFO_MAX,
+ DRBD_A_PEER_DEVICE_INFO_MAX = (__DRBD_A_PEER_DEVICE_INFO_MAX - 1)
+};
+
+enum {
+ DRBD_A_RESOURCE_STATISTICS_RES_STAT_WRITE_ORDERING = 1,
+
+ __DRBD_A_RESOURCE_STATISTICS_MAX,
+ DRBD_A_RESOURCE_STATISTICS_MAX = (__DRBD_A_RESOURCE_STATISTICS_MAX - 1)
+};
+
+enum {
+ DRBD_A_DEVICE_STATISTICS_DEV_SIZE = 1,
+ DRBD_A_DEVICE_STATISTICS_DEV_READ,
+ DRBD_A_DEVICE_STATISTICS_DEV_WRITE,
+ DRBD_A_DEVICE_STATISTICS_DEV_AL_WRITES,
+ DRBD_A_DEVICE_STATISTICS_DEV_BM_WRITES,
+ DRBD_A_DEVICE_STATISTICS_DEV_UPPER_PENDING,
+ DRBD_A_DEVICE_STATISTICS_DEV_LOWER_PENDING,
+ DRBD_A_DEVICE_STATISTICS_DEV_UPPER_BLOCKED,
+ DRBD_A_DEVICE_STATISTICS_DEV_LOWER_BLOCKED,
+ DRBD_A_DEVICE_STATISTICS_DEV_AL_SUSPENDED,
+ DRBD_A_DEVICE_STATISTICS_DEV_EXPOSED_DATA_UUID,
+ DRBD_A_DEVICE_STATISTICS_DEV_CURRENT_UUID,
+ DRBD_A_DEVICE_STATISTICS_DEV_DISK_FLAGS,
+ DRBD_A_DEVICE_STATISTICS_HISTORY_UUIDS,
+
+ __DRBD_A_DEVICE_STATISTICS_MAX,
+ DRBD_A_DEVICE_STATISTICS_MAX = (__DRBD_A_DEVICE_STATISTICS_MAX - 1)
+};
+
+enum {
+ DRBD_A_CONNECTION_STATISTICS_CONN_CONGESTED = 1,
+
+ __DRBD_A_CONNECTION_STATISTICS_MAX,
+ DRBD_A_CONNECTION_STATISTICS_MAX = (__DRBD_A_CONNECTION_STATISTICS_MAX - 1)
+};
+
+enum {
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_RECEIVED = 1,
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_SENT,
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_PENDING,
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_UNACKED,
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_OUT_OF_SYNC,
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_RESYNC_FAILED,
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_BITMAP_UUID,
+ DRBD_A_PEER_DEVICE_STATISTICS_PEER_DEV_FLAGS = 9,
+
+ __DRBD_A_PEER_DEVICE_STATISTICS_MAX,
+ DRBD_A_PEER_DEVICE_STATISTICS_MAX = (__DRBD_A_PEER_DEVICE_STATISTICS_MAX - 1)
+};
+
+enum {
+ DRBD_A_DRBD_NOTIFICATION_HEADER_NH_TYPE = 1,
+
+ __DRBD_A_DRBD_NOTIFICATION_HEADER_MAX,
+ DRBD_A_DRBD_NOTIFICATION_HEADER_MAX = (__DRBD_A_DRBD_NOTIFICATION_HEADER_MAX - 1)
+};
+
+enum {
+ DRBD_A_DRBD_HELPER_INFO_HELPER_NAME = 1,
+ DRBD_A_DRBD_HELPER_INFO_HELPER_STATUS,
+
+ __DRBD_A_DRBD_HELPER_INFO_MAX,
+ DRBD_A_DRBD_HELPER_INFO_MAX = (__DRBD_A_DRBD_HELPER_INFO_MAX - 1)
+};
+
+enum {
+ DRBD_ADM_EVENT = 1,
+ DRBD_ADM_GET_STATUS,
+ DRBD_ADM_NEW_MINOR = 5,
+ DRBD_ADM_DEL_MINOR,
+ DRBD_ADM_NEW_RESOURCE,
+ DRBD_ADM_DEL_RESOURCE,
+ DRBD_ADM_RESOURCE_OPTS,
+ DRBD_ADM_CONNECT,
+ DRBD_ADM_DISCONNECT,
+ DRBD_ADM_ATTACH,
+ DRBD_ADM_RESIZE,
+ DRBD_ADM_PRIMARY,
+ DRBD_ADM_SECONDARY,
+ DRBD_ADM_NEW_C_UUID,
+ DRBD_ADM_START_OV,
+ DRBD_ADM_DETACH,
+ DRBD_ADM_INVALIDATE,
+ DRBD_ADM_INVAL_PEER,
+ DRBD_ADM_PAUSE_SYNC,
+ DRBD_ADM_RESUME_SYNC,
+ DRBD_ADM_SUSPEND_IO,
+ DRBD_ADM_RESUME_IO,
+ DRBD_ADM_OUTDATE,
+ DRBD_ADM_GET_TIMEOUT_TYPE,
+ DRBD_ADM_DOWN,
+ DRBD_ADM_CHG_DISK_OPTS,
+ DRBD_ADM_CHG_NET_OPTS,
+ DRBD_ADM_GET_RESOURCES,
+ DRBD_ADM_GET_DEVICES,
+ DRBD_ADM_GET_CONNECTIONS,
+ DRBD_ADM_GET_PEER_DEVICES,
+ DRBD_ADM_RESOURCE_STATE,
+ DRBD_ADM_DEVICE_STATE,
+ DRBD_ADM_CONNECTION_STATE,
+ DRBD_ADM_PEER_DEVICE_STATE,
+ DRBD_ADM_GET_INITIAL_STATE,
+ DRBD_ADM_HELPER = 40,
+ DRBD_ADM_INITIAL_STATE_DONE,
+
+ __DRBD_ADM_MAX,
+ DRBD_ADM_MAX = (__DRBD_ADM_MAX - 1)
+};
+
+#define DRBD_MCGRP_EVENTS "events"
+
+#endif /* _UAPI_LINUX_DRBD_GENL_H */
diff --git a/include/uapi/linux/drbd_limits.h b/include/uapi/linux/drbd_limits.h
new file mode 100644
index 000000000000..acefe84bc602
--- /dev/null
+++ b/include/uapi/linux/drbd_limits.h
@@ -0,0 +1,251 @@
+/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
+/*
+ drbd_limits.h
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
+*/
+
+/*
+ * Our current limitations.
+ * Some of them are hard limits,
+ * some of them are arbitrary range limits, that make it easier to provide
+ * feedback about nonsense settings for certain configurable values.
+ */
+
+#ifndef _UAPI_LINUX_DRBD_LIMITS_H
+#define _UAPI_LINUX_DRBD_LIMITS_H
+
+#include <linux/drbd.h>
+
+#define DRBD_MINOR_COUNT_MIN 1U
+#define DRBD_MINOR_COUNT_MAX 255U
+#define DRBD_MINOR_COUNT_DEF 32U
+#define DRBD_MINOR_COUNT_SCALE '1'
+
+#define DRBD_VOLUME_MAX 65534U
+
+#define DRBD_DIALOG_REFRESH_MIN 0U
+#define DRBD_DIALOG_REFRESH_MAX 600U
+#define DRBD_DIALOG_REFRESH_SCALE '1'
+
+/* valid port number */
+#define DRBD_PORT_MIN 1U
+#define DRBD_PORT_MAX 0xffffU
+#define DRBD_PORT_SCALE '1'
+
+/* startup { */
+ /* if you want more than 3.4 days, disable */
+#define DRBD_WFC_TIMEOUT_MIN 0U
+#define DRBD_WFC_TIMEOUT_MAX 300000U
+#define DRBD_WFC_TIMEOUT_DEF 0U
+#define DRBD_WFC_TIMEOUT_SCALE '1'
+
+#define DRBD_DEGR_WFC_TIMEOUT_MIN 0U
+#define DRBD_DEGR_WFC_TIMEOUT_MAX 300000U
+#define DRBD_DEGR_WFC_TIMEOUT_DEF 0U
+#define DRBD_DEGR_WFC_TIMEOUT_SCALE '1'
+
+#define DRBD_OUTDATED_WFC_TIMEOUT_MIN 0U
+#define DRBD_OUTDATED_WFC_TIMEOUT_MAX 300000U
+#define DRBD_OUTDATED_WFC_TIMEOUT_DEF 0U
+#define DRBD_OUTDATED_WFC_TIMEOUT_SCALE '1'
+/* }*/
+
+/* net { */
+ /* timeout, unit centi seconds
+ * more than one minute timeout is not useful */
+#define DRBD_TIMEOUT_MIN 1U
+#define DRBD_TIMEOUT_MAX 600U
+#define DRBD_TIMEOUT_DEF 60U /* 6 seconds */
+#define DRBD_TIMEOUT_SCALE '1'
+
+ /* If backing disk takes longer than disk_timeout, mark the disk as failed */
+#define DRBD_DISK_TIMEOUT_MIN 0U /* 0 = disabled */
+#define DRBD_DISK_TIMEOUT_MAX 6000U /* 10 Minutes */
+#define DRBD_DISK_TIMEOUT_DEF 0U /* disabled */
+#define DRBD_DISK_TIMEOUT_SCALE '1'
+
+ /* active connection retries when C_WF_CONNECTION */
+#define DRBD_CONNECT_INT_MIN 1U
+#define DRBD_CONNECT_INT_MAX 120U
+#define DRBD_CONNECT_INT_DEF 10U /* seconds */
+#define DRBD_CONNECT_INT_SCALE '1'
+
+ /* keep-alive probes when idle */
+#define DRBD_PING_INT_MIN 1U
+#define DRBD_PING_INT_MAX 120U
+#define DRBD_PING_INT_DEF 10U
+#define DRBD_PING_INT_SCALE '1'
+
+ /* timeout for the ping packets.*/
+#define DRBD_PING_TIMEO_MIN 1U
+#define DRBD_PING_TIMEO_MAX 300U
+#define DRBD_PING_TIMEO_DEF 5U
+#define DRBD_PING_TIMEO_SCALE '1'
+
+ /* max number of write requests between write barriers */
+#define DRBD_MAX_EPOCH_SIZE_MIN 1U
+#define DRBD_MAX_EPOCH_SIZE_MAX 20000U
+#define DRBD_MAX_EPOCH_SIZE_DEF 2048U
+#define DRBD_MAX_EPOCH_SIZE_SCALE '1'
+
+ /* I don't think that a tcp send buffer of more than 10M is useful */
+#define DRBD_SNDBUF_SIZE_MIN 0U
+#define DRBD_SNDBUF_SIZE_MAX (10U<<20)
+#define DRBD_SNDBUF_SIZE_DEF 0U
+#define DRBD_SNDBUF_SIZE_SCALE '1'
+
+#define DRBD_RCVBUF_SIZE_MIN 0U
+#define DRBD_RCVBUF_SIZE_MAX (10U<<20)
+#define DRBD_RCVBUF_SIZE_DEF 0U
+#define DRBD_RCVBUF_SIZE_SCALE '1'
+
+ /* @4k PageSize -> 128kB - 512MB */
+#define DRBD_MAX_BUFFERS_MIN 32U
+#define DRBD_MAX_BUFFERS_MAX 131072U
+#define DRBD_MAX_BUFFERS_DEF 2048U
+#define DRBD_MAX_BUFFERS_SCALE '1'
+
+ /* @4k PageSize -> 4kB - 512MB */
+#define DRBD_UNPLUG_WATERMARK_MIN 1U
+#define DRBD_UNPLUG_WATERMARK_MAX 131072U
+#define DRBD_UNPLUG_WATERMARK_DEF (DRBD_MAX_BUFFERS_DEF/16)
+#define DRBD_UNPLUG_WATERMARK_SCALE '1'
+
+ /* 0 is disabled.
+ * 200 should be more than enough even for very short timeouts */
+#define DRBD_KO_COUNT_MIN 0U
+#define DRBD_KO_COUNT_MAX 200U
+#define DRBD_KO_COUNT_DEF 7U
+#define DRBD_KO_COUNT_SCALE '1'
+/* } */
+
+/* syncer { */
+ /* FIXME allow rate to be zero? */
+#define DRBD_RESYNC_RATE_MIN 1U
+/* channel bonding 10 GbE, or other hardware */
+#define DRBD_RESYNC_RATE_MAX (4 << 20)
+#define DRBD_RESYNC_RATE_DEF 250U
+#define DRBD_RESYNC_RATE_SCALE 'k' /* kilobytes */
+
+#define DRBD_AL_EXTENTS_MIN 67U
+ /* we use u16 as "slot number", (u16)~0 is "FREE".
+ * If you use >= 292 kB on-disk ring buffer,
+ * this is the maximum you can use: */
+#define DRBD_AL_EXTENTS_MAX 0xfffeU
+#define DRBD_AL_EXTENTS_DEF 1237U
+#define DRBD_AL_EXTENTS_SCALE '1'
+
+#define DRBD_MINOR_NUMBER_MIN -1
+#define DRBD_MINOR_NUMBER_MAX ((1 << 20) - 1)
+#define DRBD_MINOR_NUMBER_DEF -1
+#define DRBD_MINOR_NUMBER_SCALE '1'
+
+/* } */
+
+/* drbdsetup XY resize -d Z
+ * you are free to reduce the device size to nothing, if you want to.
+ * the upper limit with 64bit kernel, enough ram and flexible meta data
+ * is 1 PiB, currently. */
+/* DRBD_MAX_SECTORS */
+#define DRBD_DISK_SIZE_MIN 0LLU
+#define DRBD_DISK_SIZE_MAX (1LLU * (2LLU << 40))
+#define DRBD_DISK_SIZE_DEF 0LLU /* = disabled = no user size... */
+#define DRBD_DISK_SIZE_SCALE 's' /* sectors */
+
+#define DRBD_ON_IO_ERROR_DEF EP_DETACH
+#define DRBD_FENCING_DEF FP_DONT_CARE
+#define DRBD_AFTER_SB_0P_DEF ASB_DISCONNECT
+#define DRBD_AFTER_SB_1P_DEF ASB_DISCONNECT
+#define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT
+#define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT
+#define DRBD_ON_NO_DATA_DEF OND_IO_ERROR
+#define DRBD_ON_CONGESTION_DEF OC_BLOCK
+#define DRBD_READ_BALANCING_DEF RB_PREFER_LOCAL
+
+#define DRBD_MAX_BIO_BVECS_MIN 0U
+#define DRBD_MAX_BIO_BVECS_MAX 128U
+#define DRBD_MAX_BIO_BVECS_DEF 0U
+#define DRBD_MAX_BIO_BVECS_SCALE '1'
+
+#define DRBD_C_PLAN_AHEAD_MIN 0U
+#define DRBD_C_PLAN_AHEAD_MAX 300U
+#define DRBD_C_PLAN_AHEAD_DEF 20U
+#define DRBD_C_PLAN_AHEAD_SCALE '1'
+
+#define DRBD_C_DELAY_TARGET_MIN 1U
+#define DRBD_C_DELAY_TARGET_MAX 100U
+#define DRBD_C_DELAY_TARGET_DEF 10U
+#define DRBD_C_DELAY_TARGET_SCALE '1'
+
+#define DRBD_C_FILL_TARGET_MIN 0U
+#define DRBD_C_FILL_TARGET_MAX (1U<<20) /* 500MByte in sec */
+#define DRBD_C_FILL_TARGET_DEF 100U /* Try to place 50KiB in socket send buffer during resync */
+#define DRBD_C_FILL_TARGET_SCALE 's' /* sectors */
+
+#define DRBD_C_MAX_RATE_MIN 250U
+#define DRBD_C_MAX_RATE_MAX (4U << 20)
+#define DRBD_C_MAX_RATE_DEF 102400U
+#define DRBD_C_MAX_RATE_SCALE 'k' /* kilobytes */
+
+#define DRBD_C_MIN_RATE_MIN 0U
+#define DRBD_C_MIN_RATE_MAX (4U << 20)
+#define DRBD_C_MIN_RATE_DEF 250U
+#define DRBD_C_MIN_RATE_SCALE 'k' /* kilobytes */
+
+#define DRBD_CONG_FILL_MIN 0U
+#define DRBD_CONG_FILL_MAX (10U<<21) /* 10GByte in sectors */
+#define DRBD_CONG_FILL_DEF 0U
+#define DRBD_CONG_FILL_SCALE 's' /* sectors */
+
+#define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN
+#define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX
+#define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF
+#define DRBD_CONG_EXTENTS_SCALE DRBD_AL_EXTENTS_SCALE
+
+#define DRBD_PROTOCOL_DEF DRBD_PROT_C
+
+#define DRBD_DISK_BARRIER_DEF 0U
+#define DRBD_DISK_FLUSHES_DEF 1U
+#define DRBD_DISK_DRAIN_DEF 1U
+#define DRBD_MD_FLUSHES_DEF 1U
+#define DRBD_TCP_CORK_DEF 1U
+#define DRBD_AL_UPDATES_DEF 1U
+
+/* We used to ignore the discard_zeroes_data setting.
+ * To not change established (and expected) behaviour,
+ * by default assume that, for discard_zeroes_data=0,
+ * we can make that an effective discard_zeroes_data=1,
+ * if we only explicitly zero-out unaligned partial chunks. */
+#define DRBD_DISCARD_ZEROES_IF_ALIGNED_DEF 1U
+
+/* Some backends pretend to support WRITE SAME,
+ * but fail such requests when they are actually submitted.
+ * This is to tell DRBD to not even try. */
+#define DRBD_DISABLE_WRITE_SAME_DEF 0U
+
+#define DRBD_ALLOW_TWO_PRIMARIES_DEF 0U
+#define DRBD_ALWAYS_ASBP_DEF 0U
+#define DRBD_USE_RLE_DEF 1U
+#define DRBD_CSUMS_AFTER_CRASH_ONLY_DEF 0U
+
+#define DRBD_AL_STRIPES_MIN 1U
+#define DRBD_AL_STRIPES_MAX 1024U
+#define DRBD_AL_STRIPES_DEF 1U
+#define DRBD_AL_STRIPES_SCALE '1'
+
+#define DRBD_AL_STRIPE_SIZE_MIN 4U
+#define DRBD_AL_STRIPE_SIZE_MAX 16777216U
+#define DRBD_AL_STRIPE_SIZE_DEF 32U
+#define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */
+
+#define DRBD_SOCKET_CHECK_TIMEO_MIN 0U
+#define DRBD_SOCKET_CHECK_TIMEO_MAX DRBD_PING_TIMEO_MAX
+#define DRBD_SOCKET_CHECK_TIMEO_DEF 0U
+#define DRBD_SOCKET_CHECK_TIMEO_SCALE '1'
+
+#define DRBD_RS_DISCARD_GRANULARITY_MIN 0U
+#define DRBD_RS_DISCARD_GRANULARITY_MAX (1U<<20) /* 1MiByte */
+#define DRBD_RS_DISCARD_GRANULARITY_DEF 0U /* disabled by default */
+#define DRBD_RS_DISCARD_GRANULARITY_SCALE '1' /* bytes */
+
+#endif /* _UAPI_LINUX_DRBD_LIMITS_H */
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 1cdfb8341df2..a2091d4e00f3 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -291,6 +291,9 @@ enum phy_tunable_id {
ETHTOOL_PHY_DOWNSHIFT,
ETHTOOL_PHY_FAST_LINK_DOWN,
ETHTOOL_PHY_EDPD,
+ ETHTOOL_PHY_SHORT_CABLE_PRESET,
+ ETHTOOL_PHY_LPF_BW,
+ ETHTOOL_PHY_DSP_EQ_INIT_VALUE,
/*
* Add your fresh new phy tunable attribute above and remember to update
* phy_tunable_strings[] in net/ethtool/common.c
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index 13f71202845e..bd87262f2e34 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -254,6 +254,13 @@ struct file_attr {
#define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */
#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */
#define FS_XFLAG_VERITY 0x00020000 /* fs-verity enabled */
+/*
+ * Case handling flags (read-only, cannot be set via ioctl).
+ * Default (neither set) indicates POSIX semantics: case-sensitive
+ * lookups and case-preserving storage.
+ */
+#define FS_XFLAG_CASEFOLD 0x00040000 /* case-insensitive lookups */
+#define FS_XFLAG_CASENONPRESERVING 0x00080000 /* case not preserved */
#define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
/* the read-only stuff doesn't really belong here, but any other place is
@@ -388,7 +395,16 @@ struct file_attr {
#define FS_DAX_FL 0x02000000 /* Inode is DAX */
#define FS_INLINE_DATA_FL 0x10000000 /* Reserved for ext4 */
#define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */
-#define FS_CASEFOLD_FL 0x40000000 /* Folder is case insensitive */
+/*
+ * FS_CASEFOLD_FL indicates case-insensitive name lookup. The
+ * bit is most often reported on directories, where it controls
+ * lookups of entries within. Filesystems that derive
+ * case-insensitivity from mount or volume state may also report
+ * it on non-directory inodes; userspace must not assume the bit
+ * is directory-only. FS_XFLAG_CASEFOLD reports the same
+ * information read-only via FS_IOC_FSGETXATTR.
+ */
+#define FS_CASEFOLD_FL 0x40000000
#define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
#define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
diff --git a/include/uapi/linux/fsl_hypervisor.h b/include/uapi/linux/fsl_hypervisor.h
index 1e237fba951f..ab4388441e80 100644
--- a/include/uapi/linux/fsl_hypervisor.h
+++ b/include/uapi/linux/fsl_hypervisor.h
@@ -114,9 +114,9 @@ struct fsl_hv_ioctl_stop {
* @target: the partition ID of the target partition, or -1 for this
* partition
* @reserved: reserved, must be set to 0
- * @local_addr: user-space virtual address of a buffer in the local
+ * @local_vaddr: user-space virtual address of a buffer in the local
* partition
- * @remote_addr: guest physical address of a buffer in the
+ * @remote_paddr: guest physical address of a buffer in the
* remote partition
* @count: the number of bytes to copy. Both the local and remote
* buffers must be at least 'count' bytes long
diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h
index 7e2744ec8933..10a36c551675 100644
--- a/include/uapi/linux/futex.h
+++ b/include/uapi/linux/futex.h
@@ -25,23 +25,49 @@
#define FUTEX_PRIVATE_FLAG 128
#define FUTEX_CLOCK_REALTIME 256
-#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
-
-#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
-#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
-#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
-#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
-#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
-#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
-#define FUTEX_LOCK_PI2_PRIVATE (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG)
-#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
-#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
+#define FUTEX_ROBUST_UNLOCK 512
+#define FUTEX_ROBUST_LIST32 1024
+
+#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME | \
+ FUTEX_ROBUST_UNLOCK | FUTEX_ROBUST_LIST32)
+
+#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
+#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
+#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
+#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
+#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
+#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
+#define FUTEX_LOCK_PI2_PRIVATE (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG)
+#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
+#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
-#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \
- FUTEX_PRIVATE_FLAG)
-#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \
- FUTEX_PRIVATE_FLAG)
+#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
+#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
+
+/*
+ * Operations to unlock a futex, clear the robust list pending op pointer and
+ * wake waiters.
+ */
+#define FUTEX_UNLOCK_PI_LIST64 (FUTEX_UNLOCK_PI | FUTEX_ROBUST_UNLOCK)
+#define FUTEX_UNLOCK_PI_LIST64_PRIVATE (FUTEX_UNLOCK_PI_LIST64 | FUTEX_PRIVATE_FLAG)
+#define FUTEX_UNLOCK_PI_LIST32 (FUTEX_UNLOCK_PI | FUTEX_ROBUST_UNLOCK | \
+ FUTEX_ROBUST_LIST32)
+#define FUTEX_UNLOCK_PI_LIST32_PRIVATE (FUTEX_UNLOCK_PI_LIST32 | FUTEX_PRIVATE_FLAG)
+
+#define FUTEX_UNLOCK_WAKE_LIST64 (FUTEX_WAKE | FUTEX_ROBUST_UNLOCK)
+#define FUTEX_UNLOCK_WAKE_LIST64_PRIVATE (FUTEX_UNLOCK_WAKE_LIST64 | FUTEX_PRIVATE_FLAG)
+
+#define FUTEX_UNLOCK_WAKE_LIST32 (FUTEX_WAKE | FUTEX_ROBUST_UNLOCK | \
+ FUTEX_ROBUST_LIST32)
+#define FUTEX_UNLOCK_WAKE_LIST32_PRIVATE (FUTEX_UNLOCK_WAKE_LIST32 | FUTEX_PRIVATE_FLAG)
+
+#define FUTEX_UNLOCK_BITSET_LIST64 (FUTEX_WAKE_BITSET | FUTEX_ROBUST_UNLOCK)
+#define FUTEX_UNLOCK_BITSET_LIST64_PRIVATE (FUTEX_UNLOCK_BITSET_LIST64 | FUTEX_PRIVATE_FLAG)
+
+#define FUTEX_UNLOCK_BITSET_LIST32 (FUTEX_WAKE_BITSET | FUTEX_ROBUST_UNLOCK | \
+ FUTEX_ROBUST_LIST32)
+#define FUTEX_UNLOCK_BITSET_LIST32_PRIVATE (FUTEX_UNLOCK_BITSET_LIST32 | FUTEX_PRIVATE_FLAG)
/*
* Flags for futex2 syscalls.
@@ -177,6 +203,10 @@ struct robust_list_head {
*/
#define ROBUST_LIST_LIMIT 2048
+/* Modifiers for robust_list_head::list_op_pending */
+#define FUTEX_ROBUST_MOD_PI (0x1UL)
+#define FUTEX_ROBUST_MOD_MASK (FUTEX_ROBUST_MOD_PI)
+
/*
* bitset with all bits set for the FUTEX_xxx_BITSET OPs to request a
* match of any bit.
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
index e52f8207ab27..21a700c02ef7 100644
--- a/include/uapi/linux/if_bridge.h
+++ b/include/uapi/linux/if_bridge.h
@@ -526,6 +526,7 @@ enum {
BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS,
BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS,
BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS,
+ BRIDGE_VLANDB_ENTRY_NEIGH_FORWARD_GRAT,
__BRIDGE_VLANDB_ENTRY_MAX,
};
#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index df9d44a11540..1ffac52c39df 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -82,6 +82,7 @@
#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
#define ETH_P_LINK_CTL 0x886c /* HPNA, wlan link local tunnel */
+#define ETH_P_8021AC 0x8870 /* 802.1AC LLC > 1500 bytes */
#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
* over Ethernet
*/
@@ -123,6 +124,7 @@
#define ETH_P_DSA_A5PSW 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */
#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
+#define ETH_P_NXP_NETC 0xFD3A /* NXP NETC DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is more than this value
* then the frame is Ethernet II. Else it is 802.3 */
@@ -163,6 +165,10 @@
#define ETH_P_MCTP 0x00FA /* Management component transport
* protocol packets
*/
+#define ETH_P_GRE_OSI 0x00FE /* GRE tunnels: LLC "fe fe 03" analog,
+ * used primarily for IS-IS over GRE
+ * WARNING: not internal, used on wire!
+ */
/*
* This is an Ethernet frame header.
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 79ce4bc24cba..43cecca49f01 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -1085,6 +1085,22 @@ enum {
* Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS*
* is enabled for a given port.
*
+ * @IFLA_BRPORT_NEIGH_FORWARD_GRAT
+ * Controls whether gratuitous ARP packets and unsolicited Neighbor
+ * Advertisement packets are forwarded on a given port even when neighbor
+ * suppression is enabled.
+ * By default this flag is off, meaning gratuitous ARP and unsolicited NA
+ * packets will be suppressed when neighbor suppression is enabled.
+ * Setting this flag to on allows these packets to be forwarded even
+ * when *IFLA_BRPORT_NEIGH_SUPPRESS* or *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS*
+ * is enabled.
+ *
+ * Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS*
+ * or *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS* is enabled for a given port.
+ * When *IFLA_BRPORT_NEIGH_VLAN_SUPPRESS* is set, this port-level flag is
+ * ignored and per-VLAN control is available via
+ * *BRIDGE_VLANDB_ENTRY_NEIGH_FORWARD_GRAT*.
+ *
* @IFLA_BRPORT_BACKUP_NHID
* The FDB nexthop object ID to attach to packets being redirected to a
* backup port that has VLAN tunnel mapping enabled (via the
@@ -1137,6 +1153,7 @@ enum {
IFLA_BRPORT_MCAST_MAX_GROUPS,
IFLA_BRPORT_NEIGH_VLAN_SUPPRESS,
IFLA_BRPORT_BACKUP_NHID,
+ IFLA_BRPORT_NEIGH_FORWARD_GRAT,
__IFLA_BRPORT_MAX
};
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
@@ -1489,6 +1506,8 @@ enum {
IFLA_GENEVE_INNER_PROTO_INHERIT,
IFLA_GENEVE_PORT_RANGE,
IFLA_GENEVE_GRO_HINT,
+ IFLA_GENEVE_LOCAL,
+ IFLA_GENEVE_LOCAL6,
__IFLA_GENEVE_MAX
};
#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
@@ -1584,6 +1603,7 @@ enum {
IFLA_BOND_NS_IP6_TARGET,
IFLA_BOND_COUPLED_CONTROL,
IFLA_BOND_BROADCAST_NEIGH,
+ IFLA_BOND_LACP_STRICT,
__IFLA_BOND_MAX,
};
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index 6d269b844271..c9295c707041 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -53,6 +53,7 @@ enum iio_chan_type {
IIO_CHROMATICITY,
IIO_ATTENTION,
IIO_ALTCURRENT,
+ IIO_COVERAGE,
};
enum iio_modifier {
@@ -113,6 +114,7 @@ enum iio_modifier {
IIO_MOD_ACTIVE,
IIO_MOD_REACTIVE,
IIO_MOD_APPARENT,
+ IIO_MOD_QUATERNION_AXIS,
};
enum iio_event_type {
diff --git a/include/uapi/linux/io_uring/bpf_filter.h b/include/uapi/linux/io_uring/bpf_filter.h
index 1b461d792a7b..ce7d78ab13b3 100644
--- a/include/uapi/linux/io_uring/bpf_filter.h
+++ b/include/uapi/linux/io_uring/bpf_filter.h
@@ -27,6 +27,22 @@ struct io_uring_bpf_ctx {
__u64 mode;
__u64 resolve;
} open;
+ /*
+ * For CONNECT: fields are populated only when addr_len covers
+ * them; unpopulated fields are zero from the caller-side memset
+ * in io_uring_populate_bpf_ctx(). port and v4_addr are network
+ * byte order. Filters may only issue BPF_LD|BPF_W|BPF_ABS at
+ * 4-byte aligned offsets; load + mask for sub-word fields.
+ */
+ struct {
+ __u32 family; /* sa_family_t zero-extended */
+ __be16 port;
+ __u8 pad[2];
+ union {
+ __be32 v4_addr;
+ __u8 v6_addr[16];
+ };
+ } connect;
};
};
diff --git a/include/uapi/linux/io_uring/query.h b/include/uapi/linux/io_uring/query.h
index 95500759cc13..1a68eca7c6b4 100644
--- a/include/uapi/linux/io_uring/query.h
+++ b/include/uapi/linux/io_uring/query.h
@@ -23,6 +23,7 @@ enum {
IO_URING_QUERY_OPCODES = 0,
IO_URING_QUERY_ZCRX = 1,
IO_URING_QUERY_SCQ = 2,
+ IO_URING_QUERY_ZCRX_NOTIF = 3,
__IO_URING_QUERY_MAX,
};
@@ -62,6 +63,17 @@ struct io_uring_query_zcrx {
__u64 __resv2;
};
+struct io_uring_query_zcrx_notif {
+ /* Bitmask of supported ZCRX_NOTIF_* flags */
+ __u32 notif_flags;
+ /* Size of io_uring_zcrx_notif_stats */
+ __u32 notif_stats_size;
+ /* Required alignment for the stats struct within the region (ie stats_offset) */
+ __u32 notif_stats_off_alignment;
+ __u32 __resv1;
+ __u64 __resv2[4];
+};
+
struct io_uring_query_scq {
/* The SQ/CQ rings header size */
__u64 hdr_size;
diff --git a/include/uapi/linux/io_uring/zcrx.h b/include/uapi/linux/io_uring/zcrx.h
index 5ce02c7a6096..15c05c45ce36 100644
--- a/include/uapi/linux/io_uring/zcrx.h
+++ b/include/uapi/linux/io_uring/zcrx.h
@@ -65,6 +65,32 @@ enum zcrx_features {
* value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
*/
ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
+ ZCRX_FEATURE_NOTIFICATION = 1 << 1,
+};
+
+enum zcrx_notification_type {
+ ZCRX_NOTIF_NO_BUFFERS,
+ ZCRX_NOTIF_COPY,
+
+ __ZCRX_NOTIF_TYPE_LAST,
+};
+
+enum zcrx_notification_desc_flags {
+ /* If set, stats_offset holds a valid offset to a notif_stats struct */
+ ZCRX_NOTIF_DESC_FLAG_STATS = 1 << 0,
+};
+
+struct zcrx_notif_stats {
+ __u64 copy_count; /* cumulative copy-fallback CQEs */
+ __u64 copy_bytes; /* cumulative bytes copied */
+};
+
+struct zcrx_notification_desc {
+ __u64 user_data;
+ __u32 type_mask;
+ __u32 flags; /* see enum zcrx_notification_desc_flags */
+ __u64 stats_offset; /* offset from the beginning of refill ring region for stats */
+ __u64 __resv2[9];
};
/*
@@ -82,12 +108,14 @@ struct io_uring_zcrx_ifq_reg {
struct io_uring_zcrx_offsets offsets;
__u32 zcrx_id;
__u32 rx_buf_len;
- __u64 __resv[3];
+ __u64 notif_desc; /* see struct zcrx_notification_desc */
+ __u64 __resv[2];
};
enum zcrx_ctrl_op {
ZCRX_CTRL_FLUSH_RQ,
ZCRX_CTRL_EXPORT,
+ ZCRX_CTRL_ARM_NOTIFICATION,
__ZCRX_CTRL_LAST,
};
@@ -101,6 +129,11 @@ struct zcrx_ctrl_export {
__u32 __resv1[11];
};
+struct zcrx_ctrl_arm_notif {
+ __u32 notif_type;
+ __u32 __resv[11];
+};
+
struct zcrx_ctrl {
__u32 zcrx_id;
__u32 op; /* see enum zcrx_ctrl_op */
@@ -109,6 +142,7 @@ struct zcrx_ctrl {
union {
struct zcrx_ctrl_export zc_export;
struct zcrx_ctrl_flush_rq zc_flush;
+ struct zcrx_ctrl_arm_notif zc_arm_notif;
};
};
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index e998dfbd6960..0425d452d41e 100644
--- a/include/uapi/linux/iommufd.h
+++ b/include/uapi/linux/iommufd.h
@@ -224,13 +224,17 @@ struct iommu_ioas_map {
* @size: sizeof(struct iommu_ioas_map_file)
* @flags: same as for iommu_ioas_map
* @ioas_id: same as for iommu_ioas_map
- * @fd: the memfd to map
- * @start: byte offset from start of file to map from
+ * @fd: the memfd or supported dma-buf file to map
+ * @start: byte offset from start of the file to map from
* @length: same as for iommu_ioas_map
* @iova: same as for iommu_ioas_map
*
- * Set an IOVA mapping from a memfd file. All other arguments and semantics
- * match those of IOMMU_IOAS_MAP.
+ * Set an IOVA mapping from a memfd file. On kernels with dma-buf support,
+ * supported dma-buf files may also be accepted. This is not a generic
+ * dma-buf import path; currently supported dma-bufs include single-range
+ * VFIO PCI dma-bufs exported through VFIO_DEVICE_FEATURE_DMA_BUF, and
+ * other dma-bufs may be rejected. All other arguments and semantics match
+ * those of IOMMU_IOAS_MAP.
*/
struct iommu_ioas_map_file {
__u32 size;
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index e72359370857..9584b5aab727 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -48,9 +48,10 @@
* - 1.20 - Trap handler support for expert scheduling mode available
* - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions
* - 1.22 - Add queue creation with metadata ring base address
+ * - 1.23 - Add profiler control ioctl to enable/disable profiler on a process
*/
#define KFD_IOCTL_MAJOR_VERSION 1
-#define KFD_IOCTL_MINOR_VERSION 22
+#define KFD_IOCTL_MINOR_VERSION 23
struct kfd_ioctl_get_version_args {
__u32 major_version; /* from KFD */
@@ -1558,6 +1559,36 @@ struct kfd_ioctl_dbg_trap_args {
};
};
+#define KFD_IOC_PROFILER_VERSION_NUM 1
+enum kfd_profiler_ops {
+ KFD_IOC_PROFILER_PMC = 0,
+ KFD_IOC_PROFILER_VERSION = 2,
+ KFD_IOC_PROFILER_PTL_CONTROL = 3,
+};
+
+/**
+ * Enables/Disables GPU Specific profiler settings
+ */
+struct kfd_ioctl_pmc_settings {
+ __u32 gpu_id; /* This is the user_gpu_id */
+ __u32 lock; /* Lock GPU for Profiling */
+ __u32 perfcount_enable; /* Force Perfcount Enable for queues on GPU */
+};
+
+struct kfd_ioctl_ptl_control {
+ __u32 gpu_id; /* user_gpu_id */
+ __u32 enable; /* set 1 to enable PTL, set 0 to disable PTL */
+};
+
+struct kfd_ioctl_profiler_args {
+ __u32 op; /* kfd_profiler_op */
+ union {
+ struct kfd_ioctl_pmc_settings pmc;
+ struct kfd_ioctl_ptl_control ptl;
+ __u32 version; /* KFD_IOC_PROFILER_VERSION_NUM */
+ };
+};
+
#define AMDKFD_IOCTL_BASE 'K'
#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
#define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
@@ -1681,7 +1712,10 @@ struct kfd_ioctl_dbg_trap_args {
#define AMDKFD_IOC_CREATE_PROCESS \
AMDKFD_IO(0x27)
+#define AMDKFD_IOC_PROFILER \
+ AMDKFD_IOWR(0x28, struct kfd_ioctl_profiler_args)
+
#define AMDKFD_COMMAND_START 0x01
-#define AMDKFD_COMMAND_END 0x28
+#define AMDKFD_COMMAND_END 0x29
#endif
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 6c8afa2047bf..419011097fa8 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -996,6 +996,7 @@ struct kvm_enable_cap {
#define KVM_CAP_S390_USER_OPEREXEC 246
#define KVM_CAP_S390_KEYOP 247
#define KVM_CAP_S390_VSIE_ESAMODE 248
+#define KVM_CAP_S390_HPAGE_2G 249
struct kvm_irq_routing_irqchip {
__u32 irqchip;
diff --git a/include/uapi/linux/landlock.h b/include/uapi/linux/landlock.h
index 10a346e55e95..7ffe2ef127ee 100644
--- a/include/uapi/linux/landlock.h
+++ b/include/uapi/linux/landlock.h
@@ -32,6 +32,19 @@
* *handle* a wide range or all access rights that they know about at build time
* (and that they have tested with a kernel that supported them all).
*
+ * @quiet_access_fs and @quiet_access_net are bitmasks of actions for which a
+ * denial by this layer will not trigger a log if the corresponding object (or
+ * its children, for filesystem rules) is marked with the "quiet" bit via
+ * %LANDLOCK_ADD_RULE_QUIET, even if logging would normally take place per
+ * landlock_restrict_self() flags. @quiet_scoped is similar, except that it
+ * does not require marking any objects as quiet - if the ruleset is created
+ * with any bits set in @quiet_scoped, then denial of such scoped resources will
+ * not trigger any log. These 3 fields are available since Landlock ABI version
+ * 10.
+ *
+ * @quiet_access_fs, @quiet_access_net and @quiet_scoped must be a subset of
+ * @handled_access_fs, @handled_access_net and @scoped respectively.
+ *
* This structure can grow in future Landlock versions.
*/
struct landlock_ruleset_attr {
@@ -51,6 +64,20 @@ struct landlock_ruleset_attr {
* resources (e.g. IPCs).
*/
__u64 scoped;
+ /**
+ * @quiet_access_fs: Bitmask of filesystem actions which should not be
+ * logged if per-object quiet flag is set.
+ */
+ __u64 quiet_access_fs;
+ /**
+ * @quiet_access_net: Bitmask of network actions which should not be
+ * logged if per-object quiet flag is set.
+ */
+ __u64 quiet_access_net;
+ /**
+ * @quiet_scoped: Bitmask of scoped actions which should not be logged.
+ */
+ __u64 quiet_scoped;
};
/**
@@ -70,6 +97,39 @@ struct landlock_ruleset_attr {
/* clang-format on */
/**
+ * DOC: landlock_add_rule_flags
+ *
+ * **Flags**
+ *
+ * %LANDLOCK_ADD_RULE_QUIET
+ * Together with the quiet_* fields in struct landlock_ruleset_attr,
+ * this flag controls whether Landlock will log audit messages when
+ * access to the objects covered by this rule is denied by this layer.
+ *
+ * If logging is enabled, when Landlock denies an access, it will
+ * suppress the log if all of the following are true:
+ *
+ * - this layer is the innermost layer that denied the access;
+ * - all accesses denied by this layer are part of the quiet_* fields
+ * in the related struct landlock_ruleset_attr;
+ * - the object (or one of its parents, for filesystem rules) is
+ * marked as "quiet" via %LANDLOCK_ADD_RULE_QUIET.
+ *
+ * Because logging is only suppressed by a layer if the layer denies
+ * access, a sandboxed program cannot use this flag to "hide" access
+ * denials, without denying itself the access in the first place.
+ *
+ * The effect of this flag does not depend on the value of
+ * allowed_access in the passed in rule_attr. When this flag is
+ * present, the caller is also allowed to pass in an empty
+ * allowed_access.
+ */
+
+/* clang-format off */
+#define LANDLOCK_ADD_RULE_QUIET (1U << 0)
+/* clang-format on */
+
+/**
* DOC: landlock_restrict_self_flags
*
* **Flags**
@@ -200,10 +260,10 @@ struct landlock_net_port_attr {
* (also used for IPv6), and within that range, on a per-socket basis
* with ``setsockopt(IP_LOCAL_PORT_RANGE)``.
*
- * A Landlock rule with port 0 and the %LANDLOCK_ACCESS_NET_BIND_TCP
- * right means that requesting to bind on port 0 is allowed and it will
- * automatically translate to binding on a kernel-assigned ephemeral
- * port.
+ * A Landlock rule with port 0 and the %LANDLOCK_ACCESS_NET_BIND_TCP or
+ * %LANDLOCK_ACCESS_NET_BIND_UDP right means that requesting to bind on
+ * port 0 is allowed and it will automatically translate to binding on a
+ * kernel-assigned ephemeral port.
*/
__u64 port;
};
@@ -373,10 +433,39 @@ struct landlock_net_port_attr {
* port. Support added in Landlock ABI version 4.
* - %LANDLOCK_ACCESS_NET_CONNECT_TCP: Connect TCP sockets to the given
* remote port. Support added in Landlock ABI version 4.
+ *
+ * And similarly for UDP port numbers:
+ *
+ * - %LANDLOCK_ACCESS_NET_BIND_UDP: Bind UDP sockets to the given local
+ * port. Support added in Landlock ABI version 10.
+ * - %LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP: Set the remote port of UDP
+ * sockets to the given port, or send datagrams to the given remote port
+ * ignoring any destination pre-set on a socket. Support added in
+ * Landlock ABI version 10.
+ *
+ * .. note:: Setting a remote address or sending a first datagram
+ * auto-binds UDP sockets to an ephemeral local source port if not
+ * already bound. To allow this if both %LANDLOCK_ACCESS_NET_BIND_UDP
+ * and %LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP are handled, you need to
+ * either:
+ *
+ * - use a socket already bound to a port before the ruleset started
+ * being enforced;
+ * - or grant %LANDLOCK_ACCESS_NET_BIND_UDP on port 0, meaning "any
+ * port in the ephemeral port range";
+ * - or grant %LANDLOCK_ACCESS_NET_BIND_UDP on a specific port, and
+ * call :manpage:`bind(2)` on that port before trying to
+ * :manpage:`connect(2)` or send datagrams.
+ *
+ * .. note:: Sending datagrams to an ``AF_UNSPEC`` destination address
+ * family is not supported for IPv6 UDP sockets: you will need to use a
+ * ``NULL`` address instead.
*/
/* clang-format off */
#define LANDLOCK_ACCESS_NET_BIND_TCP (1ULL << 0)
#define LANDLOCK_ACCESS_NET_CONNECT_TCP (1ULL << 1)
+#define LANDLOCK_ACCESS_NET_BIND_UDP (1ULL << 2)
+#define LANDLOCK_ACCESS_NET_CONNECT_SEND_UDP (1ULL << 3)
/* clang-format on */
/**
diff --git a/include/uapi/linux/liveupdate.h b/include/uapi/linux/liveupdate.h
index 30bc66ee9436..4043d4038712 100644
--- a/include/uapi/linux/liveupdate.h
+++ b/include/uapi/linux/liveupdate.h
@@ -59,6 +59,7 @@ enum {
LIVEUPDATE_CMD_SESSION_PRESERVE_FD = LIVEUPDATE_CMD_SESSION_BASE,
LIVEUPDATE_CMD_SESSION_RETRIEVE_FD = 0x41,
LIVEUPDATE_CMD_SESSION_FINISH = 0x42,
+ LIVEUPDATE_CMD_SESSION_GET_NAME = 0x43,
};
/**
@@ -168,7 +169,9 @@ struct liveupdate_session_preserve_fd {
* associated with the token and populates the @fd field with a new file
* descriptor referencing the restored resource in the current (new) kernel.
* This operation must be performed *before* signaling completion via
- * %LIVEUPDATE_IOCTL_FINISH.
+ * %LIVEUPDATE_IOCTL_FINISH. If a retrieve of a token fails, subsequent
+ * attempts to retrieve the token fail with the same error code. Failed
+ * retrieves are not retried.
*
* Return: 0 on success, negative error code on failure (e.g., invalid token).
*/
@@ -213,4 +216,24 @@ struct liveupdate_session_finish {
#define LIVEUPDATE_SESSION_FINISH \
_IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_FINISH)
+/**
+ * struct liveupdate_session_get_name - ioctl(LIVEUPDATE_SESSION_GET_NAME)
+ * @size: Input; sizeof(struct liveupdate_session_get_name)
+ * @reserved: Input; Must be zero. Reserved for future use.
+ * @name: Output; A null-terminated string with the full session name.
+ *
+ * Retrieves the full name of the session associated with this file descriptor.
+ * This is useful because the kernel may truncate the name shown in /proc.
+ *
+ * Return: 0 on success, negative error code on failure.
+ */
+struct liveupdate_session_get_name {
+ __u32 size;
+ __u32 reserved;
+ __u8 name[LIVEUPDATE_SESSION_NAME_LENGTH];
+};
+
+#define LIVEUPDATE_SESSION_GET_NAME \
+ _IO(LIVEUPDATE_IOCTL_TYPE, LIVEUPDATE_CMD_SESSION_GET_NAME)
+
#endif /* _UAPI_LIVEUPDATE_H */
diff --git a/include/uapi/linux/llc.h b/include/uapi/linux/llc.h
index cf8806b14d5f..2ffd81f9cc01 100644
--- a/include/uapi/linux/llc.h
+++ b/include/uapi/linux/llc.h
@@ -3,13 +3,6 @@
* IEEE 802.2 User Interface SAPs for Linux, data structures and indicators.
*
* Copyright (c) 2001 by Jay Schulist <jschlst@samba.org>
- *
- * This program can be redistributed or modified under the terms of the
- * GNU General Public License as published by the Free Software Foundation.
- * This program is distributed without any warranty or implied warranty
- * of merchantability or fitness for a particular purpose.
- *
- * See the GNU General Public License for more details.
*/
#ifndef _UAPI__LINUX_LLC_H
#define _UAPI__LINUX_LLC_H
diff --git a/include/uapi/linux/mdio.h b/include/uapi/linux/mdio.h
index 8d769f100de6..b2541c948fc1 100644
--- a/include/uapi/linux/mdio.h
+++ b/include/uapi/linux/mdio.h
@@ -23,6 +23,10 @@
#define MDIO_MMD_DTEXS 5 /* DTE Extender Sublayer */
#define MDIO_MMD_TC 6 /* Transmission Convergence */
#define MDIO_MMD_AN 7 /* Auto-Negotiation */
+#define MDIO_MMD_SEP_PMA1 8 /* Separated PMA (1) */
+#define MDIO_MMD_SEP_PMA2 9 /* Separated PMA (2) */
+#define MDIO_MMD_SEP_PMA3 10 /* Separated PMA (3) */
+#define MDIO_MMD_SEP_PMA4 11 /* Separated PMA (4) */
#define MDIO_MMD_POWER_UNIT 13 /* PHY Power Unit */
#define MDIO_MMD_C22EXT 29 /* Clause 22 extension */
#define MDIO_MMD_VEND1 30 /* Vendor specific 1 */
@@ -63,6 +67,8 @@
* Lanes B-D are numbered 134-136. */
#define MDIO_PMA_10GBR_FSRT_CSR 147 /* 10GBASE-R fast retrain status and control */
#define MDIO_PMA_10GBR_FECABLE 170 /* 10GBASE-R FEC ability */
+#define MDIO_PMA_RSFEC_CTRL 200 /* RSFEC control */
+#define MDIO_PMA_RSFEC_LANE_MAP 206 /* RSFEC lane mapping */
#define MDIO_PCS_10GBX_STAT1 24 /* 10GBASE-X PCS status 1 */
#define MDIO_PCS_10GBRT_STAT1 32 /* 10GBASE-R/-T PCS status 1 */
#define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */
@@ -175,6 +181,10 @@
#define MDIO_DEVS_DTEXS MDIO_DEVS_PRESENT(MDIO_MMD_DTEXS)
#define MDIO_DEVS_TC MDIO_DEVS_PRESENT(MDIO_MMD_TC)
#define MDIO_DEVS_AN MDIO_DEVS_PRESENT(MDIO_MMD_AN)
+#define MDIO_DEVS_SEP_PMA1 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA1)
+#define MDIO_DEVS_SEP_PMA2 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA2)
+#define MDIO_DEVS_SEP_PMA3 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA3)
+#define MDIO_DEVS_SEP_PMA4 MDIO_DEVS_PRESENT(MDIO_MMD_SEP_PMA4)
#define MDIO_DEVS_C22EXT MDIO_DEVS_PRESENT(MDIO_MMD_C22EXT)
#define MDIO_DEVS_VEND1 MDIO_DEVS_PRESENT(MDIO_MMD_VEND1)
#define MDIO_DEVS_VEND2 MDIO_DEVS_PRESENT(MDIO_MMD_VEND2)
diff --git a/include/uapi/linux/netdev.h b/include/uapi/linux/netdev.h
index 7df1056a35fd..2f3ab75e8cc0 100644
--- a/include/uapi/linux/netdev.h
+++ b/include/uapi/linux/netdev.h
@@ -97,6 +97,8 @@ enum {
};
enum {
+ NETDEV_A_IO_URING_PROVIDER_INFO_RX_BUF_LEN = 1,
+
__NETDEV_A_IO_URING_PROVIDER_INFO_MAX,
NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1)
};
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h
index 56b6b60a814f..ee51045ae1d6 100644
--- a/include/uapi/linux/netfilter/nf_conntrack_common.h
+++ b/include/uapi/linux/netfilter/nf_conntrack_common.h
@@ -160,6 +160,7 @@ enum ip_conntrack_expect_events {
#define NF_CT_EXPECT_USERSPACE 0x4
#ifdef __KERNEL__
+#define NF_CT_EXPECT_DEAD 0x8
#define NF_CT_EXPECT_MASK (NF_CT_EXPECT_PERMANENT | NF_CT_EXPECT_INACTIVE | \
NF_CT_EXPECT_USERSPACE)
#endif
diff --git a/include/uapi/linux/nfsd_netlink.h b/include/uapi/linux/nfsd_netlink.h
index 97c7447f4d14..f5b75d5caba9 100644
--- a/include/uapi/linux/nfsd_netlink.h
+++ b/include/uapi/linux/nfsd_netlink.h
@@ -10,6 +10,53 @@
#define NFSD_FAMILY_NAME "nfsd"
#define NFSD_FAMILY_VERSION 1
+enum nfsd_cache_type {
+ NFSD_CACHE_TYPE_SVC_EXPORT = 1,
+ NFSD_CACHE_TYPE_EXPKEY = 2,
+};
+
+/*
+ * These flags are ordered to match the NFSEXP_* flags in
+ * include/linux/nfsd/export.h
+ */
+enum nfsd_export_flags {
+ NFSD_EXPORT_FLAGS_READONLY = 1,
+ NFSD_EXPORT_FLAGS_INSECURE_PORT = 2,
+ NFSD_EXPORT_FLAGS_ROOTSQUASH = 4,
+ NFSD_EXPORT_FLAGS_ALLSQUASH = 8,
+ NFSD_EXPORT_FLAGS_ASYNC = 16,
+ NFSD_EXPORT_FLAGS_GATHERED_WRITES = 32,
+ NFSD_EXPORT_FLAGS_NOREADDIRPLUS = 64,
+ NFSD_EXPORT_FLAGS_SECURITY_LABEL = 128,
+ NFSD_EXPORT_FLAGS_SIGN_FH = 256,
+ NFSD_EXPORT_FLAGS_NOHIDE = 512,
+ NFSD_EXPORT_FLAGS_NOSUBTREECHECK = 1024,
+ NFSD_EXPORT_FLAGS_NOAUTHNLM = 2048,
+ NFSD_EXPORT_FLAGS_MSNFS = 4096,
+ NFSD_EXPORT_FLAGS_FSID = 8192,
+ NFSD_EXPORT_FLAGS_CROSSMOUNT = 16384,
+ NFSD_EXPORT_FLAGS_NOACL = 32768,
+ NFSD_EXPORT_FLAGS_V4ROOT = 65536,
+ NFSD_EXPORT_FLAGS_PNFS = 131072,
+};
+
+/*
+ * These flags are ordered to match the NFSEXP_XPRTSEC_* flags in
+ * include/linux/nfsd/export.h
+ */
+enum nfsd_xprtsec_mode {
+ NFSD_XPRTSEC_MODE_NONE = 1,
+ NFSD_XPRTSEC_MODE_TLS = 2,
+ NFSD_XPRTSEC_MODE_MTLS = 4,
+};
+
+enum {
+ NFSD_A_CACHE_NOTIFY_CACHE_TYPE = 1,
+
+ __NFSD_A_CACHE_NOTIFY_MAX,
+ NFSD_A_CACHE_NOTIFY_MAX = (__NFSD_A_CACHE_NOTIFY_MAX - 1)
+};
+
enum {
NFSD_A_RPC_STATUS_XID = 1,
NFSD_A_RPC_STATUS_FLAGS,
@@ -82,6 +129,103 @@ enum {
};
enum {
+ NFSD_A_FSLOCATION_HOST = 1,
+ NFSD_A_FSLOCATION_PATH,
+
+ __NFSD_A_FSLOCATION_MAX,
+ NFSD_A_FSLOCATION_MAX = (__NFSD_A_FSLOCATION_MAX - 1)
+};
+
+enum {
+ NFSD_A_FSLOCATIONS_LOCATION = 1,
+
+ __NFSD_A_FSLOCATIONS_MAX,
+ NFSD_A_FSLOCATIONS_MAX = (__NFSD_A_FSLOCATIONS_MAX - 1)
+};
+
+enum {
+ NFSD_A_AUTH_FLAVOR_PSEUDOFLAVOR = 1,
+ NFSD_A_AUTH_FLAVOR_FLAGS,
+
+ __NFSD_A_AUTH_FLAVOR_MAX,
+ NFSD_A_AUTH_FLAVOR_MAX = (__NFSD_A_AUTH_FLAVOR_MAX - 1)
+};
+
+enum {
+ NFSD_A_SVC_EXPORT_SEQNO = 1,
+ NFSD_A_SVC_EXPORT_CLIENT,
+ NFSD_A_SVC_EXPORT_PATH,
+ NFSD_A_SVC_EXPORT_NEGATIVE,
+ NFSD_A_SVC_EXPORT_EXPIRY,
+ NFSD_A_SVC_EXPORT_ANON_UID,
+ NFSD_A_SVC_EXPORT_ANON_GID,
+ NFSD_A_SVC_EXPORT_FSLOCATIONS,
+ NFSD_A_SVC_EXPORT_UUID,
+ NFSD_A_SVC_EXPORT_SECINFO,
+ NFSD_A_SVC_EXPORT_XPRTSEC,
+ NFSD_A_SVC_EXPORT_FLAGS,
+ NFSD_A_SVC_EXPORT_FSID,
+
+ __NFSD_A_SVC_EXPORT_MAX,
+ NFSD_A_SVC_EXPORT_MAX = (__NFSD_A_SVC_EXPORT_MAX - 1)
+};
+
+enum {
+ NFSD_A_SVC_EXPORT_REQS_REQUESTS = 1,
+
+ __NFSD_A_SVC_EXPORT_REQS_MAX,
+ NFSD_A_SVC_EXPORT_REQS_MAX = (__NFSD_A_SVC_EXPORT_REQS_MAX - 1)
+};
+
+enum {
+ NFSD_A_EXPKEY_SEQNO = 1,
+ NFSD_A_EXPKEY_CLIENT,
+ NFSD_A_EXPKEY_FSIDTYPE,
+ NFSD_A_EXPKEY_FSID,
+ NFSD_A_EXPKEY_NEGATIVE,
+ NFSD_A_EXPKEY_EXPIRY,
+ NFSD_A_EXPKEY_PATH,
+
+ __NFSD_A_EXPKEY_MAX,
+ NFSD_A_EXPKEY_MAX = (__NFSD_A_EXPKEY_MAX - 1)
+};
+
+enum {
+ NFSD_A_EXPKEY_REQS_REQUESTS = 1,
+
+ __NFSD_A_EXPKEY_REQS_MAX,
+ NFSD_A_EXPKEY_REQS_MAX = (__NFSD_A_EXPKEY_REQS_MAX - 1)
+};
+
+enum {
+ NFSD_A_CACHE_FLUSH_MASK = 1,
+
+ __NFSD_A_CACHE_FLUSH_MAX,
+ NFSD_A_CACHE_FLUSH_MAX = (__NFSD_A_CACHE_FLUSH_MAX - 1)
+};
+
+enum {
+ NFSD_A_UNLOCK_IP_ADDRESS = 1,
+
+ __NFSD_A_UNLOCK_IP_MAX,
+ NFSD_A_UNLOCK_IP_MAX = (__NFSD_A_UNLOCK_IP_MAX - 1)
+};
+
+enum {
+ NFSD_A_UNLOCK_FILESYSTEM_PATH = 1,
+
+ __NFSD_A_UNLOCK_FILESYSTEM_MAX,
+ NFSD_A_UNLOCK_FILESYSTEM_MAX = (__NFSD_A_UNLOCK_FILESYSTEM_MAX - 1)
+};
+
+enum {
+ NFSD_A_UNLOCK_EXPORT_PATH = 1,
+
+ __NFSD_A_UNLOCK_EXPORT_MAX,
+ NFSD_A_UNLOCK_EXPORT_MAX = (__NFSD_A_UNLOCK_EXPORT_MAX - 1)
+};
+
+enum {
NFSD_CMD_RPC_STATUS_GET = 1,
NFSD_CMD_THREADS_SET,
NFSD_CMD_THREADS_GET,
@@ -91,9 +235,21 @@ enum {
NFSD_CMD_LISTENER_GET,
NFSD_CMD_POOL_MODE_SET,
NFSD_CMD_POOL_MODE_GET,
+ NFSD_CMD_CACHE_NOTIFY,
+ NFSD_CMD_SVC_EXPORT_GET_REQS,
+ NFSD_CMD_SVC_EXPORT_SET_REQS,
+ NFSD_CMD_EXPKEY_GET_REQS,
+ NFSD_CMD_EXPKEY_SET_REQS,
+ NFSD_CMD_CACHE_FLUSH,
+ NFSD_CMD_UNLOCK_IP,
+ NFSD_CMD_UNLOCK_FILESYSTEM,
+ NFSD_CMD_UNLOCK_EXPORT,
__NFSD_CMD_MAX,
NFSD_CMD_MAX = (__NFSD_CMD_MAX - 1)
};
+#define NFSD_MCGRP_NONE "none"
+#define NFSD_MCGRP_EXPORTD "exportd"
+
#endif /* _UAPI_LINUX_NFSD_NETLINK_H */
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 3d55bf4be36f..9998f6c0a665 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -729,7 +729,9 @@
* to remain on the channel. This command is also used as an event to
* notify when the requested duration starts (it may take a while for the
* driver to schedule this time due to other concurrent needs for the
- * radio).
+ * radio). An optional attribute %NL80211_ATTR_MAC can be used to filter
+ * incoming frames during remain-on-channel, such that frames
+ * addressed to the specified destination MAC are reported.
* When called, this operation returns a cookie (%NL80211_ATTR_COOKIE)
* that will be included with any events pertaining to this request;
* the cookie is also used to cancel the request.
@@ -1204,10 +1206,12 @@
* user space through the connect result as the user space would have
* initiated the connection through the connect request.
*
- * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's
- * ht opmode or vht opmode changes using any of %NL80211_ATTR_SMPS_MODE,
- * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its
- * address(specified in %NL80211_ATTR_MAC).
+ * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notifies that a station's
+ * HT opmode or VHT opmode changed using any of %NL80211_ATTR_SMPS_MODE,
+ * %NL80211_ATTR_CHANNEL_WIDTH, %NL80211_ATTR_NSS attributes with its
+ * address (specified in %NL80211_ATTR_MAC).
+ * Note that 80+80 and 160 MHz might not be differentiated, i.e. may
+ * report %NL80211_CHAN_WIDTH_160 instead of %NL80211_CHAN_WIDTH_80P80.
*
* @NL80211_CMD_GET_FTM_RESPONDER_STATS: Retrieve FTM responder statistics, in
* the %NL80211_ATTR_FTM_RESPONDER_STATS attribute.
@@ -1415,6 +1419,12 @@
* identifying the evacuated channel.
* User space may reconfigure the local schedule in response to this
* notification.
+ * @NL80211_CMD_START_PD: Start PD operation, identified by its
+ * %NL80211_ATTR_WDEV interface. This interface must have been previously
+ * created with %NL80211_CMD_NEW_INTERFACE.
+ * @NL80211_CMD_STOP_PD: Stop the PD operation, identified by
+ * its %NL80211_ATTR_WDEV interface.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -1690,6 +1700,9 @@ enum nl80211_commands {
NL80211_CMD_NAN_CHANNEL_EVAC,
+ NL80211_CMD_START_PD,
+ NL80211_CMD_STOP_PD,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -2991,11 +3004,13 @@ enum nl80211_commands {
* @NL80211_ATTR_EPCS: Flag attribute indicating that EPCS is enabled for a
* station interface.
*
- * @NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS: Extended MLD capabilities and
- * operations that userspace implements to use during association/ML
- * link reconfig, currently only "BTM MLD Recommendation For Multiple
- * APs Support". Drivers may set additional flags that they support
- * in the kernel or device.
+ * @NL80211_ATTR_EXT_MLD_CAPA_AND_OPS: Extended MLD capabilities and operations.
+ * For association and link reconfiguration, indicates extra capabilities
+ * that userspace implements, currently only "BTM MLD Recommendation For
+ * Multiple APs Support".
+ * For wiphy information, additional flags that drivers will set, but
+ * this is informational only for userspace (it's not expected to set
+ * these.)
*
* @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index
* of the radio in interest. Internally a value of -1 is used to
@@ -3140,6 +3155,16 @@ enum nl80211_commands {
* association response etc., since it's abridged in the beacon. Used
* for START_AP etc.
*
+ * @NL80211_ATTR_ASSOC_ENCRYPTED: Flag attribute, used only with the
+ * %NL80211_CMD_CONNECT event in SME-in-driver mode. The driver should
+ * set this flag to indicate that both the (Re)Association Request frame
+ * and the corresponding (Re)Association Response frame are transmitted
+ * encrypted over the air. Enhanced Privacy Protection (EPP), as defined
+ * in IEEE P802.11bi/D4.0, mandates this encryption.
+ *
+ * @NL80211_ATTR_NPCA_PRIMARY_FREQ: NPCA primary channel (u32)
+ * @NL80211_ATTR_NPCA_PUNCT_BITMAP: NPCA puncturing bitmap (u32)
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3695,7 +3720,7 @@ enum nl80211_attrs {
NL80211_ATTR_MLO_RECONF_REM_LINKS,
NL80211_ATTR_EPCS,
- NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
+ NL80211_ATTR_EXT_MLD_CAPA_AND_OPS,
NL80211_ATTR_WIPHY_RADIO_INDEX,
@@ -3733,6 +3758,11 @@ enum nl80211_attrs {
NL80211_ATTR_NAN_MAX_CHAN_SWITCH_TIME,
NL80211_ATTR_NAN_PEER_MAPS,
+ NL80211_ATTR_ASSOC_ENCRYPTED,
+
+ NL80211_ATTR_NPCA_PRIMARY_FREQ,
+ NL80211_ATTR_NPCA_PUNCT_BITMAP,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -3747,6 +3777,7 @@ enum nl80211_attrs {
#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
#define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON
#define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP
+#define NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS NL80211_ATTR_EXT_MLD_CAPA_AND_OPS
/*
* Allow user space programs to use #ifdef on new attributes by defining them
@@ -3829,6 +3860,7 @@ enum nl80211_attrs {
* @NL80211_IFTYPE_NAN_DATA: NAN data interface type (netdev); NAN data
* interfaces can only be brought up (IFF_UP) when a NAN interface
* already exists and NAN has been started (using %NL80211_CMD_START_NAN).
+ * @NL80211_IFTYPE_PD: PD device interface type (not a netdev)
* @NL80211_IFTYPE_MAX: highest interface type number currently defined
* @NUM_NL80211_IFTYPES: number of defined interface types
*
@@ -3851,6 +3883,7 @@ enum nl80211_iftype {
NL80211_IFTYPE_OCB,
NL80211_IFTYPE_NAN,
NL80211_IFTYPE_NAN_DATA,
+ NL80211_IFTYPE_PD,
/* keep last */
NUM_NL80211_IFTYPES,
@@ -5790,6 +5823,18 @@ enum nl80211_key_default_types {
* @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
* Defaults to @NL80211_KEY_RX_TX.
* @NL80211_KEY_DEFAULT_BEACON: flag indicating default Beacon frame key
+ * @NL80211_KEY_LTF_SEED: LTF key seed is used by the driver to generate
+ * secure LTF keys used in case of peer measurement request with FTM
+ * request type as either %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
+ * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED. Secure LTF key seeds
+ * will help enable PHY security in peer measurement session.
+ * The LTF key seed is installed along with the TK (Temporal Key) using
+ * %NL80211_CMD_NEW_KEY. The TK is configured using the
+ * %NL80211_ATTR_KEY_DATA attribute, while the LTF key seed is configured
+ * using this attribute. Both keys must be configured before initiation
+ * of peer measurement to ensure peer measurement session is secure.
+ * Only valid if %NL80211_EXT_FEATURE_SET_KEY_LTF_SEED is set. This
+ * attribute is restricted to pairwise keys (%NL80211_KEYTYPE_PAIRWISE).
*
* @__NL80211_KEY_AFTER_LAST: internal
* @NL80211_KEY_MAX: highest key attribute
@@ -5806,6 +5851,7 @@ enum nl80211_key_attributes {
NL80211_KEY_DEFAULT_TYPES,
NL80211_KEY_MODE,
NL80211_KEY_DEFAULT_BEACON,
+ NL80211_KEY_LTF_SEED,
/* keep last */
__NL80211_KEY_AFTER_LAST,
@@ -7029,6 +7075,16 @@ enum nl80211_feature_flags {
* (NL80211_CMD_AUTHENTICATE) in non-AP STA mode, as specified in
* "IEEE P802.11bi/D4.0, 12.16.5".
*
+ * @NL80211_EXT_FEATURE_ROC_ADDR_FILTER: Driver supports MAC address
+ * filtering during remain-on-channel. When %NL80211_ATTR_MAC is
+ * provided with %NL80211_CMD_REMAIN_ON_CHANNEL, the driver will
+ * forward frames with a matching MAC address to userspace during
+ * the off-channel period.
+ *
+ * @NL80211_EXT_FEATURE_SET_KEY_LTF_SEED: Driver supports installing the
+ * LTF key seed via %NL80211_KEY_LTF_SEED. The seed is used to generate
+ * secure LTF keys for secure LTF measurement sessions.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
*/
@@ -7108,6 +7164,8 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_EPPKE,
NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION,
NL80211_EXT_FEATURE_IEEE8021X_AUTH,
+ NL80211_EXT_FEATURE_ROC_ADDR_FILTER,
+ NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
@@ -7961,6 +8019,26 @@ enum nl80211_peer_measurement_resp {
};
/**
+ * enum nl80211_peer_measurement_ftm_req_type - FTM ranging request type,
+ * used with %NL80211_PMSR_PEER_ATTR_REQ_TYPE
+ *
+ * @NL80211_PMSR_FTM_REQ_TYPE_INFRA: infrastructure ranging, i.e. STA-to-AP
+ * @NL80211_PMSR_FTM_REQ_TYPE_PD: peer-to-peer ranging as defined in the
+ * Wi-Fi Alliance specification "Proximity Ranging (PR) Implementation
+ * Consideration Draft 1.9 Rev 1"
+ * @NUM_NL80211_PMSR_FTM_REQ_TYPE: internal
+ * @NL80211_PMSR_FTM_REQ_TYPE_MAX: highest request type value
+ */
+enum nl80211_peer_measurement_ftm_req_type {
+ NL80211_PMSR_FTM_REQ_TYPE_INFRA,
+ NL80211_PMSR_FTM_REQ_TYPE_PD,
+
+ /* keep last */
+ NUM_NL80211_PMSR_FTM_REQ_TYPE,
+ NL80211_PMSR_FTM_REQ_TYPE_MAX = NUM_NL80211_PMSR_FTM_REQ_TYPE - 1
+};
+
+/**
* enum nl80211_peer_measurement_peer_attrs - peer attributes for measurement
* @__NL80211_PMSR_PEER_ATTR_INVALID: invalid
*
@@ -7973,6 +8051,9 @@ enum nl80211_peer_measurement_resp {
* @NL80211_PMSR_PEER_ATTR_RESP: This is a nested attribute indexed by
* measurement type, with attributes from the
* &enum nl80211_peer_measurement_resp inside.
+ * @NL80211_PMSR_PEER_ATTR_REQ_TYPE: u32 attribute specifying the ranging
+ * request type, using values from &enum nl80211_peer_measurement_ftm_req_type.
+ * If absent, defaults to %NL80211_PMSR_FTM_REQ_TYPE_INFRA.
*
* @NUM_NL80211_PMSR_PEER_ATTRS: internal
* @NL80211_PMSR_PEER_ATTR_MAX: highest attribute number
@@ -7984,6 +8065,7 @@ enum nl80211_peer_measurement_peer_attrs {
NL80211_PMSR_PEER_ATTR_CHAN,
NL80211_PMSR_PEER_ATTR_REQ,
NL80211_PMSR_PEER_ATTR_RESP,
+ NL80211_PMSR_PEER_ATTR_REQ_TYPE,
/* keep last */
NUM_NL80211_PMSR_PEER_ATTRS,
@@ -8010,6 +8092,18 @@ enum nl80211_peer_measurement_peer_attrs {
* meaningless, just a list of peers to measure with, with the
* sub-attributes taken from
* &enum nl80211_peer_measurement_peer_attrs.
+ * @NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE: u32 attribute indicating the
+ * maximum number of peers supported when the device operates in the
+ * ISTA (Initiator STA) role. If absent, no role-specific peer limit
+ * applies. The sum of %NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE and
+ * %NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE is enforced when the device
+ * supports concurrent ISTA/RSTA operation.
+ * @NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE: u32 attribute indicating the
+ * maximum number of peers supported when the device operates in the
+ * RSTA (Responder STA) role. If absent, no role-specific peer limit
+ * applies. The sum of %NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE and
+ * %NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE is enforced when the device
+ * supports concurrent ISTA/RSTA operation.
*
* @NUM_NL80211_PMSR_ATTR: internal
* @NL80211_PMSR_ATTR_MAX: highest attribute number
@@ -8022,6 +8116,8 @@ enum nl80211_peer_measurement_attrs {
NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR,
NL80211_PMSR_ATTR_TYPE_CAPA,
NL80211_PMSR_ATTR_PEERS,
+ NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE,
+ NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE,
/* keep last */
NUM_NL80211_PMSR_ATTR,
@@ -8080,6 +8176,54 @@ enum nl80211_peer_measurement_attrs {
* This limits the allowed combinations of LTF repetitions and STS.
* @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT: flag attribute indicating the
* device supports operating as the RSTA in PMSR FTM request
+ * @NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS: nested attribute containing ISTA
+ * (initiator) role capabilities. Uses the same sub-attributes as
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS: nested attribute containing RSTA
+ * (responder) role capabilities.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_NTB: flag attribute (used inside
+ * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating NTB ranging support.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_TB: flag attribute (used inside
+ * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating TB ranging support.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_EDCA: flag attribute (used inside
+ * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating EDCA based ranging
+ * support.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS: nested attribute containing ranging
+ * type capabilities. Uses sub-attributes from
+ * &enum nl80211_peer_measurement_ftm_type_capa.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_CONCURRENT_ISTA_RSTA_SUPPORT: flag attribute
+ * indicating that the device can simultaneously act as initiator and
+ * responder in a multi-peer measurement request. Only valid if
+ * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT is set.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_TX_ANTENNAS: u32 attribute indicating
+ * the maximum number of transmit antennas supported for EDCA based ranging
+ * (0 means unknown)
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_RX_ANTENNAS: u32 attribute indicating
+ * the maximum number of receive antennas supported for EDCA based ranging
+ * (0 means unknown)
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_EDCA: u32 attribute indicating
+ * the minimum EDCA ranging interval supported by the device
+ * in milli seconds. (0 means unknown). Applications can use this value
+ * to estimate the burst period to be given in the FTM request for the
+ * EDCA based ranging case. If non-zero, this value will be used to
+ * validate the burst period in the FTM request.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_NTB: u32 attribute indicating
+ * the minimum NTB ranging interval supported by the device
+ * in milli seconds. (0 means unknown). Applications can use this value
+ * to estimate the burst period to be given in the FTM request for the
+ * NTB ranging case. If non-zero, this value will be used to validate
+ * the nominal time in the FTM request.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_PD_PREAMBLES: u32 bitmap of values from
+ * &enum nl80211_preamble indicating the supported preambles for PD
+ * ranging requests. Only valid if %NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT
+ * is set.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_PD_BANDWIDTHS: u32 bitmap of values from
+ * &enum nl80211_chan_width indicating the supported channel bandwidths
+ * for PD ranging requests. Only valid if
+ * %NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT is set.
*
* @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
* @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
@@ -8105,6 +8249,19 @@ enum nl80211_peer_measurement_ftm_capa {
NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX,
NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX,
NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT,
+ NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS,
+ NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS,
+ NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_NTB,
+ NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_TB,
+ NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_EDCA,
+ NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS,
+ NL80211_PMSR_FTM_CAPA_ATTR_CONCURRENT_ISTA_RSTA_SUPPORT,
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_TX_ANTENNAS,
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_RX_ANTENNAS,
+ NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_EDCA,
+ NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_NTB,
+ NL80211_PMSR_FTM_CAPA_ATTR_PD_PREAMBLES,
+ NL80211_PMSR_FTM_CAPA_ATTR_PD_BANDWIDTHS,
/* keep last */
NUM_NL80211_PMSR_FTM_CAPA_ATTR,
@@ -8112,6 +8269,33 @@ enum nl80211_peer_measurement_ftm_capa {
};
/**
+ * enum nl80211_peer_measurement_ftm_type_capa - FTM ranging type capability
+ * sub-attributes, used inside %NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS
+ * @__NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INVALID: invalid
+ *
+ * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INFRA_SUPPORT: flag attribute indicating
+ * that the device supports infrastructure ranging (STA-to-AP or
+ * AP-to-STA) as part of Proximity Detection
+ * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT: flag attribute indicating that
+ * the device supports peer-to-peer ranging as mentioned in the
+ * specification "PR Implementation Consideration Draft 1.9 rev 1" where
+ * PD stands for proximity detection
+ *
+ * @NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR: internal
+ * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_MAX: highest attribute number
+ */
+enum nl80211_peer_measurement_ftm_type_capa {
+ __NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INVALID,
+
+ NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INFRA_SUPPORT,
+ NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT,
+
+ /* keep last */
+ NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR,
+ NL80211_PMSR_FTM_TYPE_CAPA_ATTR_MAX = NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR - 1
+};
+
+/**
* enum nl80211_peer_measurement_ftm_req - FTM request attributes
* @__NL80211_PMSR_FTM_REQ_ATTR_INVALID: invalid
*
@@ -8129,9 +8313,11 @@ enum nl80211_peer_measurement_ftm_capa {
* default 15 i.e. "no preference"). For non-EDCA ranging, this is the
* burst duration in milliseconds (optional with default 0, i.e. let the
* device decide).
- * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames
- * requested per burst
+ * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: (Optional) number of successful
+ * FTM frames requested per burst
* (u8, 0-31, optional with default 0 i.e. "no preference")
+ * If the attribute is absent ("no preference"), the driver or firmware can
+ * choose a suitable value.
* @NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES: number of FTMR frame retries
* (u8, default 3)
* @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI: request LCI data (flag)
@@ -8165,6 +8351,50 @@ enum nl80211_peer_measurement_ftm_capa {
* Only valid if %NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK is set (so the
* RSTA will have the measurement results to report back in the FTM
* response).
+ * @NL80211_PMSR_FTM_REQ_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS: minimum time
+ * between two consecutive range measurements in units of 100 microseconds,
+ * for non-trigger based ranging (u32). Should be set as short as possible
+ * to minimize turnaround time, since two-way ranging with delayed LMR
+ * requires two measurements. Only valid if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * @NL80211_PMSR_FTM_REQ_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS: maximum time
+ * between two consecutive range measurements in units of 10 milliseconds,
+ * for non-trigger based ranging (u32). Acts as a session timeout; if
+ * exceeded, the ranging session should be terminated. Only valid if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * @NL80211_PMSR_FTM_REQ_ATTR_NOMINAL_TIME: The nominal time field shall be
+ * set to the nominal duration between adjacent Availability Windows in
+ * units of milli seconds (u32). Mandatory if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * @NL80211_PMSR_FTM_REQ_ATTR_AW_DURATION: (Optional) The AW duration field
+ * shall be set to the duration of the AW in units of 1ms (0-255 ms) (u32).
+ * Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * If the attribute is absent ("no preference"), the driver or firmware
+ * can choose a suitable value.
+ * @NL80211_PMSR_FTM_REQ_ATTR_NUM_MEASUREMENTS: (Optional) number of
+ * Availability Windows (AWs) to schedule for non-trigger-based ranging.
+ * Each AW may contain multiple FTM exchanges as configured by
+ * %NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST. Only valid if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * If the attribute is absent ("no preference"), the driver or firmware
+ * can choose a suitable value.
+ * @NL80211_PMSR_FTM_REQ_ATTR_PAD: ignore, for u64/s64 padding only.
+ * @NL80211_PMSR_FTM_REQ_ATTR_INGRESS: optional u64 attribute in units of mm.
+ * When specified, the measurement result of the peer needs to be
+ * indicated if the device moves into this range.
+ * @NL80211_PMSR_FTM_REQ_ATTR_EGRESS: optional u64 attribute in units of mm.
+ * When specified, the measurement result of the peer needs to be
+ * indicated if the device moves out of this range.
+ * If neither or only one of @NL80211_PMSR_FTM_REQ_ATTR_INGRESS and
+ * @NL80211_PMSR_FTM_REQ_ATTR_EGRESS is specified, only the specified
+ * threshold is used. If both are specified, both thresholds are applied.
+ * If neither is specified, results are reported without threshold
+ * filtering.
+ * @NL80211_PMSR_FTM_REQ_ATTR_PD_SUPPRESS_RESULTS: Flag to suppress ranging
+ * results for PD requests. When set, ranging measurements are performed
+ * but results are not reported to userspace, regardless of ranging role
+ * or type. Only valid when %NL80211_PMSR_PEER_ATTR_REQ_TYPE is set to
+ * %NL80211_PMSR_FTM_REQ_TYPE_PD.
*
* @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
* @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
@@ -8186,6 +8416,15 @@ enum nl80211_peer_measurement_ftm_req {
NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,
NL80211_PMSR_FTM_REQ_ATTR_RSTA,
+ NL80211_PMSR_FTM_REQ_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_REQ_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_REQ_ATTR_NOMINAL_TIME,
+ NL80211_PMSR_FTM_REQ_ATTR_AW_DURATION,
+ NL80211_PMSR_FTM_REQ_ATTR_NUM_MEASUREMENTS,
+ NL80211_PMSR_FTM_REQ_ATTR_PAD,
+ NL80211_PMSR_FTM_REQ_ATTR_INGRESS,
+ NL80211_PMSR_FTM_REQ_ATTR_EGRESS,
+ NL80211_PMSR_FTM_REQ_ATTR_PD_SUPPRESS_RESULTS,
/* keep last */
NUM_NL80211_PMSR_FTM_REQ_ATTR,
@@ -8272,6 +8511,33 @@ enum nl80211_peer_measurement_ftm_failure_reasons {
* @NL80211_PMSR_FTM_RESP_ATTR_PAD: ignore, for u64/s64 padding only
* @NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD: actual burst period used by
* the responder (similar to request, u16)
+ * @NL80211_PMSR_FTM_RESP_ATTR_TX_LTF_REPETITION_COUNT: negotiated value of
+ * number of tx ltf repetitions in NDP frames (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_RX_LTF_REPETITION_COUNT: negotiated value of
+ * number of rx ltf repetitions in NDP frames (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS: negotiated value
+ * where latest time by which the ISTA needs to complete the next round of
+ * measurements, in units of 10 ms (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS: negotiated
+ * minimum time between two consecutive range measurements initiated by an
+ * ISTA, in units of 100 us (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_NUM_TX_SPATIAL_STREAMS: number of Tx space-time
+ * streams used in NDP frames during the measurement sounding phase
+ * (u32, optional).
+ * @NL80211_PMSR_FTM_RESP_ATTR_NUM_RX_SPATIAL_STREAMS: number of Rx space-time
+ * streams used in the NDP frames during the measurement sounding phase
+ * (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_NOMINAL_TIME: negotiated nominal time used in
+ * this session in milliseconds. (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_AVAILABILITY_WINDOW: negotiated availability
+ * window time used in this session, in units of milli seconds.
+ * (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_CHANNEL_WIDTH: u32 attribute indicating channel
+ * width used for measurement, see &enum nl80211_chan_width (optional).
+ * @NL80211_PMSR_FTM_RESP_ATTR_PREAMBLE: u32 attribute indicating the preamble
+ * type used for the measurement, see &enum nl80211_preamble (optional).
+ * @NL80211_PMSR_FTM_RESP_ATTR_IS_DELAYED_LMR: flag, indicates if the
+ * current result is delayed LMR data.
*
* @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal
* @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number
@@ -8301,6 +8567,17 @@ enum nl80211_peer_measurement_ftm_resp {
NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
NL80211_PMSR_FTM_RESP_ATTR_PAD,
NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD,
+ NL80211_PMSR_FTM_RESP_ATTR_TX_LTF_REPETITION_COUNT,
+ NL80211_PMSR_FTM_RESP_ATTR_RX_LTF_REPETITION_COUNT,
+ NL80211_PMSR_FTM_RESP_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_RESP_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_TX_SPATIAL_STREAMS,
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_RX_SPATIAL_STREAMS,
+ NL80211_PMSR_FTM_RESP_ATTR_NOMINAL_TIME,
+ NL80211_PMSR_FTM_RESP_ATTR_AVAILABILITY_WINDOW,
+ NL80211_PMSR_FTM_RESP_ATTR_CHANNEL_WIDTH,
+ NL80211_PMSR_FTM_RESP_ATTR_PREAMBLE,
+ NL80211_PMSR_FTM_RESP_ATTR_IS_DELAYED_LMR,
/* keep last */
NUM_NL80211_PMSR_FTM_RESP_ATTR,
diff --git a/include/uapi/linux/openat2.h b/include/uapi/linux/openat2.h
index a5feb7604948..575c2c59d14a 100644
--- a/include/uapi/linux/openat2.h
+++ b/include/uapi/linux/openat2.h
@@ -22,6 +22,13 @@ struct open_how {
__u64 resolve;
};
+/*
+ * how->flags bits exclusive to openat2(2). These live in the upper 32 bits
+ * of @flags so that they cannot be expressed by open(2) / openat(2), whose
+ * @flags argument is a C int.
+ */
+#define OPENAT2_REGULAR ((__u64)1 << 32) /* Only open regular files. */
+
/* how->resolve flags for openat2(2). */
#define RESOLVE_NO_XDEV 0x01 /* Block mount-point crossings
(includes bind-mounts). */
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index 14f634ab9350..facaa324bd86 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -1349,6 +1349,7 @@
/* CXL r4.0, 8.1.3: PCIe DVSEC for CXL Device */
#define PCI_DVSEC_CXL_DEVICE 0
#define PCI_DVSEC_CXL_CAP 0xA
+#define PCI_DVSEC_CXL_CACHE_CAPABLE _BITUL(0)
#define PCI_DVSEC_CXL_MEM_CAPABLE _BITUL(2)
#define PCI_DVSEC_CXL_HDM_COUNT __GENMASK(5, 4)
#define PCI_DVSEC_CXL_CTRL 0xC
@@ -1357,6 +1358,7 @@
#define PCI_DVSEC_CXL_RANGE_SIZE_LOW(i) (0x1C + (i * 0x10))
#define PCI_DVSEC_CXL_MEM_INFO_VALID _BITUL(0)
#define PCI_DVSEC_CXL_MEM_ACTIVE _BITUL(1)
+#define PCI_DVSEC_CXL_MEM_ACTIVE_TIMEOUT __GENMASK(15, 13)
#define PCI_DVSEC_CXL_MEM_SIZE_LOW __GENMASK(31, 28)
#define PCI_DVSEC_CXL_RANGE_BASE_HIGH(i) (0x20 + (i * 0x10))
#define PCI_DVSEC_CXL_RANGE_BASE_LOW(i) (0x24 + (i * 0x10))
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 66e8072f44df..490efd288526 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -569,6 +569,16 @@ struct tc_netem_gemodel {
#define NETEM_DIST_SCALE 8192
#define NETEM_DIST_MAX 16384
+struct tc_netem_xstats {
+ __u64 delayed; /* packets delayed */
+ __u64 dropped; /* packets dropped by loss model */
+ __u64 corrupted; /* packets with bit errors injected */
+ __u64 duplicated; /* duplicate packets generated */
+ __u64 reordered; /* packets sent out of order */
+ __u64 ecn_marked; /* packets ECN CE-marked (not dropped)*/
+ __u64 allocation_errors;
+};
+
/* DRR */
enum {
diff --git a/include/uapi/linux/pps.h b/include/uapi/linux/pps.h
index 009ebcd8ced5..1088dea65e12 100644
--- a/include/uapi/linux/pps.h
+++ b/include/uapi/linux/pps.h
@@ -26,7 +26,7 @@
#include <linux/types.h>
#define PPS_VERSION "5.3.6"
-#define PPS_MAX_SOURCES 16 /* should be enough... */
+#define PPS_MAX_SOURCES 256 /* should be enough... */
/* Implementation note: the logical states ``assert'' and ``clear''
* are implemented in terms of the chip register, i.e. ``assert''
diff --git a/include/uapi/linux/psp.h b/include/uapi/linux/psp.h
index a3a336488dc3..1c8899cd4da5 100644
--- a/include/uapi/linux/psp.h
+++ b/include/uapi/linux/psp.h
@@ -18,10 +18,21 @@ enum psp_version {
};
enum {
+ PSP_A_ASSOC_DEV_INFO_IFINDEX = 1,
+ PSP_A_ASSOC_DEV_INFO_NSID,
+
+ __PSP_A_ASSOC_DEV_INFO_MAX,
+ PSP_A_ASSOC_DEV_INFO_MAX = (__PSP_A_ASSOC_DEV_INFO_MAX - 1)
+};
+
+enum {
PSP_A_DEV_ID = 1,
PSP_A_DEV_IFINDEX,
PSP_A_DEV_PSP_VERSIONS_CAP,
PSP_A_DEV_PSP_VERSIONS_ENA,
+ PSP_A_DEV_ASSOC_LIST,
+ PSP_A_DEV_NSID,
+ PSP_A_DEV_BY_ASSOCIATION,
__PSP_A_DEV_MAX,
PSP_A_DEV_MAX = (__PSP_A_DEV_MAX - 1)
@@ -74,6 +85,8 @@ enum {
PSP_CMD_RX_ASSOC,
PSP_CMD_TX_ASSOC,
PSP_CMD_GET_STATS,
+ PSP_CMD_DEV_ASSOC,
+ PSP_CMD_DEV_DISASSOC,
__PSP_CMD_MAX,
PSP_CMD_MAX = (__PSP_CMD_MAX - 1)
diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h
index b2d2a71f7baf..d97384abc157 100644
--- a/include/uapi/linux/rkisp1-config.h
+++ b/include/uapi/linux/rkisp1-config.h
@@ -967,6 +967,92 @@ struct rkisp1_cif_isp_wdr_config {
__u8 use_iref;
};
+/*
+ * enum rkisp1_cif_isp_cac_h_clip_mode - horizontal clipping mode
+ *
+ * @RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4PX: +/- 4 pixels
+ * @RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4_5PX: +/- 4/5 pixels depending on bayer position
+ */
+enum rkisp1_cif_isp_cac_h_clip_mode {
+ RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4PX = 0,
+ RKISP1_CIF_ISP_CAC_H_CLIP_MODE_4_5PX = 1,
+};
+
+/**
+ * enum rkisp1_cif_isp_cac_v_clip_mode - vertical clipping mode
+ *
+ * @RKISP1_CIF_ISP_CAC_V_CLIP_MODE_2PX: +/- 2 pixels
+ * @RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3PX: +/- 3 pixels
+ * @RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3_4PX: +/- 3/4 pixels depending on bayer position
+ */
+enum rkisp1_cif_isp_cac_v_clip_mode {
+ RKISP1_CIF_ISP_CAC_V_CLIP_MODE_2PX = 0,
+ RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3PX = 1,
+ RKISP1_CIF_ISP_CAC_V_CLIP_MODE_3_4PX = 2,
+};
+
+/**
+ * struct rkisp1_cif_isp_cac_config - chromatic aberration correction configuration
+ *
+ * The correction is carried out by shifting the red and blue pixels relative
+ * to the green ones, depending on the distance from the optical center:
+ *
+ * @h_count_start: horizontal coordinate of the optical center (13-bit unsigned integer; [1,8191])
+ * @v_count_start: vertical coordinate of the optical center (13-bit unsigned integer; [1,8191])
+ *
+ * For each pixel, the x/y distances from the optical center are calculated and
+ * then transformed into the [0,255] range based on the following formula:
+ *
+ * (((d << 4) >> ns) * nf) >> 5
+ *
+ * where `d` is the distance, `ns` and `nf` are the normalization parameters:
+ *
+ * @x_nf: horizontal normalization scale parameter (5-bit unsigned integer; [0,31])
+ * @x_ns: horizontal normalization shift parameter (4-bit unsigned integer; [0,15])
+ *
+ * @y_nf: vertical normalization scale parameter (5-bit unsigned integer; [0,31])
+ * @y_ns: vertical normalization shift parameter (4-bit unsigned integer; [0,15])
+ *
+ * These parameters should be chosen based on the image resolution, the position
+ * of the optical center, and the shape of pixels, so that no normalized distance
+ * is larger than 255. If the pixels have square shape, the two sets of parameters
+ * should be equal.
+ *
+ * The actual amount of correction is calculated with a third degree polynomial:
+ *
+ * c[0] * r + c[1] * r^2 + c[2] * r^3
+ *
+ * where `c` is the set of coefficients for the given color, and `r` is distance:
+ *
+ * @red: red coefficients (5.4 two's complement; [-16,15.9375])
+ * @blue: blue coefficients (5.4 two's complement; [-16,15.9375])
+ *
+ * Finally, the amount is clipped as requested:
+ *
+ * @h_clip_mode: maximum horizontal shift (from enum rkisp1_cif_isp_cac_h_clip_mode)
+ * @v_clip_mode: maximum vertical shift (from enum rkisp1_cif_isp_cac_v_clip_mode)
+ *
+ * A positive result will shift away from the optical center, while a negative
+ * one will shift towards the optical center. In the latter case, the pixel
+ * values at the edges are duplicated.
+ */
+struct rkisp1_cif_isp_cac_config {
+ __u8 h_clip_mode;
+ __u8 v_clip_mode;
+
+ __u16 h_count_start;
+ __u16 v_count_start;
+
+ __u16 red[3];
+ __u16 blue[3];
+
+ __u8 x_nf;
+ __u8 x_ns;
+
+ __u8 y_nf;
+ __u8 y_ns;
+};
+
/*---------- PART2: Measurement Statistics ------------*/
/**
@@ -1138,6 +1224,7 @@ struct rkisp1_stat_buffer {
* @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve
* @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve
* @RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR: Wide dynamic range
+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CAC: Chromatic aberration correction
*/
enum rkisp1_ext_params_block_type {
RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,
@@ -1161,6 +1248,7 @@ enum rkisp1_ext_params_block_type {
RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,
RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,
RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,
+ RKISP1_EXT_PARAMS_BLOCK_TYPE_CAC,
};
/* For backward compatibility */
@@ -1507,6 +1595,22 @@ struct rkisp1_ext_params_wdr_config {
struct rkisp1_cif_isp_wdr_config config;
} __attribute__((aligned(8)));
+/**
+ * struct rkisp1_ext_params_cac_config - RkISP1 extensible params CAC config
+ *
+ * RkISP1 extensible parameters CAC block.
+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CAC`.
+ *
+ * @header: The RkISP1 extensible parameters header, see
+ * :c:type:`rkisp1_ext_params_block_header`
+ * @config: CAC configuration, see
+ * :c:type:`rkisp1_cif_isp_cac_config`
+ */
+struct rkisp1_ext_params_cac_config {
+ struct rkisp1_ext_params_block_header header;
+ struct rkisp1_cif_isp_cac_config config;
+} __attribute__((aligned(8)));
+
/*
* The rkisp1_ext_params_compand_curve_config structure is counted twice as it
* is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.
@@ -1532,14 +1636,15 @@ struct rkisp1_ext_params_wdr_config {
sizeof(struct rkisp1_ext_params_compand_bls_config) +\
sizeof(struct rkisp1_ext_params_compand_curve_config) +\
sizeof(struct rkisp1_ext_params_compand_curve_config) +\
- sizeof(struct rkisp1_ext_params_wdr_config))
+ sizeof(struct rkisp1_ext_params_wdr_config) +\
+ sizeof(struct rkisp1_ext_params_cac_config))
/**
- * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version
+ * enum rkisp1_ext_param_buffer_version - RkISP1 extensible parameters version
*
* @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters
*/
-enum rksip1_ext_param_buffer_version {
+enum rkisp1_ext_param_buffer_version {
RKISP1_EXT_PARAM_BUFFER_V1 = V4L2_ISP_PARAMS_VERSION_V1,
};
@@ -1601,7 +1706,7 @@ enum rksip1_ext_param_buffer_version {
* +---------------------------------------------------------------------+
*
* @version: The RkISP1 extensible parameters buffer version, see
- * :c:type:`rksip1_ext_param_buffer_version`
+ * :c:type:`rkisp1_ext_param_buffer_version`
* @data_size: The RkISP1 configuration data effective size, excluding this
* header
* @data: The RkISP1 extensible configuration data blocks
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index dab9493c791b..27265fd31e5f 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -840,6 +840,7 @@ enum {
#define RTEXT_FILTER_CFM_CONFIG (1 << 5)
#define RTEXT_FILTER_CFM_STATUS (1 << 6)
#define RTEXT_FILTER_MST (1 << 7)
+#define RTEXT_FILTER_NAME_ONLY (1 << 8)
/* End of information exported to user level */
diff --git a/include/uapi/linux/sunrpc_netlink.h b/include/uapi/linux/sunrpc_netlink.h
new file mode 100644
index 000000000000..34677f0ec2f9
--- /dev/null
+++ b/include/uapi/linux/sunrpc_netlink.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/* Do not edit directly, auto-generated from: */
+/* Documentation/netlink/specs/sunrpc_cache.yaml */
+/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
+
+#ifndef _UAPI_LINUX_SUNRPC_NETLINK_H
+#define _UAPI_LINUX_SUNRPC_NETLINK_H
+
+#define SUNRPC_FAMILY_NAME "sunrpc"
+#define SUNRPC_FAMILY_VERSION 1
+
+enum sunrpc_cache_type {
+ SUNRPC_CACHE_TYPE_IP_MAP = 1,
+ SUNRPC_CACHE_TYPE_UNIX_GID = 2,
+};
+
+enum {
+ SUNRPC_A_CACHE_NOTIFY_CACHE_TYPE = 1,
+
+ __SUNRPC_A_CACHE_NOTIFY_MAX,
+ SUNRPC_A_CACHE_NOTIFY_MAX = (__SUNRPC_A_CACHE_NOTIFY_MAX - 1)
+};
+
+enum {
+ SUNRPC_A_IP_MAP_SEQNO = 1,
+ SUNRPC_A_IP_MAP_CLASS,
+ SUNRPC_A_IP_MAP_ADDR,
+ SUNRPC_A_IP_MAP_DOMAIN,
+ SUNRPC_A_IP_MAP_NEGATIVE,
+ SUNRPC_A_IP_MAP_EXPIRY,
+
+ __SUNRPC_A_IP_MAP_MAX,
+ SUNRPC_A_IP_MAP_MAX = (__SUNRPC_A_IP_MAP_MAX - 1)
+};
+
+enum {
+ SUNRPC_A_IP_MAP_REQS_REQUESTS = 1,
+
+ __SUNRPC_A_IP_MAP_REQS_MAX,
+ SUNRPC_A_IP_MAP_REQS_MAX = (__SUNRPC_A_IP_MAP_REQS_MAX - 1)
+};
+
+enum {
+ SUNRPC_A_UNIX_GID_SEQNO = 1,
+ SUNRPC_A_UNIX_GID_UID,
+ SUNRPC_A_UNIX_GID_GIDS,
+ SUNRPC_A_UNIX_GID_NEGATIVE,
+ SUNRPC_A_UNIX_GID_EXPIRY,
+
+ __SUNRPC_A_UNIX_GID_MAX,
+ SUNRPC_A_UNIX_GID_MAX = (__SUNRPC_A_UNIX_GID_MAX - 1)
+};
+
+enum {
+ SUNRPC_A_UNIX_GID_REQS_REQUESTS = 1,
+
+ __SUNRPC_A_UNIX_GID_REQS_MAX,
+ SUNRPC_A_UNIX_GID_REQS_MAX = (__SUNRPC_A_UNIX_GID_REQS_MAX - 1)
+};
+
+enum {
+ SUNRPC_A_CACHE_FLUSH_MASK = 1,
+
+ __SUNRPC_A_CACHE_FLUSH_MAX,
+ SUNRPC_A_CACHE_FLUSH_MAX = (__SUNRPC_A_CACHE_FLUSH_MAX - 1)
+};
+
+enum {
+ SUNRPC_CMD_CACHE_NOTIFY = 1,
+ SUNRPC_CMD_IP_MAP_GET_REQS,
+ SUNRPC_CMD_IP_MAP_SET_REQS,
+ SUNRPC_CMD_UNIX_GID_GET_REQS,
+ SUNRPC_CMD_UNIX_GID_SET_REQS,
+ SUNRPC_CMD_CACHE_FLUSH,
+
+ __SUNRPC_CMD_MAX,
+ SUNRPC_CMD_MAX = (__SUNRPC_CMD_MAX - 1)
+};
+
+#define SUNRPC_MCGRP_NONE "none"
+#define SUNRPC_MCGRP_EXPORTD "exportd"
+
+#endif /* _UAPI_LINUX_SUNRPC_NETLINK_H */
diff --git a/include/uapi/linux/synclink.h b/include/uapi/linux/synclink.h
deleted file mode 100644
index 62f32d4e1021..000000000000
--- a/include/uapi/linux/synclink.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
-/*
- * SyncLink Multiprotocol Serial Adapter Driver
- *
- * $Id: synclink.h,v 3.14 2006/07/17 20:15:43 paulkf Exp $
- *
- * Copyright (C) 1998-2000 by Microgate Corporation
- *
- * Redistribution of this file is permitted under
- * the terms of the GNU Public License (GPL)
- */
-
-#ifndef _UAPI_SYNCLINK_H_
-#define _UAPI_SYNCLINK_H_
-#define SYNCLINK_H_VERSION 3.6
-
-#include <linux/types.h>
-
-#define BIT0 0x0001
-#define BIT1 0x0002
-#define BIT2 0x0004
-#define BIT3 0x0008
-#define BIT4 0x0010
-#define BIT5 0x0020
-#define BIT6 0x0040
-#define BIT7 0x0080
-#define BIT8 0x0100
-#define BIT9 0x0200
-#define BIT10 0x0400
-#define BIT11 0x0800
-#define BIT12 0x1000
-#define BIT13 0x2000
-#define BIT14 0x4000
-#define BIT15 0x8000
-#define BIT16 0x00010000
-#define BIT17 0x00020000
-#define BIT18 0x00040000
-#define BIT19 0x00080000
-#define BIT20 0x00100000
-#define BIT21 0x00200000
-#define BIT22 0x00400000
-#define BIT23 0x00800000
-#define BIT24 0x01000000
-#define BIT25 0x02000000
-#define BIT26 0x04000000
-#define BIT27 0x08000000
-#define BIT28 0x10000000
-#define BIT29 0x20000000
-#define BIT30 0x40000000
-#define BIT31 0x80000000
-
-
-#define HDLC_MAX_FRAME_SIZE 65535
-#define MAX_ASYNC_TRANSMIT 4096
-#define MAX_ASYNC_BUFFER_SIZE 4096
-
-#define ASYNC_PARITY_NONE 0
-#define ASYNC_PARITY_EVEN 1
-#define ASYNC_PARITY_ODD 2
-#define ASYNC_PARITY_SPACE 3
-
-#define HDLC_FLAG_UNDERRUN_ABORT7 0x0000
-#define HDLC_FLAG_UNDERRUN_ABORT15 0x0001
-#define HDLC_FLAG_UNDERRUN_FLAG 0x0002
-#define HDLC_FLAG_UNDERRUN_CRC 0x0004
-#define HDLC_FLAG_SHARE_ZERO 0x0010
-#define HDLC_FLAG_AUTO_CTS 0x0020
-#define HDLC_FLAG_AUTO_DCD 0x0040
-#define HDLC_FLAG_AUTO_RTS 0x0080
-#define HDLC_FLAG_RXC_DPLL 0x0100
-#define HDLC_FLAG_RXC_BRG 0x0200
-#define HDLC_FLAG_RXC_TXCPIN 0x8000
-#define HDLC_FLAG_RXC_RXCPIN 0x0000
-#define HDLC_FLAG_TXC_DPLL 0x0400
-#define HDLC_FLAG_TXC_BRG 0x0800
-#define HDLC_FLAG_TXC_TXCPIN 0x0000
-#define HDLC_FLAG_TXC_RXCPIN 0x0008
-#define HDLC_FLAG_DPLL_DIV8 0x1000
-#define HDLC_FLAG_DPLL_DIV16 0x2000
-#define HDLC_FLAG_DPLL_DIV32 0x0000
-#define HDLC_FLAG_HDLC_LOOPMODE 0x4000
-
-#define HDLC_CRC_NONE 0
-#define HDLC_CRC_16_CCITT 1
-#define HDLC_CRC_32_CCITT 2
-#define HDLC_CRC_MASK 0x00ff
-#define HDLC_CRC_RETURN_EX 0x8000
-
-#define RX_OK 0
-#define RX_CRC_ERROR 1
-
-#define HDLC_TXIDLE_FLAGS 0
-#define HDLC_TXIDLE_ALT_ZEROS_ONES 1
-#define HDLC_TXIDLE_ZEROS 2
-#define HDLC_TXIDLE_ONES 3
-#define HDLC_TXIDLE_ALT_MARK_SPACE 4
-#define HDLC_TXIDLE_SPACE 5
-#define HDLC_TXIDLE_MARK 6
-#define HDLC_TXIDLE_CUSTOM_8 0x10000000
-#define HDLC_TXIDLE_CUSTOM_16 0x20000000
-
-#define HDLC_ENCODING_NRZ 0
-#define HDLC_ENCODING_NRZB 1
-#define HDLC_ENCODING_NRZI_MARK 2
-#define HDLC_ENCODING_NRZI_SPACE 3
-#define HDLC_ENCODING_NRZI HDLC_ENCODING_NRZI_SPACE
-#define HDLC_ENCODING_BIPHASE_MARK 4
-#define HDLC_ENCODING_BIPHASE_SPACE 5
-#define HDLC_ENCODING_BIPHASE_LEVEL 6
-#define HDLC_ENCODING_DIFF_BIPHASE_LEVEL 7
-
-#define HDLC_PREAMBLE_LENGTH_8BITS 0
-#define HDLC_PREAMBLE_LENGTH_16BITS 1
-#define HDLC_PREAMBLE_LENGTH_32BITS 2
-#define HDLC_PREAMBLE_LENGTH_64BITS 3
-
-#define HDLC_PREAMBLE_PATTERN_NONE 0
-#define HDLC_PREAMBLE_PATTERN_ZEROS 1
-#define HDLC_PREAMBLE_PATTERN_FLAGS 2
-#define HDLC_PREAMBLE_PATTERN_10 3
-#define HDLC_PREAMBLE_PATTERN_01 4
-#define HDLC_PREAMBLE_PATTERN_ONES 5
-
-#define MGSL_MODE_ASYNC 1
-#define MGSL_MODE_HDLC 2
-#define MGSL_MODE_MONOSYNC 3
-#define MGSL_MODE_BISYNC 4
-#define MGSL_MODE_RAW 6
-#define MGSL_MODE_BASE_CLOCK 7
-#define MGSL_MODE_XSYNC 8
-
-#define MGSL_BUS_TYPE_ISA 1
-#define MGSL_BUS_TYPE_EISA 2
-#define MGSL_BUS_TYPE_PCI 5
-
-#define MGSL_INTERFACE_MASK 0xf
-#define MGSL_INTERFACE_DISABLE 0
-#define MGSL_INTERFACE_RS232 1
-#define MGSL_INTERFACE_V35 2
-#define MGSL_INTERFACE_RS422 3
-#define MGSL_INTERFACE_RTS_EN 0x10
-#define MGSL_INTERFACE_LL 0x20
-#define MGSL_INTERFACE_RL 0x40
-#define MGSL_INTERFACE_MSB_FIRST 0x80
-
-typedef struct _MGSL_PARAMS
-{
- /* Common */
-
- unsigned long mode; /* Asynchronous or HDLC */
- unsigned char loopback; /* internal loopback mode */
-
- /* HDLC Only */
-
- unsigned short flags;
- unsigned char encoding; /* NRZ, NRZI, etc. */
- unsigned long clock_speed; /* external clock speed in bits per second */
- unsigned char addr_filter; /* receive HDLC address filter, 0xFF = disable */
- unsigned short crc_type; /* None, CRC16-CCITT, or CRC32-CCITT */
- unsigned char preamble_length;
- unsigned char preamble;
-
- /* Async Only */
-
- unsigned long data_rate; /* bits per second */
- unsigned char data_bits; /* 7 or 8 data bits */
- unsigned char stop_bits; /* 1 or 2 stop bits */
- unsigned char parity; /* none, even, or odd */
-
-} MGSL_PARAMS, *PMGSL_PARAMS;
-
-#define MICROGATE_VENDOR_ID 0x13c0
-#define SYNCLINK_DEVICE_ID 0x0010
-#define MGSCC_DEVICE_ID 0x0020
-#define SYNCLINK_SCA_DEVICE_ID 0x0030
-#define SYNCLINK_GT_DEVICE_ID 0x0070
-#define SYNCLINK_GT4_DEVICE_ID 0x0080
-#define SYNCLINK_AC_DEVICE_ID 0x0090
-#define SYNCLINK_GT2_DEVICE_ID 0x00A0
-#define MGSL_MAX_SERIAL_NUMBER 30
-
-/*
-** device diagnostics status
-*/
-
-#define DiagStatus_OK 0
-#define DiagStatus_AddressFailure 1
-#define DiagStatus_AddressConflict 2
-#define DiagStatus_IrqFailure 3
-#define DiagStatus_IrqConflict 4
-#define DiagStatus_DmaFailure 5
-#define DiagStatus_DmaConflict 6
-#define DiagStatus_PciAdapterNotFound 7
-#define DiagStatus_CantAssignPciResources 8
-#define DiagStatus_CantAssignPciMemAddr 9
-#define DiagStatus_CantAssignPciIoAddr 10
-#define DiagStatus_CantAssignPciIrq 11
-#define DiagStatus_MemoryError 12
-
-#define SerialSignal_DCD 0x01 /* Data Carrier Detect */
-#define SerialSignal_TXD 0x02 /* Transmit Data */
-#define SerialSignal_RI 0x04 /* Ring Indicator */
-#define SerialSignal_RXD 0x08 /* Receive Data */
-#define SerialSignal_CTS 0x10 /* Clear to Send */
-#define SerialSignal_RTS 0x20 /* Request to Send */
-#define SerialSignal_DSR 0x40 /* Data Set Ready */
-#define SerialSignal_DTR 0x80 /* Data Terminal Ready */
-
-
-/*
- * Counters of the input lines (CTS, DSR, RI, CD) interrupts
- */
-struct mgsl_icount {
- __u32 cts, dsr, rng, dcd, tx, rx;
- __u32 frame, parity, overrun, brk;
- __u32 buf_overrun;
- __u32 txok;
- __u32 txunder;
- __u32 txabort;
- __u32 txtimeout;
- __u32 rxshort;
- __u32 rxlong;
- __u32 rxabort;
- __u32 rxover;
- __u32 rxcrc;
- __u32 rxok;
- __u32 exithunt;
- __u32 rxidle;
-};
-
-struct gpio_desc {
- __u32 state;
- __u32 smask;
- __u32 dir;
- __u32 dmask;
-};
-
-#define DEBUG_LEVEL_DATA 1
-#define DEBUG_LEVEL_ERROR 2
-#define DEBUG_LEVEL_INFO 3
-#define DEBUG_LEVEL_BH 4
-#define DEBUG_LEVEL_ISR 5
-
-/*
-** Event bit flags for use with MgslWaitEvent
-*/
-
-#define MgslEvent_DsrActive 0x0001
-#define MgslEvent_DsrInactive 0x0002
-#define MgslEvent_Dsr 0x0003
-#define MgslEvent_CtsActive 0x0004
-#define MgslEvent_CtsInactive 0x0008
-#define MgslEvent_Cts 0x000c
-#define MgslEvent_DcdActive 0x0010
-#define MgslEvent_DcdInactive 0x0020
-#define MgslEvent_Dcd 0x0030
-#define MgslEvent_RiActive 0x0040
-#define MgslEvent_RiInactive 0x0080
-#define MgslEvent_Ri 0x00c0
-#define MgslEvent_ExitHuntMode 0x0100
-#define MgslEvent_IdleReceived 0x0200
-
-/* Private IOCTL codes:
- *
- * MGSL_IOCSPARAMS set MGSL_PARAMS structure values
- * MGSL_IOCGPARAMS get current MGSL_PARAMS structure values
- * MGSL_IOCSTXIDLE set current transmit idle mode
- * MGSL_IOCGTXIDLE get current transmit idle mode
- * MGSL_IOCTXENABLE enable or disable transmitter
- * MGSL_IOCRXENABLE enable or disable receiver
- * MGSL_IOCTXABORT abort transmitting frame (HDLC)
- * MGSL_IOCGSTATS return current statistics
- * MGSL_IOCWAITEVENT wait for specified event to occur
- * MGSL_LOOPTXDONE transmit in HDLC LoopMode done
- * MGSL_IOCSIF set the serial interface type
- * MGSL_IOCGIF get the serial interface type
- */
-#define MGSL_MAGIC_IOC 'm'
-#define MGSL_IOCSPARAMS _IOW(MGSL_MAGIC_IOC,0,struct _MGSL_PARAMS)
-#define MGSL_IOCGPARAMS _IOR(MGSL_MAGIC_IOC,1,struct _MGSL_PARAMS)
-#define MGSL_IOCSTXIDLE _IO(MGSL_MAGIC_IOC,2)
-#define MGSL_IOCGTXIDLE _IO(MGSL_MAGIC_IOC,3)
-#define MGSL_IOCTXENABLE _IO(MGSL_MAGIC_IOC,4)
-#define MGSL_IOCRXENABLE _IO(MGSL_MAGIC_IOC,5)
-#define MGSL_IOCTXABORT _IO(MGSL_MAGIC_IOC,6)
-#define MGSL_IOCGSTATS _IO(MGSL_MAGIC_IOC,7)
-#define MGSL_IOCWAITEVENT _IOWR(MGSL_MAGIC_IOC,8,int)
-#define MGSL_IOCCLRMODCOUNT _IO(MGSL_MAGIC_IOC,15)
-#define MGSL_IOCLOOPTXDONE _IO(MGSL_MAGIC_IOC,9)
-#define MGSL_IOCSIF _IO(MGSL_MAGIC_IOC,10)
-#define MGSL_IOCGIF _IO(MGSL_MAGIC_IOC,11)
-#define MGSL_IOCSGPIO _IOW(MGSL_MAGIC_IOC,16,struct gpio_desc)
-#define MGSL_IOCGGPIO _IOR(MGSL_MAGIC_IOC,17,struct gpio_desc)
-#define MGSL_IOCWAITGPIO _IOWR(MGSL_MAGIC_IOC,18,struct gpio_desc)
-#define MGSL_IOCSXSYNC _IO(MGSL_MAGIC_IOC, 19)
-#define MGSL_IOCGXSYNC _IO(MGSL_MAGIC_IOC, 20)
-#define MGSL_IOCSXCTRL _IO(MGSL_MAGIC_IOC, 21)
-#define MGSL_IOCGXCTRL _IO(MGSL_MAGIC_IOC, 22)
-
-
-#endif /* _UAPI_SYNCLINK_H_ */
diff --git a/include/uapi/linux/tee.h b/include/uapi/linux/tee.h
index cab5cadca8ef..5203977ed35d 100644
--- a/include/uapi/linux/tee.h
+++ b/include/uapi/linux/tee.h
@@ -470,6 +470,7 @@ struct tee_ioctl_object_invoke_arg {
__u32 op;
__u32 ret;
__u32 num_params;
+ __u32 :32;
/* num_params tells the actual number of element in params */
struct tee_ioctl_param params[];
};
diff --git a/include/uapi/linux/tls.h b/include/uapi/linux/tls.h
index b8b9c42f848c..1245ab38afc1 100644
--- a/include/uapi/linux/tls.h
+++ b/include/uapi/linux/tls.h
@@ -203,6 +203,6 @@ enum {
#define TLS_CONF_BASE 1
#define TLS_CONF_SW 2
#define TLS_CONF_HW 3
-#define TLS_CONF_HW_RECORD 4
+#define TLS_CONF_HW_RECORD 4 /* unused */
#endif /* _UAPI_LINUX_TLS_H */
diff --git a/include/uapi/linux/userio.h b/include/uapi/linux/userio.h
index 74c9951d2cd0..550c7465af1f 100644
--- a/include/uapi/linux/userio.h
+++ b/include/uapi/linux/userio.h
@@ -2,7 +2,7 @@
/*
* userio: virtual serio device support
* Copyright (C) 2015 Red Hat
- * Copyright (C) 2015 Lyude (Stephen Chandler Paul) <cpaul@redhat.com>
+ * Copyright (C) 2015 Lyude Paul <thatslyude@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
@@ -27,7 +27,10 @@
enum userio_cmd_type {
USERIO_CMD_REGISTER = 0,
USERIO_CMD_SET_PORT_TYPE = 1,
- USERIO_CMD_SEND_INTERRUPT = 2
+ USERIO_CMD_SEND_INTERRUPT = 2,
+ USERIO_CMD_SET_PORT_EXTRA = 3,
+ USERIO_CMD_SET_PORT_ID = 4,
+ USERIO_CMD_SET_PORT_PROTO = 5,
};
/*
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 68dd0c4e47b2..affec0ab4781 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -464,6 +464,8 @@ enum v4l2_mpeg_video_intra_refresh_period_type {
V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC = 1,
};
+#define V4L2_CID_MPEG_VIDEO_BACKGROUND_DETECTION (V4L2_CID_CODEC_BASE + 238)
+
/* CIDs for the MPEG-2 Part 2 (H.262) codec */
#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270)
enum v4l2_mpeg_video_mpeg2_level {
diff --git a/include/uapi/linux/virtio_can.h b/include/uapi/linux/virtio_can.h
new file mode 100644
index 000000000000..e054d5099241
--- /dev/null
+++ b/include/uapi/linux/virtio_can.h
@@ -0,0 +1,78 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Copyright (C) 2021-2023 OpenSynergy GmbH
+ * Copyright Red Hat, Inc. 2025
+ */
+#ifndef _LINUX_VIRTIO_VIRTIO_CAN_H
+#define _LINUX_VIRTIO_VIRTIO_CAN_H
+
+#include <linux/types.h>
+#include <linux/virtio_types.h>
+#include <linux/virtio_ids.h>
+#include <linux/virtio_config.h>
+
+/* Feature bit numbers */
+#define VIRTIO_CAN_F_CAN_CLASSIC 0
+#define VIRTIO_CAN_F_CAN_FD 1
+#define VIRTIO_CAN_F_RTR_FRAMES 2
+#define VIRTIO_CAN_F_LATE_TX_ACK 3
+
+/* CAN Result Types */
+#define VIRTIO_CAN_RESULT_OK 0
+#define VIRTIO_CAN_RESULT_NOT_OK 1
+
+/* CAN flags to determine type of CAN Id */
+#define VIRTIO_CAN_FLAGS_EXTENDED 0x8000
+#define VIRTIO_CAN_FLAGS_FD 0x4000
+#define VIRTIO_CAN_FLAGS_RTR 0x2000
+
+#define VIRTIO_CAN_MAX_DLEN 64 /* this is like CANFD_MAX_DLEN */
+
+struct virtio_can_config {
+#define VIRTIO_CAN_S_CTRL_BUSOFF (1u << 0) /* Controller BusOff */
+ /* CAN controller status */
+ __le16 status;
+};
+
+/* TX queue message types */
+struct virtio_can_tx_out {
+#define VIRTIO_CAN_TX 0x0001
+ __le16 msg_type;
+ __le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
+ __u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
+ __u8 padding;
+ __le16 reserved_xl_priority; /* May be needed for CAN XL priority */
+ __le32 flags;
+ __le32 can_id;
+ __u8 sdu[] __counted_by_le(length);
+};
+
+struct virtio_can_tx_in {
+ __u8 result;
+};
+
+/* RX queue message types */
+struct virtio_can_rx {
+#define VIRTIO_CAN_RX 0x0101
+ __le16 msg_type;
+ __le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
+ __u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
+ __u8 padding;
+ __le16 reserved_xl_priority; /* May be needed for CAN XL priority */
+ __le32 flags;
+ __le32 can_id;
+ __u8 sdu[] __counted_by_le(length);
+};
+
+/* Control queue message types */
+struct virtio_can_control_out {
+#define VIRTIO_CAN_SET_CTRL_MODE_START 0x0201
+#define VIRTIO_CAN_SET_CTRL_MODE_STOP 0x0202
+ __le16 msg_type;
+};
+
+struct virtio_can_control_in {
+ __u8 result;
+};
+
+#endif /* #ifndef _LINUX_VIRTIO_VIRTIO_CAN_H */
diff --git a/include/uapi/linux/virtio_console.h b/include/uapi/linux/virtio_console.h
index 7e6ec2ff0560..0506539e6553 100644
--- a/include/uapi/linux/virtio_console.h
+++ b/include/uapi/linux/virtio_console.h
@@ -44,7 +44,7 @@
#define VIRTIO_CONSOLE_BAD_ID (~(__u32)0)
struct virtio_console_config {
- /* colums of the screens */
+ /* columns of the screens */
__virtio16 cols;
/* rows of the screens */
__virtio16 rows;
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index be109777d10d..4f530d90058c 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -64,6 +64,14 @@
* context_init and multiple timelines
*/
#define VIRTIO_GPU_F_CONTEXT_INIT 4
+/*
+ * The device provides a valid blob_alignment
+ * field in its configuration and both
+ * VIRTIO_GPU_CMD_RESOURCE_CREATE_BLOB and
+ * VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB requests
+ * must be aligned to that value.
+ */
+#define VIRTIO_GPU_F_BLOB_ALIGNMENT 5
enum virtio_gpu_ctrl_type {
VIRTIO_GPU_UNDEFINED = 0,
@@ -365,6 +373,7 @@ struct virtio_gpu_config {
__le32 events_clear;
__le32 num_scanouts;
__le32 num_capsets;
+ __le32 blob_alignment;
};
/* simple formats for fbcon/X use */
diff --git a/include/uapi/linux/watchdog.h b/include/uapi/linux/watchdog.h
index b15cde5c9054..fc73c17ee182 100644
--- a/include/uapi/linux/watchdog.h
+++ b/include/uapi/linux/watchdog.h
@@ -36,6 +36,7 @@ struct watchdog_info {
#define WDIOF_UNKNOWN -1 /* Unknown flag error */
#define WDIOS_UNKNOWN -1 /* Unknown status error */
+/* Bit masks for watchdog_info.options, GETSTATUS and GETBOOTSTATUS ioctls */
#define WDIOF_OVERHEAT 0x0001 /* Reset due to CPU overheat */
#define WDIOF_FANFAULT 0x0002 /* Fan failed */
#define WDIOF_EXTERN1 0x0004 /* External relay 1 */
@@ -50,6 +51,7 @@ struct watchdog_info {
other external alarm not a reboot */
#define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */
+/* Bit masks for WDIOC_SETOPTIONS ioctl */
#define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */
#define WDIOS_ENABLECARD 0x0002 /* Turn on the watchdog timer */
#define WDIOS_TEMPPANIC 0x0004 /* Kernel panic on temperature trip */
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index a23495c0e0a1..051f8066efd1 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -227,6 +227,9 @@ enum {
#define XFRM_MSG_SETDEFAULT XFRM_MSG_SETDEFAULT
XFRM_MSG_GETDEFAULT,
#define XFRM_MSG_GETDEFAULT XFRM_MSG_GETDEFAULT
+
+ XFRM_MSG_MIGRATE_STATE,
+#define XFRM_MSG_MIGRATE_STATE XFRM_MSG_MIGRATE_STATE
__XFRM_MSG_MAX
};
#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)
@@ -507,6 +510,28 @@ struct xfrm_user_migrate {
__u16 new_family;
};
+struct xfrm_user_migrate_state {
+ struct xfrm_usersa_id id;
+ xfrm_address_t new_daddr;
+ xfrm_address_t new_saddr;
+ struct xfrm_mark old_mark;
+ struct xfrm_selector new_sel;
+ __u32 new_reqid;
+ __u32 flags;
+ __u16 new_family;
+ __u16 reserved;
+};
+
+/* Flags for xfrm_user_migrate_state.flags */
+enum xfrm_migrate_state_flags {
+ XFRM_MIGRATE_STATE_CLEAR_OFFLOAD = 1, /* do not inherit offload from existing SA */
+ XFRM_MIGRATE_STATE_UPDATE_H2H_SEL = 2, /* update H2H selector from new daddr/saddr */
+};
+
+/* All flags defined as of this header version; unknown bits are rejected. */
+#define XFRM_MIGRATE_STATE_KNOWN_FLAGS \
+ (XFRM_MIGRATE_STATE_CLEAR_OFFLOAD | XFRM_MIGRATE_STATE_UPDATE_H2H_SEL)
+
struct xfrm_user_mapping {
struct xfrm_usersa_id id;
__u32 reqid;
diff --git a/include/uapi/rdma/bnxt_re-abi.h b/include/uapi/rdma/bnxt_re-abi.h
index 40955eaba32e..a4599d7b736a 100644
--- a/include/uapi/rdma/bnxt_re-abi.h
+++ b/include/uapi/rdma/bnxt_re-abi.h
@@ -126,7 +126,7 @@ struct bnxt_re_resize_cq_req {
};
enum bnxt_re_qp_mask {
- BNXT_RE_QP_REQ_MASK_VAR_WQE_SQ_SLOTS = 0x1,
+ BNXT_RE_QP_REQ_MASK_FIXED_QUE_ATTR = 0x1,
};
struct bnxt_re_qp_req {
@@ -135,6 +135,11 @@ struct bnxt_re_qp_req {
__aligned_u64 qp_handle;
__aligned_u64 comp_mask;
__u32 sq_slots;
+ __u32 sq_npsn;
+};
+
+enum bnxt_re_create_qp_attrs {
+ BNXT_RE_CREATE_QP_ATTR_DBR_HANDLE = UVERBS_ID_DRIVER_NS_WITH_UHW,
};
struct bnxt_re_qp_resp {
diff --git a/include/uapi/rdma/ib_user_ioctl_cmds.h b/include/uapi/rdma/ib_user_ioctl_cmds.h
index 72041c1b0ea5..839835bd4b23 100644
--- a/include/uapi/rdma/ib_user_ioctl_cmds.h
+++ b/include/uapi/rdma/ib_user_ioctl_cmds.h
@@ -117,6 +117,7 @@ enum uverbs_attrs_create_cq_cmd_attr_ids {
UVERBS_ATTR_CREATE_CQ_BUFFER_LENGTH,
UVERBS_ATTR_CREATE_CQ_BUFFER_FD,
UVERBS_ATTR_CREATE_CQ_BUFFER_OFFSET,
+ UVERBS_ATTR_CREATE_CQ_BUF_UMEM,
};
enum uverbs_attrs_destroy_cq_cmd_attr_ids {
@@ -158,6 +159,9 @@ enum uverbs_attrs_create_qp_cmd_attr_ids {
UVERBS_ATTR_CREATE_QP_EVENT_FD,
UVERBS_ATTR_CREATE_QP_RESP_CAP,
UVERBS_ATTR_CREATE_QP_RESP_QP_NUM,
+ UVERBS_ATTR_CREATE_QP_BUF_UMEM,
+ UVERBS_ATTR_CREATE_QP_RQ_BUF_UMEM,
+ UVERBS_ATTR_CREATE_QP_SQ_BUF_UMEM,
};
enum uverbs_attrs_destroy_qp_cmd_attr_ids {
diff --git a/include/uapi/rdma/ib_user_ioctl_verbs.h b/include/uapi/rdma/ib_user_ioctl_verbs.h
index 90c5cd8e7753..51030c27d479 100644
--- a/include/uapi/rdma/ib_user_ioctl_verbs.h
+++ b/include/uapi/rdma/ib_user_ioctl_verbs.h
@@ -273,4 +273,31 @@ struct ib_uverbs_gid_entry {
__u32 netdev_ifindex; /* It is 0 if there is no netdev associated with it */
};
+enum ib_uverbs_buffer_type {
+ IB_UVERBS_BUFFER_TYPE_DMABUF,
+ IB_UVERBS_BUFFER_TYPE_VA,
+};
+
+/*
+ * Describes a single buffer backed by dma-buf or user virtual address.
+ * Used as the payload of a per-attribute UVERBS_ATTR_UMEM-typed attribute.
+ *
+ * @type: buffer type from enum ib_uverbs_buffer_type
+ * @fd: dma-buf file descriptor (valid for IB_UVERBS_BUFFER_TYPE_DMABUF)
+ * @flags: required flags; the kernel rejects the call with -EINVAL if any
+ * bit is not understood. No bits are defined yet.
+ * @optional_flags: advisory flags; bits the kernel does not understand are
+ * silently ignored. No bits are defined yet.
+ * @addr: offset within dma-buf, or user virtual address for VA
+ * @length: buffer length in bytes
+ */
+struct ib_uverbs_buffer_desc {
+ __u32 type;
+ __s32 fd;
+ __u32 flags;
+ __u32 optional_flags;
+ __aligned_u64 addr;
+ __aligned_u64 length;
+};
+
#endif
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
index 3b7bd99813e9..d2aeadb6d2f9 100644
--- a/include/uapi/rdma/ib_user_verbs.h
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -1368,6 +1368,8 @@ enum ib_uverbs_device_cap_flags {
IB_UVERBS_DEVICE_FLUSH_PERSISTENT = 1ULL << 39,
/* Atomic write attributes */
IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40,
+ /* CoCo guest with DMA bounce buffering required */
+ IB_UVERBS_DEVICE_CC_DMA_BOUNCE = 1ULL << 41,
};
enum ib_uverbs_raw_packet_caps {
diff --git a/include/uapi/rdma/mlx5_user_ioctl_cmds.h b/include/uapi/rdma/mlx5_user_ioctl_cmds.h
index 01a2a050e468..ddb898afd813 100644
--- a/include/uapi/rdma/mlx5_user_ioctl_cmds.h
+++ b/include/uapi/rdma/mlx5_user_ioctl_cmds.h
@@ -274,6 +274,11 @@ enum mlx5_ib_device_query_context_attrs {
enum mlx5_ib_create_cq_attrs {
MLX5_IB_ATTR_CREATE_CQ_UAR_INDEX = UVERBS_ID_DRIVER_NS_WITH_UHW,
+ MLX5_IB_ATTR_CREATE_CQ_DBR_BUF_UMEM,
+};
+
+enum mlx5_ib_create_qp_attrs {
+ MLX5_IB_ATTR_CREATE_QP_DBR_BUF_UMEM = UVERBS_ID_DRIVER_NS_WITH_UHW,
};
enum mlx5_ib_reg_dmabuf_mr_attrs {