Merge drm/drm-next into drm-misc-next
Backmerging to get v5.12 fixes. Requested for vmwgfx. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
This commit is contained in:
@@ -91,6 +91,8 @@ union __sifields {
|
||||
char _dummy_pkey[__ADDR_BND_PKEY_PAD];
|
||||
__u32 _pkey;
|
||||
} _addr_pkey;
|
||||
/* used when si_code=TRAP_PERF */
|
||||
unsigned long _perf;
|
||||
};
|
||||
} _sigfault;
|
||||
|
||||
@@ -155,6 +157,7 @@ typedef struct siginfo {
|
||||
#define si_lower _sifields._sigfault._addr_bnd._lower
|
||||
#define si_upper _sifields._sigfault._addr_bnd._upper
|
||||
#define si_pkey _sifields._sigfault._addr_pkey._pkey
|
||||
#define si_perf _sifields._sigfault._perf
|
||||
#define si_band _sifields._sigpoll._band
|
||||
#define si_fd _sifields._sigpoll._fd
|
||||
#define si_call_addr _sifields._sigsys._call_addr
|
||||
@@ -253,7 +256,8 @@ typedef struct siginfo {
|
||||
#define TRAP_BRANCH 3 /* process taken branch trap */
|
||||
#define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */
|
||||
#define TRAP_UNK 5 /* undiagnosed trap */
|
||||
#define NSIGTRAP 5
|
||||
#define TRAP_PERF 6 /* perf event with sigtrap=1 */
|
||||
#define NSIGTRAP 6
|
||||
|
||||
/*
|
||||
* There is an additional set of SIGTRAP si_codes used by ptrace
|
||||
|
||||
@@ -863,9 +863,18 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise)
|
||||
__SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2)
|
||||
#define __NR_mount_setattr 442
|
||||
__SYSCALL(__NR_mount_setattr, sys_mount_setattr)
|
||||
#define __NR_quotactl_path 443
|
||||
__SYSCALL(__NR_quotactl_path, sys_quotactl_path)
|
||||
|
||||
#define __NR_landlock_create_ruleset 444
|
||||
__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
|
||||
#define __NR_landlock_add_rule 445
|
||||
__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
|
||||
#define __NR_landlock_restrict_self 446
|
||||
__SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls 443
|
||||
#define __NR_syscalls 447
|
||||
|
||||
/*
|
||||
* 32 bit systems traditionally used different
|
||||
|
||||
@@ -217,6 +217,18 @@ struct binder_node_info_for_ref {
|
||||
__u32 reserved3;
|
||||
};
|
||||
|
||||
struct binder_freeze_info {
|
||||
__u32 pid;
|
||||
__u32 enable;
|
||||
__u32 timeout_ms;
|
||||
};
|
||||
|
||||
struct binder_frozen_status_info {
|
||||
__u32 pid;
|
||||
__u32 sync_recv;
|
||||
__u32 async_recv;
|
||||
};
|
||||
|
||||
#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
|
||||
#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)
|
||||
#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)
|
||||
@@ -227,6 +239,9 @@ struct binder_node_info_for_ref {
|
||||
#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info)
|
||||
#define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref)
|
||||
#define BINDER_SET_CONTEXT_MGR_EXT _IOW('b', 13, struct flat_binder_object)
|
||||
#define BINDER_FREEZE _IOW('b', 14, struct binder_freeze_info)
|
||||
#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info)
|
||||
#define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32)
|
||||
|
||||
/*
|
||||
* NOTE: Two special error codes you should check for when calling
|
||||
@@ -408,6 +423,19 @@ enum binder_driver_return_protocol {
|
||||
* The last transaction (either a bcTRANSACTION or
|
||||
* a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters.
|
||||
*/
|
||||
|
||||
BR_FROZEN_REPLY = _IO('r', 18),
|
||||
/*
|
||||
* The target of the last transaction (either a bcTRANSACTION or
|
||||
* a bcATTEMPT_ACQUIRE) is frozen. No parameters.
|
||||
*/
|
||||
|
||||
BR_ONEWAY_SPAM_SUSPECT = _IO('r', 19),
|
||||
/*
|
||||
* Current process sent too many oneway calls to target, and the last
|
||||
* asynchronous transaction makes the allocated async buffer size exceed
|
||||
* detection threshold. No parameters.
|
||||
*/
|
||||
};
|
||||
|
||||
enum binder_driver_command_protocol {
|
||||
|
||||
@@ -93,7 +93,738 @@ union bpf_iter_link_info {
|
||||
} map;
|
||||
};
|
||||
|
||||
/* BPF syscall commands, see bpf(2) man-page for details. */
|
||||
/* BPF syscall commands, see bpf(2) man-page for more details. */
|
||||
/**
|
||||
* DOC: eBPF Syscall Preamble
|
||||
*
|
||||
* The operation to be performed by the **bpf**\ () system call is determined
|
||||
* by the *cmd* argument. Each operation takes an accompanying argument,
|
||||
* provided via *attr*, which is a pointer to a union of type *bpf_attr* (see
|
||||
* below). The size argument is the size of the union pointed to by *attr*.
|
||||
*/
|
||||
/**
|
||||
* DOC: eBPF Syscall Commands
|
||||
*
|
||||
* BPF_MAP_CREATE
|
||||
* Description
|
||||
* Create a map and return a file descriptor that refers to the
|
||||
* map. The close-on-exec file descriptor flag (see **fcntl**\ (2))
|
||||
* is automatically enabled for the new file descriptor.
|
||||
*
|
||||
* Applying **close**\ (2) to the file descriptor returned by
|
||||
* **BPF_MAP_CREATE** will delete the map (but see NOTES).
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_MAP_LOOKUP_ELEM
|
||||
* Description
|
||||
* Look up an element with a given *key* in the map referred to
|
||||
* by the file descriptor *map_fd*.
|
||||
*
|
||||
* The *flags* argument may be specified as one of the
|
||||
* following:
|
||||
*
|
||||
* **BPF_F_LOCK**
|
||||
* Look up the value of a spin-locked map without
|
||||
* returning the lock. This must be specified if the
|
||||
* elements contain a spinlock.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_MAP_UPDATE_ELEM
|
||||
* Description
|
||||
* Create or update an element (key/value pair) in a specified map.
|
||||
*
|
||||
* The *flags* argument should be specified as one of the
|
||||
* following:
|
||||
*
|
||||
* **BPF_ANY**
|
||||
* Create a new element or update an existing element.
|
||||
* **BPF_NOEXIST**
|
||||
* Create a new element only if it did not exist.
|
||||
* **BPF_EXIST**
|
||||
* Update an existing element.
|
||||
* **BPF_F_LOCK**
|
||||
* Update a spin_lock-ed map element.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**,
|
||||
* **E2BIG**, **EEXIST**, or **ENOENT**.
|
||||
*
|
||||
* **E2BIG**
|
||||
* The number of elements in the map reached the
|
||||
* *max_entries* limit specified at map creation time.
|
||||
* **EEXIST**
|
||||
* If *flags* specifies **BPF_NOEXIST** and the element
|
||||
* with *key* already exists in the map.
|
||||
* **ENOENT**
|
||||
* If *flags* specifies **BPF_EXIST** and the element with
|
||||
* *key* does not exist in the map.
|
||||
*
|
||||
* BPF_MAP_DELETE_ELEM
|
||||
* Description
|
||||
* Look up and delete an element by key in a specified map.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_MAP_GET_NEXT_KEY
|
||||
* Description
|
||||
* Look up an element by key in a specified map and return the key
|
||||
* of the next element. Can be used to iterate over all elements
|
||||
* in the map.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* The following cases can be used to iterate over all elements of
|
||||
* the map:
|
||||
*
|
||||
* * If *key* is not found, the operation returns zero and sets
|
||||
* the *next_key* pointer to the key of the first element.
|
||||
* * If *key* is found, the operation returns zero and sets the
|
||||
* *next_key* pointer to the key of the next element.
|
||||
* * If *key* is the last element, returns -1 and *errno* is set
|
||||
* to **ENOENT**.
|
||||
*
|
||||
* May set *errno* to **ENOMEM**, **EFAULT**, **EPERM**, or
|
||||
* **EINVAL** on error.
|
||||
*
|
||||
* BPF_PROG_LOAD
|
||||
* Description
|
||||
* Verify and load an eBPF program, returning a new file
|
||||
* descriptor associated with the program.
|
||||
*
|
||||
* Applying **close**\ (2) to the file descriptor returned by
|
||||
* **BPF_PROG_LOAD** will unload the eBPF program (but see NOTES).
|
||||
*
|
||||
* The close-on-exec file descriptor flag (see **fcntl**\ (2)) is
|
||||
* automatically enabled for the new file descriptor.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_OBJ_PIN
|
||||
* Description
|
||||
* Pin an eBPF program or map referred by the specified *bpf_fd*
|
||||
* to the provided *pathname* on the filesystem.
|
||||
*
|
||||
* The *pathname* argument must not contain a dot (".").
|
||||
*
|
||||
* On success, *pathname* retains a reference to the eBPF object,
|
||||
* preventing deallocation of the object when the original
|
||||
* *bpf_fd* is closed. This allow the eBPF object to live beyond
|
||||
* **close**\ (\ *bpf_fd*\ ), and hence the lifetime of the parent
|
||||
* process.
|
||||
*
|
||||
* Applying **unlink**\ (2) or similar calls to the *pathname*
|
||||
* unpins the object from the filesystem, removing the reference.
|
||||
* If no other file descriptors or filesystem nodes refer to the
|
||||
* same object, it will be deallocated (see NOTES).
|
||||
*
|
||||
* The filesystem type for the parent directory of *pathname* must
|
||||
* be **BPF_FS_MAGIC**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_OBJ_GET
|
||||
* Description
|
||||
* Open a file descriptor for the eBPF object pinned to the
|
||||
* specified *pathname*.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_PROG_ATTACH
|
||||
* Description
|
||||
* Attach an eBPF program to a *target_fd* at the specified
|
||||
* *attach_type* hook.
|
||||
*
|
||||
* The *attach_type* specifies the eBPF attachment point to
|
||||
* attach the program to, and must be one of *bpf_attach_type*
|
||||
* (see below).
|
||||
*
|
||||
* The *attach_bpf_fd* must be a valid file descriptor for a
|
||||
* loaded eBPF program of a cgroup, flow dissector, LIRC, sockmap
|
||||
* or sock_ops type corresponding to the specified *attach_type*.
|
||||
*
|
||||
* The *target_fd* must be a valid file descriptor for a kernel
|
||||
* object which depends on the attach type of *attach_bpf_fd*:
|
||||
*
|
||||
* **BPF_PROG_TYPE_CGROUP_DEVICE**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SKB**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SOCK**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SOCKOPT**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SYSCTL**,
|
||||
* **BPF_PROG_TYPE_SOCK_OPS**
|
||||
*
|
||||
* Control Group v2 hierarchy with the eBPF controller
|
||||
* enabled. Requires the kernel to be compiled with
|
||||
* **CONFIG_CGROUP_BPF**.
|
||||
*
|
||||
* **BPF_PROG_TYPE_FLOW_DISSECTOR**
|
||||
*
|
||||
* Network namespace (eg /proc/self/ns/net).
|
||||
*
|
||||
* **BPF_PROG_TYPE_LIRC_MODE2**
|
||||
*
|
||||
* LIRC device path (eg /dev/lircN). Requires the kernel
|
||||
* to be compiled with **CONFIG_BPF_LIRC_MODE2**.
|
||||
*
|
||||
* **BPF_PROG_TYPE_SK_SKB**,
|
||||
* **BPF_PROG_TYPE_SK_MSG**
|
||||
*
|
||||
* eBPF map of socket type (eg **BPF_MAP_TYPE_SOCKHASH**).
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_PROG_DETACH
|
||||
* Description
|
||||
* Detach the eBPF program associated with the *target_fd* at the
|
||||
* hook specified by *attach_type*. The program must have been
|
||||
* previously attached using **BPF_PROG_ATTACH**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_PROG_TEST_RUN
|
||||
* Description
|
||||
* Run the eBPF program associated with the *prog_fd* a *repeat*
|
||||
* number of times against a provided program context *ctx_in* and
|
||||
* data *data_in*, and return the modified program context
|
||||
* *ctx_out*, *data_out* (for example, packet data), result of the
|
||||
* execution *retval*, and *duration* of the test run.
|
||||
*
|
||||
* The sizes of the buffers provided as input and output
|
||||
* parameters *ctx_in*, *ctx_out*, *data_in*, and *data_out* must
|
||||
* be provided in the corresponding variables *ctx_size_in*,
|
||||
* *ctx_size_out*, *data_size_in*, and/or *data_size_out*. If any
|
||||
* of these parameters are not provided (ie set to NULL), the
|
||||
* corresponding size field must be zero.
|
||||
*
|
||||
* Some program types have particular requirements:
|
||||
*
|
||||
* **BPF_PROG_TYPE_SK_LOOKUP**
|
||||
* *data_in* and *data_out* must be NULL.
|
||||
*
|
||||
* **BPF_PROG_TYPE_XDP**
|
||||
* *ctx_in* and *ctx_out* must be NULL.
|
||||
*
|
||||
* **BPF_PROG_TYPE_RAW_TRACEPOINT**,
|
||||
* **BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE**
|
||||
*
|
||||
* *ctx_out*, *data_in* and *data_out* must be NULL.
|
||||
* *repeat* must be zero.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* **ENOSPC**
|
||||
* Either *data_size_out* or *ctx_size_out* is too small.
|
||||
* **ENOTSUPP**
|
||||
* This command is not supported by the program type of
|
||||
* the program referred to by *prog_fd*.
|
||||
*
|
||||
* BPF_PROG_GET_NEXT_ID
|
||||
* Description
|
||||
* Fetch the next eBPF program currently loaded into the kernel.
|
||||
*
|
||||
* Looks for the eBPF program with an id greater than *start_id*
|
||||
* and updates *next_id* on success. If no other eBPF programs
|
||||
* remain with ids higher than *start_id*, returns -1 and sets
|
||||
* *errno* to **ENOENT**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, or when no id remains, -1
|
||||
* is returned and *errno* is set appropriately.
|
||||
*
|
||||
* BPF_MAP_GET_NEXT_ID
|
||||
* Description
|
||||
* Fetch the next eBPF map currently loaded into the kernel.
|
||||
*
|
||||
* Looks for the eBPF map with an id greater than *start_id*
|
||||
* and updates *next_id* on success. If no other eBPF maps
|
||||
* remain with ids higher than *start_id*, returns -1 and sets
|
||||
* *errno* to **ENOENT**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, or when no id remains, -1
|
||||
* is returned and *errno* is set appropriately.
|
||||
*
|
||||
* BPF_PROG_GET_FD_BY_ID
|
||||
* Description
|
||||
* Open a file descriptor for the eBPF program corresponding to
|
||||
* *prog_id*.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_MAP_GET_FD_BY_ID
|
||||
* Description
|
||||
* Open a file descriptor for the eBPF map corresponding to
|
||||
* *map_id*.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_OBJ_GET_INFO_BY_FD
|
||||
* Description
|
||||
* Obtain information about the eBPF object corresponding to
|
||||
* *bpf_fd*.
|
||||
*
|
||||
* Populates up to *info_len* bytes of *info*, which will be in
|
||||
* one of the following formats depending on the eBPF object type
|
||||
* of *bpf_fd*:
|
||||
*
|
||||
* * **struct bpf_prog_info**
|
||||
* * **struct bpf_map_info**
|
||||
* * **struct bpf_btf_info**
|
||||
* * **struct bpf_link_info**
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_PROG_QUERY
|
||||
* Description
|
||||
* Obtain information about eBPF programs associated with the
|
||||
* specified *attach_type* hook.
|
||||
*
|
||||
* The *target_fd* must be a valid file descriptor for a kernel
|
||||
* object which depends on the attach type of *attach_bpf_fd*:
|
||||
*
|
||||
* **BPF_PROG_TYPE_CGROUP_DEVICE**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SKB**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SOCK**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SOCKOPT**,
|
||||
* **BPF_PROG_TYPE_CGROUP_SYSCTL**,
|
||||
* **BPF_PROG_TYPE_SOCK_OPS**
|
||||
*
|
||||
* Control Group v2 hierarchy with the eBPF controller
|
||||
* enabled. Requires the kernel to be compiled with
|
||||
* **CONFIG_CGROUP_BPF**.
|
||||
*
|
||||
* **BPF_PROG_TYPE_FLOW_DISSECTOR**
|
||||
*
|
||||
* Network namespace (eg /proc/self/ns/net).
|
||||
*
|
||||
* **BPF_PROG_TYPE_LIRC_MODE2**
|
||||
*
|
||||
* LIRC device path (eg /dev/lircN). Requires the kernel
|
||||
* to be compiled with **CONFIG_BPF_LIRC_MODE2**.
|
||||
*
|
||||
* **BPF_PROG_QUERY** always fetches the number of programs
|
||||
* attached and the *attach_flags* which were used to attach those
|
||||
* programs. Additionally, if *prog_ids* is nonzero and the number
|
||||
* of attached programs is less than *prog_cnt*, populates
|
||||
* *prog_ids* with the eBPF program ids of the programs attached
|
||||
* at *target_fd*.
|
||||
*
|
||||
* The following flags may alter the result:
|
||||
*
|
||||
* **BPF_F_QUERY_EFFECTIVE**
|
||||
* Only return information regarding programs which are
|
||||
* currently effective at the specified *target_fd*.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_RAW_TRACEPOINT_OPEN
|
||||
* Description
|
||||
* Attach an eBPF program to a tracepoint *name* to access kernel
|
||||
* internal arguments of the tracepoint in their raw form.
|
||||
*
|
||||
* The *prog_fd* must be a valid file descriptor associated with
|
||||
* a loaded eBPF program of type **BPF_PROG_TYPE_RAW_TRACEPOINT**.
|
||||
*
|
||||
* No ABI guarantees are made about the content of tracepoint
|
||||
* arguments exposed to the corresponding eBPF program.
|
||||
*
|
||||
* Applying **close**\ (2) to the file descriptor returned by
|
||||
* **BPF_RAW_TRACEPOINT_OPEN** will delete the map (but see NOTES).
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_BTF_LOAD
|
||||
* Description
|
||||
* Verify and load BPF Type Format (BTF) metadata into the kernel,
|
||||
* returning a new file descriptor associated with the metadata.
|
||||
* BTF is described in more detail at
|
||||
* https://www.kernel.org/doc/html/latest/bpf/btf.html.
|
||||
*
|
||||
* The *btf* parameter must point to valid memory providing
|
||||
* *btf_size* bytes of BTF binary metadata.
|
||||
*
|
||||
* The returned file descriptor can be passed to other **bpf**\ ()
|
||||
* subcommands such as **BPF_PROG_LOAD** or **BPF_MAP_CREATE** to
|
||||
* associate the BTF with those objects.
|
||||
*
|
||||
* Similar to **BPF_PROG_LOAD**, **BPF_BTF_LOAD** has optional
|
||||
* parameters to specify a *btf_log_buf*, *btf_log_size* and
|
||||
* *btf_log_level* which allow the kernel to return freeform log
|
||||
* output regarding the BTF verification process.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_BTF_GET_FD_BY_ID
|
||||
* Description
|
||||
* Open a file descriptor for the BPF Type Format (BTF)
|
||||
* corresponding to *btf_id*.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_TASK_FD_QUERY
|
||||
* Description
|
||||
* Obtain information about eBPF programs associated with the
|
||||
* target process identified by *pid* and *fd*.
|
||||
*
|
||||
* If the *pid* and *fd* are associated with a tracepoint, kprobe
|
||||
* or uprobe perf event, then the *prog_id* and *fd_type* will
|
||||
* be populated with the eBPF program id and file descriptor type
|
||||
* of type **bpf_task_fd_type**. If associated with a kprobe or
|
||||
* uprobe, the *probe_offset* and *probe_addr* will also be
|
||||
* populated. Optionally, if *buf* is provided, then up to
|
||||
* *buf_len* bytes of *buf* will be populated with the name of
|
||||
* the tracepoint, kprobe or uprobe.
|
||||
*
|
||||
* The resulting *prog_id* may be introspected in deeper detail
|
||||
* using **BPF_PROG_GET_FD_BY_ID** and **BPF_OBJ_GET_INFO_BY_FD**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_MAP_LOOKUP_AND_DELETE_ELEM
|
||||
* Description
|
||||
* Look up an element with the given *key* in the map referred to
|
||||
* by the file descriptor *fd*, and if found, delete the element.
|
||||
*
|
||||
* The **BPF_MAP_TYPE_QUEUE** and **BPF_MAP_TYPE_STACK** map types
|
||||
* implement this command as a "pop" operation, deleting the top
|
||||
* element rather than one corresponding to *key*.
|
||||
* The *key* and *key_len* parameters should be zeroed when
|
||||
* issuing this operation for these map types.
|
||||
*
|
||||
* This command is only valid for the following map types:
|
||||
* * **BPF_MAP_TYPE_QUEUE**
|
||||
* * **BPF_MAP_TYPE_STACK**
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_MAP_FREEZE
|
||||
* Description
|
||||
* Freeze the permissions of the specified map.
|
||||
*
|
||||
* Write permissions may be frozen by passing zero *flags*.
|
||||
* Upon success, no future syscall invocations may alter the
|
||||
* map state of *map_fd*. Write operations from eBPF programs
|
||||
* are still possible for a frozen map.
|
||||
*
|
||||
* Not supported for maps of type **BPF_MAP_TYPE_STRUCT_OPS**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_BTF_GET_NEXT_ID
|
||||
* Description
|
||||
* Fetch the next BPF Type Format (BTF) object currently loaded
|
||||
* into the kernel.
|
||||
*
|
||||
* Looks for the BTF object with an id greater than *start_id*
|
||||
* and updates *next_id* on success. If no other BTF objects
|
||||
* remain with ids higher than *start_id*, returns -1 and sets
|
||||
* *errno* to **ENOENT**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, or when no id remains, -1
|
||||
* is returned and *errno* is set appropriately.
|
||||
*
|
||||
* BPF_MAP_LOOKUP_BATCH
|
||||
* Description
|
||||
* Iterate and fetch multiple elements in a map.
|
||||
*
|
||||
* Two opaque values are used to manage batch operations,
|
||||
* *in_batch* and *out_batch*. Initially, *in_batch* must be set
|
||||
* to NULL to begin the batched operation. After each subsequent
|
||||
* **BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant
|
||||
* *out_batch* as the *in_batch* for the next operation to
|
||||
* continue iteration from the current point.
|
||||
*
|
||||
* The *keys* and *values* are output parameters which must point
|
||||
* to memory large enough to hold *count* items based on the key
|
||||
* and value size of the map *map_fd*. The *keys* buffer must be
|
||||
* of *key_size* * *count*. The *values* buffer must be of
|
||||
* *value_size* * *count*.
|
||||
*
|
||||
* The *elem_flags* argument may be specified as one of the
|
||||
* following:
|
||||
*
|
||||
* **BPF_F_LOCK**
|
||||
* Look up the value of a spin-locked map without
|
||||
* returning the lock. This must be specified if the
|
||||
* elements contain a spinlock.
|
||||
*
|
||||
* On success, *count* elements from the map are copied into the
|
||||
* user buffer, with the keys copied into *keys* and the values
|
||||
* copied into the corresponding indices in *values*.
|
||||
*
|
||||
* If an error is returned and *errno* is not **EFAULT**, *count*
|
||||
* is set to the number of successfully processed elements.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* May set *errno* to **ENOSPC** to indicate that *keys* or
|
||||
* *values* is too small to dump an entire bucket during
|
||||
* iteration of a hash-based map type.
|
||||
*
|
||||
* BPF_MAP_LOOKUP_AND_DELETE_BATCH
|
||||
* Description
|
||||
* Iterate and delete all elements in a map.
|
||||
*
|
||||
* This operation has the same behavior as
|
||||
* **BPF_MAP_LOOKUP_BATCH** with two exceptions:
|
||||
*
|
||||
* * Every element that is successfully returned is also deleted
|
||||
* from the map. This is at least *count* elements. Note that
|
||||
* *count* is both an input and an output parameter.
|
||||
* * Upon returning with *errno* set to **EFAULT**, up to
|
||||
* *count* elements may be deleted without returning the keys
|
||||
* and values of the deleted elements.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_MAP_UPDATE_BATCH
|
||||
* Description
|
||||
* Update multiple elements in a map by *key*.
|
||||
*
|
||||
* The *keys* and *values* are input parameters which must point
|
||||
* to memory large enough to hold *count* items based on the key
|
||||
* and value size of the map *map_fd*. The *keys* buffer must be
|
||||
* of *key_size* * *count*. The *values* buffer must be of
|
||||
* *value_size* * *count*.
|
||||
*
|
||||
* Each element specified in *keys* is sequentially updated to the
|
||||
* value in the corresponding index in *values*. The *in_batch*
|
||||
* and *out_batch* parameters are ignored and should be zeroed.
|
||||
*
|
||||
* The *elem_flags* argument should be specified as one of the
|
||||
* following:
|
||||
*
|
||||
* **BPF_ANY**
|
||||
* Create new elements or update a existing elements.
|
||||
* **BPF_NOEXIST**
|
||||
* Create new elements only if they do not exist.
|
||||
* **BPF_EXIST**
|
||||
* Update existing elements.
|
||||
* **BPF_F_LOCK**
|
||||
* Update spin_lock-ed map elements. This must be
|
||||
* specified if the map value contains a spinlock.
|
||||
*
|
||||
* On success, *count* elements from the map are updated.
|
||||
*
|
||||
* If an error is returned and *errno* is not **EFAULT**, *count*
|
||||
* is set to the number of successfully processed elements.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* May set *errno* to **EINVAL**, **EPERM**, **ENOMEM**, or
|
||||
* **E2BIG**. **E2BIG** indicates that the number of elements in
|
||||
* the map reached the *max_entries* limit specified at map
|
||||
* creation time.
|
||||
*
|
||||
* May set *errno* to one of the following error codes under
|
||||
* specific circumstances:
|
||||
*
|
||||
* **EEXIST**
|
||||
* If *flags* specifies **BPF_NOEXIST** and the element
|
||||
* with *key* already exists in the map.
|
||||
* **ENOENT**
|
||||
* If *flags* specifies **BPF_EXIST** and the element with
|
||||
* *key* does not exist in the map.
|
||||
*
|
||||
* BPF_MAP_DELETE_BATCH
|
||||
* Description
|
||||
* Delete multiple elements in a map by *key*.
|
||||
*
|
||||
* The *keys* parameter is an input parameter which must point
|
||||
* to memory large enough to hold *count* items based on the key
|
||||
* size of the map *map_fd*, that is, *key_size* * *count*.
|
||||
*
|
||||
* Each element specified in *keys* is sequentially deleted. The
|
||||
* *in_batch*, *out_batch*, and *values* parameters are ignored
|
||||
* and should be zeroed.
|
||||
*
|
||||
* The *elem_flags* argument may be specified as one of the
|
||||
* following:
|
||||
*
|
||||
* **BPF_F_LOCK**
|
||||
* Look up the value of a spin-locked map without
|
||||
* returning the lock. This must be specified if the
|
||||
* elements contain a spinlock.
|
||||
*
|
||||
* On success, *count* elements from the map are updated.
|
||||
*
|
||||
* If an error is returned and *errno* is not **EFAULT**, *count*
|
||||
* is set to the number of successfully processed elements. If
|
||||
* *errno* is **EFAULT**, up to *count* elements may be been
|
||||
* deleted.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_LINK_CREATE
|
||||
* Description
|
||||
* Attach an eBPF program to a *target_fd* at the specified
|
||||
* *attach_type* hook and return a file descriptor handle for
|
||||
* managing the link.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_LINK_UPDATE
|
||||
* Description
|
||||
* Update the eBPF program in the specified *link_fd* to
|
||||
* *new_prog_fd*.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_LINK_GET_FD_BY_ID
|
||||
* Description
|
||||
* Open a file descriptor for the eBPF Link corresponding to
|
||||
* *link_id*.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_LINK_GET_NEXT_ID
|
||||
* Description
|
||||
* Fetch the next eBPF link currently loaded into the kernel.
|
||||
*
|
||||
* Looks for the eBPF link with an id greater than *start_id*
|
||||
* and updates *next_id* on success. If no other eBPF links
|
||||
* remain with ids higher than *start_id*, returns -1 and sets
|
||||
* *errno* to **ENOENT**.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, or when no id remains, -1
|
||||
* is returned and *errno* is set appropriately.
|
||||
*
|
||||
* BPF_ENABLE_STATS
|
||||
* Description
|
||||
* Enable eBPF runtime statistics gathering.
|
||||
*
|
||||
* Runtime statistics gathering for the eBPF runtime is disabled
|
||||
* by default to minimize the corresponding performance overhead.
|
||||
* This command enables statistics globally.
|
||||
*
|
||||
* Multiple programs may independently enable statistics.
|
||||
* After gathering the desired statistics, eBPF runtime statistics
|
||||
* may be disabled again by calling **close**\ (2) for the file
|
||||
* descriptor returned by this function. Statistics will only be
|
||||
* disabled system-wide when all outstanding file descriptors
|
||||
* returned by prior calls for this subcommand are closed.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_ITER_CREATE
|
||||
* Description
|
||||
* Create an iterator on top of the specified *link_fd* (as
|
||||
* previously created using **BPF_LINK_CREATE**) and return a
|
||||
* file descriptor that can be used to trigger the iteration.
|
||||
*
|
||||
* If the resulting file descriptor is pinned to the filesystem
|
||||
* using **BPF_OBJ_PIN**, then subsequent **read**\ (2) syscalls
|
||||
* for that path will trigger the iterator to read kernel state
|
||||
* using the eBPF program attached to *link_fd*.
|
||||
*
|
||||
* Return
|
||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||
* error occurred (in which case, *errno* is set appropriately).
|
||||
*
|
||||
* BPF_LINK_DETACH
|
||||
* Description
|
||||
* Forcefully detach the specified *link_fd* from its
|
||||
* corresponding attachment point.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* BPF_PROG_BIND_MAP
|
||||
* Description
|
||||
* Bind a map to the lifetime of an eBPF program.
|
||||
*
|
||||
* The map identified by *map_fd* is bound to the program
|
||||
* identified by *prog_fd* and only released when *prog_fd* is
|
||||
* released. This may be used in cases where metadata should be
|
||||
* associated with a program which otherwise does not contain any
|
||||
* references to the map (for example, embedded in the eBPF
|
||||
* program instructions).
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
*
|
||||
* NOTES
|
||||
* eBPF objects (maps and programs) can be shared between processes.
|
||||
*
|
||||
* * After **fork**\ (2), the child inherits file descriptors
|
||||
* referring to the same eBPF objects.
|
||||
* * File descriptors referring to eBPF objects can be transferred over
|
||||
* **unix**\ (7) domain sockets.
|
||||
* * File descriptors referring to eBPF objects can be duplicated in the
|
||||
* usual way, using **dup**\ (2) and similar calls.
|
||||
* * File descriptors referring to eBPF objects can be pinned to the
|
||||
* filesystem using the **BPF_OBJ_PIN** command of **bpf**\ (2).
|
||||
*
|
||||
* An eBPF object is deallocated only after all file descriptors referring
|
||||
* to the object have been closed and no references remain pinned to the
|
||||
* filesystem or attached (for example, bound to a program or device).
|
||||
*/
|
||||
enum bpf_cmd {
|
||||
BPF_MAP_CREATE,
|
||||
BPF_MAP_LOOKUP_ELEM,
|
||||
@@ -247,6 +978,7 @@ enum bpf_attach_type {
|
||||
BPF_XDP_CPUMAP,
|
||||
BPF_SK_LOOKUP,
|
||||
BPF_XDP,
|
||||
BPF_SK_SKB_VERDICT,
|
||||
__MAX_BPF_ATTACH_TYPE
|
||||
};
|
||||
|
||||
@@ -393,11 +1125,24 @@ enum bpf_link_type {
|
||||
* is struct/union.
|
||||
*/
|
||||
#define BPF_PSEUDO_BTF_ID 3
|
||||
/* insn[0].src_reg: BPF_PSEUDO_FUNC
|
||||
* insn[0].imm: insn offset to the func
|
||||
* insn[1].imm: 0
|
||||
* insn[0].off: 0
|
||||
* insn[1].off: 0
|
||||
* ldimm64 rewrite: address of the function
|
||||
* verifier type: PTR_TO_FUNC.
|
||||
*/
|
||||
#define BPF_PSEUDO_FUNC 4
|
||||
|
||||
/* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
|
||||
* offset to another bpf function
|
||||
*/
|
||||
#define BPF_PSEUDO_CALL 1
|
||||
/* when bpf_call->src_reg == BPF_PSEUDO_KFUNC_CALL,
|
||||
* bpf_call->imm == btf_id of a BTF_KIND_FUNC in the running kernel
|
||||
*/
|
||||
#define BPF_PSEUDO_KFUNC_CALL 2
|
||||
|
||||
/* flags for BPF_MAP_UPDATE_ELEM command */
|
||||
enum {
|
||||
@@ -720,7 +1465,7 @@ union bpf_attr {
|
||||
* parsed and used to produce a manual page. The workflow is the following,
|
||||
* and requires the rst2man utility:
|
||||
*
|
||||
* $ ./scripts/bpf_helpers_doc.py \
|
||||
* $ ./scripts/bpf_doc.py \
|
||||
* --filename include/uapi/linux/bpf.h > /tmp/bpf-helpers.rst
|
||||
* $ rst2man /tmp/bpf-helpers.rst > /tmp/bpf-helpers.7
|
||||
* $ man /tmp/bpf-helpers.7
|
||||
@@ -1765,6 +2510,10 @@ union bpf_attr {
|
||||
* Use with ENCAP_L3/L4 flags to further specify the tunnel
|
||||
* type; *len* is the length of the inner MAC header.
|
||||
*
|
||||
* * **BPF_F_ADJ_ROOM_ENCAP_L2_ETH**:
|
||||
* Use with BPF_F_ADJ_ROOM_ENCAP_L2 flag to further specify the
|
||||
* L2 type as Ethernet.
|
||||
*
|
||||
* A call to this helper is susceptible to change the underlying
|
||||
* packet buffer. Therefore, at load time, all checks on pointers
|
||||
* previously done by the verifier are invalidated and must be
|
||||
@@ -3333,12 +4082,20 @@ union bpf_attr {
|
||||
* of new data availability is sent.
|
||||
* If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
|
||||
* of new data availability is sent unconditionally.
|
||||
* If **0** is specified in *flags*, an adaptive notification
|
||||
* of new data availability is sent.
|
||||
*
|
||||
* An adaptive notification is a notification sent whenever the user-space
|
||||
* process has caught up and consumed all available payloads. In case the user-space
|
||||
* process is still processing a previous payload, then no notification is needed
|
||||
* as it will process the newly added payload automatically.
|
||||
* Return
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
|
||||
* Description
|
||||
* Reserve *size* bytes of payload in a ring buffer *ringbuf*.
|
||||
* *flags* must be 0.
|
||||
* Return
|
||||
* Valid pointer with *size* bytes of memory available; NULL,
|
||||
* otherwise.
|
||||
@@ -3350,6 +4107,10 @@ union bpf_attr {
|
||||
* of new data availability is sent.
|
||||
* If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
|
||||
* of new data availability is sent unconditionally.
|
||||
* If **0** is specified in *flags*, an adaptive notification
|
||||
* of new data availability is sent.
|
||||
*
|
||||
* See 'bpf_ringbuf_output()' for the definition of adaptive notification.
|
||||
* Return
|
||||
* Nothing. Always succeeds.
|
||||
*
|
||||
@@ -3360,6 +4121,10 @@ union bpf_attr {
|
||||
* of new data availability is sent.
|
||||
* If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
|
||||
* of new data availability is sent unconditionally.
|
||||
* If **0** is specified in *flags*, an adaptive notification
|
||||
* of new data availability is sent.
|
||||
*
|
||||
* See 'bpf_ringbuf_output()' for the definition of adaptive notification.
|
||||
* Return
|
||||
* Nothing. Always succeeds.
|
||||
*
|
||||
@@ -3915,6 +4680,61 @@ union bpf_attr {
|
||||
* * **BPF_MTU_CHK_RET_FRAG_NEEDED**
|
||||
* * **BPF_MTU_CHK_RET_SEGS_TOOBIG**
|
||||
*
|
||||
* long bpf_for_each_map_elem(struct bpf_map *map, void *callback_fn, void *callback_ctx, u64 flags)
|
||||
* Description
|
||||
* For each element in **map**, call **callback_fn** function with
|
||||
* **map**, **callback_ctx** and other map-specific parameters.
|
||||
* The **callback_fn** should be a static function and
|
||||
* the **callback_ctx** should be a pointer to the stack.
|
||||
* The **flags** is used to control certain aspects of the helper.
|
||||
* Currently, the **flags** must be 0.
|
||||
*
|
||||
* The following are a list of supported map types and their
|
||||
* respective expected callback signatures:
|
||||
*
|
||||
* BPF_MAP_TYPE_HASH, BPF_MAP_TYPE_PERCPU_HASH,
|
||||
* BPF_MAP_TYPE_LRU_HASH, BPF_MAP_TYPE_LRU_PERCPU_HASH,
|
||||
* BPF_MAP_TYPE_ARRAY, BPF_MAP_TYPE_PERCPU_ARRAY
|
||||
*
|
||||
* long (\*callback_fn)(struct bpf_map \*map, const void \*key, void \*value, void \*ctx);
|
||||
*
|
||||
* For per_cpu maps, the map_value is the value on the cpu where the
|
||||
* bpf_prog is running.
|
||||
*
|
||||
* If **callback_fn** return 0, the helper will continue to the next
|
||||
* element. If return value is 1, the helper will skip the rest of
|
||||
* elements and return. Other return values are not used now.
|
||||
*
|
||||
* Return
|
||||
* The number of traversed map elements for success, **-EINVAL** for
|
||||
* invalid **flags**.
|
||||
*
|
||||
* long bpf_snprintf(char *str, u32 str_size, const char *fmt, u64 *data, u32 data_len)
|
||||
* Description
|
||||
* Outputs a string into the **str** buffer of size **str_size**
|
||||
* based on a format string stored in a read-only map pointed by
|
||||
* **fmt**.
|
||||
*
|
||||
* Each format specifier in **fmt** corresponds to one u64 element
|
||||
* in the **data** array. For strings and pointers where pointees
|
||||
* are accessed, only the pointer values are stored in the *data*
|
||||
* array. The *data_len* is the size of *data* in bytes.
|
||||
*
|
||||
* Formats **%s** and **%p{i,I}{4,6}** require to read kernel
|
||||
* memory. Reading kernel memory may fail due to either invalid
|
||||
* address or valid address but requiring a major memory fault. If
|
||||
* reading kernel memory fails, the string for **%s** will be an
|
||||
* empty string, and the ip address for **%p{i,I}{4,6}** will be 0.
|
||||
* Not returning error to bpf program is consistent with what
|
||||
* **bpf_trace_printk**\ () does for now.
|
||||
*
|
||||
* Return
|
||||
* The strictly positive length of the formatted string, including
|
||||
* the trailing zero character. If the return value is greater than
|
||||
* **str_size**, **str** contains a truncated string, guaranteed to
|
||||
* be zero-terminated except when **str_size** is 0.
|
||||
*
|
||||
* Or **-EBUSY** if the per-CPU memory copy buffer is busy.
|
||||
*/
|
||||
#define __BPF_FUNC_MAPPER(FN) \
|
||||
FN(unspec), \
|
||||
@@ -4081,6 +4901,8 @@ union bpf_attr {
|
||||
FN(ima_inode_hash), \
|
||||
FN(sock_from_file), \
|
||||
FN(check_mtu), \
|
||||
FN(for_each_map_elem), \
|
||||
FN(snprintf), \
|
||||
/* */
|
||||
|
||||
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
||||
@@ -4174,6 +4996,7 @@ enum {
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3),
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),
|
||||
BPF_F_ADJ_ROOM_NO_CSUM_RESET = (1ULL << 5),
|
||||
BPF_F_ADJ_ROOM_ENCAP_L2_ETH = (1ULL << 6),
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -4621,6 +5444,8 @@ struct bpf_link_info {
|
||||
} raw_tracepoint;
|
||||
struct {
|
||||
__u32 attach_type;
|
||||
__u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */
|
||||
__u32 target_btf_id; /* BTF type id inside the object */
|
||||
} tracing;
|
||||
struct {
|
||||
__u64 cgroup_id;
|
||||
@@ -5211,7 +6036,10 @@ struct bpf_pidns_info {
|
||||
|
||||
/* User accessible data for SK_LOOKUP programs. Add new fields at the end. */
|
||||
struct bpf_sk_lookup {
|
||||
__bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
|
||||
union {
|
||||
__bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
|
||||
__u64 cookie; /* Non-zero if socket was selected in PROG_TEST_RUN */
|
||||
};
|
||||
|
||||
__u32 family; /* Protocol family (AF_INET, AF_INET6) */
|
||||
__u32 protocol; /* IP protocol (IPPROTO_TCP, IPPROTO_UDP) */
|
||||
|
||||
@@ -52,7 +52,7 @@ struct btf_type {
|
||||
};
|
||||
};
|
||||
|
||||
#define BTF_INFO_KIND(info) (((info) >> 24) & 0x0f)
|
||||
#define BTF_INFO_KIND(info) (((info) >> 24) & 0x1f)
|
||||
#define BTF_INFO_VLEN(info) ((info) & 0xffff)
|
||||
#define BTF_INFO_KFLAG(info) ((info) >> 31)
|
||||
|
||||
@@ -72,7 +72,8 @@ struct btf_type {
|
||||
#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
|
||||
#define BTF_KIND_VAR 14 /* Variable */
|
||||
#define BTF_KIND_DATASEC 15 /* Section */
|
||||
#define BTF_KIND_MAX BTF_KIND_DATASEC
|
||||
#define BTF_KIND_FLOAT 16 /* Floating point */
|
||||
#define BTF_KIND_MAX BTF_KIND_FLOAT
|
||||
#define NR_BTF_KINDS (BTF_KIND_MAX + 1)
|
||||
|
||||
/* For some specific BTF_KIND, "struct btf_type" is immediately
|
||||
|
||||
@@ -335,7 +335,8 @@ struct vfs_ns_cap_data {
|
||||
|
||||
#define CAP_AUDIT_CONTROL 30
|
||||
|
||||
/* Set or remove capabilities on files */
|
||||
/* Set or remove capabilities on files.
|
||||
Map uid=0 into a child user namespace. */
|
||||
|
||||
#define CAP_SETFCAP 31
|
||||
|
||||
|
||||
@@ -396,6 +396,7 @@ struct cec_drm_connector_info {
|
||||
* associated with the CEC adapter.
|
||||
* @type: connector type (if any)
|
||||
* @drm: drm connector info
|
||||
* @raw: array to pad the union
|
||||
*/
|
||||
struct cec_connector_info {
|
||||
__u32 type;
|
||||
@@ -453,7 +454,7 @@ struct cec_event_lost_msgs {
|
||||
* struct cec_event - CEC event structure
|
||||
* @ts: the timestamp of when the event was sent.
|
||||
* @event: the event.
|
||||
* array.
|
||||
* @flags: event flags.
|
||||
* @state_change: the event payload for CEC_EVENT_STATE_CHANGE.
|
||||
* @lost_msgs: the event payload for CEC_EVENT_LOST_MSGS.
|
||||
* @raw: array to pad the union.
|
||||
|
||||
@@ -1,494 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $
|
||||
* linux/include/linux/cyclades.h
|
||||
*
|
||||
* This file was initially written by
|
||||
* Randolph Bentson <bentson@grieg.seaslug.org> and is maintained by
|
||||
* Ivan Passos <ivan@cyclades.com>.
|
||||
*
|
||||
* This file contains the general definitions for the cyclades.c driver
|
||||
*$Log: cyclades.h,v $
|
||||
*Revision 3.1 2002/01/29 11:36:16 henrique
|
||||
*added throttle field on struct cyclades_port to indicate whether the
|
||||
*port is throttled or not
|
||||
*
|
||||
*Revision 3.1 2000/04/19 18:52:52 ivan
|
||||
*converted address fields to unsigned long and added fields for physical
|
||||
*addresses on cyclades_card structure;
|
||||
*
|
||||
*Revision 3.0 1998/11/02 14:20:59 ivan
|
||||
*added nports field on cyclades_card structure;
|
||||
*
|
||||
*Revision 2.5 1998/08/03 16:57:01 ivan
|
||||
*added cyclades_idle_stats structure;
|
||||
*
|
||||
*Revision 2.4 1998/06/01 12:09:53 ivan
|
||||
*removed closing_wait2 from cyclades_port structure;
|
||||
*
|
||||
*Revision 2.3 1998/03/16 18:01:12 ivan
|
||||
*changes in the cyclades_port structure to get it closer to the
|
||||
*standard serial port structure;
|
||||
*added constants for new ioctls;
|
||||
*
|
||||
*Revision 2.2 1998/02/17 16:50:00 ivan
|
||||
*changes in the cyclades_port structure (addition of shutdown_wait and
|
||||
*chip_rev variables);
|
||||
*added constants for new ioctls and for CD1400 rev. numbers.
|
||||
*
|
||||
*Revision 2.1 1997/10/24 16:03:00 ivan
|
||||
*added rflow (which allows enabling the CD1400 special flow control
|
||||
*feature) and rtsdtr_inv (which allows DTR/RTS pin inversion) to
|
||||
*cyclades_port structure;
|
||||
*added Alpha support
|
||||
*
|
||||
*Revision 2.0 1997/06/30 10:30:00 ivan
|
||||
*added some new doorbell command constants related to IOCTLW and
|
||||
*UART error signaling
|
||||
*
|
||||
*Revision 1.8 1997/06/03 15:30:00 ivan
|
||||
*added constant ZFIRM_HLT
|
||||
*added constant CyPCI_Ze_win ( = 2 * Cy_PCI_Zwin)
|
||||
*
|
||||
*Revision 1.7 1997/03/26 10:30:00 daniel
|
||||
*new entries at the end of cyclades_port struct to reallocate
|
||||
*variables illegally allocated within card memory.
|
||||
*
|
||||
*Revision 1.6 1996/09/09 18:35:30 bentson
|
||||
*fold in changes for Cyclom-Z -- including structures for
|
||||
*communicating with board as well modest changes to original
|
||||
*structures to support new features.
|
||||
*
|
||||
*Revision 1.5 1995/11/13 21:13:31 bentson
|
||||
*changes suggested by Michael Chastain <mec@duracef.shout.net>
|
||||
*to support use of this file in non-kernel applications
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_LINUX_CYCLADES_H
|
||||
#define _UAPI_LINUX_CYCLADES_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct cyclades_monitor {
|
||||
unsigned long int_count;
|
||||
unsigned long char_count;
|
||||
unsigned long char_max;
|
||||
unsigned long char_last;
|
||||
};
|
||||
|
||||
/*
|
||||
* These stats all reflect activity since the device was last initialized.
|
||||
* (i.e., since the port was opened with no other processes already having it
|
||||
* open)
|
||||
*/
|
||||
struct cyclades_idle_stats {
|
||||
__kernel_old_time_t in_use; /* Time device has been in use (secs) */
|
||||
__kernel_old_time_t recv_idle; /* Time since last char received (secs) */
|
||||
__kernel_old_time_t xmit_idle; /* Time since last char transmitted (secs) */
|
||||
unsigned long recv_bytes; /* Bytes received */
|
||||
unsigned long xmit_bytes; /* Bytes transmitted */
|
||||
unsigned long overruns; /* Input overruns */
|
||||
unsigned long frame_errs; /* Input framing errors */
|
||||
unsigned long parity_errs; /* Input parity errors */
|
||||
};
|
||||
|
||||
#define CYCLADES_MAGIC 0x4359
|
||||
|
||||
#define CYGETMON 0x435901
|
||||
#define CYGETTHRESH 0x435902
|
||||
#define CYSETTHRESH 0x435903
|
||||
#define CYGETDEFTHRESH 0x435904
|
||||
#define CYSETDEFTHRESH 0x435905
|
||||
#define CYGETTIMEOUT 0x435906
|
||||
#define CYSETTIMEOUT 0x435907
|
||||
#define CYGETDEFTIMEOUT 0x435908
|
||||
#define CYSETDEFTIMEOUT 0x435909
|
||||
#define CYSETRFLOW 0x43590a
|
||||
#define CYGETRFLOW 0x43590b
|
||||
#define CYSETRTSDTR_INV 0x43590c
|
||||
#define CYGETRTSDTR_INV 0x43590d
|
||||
#define CYZSETPOLLCYCLE 0x43590e
|
||||
#define CYZGETPOLLCYCLE 0x43590f
|
||||
#define CYGETCD1400VER 0x435910
|
||||
#define CYSETWAIT 0x435912
|
||||
#define CYGETWAIT 0x435913
|
||||
|
||||
/*************** CYCLOM-Z ADDITIONS ***************/
|
||||
|
||||
#define CZIOC ('M' << 8)
|
||||
#define CZ_NBOARDS (CZIOC|0xfa)
|
||||
#define CZ_BOOT_START (CZIOC|0xfb)
|
||||
#define CZ_BOOT_DATA (CZIOC|0xfc)
|
||||
#define CZ_BOOT_END (CZIOC|0xfd)
|
||||
#define CZ_TEST (CZIOC|0xfe)
|
||||
|
||||
#define CZ_DEF_POLL (HZ/25)
|
||||
|
||||
#define MAX_BOARD 4 /* Max number of boards */
|
||||
#define MAX_DEV 256 /* Max number of ports total */
|
||||
#define CYZ_MAX_SPEED 921600
|
||||
|
||||
#define CYZ_FIFO_SIZE 16
|
||||
|
||||
#define CYZ_BOOT_NWORDS 0x100
|
||||
struct CYZ_BOOT_CTRL {
|
||||
unsigned short nboard;
|
||||
int status[MAX_BOARD];
|
||||
int nchannel[MAX_BOARD];
|
||||
int fw_rev[MAX_BOARD];
|
||||
unsigned long offset;
|
||||
unsigned long data[CYZ_BOOT_NWORDS];
|
||||
};
|
||||
|
||||
|
||||
#ifndef DP_WINDOW_SIZE
|
||||
/*
|
||||
* Memory Window Sizes
|
||||
*/
|
||||
|
||||
#define DP_WINDOW_SIZE (0x00080000) /* window size 512 Kb */
|
||||
#define ZE_DP_WINDOW_SIZE (0x00100000) /* window size 1 Mb (Ze and
|
||||
8Zo V.2 */
|
||||
#define CTRL_WINDOW_SIZE (0x00000080) /* runtime regs 128 bytes */
|
||||
|
||||
/*
|
||||
* CUSTOM_REG - Cyclom-Z/PCI Custom Registers Set. The driver
|
||||
* normally will access only interested on the fpga_id, fpga_version,
|
||||
* start_cpu and stop_cpu.
|
||||
*/
|
||||
|
||||
struct CUSTOM_REG {
|
||||
__u32 fpga_id; /* FPGA Identification Register */
|
||||
__u32 fpga_version; /* FPGA Version Number Register */
|
||||
__u32 cpu_start; /* CPU start Register (write) */
|
||||
__u32 cpu_stop; /* CPU stop Register (write) */
|
||||
__u32 misc_reg; /* Miscellaneous Register */
|
||||
__u32 idt_mode; /* IDT mode Register */
|
||||
__u32 uart_irq_status; /* UART IRQ status Register */
|
||||
__u32 clear_timer0_irq; /* Clear timer interrupt Register */
|
||||
__u32 clear_timer1_irq; /* Clear timer interrupt Register */
|
||||
__u32 clear_timer2_irq; /* Clear timer interrupt Register */
|
||||
__u32 test_register; /* Test Register */
|
||||
__u32 test_count; /* Test Count Register */
|
||||
__u32 timer_select; /* Timer select register */
|
||||
__u32 pr_uart_irq_status; /* Prioritized UART IRQ stat Reg */
|
||||
__u32 ram_wait_state; /* RAM wait-state Register */
|
||||
__u32 uart_wait_state; /* UART wait-state Register */
|
||||
__u32 timer_wait_state; /* timer wait-state Register */
|
||||
__u32 ack_wait_state; /* ACK wait State Register */
|
||||
};
|
||||
|
||||
/*
|
||||
* RUNTIME_9060 - PLX PCI9060ES local configuration and shared runtime
|
||||
* registers. This structure can be used to access the 9060 registers
|
||||
* (memory mapped).
|
||||
*/
|
||||
|
||||
struct RUNTIME_9060 {
|
||||
__u32 loc_addr_range; /* 00h - Local Address Range */
|
||||
__u32 loc_addr_base; /* 04h - Local Address Base */
|
||||
__u32 loc_arbitr; /* 08h - Local Arbitration */
|
||||
__u32 endian_descr; /* 0Ch - Big/Little Endian Descriptor */
|
||||
__u32 loc_rom_range; /* 10h - Local ROM Range */
|
||||
__u32 loc_rom_base; /* 14h - Local ROM Base */
|
||||
__u32 loc_bus_descr; /* 18h - Local Bus descriptor */
|
||||
__u32 loc_range_mst; /* 1Ch - Local Range for Master to PCI */
|
||||
__u32 loc_base_mst; /* 20h - Local Base for Master PCI */
|
||||
__u32 loc_range_io; /* 24h - Local Range for Master IO */
|
||||
__u32 pci_base_mst; /* 28h - PCI Base for Master PCI */
|
||||
__u32 pci_conf_io; /* 2Ch - PCI configuration for Master IO */
|
||||
__u32 filler1; /* 30h */
|
||||
__u32 filler2; /* 34h */
|
||||
__u32 filler3; /* 38h */
|
||||
__u32 filler4; /* 3Ch */
|
||||
__u32 mail_box_0; /* 40h - Mail Box 0 */
|
||||
__u32 mail_box_1; /* 44h - Mail Box 1 */
|
||||
__u32 mail_box_2; /* 48h - Mail Box 2 */
|
||||
__u32 mail_box_3; /* 4Ch - Mail Box 3 */
|
||||
__u32 filler5; /* 50h */
|
||||
__u32 filler6; /* 54h */
|
||||
__u32 filler7; /* 58h */
|
||||
__u32 filler8; /* 5Ch */
|
||||
__u32 pci_doorbell; /* 60h - PCI to Local Doorbell */
|
||||
__u32 loc_doorbell; /* 64h - Local to PCI Doorbell */
|
||||
__u32 intr_ctrl_stat; /* 68h - Interrupt Control/Status */
|
||||
__u32 init_ctrl; /* 6Ch - EEPROM control, Init Control, etc */
|
||||
};
|
||||
|
||||
/* Values for the Local Base Address re-map register */
|
||||
|
||||
#define WIN_RAM 0x00000001L /* set the sliding window to RAM */
|
||||
#define WIN_CREG 0x14000001L /* set the window to custom Registers */
|
||||
|
||||
/* Values timer select registers */
|
||||
|
||||
#define TIMER_BY_1M 0x00 /* clock divided by 1M */
|
||||
#define TIMER_BY_256K 0x01 /* clock divided by 256k */
|
||||
#define TIMER_BY_128K 0x02 /* clock divided by 128k */
|
||||
#define TIMER_BY_32K 0x03 /* clock divided by 32k */
|
||||
|
||||
/****************** ****************** *******************/
|
||||
#endif
|
||||
|
||||
#ifndef ZFIRM_ID
|
||||
/* #include "zfwint.h" */
|
||||
/****************** ****************** *******************/
|
||||
/*
|
||||
* This file contains the definitions for interfacing with the
|
||||
* Cyclom-Z ZFIRM Firmware.
|
||||
*/
|
||||
|
||||
/* General Constant definitions */
|
||||
|
||||
#define MAX_CHAN 64 /* max number of channels per board */
|
||||
|
||||
/* firmware id structure (set after boot) */
|
||||
|
||||
#define ID_ADDRESS 0x00000180L /* signature/pointer address */
|
||||
#define ZFIRM_ID 0x5557465AL /* ZFIRM/U signature */
|
||||
#define ZFIRM_HLT 0x59505B5CL /* ZFIRM needs external power supply */
|
||||
#define ZFIRM_RST 0x56040674L /* RST signal (due to FW reset) */
|
||||
|
||||
#define ZF_TINACT_DEF 1000 /* default inactivity timeout
|
||||
(1000 ms) */
|
||||
#define ZF_TINACT ZF_TINACT_DEF
|
||||
|
||||
struct FIRM_ID {
|
||||
__u32 signature; /* ZFIRM/U signature */
|
||||
__u32 zfwctrl_addr; /* pointer to ZFW_CTRL structure */
|
||||
};
|
||||
|
||||
/* Op. System id */
|
||||
|
||||
#define C_OS_LINUX 0x00000030 /* generic Linux system */
|
||||
|
||||
/* channel op_mode */
|
||||
|
||||
#define C_CH_DISABLE 0x00000000 /* channel is disabled */
|
||||
#define C_CH_TXENABLE 0x00000001 /* channel Tx enabled */
|
||||
#define C_CH_RXENABLE 0x00000002 /* channel Rx enabled */
|
||||
#define C_CH_ENABLE 0x00000003 /* channel Tx/Rx enabled */
|
||||
#define C_CH_LOOPBACK 0x00000004 /* Loopback mode */
|
||||
|
||||
/* comm_parity - parity */
|
||||
|
||||
#define C_PR_NONE 0x00000000 /* None */
|
||||
#define C_PR_ODD 0x00000001 /* Odd */
|
||||
#define C_PR_EVEN 0x00000002 /* Even */
|
||||
#define C_PR_MARK 0x00000004 /* Mark */
|
||||
#define C_PR_SPACE 0x00000008 /* Space */
|
||||
#define C_PR_PARITY 0x000000ff
|
||||
|
||||
#define C_PR_DISCARD 0x00000100 /* discard char with frame/par error */
|
||||
#define C_PR_IGNORE 0x00000200 /* ignore frame/par error */
|
||||
|
||||
/* comm_data_l - data length and stop bits */
|
||||
|
||||
#define C_DL_CS5 0x00000001
|
||||
#define C_DL_CS6 0x00000002
|
||||
#define C_DL_CS7 0x00000004
|
||||
#define C_DL_CS8 0x00000008
|
||||
#define C_DL_CS 0x0000000f
|
||||
#define C_DL_1STOP 0x00000010
|
||||
#define C_DL_15STOP 0x00000020
|
||||
#define C_DL_2STOP 0x00000040
|
||||
#define C_DL_STOP 0x000000f0
|
||||
|
||||
/* interrupt enabling/status */
|
||||
|
||||
#define C_IN_DISABLE 0x00000000 /* zero, disable interrupts */
|
||||
#define C_IN_TXBEMPTY 0x00000001 /* tx buffer empty */
|
||||
#define C_IN_TXLOWWM 0x00000002 /* tx buffer below LWM */
|
||||
#define C_IN_RXHIWM 0x00000010 /* rx buffer above HWM */
|
||||
#define C_IN_RXNNDT 0x00000020 /* rx no new data timeout */
|
||||
#define C_IN_MDCD 0x00000100 /* modem DCD change */
|
||||
#define C_IN_MDSR 0x00000200 /* modem DSR change */
|
||||
#define C_IN_MRI 0x00000400 /* modem RI change */
|
||||
#define C_IN_MCTS 0x00000800 /* modem CTS change */
|
||||
#define C_IN_RXBRK 0x00001000 /* Break received */
|
||||
#define C_IN_PR_ERROR 0x00002000 /* parity error */
|
||||
#define C_IN_FR_ERROR 0x00004000 /* frame error */
|
||||
#define C_IN_OVR_ERROR 0x00008000 /* overrun error */
|
||||
#define C_IN_RXOFL 0x00010000 /* RX buffer overflow */
|
||||
#define C_IN_IOCTLW 0x00020000 /* I/O control w/ wait */
|
||||
#define C_IN_MRTS 0x00040000 /* modem RTS drop */
|
||||
#define C_IN_ICHAR 0x00080000
|
||||
|
||||
/* flow control */
|
||||
|
||||
#define C_FL_OXX 0x00000001 /* output Xon/Xoff flow control */
|
||||
#define C_FL_IXX 0x00000002 /* output Xon/Xoff flow control */
|
||||
#define C_FL_OIXANY 0x00000004 /* output Xon/Xoff (any xon) */
|
||||
#define C_FL_SWFLOW 0x0000000f
|
||||
|
||||
/* flow status */
|
||||
|
||||
#define C_FS_TXIDLE 0x00000000 /* no Tx data in the buffer or UART */
|
||||
#define C_FS_SENDING 0x00000001 /* UART is sending data */
|
||||
#define C_FS_SWFLOW 0x00000002 /* Tx is stopped by received Xoff */
|
||||
|
||||
/* rs_control/rs_status RS-232 signals */
|
||||
|
||||
#define C_RS_PARAM 0x80000000 /* Indicates presence of parameter in
|
||||
IOCTLM command */
|
||||
#define C_RS_RTS 0x00000001 /* RTS */
|
||||
#define C_RS_DTR 0x00000004 /* DTR */
|
||||
#define C_RS_DCD 0x00000100 /* CD */
|
||||
#define C_RS_DSR 0x00000200 /* DSR */
|
||||
#define C_RS_RI 0x00000400 /* RI */
|
||||
#define C_RS_CTS 0x00000800 /* CTS */
|
||||
|
||||
/* commands Host <-> Board */
|
||||
|
||||
#define C_CM_RESET 0x01 /* reset/flush buffers */
|
||||
#define C_CM_IOCTL 0x02 /* re-read CH_CTRL */
|
||||
#define C_CM_IOCTLW 0x03 /* re-read CH_CTRL, intr when done */
|
||||
#define C_CM_IOCTLM 0x04 /* RS-232 outputs change */
|
||||
#define C_CM_SENDXOFF 0x10 /* send Xoff */
|
||||
#define C_CM_SENDXON 0x11 /* send Xon */
|
||||
#define C_CM_CLFLOW 0x12 /* Clear flow control (resume) */
|
||||
#define C_CM_SENDBRK 0x41 /* send break */
|
||||
#define C_CM_INTBACK 0x42 /* Interrupt back */
|
||||
#define C_CM_SET_BREAK 0x43 /* Tx break on */
|
||||
#define C_CM_CLR_BREAK 0x44 /* Tx break off */
|
||||
#define C_CM_CMD_DONE 0x45 /* Previous command done */
|
||||
#define C_CM_INTBACK2 0x46 /* Alternate Interrupt back */
|
||||
#define C_CM_TINACT 0x51 /* set inactivity detection */
|
||||
#define C_CM_IRQ_ENBL 0x52 /* enable generation of interrupts */
|
||||
#define C_CM_IRQ_DSBL 0x53 /* disable generation of interrupts */
|
||||
#define C_CM_ACK_ENBL 0x54 /* enable acknowledged interrupt mode */
|
||||
#define C_CM_ACK_DSBL 0x55 /* disable acknowledged intr mode */
|
||||
#define C_CM_FLUSH_RX 0x56 /* flushes Rx buffer */
|
||||
#define C_CM_FLUSH_TX 0x57 /* flushes Tx buffer */
|
||||
#define C_CM_Q_ENABLE 0x58 /* enables queue access from the
|
||||
driver */
|
||||
#define C_CM_Q_DISABLE 0x59 /* disables queue access from the
|
||||
driver */
|
||||
|
||||
#define C_CM_TXBEMPTY 0x60 /* Tx buffer is empty */
|
||||
#define C_CM_TXLOWWM 0x61 /* Tx buffer low water mark */
|
||||
#define C_CM_RXHIWM 0x62 /* Rx buffer high water mark */
|
||||
#define C_CM_RXNNDT 0x63 /* rx no new data timeout */
|
||||
#define C_CM_TXFEMPTY 0x64
|
||||
#define C_CM_ICHAR 0x65
|
||||
#define C_CM_MDCD 0x70 /* modem DCD change */
|
||||
#define C_CM_MDSR 0x71 /* modem DSR change */
|
||||
#define C_CM_MRI 0x72 /* modem RI change */
|
||||
#define C_CM_MCTS 0x73 /* modem CTS change */
|
||||
#define C_CM_MRTS 0x74 /* modem RTS drop */
|
||||
#define C_CM_RXBRK 0x84 /* Break received */
|
||||
#define C_CM_PR_ERROR 0x85 /* Parity error */
|
||||
#define C_CM_FR_ERROR 0x86 /* Frame error */
|
||||
#define C_CM_OVR_ERROR 0x87 /* Overrun error */
|
||||
#define C_CM_RXOFL 0x88 /* RX buffer overflow */
|
||||
#define C_CM_CMDERROR 0x90 /* command error */
|
||||
#define C_CM_FATAL 0x91 /* fatal error */
|
||||
#define C_CM_HW_RESET 0x92 /* reset board */
|
||||
|
||||
/*
|
||||
* CH_CTRL - This per port structure contains all parameters
|
||||
* that control an specific port. It can be seen as the
|
||||
* configuration registers of a "super-serial-controller".
|
||||
*/
|
||||
|
||||
struct CH_CTRL {
|
||||
__u32 op_mode; /* operation mode */
|
||||
__u32 intr_enable; /* interrupt masking */
|
||||
__u32 sw_flow; /* SW flow control */
|
||||
__u32 flow_status; /* output flow status */
|
||||
__u32 comm_baud; /* baud rate - numerically specified */
|
||||
__u32 comm_parity; /* parity */
|
||||
__u32 comm_data_l; /* data length/stop */
|
||||
__u32 comm_flags; /* other flags */
|
||||
__u32 hw_flow; /* HW flow control */
|
||||
__u32 rs_control; /* RS-232 outputs */
|
||||
__u32 rs_status; /* RS-232 inputs */
|
||||
__u32 flow_xon; /* xon char */
|
||||
__u32 flow_xoff; /* xoff char */
|
||||
__u32 hw_overflow; /* hw overflow counter */
|
||||
__u32 sw_overflow; /* sw overflow counter */
|
||||
__u32 comm_error; /* frame/parity error counter */
|
||||
__u32 ichar;
|
||||
__u32 filler[7];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* BUF_CTRL - This per channel structure contains
|
||||
* all Tx and Rx buffer control for a given channel.
|
||||
*/
|
||||
|
||||
struct BUF_CTRL {
|
||||
__u32 flag_dma; /* buffers are in Host memory */
|
||||
__u32 tx_bufaddr; /* address of the tx buffer */
|
||||
__u32 tx_bufsize; /* tx buffer size */
|
||||
__u32 tx_threshold; /* tx low water mark */
|
||||
__u32 tx_get; /* tail index tx buf */
|
||||
__u32 tx_put; /* head index tx buf */
|
||||
__u32 rx_bufaddr; /* address of the rx buffer */
|
||||
__u32 rx_bufsize; /* rx buffer size */
|
||||
__u32 rx_threshold; /* rx high water mark */
|
||||
__u32 rx_get; /* tail index rx buf */
|
||||
__u32 rx_put; /* head index rx buf */
|
||||
__u32 filler[5]; /* filler to align structures */
|
||||
};
|
||||
|
||||
/*
|
||||
* BOARD_CTRL - This per board structure contains all global
|
||||
* control fields related to the board.
|
||||
*/
|
||||
|
||||
struct BOARD_CTRL {
|
||||
|
||||
/* static info provided by the on-board CPU */
|
||||
__u32 n_channel; /* number of channels */
|
||||
__u32 fw_version; /* firmware version */
|
||||
|
||||
/* static info provided by the driver */
|
||||
__u32 op_system; /* op_system id */
|
||||
__u32 dr_version; /* driver version */
|
||||
|
||||
/* board control area */
|
||||
__u32 inactivity; /* inactivity control */
|
||||
|
||||
/* host to FW commands */
|
||||
__u32 hcmd_channel; /* channel number */
|
||||
__u32 hcmd_param; /* pointer to parameters */
|
||||
|
||||
/* FW to Host commands */
|
||||
__u32 fwcmd_channel; /* channel number */
|
||||
__u32 fwcmd_param; /* pointer to parameters */
|
||||
__u32 zf_int_queue_addr; /* offset for INT_QUEUE structure */
|
||||
|
||||
/* filler so the structures are aligned */
|
||||
__u32 filler[6];
|
||||
};
|
||||
|
||||
/* Host Interrupt Queue */
|
||||
|
||||
#define QUEUE_SIZE (10*MAX_CHAN)
|
||||
|
||||
struct INT_QUEUE {
|
||||
unsigned char intr_code[QUEUE_SIZE];
|
||||
unsigned long channel[QUEUE_SIZE];
|
||||
unsigned long param[QUEUE_SIZE];
|
||||
unsigned long put;
|
||||
unsigned long get;
|
||||
};
|
||||
|
||||
/*
|
||||
* ZFW_CTRL - This is the data structure that includes all other
|
||||
* data structures used by the Firmware.
|
||||
*/
|
||||
|
||||
struct ZFW_CTRL {
|
||||
struct BOARD_CTRL board_ctrl;
|
||||
struct CH_CTRL ch_ctrl[MAX_CHAN];
|
||||
struct BUF_CTRL buf_ctrl[MAX_CHAN];
|
||||
};
|
||||
|
||||
/****************** ****************** *******************/
|
||||
#endif
|
||||
|
||||
#endif /* _UAPI_LINUX_CYCLADES_H */
|
||||
@@ -193,8 +193,22 @@ struct dm_name_list {
|
||||
__u32 next; /* offset to the next record from
|
||||
the _start_ of this */
|
||||
char name[0];
|
||||
|
||||
/*
|
||||
* The following members can be accessed by taking a pointer that
|
||||
* points immediately after the terminating zero character in "name"
|
||||
* and aligning this pointer to next 8-byte boundary.
|
||||
* Uuid is present if the flag DM_NAME_LIST_FLAG_HAS_UUID is set.
|
||||
*
|
||||
* __u32 event_nr;
|
||||
* __u32 flags;
|
||||
* char uuid[0];
|
||||
*/
|
||||
};
|
||||
|
||||
#define DM_NAME_LIST_FLAG_HAS_UUID 1
|
||||
#define DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID 2
|
||||
|
||||
/*
|
||||
* Used to retrieve the target versions
|
||||
*/
|
||||
@@ -272,9 +286,9 @@ enum {
|
||||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 44
|
||||
#define DM_VERSION_MINOR 45
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2021-02-01)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2021-03-22)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
||||
@@ -219,7 +219,10 @@ struct fs_quota_statv {
|
||||
__s32 qs_rtbtimelimit;/* limit for rt blks timer */
|
||||
__u16 qs_bwarnlimit; /* limit for num warnings */
|
||||
__u16 qs_iwarnlimit; /* limit for num warnings */
|
||||
__u64 qs_pad2[8]; /* for future proofing */
|
||||
__u16 qs_rtbwarnlimit;/* limit for rt blks warnings */
|
||||
__u16 qs_pad3;
|
||||
__u32 qs_pad4;
|
||||
__u64 qs_pad2[7]; /* for future proofing */
|
||||
};
|
||||
|
||||
#endif /* _LINUX_DQBLK_XFS_H */
|
||||
|
||||
@@ -426,6 +426,7 @@ typedef struct elf64_shdr {
|
||||
#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */
|
||||
#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */
|
||||
#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* arm64 tagged address control (prctl()) */
|
||||
#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* arm64 ptr auth enabled keys (prctl()) */
|
||||
#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
|
||||
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
|
||||
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
|
||||
|
||||
@@ -669,6 +669,11 @@ enum ethtool_link_ext_substate_cable_issue {
|
||||
* @ETH_SS_TS_TX_TYPES: timestamping Tx types
|
||||
* @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
|
||||
* @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
|
||||
* @ETH_SS_STATS_STD: standardized stats
|
||||
* @ETH_SS_STATS_ETH_PHY: names of IEEE 802.3 PHY statistics
|
||||
* @ETH_SS_STATS_ETH_MAC: names of IEEE 802.3 MAC statistics
|
||||
* @ETH_SS_STATS_ETH_CTRL: names of IEEE 802.3 MAC Control statistics
|
||||
* @ETH_SS_STATS_RMON: names of RMON statistics
|
||||
*
|
||||
* @ETH_SS_COUNT: number of defined string sets
|
||||
*/
|
||||
@@ -689,6 +694,11 @@ enum ethtool_stringset {
|
||||
ETH_SS_TS_TX_TYPES,
|
||||
ETH_SS_TS_RX_FILTERS,
|
||||
ETH_SS_UDP_TUNNEL_TYPES,
|
||||
ETH_SS_STATS_STD,
|
||||
ETH_SS_STATS_ETH_PHY,
|
||||
ETH_SS_STATS_ETH_MAC,
|
||||
ETH_SS_STATS_ETH_CTRL,
|
||||
ETH_SS_STATS_RMON,
|
||||
|
||||
/* add new constants above here */
|
||||
ETH_SS_COUNT
|
||||
@@ -1383,15 +1393,33 @@ struct ethtool_per_queue_op {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ethtool_fecparam - Ethernet forward error correction(fec) parameters
|
||||
* struct ethtool_fecparam - Ethernet Forward Error Correction parameters
|
||||
* @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM
|
||||
* @active_fec: FEC mode which is active on porte
|
||||
* @fec: Bitmask of supported/configured FEC modes
|
||||
* @rsvd: Reserved for future extensions. i.e FEC bypass feature.
|
||||
* @active_fec: FEC mode which is active on the port, single bit set, GET only.
|
||||
* @fec: Bitmask of configured FEC modes.
|
||||
* @reserved: Reserved for future extensions, ignore on GET, write 0 for SET.
|
||||
*
|
||||
* Drivers should reject a non-zero setting of @autoneg when
|
||||
* autoneogotiation is disabled (or not supported) for the link.
|
||||
* Note that @reserved was never validated on input and ethtool user space
|
||||
* left it uninitialized when calling SET. Hence going forward it can only be
|
||||
* used to return a value to userspace with GET.
|
||||
*
|
||||
* FEC modes supported by the device can be read via %ETHTOOL_GLINKSETTINGS.
|
||||
* FEC settings are configured by link autonegotiation whenever it's enabled.
|
||||
* With autoneg on %ETHTOOL_GFECPARAM can be used to read the current mode.
|
||||
*
|
||||
* When autoneg is disabled %ETHTOOL_SFECPARAM controls the FEC settings.
|
||||
* It is recommended that drivers only accept a single bit set in @fec.
|
||||
* When multiple bits are set in @fec drivers may pick mode in an implementation
|
||||
* dependent way. Drivers should reject mixing %ETHTOOL_FEC_AUTO_BIT with other
|
||||
* FEC modes, because it's unclear whether in this case other modes constrain
|
||||
* AUTO or are independent choices.
|
||||
* Drivers must reject SET requests if they support none of the requested modes.
|
||||
*
|
||||
* If device does not support FEC drivers may use %ETHTOOL_FEC_NONE instead
|
||||
* of returning %EOPNOTSUPP from %ETHTOOL_GFECPARAM.
|
||||
*
|
||||
* See enum ethtool_fec_config_bits for definition of valid bits for both
|
||||
* @fec and @active_fec.
|
||||
*/
|
||||
struct ethtool_fecparam {
|
||||
__u32 cmd;
|
||||
@@ -1403,11 +1431,16 @@ struct ethtool_fecparam {
|
||||
|
||||
/**
|
||||
* enum ethtool_fec_config_bits - flags definition of ethtool_fec_configuration
|
||||
* @ETHTOOL_FEC_NONE: FEC mode configuration is not supported
|
||||
* @ETHTOOL_FEC_AUTO: Default/Best FEC mode provided by driver
|
||||
* @ETHTOOL_FEC_OFF: No FEC Mode
|
||||
* @ETHTOOL_FEC_RS: Reed-Solomon Forward Error Detection mode
|
||||
* @ETHTOOL_FEC_BASER: Base-R/Reed-Solomon Forward Error Detection mode
|
||||
* @ETHTOOL_FEC_NONE_BIT: FEC mode configuration is not supported. Should not
|
||||
* be used together with other bits. GET only.
|
||||
* @ETHTOOL_FEC_AUTO_BIT: Select default/best FEC mode automatically, usually
|
||||
* based link mode and SFP parameters read from module's
|
||||
* EEPROM. This bit does _not_ mean autonegotiation.
|
||||
* @ETHTOOL_FEC_OFF_BIT: No FEC Mode
|
||||
* @ETHTOOL_FEC_RS_BIT: Reed-Solomon FEC Mode
|
||||
* @ETHTOOL_FEC_BASER_BIT: Base-R/Reed-Solomon FEC Mode
|
||||
* @ETHTOOL_FEC_LLRS_BIT: Low Latency Reed Solomon FEC Mode (25G/50G Ethernet
|
||||
* Consortium)
|
||||
*/
|
||||
enum ethtool_fec_config_bits {
|
||||
ETHTOOL_FEC_NONE_BIT,
|
||||
|
||||
@@ -42,6 +42,10 @@ enum {
|
||||
ETHTOOL_MSG_CABLE_TEST_ACT,
|
||||
ETHTOOL_MSG_CABLE_TEST_TDR_ACT,
|
||||
ETHTOOL_MSG_TUNNEL_INFO_GET,
|
||||
ETHTOOL_MSG_FEC_GET,
|
||||
ETHTOOL_MSG_FEC_SET,
|
||||
ETHTOOL_MSG_MODULE_EEPROM_GET,
|
||||
ETHTOOL_MSG_STATS_GET,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_USER_CNT,
|
||||
@@ -80,6 +84,10 @@ enum {
|
||||
ETHTOOL_MSG_CABLE_TEST_NTF,
|
||||
ETHTOOL_MSG_CABLE_TEST_TDR_NTF,
|
||||
ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY,
|
||||
ETHTOOL_MSG_FEC_GET_REPLY,
|
||||
ETHTOOL_MSG_FEC_NTF,
|
||||
ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY,
|
||||
ETHTOOL_MSG_STATS_GET_REPLY,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_KERNEL_CNT,
|
||||
@@ -629,6 +637,185 @@ enum {
|
||||
ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)
|
||||
};
|
||||
|
||||
/* FEC */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_FEC_UNSPEC,
|
||||
ETHTOOL_A_FEC_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_FEC_MODES, /* bitset */
|
||||
ETHTOOL_A_FEC_AUTO, /* u8 */
|
||||
ETHTOOL_A_FEC_ACTIVE, /* u32 */
|
||||
ETHTOOL_A_FEC_STATS, /* nest - _A_FEC_STAT */
|
||||
|
||||
__ETHTOOL_A_FEC_CNT,
|
||||
ETHTOOL_A_FEC_MAX = (__ETHTOOL_A_FEC_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_FEC_STAT_UNSPEC,
|
||||
ETHTOOL_A_FEC_STAT_PAD,
|
||||
|
||||
ETHTOOL_A_FEC_STAT_CORRECTED, /* array, u64 */
|
||||
ETHTOOL_A_FEC_STAT_UNCORR, /* array, u64 */
|
||||
ETHTOOL_A_FEC_STAT_CORR_BITS, /* array, u64 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_FEC_STAT_CNT,
|
||||
ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1)
|
||||
};
|
||||
|
||||
/* MODULE EEPROM */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_MODULE_EEPROM_UNSPEC,
|
||||
ETHTOOL_A_MODULE_EEPROM_HEADER, /* nest - _A_HEADER_* */
|
||||
|
||||
ETHTOOL_A_MODULE_EEPROM_OFFSET, /* u32 */
|
||||
ETHTOOL_A_MODULE_EEPROM_LENGTH, /* u32 */
|
||||
ETHTOOL_A_MODULE_EEPROM_PAGE, /* u8 */
|
||||
ETHTOOL_A_MODULE_EEPROM_BANK, /* u8 */
|
||||
ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS, /* u8 */
|
||||
ETHTOOL_A_MODULE_EEPROM_DATA, /* nested */
|
||||
|
||||
__ETHTOOL_A_MODULE_EEPROM_CNT,
|
||||
ETHTOOL_A_MODULE_EEPROM_MAX = (__ETHTOOL_A_MODULE_EEPROM_CNT - 1)
|
||||
};
|
||||
|
||||
/* STATS */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STATS_UNSPEC,
|
||||
ETHTOOL_A_STATS_PAD,
|
||||
ETHTOOL_A_STATS_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_STATS_GROUPS, /* bitset */
|
||||
|
||||
ETHTOOL_A_STATS_GRP, /* nest - _A_STATS_GRP_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STATS_CNT,
|
||||
ETHTOOL_A_STATS_MAX = (__ETHTOOL_A_STATS_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_STATS_ETH_PHY,
|
||||
ETHTOOL_STATS_ETH_MAC,
|
||||
ETHTOOL_STATS_ETH_CTRL,
|
||||
ETHTOOL_STATS_RMON,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_STATS_CNT
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STATS_GRP_UNSPEC,
|
||||
ETHTOOL_A_STATS_GRP_PAD,
|
||||
|
||||
ETHTOOL_A_STATS_GRP_ID, /* u32 */
|
||||
ETHTOOL_A_STATS_GRP_SS_ID, /* u32 */
|
||||
|
||||
ETHTOOL_A_STATS_GRP_STAT, /* nest */
|
||||
|
||||
ETHTOOL_A_STATS_GRP_HIST_RX, /* nest */
|
||||
ETHTOOL_A_STATS_GRP_HIST_TX, /* nest */
|
||||
|
||||
ETHTOOL_A_STATS_GRP_HIST_BKT_LOW, /* u32 */
|
||||
ETHTOOL_A_STATS_GRP_HIST_BKT_HI, /* u32 */
|
||||
ETHTOOL_A_STATS_GRP_HIST_VAL, /* u64 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STATS_GRP_CNT,
|
||||
ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
/* 30.3.2.1.5 aSymbolErrorDuringCarrier */
|
||||
ETHTOOL_A_STATS_ETH_PHY_5_SYM_ERR,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STATS_ETH_PHY_CNT,
|
||||
ETHTOOL_A_STATS_ETH_PHY_MAX = (__ETHTOOL_A_STATS_ETH_PHY_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
/* 30.3.1.1.2 aFramesTransmittedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_2_TX_PKT,
|
||||
/* 30.3.1.1.3 aSingleCollisionFrames */
|
||||
ETHTOOL_A_STATS_ETH_MAC_3_SINGLE_COL,
|
||||
/* 30.3.1.1.4 aMultipleCollisionFrames */
|
||||
ETHTOOL_A_STATS_ETH_MAC_4_MULTI_COL,
|
||||
/* 30.3.1.1.5 aFramesReceivedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_5_RX_PKT,
|
||||
/* 30.3.1.1.6 aFrameCheckSequenceErrors */
|
||||
ETHTOOL_A_STATS_ETH_MAC_6_FCS_ERR,
|
||||
/* 30.3.1.1.7 aAlignmentErrors */
|
||||
ETHTOOL_A_STATS_ETH_MAC_7_ALIGN_ERR,
|
||||
/* 30.3.1.1.8 aOctetsTransmittedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_8_TX_BYTES,
|
||||
/* 30.3.1.1.9 aFramesWithDeferredXmissions */
|
||||
ETHTOOL_A_STATS_ETH_MAC_9_TX_DEFER,
|
||||
/* 30.3.1.1.10 aLateCollisions */
|
||||
ETHTOOL_A_STATS_ETH_MAC_10_LATE_COL,
|
||||
/* 30.3.1.1.11 aFramesAbortedDueToXSColls */
|
||||
ETHTOOL_A_STATS_ETH_MAC_11_XS_COL,
|
||||
/* 30.3.1.1.12 aFramesLostDueToIntMACXmitError */
|
||||
ETHTOOL_A_STATS_ETH_MAC_12_TX_INT_ERR,
|
||||
/* 30.3.1.1.13 aCarrierSenseErrors */
|
||||
ETHTOOL_A_STATS_ETH_MAC_13_CS_ERR,
|
||||
/* 30.3.1.1.14 aOctetsReceivedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_14_RX_BYTES,
|
||||
/* 30.3.1.1.15 aFramesLostDueToIntMACRcvError */
|
||||
ETHTOOL_A_STATS_ETH_MAC_15_RX_INT_ERR,
|
||||
|
||||
/* 30.3.1.1.18 aMulticastFramesXmittedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_18_TX_MCAST,
|
||||
/* 30.3.1.1.19 aBroadcastFramesXmittedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_19_TX_BCAST,
|
||||
/* 30.3.1.1.20 aFramesWithExcessiveDeferral */
|
||||
ETHTOOL_A_STATS_ETH_MAC_20_XS_DEFER,
|
||||
/* 30.3.1.1.21 aMulticastFramesReceivedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_21_RX_MCAST,
|
||||
/* 30.3.1.1.22 aBroadcastFramesReceivedOK */
|
||||
ETHTOOL_A_STATS_ETH_MAC_22_RX_BCAST,
|
||||
/* 30.3.1.1.23 aInRangeLengthErrors */
|
||||
ETHTOOL_A_STATS_ETH_MAC_23_IR_LEN_ERR,
|
||||
/* 30.3.1.1.24 aOutOfRangeLengthField */
|
||||
ETHTOOL_A_STATS_ETH_MAC_24_OOR_LEN,
|
||||
/* 30.3.1.1.25 aFrameTooLongErrors */
|
||||
ETHTOOL_A_STATS_ETH_MAC_25_TOO_LONG_ERR,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STATS_ETH_MAC_CNT,
|
||||
ETHTOOL_A_STATS_ETH_MAC_MAX = (__ETHTOOL_A_STATS_ETH_MAC_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
/* 30.3.3.3 aMACControlFramesTransmitted */
|
||||
ETHTOOL_A_STATS_ETH_CTRL_3_TX,
|
||||
/* 30.3.3.4 aMACControlFramesReceived */
|
||||
ETHTOOL_A_STATS_ETH_CTRL_4_RX,
|
||||
/* 30.3.3.5 aUnsupportedOpcodesReceived */
|
||||
ETHTOOL_A_STATS_ETH_CTRL_5_RX_UNSUP,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STATS_ETH_CTRL_CNT,
|
||||
ETHTOOL_A_STATS_ETH_CTRL_MAX = (__ETHTOOL_A_STATS_ETH_CTRL_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
/* etherStatsUndersizePkts */
|
||||
ETHTOOL_A_STATS_RMON_UNDERSIZE,
|
||||
/* etherStatsOversizePkts */
|
||||
ETHTOOL_A_STATS_RMON_OVERSIZE,
|
||||
/* etherStatsFragments */
|
||||
ETHTOOL_A_STATS_RMON_FRAG,
|
||||
/* etherStatsJabbers */
|
||||
ETHTOOL_A_STATS_RMON_JABBER,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STATS_RMON_CNT,
|
||||
ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1)
|
||||
};
|
||||
|
||||
/* generic netlink info */
|
||||
#define ETHTOOL_GENL_NAME "ethtool"
|
||||
#define ETHTOOL_GENL_VERSION 1
|
||||
|
||||
@@ -49,11 +49,11 @@ struct floppy_struct {
|
||||
#define FDCLRPRM _IO(2, 0x41)
|
||||
/* clear user-defined parameters */
|
||||
|
||||
#define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
|
||||
#define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
|
||||
#define FDSETMEDIAPRM FDSETPRM
|
||||
/* set user-defined parameters for current media */
|
||||
|
||||
#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
|
||||
#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
|
||||
#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
|
||||
#define FDDEFMEDIAPRM FDDEFPRM
|
||||
#define FDGETMEDIAPRM FDGETPRM
|
||||
@@ -65,7 +65,7 @@ struct floppy_struct {
|
||||
/* issue/don't issue kernel messages on media type change */
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Formatting (obsolete)
|
||||
*/
|
||||
#define FD_FILL_BYTE 0xF6 /* format fill byte. */
|
||||
@@ -126,13 +126,13 @@ typedef char floppy_drive_name[16];
|
||||
*/
|
||||
struct floppy_drive_params {
|
||||
signed char cmos; /* CMOS type */
|
||||
|
||||
/* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms
|
||||
|
||||
/* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms
|
||||
* etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA).
|
||||
*/
|
||||
unsigned long max_dtr; /* Step rate, usec */
|
||||
unsigned long hlt; /* Head load/settle time, msec */
|
||||
unsigned long hut; /* Head unload time (remnant of
|
||||
unsigned long hut; /* Head unload time (remnant of
|
||||
* 8" drives) */
|
||||
unsigned long srt; /* Step rate, usec */
|
||||
|
||||
@@ -145,12 +145,12 @@ struct floppy_drive_params {
|
||||
unsigned char rps; /* rotations per second */
|
||||
unsigned char tracks; /* maximum number of tracks */
|
||||
unsigned long timeout; /* timeout for interrupt requests */
|
||||
|
||||
unsigned char interleave_sect; /* if there are more sectors, use
|
||||
|
||||
unsigned char interleave_sect; /* if there are more sectors, use
|
||||
* interleave */
|
||||
|
||||
|
||||
struct floppy_max_errors max_errors;
|
||||
|
||||
|
||||
char flags; /* various flags, including ftd_msg */
|
||||
/*
|
||||
* Announce successful media type detection and media information loss after
|
||||
@@ -162,7 +162,7 @@ struct floppy_drive_params {
|
||||
#define FD_BROKEN_DCL 0x20
|
||||
#define FD_DEBUG 0x02
|
||||
#define FD_SILENT_DCL_CLEAR 0x4
|
||||
#define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware
|
||||
#define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware
|
||||
considerations */
|
||||
|
||||
char read_track; /* use readtrack during probing? */
|
||||
@@ -176,8 +176,8 @@ struct floppy_drive_params {
|
||||
#define FD_AUTODETECT_SIZE 8
|
||||
|
||||
short autodetect[FD_AUTODETECT_SIZE]; /* autodetected formats */
|
||||
|
||||
int checkfreq; /* how often should the drive be checked for disk
|
||||
|
||||
int checkfreq; /* how often should the drive be checked for disk
|
||||
* changes */
|
||||
int native_format; /* native format of this drive */
|
||||
};
|
||||
@@ -225,13 +225,13 @@ struct floppy_drive_struct {
|
||||
* decremented after each probe.
|
||||
*/
|
||||
int keep_data;
|
||||
|
||||
|
||||
/* Prevent "aliased" accesses. */
|
||||
int fd_ref;
|
||||
int fd_device;
|
||||
unsigned long last_checked; /* when was the drive last checked for a disk
|
||||
unsigned long last_checked; /* when was the drive last checked for a disk
|
||||
* change? */
|
||||
|
||||
|
||||
char *dmabuf;
|
||||
int bufblocks;
|
||||
};
|
||||
@@ -255,7 +255,7 @@ enum reset_mode {
|
||||
/*
|
||||
* FDC state
|
||||
*/
|
||||
struct floppy_fdc_state {
|
||||
struct floppy_fdc_state {
|
||||
int spec1; /* spec1 value last used */
|
||||
int spec2; /* spec2 value last used */
|
||||
int dtr;
|
||||
@@ -302,16 +302,16 @@ struct floppy_write_errors {
|
||||
* to the user process are not counted.
|
||||
*/
|
||||
|
||||
unsigned int write_errors; /* number of physical write errors
|
||||
unsigned int write_errors; /* number of physical write errors
|
||||
* encountered */
|
||||
|
||||
|
||||
/* position of first and last write errors */
|
||||
unsigned long first_error_sector;
|
||||
int first_error_generation;
|
||||
unsigned long last_error_sector;
|
||||
int last_error_generation;
|
||||
|
||||
unsigned int badness; /* highest retry count for a read or write
|
||||
|
||||
unsigned int badness; /* highest retry count for a read or write
|
||||
* operation */
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ struct floppy_raw_cmd {
|
||||
#define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */
|
||||
#define FD_RAW_INTR 8 /* wait for an interrupt */
|
||||
#define FD_RAW_SPIN 0x10 /* spin up the disk for this command */
|
||||
#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command
|
||||
#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command
|
||||
* completion */
|
||||
#define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */
|
||||
#define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */
|
||||
@@ -353,7 +353,7 @@ struct floppy_raw_cmd {
|
||||
|
||||
void __user *data;
|
||||
char *kernel_data; /* location of data buffer in the kernel */
|
||||
struct floppy_raw_cmd *next; /* used for chaining of raw cmd's
|
||||
struct floppy_raw_cmd *next; /* used for chaining of raw cmd's
|
||||
* within the kernel */
|
||||
long length; /* in: length of dma transfer. out: remaining bytes */
|
||||
long phys_length; /* physical length, if different from dma length */
|
||||
|
||||
@@ -179,6 +179,8 @@
|
||||
* 7.33
|
||||
* - add FUSE_HANDLE_KILLPRIV_V2, FUSE_WRITE_KILL_SUIDGID, FATTR_KILL_SUIDGID
|
||||
* - add FUSE_OPEN_KILL_SUIDGID
|
||||
* - extend fuse_setxattr_in, add FUSE_SETXATTR_EXT
|
||||
* - add FUSE_SETXATTR_ACL_KILL_SGID
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FUSE_H
|
||||
@@ -330,6 +332,7 @@ struct fuse_file_lock {
|
||||
* does not have CAP_FSETID. Additionally upon
|
||||
* write/truncate sgid is killed only if file has group
|
||||
* execute permission. (Same as Linux VFS behavior).
|
||||
* FUSE_SETXATTR_EXT: Server supports extended struct fuse_setxattr_in
|
||||
*/
|
||||
#define FUSE_ASYNC_READ (1 << 0)
|
||||
#define FUSE_POSIX_LOCKS (1 << 1)
|
||||
@@ -360,6 +363,7 @@ struct fuse_file_lock {
|
||||
#define FUSE_MAP_ALIGNMENT (1 << 26)
|
||||
#define FUSE_SUBMOUNTS (1 << 27)
|
||||
#define FUSE_HANDLE_KILLPRIV_V2 (1 << 28)
|
||||
#define FUSE_SETXATTR_EXT (1 << 29)
|
||||
|
||||
/**
|
||||
* CUSE INIT request/reply flags
|
||||
@@ -451,6 +455,12 @@ struct fuse_file_lock {
|
||||
*/
|
||||
#define FUSE_OPEN_KILL_SUIDGID (1 << 0)
|
||||
|
||||
/**
|
||||
* setxattr flags
|
||||
* FUSE_SETXATTR_ACL_KILL_SGID: Clear SGID when system.posix_acl_access is set
|
||||
*/
|
||||
#define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0)
|
||||
|
||||
enum fuse_opcode {
|
||||
FUSE_LOOKUP = 1,
|
||||
FUSE_FORGET = 2, /* no reply */
|
||||
@@ -681,9 +691,13 @@ struct fuse_fsync_in {
|
||||
uint32_t padding;
|
||||
};
|
||||
|
||||
#define FUSE_COMPAT_SETXATTR_IN_SIZE 8
|
||||
|
||||
struct fuse_setxattr_in {
|
||||
uint32_t size;
|
||||
uint32_t flags;
|
||||
uint32_t setxattr_flags;
|
||||
uint32_t padding;
|
||||
};
|
||||
|
||||
struct fuse_getxattr_in {
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/if.h>
|
||||
#include <linux/in6.h>
|
||||
|
||||
#define ICMP_ECHOREPLY 0 /* Echo Reply */
|
||||
#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
|
||||
@@ -66,6 +69,23 @@
|
||||
#define ICMP_EXC_TTL 0 /* TTL count exceeded */
|
||||
#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */
|
||||
|
||||
/* Codes for EXT_ECHO (PROBE) */
|
||||
#define ICMP_EXT_ECHO 42
|
||||
#define ICMP_EXT_ECHOREPLY 43
|
||||
#define ICMP_EXT_CODE_MAL_QUERY 1 /* Malformed Query */
|
||||
#define ICMP_EXT_CODE_NO_IF 2 /* No such Interface */
|
||||
#define ICMP_EXT_CODE_NO_TABLE_ENT 3 /* No such Table Entry */
|
||||
#define ICMP_EXT_CODE_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */
|
||||
|
||||
/* Constants for EXT_ECHO (PROBE) */
|
||||
#define ICMP_EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply message */
|
||||
#define ICMP_EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply message */
|
||||
#define ICMP_EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply message */
|
||||
#define ICMP_EXT_ECHO_CTYPE_NAME 1
|
||||
#define ICMP_EXT_ECHO_CTYPE_INDEX 2
|
||||
#define ICMP_EXT_ECHO_CTYPE_ADDR 3
|
||||
#define ICMP_AFI_IP 1 /* Address Family Identifier for ipv4 */
|
||||
#define ICMP_AFI_IP6 2 /* Address Family Identifier for ipv6 */
|
||||
|
||||
struct icmphdr {
|
||||
__u8 type;
|
||||
@@ -118,4 +138,26 @@ struct icmp_extobj_hdr {
|
||||
__u8 class_type;
|
||||
};
|
||||
|
||||
/* RFC 8335: 2.1 Header for c-type 3 payload */
|
||||
struct icmp_ext_echo_ctype3_hdr {
|
||||
__be16 afi;
|
||||
__u8 addrlen;
|
||||
__u8 reserved;
|
||||
};
|
||||
|
||||
/* RFC 8335: 2.1 Interface Identification Object */
|
||||
struct icmp_ext_echo_iio {
|
||||
struct icmp_extobj_hdr extobj_hdr;
|
||||
union {
|
||||
char name[IFNAMSIZ];
|
||||
__be32 ifindex;
|
||||
struct {
|
||||
struct icmp_ext_echo_ctype3_hdr ctype3_hdr;
|
||||
union {
|
||||
struct in_addr ipv4_addr;
|
||||
struct in6_addr ipv6_addr;
|
||||
} ip_addr;
|
||||
} addr;
|
||||
} ident;
|
||||
};
|
||||
#endif /* _UAPI_LINUX_ICMP_H */
|
||||
|
||||
@@ -140,6 +140,9 @@ struct icmp6hdr {
|
||||
#define ICMPV6_UNK_OPTION 2
|
||||
#define ICMPV6_HDR_INCOMP 3
|
||||
|
||||
/* Codes for EXT_ECHO (PROBE) */
|
||||
#define ICMPV6_EXT_ECHO_REQUEST 160
|
||||
#define ICMPV6_EXT_ECHO_REPLY 161
|
||||
/*
|
||||
* constants for (set|get)sockopt
|
||||
*/
|
||||
|
||||
@@ -247,8 +247,8 @@ struct dsa_completion_record {
|
||||
uint32_t rsvd2:8;
|
||||
};
|
||||
|
||||
uint16_t delta_rec_size;
|
||||
uint16_t crc_val;
|
||||
uint32_t delta_rec_size;
|
||||
uint32_t crc_val;
|
||||
|
||||
/* DIF check & strip */
|
||||
struct {
|
||||
|
||||
@@ -153,14 +153,3 @@ enum {
|
||||
#define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1)
|
||||
|
||||
#endif /* _LINUX_IF_BONDING_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* version-control: t
|
||||
* kept-new-versions: 5
|
||||
* c-indent-level: 8
|
||||
* c-basic-offset: 8
|
||||
* tab-width: 8
|
||||
* End:
|
||||
*/
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Version: @(#)if_fddi.h 1.0.3 Oct 6 2018
|
||||
*
|
||||
* Author: Lawrence V. Stefani, <stefani@yahoo.com>
|
||||
* Maintainer: Maciej W. Rozycki, <macro@linux-mips.org>
|
||||
* Maintainer: Maciej W. Rozycki, <macro@orcam.me.uk>
|
||||
*
|
||||
* if_fddi.h is based on previous if_ether.h and if_tr.h work by
|
||||
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
|
||||
|
||||
@@ -614,6 +614,7 @@ enum macvlan_macaddr_mode {
|
||||
};
|
||||
|
||||
#define MACVLAN_FLAG_NOPROMISC 1
|
||||
#define MACVLAN_FLAG_NODST 2 /* skip dst macvlan if matching src macvlan */
|
||||
|
||||
/* VRF section */
|
||||
enum {
|
||||
|
||||
10
include/uapi/linux/iio/buffer.h
Normal file
10
include/uapi/linux/iio/buffer.h
Normal file
@@ -0,0 +1,10 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* industrial I/O buffer definitions needed both in and out of kernel
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_IIO_BUFFER_H_
|
||||
#define _UAPI_IIO_BUFFER_H_
|
||||
|
||||
#define IIO_BUFFER_GET_FD_IOCTL _IOWR('i', 0x91, int)
|
||||
|
||||
#endif /* _UAPI_IIO_BUFFER_H_ */
|
||||
@@ -159,6 +159,21 @@ enum {
|
||||
*/
|
||||
#define SPLICE_F_FD_IN_FIXED (1U << 31) /* the last bit of __u32 */
|
||||
|
||||
/*
|
||||
* POLL_ADD flags. Note that since sqe->poll_events is the flag space, the
|
||||
* command flags for POLL_ADD are stored in sqe->len.
|
||||
*
|
||||
* IORING_POLL_ADD_MULTI Multishot poll. Sets IORING_CQE_F_MORE if
|
||||
* the poll handler will continue to report
|
||||
* CQEs on behalf of the same SQE.
|
||||
*
|
||||
* IORING_POLL_UPDATE Update existing poll request, matching
|
||||
* sqe->addr as the old user_data field.
|
||||
*/
|
||||
#define IORING_POLL_ADD_MULTI (1U << 0)
|
||||
#define IORING_POLL_UPDATE_EVENTS (1U << 1)
|
||||
#define IORING_POLL_UPDATE_USER_DATA (1U << 2)
|
||||
|
||||
/*
|
||||
* IO completion data structure (Completion Queue Entry)
|
||||
*/
|
||||
@@ -172,8 +187,10 @@ struct io_uring_cqe {
|
||||
* cqe->flags
|
||||
*
|
||||
* IORING_CQE_F_BUFFER If set, the upper 16 bits are the buffer ID
|
||||
* IORING_CQE_F_MORE If set, parent SQE will generate more CQE entries
|
||||
*/
|
||||
#define IORING_CQE_F_BUFFER (1U << 0)
|
||||
#define IORING_CQE_F_MORE (1U << 1)
|
||||
|
||||
enum {
|
||||
IORING_CQE_BUFFER_SHIFT = 16,
|
||||
@@ -281,6 +298,8 @@ enum {
|
||||
IORING_UNREGISTER_PERSONALITY = 10,
|
||||
IORING_REGISTER_RESTRICTIONS = 11,
|
||||
IORING_REGISTER_ENABLE_RINGS = 12,
|
||||
IORING_REGISTER_RSRC = 13,
|
||||
IORING_REGISTER_RSRC_UPDATE = 14,
|
||||
|
||||
/* this goes last */
|
||||
IORING_REGISTER_LAST
|
||||
@@ -293,12 +312,33 @@ struct io_uring_files_update {
|
||||
__aligned_u64 /* __s32 * */ fds;
|
||||
};
|
||||
|
||||
enum {
|
||||
IORING_RSRC_FILE = 0,
|
||||
IORING_RSRC_BUFFER = 1,
|
||||
};
|
||||
|
||||
struct io_uring_rsrc_register {
|
||||
__u32 type;
|
||||
__u32 nr;
|
||||
__aligned_u64 data;
|
||||
__aligned_u64 tags;
|
||||
};
|
||||
|
||||
struct io_uring_rsrc_update {
|
||||
__u32 offset;
|
||||
__u32 resv;
|
||||
__aligned_u64 data;
|
||||
};
|
||||
|
||||
struct io_uring_rsrc_update2 {
|
||||
__u32 offset;
|
||||
__u32 resv;
|
||||
__aligned_u64 data;
|
||||
__aligned_u64 tags;
|
||||
__u32 type;
|
||||
__u32 nr;
|
||||
};
|
||||
|
||||
/* Skip updating fd indexes set to this value in the fd table */
|
||||
#define IORING_REGISTER_FILES_SKIP (-2)
|
||||
|
||||
|
||||
@@ -288,7 +288,8 @@ struct iommu_gpasid_bind_data_vtd {
|
||||
#define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */
|
||||
#define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */
|
||||
#define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */
|
||||
#define IOMMU_SVA_VTD_GPASID_LAST (1 << 6)
|
||||
#define IOMMU_SVA_VTD_GPASID_WPE (1 << 6) /* Write protect enable */
|
||||
#define IOMMU_SVA_VTD_GPASID_LAST (1 << 7)
|
||||
__u64 flags;
|
||||
__u32 pat;
|
||||
__u32 emt;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#define KEXEC_ARCH_MIPS_LE (10 << 16)
|
||||
#define KEXEC_ARCH_MIPS ( 8 << 16)
|
||||
#define KEXEC_ARCH_AARCH64 (183 << 16)
|
||||
#define KEXEC_ARCH_RISCV (243 << 16)
|
||||
|
||||
/* The artificial cap on the number of segments passed to kexec_load. */
|
||||
#define KEXEC_SEGMENT_MAX 16
|
||||
|
||||
@@ -1078,6 +1078,10 @@ struct kvm_ppc_resize_hpt {
|
||||
#define KVM_CAP_DIRTY_LOG_RING 192
|
||||
#define KVM_CAP_X86_BUS_LOCK_EXIT 193
|
||||
#define KVM_CAP_PPC_DAWR1 194
|
||||
#define KVM_CAP_SET_GUEST_DEBUG2 195
|
||||
#define KVM_CAP_SGX_ATTRIBUTE 196
|
||||
#define KVM_CAP_VM_COPY_ENC_CONTEXT_FROM 197
|
||||
#define KVM_CAP_PTP_KVM 198
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
@@ -1671,6 +1675,8 @@ enum sev_cmd_id {
|
||||
KVM_SEV_CERT_EXPORT,
|
||||
/* Attestation report */
|
||||
KVM_SEV_GET_ATTESTATION_REPORT,
|
||||
/* Guest Migration Extension */
|
||||
KVM_SEV_SEND_CANCEL,
|
||||
|
||||
KVM_SEV_NR_MAX,
|
||||
};
|
||||
@@ -1729,6 +1735,45 @@ struct kvm_sev_attestation_report {
|
||||
__u32 len;
|
||||
};
|
||||
|
||||
struct kvm_sev_send_start {
|
||||
__u32 policy;
|
||||
__u64 pdh_cert_uaddr;
|
||||
__u32 pdh_cert_len;
|
||||
__u64 plat_certs_uaddr;
|
||||
__u32 plat_certs_len;
|
||||
__u64 amd_certs_uaddr;
|
||||
__u32 amd_certs_len;
|
||||
__u64 session_uaddr;
|
||||
__u32 session_len;
|
||||
};
|
||||
|
||||
struct kvm_sev_send_update_data {
|
||||
__u64 hdr_uaddr;
|
||||
__u32 hdr_len;
|
||||
__u64 guest_uaddr;
|
||||
__u32 guest_len;
|
||||
__u64 trans_uaddr;
|
||||
__u32 trans_len;
|
||||
};
|
||||
|
||||
struct kvm_sev_receive_start {
|
||||
__u32 handle;
|
||||
__u32 policy;
|
||||
__u64 pdh_uaddr;
|
||||
__u32 pdh_len;
|
||||
__u64 session_uaddr;
|
||||
__u32 session_len;
|
||||
};
|
||||
|
||||
struct kvm_sev_receive_update_data {
|
||||
__u64 hdr_uaddr;
|
||||
__u32 hdr_len;
|
||||
__u64 guest_uaddr;
|
||||
__u32 guest_len;
|
||||
__u64 trans_uaddr;
|
||||
__u32 trans_len;
|
||||
};
|
||||
|
||||
#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
|
||||
#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
|
||||
#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)
|
||||
|
||||
137
include/uapi/linux/landlock.h
Normal file
137
include/uapi/linux/landlock.h
Normal file
@@ -0,0 +1,137 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Landlock - User space API
|
||||
*
|
||||
* Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
|
||||
* Copyright © 2018-2020 ANSSI
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_LINUX_LANDLOCK_H
|
||||
#define _UAPI_LINUX_LANDLOCK_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* struct landlock_ruleset_attr - Ruleset definition
|
||||
*
|
||||
* Argument of sys_landlock_create_ruleset(). This structure can grow in
|
||||
* future versions.
|
||||
*/
|
||||
struct landlock_ruleset_attr {
|
||||
/**
|
||||
* @handled_access_fs: Bitmask of actions (cf. `Filesystem flags`_)
|
||||
* that is handled by this ruleset and should then be forbidden if no
|
||||
* rule explicitly allow them. This is needed for backward
|
||||
* compatibility reasons.
|
||||
*/
|
||||
__u64 handled_access_fs;
|
||||
};
|
||||
|
||||
/*
|
||||
* sys_landlock_create_ruleset() flags:
|
||||
*
|
||||
* - %LANDLOCK_CREATE_RULESET_VERSION: Get the highest supported Landlock ABI
|
||||
* version.
|
||||
*/
|
||||
#define LANDLOCK_CREATE_RULESET_VERSION (1U << 0)
|
||||
|
||||
/**
|
||||
* enum landlock_rule_type - Landlock rule type
|
||||
*
|
||||
* Argument of sys_landlock_add_rule().
|
||||
*/
|
||||
enum landlock_rule_type {
|
||||
/**
|
||||
* @LANDLOCK_RULE_PATH_BENEATH: Type of a &struct
|
||||
* landlock_path_beneath_attr .
|
||||
*/
|
||||
LANDLOCK_RULE_PATH_BENEATH = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct landlock_path_beneath_attr - Path hierarchy definition
|
||||
*
|
||||
* Argument of sys_landlock_add_rule().
|
||||
*/
|
||||
struct landlock_path_beneath_attr {
|
||||
/**
|
||||
* @allowed_access: Bitmask of allowed actions for this file hierarchy
|
||||
* (cf. `Filesystem flags`_).
|
||||
*/
|
||||
__u64 allowed_access;
|
||||
/**
|
||||
* @parent_fd: File descriptor, open with ``O_PATH``, which identifies
|
||||
* the parent directory of a file hierarchy, or just a file.
|
||||
*/
|
||||
__s32 parent_fd;
|
||||
/*
|
||||
* This struct is packed to avoid trailing reserved members.
|
||||
* Cf. security/landlock/syscalls.c:build_check_abi()
|
||||
*/
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
* DOC: fs_access
|
||||
*
|
||||
* A set of actions on kernel objects may be defined by an attribute (e.g.
|
||||
* &struct landlock_path_beneath_attr) including a bitmask of access.
|
||||
*
|
||||
* Filesystem flags
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* These flags enable to restrict a sandboxed process to a set of actions on
|
||||
* files and directories. Files or directories opened before the sandboxing
|
||||
* are not subject to these restrictions.
|
||||
*
|
||||
* A file can only receive these access rights:
|
||||
*
|
||||
* - %LANDLOCK_ACCESS_FS_EXECUTE: Execute a file.
|
||||
* - %LANDLOCK_ACCESS_FS_WRITE_FILE: Open a file with write access.
|
||||
* - %LANDLOCK_ACCESS_FS_READ_FILE: Open a file with read access.
|
||||
*
|
||||
* A directory can receive access rights related to files or directories. The
|
||||
* following access right is applied to the directory itself, and the
|
||||
* directories beneath it:
|
||||
*
|
||||
* - %LANDLOCK_ACCESS_FS_READ_DIR: Open a directory or list its content.
|
||||
*
|
||||
* However, the following access rights only apply to the content of a
|
||||
* directory, not the directory itself:
|
||||
*
|
||||
* - %LANDLOCK_ACCESS_FS_REMOVE_DIR: Remove an empty directory or rename one.
|
||||
* - %LANDLOCK_ACCESS_FS_REMOVE_FILE: Unlink (or rename) a file.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_CHAR: Create (or rename or link) a character
|
||||
* device.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_DIR: Create (or rename) a directory.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_REG: Create (or rename or link) a regular file.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_SOCK: Create (or rename or link) a UNIX domain
|
||||
* socket.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_FIFO: Create (or rename or link) a named pipe.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_BLOCK: Create (or rename or link) a block device.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_SYM: Create (or rename or link) a symbolic link.
|
||||
*
|
||||
* .. warning::
|
||||
*
|
||||
* It is currently not possible to restrict some file-related actions
|
||||
* accessible through these syscall families: :manpage:`chdir(2)`,
|
||||
* :manpage:`truncate(2)`, :manpage:`stat(2)`, :manpage:`flock(2)`,
|
||||
* :manpage:`chmod(2)`, :manpage:`chown(2)`, :manpage:`setxattr(2)`,
|
||||
* :manpage:`utime(2)`, :manpage:`ioctl(2)`, :manpage:`fcntl(2)`,
|
||||
* :manpage:`access(2)`.
|
||||
* Future Landlock evolutions will enable to restrict them.
|
||||
*/
|
||||
#define LANDLOCK_ACCESS_FS_EXECUTE (1ULL << 0)
|
||||
#define LANDLOCK_ACCESS_FS_WRITE_FILE (1ULL << 1)
|
||||
#define LANDLOCK_ACCESS_FS_READ_FILE (1ULL << 2)
|
||||
#define LANDLOCK_ACCESS_FS_READ_DIR (1ULL << 3)
|
||||
#define LANDLOCK_ACCESS_FS_REMOVE_DIR (1ULL << 4)
|
||||
#define LANDLOCK_ACCESS_FS_REMOVE_FILE (1ULL << 5)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_CHAR (1ULL << 6)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_DIR (1ULL << 7)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_REG (1ULL << 8)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_SOCK (1ULL << 9)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_FIFO (1ULL << 10)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_BLOCK (1ULL << 11)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_SYM (1ULL << 12)
|
||||
|
||||
#endif /* _UAPI_LINUX_LANDLOCK_H */
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/const.h>
|
||||
#include <linux/ioctl.h>
|
||||
#else /* __KERNEL__ */
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#define GOLDSTAR_CDROM_MAJOR 16
|
||||
#define OPTICS_CDROM_MAJOR 17
|
||||
#define SANYO_CDROM_MAJOR 18
|
||||
#define CYCLADES_MAJOR 19
|
||||
#define CYCLADESAUX_MAJOR 20
|
||||
#define MITSUMI_X_CDROM_MAJOR 20
|
||||
#define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */
|
||||
#define SCSI_GENERIC_MAJOR 21
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (c) 2005 Henk Vergonet <Henk.Vergonet@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef MAP_TO_7SEGMENT_H
|
||||
|
||||
@@ -120,6 +120,8 @@
|
||||
#define MDIO_PMA_SPEED_100 0x0020 /* 100M capable */
|
||||
#define MDIO_PMA_SPEED_10 0x0040 /* 10M capable */
|
||||
#define MDIO_PCS_SPEED_10P2B 0x0002 /* 10PASS-TS/2BASE-TL capable */
|
||||
#define MDIO_PCS_SPEED_2_5G 0x0040 /* 2.5G capable */
|
||||
#define MDIO_PCS_SPEED_5G 0x0080 /* 5G capable */
|
||||
|
||||
/* Device present registers. */
|
||||
#define MDIO_DEVS_PRESENT(devad) (1 << (devad))
|
||||
|
||||
@@ -64,5 +64,12 @@ enum {
|
||||
#define MPOL_F_MOF (1 << 3) /* this policy wants migrate on fault */
|
||||
#define MPOL_F_MORON (1 << 4) /* Migrate On protnone Reference On Node */
|
||||
|
||||
/*
|
||||
* These bit locations are exposed in the vm.zone_reclaim_mode sysctl
|
||||
* ABI. New bits are OK, but existing bits can never change.
|
||||
*/
|
||||
#define RECLAIM_ZONE (1<<0) /* Run shrink_inactive_list on the zone */
|
||||
#define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */
|
||||
#define RECLAIM_UNMAP (1<<2) /* Unmap pages during reclaim */
|
||||
|
||||
#endif /* _UAPI_LINUX_MEMPOLICY_H */
|
||||
|
||||
@@ -174,10 +174,21 @@ enum mptcp_event_attr {
|
||||
MPTCP_ATTR_FLAGS, /* u16 */
|
||||
MPTCP_ATTR_TIMEOUT, /* u32 */
|
||||
MPTCP_ATTR_IF_IDX, /* s32 */
|
||||
MPTCP_ATTR_RESET_REASON,/* u32 */
|
||||
MPTCP_ATTR_RESET_FLAGS, /* u32 */
|
||||
|
||||
__MPTCP_ATTR_AFTER_LAST
|
||||
};
|
||||
|
||||
#define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1)
|
||||
|
||||
/* MPTCP Reset reason codes, rfc8684 */
|
||||
#define MPTCP_RST_EUNSPEC 0
|
||||
#define MPTCP_RST_EMPTCP 1
|
||||
#define MPTCP_RST_ERESOURCE 2
|
||||
#define MPTCP_RST_EPROHIBIT 3
|
||||
#define MPTCP_RST_EWQ2BIG 4
|
||||
#define MPTCP_RST_EBADPERF 5
|
||||
#define MPTCP_RST_EMIDDLEBOX 6
|
||||
|
||||
#endif /* _UAPI_MPTCP_H */
|
||||
|
||||
@@ -398,9 +398,11 @@ enum nft_set_attributes {
|
||||
* enum nft_set_elem_flags - nf_tables set element flags
|
||||
*
|
||||
* @NFT_SET_ELEM_INTERVAL_END: element ends the previous interval
|
||||
* @NFT_SET_ELEM_CATCHALL: special catch-all element
|
||||
*/
|
||||
enum nft_set_elem_flags {
|
||||
NFT_SET_ELEM_INTERVAL_END = 0x1,
|
||||
NFT_SET_ELEM_CATCHALL = 0x2,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1014,11 +1016,13 @@ enum nft_rt_attributes {
|
||||
*
|
||||
* @NFTA_SOCKET_KEY: socket key to match
|
||||
* @NFTA_SOCKET_DREG: destination register
|
||||
* @NFTA_SOCKET_LEVEL: cgroups2 ancestor level (only for cgroupsv2)
|
||||
*/
|
||||
enum nft_socket_attributes {
|
||||
NFTA_SOCKET_UNSPEC,
|
||||
NFTA_SOCKET_KEY,
|
||||
NFTA_SOCKET_DREG,
|
||||
NFTA_SOCKET_LEVEL,
|
||||
__NFTA_SOCKET_MAX
|
||||
};
|
||||
#define NFTA_SOCKET_MAX (__NFTA_SOCKET_MAX - 1)
|
||||
@@ -1029,11 +1033,13 @@ enum nft_socket_attributes {
|
||||
* @NFT_SOCKET_TRANSPARENT: Value of the IP(V6)_TRANSPARENT socket option
|
||||
* @NFT_SOCKET_MARK: Value of the socket mark
|
||||
* @NFT_SOCKET_WILDCARD: Whether the socket is zero-bound (e.g. 0.0.0.0 or ::0)
|
||||
* @NFT_SOCKET_CGROUPV2: Match on cgroups version 2
|
||||
*/
|
||||
enum nft_socket_keys {
|
||||
NFT_SOCKET_TRANSPARENT,
|
||||
NFT_SOCKET_MARK,
|
||||
NFT_SOCKET_WILDCARD,
|
||||
NFT_SOCKET_CGROUPV2,
|
||||
__NFT_SOCKET_MAX
|
||||
};
|
||||
#define NFT_SOCKET_MAX (__NFT_SOCKET_MAX - 1)
|
||||
|
||||
@@ -20,4 +20,10 @@ struct xt_secmark_target_info {
|
||||
char secctx[SECMARK_SECCTX_MAX];
|
||||
};
|
||||
|
||||
struct xt_secmark_target_info_v1 {
|
||||
__u8 mode;
|
||||
char secctx[SECMARK_SECCTX_MAX];
|
||||
__u32 secid;
|
||||
};
|
||||
|
||||
#endif /*_XT_SECMARK_H_target */
|
||||
|
||||
@@ -21,7 +21,10 @@ struct nexthop_grp {
|
||||
};
|
||||
|
||||
enum {
|
||||
NEXTHOP_GRP_TYPE_MPATH, /* default type if not specified */
|
||||
NEXTHOP_GRP_TYPE_MPATH, /* hash-threshold nexthop group
|
||||
* default type if not specified
|
||||
*/
|
||||
NEXTHOP_GRP_TYPE_RES, /* resilient nexthop group */
|
||||
__NEXTHOP_GRP_TYPE_MAX,
|
||||
};
|
||||
|
||||
@@ -52,8 +55,50 @@ enum {
|
||||
NHA_FDB, /* flag; nexthop belongs to a bridge fdb */
|
||||
/* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */
|
||||
|
||||
/* nested; resilient nexthop group attributes */
|
||||
NHA_RES_GROUP,
|
||||
/* nested; nexthop bucket attributes */
|
||||
NHA_RES_BUCKET,
|
||||
|
||||
__NHA_MAX,
|
||||
};
|
||||
|
||||
#define NHA_MAX (__NHA_MAX - 1)
|
||||
|
||||
enum {
|
||||
NHA_RES_GROUP_UNSPEC,
|
||||
/* Pad attribute for 64-bit alignment. */
|
||||
NHA_RES_GROUP_PAD = NHA_RES_GROUP_UNSPEC,
|
||||
|
||||
/* u16; number of nexthop buckets in a resilient nexthop group */
|
||||
NHA_RES_GROUP_BUCKETS,
|
||||
/* clock_t as u32; nexthop bucket idle timer (per-group) */
|
||||
NHA_RES_GROUP_IDLE_TIMER,
|
||||
/* clock_t as u32; nexthop unbalanced timer */
|
||||
NHA_RES_GROUP_UNBALANCED_TIMER,
|
||||
/* clock_t as u64; nexthop unbalanced time */
|
||||
NHA_RES_GROUP_UNBALANCED_TIME,
|
||||
|
||||
__NHA_RES_GROUP_MAX,
|
||||
};
|
||||
|
||||
#define NHA_RES_GROUP_MAX (__NHA_RES_GROUP_MAX - 1)
|
||||
|
||||
enum {
|
||||
NHA_RES_BUCKET_UNSPEC,
|
||||
/* Pad attribute for 64-bit alignment. */
|
||||
NHA_RES_BUCKET_PAD = NHA_RES_BUCKET_UNSPEC,
|
||||
|
||||
/* u16; nexthop bucket index */
|
||||
NHA_RES_BUCKET_INDEX,
|
||||
/* clock_t as u64; nexthop bucket idle time */
|
||||
NHA_RES_BUCKET_IDLE_TIME,
|
||||
/* u32; nexthop id assigned to the nexthop bucket */
|
||||
NHA_RES_BUCKET_NH_ID,
|
||||
|
||||
__NHA_RES_BUCKET_MAX,
|
||||
};
|
||||
|
||||
#define NHA_RES_BUCKET_MAX (__NHA_RES_BUCKET_MAX - 1)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -178,9 +178,3 @@
|
||||
#define NFS4_MAX_BACK_CHANNEL_OPS 2
|
||||
|
||||
#endif /* _UAPI_LINUX_NFS4_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-basic-offset: 8
|
||||
* End:
|
||||
*/
|
||||
|
||||
@@ -64,13 +64,24 @@ struct nfs_fhbase_old {
|
||||
* in include/linux/exportfs.h for currently registered values.
|
||||
*/
|
||||
struct nfs_fhbase_new {
|
||||
__u8 fb_version; /* == 1, even => nfs_fhbase_old */
|
||||
__u8 fb_auth_type;
|
||||
__u8 fb_fsid_type;
|
||||
__u8 fb_fileid_type;
|
||||
__u32 fb_auth[1];
|
||||
/* __u32 fb_fsid[0]; floating */
|
||||
/* __u32 fb_fileid[0]; floating */
|
||||
union {
|
||||
struct {
|
||||
__u8 fb_version_aux; /* == 1, even => nfs_fhbase_old */
|
||||
__u8 fb_auth_type_aux;
|
||||
__u8 fb_fsid_type_aux;
|
||||
__u8 fb_fileid_type_aux;
|
||||
__u32 fb_auth[1];
|
||||
/* __u32 fb_fsid[0]; floating */
|
||||
/* __u32 fb_fileid[0]; floating */
|
||||
};
|
||||
struct {
|
||||
__u8 fb_version; /* == 1, even => nfs_fhbase_old */
|
||||
__u8 fb_auth_type;
|
||||
__u8 fb_fsid_type;
|
||||
__u8 fb_fileid_type;
|
||||
__u32 fb_auth_flex[]; /* flexible-array member */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
struct knfsd_fh {
|
||||
@@ -97,7 +108,7 @@ struct knfsd_fh {
|
||||
#define fh_fsid_type fh_base.fh_new.fb_fsid_type
|
||||
#define fh_auth_type fh_base.fh_new.fb_auth_type
|
||||
#define fh_fileid_type fh_base.fh_new.fb_fileid_type
|
||||
#define fh_fsid fh_base.fh_new.fb_auth
|
||||
#define fh_fsid fh_base.fh_new.fb_auth_flex
|
||||
|
||||
/* Do not use, provided for userspace compatiblity. */
|
||||
#define fh_auth fh_base.fh_new.fb_auth
|
||||
|
||||
@@ -655,6 +655,9 @@
|
||||
* When a security association was established on an 802.1X network using
|
||||
* fast transition, this event should be followed by an
|
||||
* %NL80211_CMD_PORT_AUTHORIZED event.
|
||||
* Following a %NL80211_CMD_ROAM event userspace can issue
|
||||
* %NL80211_CMD_GET_SCAN in order to obtain the scan information for the
|
||||
* new BSS the card/driver roamed to.
|
||||
* @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
|
||||
* userspace that a connection was dropped by the AP or due to other
|
||||
* reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
|
||||
@@ -5937,6 +5940,16 @@ enum nl80211_feature_flags {
|
||||
* @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
|
||||
* configuration (AP/mesh) with HE rates.
|
||||
*
|
||||
* @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement
|
||||
* exchange protocol.
|
||||
*
|
||||
* @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement
|
||||
* exchange protocol.
|
||||
*
|
||||
* @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management
|
||||
* frame protection for all management frames exchanged during the
|
||||
* negotiation and range measurement procedure.
|
||||
*
|
||||
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
||||
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
||||
*/
|
||||
@@ -5998,6 +6011,9 @@ enum nl80211_ext_feature_index {
|
||||
NL80211_EXT_FEATURE_FILS_DISCOVERY,
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
|
||||
NL80211_EXT_FEATURE_BEACON_RATE_HE,
|
||||
NL80211_EXT_FEATURE_SECURE_LTF,
|
||||
NL80211_EXT_FEATURE_SECURE_RTT,
|
||||
NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
|
||||
|
||||
/* add new features before the definition below */
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
@@ -6295,11 +6311,13 @@ struct nl80211_vendor_cmd_info {
|
||||
* @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
|
||||
* @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
|
||||
* @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
|
||||
* @NL80211_TDLS_PEER_HE: TDLS peer is HE capable.
|
||||
*/
|
||||
enum nl80211_tdls_peer_capability {
|
||||
NL80211_TDLS_PEER_HT = 1<<0,
|
||||
NL80211_TDLS_PEER_VHT = 1<<1,
|
||||
NL80211_TDLS_PEER_WMM = 1<<2,
|
||||
NL80211_TDLS_PEER_HE = 1<<3,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -6891,6 +6909,9 @@ enum nl80211_peer_measurement_ftm_capa {
|
||||
* if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
|
||||
* %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
|
||||
* ranging will be used.
|
||||
* @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only
|
||||
* valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or
|
||||
* %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
|
||||
*
|
||||
* @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
|
||||
* @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
|
||||
@@ -6909,6 +6930,7 @@ enum nl80211_peer_measurement_ftm_req {
|
||||
NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
|
||||
NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
|
||||
NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
|
||||
NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
|
||||
|
||||
/* keep last */
|
||||
NUM_NL80211_PMSR_FTM_REQ_ATTR,
|
||||
|
||||
@@ -37,6 +37,21 @@ enum perf_type_id {
|
||||
PERF_TYPE_MAX, /* non-ABI */
|
||||
};
|
||||
|
||||
/*
|
||||
* attr.config layout for type PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE
|
||||
* PERF_TYPE_HARDWARE: 0xEEEEEEEE000000AA
|
||||
* AA: hardware event ID
|
||||
* EEEEEEEE: PMU type ID
|
||||
* PERF_TYPE_HW_CACHE: 0xEEEEEEEE00DDCCBB
|
||||
* BB: hardware cache ID
|
||||
* CC: hardware cache op ID
|
||||
* DD: hardware cache op result ID
|
||||
* EEEEEEEE: PMU type ID
|
||||
* If the PMU type ID is 0, the PERF_TYPE_RAW will be applied.
|
||||
*/
|
||||
#define PERF_PMU_TYPE_SHIFT 32
|
||||
#define PERF_HW_EVENT_MASK 0xffffffff
|
||||
|
||||
/*
|
||||
* Generalized performance event event_id types, used by the
|
||||
* attr.event_id parameter of the sys_perf_event_open()
|
||||
@@ -112,6 +127,7 @@ enum perf_sw_ids {
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 8,
|
||||
PERF_COUNT_SW_DUMMY = 9,
|
||||
PERF_COUNT_SW_BPF_OUTPUT = 10,
|
||||
PERF_COUNT_SW_CGROUP_SWITCHES = 11,
|
||||
|
||||
PERF_COUNT_SW_MAX, /* non-ABI */
|
||||
};
|
||||
@@ -311,6 +327,7 @@ enum perf_event_read_format {
|
||||
#define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */
|
||||
#define PERF_ATTR_SIZE_VER5 112 /* add: aux_watermark */
|
||||
#define PERF_ATTR_SIZE_VER6 120 /* add: aux_sample_size */
|
||||
#define PERF_ATTR_SIZE_VER7 128 /* add: sig_data */
|
||||
|
||||
/*
|
||||
* Hardware event_id to monitor via a performance monitoring event:
|
||||
@@ -389,7 +406,10 @@ struct perf_event_attr {
|
||||
cgroup : 1, /* include cgroup events */
|
||||
text_poke : 1, /* include text poke events */
|
||||
build_id : 1, /* use build id in mmap2 events */
|
||||
__reserved_1 : 29;
|
||||
inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */
|
||||
remove_on_exec : 1, /* event is removed from task on exec */
|
||||
sigtrap : 1, /* send synchronous SIGTRAP on event */
|
||||
__reserved_1 : 26;
|
||||
|
||||
union {
|
||||
__u32 wakeup_events; /* wakeup every n events */
|
||||
@@ -441,6 +461,12 @@ struct perf_event_attr {
|
||||
__u16 __reserved_2;
|
||||
__u32 aux_sample_size;
|
||||
__u32 __reserved_3;
|
||||
|
||||
/*
|
||||
* User provided data if sigtrap=1, passed back to user via
|
||||
* siginfo_t::si_perf, e.g. to permit user to identify the event.
|
||||
*/
|
||||
__u64 sig_data;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1156,10 +1182,15 @@ enum perf_callchain_context {
|
||||
/**
|
||||
* PERF_RECORD_AUX::flags bits
|
||||
*/
|
||||
#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */
|
||||
#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */
|
||||
#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */
|
||||
#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */
|
||||
#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */
|
||||
#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */
|
||||
#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */
|
||||
#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */
|
||||
#define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 /* PMU specific trace format type */
|
||||
|
||||
/* CoreSight PMU AUX buffer formats */
|
||||
#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */
|
||||
#define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 /* Raw format of the source */
|
||||
|
||||
#define PERF_FLAG_FD_NO_GROUP (1UL << 0)
|
||||
#define PERF_FLAG_FD_OUTPUT (1UL << 1)
|
||||
|
||||
@@ -190,6 +190,8 @@ enum {
|
||||
TCA_POLICE_PAD,
|
||||
TCA_POLICE_RATE64,
|
||||
TCA_POLICE_PEAKRATE64,
|
||||
TCA_POLICE_PKTRATE64,
|
||||
TCA_POLICE_PKTBURST64,
|
||||
__TCA_POLICE_MAX
|
||||
#define TCA_POLICE_RESULT TCA_POLICE_RESULT
|
||||
};
|
||||
|
||||
@@ -255,4 +255,8 @@ struct prctl_mm_map {
|
||||
# define SYSCALL_DISPATCH_FILTER_ALLOW 0
|
||||
# define SYSCALL_DISPATCH_FILTER_BLOCK 1
|
||||
|
||||
/* Set/get enabled arm64 pointer authentication keys */
|
||||
#define PR_PAC_SET_ENABLED_KEYS 60
|
||||
#define PR_PAC_GET_ENABLED_KEYS 61
|
||||
|
||||
#endif /* _LINUX_PRCTL_H */
|
||||
|
||||
@@ -13,6 +13,13 @@ enum {
|
||||
PSAMPLE_ATTR_GROUP_REFCOUNT,
|
||||
PSAMPLE_ATTR_TUNNEL,
|
||||
|
||||
PSAMPLE_ATTR_PAD,
|
||||
PSAMPLE_ATTR_OUT_TC, /* u16 */
|
||||
PSAMPLE_ATTR_OUT_TC_OCC, /* u64, bytes */
|
||||
PSAMPLE_ATTR_LATENCY, /* u64, nanoseconds */
|
||||
PSAMPLE_ATTR_TIMESTAMP, /* u64, nanoseconds */
|
||||
PSAMPLE_ATTR_PROTO, /* u16 */
|
||||
|
||||
__PSAMPLE_ATTR_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -102,6 +102,16 @@ struct ptrace_syscall_info {
|
||||
};
|
||||
};
|
||||
|
||||
#define PTRACE_GET_RSEQ_CONFIGURATION 0x420f
|
||||
|
||||
struct ptrace_rseq_configuration {
|
||||
__u64 rseq_abi_pointer;
|
||||
__u32 rseq_abi_size;
|
||||
__u32 signature;
|
||||
__u32 flags;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/*
|
||||
* These values are stored in task->ptrace_message
|
||||
* by tracehook_report_syscall_* to describe the current syscall-stop.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define RKISP1_CIF_ISP_MODULE_BLS (1U << 1)
|
||||
/* Sensor De-gamma */
|
||||
#define RKISP1_CIF_ISP_MODULE_SDG (1U << 2)
|
||||
/* Histogram */
|
||||
/* Histogram statistics configuration */
|
||||
#define RKISP1_CIF_ISP_MODULE_HST (1U << 3)
|
||||
/* Lens Shade Control */
|
||||
#define RKISP1_CIF_ISP_MODULE_LSC (1U << 4)
|
||||
@@ -31,13 +31,13 @@
|
||||
#define RKISP1_CIF_ISP_MODULE_GOC (1U << 9)
|
||||
/* Color Processing */
|
||||
#define RKISP1_CIF_ISP_MODULE_CPROC (1U << 10)
|
||||
/* Auto Focus Control */
|
||||
/* Auto Focus Control statistics configuration */
|
||||
#define RKISP1_CIF_ISP_MODULE_AFC (1U << 11)
|
||||
/* Auto White Balancing */
|
||||
/* Auto White Balancing statistics configuration */
|
||||
#define RKISP1_CIF_ISP_MODULE_AWB (1U << 12)
|
||||
/* Image Effect */
|
||||
#define RKISP1_CIF_ISP_MODULE_IE (1U << 13)
|
||||
/* Auto Exposure Control */
|
||||
/* Auto Exposure Control statistics configuration */
|
||||
#define RKISP1_CIF_ISP_MODULE_AEC (1U << 14)
|
||||
/* Wide Dynamic Range */
|
||||
#define RKISP1_CIF_ISP_MODULE_WDR (1U << 15)
|
||||
@@ -411,7 +411,7 @@ struct rkisp1_cif_isp_cproc_config {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rkisp1_cif_isp_awb_meas_config - Configuration used by auto white balance
|
||||
* struct rkisp1_cif_isp_awb_meas_config - Configuration for the AWB statistics
|
||||
*
|
||||
* @awb_mode: the awb meas mode. From enum rkisp1_cif_isp_awb_mode_type.
|
||||
* @awb_wnd: white balance measurement window (in pixels)
|
||||
@@ -550,7 +550,7 @@ struct rkisp1_cif_isp_goc_config {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rkisp1_cif_isp_hst_config - Configuration used by Histogram
|
||||
* struct rkisp1_cif_isp_hst_config - Configuration for Histogram statistics
|
||||
*
|
||||
* @mode: histogram mode (from enum rkisp1_cif_isp_histogram_mode)
|
||||
* @histogram_predivider: process every stepsize pixel, all other pixels are
|
||||
@@ -575,7 +575,7 @@ struct rkisp1_cif_isp_hst_config {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rkisp1_cif_isp_aec_config - Configuration used by Auto Exposure Control
|
||||
* struct rkisp1_cif_isp_aec_config - Configuration for Auto Exposure statistics
|
||||
*
|
||||
* @mode: Exposure measure mode (from enum rkisp1_cif_isp_exp_meas_mode)
|
||||
* @autostop: stop mode (from enum rkisp1_cif_isp_exp_ctrl_autostop)
|
||||
@@ -588,7 +588,7 @@ struct rkisp1_cif_isp_aec_config {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rkisp1_cif_isp_afc_config - Configuration used by Auto Focus Control
|
||||
* struct rkisp1_cif_isp_afc_config - Configuration for the Auto Focus statistics
|
||||
*
|
||||
* @num_afm_win: max RKISP1_CIF_ISP_AFM_MAX_WINDOWS
|
||||
* @afm_win: coordinates of the meas window
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define RPMSG_ADDR_ANY 0xFFFFFFFF
|
||||
|
||||
/**
|
||||
* struct rpmsg_endpoint_info - endpoint info representation
|
||||
* @name: name of service
|
||||
* @src: local address
|
||||
* @dst: destination address
|
||||
* @src: local address. To set to RPMSG_ADDR_ANY if not used.
|
||||
* @dst: destination address. To set to RPMSG_ADDR_ANY if not used.
|
||||
*/
|
||||
struct rpmsg_endpoint_info {
|
||||
char name[32];
|
||||
@@ -21,7 +23,14 @@ struct rpmsg_endpoint_info {
|
||||
__u32 dst;
|
||||
};
|
||||
|
||||
/**
|
||||
* Instantiate a new rmpsg char device endpoint.
|
||||
*/
|
||||
#define RPMSG_CREATE_EPT_IOCTL _IOW(0xb5, 0x1, struct rpmsg_endpoint_info)
|
||||
|
||||
/**
|
||||
* Destroy a rpmsg char device endpoint created by the RPMSG_CREATE_EPT_IOCTL.
|
||||
*/
|
||||
#define RPMSG_DESTROY_EPT_IOCTL _IO(0xb5, 0x2)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -178,6 +178,13 @@ enum {
|
||||
RTM_GETVLAN,
|
||||
#define RTM_GETVLAN RTM_GETVLAN
|
||||
|
||||
RTM_NEWNEXTHOPBUCKET = 116,
|
||||
#define RTM_NEWNEXTHOPBUCKET RTM_NEWNEXTHOPBUCKET
|
||||
RTM_DELNEXTHOPBUCKET,
|
||||
#define RTM_DELNEXTHOPBUCKET RTM_DELNEXTHOPBUCKET
|
||||
RTM_GETNEXTHOPBUCKET,
|
||||
#define RTM_GETNEXTHOPBUCKET RTM_GETNEXTHOPBUCKET
|
||||
|
||||
__RTM_MAX,
|
||||
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
|
||||
};
|
||||
@@ -283,6 +290,7 @@ enum {
|
||||
#define RTPROT_MROUTED 17 /* Multicast daemon */
|
||||
#define RTPROT_KEEPALIVED 18 /* Keepalived daemon */
|
||||
#define RTPROT_BABEL 42 /* Babel daemon */
|
||||
#define RTPROT_OPENR 99 /* Open Routing (Open/R) Routes */
|
||||
#define RTPROT_BGP 186 /* BGP Routes */
|
||||
#define RTPROT_ISIS 187 /* ISIS Routes */
|
||||
#define RTPROT_OSPF 188 /* OSPF Routes */
|
||||
|
||||
@@ -27,6 +27,7 @@ enum {
|
||||
SEG6_LOCAL_OIF,
|
||||
SEG6_LOCAL_BPF,
|
||||
SEG6_LOCAL_VRFTABLE,
|
||||
SEG6_LOCAL_COUNTERS,
|
||||
__SEG6_LOCAL_MAX,
|
||||
};
|
||||
#define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
|
||||
@@ -78,4 +79,33 @@ enum {
|
||||
|
||||
#define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
|
||||
|
||||
/* SRv6 Behavior counters are encoded as netlink attributes guaranteeing the
|
||||
* correct alignment.
|
||||
* Each counter is identified by a different attribute type (i.e.
|
||||
* SEG6_LOCAL_CNT_PACKETS).
|
||||
*
|
||||
* - SEG6_LOCAL_CNT_PACKETS: identifies a counter that counts the number of
|
||||
* packets that have been CORRECTLY processed by an SRv6 Behavior instance
|
||||
* (i.e., packets that generate errors or are dropped are NOT counted).
|
||||
*
|
||||
* - SEG6_LOCAL_CNT_BYTES: identifies a counter that counts the total amount
|
||||
* of traffic in bytes of all packets that have been CORRECTLY processed by
|
||||
* an SRv6 Behavior instance (i.e., packets that generate errors or are
|
||||
* dropped are NOT counted).
|
||||
*
|
||||
* - SEG6_LOCAL_CNT_ERRORS: identifies a counter that counts the number of
|
||||
* packets that have NOT been properly processed by an SRv6 Behavior instance
|
||||
* (i.e., packets that generate errors or are dropped).
|
||||
*/
|
||||
enum {
|
||||
SEG6_LOCAL_CNT_UNSPEC,
|
||||
SEG6_LOCAL_CNT_PAD, /* pad for 64 bits values */
|
||||
SEG6_LOCAL_CNT_PACKETS,
|
||||
SEG6_LOCAL_CNT_BYTES,
|
||||
SEG6_LOCAL_CNT_ERRORS,
|
||||
__SEG6_LOCAL_CNT_MAX,
|
||||
};
|
||||
|
||||
#define SEG6_LOCAL_CNT_MAX (__SEG6_LOCAL_CNT_MAX - 1)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,11 +52,11 @@ struct serial_struct {
|
||||
#define PORT_16450 2
|
||||
#define PORT_16550 3
|
||||
#define PORT_16550A 4
|
||||
#define PORT_CIRRUS 5 /* usurped by cyclades.c */
|
||||
#define PORT_CIRRUS 5
|
||||
#define PORT_16650 6
|
||||
#define PORT_16650V2 7
|
||||
#define PORT_16750 8
|
||||
#define PORT_STARTECH 9 /* usurped by cyclades.c */
|
||||
#define PORT_STARTECH 9
|
||||
#define PORT_16C950 10 /* Oxford Semiconductor */
|
||||
#define PORT_16654 11
|
||||
#define PORT_16850 12
|
||||
|
||||
@@ -39,6 +39,8 @@ struct signalfd_siginfo {
|
||||
__s32 ssi_syscall;
|
||||
__u64 ssi_call_addr;
|
||||
__u32 ssi_arch;
|
||||
__u32 __pad3;
|
||||
__u64 ssi_perf;
|
||||
|
||||
/*
|
||||
* Pad strcture to 128 bytes. Remember to update the
|
||||
@@ -49,7 +51,7 @@ struct signalfd_siginfo {
|
||||
* comes out of a read(2) and we really don't want to have
|
||||
* a compat on read(2).
|
||||
*/
|
||||
__u8 __pad[28];
|
||||
__u8 __pad[16];
|
||||
};
|
||||
|
||||
|
||||
|
||||
146
include/uapi/linux/surface_aggregator/dtx.h
Normal file
146
include/uapi/linux/surface_aggregator/dtx.h
Normal file
@@ -0,0 +1,146 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
/*
|
||||
* Surface DTX (clipboard detachment system driver) user-space interface.
|
||||
*
|
||||
* Definitions, structs, and IOCTLs for the /dev/surface/dtx misc device. This
|
||||
* device allows user-space to control the clipboard detachment process on
|
||||
* Surface Book series devices.
|
||||
*
|
||||
* Copyright (C) 2020-2021 Maximilian Luz <luzmaximilian@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_LINUX_SURFACE_AGGREGATOR_DTX_H
|
||||
#define _UAPI_LINUX_SURFACE_AGGREGATOR_DTX_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Status/error categories */
|
||||
#define SDTX_CATEGORY_STATUS 0x0000
|
||||
#define SDTX_CATEGORY_RUNTIME_ERROR 0x1000
|
||||
#define SDTX_CATEGORY_HARDWARE_ERROR 0x2000
|
||||
#define SDTX_CATEGORY_UNKNOWN 0xf000
|
||||
|
||||
#define SDTX_CATEGORY_MASK 0xf000
|
||||
#define SDTX_CATEGORY(value) ((value) & SDTX_CATEGORY_MASK)
|
||||
|
||||
#define SDTX_STATUS(code) ((code) | SDTX_CATEGORY_STATUS)
|
||||
#define SDTX_ERR_RT(code) ((code) | SDTX_CATEGORY_RUNTIME_ERROR)
|
||||
#define SDTX_ERR_HW(code) ((code) | SDTX_CATEGORY_HARDWARE_ERROR)
|
||||
#define SDTX_UNKNOWN(code) ((code) | SDTX_CATEGORY_UNKNOWN)
|
||||
|
||||
#define SDTX_SUCCESS(value) (SDTX_CATEGORY(value) == SDTX_CATEGORY_STATUS)
|
||||
|
||||
/* Latch status values */
|
||||
#define SDTX_LATCH_CLOSED SDTX_STATUS(0x00)
|
||||
#define SDTX_LATCH_OPENED SDTX_STATUS(0x01)
|
||||
|
||||
/* Base state values */
|
||||
#define SDTX_BASE_DETACHED SDTX_STATUS(0x00)
|
||||
#define SDTX_BASE_ATTACHED SDTX_STATUS(0x01)
|
||||
|
||||
/* Runtime errors (non-critical) */
|
||||
#define SDTX_DETACH_NOT_FEASIBLE SDTX_ERR_RT(0x01)
|
||||
#define SDTX_DETACH_TIMEDOUT SDTX_ERR_RT(0x02)
|
||||
|
||||
/* Hardware errors (critical) */
|
||||
#define SDTX_ERR_FAILED_TO_OPEN SDTX_ERR_HW(0x01)
|
||||
#define SDTX_ERR_FAILED_TO_REMAIN_OPEN SDTX_ERR_HW(0x02)
|
||||
#define SDTX_ERR_FAILED_TO_CLOSE SDTX_ERR_HW(0x03)
|
||||
|
||||
/* Base types */
|
||||
#define SDTX_DEVICE_TYPE_HID 0x0100
|
||||
#define SDTX_DEVICE_TYPE_SSH 0x0200
|
||||
|
||||
#define SDTX_DEVICE_TYPE_MASK 0x0f00
|
||||
#define SDTX_DEVICE_TYPE(value) ((value) & SDTX_DEVICE_TYPE_MASK)
|
||||
|
||||
#define SDTX_BASE_TYPE_HID(id) ((id) | SDTX_DEVICE_TYPE_HID)
|
||||
#define SDTX_BASE_TYPE_SSH(id) ((id) | SDTX_DEVICE_TYPE_SSH)
|
||||
|
||||
/**
|
||||
* enum sdtx_device_mode - Mode describing how (and if) the clipboard is
|
||||
* attached to the base of the device.
|
||||
* @SDTX_DEVICE_MODE_TABLET: The clipboard is detached from the base and the
|
||||
* device operates as tablet.
|
||||
* @SDTX_DEVICE_MODE_LAPTOP: The clipboard is attached normally to the base
|
||||
* and the device operates as laptop.
|
||||
* @SDTX_DEVICE_MODE_STUDIO: The clipboard is attached to the base in reverse.
|
||||
* The device operates as tablet with keyboard and
|
||||
* touchpad deactivated, however, the base battery
|
||||
* and, if present in the specific device model, dGPU
|
||||
* are available to the system.
|
||||
*/
|
||||
enum sdtx_device_mode {
|
||||
SDTX_DEVICE_MODE_TABLET = 0x00,
|
||||
SDTX_DEVICE_MODE_LAPTOP = 0x01,
|
||||
SDTX_DEVICE_MODE_STUDIO = 0x02,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sdtx_event - Event provided by reading from the DTX device file.
|
||||
* @length: Length of the event payload, in bytes.
|
||||
* @code: Event code, detailing what type of event this is.
|
||||
* @data: Payload of the event, containing @length bytes.
|
||||
*
|
||||
* See &enum sdtx_event_code for currently valid event codes.
|
||||
*/
|
||||
struct sdtx_event {
|
||||
__u16 length;
|
||||
__u16 code;
|
||||
__u8 data[];
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/**
|
||||
* enum sdtx_event_code - Code describing the type of an event.
|
||||
* @SDTX_EVENT_REQUEST: Detachment request event type.
|
||||
* @SDTX_EVENT_CANCEL: Cancel detachment process event type.
|
||||
* @SDTX_EVENT_BASE_CONNECTION: Base/clipboard connection change event type.
|
||||
* @SDTX_EVENT_LATCH_STATUS: Latch status change event type.
|
||||
* @SDTX_EVENT_DEVICE_MODE: Device mode change event type.
|
||||
*
|
||||
* Used in &struct sdtx_event to describe the type of the event. Further event
|
||||
* codes are reserved for future use. Any event parser should be able to
|
||||
* gracefully handle unknown events, i.e. by simply skipping them.
|
||||
*
|
||||
* Consult the DTX user-space interface documentation for details regarding
|
||||
* the individual event types.
|
||||
*/
|
||||
enum sdtx_event_code {
|
||||
SDTX_EVENT_REQUEST = 1,
|
||||
SDTX_EVENT_CANCEL = 2,
|
||||
SDTX_EVENT_BASE_CONNECTION = 3,
|
||||
SDTX_EVENT_LATCH_STATUS = 4,
|
||||
SDTX_EVENT_DEVICE_MODE = 5,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sdtx_base_info - Describes if and what type of base is connected.
|
||||
* @state: The state of the connection. Valid values are %SDTX_BASE_DETACHED,
|
||||
* %SDTX_BASE_ATTACHED, and %SDTX_DETACH_NOT_FEASIBLE (in case a base
|
||||
* is attached but low clipboard battery prevents detachment). Other
|
||||
* values are currently reserved.
|
||||
* @base_id: The type of base connected. Zero if no base is connected.
|
||||
*/
|
||||
struct sdtx_base_info {
|
||||
__u16 state;
|
||||
__u16 base_id;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* IOCTLs */
|
||||
#define SDTX_IOCTL_EVENTS_ENABLE _IO(0xa5, 0x21)
|
||||
#define SDTX_IOCTL_EVENTS_DISABLE _IO(0xa5, 0x22)
|
||||
|
||||
#define SDTX_IOCTL_LATCH_LOCK _IO(0xa5, 0x23)
|
||||
#define SDTX_IOCTL_LATCH_UNLOCK _IO(0xa5, 0x24)
|
||||
|
||||
#define SDTX_IOCTL_LATCH_REQUEST _IO(0xa5, 0x25)
|
||||
#define SDTX_IOCTL_LATCH_CONFIRM _IO(0xa5, 0x26)
|
||||
#define SDTX_IOCTL_LATCH_HEARTBEAT _IO(0xa5, 0x27)
|
||||
#define SDTX_IOCTL_LATCH_CANCEL _IO(0xa5, 0x28)
|
||||
|
||||
#define SDTX_IOCTL_GET_BASE_INFO _IOR(0xa5, 0x29, struct sdtx_base_info)
|
||||
#define SDTX_IOCTL_GET_DEVICE_MODE _IOR(0xa5, 0x2a, __u16)
|
||||
#define SDTX_IOCTL_GET_LATCH_STATUS _IOR(0xa5, 0x2b, __u16)
|
||||
|
||||
#endif /* _UAPI_LINUX_SURFACE_AGGREGATOR_DTX_H */
|
||||
@@ -60,7 +60,7 @@ enum thermal_genl_event {
|
||||
THERMAL_GENL_EVENT_UNSPEC,
|
||||
THERMAL_GENL_EVENT_TZ_CREATE, /* Thermal zone creation */
|
||||
THERMAL_GENL_EVENT_TZ_DELETE, /* Thermal zone deletion */
|
||||
THERMAL_GENL_EVENT_TZ_DISABLE, /* Thermal zone disabed */
|
||||
THERMAL_GENL_EVENT_TZ_DISABLE, /* Thermal zone disabled */
|
||||
THERMAL_GENL_EVENT_TZ_ENABLE, /* Thermal zone enabled */
|
||||
THERMAL_GENL_EVENT_TZ_TRIP_UP, /* Trip point crossed the way up */
|
||||
THERMAL_GENL_EVENT_TZ_TRIP_DOWN, /* Trip point crossed the way down */
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
* WARNING: These flags are no longer used and have been superceded by the
|
||||
* TTY_PORT_ flags in the iflags field (and not userspace-visible)
|
||||
*/
|
||||
#ifndef _KERNEL_
|
||||
#ifndef __KERNEL__
|
||||
#define ASYNCB_INITIALIZED 31 /* Serial port was initialized */
|
||||
#define ASYNCB_SUSPENDED 30 /* Serial port is suspended */
|
||||
#define ASYNCB_NORMAL_ACTIVE 29 /* Normal device is active */
|
||||
@@ -73,15 +73,15 @@
|
||||
#define ASYNC_MAGIC_MULTIPLIER (1U << ASYNCB_MAGIC_MULTIPLIER)
|
||||
|
||||
#define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1)
|
||||
#define ASYNC_DEPRECATED (ASYNC_SESSION_LOCKOUT | ASYNC_PGRP_LOCKOUT | \
|
||||
ASYNC_CALLOUT_NOHUP | ASYNC_AUTOPROBE)
|
||||
#define ASYNC_DEPRECATED (ASYNC_SPLIT_TERMIOS | ASYNC_SESSION_LOCKOUT | \
|
||||
ASYNC_PGRP_LOCKOUT | ASYNC_CALLOUT_NOHUP | ASYNC_AUTOPROBE)
|
||||
#define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \
|
||||
ASYNC_LOW_LATENCY)
|
||||
#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI)
|
||||
#define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI)
|
||||
#define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
|
||||
|
||||
#ifndef _KERNEL_
|
||||
#ifndef __KERNEL__
|
||||
/* These flags are no longer used (and were always masked from userspace) */
|
||||
#define ASYNC_INITIALIZED (1U << ASYNCB_INITIALIZED)
|
||||
#define ASYNC_NORMAL_ACTIVE (1U << ASYNCB_NORMAL_ACTIVE)
|
||||
|
||||
@@ -302,9 +302,10 @@ struct uvc_processing_unit_descriptor {
|
||||
__u8 bControlSize;
|
||||
__u8 bmControls[2];
|
||||
__u8 iProcessing;
|
||||
__u8 bmVideoStandards;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
#define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n))
|
||||
#define UVC_DT_PROCESSING_UNIT_SIZE(n) (10+(n))
|
||||
|
||||
/* 3.7.2.6. Extension Unit Descriptor */
|
||||
struct uvc_extension_unit_descriptor {
|
||||
|
||||
@@ -19,15 +19,19 @@
|
||||
* means the userland is reading).
|
||||
*/
|
||||
#define UFFD_API ((__u64)0xAA)
|
||||
#define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | \
|
||||
UFFDIO_REGISTER_MODE_WP | \
|
||||
UFFDIO_REGISTER_MODE_MINOR)
|
||||
#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \
|
||||
UFFD_FEATURE_EVENT_FORK | \
|
||||
UFFD_FEATURE_EVENT_REMAP | \
|
||||
UFFD_FEATURE_EVENT_REMOVE | \
|
||||
UFFD_FEATURE_EVENT_REMOVE | \
|
||||
UFFD_FEATURE_EVENT_UNMAP | \
|
||||
UFFD_FEATURE_MISSING_HUGETLBFS | \
|
||||
UFFD_FEATURE_MISSING_SHMEM | \
|
||||
UFFD_FEATURE_SIGBUS | \
|
||||
UFFD_FEATURE_THREAD_ID)
|
||||
UFFD_FEATURE_THREAD_ID | \
|
||||
UFFD_FEATURE_MINOR_HUGETLBFS)
|
||||
#define UFFD_API_IOCTLS \
|
||||
((__u64)1 << _UFFDIO_REGISTER | \
|
||||
(__u64)1 << _UFFDIO_UNREGISTER | \
|
||||
@@ -36,10 +40,12 @@
|
||||
((__u64)1 << _UFFDIO_WAKE | \
|
||||
(__u64)1 << _UFFDIO_COPY | \
|
||||
(__u64)1 << _UFFDIO_ZEROPAGE | \
|
||||
(__u64)1 << _UFFDIO_WRITEPROTECT)
|
||||
(__u64)1 << _UFFDIO_WRITEPROTECT | \
|
||||
(__u64)1 << _UFFDIO_CONTINUE)
|
||||
#define UFFD_API_RANGE_IOCTLS_BASIC \
|
||||
((__u64)1 << _UFFDIO_WAKE | \
|
||||
(__u64)1 << _UFFDIO_COPY)
|
||||
(__u64)1 << _UFFDIO_COPY | \
|
||||
(__u64)1 << _UFFDIO_CONTINUE)
|
||||
|
||||
/*
|
||||
* Valid ioctl command number range with this API is from 0x00 to
|
||||
@@ -55,6 +61,7 @@
|
||||
#define _UFFDIO_COPY (0x03)
|
||||
#define _UFFDIO_ZEROPAGE (0x04)
|
||||
#define _UFFDIO_WRITEPROTECT (0x06)
|
||||
#define _UFFDIO_CONTINUE (0x07)
|
||||
#define _UFFDIO_API (0x3F)
|
||||
|
||||
/* userfaultfd ioctl ids */
|
||||
@@ -73,6 +80,8 @@
|
||||
struct uffdio_zeropage)
|
||||
#define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \
|
||||
struct uffdio_writeprotect)
|
||||
#define UFFDIO_CONTINUE _IOR(UFFDIO, _UFFDIO_CONTINUE, \
|
||||
struct uffdio_continue)
|
||||
|
||||
/* read() structure */
|
||||
struct uffd_msg {
|
||||
@@ -127,6 +136,7 @@ struct uffd_msg {
|
||||
/* flags for UFFD_EVENT_PAGEFAULT */
|
||||
#define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */
|
||||
#define UFFD_PAGEFAULT_FLAG_WP (1<<1) /* If reason is VM_UFFD_WP */
|
||||
#define UFFD_PAGEFAULT_FLAG_MINOR (1<<2) /* If reason is VM_UFFD_MINOR */
|
||||
|
||||
struct uffdio_api {
|
||||
/* userland asks for an API number and the features to enable */
|
||||
@@ -171,6 +181,10 @@ struct uffdio_api {
|
||||
*
|
||||
* UFFD_FEATURE_THREAD_ID pid of the page faulted task_struct will
|
||||
* be returned, if feature is not requested 0 will be returned.
|
||||
*
|
||||
* UFFD_FEATURE_MINOR_HUGETLBFS indicates that minor faults
|
||||
* can be intercepted (via REGISTER_MODE_MINOR) for
|
||||
* hugetlbfs-backed pages.
|
||||
*/
|
||||
#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)
|
||||
#define UFFD_FEATURE_EVENT_FORK (1<<1)
|
||||
@@ -181,6 +195,7 @@ struct uffdio_api {
|
||||
#define UFFD_FEATURE_EVENT_UNMAP (1<<6)
|
||||
#define UFFD_FEATURE_SIGBUS (1<<7)
|
||||
#define UFFD_FEATURE_THREAD_ID (1<<8)
|
||||
#define UFFD_FEATURE_MINOR_HUGETLBFS (1<<9)
|
||||
__u64 features;
|
||||
|
||||
__u64 ioctls;
|
||||
@@ -195,6 +210,7 @@ struct uffdio_register {
|
||||
struct uffdio_range range;
|
||||
#define UFFDIO_REGISTER_MODE_MISSING ((__u64)1<<0)
|
||||
#define UFFDIO_REGISTER_MODE_WP ((__u64)1<<1)
|
||||
#define UFFDIO_REGISTER_MODE_MINOR ((__u64)1<<2)
|
||||
__u64 mode;
|
||||
|
||||
/*
|
||||
@@ -257,6 +273,18 @@ struct uffdio_writeprotect {
|
||||
__u64 mode;
|
||||
};
|
||||
|
||||
struct uffdio_continue {
|
||||
struct uffdio_range range;
|
||||
#define UFFDIO_CONTINUE_MODE_DONTWAKE ((__u64)1<<0)
|
||||
__u64 mode;
|
||||
|
||||
/*
|
||||
* Fields below here are written by the ioctl and must be at the end:
|
||||
* the copy_from_user will not read past here.
|
||||
*/
|
||||
__s64 mapped;
|
||||
};
|
||||
|
||||
/*
|
||||
* Flags for the userfaultfd(2) system call itself.
|
||||
*/
|
||||
|
||||
@@ -76,11 +76,11 @@ struct uvc_xu_control_query {
|
||||
|
||||
/**
|
||||
* struct uvc_meta_buf - metadata buffer building block
|
||||
* @ns - system timestamp of the payload in nanoseconds
|
||||
* @sof - USB Frame Number
|
||||
* @length - length of the payload header
|
||||
* @flags - payload header flags
|
||||
* @buf - optional device-specific header data
|
||||
* @ns: system timestamp of the payload in nanoseconds
|
||||
* @sof: USB Frame Number
|
||||
* @length: length of the payload header
|
||||
* @flags: payload header flags
|
||||
* @buf: optional device-specific header data
|
||||
*
|
||||
* UVC metadata nodes fill buffers with possibly multiple instances of this
|
||||
* struct. The first two fields are added by the driver, they can be used for
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */
|
||||
#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */
|
||||
#define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */
|
||||
#define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 /* Colorimetry controls */
|
||||
|
||||
/* User-class control IDs */
|
||||
|
||||
@@ -428,6 +429,11 @@ enum v4l2_mpeg_video_multi_slice_mode {
|
||||
#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_CODEC_BASE+228)
|
||||
#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_CODEC_BASE+229)
|
||||
#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE+230)
|
||||
#define V4L2_CID_MPEG_VIDEO_AU_DELIMITER (V4L2_CID_CODEC_BASE+231)
|
||||
#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE+232)
|
||||
#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE+233)
|
||||
#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE+234)
|
||||
#define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE+235)
|
||||
|
||||
/* CIDs for the MPEG-2 Part 2 (H.262) codec */
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270)
|
||||
@@ -797,6 +803,9 @@ enum v4l2_mpeg_video_frame_skip_mode {
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 651)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 652)
|
||||
|
||||
#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (V4L2_CID_CODEC_BASE + 653)
|
||||
#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_BASE + 654)
|
||||
|
||||
/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
|
||||
#define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE+0)
|
||||
@@ -1329,7 +1338,7 @@ struct v4l2_ctrl_h264_sps {
|
||||
* struct v4l2_ctrl_h264_pps - H264 picture parameter set
|
||||
*
|
||||
* Except where noted, all the members on this picture parameter set
|
||||
* structure match the sequence parameter set syntax as specified
|
||||
* structure match the picture parameter set syntax as specified
|
||||
* by the H264 specification.
|
||||
*
|
||||
* In particular, V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag
|
||||
@@ -1657,6 +1666,236 @@ struct v4l2_ctrl_fwht_params {
|
||||
__u32 quantization;
|
||||
};
|
||||
|
||||
/* Stateless VP8 control */
|
||||
|
||||
#define V4L2_VP8_SEGMENT_FLAG_ENABLED 0x01
|
||||
#define V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP 0x02
|
||||
#define V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA 0x04
|
||||
#define V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE 0x08
|
||||
|
||||
/**
|
||||
* struct v4l2_vp8_segment - VP8 segment-based adjustments parameters
|
||||
*
|
||||
* @quant_update: update values for the segment quantizer.
|
||||
* @lf_update: update values for the loop filter level.
|
||||
* @segment_probs: branch probabilities of the segment_id decoding tree.
|
||||
* @padding: padding field. Should be zeroed by applications.
|
||||
* @flags: see V4L2_VP8_SEGMENT_FLAG_{}.
|
||||
*
|
||||
* This structure contains segment-based adjustments related parameters.
|
||||
* See the 'update_segmentation()' part of the frame header syntax,
|
||||
* and section '9.3. Segment-Based Adjustments' of the VP8 specification
|
||||
* for more details.
|
||||
*/
|
||||
struct v4l2_vp8_segment {
|
||||
__s8 quant_update[4];
|
||||
__s8 lf_update[4];
|
||||
__u8 segment_probs[3];
|
||||
__u8 padding;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
#define V4L2_VP8_LF_ADJ_ENABLE 0x01
|
||||
#define V4L2_VP8_LF_DELTA_UPDATE 0x02
|
||||
#define V4L2_VP8_LF_FILTER_TYPE_SIMPLE 0x04
|
||||
|
||||
/**
|
||||
* struct v4l2_vp8_loop_filter - VP8 loop filter parameters
|
||||
*
|
||||
* @ref_frm_delta: Reference frame signed delta values.
|
||||
* @mb_mode_delta: MB prediction mode signed delta values.
|
||||
* @sharpness_level: matches sharpness_level syntax element.
|
||||
* @level: matches loop_filter_level syntax element.
|
||||
* @padding: padding field. Should be zeroed by applications.
|
||||
* @flags: see V4L2_VP8_LF_FLAG_{}.
|
||||
*
|
||||
* This structure contains loop filter related parameters.
|
||||
* See the 'mb_lf_adjustments()' part of the frame header syntax,
|
||||
* and section '9.4. Loop Filter Type and Levels' of the VP8 specification
|
||||
* for more details.
|
||||
*/
|
||||
struct v4l2_vp8_loop_filter {
|
||||
__s8 ref_frm_delta[4];
|
||||
__s8 mb_mode_delta[4];
|
||||
__u8 sharpness_level;
|
||||
__u8 level;
|
||||
__u16 padding;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_vp8_quantization - VP8 quantizattion indices
|
||||
*
|
||||
* @y_ac_qi: luma AC coefficient table index.
|
||||
* @y_dc_delta: luma DC delta vaue.
|
||||
* @y2_dc_delta: y2 block DC delta value.
|
||||
* @y2_ac_delta: y2 block AC delta value.
|
||||
* @uv_dc_delta: chroma DC delta value.
|
||||
* @uv_ac_delta: chroma AC delta value.
|
||||
* @padding: padding field. Should be zeroed by applications.
|
||||
*
|
||||
* This structure contains the quantization indices present
|
||||
* in 'quant_indices()' part of the frame header syntax.
|
||||
* See section '9.6. Dequantization Indices' of the VP8 specification
|
||||
* for more details.
|
||||
*/
|
||||
struct v4l2_vp8_quantization {
|
||||
__u8 y_ac_qi;
|
||||
__s8 y_dc_delta;
|
||||
__s8 y2_dc_delta;
|
||||
__s8 y2_ac_delta;
|
||||
__s8 uv_dc_delta;
|
||||
__s8 uv_ac_delta;
|
||||
__u16 padding;
|
||||
};
|
||||
|
||||
#define V4L2_VP8_COEFF_PROB_CNT 11
|
||||
#define V4L2_VP8_MV_PROB_CNT 19
|
||||
|
||||
/**
|
||||
* struct v4l2_vp8_entropy - VP8 update probabilities
|
||||
*
|
||||
* @coeff_probs: coefficient probability update values.
|
||||
* @y_mode_probs: luma intra-prediction probabilities.
|
||||
* @uv_mode_probs: chroma intra-prediction probabilities.
|
||||
* @mv_probs: mv decoding probability.
|
||||
* @padding: padding field. Should be zeroed by applications.
|
||||
*
|
||||
* This structure contains the update probabilities present in
|
||||
* 'token_prob_update()' and 'mv_prob_update()' part of the frame header.
|
||||
* See section '17.2. Probability Updates' of the VP8 specification
|
||||
* for more details.
|
||||
*/
|
||||
struct v4l2_vp8_entropy {
|
||||
__u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT];
|
||||
__u8 y_mode_probs[4];
|
||||
__u8 uv_mode_probs[3];
|
||||
__u8 mv_probs[2][V4L2_VP8_MV_PROB_CNT];
|
||||
__u8 padding[3];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_vp8_entropy_coder_state - VP8 boolean coder state
|
||||
*
|
||||
* @range: coder state value for "Range"
|
||||
* @value: coder state value for "Value"
|
||||
* @bit_count: number of bits left in range "Value".
|
||||
* @padding: padding field. Should be zeroed by applications.
|
||||
*
|
||||
* This structure contains the state for the boolean coder, as
|
||||
* explained in section '7. Boolean Entropy Decoder' of the VP8 specification.
|
||||
*/
|
||||
struct v4l2_vp8_entropy_coder_state {
|
||||
__u8 range;
|
||||
__u8 value;
|
||||
__u8 bit_count;
|
||||
__u8 padding;
|
||||
};
|
||||
|
||||
#define V4L2_VP8_FRAME_FLAG_KEY_FRAME 0x01
|
||||
#define V4L2_VP8_FRAME_FLAG_EXPERIMENTAL 0x02
|
||||
#define V4L2_VP8_FRAME_FLAG_SHOW_FRAME 0x04
|
||||
#define V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF 0x08
|
||||
#define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN 0x10
|
||||
#define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT 0x20
|
||||
|
||||
#define V4L2_VP8_FRAME_IS_KEY_FRAME(hdr) \
|
||||
(!!((hdr)->flags & V4L2_VP8_FRAME_FLAG_KEY_FRAME))
|
||||
|
||||
#define V4L2_CID_STATELESS_VP8_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 200)
|
||||
/**
|
||||
* struct v4l2_ctrl_vp8_frame - VP8 frame parameters
|
||||
*
|
||||
* @segment: segmentation parameters. See &v4l2_vp8_segment for more details
|
||||
* @lf: loop filter parameters. See &v4l2_vp8_loop_filter for more details
|
||||
* @quant: quantization parameters. See &v4l2_vp8_quantization for more details
|
||||
* @entropy: update probabilities. See &v4l2_vp8_entropy for more details
|
||||
* @coder_state: boolean coder state. See &v4l2_vp8_entropy_coder_state for more details
|
||||
* @width: frame width.
|
||||
* @height: frame height.
|
||||
* @horizontal_scale: horizontal scaling factor.
|
||||
* @vertical_scale: vertical scaling factor.
|
||||
* @version: bitstream version.
|
||||
* @prob_skip_false: frame header syntax element.
|
||||
* @prob_intra: frame header syntax element.
|
||||
* @prob_last: frame header syntax element.
|
||||
* @prob_gf: frame header syntax element.
|
||||
* @num_dct_parts: number of DCT coefficients partitions.
|
||||
* @first_part_size: size of the first partition, i.e. the control partition.
|
||||
* @first_part_header_bits: size in bits of the first partition header portion.
|
||||
* @dct_part_sizes: DCT coefficients sizes.
|
||||
* @last_frame_ts: "last" reference buffer timestamp.
|
||||
* The timestamp refers to the timestamp field in struct v4l2_buffer.
|
||||
* Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.
|
||||
* @golden_frame_ts: "golden" reference buffer timestamp.
|
||||
* @alt_frame_ts: "alt" reference buffer timestamp.
|
||||
* @flags: see V4L2_VP8_FRAME_FLAG_{}.
|
||||
*/
|
||||
struct v4l2_ctrl_vp8_frame {
|
||||
struct v4l2_vp8_segment segment;
|
||||
struct v4l2_vp8_loop_filter lf;
|
||||
struct v4l2_vp8_quantization quant;
|
||||
struct v4l2_vp8_entropy entropy;
|
||||
struct v4l2_vp8_entropy_coder_state coder_state;
|
||||
|
||||
__u16 width;
|
||||
__u16 height;
|
||||
|
||||
__u8 horizontal_scale;
|
||||
__u8 vertical_scale;
|
||||
|
||||
__u8 version;
|
||||
__u8 prob_skip_false;
|
||||
__u8 prob_intra;
|
||||
__u8 prob_last;
|
||||
__u8 prob_gf;
|
||||
__u8 num_dct_parts;
|
||||
|
||||
__u32 first_part_size;
|
||||
__u32 first_part_header_bits;
|
||||
__u32 dct_part_sizes[8];
|
||||
|
||||
__u64 last_frame_ts;
|
||||
__u64 golden_frame_ts;
|
||||
__u64 alt_frame_ts;
|
||||
|
||||
__u64 flags;
|
||||
};
|
||||
|
||||
#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
|
||||
#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
|
||||
|
||||
#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
|
||||
|
||||
struct v4l2_ctrl_hdr10_cll_info {
|
||||
__u16 max_content_light_level;
|
||||
__u16 max_pic_average_light_level;
|
||||
};
|
||||
|
||||
#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
|
||||
|
||||
#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5
|
||||
#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000
|
||||
#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5
|
||||
#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000
|
||||
#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
|
||||
#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000
|
||||
#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
|
||||
#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000
|
||||
#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000
|
||||
#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000
|
||||
#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1
|
||||
#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000
|
||||
|
||||
struct v4l2_ctrl_hdr10_mastering_display {
|
||||
__u16 display_primaries_x[3];
|
||||
__u16 display_primaries_y[3];
|
||||
__u16 white_point_x;
|
||||
__u16 white_point_y;
|
||||
__u32 max_display_mastering_luminance;
|
||||
__u32 min_display_mastering_luminance;
|
||||
};
|
||||
|
||||
/* MPEG-compression definitions kept for backwards compatibility */
|
||||
#ifndef __KERNEL__
|
||||
#define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC
|
||||
|
||||
@@ -44,6 +44,7 @@ enum v4l2_subdev_format_whence {
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @format: media bus format (format code and frame size)
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_subdev_format {
|
||||
__u32 which;
|
||||
@@ -57,6 +58,7 @@ struct v4l2_subdev_format {
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @rect: pad crop rectangle boundaries
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_subdev_crop {
|
||||
__u32 which;
|
||||
@@ -78,6 +80,7 @@ struct v4l2_subdev_crop {
|
||||
* @code: format code (MEDIA_BUS_FMT_ definitions)
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @flags: flags set by the driver, (V4L2_SUBDEV_MBUS_CODE_*)
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_subdev_mbus_code_enum {
|
||||
__u32 pad;
|
||||
@@ -90,10 +93,15 @@ struct v4l2_subdev_mbus_code_enum {
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_frame_size_enum - Media bus format enumeration
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @index: format index during enumeration
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @code: format code (MEDIA_BUS_FMT_ definitions)
|
||||
* @min_width: minimum frame width, in pixels
|
||||
* @max_width: maximum frame width, in pixels
|
||||
* @min_height: minimum frame height, in pixels
|
||||
* @max_height: maximum frame height, in pixels
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_subdev_frame_size_enum {
|
||||
__u32 index;
|
||||
@@ -111,6 +119,7 @@ struct v4l2_subdev_frame_size_enum {
|
||||
* struct v4l2_subdev_frame_interval - Pad-level frame rate
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @interval: frame interval in seconds
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_subdev_frame_interval {
|
||||
__u32 pad;
|
||||
@@ -127,6 +136,7 @@ struct v4l2_subdev_frame_interval {
|
||||
* @height: frame height in pixels
|
||||
* @interval: frame interval in seconds
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_subdev_frame_interval_enum {
|
||||
__u32 index;
|
||||
|
||||
@@ -335,6 +335,8 @@ struct vfio_region_info_cap_type {
|
||||
/* 10de vendor PCI sub-types */
|
||||
/*
|
||||
* NVIDIA GPU NVlink2 RAM is coherent RAM mapped onto the host address space.
|
||||
*
|
||||
* Deprecated, region no longer provided
|
||||
*/
|
||||
#define VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM (1)
|
||||
|
||||
@@ -342,6 +344,8 @@ struct vfio_region_info_cap_type {
|
||||
/*
|
||||
* IBM NPU NVlink2 ATSD (Address Translation Shootdown) register of NPU
|
||||
* to do TLB invalidation on a GPU.
|
||||
*
|
||||
* Deprecated, region no longer provided
|
||||
*/
|
||||
#define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1)
|
||||
|
||||
@@ -641,6 +645,8 @@ struct vfio_device_migration_info {
|
||||
* Capability with compressed real address (aka SSA - small system address)
|
||||
* where GPU RAM is mapped on a system bus. Used by a GPU for DMA routing
|
||||
* and by the userspace to associate a NVLink bridge with a GPU.
|
||||
*
|
||||
* Deprecated, capability no longer provided
|
||||
*/
|
||||
#define VFIO_REGION_INFO_CAP_NVLINK2_SSATGT 4
|
||||
|
||||
@@ -655,6 +661,8 @@ struct vfio_region_info_cap_nvlink2_ssatgt {
|
||||
* property in the device tree. The value is fixed in the hardware
|
||||
* and failing to provide the correct value results in the link
|
||||
* not working with no indication from the driver why.
|
||||
*
|
||||
* Deprecated, capability no longer provided
|
||||
*/
|
||||
#define VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD 5
|
||||
|
||||
|
||||
@@ -586,6 +586,7 @@ struct v4l2_pix_format {
|
||||
#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */
|
||||
#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
|
||||
#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
|
||||
#define V4L2_PIX_FMT_YUV24 v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */
|
||||
#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
|
||||
#define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */
|
||||
#define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */
|
||||
@@ -694,6 +695,7 @@ struct v4l2_pix_format {
|
||||
#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
|
||||
#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
|
||||
#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
|
||||
#define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */
|
||||
#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */
|
||||
#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */
|
||||
#define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */
|
||||
@@ -975,8 +977,10 @@ struct v4l2_requestbuffers {
|
||||
* pointing to this plane
|
||||
* @fd: when memory is V4L2_MEMORY_DMABUF, a userspace file
|
||||
* descriptor associated with this plane
|
||||
* @m: union of @mem_offset, @userptr and @fd
|
||||
* @data_offset: offset in the plane to the start of data; usually 0,
|
||||
* unless there is a header in front of the data
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*
|
||||
* Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer
|
||||
* with two planes can have one plane for Y, and another for interleaved CbCr
|
||||
@@ -1018,10 +1022,14 @@ struct v4l2_plane {
|
||||
* a userspace file descriptor associated with this buffer
|
||||
* @planes: for multiplanar buffers; userspace pointer to the array of plane
|
||||
* info structs for this buffer
|
||||
* @m: union of @offset, @userptr, @planes and @fd
|
||||
* @length: size in bytes of the buffer (NOT its payload) for single-plane
|
||||
* buffers (when type != *_MPLANE); number of elements in the
|
||||
* planes array for multi-plane buffers
|
||||
* @reserved2: drivers and applications must zero this field
|
||||
* @request_fd: fd of the request that this buffer should use
|
||||
* @reserved: for backwards compatibility with applications that do not know
|
||||
* about @request_fd
|
||||
*
|
||||
* Contains data exchanged by application and driver using one of the Streaming
|
||||
* I/O methods.
|
||||
@@ -1059,7 +1067,7 @@ struct v4l2_buffer {
|
||||
#ifndef __KERNEL__
|
||||
/**
|
||||
* v4l2_timeval_to_ns - Convert timeval to nanoseconds
|
||||
* @ts: pointer to the timeval variable to be converted
|
||||
* @tv: pointer to the timeval variable to be converted
|
||||
*
|
||||
* Returns the scalar nanosecond representation of the timeval
|
||||
* parameter.
|
||||
@@ -1120,6 +1128,7 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv)
|
||||
* @flags: flags for newly created file, currently only O_CLOEXEC is
|
||||
* supported, refer to manual of open syscall for more details
|
||||
* @fd: file descriptor associated with DMABUF (set by driver)
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*
|
||||
* Contains data used for exporting a video buffer as DMABUF file descriptor.
|
||||
* The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF
|
||||
@@ -1737,6 +1746,7 @@ struct v4l2_ext_control {
|
||||
struct v4l2_ctrl_h264_slice_params __user *p_h264_slice_params;
|
||||
struct v4l2_ctrl_h264_decode_params __user *p_h264_decode_params;
|
||||
struct v4l2_ctrl_fwht_params __user *p_fwht_params;
|
||||
struct v4l2_ctrl_vp8_frame __user *p_vp8_frame;
|
||||
void __user *ptr;
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
@@ -1784,6 +1794,9 @@ enum v4l2_ctrl_type {
|
||||
V4L2_CTRL_TYPE_U32 = 0x0102,
|
||||
V4L2_CTRL_TYPE_AREA = 0x0106,
|
||||
|
||||
V4L2_CTRL_TYPE_HDR10_CLL_INFO = 0x0110,
|
||||
V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY = 0x0111,
|
||||
|
||||
V4L2_CTRL_TYPE_H264_SPS = 0x0200,
|
||||
V4L2_CTRL_TYPE_H264_PPS = 0x0201,
|
||||
V4L2_CTRL_TYPE_H264_SCALING_MATRIX = 0x0202,
|
||||
@@ -1792,6 +1805,8 @@ enum v4l2_ctrl_type {
|
||||
V4L2_CTRL_TYPE_H264_PRED_WEIGHTS = 0x0205,
|
||||
|
||||
V4L2_CTRL_TYPE_FWHT_PARAMS = 0x0220,
|
||||
|
||||
V4L2_CTRL_TYPE_VP8_FRAME = 0x0240,
|
||||
};
|
||||
|
||||
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
|
||||
@@ -2229,6 +2244,7 @@ struct v4l2_mpeg_vbi_fmt_ivtv {
|
||||
* this plane will be used
|
||||
* @bytesperline: distance in bytes between the leftmost pixels in two
|
||||
* adjacent lines
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_plane_pix_format {
|
||||
__u32 sizeimage;
|
||||
@@ -2247,8 +2263,10 @@ struct v4l2_plane_pix_format {
|
||||
* @num_planes: number of planes for this format
|
||||
* @flags: format flags (V4L2_PIX_FMT_FLAG_*)
|
||||
* @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding
|
||||
* @hsv_enc: enum v4l2_hsv_encoding, HSV encoding
|
||||
* @quantization: enum v4l2_quantization, colorspace quantization
|
||||
* @xfer_func: enum v4l2_xfer_func, colorspace transfer function
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_pix_format_mplane {
|
||||
__u32 width;
|
||||
@@ -2273,6 +2291,7 @@ struct v4l2_pix_format_mplane {
|
||||
* struct v4l2_sdr_format - SDR format definition
|
||||
* @pixelformat: little endian four character code (fourcc)
|
||||
* @buffersize: maximum size in bytes required for data
|
||||
* @reserved: drivers and applications must zero this array
|
||||
*/
|
||||
struct v4l2_sdr_format {
|
||||
__u32 pixelformat;
|
||||
@@ -2299,6 +2318,8 @@ struct v4l2_meta_format {
|
||||
* @vbi: raw VBI capture or output parameters
|
||||
* @sliced: sliced VBI capture or output parameters
|
||||
* @raw_data: placeholder for future extensions and custom formats
|
||||
* @fmt: union of @pix, @pix_mp, @win, @vbi, @sliced, @sdr, @meta
|
||||
* and @raw_data
|
||||
*/
|
||||
struct v4l2_format {
|
||||
__u32 type;
|
||||
|
||||
31
include/uapi/linux/virtio_bt.h
Normal file
31
include/uapi/linux/virtio_bt.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause */
|
||||
|
||||
#ifndef _UAPI_LINUX_VIRTIO_BT_H
|
||||
#define _UAPI_LINUX_VIRTIO_BT_H
|
||||
|
||||
#include <linux/virtio_types.h>
|
||||
|
||||
/* Feature bits */
|
||||
#define VIRTIO_BT_F_VND_HCI 0 /* Indicates vendor command support */
|
||||
#define VIRTIO_BT_F_MSFT_EXT 1 /* Indicates MSFT vendor support */
|
||||
#define VIRTIO_BT_F_AOSP_EXT 2 /* Indicates AOSP vendor support */
|
||||
|
||||
enum virtio_bt_config_type {
|
||||
VIRTIO_BT_CONFIG_TYPE_PRIMARY = 0,
|
||||
VIRTIO_BT_CONFIG_TYPE_AMP = 1,
|
||||
};
|
||||
|
||||
enum virtio_bt_config_vendor {
|
||||
VIRTIO_BT_CONFIG_VENDOR_NONE = 0,
|
||||
VIRTIO_BT_CONFIG_VENDOR_ZEPHYR = 1,
|
||||
VIRTIO_BT_CONFIG_VENDOR_INTEL = 2,
|
||||
VIRTIO_BT_CONFIG_VENDOR_REALTEK = 3,
|
||||
};
|
||||
|
||||
struct virtio_bt_config {
|
||||
__u8 type;
|
||||
__u16 vendor;
|
||||
__u16 msft_opcode;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif /* _UAPI_LINUX_VIRTIO_BT_H */
|
||||
@@ -51,8 +51,10 @@
|
||||
#define VIRTIO_ID_PSTORE 22 /* virtio pstore device */
|
||||
#define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */
|
||||
#define VIRTIO_ID_MEM 24 /* virtio mem */
|
||||
#define VIRTIO_ID_SOUND 25 /* virtio sound */
|
||||
#define VIRTIO_ID_FS 26 /* virtio filesystem */
|
||||
#define VIRTIO_ID_PMEM 27 /* virtio pmem */
|
||||
#define VIRTIO_ID_BT 28 /* virtio bluetooth */
|
||||
#define VIRTIO_ID_MAC80211_HWSIM 29 /* virtio mac80211-hwsim */
|
||||
|
||||
#endif /* _LINUX_VIRTIO_IDS_H */
|
||||
|
||||
334
include/uapi/linux/virtio_snd.h
Normal file
334
include/uapi/linux/virtio_snd.h
Normal file
@@ -0,0 +1,334 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2021 OpenSynergy GmbH
|
||||
*/
|
||||
#ifndef VIRTIO_SND_IF_H
|
||||
#define VIRTIO_SND_IF_H
|
||||
|
||||
#include <linux/virtio_types.h>
|
||||
|
||||
/*******************************************************************************
|
||||
* CONFIGURATION SPACE
|
||||
*/
|
||||
struct virtio_snd_config {
|
||||
/* # of available physical jacks */
|
||||
__le32 jacks;
|
||||
/* # of available PCM streams */
|
||||
__le32 streams;
|
||||
/* # of available channel maps */
|
||||
__le32 chmaps;
|
||||
};
|
||||
|
||||
enum {
|
||||
/* device virtqueue indexes */
|
||||
VIRTIO_SND_VQ_CONTROL = 0,
|
||||
VIRTIO_SND_VQ_EVENT,
|
||||
VIRTIO_SND_VQ_TX,
|
||||
VIRTIO_SND_VQ_RX,
|
||||
/* # of device virtqueues */
|
||||
VIRTIO_SND_VQ_MAX
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* COMMON DEFINITIONS
|
||||
*/
|
||||
|
||||
/* supported dataflow directions */
|
||||
enum {
|
||||
VIRTIO_SND_D_OUTPUT = 0,
|
||||
VIRTIO_SND_D_INPUT
|
||||
};
|
||||
|
||||
enum {
|
||||
/* jack control request types */
|
||||
VIRTIO_SND_R_JACK_INFO = 1,
|
||||
VIRTIO_SND_R_JACK_REMAP,
|
||||
|
||||
/* PCM control request types */
|
||||
VIRTIO_SND_R_PCM_INFO = 0x0100,
|
||||
VIRTIO_SND_R_PCM_SET_PARAMS,
|
||||
VIRTIO_SND_R_PCM_PREPARE,
|
||||
VIRTIO_SND_R_PCM_RELEASE,
|
||||
VIRTIO_SND_R_PCM_START,
|
||||
VIRTIO_SND_R_PCM_STOP,
|
||||
|
||||
/* channel map control request types */
|
||||
VIRTIO_SND_R_CHMAP_INFO = 0x0200,
|
||||
|
||||
/* jack event types */
|
||||
VIRTIO_SND_EVT_JACK_CONNECTED = 0x1000,
|
||||
VIRTIO_SND_EVT_JACK_DISCONNECTED,
|
||||
|
||||
/* PCM event types */
|
||||
VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED = 0x1100,
|
||||
VIRTIO_SND_EVT_PCM_XRUN,
|
||||
|
||||
/* common status codes */
|
||||
VIRTIO_SND_S_OK = 0x8000,
|
||||
VIRTIO_SND_S_BAD_MSG,
|
||||
VIRTIO_SND_S_NOT_SUPP,
|
||||
VIRTIO_SND_S_IO_ERR
|
||||
};
|
||||
|
||||
/* common header */
|
||||
struct virtio_snd_hdr {
|
||||
__le32 code;
|
||||
};
|
||||
|
||||
/* event notification */
|
||||
struct virtio_snd_event {
|
||||
/* VIRTIO_SND_EVT_XXX */
|
||||
struct virtio_snd_hdr hdr;
|
||||
/* optional event data */
|
||||
__le32 data;
|
||||
};
|
||||
|
||||
/* common control request to query an item information */
|
||||
struct virtio_snd_query_info {
|
||||
/* VIRTIO_SND_R_XXX_INFO */
|
||||
struct virtio_snd_hdr hdr;
|
||||
/* item start identifier */
|
||||
__le32 start_id;
|
||||
/* item count to query */
|
||||
__le32 count;
|
||||
/* item information size in bytes */
|
||||
__le32 size;
|
||||
};
|
||||
|
||||
/* common item information header */
|
||||
struct virtio_snd_info {
|
||||
/* function group node id (High Definition Audio Specification 7.1.2) */
|
||||
__le32 hda_fn_nid;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* JACK CONTROL MESSAGES
|
||||
*/
|
||||
struct virtio_snd_jack_hdr {
|
||||
/* VIRTIO_SND_R_JACK_XXX */
|
||||
struct virtio_snd_hdr hdr;
|
||||
/* 0 ... virtio_snd_config::jacks - 1 */
|
||||
__le32 jack_id;
|
||||
};
|
||||
|
||||
/* supported jack features */
|
||||
enum {
|
||||
VIRTIO_SND_JACK_F_REMAP = 0
|
||||
};
|
||||
|
||||
struct virtio_snd_jack_info {
|
||||
/* common header */
|
||||
struct virtio_snd_info hdr;
|
||||
/* supported feature bit map (1 << VIRTIO_SND_JACK_F_XXX) */
|
||||
__le32 features;
|
||||
/* pin configuration (High Definition Audio Specification 7.3.3.31) */
|
||||
__le32 hda_reg_defconf;
|
||||
/* pin capabilities (High Definition Audio Specification 7.3.4.9) */
|
||||
__le32 hda_reg_caps;
|
||||
/* current jack connection status (0: disconnected, 1: connected) */
|
||||
__u8 connected;
|
||||
|
||||
__u8 padding[7];
|
||||
};
|
||||
|
||||
/* jack remapping control request */
|
||||
struct virtio_snd_jack_remap {
|
||||
/* .code = VIRTIO_SND_R_JACK_REMAP */
|
||||
struct virtio_snd_jack_hdr hdr;
|
||||
/* selected association number */
|
||||
__le32 association;
|
||||
/* selected sequence number */
|
||||
__le32 sequence;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* PCM CONTROL MESSAGES
|
||||
*/
|
||||
struct virtio_snd_pcm_hdr {
|
||||
/* VIRTIO_SND_R_PCM_XXX */
|
||||
struct virtio_snd_hdr hdr;
|
||||
/* 0 ... virtio_snd_config::streams - 1 */
|
||||
__le32 stream_id;
|
||||
};
|
||||
|
||||
/* supported PCM stream features */
|
||||
enum {
|
||||
VIRTIO_SND_PCM_F_SHMEM_HOST = 0,
|
||||
VIRTIO_SND_PCM_F_SHMEM_GUEST,
|
||||
VIRTIO_SND_PCM_F_MSG_POLLING,
|
||||
VIRTIO_SND_PCM_F_EVT_SHMEM_PERIODS,
|
||||
VIRTIO_SND_PCM_F_EVT_XRUNS
|
||||
};
|
||||
|
||||
/* supported PCM sample formats */
|
||||
enum {
|
||||
/* analog formats (width / physical width) */
|
||||
VIRTIO_SND_PCM_FMT_IMA_ADPCM = 0, /* 4 / 4 bits */
|
||||
VIRTIO_SND_PCM_FMT_MU_LAW, /* 8 / 8 bits */
|
||||
VIRTIO_SND_PCM_FMT_A_LAW, /* 8 / 8 bits */
|
||||
VIRTIO_SND_PCM_FMT_S8, /* 8 / 8 bits */
|
||||
VIRTIO_SND_PCM_FMT_U8, /* 8 / 8 bits */
|
||||
VIRTIO_SND_PCM_FMT_S16, /* 16 / 16 bits */
|
||||
VIRTIO_SND_PCM_FMT_U16, /* 16 / 16 bits */
|
||||
VIRTIO_SND_PCM_FMT_S18_3, /* 18 / 24 bits */
|
||||
VIRTIO_SND_PCM_FMT_U18_3, /* 18 / 24 bits */
|
||||
VIRTIO_SND_PCM_FMT_S20_3, /* 20 / 24 bits */
|
||||
VIRTIO_SND_PCM_FMT_U20_3, /* 20 / 24 bits */
|
||||
VIRTIO_SND_PCM_FMT_S24_3, /* 24 / 24 bits */
|
||||
VIRTIO_SND_PCM_FMT_U24_3, /* 24 / 24 bits */
|
||||
VIRTIO_SND_PCM_FMT_S20, /* 20 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_U20, /* 20 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_S24, /* 24 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_U24, /* 24 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_S32, /* 32 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_U32, /* 32 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_FLOAT, /* 32 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_FLOAT64, /* 64 / 64 bits */
|
||||
/* digital formats (width / physical width) */
|
||||
VIRTIO_SND_PCM_FMT_DSD_U8, /* 8 / 8 bits */
|
||||
VIRTIO_SND_PCM_FMT_DSD_U16, /* 16 / 16 bits */
|
||||
VIRTIO_SND_PCM_FMT_DSD_U32, /* 32 / 32 bits */
|
||||
VIRTIO_SND_PCM_FMT_IEC958_SUBFRAME /* 32 / 32 bits */
|
||||
};
|
||||
|
||||
/* supported PCM frame rates */
|
||||
enum {
|
||||
VIRTIO_SND_PCM_RATE_5512 = 0,
|
||||
VIRTIO_SND_PCM_RATE_8000,
|
||||
VIRTIO_SND_PCM_RATE_11025,
|
||||
VIRTIO_SND_PCM_RATE_16000,
|
||||
VIRTIO_SND_PCM_RATE_22050,
|
||||
VIRTIO_SND_PCM_RATE_32000,
|
||||
VIRTIO_SND_PCM_RATE_44100,
|
||||
VIRTIO_SND_PCM_RATE_48000,
|
||||
VIRTIO_SND_PCM_RATE_64000,
|
||||
VIRTIO_SND_PCM_RATE_88200,
|
||||
VIRTIO_SND_PCM_RATE_96000,
|
||||
VIRTIO_SND_PCM_RATE_176400,
|
||||
VIRTIO_SND_PCM_RATE_192000,
|
||||
VIRTIO_SND_PCM_RATE_384000
|
||||
};
|
||||
|
||||
struct virtio_snd_pcm_info {
|
||||
/* common header */
|
||||
struct virtio_snd_info hdr;
|
||||
/* supported feature bit map (1 << VIRTIO_SND_PCM_F_XXX) */
|
||||
__le32 features;
|
||||
/* supported sample format bit map (1 << VIRTIO_SND_PCM_FMT_XXX) */
|
||||
__le64 formats;
|
||||
/* supported frame rate bit map (1 << VIRTIO_SND_PCM_RATE_XXX) */
|
||||
__le64 rates;
|
||||
/* dataflow direction (VIRTIO_SND_D_XXX) */
|
||||
__u8 direction;
|
||||
/* minimum # of supported channels */
|
||||
__u8 channels_min;
|
||||
/* maximum # of supported channels */
|
||||
__u8 channels_max;
|
||||
|
||||
__u8 padding[5];
|
||||
};
|
||||
|
||||
/* set PCM stream format */
|
||||
struct virtio_snd_pcm_set_params {
|
||||
/* .code = VIRTIO_SND_R_PCM_SET_PARAMS */
|
||||
struct virtio_snd_pcm_hdr hdr;
|
||||
/* size of the hardware buffer */
|
||||
__le32 buffer_bytes;
|
||||
/* size of the hardware period */
|
||||
__le32 period_bytes;
|
||||
/* selected feature bit map (1 << VIRTIO_SND_PCM_F_XXX) */
|
||||
__le32 features;
|
||||
/* selected # of channels */
|
||||
__u8 channels;
|
||||
/* selected sample format (VIRTIO_SND_PCM_FMT_XXX) */
|
||||
__u8 format;
|
||||
/* selected frame rate (VIRTIO_SND_PCM_RATE_XXX) */
|
||||
__u8 rate;
|
||||
|
||||
__u8 padding;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* PCM I/O MESSAGES
|
||||
*/
|
||||
|
||||
/* I/O request header */
|
||||
struct virtio_snd_pcm_xfer {
|
||||
/* 0 ... virtio_snd_config::streams - 1 */
|
||||
__le32 stream_id;
|
||||
};
|
||||
|
||||
/* I/O request status */
|
||||
struct virtio_snd_pcm_status {
|
||||
/* VIRTIO_SND_S_XXX */
|
||||
__le32 status;
|
||||
/* current device latency */
|
||||
__le32 latency_bytes;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* CHANNEL MAP CONTROL MESSAGES
|
||||
*/
|
||||
struct virtio_snd_chmap_hdr {
|
||||
/* VIRTIO_SND_R_CHMAP_XXX */
|
||||
struct virtio_snd_hdr hdr;
|
||||
/* 0 ... virtio_snd_config::chmaps - 1 */
|
||||
__le32 chmap_id;
|
||||
};
|
||||
|
||||
/* standard channel position definition */
|
||||
enum {
|
||||
VIRTIO_SND_CHMAP_NONE = 0, /* undefined */
|
||||
VIRTIO_SND_CHMAP_NA, /* silent */
|
||||
VIRTIO_SND_CHMAP_MONO, /* mono stream */
|
||||
VIRTIO_SND_CHMAP_FL, /* front left */
|
||||
VIRTIO_SND_CHMAP_FR, /* front right */
|
||||
VIRTIO_SND_CHMAP_RL, /* rear left */
|
||||
VIRTIO_SND_CHMAP_RR, /* rear right */
|
||||
VIRTIO_SND_CHMAP_FC, /* front center */
|
||||
VIRTIO_SND_CHMAP_LFE, /* low frequency (LFE) */
|
||||
VIRTIO_SND_CHMAP_SL, /* side left */
|
||||
VIRTIO_SND_CHMAP_SR, /* side right */
|
||||
VIRTIO_SND_CHMAP_RC, /* rear center */
|
||||
VIRTIO_SND_CHMAP_FLC, /* front left center */
|
||||
VIRTIO_SND_CHMAP_FRC, /* front right center */
|
||||
VIRTIO_SND_CHMAP_RLC, /* rear left center */
|
||||
VIRTIO_SND_CHMAP_RRC, /* rear right center */
|
||||
VIRTIO_SND_CHMAP_FLW, /* front left wide */
|
||||
VIRTIO_SND_CHMAP_FRW, /* front right wide */
|
||||
VIRTIO_SND_CHMAP_FLH, /* front left high */
|
||||
VIRTIO_SND_CHMAP_FCH, /* front center high */
|
||||
VIRTIO_SND_CHMAP_FRH, /* front right high */
|
||||
VIRTIO_SND_CHMAP_TC, /* top center */
|
||||
VIRTIO_SND_CHMAP_TFL, /* top front left */
|
||||
VIRTIO_SND_CHMAP_TFR, /* top front right */
|
||||
VIRTIO_SND_CHMAP_TFC, /* top front center */
|
||||
VIRTIO_SND_CHMAP_TRL, /* top rear left */
|
||||
VIRTIO_SND_CHMAP_TRR, /* top rear right */
|
||||
VIRTIO_SND_CHMAP_TRC, /* top rear center */
|
||||
VIRTIO_SND_CHMAP_TFLC, /* top front left center */
|
||||
VIRTIO_SND_CHMAP_TFRC, /* top front right center */
|
||||
VIRTIO_SND_CHMAP_TSL, /* top side left */
|
||||
VIRTIO_SND_CHMAP_TSR, /* top side right */
|
||||
VIRTIO_SND_CHMAP_LLFE, /* left LFE */
|
||||
VIRTIO_SND_CHMAP_RLFE, /* right LFE */
|
||||
VIRTIO_SND_CHMAP_BC, /* bottom center */
|
||||
VIRTIO_SND_CHMAP_BLC, /* bottom left center */
|
||||
VIRTIO_SND_CHMAP_BRC /* bottom right center */
|
||||
};
|
||||
|
||||
/* maximum possible number of channels */
|
||||
#define VIRTIO_SND_CHMAP_MAX_SIZE 18
|
||||
|
||||
struct virtio_snd_chmap_info {
|
||||
/* common header */
|
||||
struct virtio_snd_info hdr;
|
||||
/* dataflow direction (VIRTIO_SND_D_XXX) */
|
||||
__u8 direction;
|
||||
/* # of valid channel position values */
|
||||
__u8 channels;
|
||||
/* channel position values (VIRTIO_SND_CHMAP_XXX) */
|
||||
__u8 positions[VIRTIO_SND_CHMAP_MAX_SIZE];
|
||||
};
|
||||
|
||||
#endif /* VIRTIO_SND_IF_H */
|
||||
@@ -297,6 +297,7 @@ enum hl_device_status {
|
||||
#define HL_INFO_SYNC_MANAGER 14
|
||||
#define HL_INFO_TOTAL_ENERGY 15
|
||||
#define HL_INFO_PLL_FREQUENCY 16
|
||||
#define HL_INFO_POWER 17
|
||||
|
||||
#define HL_INFO_VERSION_MAX_LEN 128
|
||||
#define HL_INFO_CARD_NAME_MAX_LEN 16
|
||||
@@ -410,6 +411,14 @@ struct hl_pll_frequency_info {
|
||||
__u16 output[HL_PLL_NUM_OUTPUTS];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hl_power_info - power information
|
||||
* @power: power consumption
|
||||
*/
|
||||
struct hl_power_info {
|
||||
__u64 power;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hl_info_sync_manager - sync manager information
|
||||
* @first_available_sync_object: first available sob
|
||||
@@ -621,6 +630,7 @@ struct hl_cs_chunk {
|
||||
#define HL_CS_FLAGS_STAGED_SUBMISSION 0x40
|
||||
#define HL_CS_FLAGS_STAGED_SUBMISSION_FIRST 0x80
|
||||
#define HL_CS_FLAGS_STAGED_SUBMISSION_LAST 0x100
|
||||
#define HL_CS_FLAGS_CUSTOM_TIMEOUT 0x200
|
||||
|
||||
#define HL_CS_STATUS_SUCCESS 0
|
||||
|
||||
@@ -634,17 +644,10 @@ struct hl_cs_in {
|
||||
/* holds address of array of hl_cs_chunk for execution phase */
|
||||
__u64 chunks_execute;
|
||||
|
||||
union {
|
||||
/* this holds address of array of hl_cs_chunk for store phase -
|
||||
* Currently not in use
|
||||
*/
|
||||
__u64 chunks_store;
|
||||
|
||||
/* Sequence number of a staged submission CS
|
||||
* valid only if HL_CS_FLAGS_STAGED_SUBMISSION is set
|
||||
*/
|
||||
__u64 seq;
|
||||
};
|
||||
/* Sequence number of a staged submission CS
|
||||
* valid only if HL_CS_FLAGS_STAGED_SUBMISSION is set
|
||||
*/
|
||||
__u64 seq;
|
||||
|
||||
/* Number of chunks in restore phase array. Maximum number is
|
||||
* HL_MAX_JOBS_PER_CS
|
||||
@@ -656,8 +659,10 @@ struct hl_cs_in {
|
||||
*/
|
||||
__u32 num_chunks_execute;
|
||||
|
||||
/* Number of chunks in restore phase array - Currently not in use */
|
||||
__u32 num_chunks_store;
|
||||
/* timeout in seconds - valid only if HL_CS_FLAGS_CUSTOM_TIMEOUT
|
||||
* is set
|
||||
*/
|
||||
__u32 timeout;
|
||||
|
||||
/* HL_CS_FLAGS_* */
|
||||
__u32 cs_flags;
|
||||
@@ -682,14 +687,46 @@ union hl_cs_args {
|
||||
struct hl_cs_out out;
|
||||
};
|
||||
|
||||
#define HL_WAIT_CS_FLAGS_INTERRUPT 0x2
|
||||
#define HL_WAIT_CS_FLAGS_INTERRUPT_MASK 0xFFF00000
|
||||
|
||||
struct hl_wait_cs_in {
|
||||
/* Command submission sequence number */
|
||||
__u64 seq;
|
||||
/* Absolute timeout to wait in microseconds */
|
||||
__u64 timeout_us;
|
||||
union {
|
||||
struct {
|
||||
/* Command submission sequence number */
|
||||
__u64 seq;
|
||||
/* Absolute timeout to wait for command submission
|
||||
* in microseconds
|
||||
*/
|
||||
__u64 timeout_us;
|
||||
};
|
||||
|
||||
struct {
|
||||
/* User address for completion comparison.
|
||||
* upon interrupt, driver will compare the value pointed
|
||||
* by this address with the supplied target value.
|
||||
* in order not to perform any comparison, set address
|
||||
* to all 1s.
|
||||
* Relevant only when HL_WAIT_CS_FLAGS_INTERRUPT is set
|
||||
*/
|
||||
__u64 addr;
|
||||
/* Target value for completion comparison */
|
||||
__u32 target;
|
||||
/* Absolute timeout to wait for interrupt
|
||||
* in microseconds
|
||||
*/
|
||||
__u32 interrupt_timeout_us;
|
||||
};
|
||||
};
|
||||
|
||||
/* Context ID - Currently not in use */
|
||||
__u32 ctx_id;
|
||||
__u32 pad;
|
||||
/* HL_WAIT_CS_FLAGS_*
|
||||
* If HL_WAIT_CS_FLAGS_INTERRUPT is set, this field should include
|
||||
* interrupt id according to HL_WAIT_CS_FLAGS_INTERRUPT_MASK, in order
|
||||
* not to specify an interrupt id ,set mask to all 1s.
|
||||
*/
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
#define HL_WAIT_CS_STATUS_COMPLETED 0
|
||||
@@ -999,8 +1036,8 @@ struct hl_debug_args {
|
||||
* Each JOB will be enqueued on a specific queue, according to the user's input.
|
||||
* There can be more then one JOB per queue.
|
||||
*
|
||||
* The CS IOCTL will receive three sets of JOBS. One set is for "restore" phase,
|
||||
* a second set is for "execution" phase and a third set is for "store" phase.
|
||||
* The CS IOCTL will receive two sets of JOBS. One set is for "restore" phase
|
||||
* and a second set is for "execution" phase.
|
||||
* The JOBS on the "restore" phase are enqueued only after context-switch
|
||||
* (or if its the first CS for this context). The user can also order the
|
||||
* driver to run the "restore" phase explicitly
|
||||
|
||||
@@ -16,6 +16,7 @@ struct hisi_qp_ctx {
|
||||
|
||||
#define HISI_QM_API_VER_BASE "hisi_qm_v1"
|
||||
#define HISI_QM_API_VER2_BASE "hisi_qm_v2"
|
||||
#define HISI_QM_API_VER3_BASE "hisi_qm_v3"
|
||||
|
||||
/* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */
|
||||
#define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx)
|
||||
|
||||
@@ -205,6 +205,8 @@ struct otp_info {
|
||||
* without OOB, e.g., NOR flash.
|
||||
*/
|
||||
#define MEMWRITE _IOWR('M', 24, struct mtd_write_req)
|
||||
/* Erase a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
|
||||
#define OTPERASE _IOW('M', 25, struct otp_info)
|
||||
|
||||
/*
|
||||
* Obsolete legacy interface. Keep it in order not to break userspace
|
||||
|
||||
@@ -86,6 +86,8 @@ struct hns_roce_ib_create_qp_resp {
|
||||
struct hns_roce_ib_alloc_ucontext_resp {
|
||||
__u32 qp_tab_size;
|
||||
__u32 cqe_size;
|
||||
__u32 srq_tab_size;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
struct hns_roce_ib_alloc_pd_resp {
|
||||
|
||||
@@ -41,6 +41,25 @@ enum mlx5_ib_create_flow_action_attrs {
|
||||
MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
|
||||
};
|
||||
|
||||
enum mlx5_ib_dm_methods {
|
||||
MLX5_IB_METHOD_DM_MAP_OP_ADDR = (1U << UVERBS_ID_NS_SHIFT),
|
||||
MLX5_IB_METHOD_DM_QUERY,
|
||||
};
|
||||
|
||||
enum mlx5_ib_dm_map_op_addr_attrs {
|
||||
MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
|
||||
MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_OP,
|
||||
MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_START_OFFSET,
|
||||
MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_PAGE_INDEX,
|
||||
};
|
||||
|
||||
enum mlx5_ib_query_dm_attrs {
|
||||
MLX5_IB_ATTR_QUERY_DM_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
|
||||
MLX5_IB_ATTR_QUERY_DM_RESP_START_OFFSET,
|
||||
MLX5_IB_ATTR_QUERY_DM_RESP_PAGE_INDEX,
|
||||
MLX5_IB_ATTR_QUERY_DM_RESP_LENGTH,
|
||||
};
|
||||
|
||||
enum mlx5_ib_alloc_dm_attrs {
|
||||
MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT),
|
||||
MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX,
|
||||
@@ -154,6 +173,7 @@ enum mlx5_ib_devx_umem_reg_attrs {
|
||||
MLX5_IB_ATTR_DEVX_UMEM_REG_LEN,
|
||||
MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS,
|
||||
MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID,
|
||||
MLX5_IB_ATTR_DEVX_UMEM_REG_PGSZ_BITMAP,
|
||||
};
|
||||
|
||||
enum mlx5_ib_devx_umem_dereg_attrs {
|
||||
@@ -300,4 +320,13 @@ enum mlx5_ib_pd_methods {
|
||||
|
||||
};
|
||||
|
||||
enum mlx5_ib_device_methods {
|
||||
MLX5_IB_METHOD_QUERY_PORT = (1U << UVERBS_ID_NS_SHIFT),
|
||||
};
|
||||
|
||||
enum mlx5_ib_query_port_attrs {
|
||||
MLX5_IB_ATTR_QUERY_PORT_PORT_NUM = (1U << UVERBS_ID_NS_SHIFT),
|
||||
MLX5_IB_ATTR_QUERY_PORT,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -83,5 +83,30 @@ enum mlx5_ib_uapi_uar_alloc_type {
|
||||
MLX5_IB_UAPI_UAR_ALLOC_TYPE_NC = 0x1,
|
||||
};
|
||||
|
||||
enum mlx5_ib_uapi_query_port_flags {
|
||||
MLX5_IB_UAPI_QUERY_PORT_VPORT = 1 << 0,
|
||||
MLX5_IB_UAPI_QUERY_PORT_VPORT_VHCA_ID = 1 << 1,
|
||||
MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_RX = 1 << 2,
|
||||
MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_TX = 1 << 3,
|
||||
MLX5_IB_UAPI_QUERY_PORT_VPORT_REG_C0 = 1 << 4,
|
||||
MLX5_IB_UAPI_QUERY_PORT_ESW_OWNER_VHCA_ID = 1 << 5,
|
||||
};
|
||||
|
||||
struct mlx5_ib_uapi_reg {
|
||||
__u32 value;
|
||||
__u32 mask;
|
||||
};
|
||||
|
||||
struct mlx5_ib_uapi_query_port {
|
||||
__aligned_u64 flags;
|
||||
__u16 vport;
|
||||
__u16 vport_vhca_id;
|
||||
__u16 esw_owner_vhca_id;
|
||||
__u16 rsvd0;
|
||||
__aligned_u64 vport_steering_icm_rx;
|
||||
__aligned_u64 vport_steering_icm_tx;
|
||||
struct mlx5_ib_uapi_reg reg_c0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -293,6 +293,10 @@ enum rdma_nldev_command {
|
||||
|
||||
RDMA_NLDEV_CMD_RES_MR_GET_RAW,
|
||||
|
||||
RDMA_NLDEV_CMD_RES_CTX_GET, /* can dump */
|
||||
|
||||
RDMA_NLDEV_CMD_RES_SRQ_GET, /* can dump */
|
||||
|
||||
RDMA_NLDEV_NUM_OPS
|
||||
};
|
||||
|
||||
@@ -533,6 +537,18 @@ enum rdma_nldev_attr {
|
||||
|
||||
RDMA_NLDEV_ATTR_RES_RAW, /* binary */
|
||||
|
||||
RDMA_NLDEV_ATTR_RES_CTX, /* nested table */
|
||||
RDMA_NLDEV_ATTR_RES_CTX_ENTRY, /* nested table */
|
||||
|
||||
RDMA_NLDEV_ATTR_RES_SRQ, /* nested table */
|
||||
RDMA_NLDEV_ATTR_RES_SRQ_ENTRY, /* nested table */
|
||||
RDMA_NLDEV_ATTR_RES_SRQN, /* u32 */
|
||||
|
||||
RDMA_NLDEV_ATTR_MIN_RANGE, /* u32 */
|
||||
RDMA_NLDEV_ATTR_MAX_RANGE, /* u32 */
|
||||
|
||||
RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK, /* u8 */
|
||||
|
||||
/*
|
||||
* Always the end
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user