We haven't done any backmerge for a while due to the merge window, and it starts to become an issue for komeda. Let's bring 5.4-rc1 in.
Showing the changes to include/uapi (97 of 12131 files). Show all
Unified · Split
| @@ -67,6 +67,9 @@ · 66 unmodified lines | ||
| 67 | 67 | #define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */ |
| 68 | 68 | #define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */ |
| 69 | 69 | |
| 70 | +#define MADV_COLD 20 /* deactivate these pages */ | |
| 71 | +#define MADV_PAGEOUT 21 /* reclaim these pages */ | |
| 72 | + | |
| 70 | 73 | /* compatibility flags */ |
| 71 | 74 | #define MAP_FILE 0 |
| 72 | 75 | |
| @@ -569,7 +569,7 @@ __SYSCALL(__NR_semget, sys_semget) · 568 unmodified lines | ||
| 569 | 569 | __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) |
| 570 | 570 | #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 |
| 571 | 571 | #define __NR_semtimedop 192 |
| 572 | −__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) | |
| 572 | +__SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) | |
| 573 | 573 | #endif |
| 574 | 574 | #define __NR_semop 193 |
| 575 | 575 | __SYSCALL(__NR_semop, sys_semop) |
| @@ -128,6 +128,10 @@ extern "C" { · 127 unmodified lines | ||
| 128 | 128 | * for the second page onward should be set to NC. |
| 129 | 129 | */ |
| 130 | 130 | #define AMDGPU_GEM_CREATE_MQD_GFX9 (1 << 8) |
| 131 | +/* Flag that BO may contain sensitive data that must be wiped before | |
| 132 | + * releasing the memory | |
| 133 | + */ | |
| 134 | +#define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9) | |
| 131 | 135 | |
| 132 | 136 | struct drm_amdgpu_gem_create_in { |
| 133 | 137 | /** the requested memory size */ |
| @@ -73,6 +73,7 @@ struct drm_etnaviv_timespec { · 72 unmodified lines | ||
| 73 | 73 | #define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18 |
| 74 | 74 | #define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19 |
| 75 | 75 | #define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a |
| 76 | +#define ETNAVIV_PARAM_SOFTPIN_START_ADDR 0x1b | |
| 76 | 77 | |
| 77 | 78 | #define ETNA_MAX_PIPES 4 |
| 78 | 79 | |
| @@ -148,6 +149,11 @@ struct drm_etnaviv_gem_submit_reloc { · 69 unmodified lines | ||
| 148 | 149 | * then patching the cmdstream for this entry is skipped. This can |
| 149 | 150 | * avoid kernel needing to map/access the cmdstream bo in the common |
| 150 | 151 | * case. |
| 152 | + * If the submit is a softpin submit (ETNA_SUBMIT_SOFTPIN) the 'presumed' | |
| 153 | + * field is interpreted as the fixed location to map the bo into the gpu | |
| 154 | + * virtual address space. If the kernel is unable to map the buffer at | |
| 155 | + * this location the submit will fail. This means userspace is responsible | |
| 156 | + * for the whole gpu virtual address management. | |
| 151 | 157 | */ |
| 152 | 158 | #define ETNA_SUBMIT_BO_READ 0x0001 |
| 153 | 159 | #define ETNA_SUBMIT_BO_WRITE 0x0002 |
| @@ -177,9 +183,11 @@ struct drm_etnaviv_gem_submit_pmr { · 23 unmodified lines | ||
| 177 | 183 | #define ETNA_SUBMIT_NO_IMPLICIT 0x0001 |
| 178 | 184 | #define ETNA_SUBMIT_FENCE_FD_IN 0x0002 |
| 179 | 185 | #define ETNA_SUBMIT_FENCE_FD_OUT 0x0004 |
| 186 | +#define ETNA_SUBMIT_SOFTPIN 0x0008 | |
| 180 | 187 | #define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \ |
| 181 | 188 | ETNA_SUBMIT_FENCE_FD_IN | \ |
| 182 | − ETNA_SUBMIT_FENCE_FD_OUT) | |
| 189 | + ETNA_SUBMIT_FENCE_FD_OUT| \ | |
| 190 | + ETNA_SUBMIT_SOFTPIN) | |
| 183 | 191 | #define ETNA_PIPE_3D 0x00 |
| 184 | 192 | #define ETNA_PIPE_2D 0x01 |
| 185 | 193 | #define ETNA_PIPE_VG 0x02 |
| @@ -521,6 +521,7 @@ typedef struct drm_i915_irq_wait { · 520 unmodified lines | ||
| 521 | 521 | #define I915_SCHEDULER_CAP_PRIORITY (1ul << 1) |
| 522 | 522 | #define I915_SCHEDULER_CAP_PREEMPTION (1ul << 2) |
| 523 | 523 | #define I915_SCHEDULER_CAP_SEMAPHORES (1ul << 3) |
| 524 | +#define I915_SCHEDULER_CAP_ENGINE_BUSY_STATS (1ul << 4) | |
| 524 | 525 | |
| 525 | 526 | #define I915_PARAM_HUC_STATUS 42 |
| 526 | 527 | |
| @@ -106,6 +106,7 @@ enum bpf_cmd { · 105 unmodified lines | ||
| 106 | 106 | BPF_TASK_FD_QUERY, |
| 107 | 107 | BPF_MAP_LOOKUP_AND_DELETE_ELEM, |
| 108 | 108 | BPF_MAP_FREEZE, |
| 109 | + BPF_BTF_GET_NEXT_ID, | |
| 109 | 110 | }; |
| 110 | 111 | |
| 111 | 112 | enum bpf_map_type { |
| @@ -134,6 +135,7 @@ enum bpf_map_type { · 22 unmodified lines | ||
| 134 | 135 | BPF_MAP_TYPE_QUEUE, |
| 135 | 136 | BPF_MAP_TYPE_STACK, |
| 136 | 137 | BPF_MAP_TYPE_SK_STORAGE, |
| 138 | + BPF_MAP_TYPE_DEVMAP_HASH, | |
| 137 | 139 | }; |
| 138 | 140 | |
| 139 | 141 | /* Note that tracing related programs such as |
| @@ -283,6 +285,9 @@ enum bpf_attach_type { · 143 unmodified lines | ||
| 283 | 285 | */ |
| 284 | 286 | #define BPF_F_TEST_RND_HI32 (1U << 2) |
| 285 | 287 | |
| 288 | +/* The verifier internal test flag. Behavior is undefined */ | |
| 289 | +#define BPF_F_TEST_STATE_FREQ (1U << 3) | |
| 290 | + | |
| 286 | 291 | /* When BPF ldimm64's insn[0].src_reg != 0 then this can have |
| 287 | 292 | * two extensions: |
| 288 | 293 | * |
| @@ -336,6 +341,9 @@ enum bpf_attach_type { · 47 unmodified lines | ||
| 336 | 341 | #define BPF_F_RDONLY_PROG (1U << 7) |
| 337 | 342 | #define BPF_F_WRONLY_PROG (1U << 8) |
| 338 | 343 | |
| 344 | +/* Clone map from listener for newly accepted socket */ | |
| 345 | +#define BPF_F_CLONE (1U << 9) | |
| 346 | + | |
| 339 | 347 | /* flags for BPF_PROG_QUERY */ |
| 340 | 348 | #define BPF_F_QUERY_EFFECTIVE (1U << 0) |
| 341 | 349 | |
| @@ -575,6 +583,8 @@ union bpf_attr { · 233 unmodified lines | ||
| 575 | 583 | * limited to five). |
| 576 | 584 | * |
| 577 | 585 | * Each time the helper is called, it appends a line to the trace. |
| 586 | + * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is | |
| 587 | + * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this. | |
| 578 | 588 | * The format of the trace is customizable, and the exact output |
| 579 | 589 | * one will get depends on the options set in |
| 580 | 590 | * *\/sys/kernel/debug/tracing/trace_options* (see also the |
| @@ -1013,7 +1023,7 @@ union bpf_attr { · 432 unmodified lines | ||
| 1013 | 1023 | * The realm of the route for the packet associated to *skb*, or 0 |
| 1014 | 1024 | * if none was found. |
| 1015 | 1025 | * |
| 1016 | − * int bpf_perf_event_output(struct pt_reg *ctx, struct bpf_map *map, u64 flags, void *data, u64 size) | |
| 1026 | + * int bpf_perf_event_output(struct pt_regs *ctx, struct bpf_map *map, u64 flags, void *data, u64 size) | |
| 1017 | 1027 | * Description |
| 1018 | 1028 | * Write raw *data* blob into a special BPF perf event held by |
| 1019 | 1029 | * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf |
| @@ -1075,7 +1085,7 @@ union bpf_attr { · 55 unmodified lines | ||
| 1075 | 1085 | * Return |
| 1076 | 1086 | * 0 on success, or a negative error in case of failure. |
| 1077 | 1087 | * |
| 1078 | − * int bpf_get_stackid(struct pt_reg *ctx, struct bpf_map *map, u64 flags) | |
| 1088 | + * int bpf_get_stackid(struct pt_regs *ctx, struct bpf_map *map, u64 flags) | |
| 1079 | 1089 | * Description |
| 1080 | 1090 | * Walk a user or a kernel stack and return its id. To achieve |
| 1081 | 1091 | * this, the helper needs *ctx*, which is a pointer to the context |
| @@ -1466,8 +1476,8 @@ union bpf_attr { · 384 unmodified lines | ||
| 1466 | 1476 | * If no cookie has been set yet, generate a new cookie. Once |
| 1467 | 1477 | * generated, the socket cookie remains stable for the life of the |
| 1468 | 1478 | * socket. This helper can be useful for monitoring per socket |
| 1469 | − * networking traffic statistics as it provides a unique socket | |
| 1470 | − * identifier per namespace. | |
| 1479 | + * networking traffic statistics as it provides a global socket | |
| 1480 | + * identifier that can be assumed unique. | |
| 1471 | 1481 | * Return |
| 1472 | 1482 | * A 8-byte long non-decreasing number on success, or 0 if the |
| 1473 | 1483 | * socket field is missing inside *skb*. |
| @@ -1724,7 +1734,7 @@ union bpf_attr { · 250 unmodified lines | ||
| 1724 | 1734 | * Return |
| 1725 | 1735 | * 0 on success, or a negative error in case of failure. |
| 1726 | 1736 | * |
| 1727 | − * int bpf_override_return(struct pt_reg *regs, u64 rc) | |
| 1737 | + * int bpf_override_return(struct pt_regs *regs, u64 rc) | |
| 1728 | 1738 | * Description |
| 1729 | 1739 | * Used for error injection, this helper uses kprobes to override |
| 1730 | 1740 | * the return value of the probed function, and to set it to *rc*. |
| @@ -2713,6 +2723,33 @@ union bpf_attr { · 982 unmodified lines | ||
| 2713 | 2723 | * **-EPERM** if no permission to send the *sig*. |
| 2714 | 2724 | * |
| 2715 | 2725 | * **-EAGAIN** if bpf program can try again. |
| 2726 | + * | |
| 2727 | + * s64 bpf_tcp_gen_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len) | |
| 2728 | + * Description | |
| 2729 | + * Try to issue a SYN cookie for the packet with corresponding | |
| 2730 | + * IP/TCP headers, *iph* and *th*, on the listening socket in *sk*. | |
| 2731 | + * | |
| 2732 | + * *iph* points to the start of the IPv4 or IPv6 header, while | |
| 2733 | + * *iph_len* contains **sizeof**\ (**struct iphdr**) or | |
| 2734 | + * **sizeof**\ (**struct ip6hdr**). | |
| 2735 | + * | |
| 2736 | + * *th* points to the start of the TCP header, while *th_len* | |
| 2737 | + * contains the length of the TCP header. | |
| 2738 | + * | |
| 2739 | + * Return | |
| 2740 | + * On success, lower 32 bits hold the generated SYN cookie in | |
| 2741 | + * followed by 16 bits which hold the MSS value for that cookie, | |
| 2742 | + * and the top 16 bits are unused. | |
| 2743 | + * | |
| 2744 | + * On failure, the returned value is one of the following: | |
| 2745 | + * | |
| 2746 | + * **-EINVAL** SYN cookie cannot be issued due to error | |
| 2747 | + * | |
| 2748 | + * **-ENOENT** SYN cookie should not be issued (no SYN flood) | |
| 2749 | + * | |
| 2750 | + * **-EOPNOTSUPP** kernel configuration does not enable SYN cookies | |
| 2751 | + * | |
| 2752 | + * **-EPROTONOSUPPORT** IP packet version is not 4 or 6 | |
| 2716 | 2753 | */ |
| 2717 | 2754 | #define __BPF_FUNC_MAPPER(FN) \ |
| 2718 | 2755 | FN(unspec), \ |
| @@ -2824,7 +2861,8 @@ union bpf_attr { · 105 unmodified lines | ||
| 2824 | 2861 | FN(strtoul), \ |
| 2825 | 2862 | FN(sk_storage_get), \ |
| 2826 | 2863 | FN(sk_storage_delete), \ |
| 2827 | − FN(send_signal), | |
| 2864 | + FN(send_signal), \ | |
| 2865 | + FN(tcp_gen_syncookie), | |
| 2828 | 2866 | |
| 2829 | 2867 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 2830 | 2868 | * function eBPF program intends to call |
| @@ -3507,6 +3545,10 @@ enum bpf_task_fd_type { · 676 unmodified lines | ||
| 3507 | 3545 | BPF_FD_TYPE_URETPROBE, /* filename + offset */ |
| 3508 | 3546 | }; |
| 3509 | 3547 | |
| 3548 | +#define BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG (1U << 0) | |
| 3549 | +#define BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL (1U << 1) | |
| 3550 | +#define BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP (1U << 2) | |
| 3551 | + | |
| 3510 | 3552 | struct bpf_flow_keys { |
| 3511 | 3553 | __u16 nhoff; |
| 3512 | 3554 | __u16 thoff; |
| @@ -3528,6 +3570,8 @@ struct bpf_flow_keys { · 15 unmodified lines | ||
| 3528 | 3570 | __u32 ipv6_dst[4]; /* in6_addr; network order */ |
| 3529 | 3571 | }; |
| 3530 | 3572 | }; |
| 3573 | + __u32 flags; | |
| 3574 | + __be32 flow_label; | |
| 3531 | 3575 | }; |
| 3532 | 3576 | |
| 3533 | 3577 | struct bpf_func_info { |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | #ifndef _UAPI_LINUX_BPFILTER_H |
| 3 | 3 | #define _UAPI_LINUX_BPFILTER_H |
| 4 | 4 | |
| @@ -22,9 +22,9 @@ struct btf_header { · 21 unmodified lines | ||
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | 24 | /* Max # of type identifier */ |
| 25 | −#define BTF_MAX_TYPE 0x0000ffff | |
| 25 | +#define BTF_MAX_TYPE 0x000fffff | |
| 26 | 26 | /* Max offset into the string section */ |
| 27 | −#define BTF_MAX_NAME_OFFSET 0x0000ffff | |
| 27 | +#define BTF_MAX_NAME_OFFSET 0x00ffffff | |
| 28 | 28 | /* Max # of struct/union/enum members or func args */ |
| 29 | 29 | #define BTF_MAX_VLEN 0xffff |
| 30 | 30 | |
| @@ -665,7 +665,12 @@ struct btrfs_ioctl_get_dev_stats { · 664 unmodified lines | ||
| 665 | 665 | /* out values: */ |
| 666 | 666 | __u64 values[BTRFS_DEV_STAT_VALUES_MAX]; |
| 667 | 667 | |
| 668 | − __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; /* pad to 1k */ | |
| 668 | + /* | |
| 669 | + * This pads the struct to 1032 bytes. It was originally meant to pad to | |
| 670 | + * 1024 bytes, but when adding the flags field, the padding calculation | |
| 671 | + * was not adjusted. | |
| 672 | + */ | |
| 673 | + __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; | |
| 669 | 674 | }; |
| 670 | 675 | |
| 671 | 676 | #define BTRFS_QUOTA_CTL_ENABLE 1 |
| @@ -917,10 +922,8 @@ enum btrfs_err_code { · 245 unmodified lines | ||
| 917 | 922 | #define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ |
| 918 | 923 | struct btrfs_ioctl_quota_rescan_args) |
| 919 | 924 | #define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) |
| 920 | −#define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \ | |
| 921 | − char[BTRFS_LABEL_SIZE]) | |
| 922 | −#define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \ | |
| 923 | − char[BTRFS_LABEL_SIZE]) | |
| 925 | +#define BTRFS_IOC_GET_FSLABEL FS_IOC_GETFSLABEL | |
| 926 | +#define BTRFS_IOC_SET_FSLABEL FS_IOC_SETFSLABEL | |
| 924 | 927 | #define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \ |
| 925 | 928 | struct btrfs_ioctl_get_dev_stats) |
| 926 | 929 | #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \ |
| @@ -300,7 +300,9 @@ · 299 unmodified lines | ||
| 300 | 300 | #define BTRFS_CSUM_SIZE 32 |
| 301 | 301 | |
| 302 | 302 | /* csum types */ |
| 303 | −#define BTRFS_CSUM_TYPE_CRC32 0 | |
| 303 | +enum btrfs_csum_type { | |
| 304 | + BTRFS_CSUM_TYPE_CRC32 = 0, | |
| 305 | +}; | |
| 304 | 306 | |
| 305 | 307 | /* |
| 306 | 308 | * flags definitions for directory entry item type |
| @@ -806,11 +808,6 @@ struct btrfs_dev_stats_item { · 499 unmodified lines | ||
| 806 | 808 | |
| 807 | 809 | #define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_ALWAYS 0 |
| 808 | 810 | #define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_AVOID 1 |
| 809 | −#define BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED 0 | |
| 810 | −#define BTRFS_DEV_REPLACE_ITEM_STATE_STARTED 1 | |
| 811 | −#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED 2 | |
| 812 | −#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED 3 | |
| 813 | −#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED 4 | |
| 814 | 811 | |
| 815 | 812 | struct btrfs_dev_replace_item { |
| 816 | 813 | /* |
| @@ -157,7 +157,8 @@ struct canfd_frame { · 156 unmodified lines | ||
| 157 | 157 | #define CAN_TP20 4 /* VAG Transport Protocol v2.0 */ |
| 158 | 158 | #define CAN_MCNET 5 /* Bosch MCNet */ |
| 159 | 159 | #define CAN_ISOTP 6 /* ISO 15765-2 Transport Protocol */ |
| 160 | −#define CAN_NPROTO 7 | |
| 160 | +#define CAN_J1939 7 /* SAE J1939 */ | |
| 161 | +#define CAN_NPROTO 8 | |
| 161 | 162 | |
| 162 | 163 | #define SOL_CAN_BASE 100 |
| 163 | 164 | |
| @@ -174,6 +175,23 @@ struct sockaddr_can { · 10 unmodified lines | ||
| 174 | 175 | /* transport protocol class address information (e.g. ISOTP) */ |
| 175 | 176 | struct { canid_t rx_id, tx_id; } tp; |
| 176 | 177 | |
| 178 | + /* J1939 address information */ | |
| 179 | + struct { | |
| 180 | + /* 8 byte name when using dynamic addressing */ | |
| 181 | + __u64 name; | |
| 182 | + | |
| 183 | + /* pgn: | |
| 184 | + * 8 bit: PS in PDU2 case, else 0 | |
| 185 | + * 8 bit: PF | |
| 186 | + * 1 bit: DP | |
| 187 | + * 1 bit: reserved | |
| 188 | + */ | |
| 189 | + __u32 pgn; | |
| 190 | + | |
| 191 | + /* 1 byte address */ | |
| 192 | + __u8 addr; | |
| 193 | + } j1939; | |
| 194 | + | |
| 177 | 195 | /* reserved for future CAN protocols address information */ |
| 178 | 196 | } can_addr; |
| 179 | 197 | }; |
| @@ -80,6 +80,10 @@ enum { · 79 unmodified lines | ||
| 80 | 80 | CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */ |
| 81 | 81 | CGW_LIM_HOPS, /* limit the number of hops of this specific rule */ |
| 82 | 82 | CGW_MOD_UID, /* user defined identifier for modification updates */ |
| 83 | + CGW_FDMOD_AND, /* CAN FD frame modification binary AND */ | |
| 84 | + CGW_FDMOD_OR, /* CAN FD frame modification binary OR */ | |
| 85 | + CGW_FDMOD_XOR, /* CAN FD frame modification binary XOR */ | |
| 86 | + CGW_FDMOD_SET, /* CAN FD frame modification set alternate values */ | |
| 83 | 87 | __CGW_MAX |
| 84 | 88 | }; |
| 85 | 89 | |
| @@ -88,15 +92,18 @@ enum { · 2 unmodified lines | ||
| 88 | 92 | #define CGW_FLAGS_CAN_ECHO 0x01 |
| 89 | 93 | #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02 |
| 90 | 94 | #define CGW_FLAGS_CAN_IIF_TX_OK 0x04 |
| 95 | +#define CGW_FLAGS_CAN_FD 0x08 | |
| 91 | 96 | |
| 92 | 97 | #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */ |
| 93 | 98 | |
| 94 | 99 | /* CAN frame elements that are affected by curr. 3 CAN frame modifications */ |
| 95 | 100 | #define CGW_MOD_ID 0x01 |
| 96 | −#define CGW_MOD_DLC 0x02 | |
| 101 | +#define CGW_MOD_DLC 0x02 /* contains the data length in bytes */ | |
| 102 | +#define CGW_MOD_LEN CGW_MOD_DLC /* CAN FD length representation */ | |
| 97 | 103 | #define CGW_MOD_DATA 0x04 |
| 104 | +#define CGW_MOD_FLAGS 0x08 /* CAN FD flags */ | |
| 98 | 105 | |
| 99 | −#define CGW_FRAME_MODS 3 /* ID DLC DATA */ | |
| 106 | +#define CGW_FRAME_MODS 4 /* ID DLC/LEN DATA FLAGS */ | |
| 100 | 107 | |
| 101 | 108 | #define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS) |
| 102 | 109 | |
| @@ -105,7 +112,13 @@ struct cgw_frame_mod { · 2 unmodified lines | ||
| 105 | 112 | __u8 modtype; |
| 106 | 113 | } __attribute__((packed)); |
| 107 | 114 | |
| 115 | +struct cgw_fdframe_mod { | |
| 116 | + struct canfd_frame cf; | |
| 117 | + __u8 modtype; | |
| 118 | +} __attribute__((packed)); | |
| 119 | + | |
| 108 | 120 | #define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod) |
| 121 | +#define CGW_FDMODATTR_LEN sizeof(struct cgw_fdframe_mod) | |
| 109 | 122 | |
| 110 | 123 | struct cgw_csum_xor { |
| 111 | 124 | __s8 from_idx; |
| @@ -0,0 +1,99 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | +/* | |
| 3 | + * j1939.h | |
| 4 | + * | |
| 5 | + * Copyright (c) 2010-2011 EIA Electronics | |
| 6 | + * | |
| 7 | + * This program is free software; you can redistribute it and/or modify | |
| 8 | + * it under the terms of the GNU General Public License version 2 as | |
| 9 | + * published by the Free Software Foundation. | |
| 10 | + */ | |
| 11 | + | |
| 12 | +#ifndef _UAPI_CAN_J1939_H_ | |
| 13 | +#define _UAPI_CAN_J1939_H_ | |
| 14 | + | |
| 15 | +#include <linux/types.h> | |
| 16 | +#include <linux/socket.h> | |
| 17 | +#include <linux/can.h> | |
| 18 | + | |
| 19 | +#define J1939_MAX_UNICAST_ADDR 0xfd | |
| 20 | +#define J1939_IDLE_ADDR 0xfe | |
| 21 | +#define J1939_NO_ADDR 0xff /* == broadcast or no addr */ | |
| 22 | +#define J1939_NO_NAME 0 | |
| 23 | +#define J1939_PGN_REQUEST 0x0ea00 /* Request PG */ | |
| 24 | +#define J1939_PGN_ADDRESS_CLAIMED 0x0ee00 /* Address Claimed */ | |
| 25 | +#define J1939_PGN_ADDRESS_COMMANDED 0x0fed8 /* Commanded Address */ | |
| 26 | +#define J1939_PGN_PDU1_MAX 0x3ff00 | |
| 27 | +#define J1939_PGN_MAX 0x3ffff | |
| 28 | +#define J1939_NO_PGN 0x40000 | |
| 29 | + | |
| 30 | +/* J1939 Parameter Group Number | |
| 31 | + * | |
| 32 | + * bit 0-7 : PDU Specific (PS) | |
| 33 | + * bit 8-15 : PDU Format (PF) | |
| 34 | + * bit 16 : Data Page (DP) | |
| 35 | + * bit 17 : Reserved (R) | |
| 36 | + * bit 19-31 : set to zero | |
| 37 | + */ | |
| 38 | +typedef __u32 pgn_t; | |
| 39 | + | |
| 40 | +/* J1939 Priority | |
| 41 | + * | |
| 42 | + * bit 0-2 : Priority (P) | |
| 43 | + * bit 3-7 : set to zero | |
| 44 | + */ | |
| 45 | +typedef __u8 priority_t; | |
| 46 | + | |
| 47 | +/* J1939 NAME | |
| 48 | + * | |
| 49 | + * bit 0-20 : Identity Number | |
| 50 | + * bit 21-31 : Manufacturer Code | |
| 51 | + * bit 32-34 : ECU Instance | |
| 52 | + * bit 35-39 : Function Instance | |
| 53 | + * bit 40-47 : Function | |
| 54 | + * bit 48 : Reserved | |
| 55 | + * bit 49-55 : Vehicle System | |
| 56 | + * bit 56-59 : Vehicle System Instance | |
| 57 | + * bit 60-62 : Industry Group | |
| 58 | + * bit 63 : Arbitrary Address Capable | |
| 59 | + */ | |
| 60 | +typedef __u64 name_t; | |
| 61 | + | |
| 62 | +/* J1939 socket options */ | |
| 63 | +#define SOL_CAN_J1939 (SOL_CAN_BASE + CAN_J1939) | |
| 64 | +enum { | |
| 65 | + SO_J1939_FILTER = 1, /* set filters */ | |
| 66 | + SO_J1939_PROMISC = 2, /* set/clr promiscuous mode */ | |
| 67 | + SO_J1939_SEND_PRIO = 3, | |
| 68 | + SO_J1939_ERRQUEUE = 4, | |
| 69 | +}; | |
| 70 | + | |
| 71 | +enum { | |
| 72 | + SCM_J1939_DEST_ADDR = 1, | |
| 73 | + SCM_J1939_DEST_NAME = 2, | |
| 74 | + SCM_J1939_PRIO = 3, | |
| 75 | + SCM_J1939_ERRQUEUE = 4, | |
| 76 | +}; | |
| 77 | + | |
| 78 | +enum { | |
| 79 | + J1939_NLA_PAD, | |
| 80 | + J1939_NLA_BYTES_ACKED, | |
| 81 | +}; | |
| 82 | + | |
| 83 | +enum { | |
| 84 | + J1939_EE_INFO_NONE, | |
| 85 | + J1939_EE_INFO_TX_ABORT, | |
| 86 | +}; | |
| 87 | + | |
| 88 | +struct j1939_filter { | |
| 89 | + name_t name; | |
| 90 | + name_t name_mask; | |
| 91 | + pgn_t pgn; | |
| 92 | + pgn_t pgn_mask; | |
| 93 | + __u8 addr; | |
| 94 | + __u8 addr_mask; | |
| 95 | +}; | |
| 96 | + | |
| 97 | +#define J1939_FILTER_MAX 512 /* maximum number of j1939_filter set via setsockopt() */ | |
| 98 | + | |
| 99 | +#endif /* !_UAPI_CAN_J1939_H_ */ | |
| @@ -40,15 +40,15 @@ struct can_bittiming { · 39 unmodified lines | ||
| 40 | 40 | }; |
| 41 | 41 | |
| 42 | 42 | /* |
| 43 | − * CAN harware-dependent bit-timing constant | |
| 43 | + * CAN hardware-dependent bit-timing constant | |
| 44 | 44 | * |
| 45 | 45 | * Used for calculating and checking bit-timing parameters |
| 46 | 46 | */ |
| 47 | 47 | struct can_bittiming_const { |
| 48 | 48 | char name[16]; /* Name of the CAN controller hardware */ |
| 49 | − __u32 tseg1_min; /* Time segement 1 = prop_seg + phase_seg1 */ | |
| 49 | + __u32 tseg1_min; /* Time segment 1 = prop_seg + phase_seg1 */ | |
| 50 | 50 | __u32 tseg1_max; |
| 51 | − __u32 tseg2_min; /* Time segement 2 = phase_seg2 */ | |
| 51 | + __u32 tseg2_min; /* Time segment 2 = phase_seg2 */ | |
| 52 | 52 | __u32 tseg2_max; |
| 53 | 53 | __u32 sjw_max; /* Synchronisation jump width */ |
| 54 | 54 | __u32 brp_min; /* Bit-rate prescaler */ |
| @@ -11,6 +11,9 @@ · 10 unmodified lines | ||
| 11 | 11 | more information about COFF, then O'Reilly has a very excellent book. |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | +#ifndef _UAPI_LINUX_COFF_H | |
| 15 | +#define _UAPI_LINUX_COFF_H | |
| 16 | + | |
| 14 | 17 | #define E_SYMNMLEN 8 /* Number of characters in a symbol name */ |
| 15 | 18 | #define E_FILNMLEN 14 /* Number of characters in a file name */ |
| 16 | 19 | #define E_DIMNUM 4 /* Number of array dimensions in auxiliary entry */ |
| @@ -350,3 +353,5 @@ struct COFF_reloc { · 333 unmodified lines | ||
| 350 | 353 | |
| 351 | 354 | /* For new sections we haven't heard of before */ |
| 352 | 355 | #define COFF_DEF_SECTION_ALIGNMENT 4 |
| 356 | + | |
| 357 | +#endif /* _UAPI_LINUX_COFF_H */ | |
| @@ -19,6 +19,9 @@ · 18 unmodified lines | ||
| 19 | 19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | +#ifndef _UAPI_LINUX_CRYPTOUSER_H | |
| 23 | +#define _UAPI_LINUX_CRYPTOUSER_H | |
| 24 | + | |
| 22 | 25 | #include <linux/types.h> |
| 23 | 26 | |
| 24 | 27 | /* Netlink configuration messages. */ |
| @@ -198,3 +201,5 @@ struct crypto_report_acomp { · 173 unmodified lines | ||
| 198 | 201 | |
| 199 | 202 | #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \ |
| 200 | 203 | sizeof(struct crypto_report_blkcipher)) |
| 204 | + | |
| 205 | +#endif /* _UAPI_LINUX_CRYPTOUSER_H */ | |
| @@ -107,6 +107,16 @@ enum devlink_command { · 106 unmodified lines | ||
| 107 | 107 | DEVLINK_CMD_FLASH_UPDATE_END, /* notification only */ |
| 108 | 108 | DEVLINK_CMD_FLASH_UPDATE_STATUS, /* notification only */ |
| 109 | 109 | |
| 110 | + DEVLINK_CMD_TRAP_GET, /* can dump */ | |
| 111 | + DEVLINK_CMD_TRAP_SET, | |
| 112 | + DEVLINK_CMD_TRAP_NEW, | |
| 113 | + DEVLINK_CMD_TRAP_DEL, | |
| 114 | + | |
| 115 | + DEVLINK_CMD_TRAP_GROUP_GET, /* can dump */ | |
| 116 | + DEVLINK_CMD_TRAP_GROUP_SET, | |
| 117 | + DEVLINK_CMD_TRAP_GROUP_NEW, | |
| 118 | + DEVLINK_CMD_TRAP_GROUP_DEL, | |
| 119 | + | |
| 110 | 120 | /* add new commands above here */ |
| 111 | 121 | __DEVLINK_CMD_MAX, |
| 112 | 122 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 |
| @@ -192,6 +202,56 @@ enum devlink_param_cmode { · 79 unmodified lines | ||
| 192 | 202 | enum devlink_param_fw_load_policy_value { |
| 193 | 203 | DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER, |
| 194 | 204 | DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH, |
| 205 | + DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK, | |
| 206 | + DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN, | |
| 207 | +}; | |
| 208 | + | |
| 209 | +enum devlink_param_reset_dev_on_drv_probe_value { | |
| 210 | + DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN, | |
| 211 | + DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS, | |
| 212 | + DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER, | |
| 213 | + DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK, | |
| 214 | +}; | |
| 215 | + | |
| 216 | +enum { | |
| 217 | + DEVLINK_ATTR_STATS_RX_PACKETS, /* u64 */ | |
| 218 | + DEVLINK_ATTR_STATS_RX_BYTES, /* u64 */ | |
| 219 | + | |
| 220 | + __DEVLINK_ATTR_STATS_MAX, | |
| 221 | + DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1 | |
| 222 | +}; | |
| 223 | + | |
| 224 | +/** | |
| 225 | + * enum devlink_trap_action - Packet trap action. | |
| 226 | + * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not | |
| 227 | + * sent to the CPU. | |
| 228 | + * @DEVLINK_TRAP_ACTION_TRAP: The sole copy of the packet is sent to the CPU. | |
| 229 | + */ | |
| 230 | +enum devlink_trap_action { | |
| 231 | + DEVLINK_TRAP_ACTION_DROP, | |
| 232 | + DEVLINK_TRAP_ACTION_TRAP, | |
| 233 | +}; | |
| 234 | + | |
| 235 | +/** | |
| 236 | + * enum devlink_trap_type - Packet trap type. | |
| 237 | + * @DEVLINK_TRAP_TYPE_DROP: Trap reason is a drop. Trapped packets are only | |
| 238 | + * processed by devlink and not injected to the | |
| 239 | + * kernel's Rx path. | |
| 240 | + * @DEVLINK_TRAP_TYPE_EXCEPTION: Trap reason is an exception. Packet was not | |
| 241 | + * forwarded as intended due to an exception | |
| 242 | + * (e.g., missing neighbour entry) and trapped to | |
| 243 | + * control plane for resolution. Trapped packets | |
| 244 | + * are processed by devlink and injected to | |
| 245 | + * the kernel's Rx path. | |
| 246 | + */ | |
| 247 | +enum devlink_trap_type { | |
| 248 | + DEVLINK_TRAP_TYPE_DROP, | |
| 249 | + DEVLINK_TRAP_TYPE_EXCEPTION, | |
| 250 | +}; | |
| 251 | + | |
| 252 | +enum { | |
| 253 | + /* Trap can report input port as metadata */ | |
| 254 | + DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT, | |
| 195 | 255 | }; |
| 196 | 256 | |
| 197 | 257 | enum devlink_attr { |
| @@ -348,6 +408,19 @@ enum devlink_attr { · 150 unmodified lines | ||
| 348 | 408 | DEVLINK_ATTR_PORT_PCI_PF_NUMBER, /* u16 */ |
| 349 | 409 | DEVLINK_ATTR_PORT_PCI_VF_NUMBER, /* u16 */ |
| 350 | 410 | |
| 411 | + DEVLINK_ATTR_STATS, /* nested */ | |
| 412 | + | |
| 413 | + DEVLINK_ATTR_TRAP_NAME, /* string */ | |
| 414 | + /* enum devlink_trap_action */ | |
| 415 | + DEVLINK_ATTR_TRAP_ACTION, /* u8 */ | |
| 416 | + /* enum devlink_trap_type */ | |
| 417 | + DEVLINK_ATTR_TRAP_TYPE, /* u8 */ | |
| 418 | + DEVLINK_ATTR_TRAP_GENERIC, /* flag */ | |
| 419 | + DEVLINK_ATTR_TRAP_METADATA, /* nested */ | |
| 420 | + DEVLINK_ATTR_TRAP_GROUP_NAME, /* string */ | |
| 421 | + | |
| 422 | + DEVLINK_ATTR_RELOAD_FAILED, /* u8 0 or 1 */ | |
| 423 | + | |
| 351 | 424 | /* add new attributes above here, update the policy in devlink.c */ |
| 352 | 425 | |
| 353 | 426 | __DEVLINK_ATTR_MAX, |
| @@ -243,6 +243,7 @@ enum { · 242 unmodified lines | ||
| 243 | 243 | DM_TARGET_MSG_CMD, |
| 244 | 244 | DM_DEV_SET_GEOMETRY_CMD, |
| 245 | 245 | DM_DEV_ARM_POLL_CMD, |
| 246 | + DM_GET_TARGET_VERSION_CMD, | |
| 246 | 247 | }; |
| 247 | 248 | |
| 248 | 249 | #define DM_IOCTL 0xfd |
| @@ -265,14 +266,15 @@ enum { · 16 unmodified lines | ||
| 265 | 266 | #define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl) |
| 266 | 267 | |
| 267 | 268 | #define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl) |
| 269 | +#define DM_GET_TARGET_VERSION _IOWR(DM_IOCTL, DM_GET_TARGET_VERSION_CMD, struct dm_ioctl) | |
| 268 | 270 | |
| 269 | 271 | #define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) |
| 270 | 272 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 271 | 273 | |
| 272 | 274 | #define DM_VERSION_MAJOR 4 |
| 273 | −#define DM_VERSION_MINOR 40 | |
| 275 | +#define DM_VERSION_MINOR 41 | |
| 274 | 276 | #define DM_VERSION_PATCHLEVEL 0 |
| 275 | −#define DM_VERSION_EXTRA "-ioctl (2019-01-18)" | |
| 277 | +#define DM_VERSION_EXTRA "-ioctl (2019-09-16)" | |
| 276 | 278 | |
| 277 | 279 | /* Status bits */ |
| 278 | 280 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -259,10 +259,32 @@ struct ethtool_tunable { · 258 unmodified lines | ||
| 259 | 259 | #define ETHTOOL_PHY_FAST_LINK_DOWN_ON 0 |
| 260 | 260 | #define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff |
| 261 | 261 | |
| 262 | +/* Energy Detect Power Down (EDPD) is a feature supported by some PHYs, where | |
| 263 | + * the PHY's RX & TX blocks are put into a low-power mode when there is no | |
| 264 | + * link detected (typically cable is un-plugged). For RX, only a minimal | |
| 265 | + * link-detection is available, and for TX the PHY wakes up to send link pulses | |
| 266 | + * to avoid any lock-ups in case the peer PHY may also be running in EDPD mode. | |
| 267 | + * | |
| 268 | + * Some PHYs may support configuration of the wake-up interval for TX pulses, | |
| 269 | + * and some PHYs may support only disabling TX pulses entirely. For the latter | |
| 270 | + * a special value is required (ETHTOOL_PHY_EDPD_NO_TX) so that this can be | |
| 271 | + * configured from userspace (should the user want it). | |
| 272 | + * | |
| 273 | + * The interval units for TX wake-up are in milliseconds, since this should | |
| 274 | + * cover a reasonable range of intervals: | |
| 275 | + * - from 1 millisecond, which does not sound like much of a power-saver | |
| 276 | + * - to ~65 seconds which is quite a lot to wait for a link to come up when | |
| 277 | + * plugging a cable | |
| 278 | + */ | |
| 279 | +#define ETHTOOL_PHY_EDPD_DFLT_TX_MSECS 0xffff | |
| 280 | +#define ETHTOOL_PHY_EDPD_NO_TX 0xfffe | |
| 281 | +#define ETHTOOL_PHY_EDPD_DISABLE 0 | |
| 282 | + | |
| 262 | 283 | enum phy_tunable_id { |
| 263 | 284 | ETHTOOL_PHY_ID_UNSPEC, |
| 264 | 285 | ETHTOOL_PHY_DOWNSHIFT, |
| 265 | 286 | ETHTOOL_PHY_FAST_LINK_DOWN, |
| 287 | + ETHTOOL_PHY_EDPD, | |
| 266 | 288 | /* |
| 267 | 289 | * Add your fresh new phy tunable attribute above and remember to update |
| 268 | 290 | * phy_tunable_strings[] in net/core/ethtool.c |
| @@ -176,4 +176,22 @@ struct dfl_fpga_fme_port_pr { · 175 unmodified lines | ||
| 176 | 176 | |
| 177 | 177 | #define DFL_FPGA_FME_PORT_PR _IO(DFL_FPGA_MAGIC, DFL_FME_BASE + 0) |
| 178 | 178 | |
| 179 | +/** | |
| 180 | + * DFL_FPGA_FME_PORT_RELEASE - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 1, | |
| 181 | + * int port_id) | |
| 182 | + * | |
| 183 | + * Driver releases the port per Port ID provided by caller. | |
| 184 | + * Return: 0 on success, -errno on failure. | |
| 185 | + */ | |
| 186 | +#define DFL_FPGA_FME_PORT_RELEASE _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 1, int) | |
| 187 | + | |
| 188 | +/** | |
| 189 | + * DFL_FPGA_FME_PORT_ASSIGN - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 2, | |
| 190 | + * int port_id) | |
| 191 | + * | |
| 192 | + * Driver assigns the port back per Port ID provided by caller. | |
| 193 | + * Return: 0 on success, -errno on failure. | |
| 194 | + */ | |
| 195 | +#define DFL_FPGA_FME_PORT_ASSIGN _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 2, int) | |
| 196 | + | |
| 179 | 197 | #endif /* _UAPI_LINUX_FPGA_DFL_H */ |
| @@ -13,6 +13,9 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <linux/limits.h> |
| 14 | 14 | #include <linux/ioctl.h> |
| 15 | 15 | #include <linux/types.h> |
| 16 | +#ifndef __KERNEL__ | |
| 17 | +#include <linux/fscrypt.h> | |
| 18 | +#endif | |
| 16 | 19 | |
| 17 | 20 | /* Use of MS_* flags within the kernel is restricted to core mount(2) code. */ |
| 18 | 21 | #if !defined(__KERNEL__) |
| @@ -212,57 +215,6 @@ struct fsxattr { · 193 unmodified lines | ||
| 212 | 215 | #define FS_IOC_GETFSLABEL _IOR(0x94, 49, char[FSLABEL_MAX]) |
| 213 | 216 | #define FS_IOC_SETFSLABEL _IOW(0x94, 50, char[FSLABEL_MAX]) |
| 214 | 217 | |
| 215 | −/* | |
| 216 | − * File system encryption support | |
| 217 | − */ | |
| 218 | −/* Policy provided via an ioctl on the topmost directory */ | |
| 219 | −#define FS_KEY_DESCRIPTOR_SIZE 8 | |
| 220 | − | |
| 221 | −#define FS_POLICY_FLAGS_PAD_4 0x00 | |
| 222 | −#define FS_POLICY_FLAGS_PAD_8 0x01 | |
| 223 | −#define FS_POLICY_FLAGS_PAD_16 0x02 | |
| 224 | −#define FS_POLICY_FLAGS_PAD_32 0x03 | |
| 225 | −#define FS_POLICY_FLAGS_PAD_MASK 0x03 | |
| 226 | −#define FS_POLICY_FLAG_DIRECT_KEY 0x04 /* use master key directly */ | |
| 227 | −#define FS_POLICY_FLAGS_VALID 0x07 | |
| 228 | − | |
| 229 | −/* Encryption algorithms */ | |
| 230 | −#define FS_ENCRYPTION_MODE_INVALID 0 | |
| 231 | −#define FS_ENCRYPTION_MODE_AES_256_XTS 1 | |
| 232 | −#define FS_ENCRYPTION_MODE_AES_256_GCM 2 | |
| 233 | −#define FS_ENCRYPTION_MODE_AES_256_CBC 3 | |
| 234 | −#define FS_ENCRYPTION_MODE_AES_256_CTS 4 | |
| 235 | −#define FS_ENCRYPTION_MODE_AES_128_CBC 5 | |
| 236 | −#define FS_ENCRYPTION_MODE_AES_128_CTS 6 | |
| 237 | −#define FS_ENCRYPTION_MODE_SPECK128_256_XTS 7 /* Removed, do not use. */ | |
| 238 | −#define FS_ENCRYPTION_MODE_SPECK128_256_CTS 8 /* Removed, do not use. */ | |
| 239 | −#define FS_ENCRYPTION_MODE_ADIANTUM 9 | |
| 240 | − | |
| 241 | −struct fscrypt_policy { | |
| 242 | − __u8 version; | |
| 243 | − __u8 contents_encryption_mode; | |
| 244 | − __u8 filenames_encryption_mode; | |
| 245 | − __u8 flags; | |
| 246 | − __u8 master_key_descriptor[FS_KEY_DESCRIPTOR_SIZE]; | |
| 247 | −}; | |
| 248 | − | |
| 249 | −#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy) | |
| 250 | −#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) | |
| 251 | −#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy) | |
| 252 | − | |
| 253 | −/* Parameters for passing an encryption key into the kernel keyring */ | |
| 254 | −#define FS_KEY_DESC_PREFIX "fscrypt:" | |
| 255 | −#define FS_KEY_DESC_PREFIX_SIZE 8 | |
| 256 | − | |
| 257 | −/* Structure that userspace passes to the kernel keyring */ | |
| 258 | −#define FS_MAX_KEY_SIZE 64 | |
| 259 | − | |
| 260 | −struct fscrypt_key { | |
| 261 | − __u32 mode; | |
| 262 | − __u8 raw[FS_MAX_KEY_SIZE]; | |
| 263 | − __u32 size; | |
| 264 | −}; | |
| 265 | − | |
| 266 | 218 | /* |
| 267 | 219 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) |
| 268 | 220 | * |
| @@ -306,11 +258,13 @@ struct fscrypt_key { · 37 unmodified lines | ||
| 306 | 258 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ |
| 307 | 259 | #define FS_HUGE_FILE_FL 0x00040000 /* Reserved for ext4 */ |
| 308 | 260 | #define FS_EXTENT_FL 0x00080000 /* Extents */ |
| 261 | +#define FS_VERITY_FL 0x00100000 /* Verity protected inode */ | |
| 309 | 262 | #define FS_EA_INODE_FL 0x00200000 /* Inode used for large EA */ |
| 310 | 263 | #define FS_EOFBLOCKS_FL 0x00400000 /* Reserved for ext4 */ |
| 311 | 264 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ |
| 312 | 265 | #define FS_INLINE_DATA_FL 0x10000000 /* Reserved for ext4 */ |
| 313 | 266 | #define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */ |
| 267 | +#define FS_CASEFOLD_FL 0x40000000 /* Folder is case insensitive */ | |
| 314 | 268 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ |
| 315 | 269 | |
| 316 | 270 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ |
| @@ -0,0 +1,181 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | +/* | |
| 3 | + * fscrypt user API | |
| 4 | + * | |
| 5 | + * These ioctls can be used on filesystems that support fscrypt. See the | |
| 6 | + * "User API" section of Documentation/filesystems/fscrypt.rst. | |
| 7 | + */ | |
| 8 | +#ifndef _UAPI_LINUX_FSCRYPT_H | |
| 9 | +#define _UAPI_LINUX_FSCRYPT_H | |
| 10 | + | |
| 11 | +#include <linux/types.h> | |
| 12 | + | |
| 13 | +/* Encryption policy flags */ | |
| 14 | +#define FSCRYPT_POLICY_FLAGS_PAD_4 0x00 | |
| 15 | +#define FSCRYPT_POLICY_FLAGS_PAD_8 0x01 | |
| 16 | +#define FSCRYPT_POLICY_FLAGS_PAD_16 0x02 | |
| 17 | +#define FSCRYPT_POLICY_FLAGS_PAD_32 0x03 | |
| 18 | +#define FSCRYPT_POLICY_FLAGS_PAD_MASK 0x03 | |
| 19 | +#define FSCRYPT_POLICY_FLAG_DIRECT_KEY 0x04 | |
| 20 | +#define FSCRYPT_POLICY_FLAGS_VALID 0x07 | |
| 21 | + | |
| 22 | +/* Encryption algorithms */ | |
| 23 | +#define FSCRYPT_MODE_AES_256_XTS 1 | |
| 24 | +#define FSCRYPT_MODE_AES_256_CTS 4 | |
| 25 | +#define FSCRYPT_MODE_AES_128_CBC 5 | |
| 26 | +#define FSCRYPT_MODE_AES_128_CTS 6 | |
| 27 | +#define FSCRYPT_MODE_ADIANTUM 9 | |
| 28 | +#define __FSCRYPT_MODE_MAX 9 | |
| 29 | + | |
| 30 | +/* | |
| 31 | + * Legacy policy version; ad-hoc KDF and no key verification. | |
| 32 | + * For new encrypted directories, use fscrypt_policy_v2 instead. | |
| 33 | + * | |
| 34 | + * Careful: the .version field for this is actually 0, not 1. | |
| 35 | + */ | |
| 36 | +#define FSCRYPT_POLICY_V1 0 | |
| 37 | +#define FSCRYPT_KEY_DESCRIPTOR_SIZE 8 | |
| 38 | +struct fscrypt_policy_v1 { | |
| 39 | + __u8 version; | |
| 40 | + __u8 contents_encryption_mode; | |
| 41 | + __u8 filenames_encryption_mode; | |
| 42 | + __u8 flags; | |
| 43 | + __u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE]; | |
| 44 | +}; | |
| 45 | +#define fscrypt_policy fscrypt_policy_v1 | |
| 46 | + | |
| 47 | +/* | |
| 48 | + * Process-subscribed "logon" key description prefix and payload format. | |
| 49 | + * Deprecated; prefer FS_IOC_ADD_ENCRYPTION_KEY instead. | |
| 50 | + */ | |
| 51 | +#define FSCRYPT_KEY_DESC_PREFIX "fscrypt:" | |
| 52 | +#define FSCRYPT_KEY_DESC_PREFIX_SIZE 8 | |
| 53 | +#define FSCRYPT_MAX_KEY_SIZE 64 | |
| 54 | +struct fscrypt_key { | |
| 55 | + __u32 mode; | |
| 56 | + __u8 raw[FSCRYPT_MAX_KEY_SIZE]; | |
| 57 | + __u32 size; | |
| 58 | +}; | |
| 59 | + | |
| 60 | +/* | |
| 61 | + * New policy version with HKDF and key verification (recommended). | |
| 62 | + */ | |
| 63 | +#define FSCRYPT_POLICY_V2 2 | |
| 64 | +#define FSCRYPT_KEY_IDENTIFIER_SIZE 16 | |
| 65 | +struct fscrypt_policy_v2 { | |
| 66 | + __u8 version; | |
| 67 | + __u8 contents_encryption_mode; | |
| 68 | + __u8 filenames_encryption_mode; | |
| 69 | + __u8 flags; | |
| 70 | + __u8 __reserved[4]; | |
| 71 | + __u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; | |
| 72 | +}; | |
| 73 | + | |
| 74 | +/* Struct passed to FS_IOC_GET_ENCRYPTION_POLICY_EX */ | |
| 75 | +struct fscrypt_get_policy_ex_arg { | |
| 76 | + __u64 policy_size; /* input/output */ | |
| 77 | + union { | |
| 78 | + __u8 version; | |
| 79 | + struct fscrypt_policy_v1 v1; | |
| 80 | + struct fscrypt_policy_v2 v2; | |
| 81 | + } policy; /* output */ | |
| 82 | +}; | |
| 83 | + | |
| 84 | +/* | |
| 85 | + * v1 policy keys are specified by an arbitrary 8-byte key "descriptor", | |
| 86 | + * matching fscrypt_policy_v1::master_key_descriptor. | |
| 87 | + */ | |
| 88 | +#define FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR 1 | |
| 89 | + | |
| 90 | +/* | |
| 91 | + * v2 policy keys are specified by a 16-byte key "identifier" which the kernel | |
| 92 | + * calculates as a cryptographic hash of the key itself, | |
| 93 | + * matching fscrypt_policy_v2::master_key_identifier. | |
| 94 | + */ | |
| 95 | +#define FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER 2 | |
| 96 | + | |
| 97 | +/* | |
| 98 | + * Specifies a key, either for v1 or v2 policies. This doesn't contain the | |
| 99 | + * actual key itself; this is just the "name" of the key. | |
| 100 | + */ | |
| 101 | +struct fscrypt_key_specifier { | |
| 102 | + __u32 type; /* one of FSCRYPT_KEY_SPEC_TYPE_* */ | |
| 103 | + __u32 __reserved; | |
| 104 | + union { | |
| 105 | + __u8 __reserved[32]; /* reserve some extra space */ | |
| 106 | + __u8 descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE]; | |
| 107 | + __u8 identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; | |
| 108 | + } u; | |
| 109 | +}; | |
| 110 | + | |
| 111 | +/* Struct passed to FS_IOC_ADD_ENCRYPTION_KEY */ | |
| 112 | +struct fscrypt_add_key_arg { | |
| 113 | + struct fscrypt_key_specifier key_spec; | |
| 114 | + __u32 raw_size; | |
| 115 | + __u32 __reserved[9]; | |
| 116 | + __u8 raw[]; | |
| 117 | +}; | |
| 118 | + | |
| 119 | +/* Struct passed to FS_IOC_REMOVE_ENCRYPTION_KEY */ | |
| 120 | +struct fscrypt_remove_key_arg { | |
| 121 | + struct fscrypt_key_specifier key_spec; | |
| 122 | +#define FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY 0x00000001 | |
| 123 | +#define FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS 0x00000002 | |
| 124 | + __u32 removal_status_flags; /* output */ | |
| 125 | + __u32 __reserved[5]; | |
| 126 | +}; | |
| 127 | + | |
| 128 | +/* Struct passed to FS_IOC_GET_ENCRYPTION_KEY_STATUS */ | |
| 129 | +struct fscrypt_get_key_status_arg { | |
| 130 | + /* input */ | |
| 131 | + struct fscrypt_key_specifier key_spec; | |
| 132 | + __u32 __reserved[6]; | |
| 133 | + | |
| 134 | + /* output */ | |
| 135 | +#define FSCRYPT_KEY_STATUS_ABSENT 1 | |
| 136 | +#define FSCRYPT_KEY_STATUS_PRESENT 2 | |
| 137 | +#define FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED 3 | |
| 138 | + __u32 status; | |
| 139 | +#define FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF 0x00000001 | |
| 140 | + __u32 status_flags; | |
| 141 | + __u32 user_count; | |
| 142 | + __u32 __out_reserved[13]; | |
| 143 | +}; | |
| 144 | + | |
| 145 | +#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy) | |
| 146 | +#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) | |
| 147 | +#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy) | |
| 148 | +#define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9]) /* size + version */ | |
| 149 | +#define FS_IOC_ADD_ENCRYPTION_KEY _IOWR('f', 23, struct fscrypt_add_key_arg) | |
| 150 | +#define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg) | |
| 151 | +#define FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS _IOWR('f', 25, struct fscrypt_remove_key_arg) | |
| 152 | +#define FS_IOC_GET_ENCRYPTION_KEY_STATUS _IOWR('f', 26, struct fscrypt_get_key_status_arg) | |
| 153 | + | |
| 154 | +/**********************************************************************/ | |
| 155 | + | |
| 156 | +/* old names; don't add anything new here! */ | |
| 157 | +#ifndef __KERNEL__ | |
| 158 | +#define FS_KEY_DESCRIPTOR_SIZE FSCRYPT_KEY_DESCRIPTOR_SIZE | |
| 159 | +#define FS_POLICY_FLAGS_PAD_4 FSCRYPT_POLICY_FLAGS_PAD_4 | |
| 160 | +#define FS_POLICY_FLAGS_PAD_8 FSCRYPT_POLICY_FLAGS_PAD_8 | |
| 161 | +#define FS_POLICY_FLAGS_PAD_16 FSCRYPT_POLICY_FLAGS_PAD_16 | |
| 162 | +#define FS_POLICY_FLAGS_PAD_32 FSCRYPT_POLICY_FLAGS_PAD_32 | |
| 163 | +#define FS_POLICY_FLAGS_PAD_MASK FSCRYPT_POLICY_FLAGS_PAD_MASK | |
| 164 | +#define FS_POLICY_FLAG_DIRECT_KEY FSCRYPT_POLICY_FLAG_DIRECT_KEY | |
| 165 | +#define FS_POLICY_FLAGS_VALID FSCRYPT_POLICY_FLAGS_VALID | |
| 166 | +#define FS_ENCRYPTION_MODE_INVALID 0 /* never used */ | |
| 167 | +#define FS_ENCRYPTION_MODE_AES_256_XTS FSCRYPT_MODE_AES_256_XTS | |
| 168 | +#define FS_ENCRYPTION_MODE_AES_256_GCM 2 /* never used */ | |
| 169 | +#define FS_ENCRYPTION_MODE_AES_256_CBC 3 /* never used */ | |
| 170 | +#define FS_ENCRYPTION_MODE_AES_256_CTS FSCRYPT_MODE_AES_256_CTS | |
| 171 | +#define FS_ENCRYPTION_MODE_AES_128_CBC FSCRYPT_MODE_AES_128_CBC | |
| 172 | +#define FS_ENCRYPTION_MODE_AES_128_CTS FSCRYPT_MODE_AES_128_CTS | |
| 173 | +#define FS_ENCRYPTION_MODE_SPECK128_256_XTS 7 /* removed */ | |
| 174 | +#define FS_ENCRYPTION_MODE_SPECK128_256_CTS 8 /* removed */ | |
| 175 | +#define FS_ENCRYPTION_MODE_ADIANTUM FSCRYPT_MODE_ADIANTUM | |
| 176 | +#define FS_KEY_DESC_PREFIX FSCRYPT_KEY_DESC_PREFIX | |
| 177 | +#define FS_KEY_DESC_PREFIX_SIZE FSCRYPT_KEY_DESC_PREFIX_SIZE | |
| 178 | +#define FS_MAX_KEY_SIZE FSCRYPT_MAX_KEY_SIZE | |
| 179 | +#endif /* !__KERNEL__ */ | |
| 180 | + | |
| 181 | +#endif /* _UAPI_LINUX_FSCRYPT_H */ | |
| @@ -0,0 +1,40 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | +/* | |
| 3 | + * fs-verity user API | |
| 4 | + * | |
| 5 | + * These ioctls can be used on filesystems that support fs-verity. See the | |
| 6 | + * "User API" section of Documentation/filesystems/fsverity.rst. | |
| 7 | + * | |
| 8 | + * Copyright 2019 Google LLC | |
| 9 | + */ | |
| 10 | +#ifndef _UAPI_LINUX_FSVERITY_H | |
| 11 | +#define _UAPI_LINUX_FSVERITY_H | |
| 12 | + | |
| 13 | +#include <linux/ioctl.h> | |
| 14 | +#include <linux/types.h> | |
| 15 | + | |
| 16 | +#define FS_VERITY_HASH_ALG_SHA256 1 | |
| 17 | +#define FS_VERITY_HASH_ALG_SHA512 2 | |
| 18 | + | |
| 19 | +struct fsverity_enable_arg { | |
| 20 | + __u32 version; | |
| 21 | + __u32 hash_algorithm; | |
| 22 | + __u32 block_size; | |
| 23 | + __u32 salt_size; | |
| 24 | + __u64 salt_ptr; | |
| 25 | + __u32 sig_size; | |
| 26 | + __u32 __reserved1; | |
| 27 | + __u64 sig_ptr; | |
| 28 | + __u64 __reserved2[11]; | |
| 29 | +}; | |
| 30 | + | |
| 31 | +struct fsverity_digest { | |
| 32 | + __u16 digest_algorithm; | |
| 33 | + __u16 digest_size; /* input/output */ | |
| 34 | + __u8 digest[]; | |
| 35 | +}; | |
| 36 | + | |
| 37 | +#define FS_IOC_ENABLE_VERITY _IOW('f', 133, struct fsverity_enable_arg) | |
| 38 | +#define FS_IOC_MEASURE_VERITY _IOWR('f', 134, struct fsverity_digest) | |
| 39 | + | |
| 40 | +#endif /* _UAPI_LINUX_FSVERITY_H */ | |
| @@ -133,6 +133,8 @@ · 132 unmodified lines | ||
| 133 | 133 | * |
| 134 | 134 | * 7.31 |
| 135 | 135 | * - add FUSE_WRITE_KILL_PRIV flag |
| 136 | + * - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING | |
| 137 | + * - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag | |
| 136 | 138 | */ |
| 137 | 139 | |
| 138 | 140 | #ifndef _LINUX_FUSE_H |
| @@ -274,6 +276,7 @@ struct fuse_file_lock { · 135 unmodified lines | ||
| 274 | 276 | * FUSE_CACHE_SYMLINKS: cache READLINK responses |
| 275 | 277 | * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir |
| 276 | 278 | * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request |
| 279 | + * FUSE_MAP_ALIGNMENT: map_alignment field is valid | |
| 277 | 280 | */ |
| 278 | 281 | #define FUSE_ASYNC_READ (1 << 0) |
| 279 | 282 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -301,6 +304,7 @@ struct fuse_file_lock { · 21 unmodified lines | ||
| 301 | 304 | #define FUSE_CACHE_SYMLINKS (1 << 23) |
| 302 | 305 | #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) |
| 303 | 306 | #define FUSE_EXPLICIT_INVAL_DATA (1 << 25) |
| 307 | +#define FUSE_MAP_ALIGNMENT (1 << 26) | |
| 304 | 308 | |
| 305 | 309 | /** |
| 306 | 310 | * CUSE INIT request/reply flags |
| @@ -422,9 +426,15 @@ enum fuse_opcode { · 115 unmodified lines | ||
| 422 | 426 | FUSE_RENAME2 = 45, |
| 423 | 427 | FUSE_LSEEK = 46, |
| 424 | 428 | FUSE_COPY_FILE_RANGE = 47, |
| 429 | + FUSE_SETUPMAPPING = 48, | |
| 430 | + FUSE_REMOVEMAPPING = 49, | |
| 425 | 431 | |
| 426 | 432 | /* CUSE specific operations */ |
| 427 | 433 | CUSE_INIT = 4096, |
| 434 | + | |
| 435 | + /* Reserved opcodes: helpful to detect structure endian-ness */ | |
| 436 | + CUSE_INIT_BSWAP_RESERVED = 1048576, /* CUSE_INIT << 8 */ | |
| 437 | + FUSE_INIT_BSWAP_RESERVED = 436207616, /* FUSE_INIT << 24 */ | |
| 428 | 438 | }; |
| 429 | 439 | |
| 430 | 440 | enum fuse_notify_code { |
| @@ -652,7 +662,7 @@ struct fuse_init_out { · 221 unmodified lines | ||
| 652 | 662 | uint32_t max_write; |
| 653 | 663 | uint32_t time_gran; |
| 654 | 664 | uint16_t max_pages; |
| 655 | − uint16_t padding; | |
| 665 | + uint16_t map_alignment; | |
| 656 | 666 | uint32_t unused[8]; |
| 657 | 667 | }; |
| 658 | 668 | |
| @@ -37,5 +37,7 @@ struct gsm_netconfig { · 36 unmodified lines | ||
| 37 | 37 | #define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig) |
| 38 | 38 | #define GSMIOC_DISABLE_NET _IO('G', 3) |
| 39 | 39 | |
| 40 | +/* get the base tty number for a configured gsmmux tty */ | |
| 41 | +#define GSMIOC_GETFIRST _IOR('G', 4, __u32) | |
| 40 | 42 | |
| 41 | 43 | #endif |
| @@ -237,6 +237,7 @@ struct br_mdb_entry { · 236 unmodified lines | ||
| 237 | 237 | #define MDB_PERMANENT 1 |
| 238 | 238 | __u8 state; |
| 239 | 239 | #define MDB_FLAGS_OFFLOAD (1 << 0) |
| 240 | +#define MDB_FLAGS_FAST_LEAVE (1 << 1) | |
| 240 | 241 | __u8 flags; |
| 241 | 242 | __u16 vid; |
| 242 | 243 | struct { |
| @@ -16,6 +16,18 @@ · 15 unmodified lines | ||
| 16 | 16 | #define XDP_SHARED_UMEM (1 << 0) |
| 17 | 17 | #define XDP_COPY (1 << 1) /* Force copy-mode */ |
| 18 | 18 | #define XDP_ZEROCOPY (1 << 2) /* Force zero-copy mode */ |
| 19 | +/* If this option is set, the driver might go sleep and in that case | |
| 20 | + * the XDP_RING_NEED_WAKEUP flag in the fill and/or Tx rings will be | |
| 21 | + * set. If it is set, the application need to explicitly wake up the | |
| 22 | + * driver with a poll() (Rx and Tx) or sendto() (Tx only). If you are | |
| 23 | + * running the driver and the application on the same core, you should | |
| 24 | + * use this option so that the kernel will yield to the user space | |
| 25 | + * application. | |
| 26 | + */ | |
| 27 | +#define XDP_USE_NEED_WAKEUP (1 << 3) | |
| 28 | + | |
| 29 | +/* Flags for xsk_umem_config flags */ | |
| 30 | +#define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) | |
| 19 | 31 | |
| 20 | 32 | struct sockaddr_xdp { |
| 21 | 33 | __u16 sxdp_family; |
| @@ -25,10 +37,14 @@ struct sockaddr_xdp { · 3 unmodified lines | ||
| 25 | 37 | __u32 sxdp_shared_umem_fd; |
| 26 | 38 | }; |
| 27 | 39 | |
| 40 | +/* XDP_RING flags */ | |
| 41 | +#define XDP_RING_NEED_WAKEUP (1 << 0) | |
| 42 | + | |
| 28 | 43 | struct xdp_ring_offset { |
| 29 | 44 | __u64 producer; |
| 30 | 45 | __u64 consumer; |
| 31 | 46 | __u64 desc; |
| 47 | + __u64 flags; | |
| 32 | 48 | }; |
| 33 | 49 | |
| 34 | 50 | struct xdp_mmap_offsets { |
| @@ -53,6 +69,7 @@ struct xdp_umem_reg { · 18 unmodified lines | ||
| 53 | 69 | __u64 len; /* Length of packet data area */ |
| 54 | 70 | __u32 chunk_size; |
| 55 | 71 | __u32 headroom; |
| 72 | + __u32 flags; | |
| 56 | 73 | }; |
| 57 | 74 | |
| 58 | 75 | struct xdp_statistics { |
| @@ -74,6 +91,11 @@ struct xdp_options { · 15 unmodified lines | ||
| 74 | 91 | #define XDP_UMEM_PGOFF_FILL_RING 0x100000000ULL |
| 75 | 92 | #define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000ULL |
| 76 | 93 | |
| 94 | +/* Masks for unaligned chunks mode */ | |
| 95 | +#define XSK_UNALIGNED_BUF_OFFSET_SHIFT 48 | |
| 96 | +#define XSK_UNALIGNED_BUF_ADDR_MASK \ | |
| 97 | + ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1) | |
| 98 | + | |
| 77 | 99 | /* Rx/Tx descriptor */ |
| 78 | 100 | struct xdp_desc { |
| 79 | 101 | __u64 addr; |
| @@ -153,11 +153,20 @@ enum { · 152 unmodified lines | ||
| 153 | 153 | INET_DIAG_BBRINFO, /* request as INET_DIAG_VEGASINFO */ |
| 154 | 154 | INET_DIAG_CLASS_ID, /* request as INET_DIAG_TCLASS */ |
| 155 | 155 | INET_DIAG_MD5SIG, |
| 156 | + INET_DIAG_ULP_INFO, | |
| 156 | 157 | __INET_DIAG_MAX, |
| 157 | 158 | }; |
| 158 | 159 | |
| 159 | 160 | #define INET_DIAG_MAX (__INET_DIAG_MAX - 1) |
| 160 | 161 | |
| 162 | +enum { | |
| 163 | + INET_ULP_INFO_UNSPEC, | |
| 164 | + INET_ULP_INFO_NAME, | |
| 165 | + INET_ULP_INFO_TLS, | |
| 166 | + __INET_ULP_INFO_MAX, | |
| 167 | +}; | |
| 168 | +#define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1) | |
| 169 | + | |
| 161 | 170 | /* INET_DIAG_MEM */ |
| 162 | 171 | |
| 163 | 172 | struct inet_diag_meminfo { |
| @@ -28,6 +28,7 @@ struct io_uring_sqe { · 27 unmodified lines | ||
| 28 | 28 | __u16 poll_events; |
| 29 | 29 | __u32 sync_range_flags; |
| 30 | 30 | __u32 msg_flags; |
| 31 | + __u32 timeout_flags; | |
| 31 | 32 | }; |
| 32 | 33 | __u64 user_data; /* data to be passed back at completion time */ |
| 33 | 34 | union { |
| @@ -61,6 +62,7 @@ struct io_uring_sqe { · 27 unmodified lines | ||
| 61 | 62 | #define IORING_OP_SYNC_FILE_RANGE 8 |
| 62 | 63 | #define IORING_OP_SENDMSG 9 |
| 63 | 64 | #define IORING_OP_RECVMSG 10 |
| 65 | +#define IORING_OP_TIMEOUT 11 | |
| 64 | 66 | |
| 65 | 67 | /* |
| 66 | 68 | * sqe->fsync_flags |
| @@ -128,11 +130,17 @@ struct io_uring_params { · 61 unmodified lines | ||
| 128 | 130 | __u32 flags; |
| 129 | 131 | __u32 sq_thread_cpu; |
| 130 | 132 | __u32 sq_thread_idle; |
| 131 | − __u32 resv[5]; | |
| 133 | + __u32 features; | |
| 134 | + __u32 resv[4]; | |
| 132 | 135 | struct io_sqring_offsets sq_off; |
| 133 | 136 | struct io_cqring_offsets cq_off; |
| 134 | 137 | }; |
| 135 | 138 | |
| 139 | +/* | |
| 140 | + * io_uring_params->features flags | |
| 141 | + */ | |
| 142 | +#define IORING_FEAT_SINGLE_MMAP (1U << 0) | |
| 143 | + | |
| 136 | 144 | /* |
| 137 | 145 | * io_uring_register(2) opcodes and arguments |
| 138 | 146 | */ |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | /* |
| 3 | 3 | * Copyright (c) 2015-2018, Intel Corporation. |
| 4 | 4 | */ |
| @@ -16,6 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #define CAPI_MSG_BASELEN 8 |
| 17 | 17 | #define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2) |
| 18 | 18 | #define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2) |
| 19 | +#define CAPI_DISCONNECT_B3_RESP_LEN (CAPI_MSG_BASELEN+4) | |
| 19 | 20 | |
| 20 | 21 | /*----- CAPI commands -----*/ |
| 21 | 22 | #define CAPI_ALERT 0x01 |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | /* |
| 3 | 3 | * Intel Speed Select Interface: OS to hardware Interface |
| 4 | 4 | * Copyright (c) 2019, Intel Corporation. |
| @@ -77,11 +77,6 @@ · 76 unmodified lines | ||
| 77 | 77 | |
| 78 | 78 | #define JFFS2_ACL_VERSION 0x0001 |
| 79 | 79 | |
| 80 | −// Maybe later... | |
| 81 | −//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) | |
| 82 | −//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) | |
| 83 | − | |
| 84 | − | |
| 85 | 80 | #define JFFS2_INO_FLAG_PREREAD 1 /* Do read_inode() for this one at |
| 86 | 81 | mount time, don't wait for it to |
| 87 | 82 | happen later */ |
| @@ -31,6 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | #define KEXEC_ARCH_DEFAULT ( 0 << 16) |
| 32 | 32 | #define KEXEC_ARCH_386 ( 3 << 16) |
| 33 | 33 | #define KEXEC_ARCH_68K ( 4 << 16) |
| 34 | +#define KEXEC_ARCH_PARISC (15 << 16) | |
| 34 | 35 | #define KEXEC_ARCH_X86_64 (62 << 16) |
| 35 | 36 | #define KEXEC_ARCH_PPC (20 << 16) |
| 36 | 37 | #define KEXEC_ARCH_PPC64 (21 << 16) |
| @@ -410,21 +410,6 @@ struct kfd_ioctl_unmap_memory_from_gpu_args { · 409 unmodified lines | ||
| 410 | 410 | __u32 n_success; /* to/from KFD */ |
| 411 | 411 | }; |
| 412 | 412 | |
| 413 | −/* Allocate GWS for specific queue | |
| 414 | − * | |
| 415 | − * @gpu_id: device identifier | |
| 416 | − * @queue_id: queue's id that GWS is allocated for | |
| 417 | − * @num_gws: how many GWS to allocate | |
| 418 | − * @first_gws: index of the first GWS allocated. | |
| 419 | − * only support contiguous GWS allocation | |
| 420 | − */ | |
| 421 | −struct kfd_ioctl_alloc_queue_gws_args { | |
| 422 | − __u32 gpu_id; /* to KFD */ | |
| 423 | − __u32 queue_id; /* to KFD */ | |
| 424 | − __u32 num_gws; /* to KFD */ | |
| 425 | − __u32 first_gws; /* from KFD */ | |
| 426 | −}; | |
| 427 | − | |
| 428 | 413 | struct kfd_ioctl_get_dmabuf_info_args { |
| 429 | 414 | __u64 size; /* from KFD */ |
| 430 | 415 | __u64 metadata_ptr; /* to KFD */ |
| @@ -544,10 +529,7 @@ enum kfd_mmio_remap { · 113 unmodified lines | ||
| 544 | 529 | #define AMDKFD_IOC_IMPORT_DMABUF \ |
| 545 | 530 | AMDKFD_IOWR(0x1D, struct kfd_ioctl_import_dmabuf_args) |
| 546 | 531 | |
| 547 | −#define AMDKFD_IOC_ALLOC_QUEUE_GWS \ | |
| 548 | − AMDKFD_IOWR(0x1E, struct kfd_ioctl_alloc_queue_gws_args) | |
| 549 | − | |
| 550 | 532 | #define AMDKFD_COMMAND_START 0x01 |
| 551 | −#define AMDKFD_COMMAND_END 0x1F | |
| 533 | +#define AMDKFD_COMMAND_END 0x1E | |
| 552 | 534 | |
| 553 | 535 | #endif |
| @@ -116,7 +116,7 @@ struct kvm_irq_level { · 115 unmodified lines | ||
| 116 | 116 | * ACPI gsi notion of irq. |
| 117 | 117 | * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47.. |
| 118 | 118 | * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23.. |
| 119 | − * For ARM: See Documentation/virtual/kvm/api.txt | |
| 119 | + * For ARM: See Documentation/virt/kvm/api.txt | |
| 120 | 120 | */ |
| 121 | 121 | union { |
| 122 | 122 | __u32 irq; |
| @@ -243,6 +243,8 @@ struct kvm_hyperv_exit { · 120 unmodified lines | ||
| 243 | 243 | #define KVM_INTERNAL_ERROR_SIMUL_EX 2 |
| 244 | 244 | /* Encounter unexpected vm-exit due to delivery event. */ |
| 245 | 245 | #define KVM_INTERNAL_ERROR_DELIVERY_EV 3 |
| 246 | +/* Encounter unexpected vm-exit reason */ | |
| 247 | +#define KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON 4 | |
| 246 | 248 | |
| 247 | 249 | /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ |
| 248 | 250 | struct kvm_run { |
| @@ -996,6 +998,8 @@ struct kvm_ppc_resize_hpt { · 747 unmodified lines | ||
| 996 | 998 | #define KVM_CAP_ARM_PTRAUTH_ADDRESS 171 |
| 997 | 999 | #define KVM_CAP_ARM_PTRAUTH_GENERIC 172 |
| 998 | 1000 | #define KVM_CAP_PMU_EVENT_FILTER 173 |
| 1001 | +#define KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 174 | |
| 1002 | +#define KVM_CAP_HYPERV_DIRECT_TLBFLUSH 175 | |
| 999 | 1003 | |
| 1000 | 1004 | #ifdef KVM_CAP_IRQ_ROUTING |
| 1001 | 1005 | |
| @@ -1086,7 +1090,7 @@ struct kvm_xen_hvm_config { · 84 unmodified lines | ||
| 1086 | 1090 | * |
| 1087 | 1091 | * KVM_IRQFD_FLAG_RESAMPLE indicates resamplefd is valid and specifies |
| 1088 | 1092 | * the irqfd to operate in resampling mode for level triggered interrupt |
| 1089 | − * emulation. See Documentation/virtual/kvm/api.txt. | |
| 1093 | + * emulation. See Documentation/virt/kvm/api.txt. | |
| 1090 | 1094 | */ |
| 1091 | 1095 | #define KVM_IRQFD_FLAG_RESAMPLE (1 << 1) |
| 1092 | 1096 | |
| @@ -1142,6 +1146,7 @@ struct kvm_dirty_tlb { · 49 unmodified lines | ||
| 1142 | 1146 | #define KVM_REG_S390 0x5000000000000000ULL |
| 1143 | 1147 | #define KVM_REG_ARM64 0x6000000000000000ULL |
| 1144 | 1148 | #define KVM_REG_MIPS 0x7000000000000000ULL |
| 1149 | +#define KVM_REG_RISCV 0x8000000000000000ULL | |
| 1145 | 1150 | |
| 1146 | 1151 | #define KVM_REG_SIZE_SHIFT 52 |
| 1147 | 1152 | #define KVM_REG_SIZE_MASK 0x00f0000000000000ULL |
| @@ -19,6 +19,7 @@ · 18 unmodified lines | ||
| 19 | 19 | #define SQUASHFS_MAGIC 0x73717368 |
| 20 | 20 | #define ECRYPTFS_SUPER_MAGIC 0xf15f |
| 21 | 21 | #define EFS_SUPER_MAGIC 0x414A53 |
| 22 | +#define EROFS_SUPER_MAGIC_V1 0xE0F5E1E2 | |
| 22 | 23 | #define EXT2_SUPER_MAGIC 0xEF53 |
| 23 | 24 | #define EXT3_SUPER_MAGIC 0xEF53 |
| 24 | 25 | #define XENFS_SUPER_MAGIC 0xabba1974 |
| @@ -45,11 +45,14 @@ · 44 unmodified lines | ||
| 45 | 45 | #define MDIO_AN_ADVERTISE 16 /* AN advertising (base page) */ |
| 46 | 46 | #define MDIO_AN_LPA 19 /* AN LP abilities (base page) */ |
| 47 | 47 | #define MDIO_PCS_EEE_ABLE 20 /* EEE Capability register */ |
| 48 | +#define MDIO_PCS_EEE_ABLE2 21 /* EEE Capability register 2 */ | |
| 48 | 49 | #define MDIO_PMA_NG_EXTABLE 21 /* 2.5G/5G PMA/PMD extended ability */ |
| 49 | 50 | #define MDIO_PCS_EEE_WK_ERR 22 /* EEE wake error counter */ |
| 50 | 51 | #define MDIO_PHYXS_LNSTAT 24 /* PHY XGXS lane state */ |
| 51 | 52 | #define MDIO_AN_EEE_ADV 60 /* EEE advertisement */ |
| 52 | 53 | #define MDIO_AN_EEE_LPABLE 61 /* EEE link partner ability */ |
| 54 | +#define MDIO_AN_EEE_ADV2 62 /* EEE advertisement 2 */ | |
| 55 | +#define MDIO_AN_EEE_LPABLE2 63 /* EEE link partner ability 2 */ | |
| 53 | 56 | |
| 54 | 57 | /* Media-dependent registers. */ |
| 55 | 58 | #define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */ |
| @@ -276,6 +279,13 @@ · 220 unmodified lines | ||
| 276 | 279 | #define MDIO_EEE_1000KX 0x0010 /* 1000KX EEE cap */ |
| 277 | 280 | #define MDIO_EEE_10GKX4 0x0020 /* 10G KX4 EEE cap */ |
| 278 | 281 | #define MDIO_EEE_10GKR 0x0040 /* 10G KR EEE cap */ |
| 282 | +#define MDIO_EEE_40GR_FW 0x0100 /* 40G R fast wake */ | |
| 283 | +#define MDIO_EEE_40GR_DS 0x0200 /* 40G R deep sleep */ | |
| 284 | +#define MDIO_EEE_100GR_FW 0x1000 /* 100G R fast wake */ | |
| 285 | +#define MDIO_EEE_100GR_DS 0x2000 /* 100G R deep sleep */ | |
| 286 | + | |
| 287 | +#define MDIO_EEE_2_5GT 0x0001 /* 2.5GT EEE cap */ | |
| 288 | +#define MDIO_EEE_5GT 0x0002 /* 5GT EEE cap */ | |
| 279 | 289 | |
| 280 | 290 | /* 2.5G/5G Extended abilities register. */ |
| 281 | 291 | #define MDIO_PMA_NG_EXTABLE_2_5GBT 0x0001 /* 2.5GBASET ability */ |
| @@ -53,6 +53,11 @@ enum { · 52 unmodified lines | ||
| 53 | 53 | NET_DM_CMD_CONFIG, |
| 54 | 54 | NET_DM_CMD_START, |
| 55 | 55 | NET_DM_CMD_STOP, |
| 56 | + NET_DM_CMD_PACKET_ALERT, | |
| 57 | + NET_DM_CMD_CONFIG_GET, | |
| 58 | + NET_DM_CMD_CONFIG_NEW, | |
| 59 | + NET_DM_CMD_STATS_GET, | |
| 60 | + NET_DM_CMD_STATS_NEW, | |
| 56 | 61 | _NET_DM_CMD_MAX, |
| 57 | 62 | }; |
| 58 | 63 | |
| @@ -62,4 +67,65 @@ enum { · 3 unmodified lines | ||
| 62 | 67 | * Our group identifiers |
| 63 | 68 | */ |
| 64 | 69 | #define NET_DM_GRP_ALERT 1 |
| 70 | + | |
| 71 | +enum net_dm_attr { | |
| 72 | + NET_DM_ATTR_UNSPEC, | |
| 73 | + | |
| 74 | + NET_DM_ATTR_ALERT_MODE, /* u8 */ | |
| 75 | + NET_DM_ATTR_PC, /* u64 */ | |
| 76 | + NET_DM_ATTR_SYMBOL, /* string */ | |
| 77 | + NET_DM_ATTR_IN_PORT, /* nested */ | |
| 78 | + NET_DM_ATTR_TIMESTAMP, /* u64 */ | |
| 79 | + NET_DM_ATTR_PROTO, /* u16 */ | |
| 80 | + NET_DM_ATTR_PAYLOAD, /* binary */ | |
| 81 | + NET_DM_ATTR_PAD, | |
| 82 | + NET_DM_ATTR_TRUNC_LEN, /* u32 */ | |
| 83 | + NET_DM_ATTR_ORIG_LEN, /* u32 */ | |
| 84 | + NET_DM_ATTR_QUEUE_LEN, /* u32 */ | |
| 85 | + NET_DM_ATTR_STATS, /* nested */ | |
| 86 | + NET_DM_ATTR_HW_STATS, /* nested */ | |
| 87 | + NET_DM_ATTR_ORIGIN, /* u16 */ | |
| 88 | + NET_DM_ATTR_HW_TRAP_GROUP_NAME, /* string */ | |
| 89 | + NET_DM_ATTR_HW_TRAP_NAME, /* string */ | |
| 90 | + NET_DM_ATTR_HW_ENTRIES, /* nested */ | |
| 91 | + NET_DM_ATTR_HW_ENTRY, /* nested */ | |
| 92 | + NET_DM_ATTR_HW_TRAP_COUNT, /* u32 */ | |
| 93 | + NET_DM_ATTR_SW_DROPS, /* flag */ | |
| 94 | + NET_DM_ATTR_HW_DROPS, /* flag */ | |
| 95 | + | |
| 96 | + __NET_DM_ATTR_MAX, | |
| 97 | + NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1 | |
| 98 | +}; | |
| 99 | + | |
| 100 | +/** | |
| 101 | + * enum net_dm_alert_mode - Alert mode. | |
| 102 | + * @NET_DM_ALERT_MODE_SUMMARY: A summary of recent drops is sent to user space. | |
| 103 | + * @NET_DM_ALERT_MODE_PACKET: Each dropped packet is sent to user space along | |
| 104 | + * with metadata. | |
| 105 | + */ | |
| 106 | +enum net_dm_alert_mode { | |
| 107 | + NET_DM_ALERT_MODE_SUMMARY, | |
| 108 | + NET_DM_ALERT_MODE_PACKET, | |
| 109 | +}; | |
| 110 | + | |
| 111 | +enum { | |
| 112 | + NET_DM_ATTR_PORT_NETDEV_IFINDEX, /* u32 */ | |
| 113 | + NET_DM_ATTR_PORT_NETDEV_NAME, /* string */ | |
| 114 | + | |
| 115 | + __NET_DM_ATTR_PORT_MAX, | |
| 116 | + NET_DM_ATTR_PORT_MAX = __NET_DM_ATTR_PORT_MAX - 1 | |
| 117 | +}; | |
| 118 | + | |
| 119 | +enum { | |
| 120 | + NET_DM_ATTR_STATS_DROPPED, /* u64 */ | |
| 121 | + | |
| 122 | + __NET_DM_ATTR_STATS_MAX, | |
| 123 | + NET_DM_ATTR_STATS_MAX = __NET_DM_ATTR_STATS_MAX - 1 | |
| 124 | +}; | |
| 125 | + | |
| 126 | +enum net_dm_origin { | |
| 127 | + NET_DM_ORIGIN_SW, | |
| 128 | + NET_DM_ORIGIN_HW, | |
| 129 | +}; | |
| 130 | + | |
| 65 | 131 | #endif |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | #ifndef _NF_SYNPROXY_H |
| 3 | 3 | #define _NF_SYNPROXY_H |
| 4 | 4 | |
| @@ -636,6 +636,7 @@ enum nft_lookup_attributes { · 635 unmodified lines | ||
| 636 | 636 | enum nft_dynset_ops { |
| 637 | 637 | NFT_DYNSET_OP_ADD, |
| 638 | 638 | NFT_DYNSET_OP_UPDATE, |
| 639 | + NFT_DYNSET_OP_DELETE, | |
| 639 | 640 | }; |
| 640 | 641 | |
| 641 | 642 | enum nft_dynset_flags { |
| @@ -799,6 +800,9 @@ enum nft_exthdr_attributes { · 157 unmodified lines | ||
| 799 | 800 | * @NFT_META_OIFKIND: packet output interface kind name (dev->rtnl_link_ops->kind) |
| 800 | 801 | * @NFT_META_BRI_IIFPVID: packet input bridge port pvid |
| 801 | 802 | * @NFT_META_BRI_IIFVPROTO: packet input bridge vlan proto |
| 803 | + * @NFT_META_TIME_NS: time since epoch (in nanoseconds) | |
| 804 | + * @NFT_META_TIME_DAY: day of week (from 0 = Sunday to 6 = Saturday) | |
| 805 | + * @NFT_META_TIME_HOUR: hour of day (in seconds) | |
| 802 | 806 | */ |
| 803 | 807 | enum nft_meta_keys { |
| 804 | 808 | NFT_META_LEN, |
| @@ -831,6 +835,9 @@ enum nft_meta_keys { · 26 unmodified lines | ||
| 831 | 835 | NFT_META_OIFKIND, |
| 832 | 836 | NFT_META_BRI_IIFPVID, |
| 833 | 837 | NFT_META_BRI_IIFVPROTO, |
| 838 | + NFT_META_TIME_NS, | |
| 839 | + NFT_META_TIME_DAY, | |
| 840 | + NFT_META_TIME_HOUR, | |
| 834 | 841 | }; |
| 835 | 842 | |
| 836 | 843 | /** |
| @@ -1474,7 +1481,8 @@ enum nft_ct_expectation_attributes { · 637 unmodified lines | ||
| 1474 | 1481 | #define NFT_OBJECT_CT_TIMEOUT 7 |
| 1475 | 1482 | #define NFT_OBJECT_SECMARK 8 |
| 1476 | 1483 | #define NFT_OBJECT_CT_EXPECT 9 |
| 1477 | −#define __NFT_OBJECT_MAX 10 | |
| 1484 | +#define NFT_OBJECT_SYNPROXY 10 | |
| 1485 | +#define __NFT_OBJECT_MAX 11 | |
| 1478 | 1486 | #define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1) |
| 1479 | 1487 | |
| 1480 | 1488 | /** |
| @@ -33,6 +33,15 @@ struct nfulnl_msg_packet_timestamp { · 32 unmodified lines | ||
| 33 | 33 | __aligned_be64 usec; |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | +enum nfulnl_vlan_attr { | |
| 37 | + NFULA_VLAN_UNSPEC, | |
| 38 | + NFULA_VLAN_PROTO, /* __be16 skb vlan_proto */ | |
| 39 | + NFULA_VLAN_TCI, /* __be16 skb htons(vlan_tci) */ | |
| 40 | + __NFULA_VLAN_MAX, | |
| 41 | +}; | |
| 42 | + | |
| 43 | +#define NFULA_VLAN_MAX (__NFULA_VLAN_MAX + 1) | |
| 44 | + | |
| 36 | 45 | enum nfulnl_attr_type { |
| 37 | 46 | NFULA_UNSPEC, |
| 38 | 47 | NFULA_PACKET_HDR, |
| @@ -54,6 +63,8 @@ enum nfulnl_attr_type { · 15 unmodified lines | ||
| 54 | 63 | NFULA_HWLEN, /* hardware header length */ |
| 55 | 64 | NFULA_CT, /* nf_conntrack_netlink.h */ |
| 56 | 65 | NFULA_CT_INFO, /* enum ip_conntrack_info */ |
| 66 | + NFULA_VLAN, /* nested attribute: packet vlan info */ | |
| 67 | + NFULA_L2HDR, /* full L2 header */ | |
| 57 | 68 | |
| 58 | 69 | __NFULA_MAX |
| 59 | 70 | }; |
| @@ -1,4 +1,8 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | + | |
| 3 | +#ifndef _UAPI_XT_CONNLABEL_H | |
| 4 | +#define _UAPI_XT_CONNLABEL_H | |
| 5 | + | |
| 2 | 6 | #include <linux/types.h> |
| 3 | 7 | |
| 4 | 8 | #define XT_CONNLABEL_MAXBIT 127 |
| @@ -11,3 +15,5 @@ struct xt_connlabel_mtinfo { · 6 unmodified lines | ||
| 11 | 15 | __u16 bit; |
| 12 | 16 | __u16 options; |
| 13 | 17 | }; |
| 18 | + | |
| 19 | +#endif /* _UAPI_XT_CONNLABEL_H */ | |
| @@ -11,4 +11,9 @@ struct xt_nfacct_match_info { · 10 unmodified lines | ||
| 11 | 11 | struct nf_acct *nfacct; |
| 12 | 12 | }; |
| 13 | 13 | |
| 14 | +struct xt_nfacct_match_info_v1 { | |
| 15 | + char name[NFACCT_NAME_MAX]; | |
| 16 | + struct nf_acct *nfacct __attribute__((aligned(8))); | |
| 17 | +}; | |
| 18 | + | |
| 14 | 19 | #endif /* _XT_NFACCT_MATCH_H */ |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _XT_POLICY_H |
| 3 | 3 | #define _XT_POLICY_H |
| 4 | 4 | |
| 5 | +#include <linux/netfilter.h> | |
| 5 | 6 | #include <linux/types.h> |
| 6 | 7 | #include <linux/in.h> |
| 7 | 8 | #include <linux/in6.h> |
| @@ -123,7 +123,7 @@ struct ebt_entry_match { · 122 unmodified lines | ||
| 123 | 123 | union { |
| 124 | 124 | struct { |
| 125 | 125 | char name[EBT_EXTENSION_MAXNAMELEN]; |
| 126 | − uint8_t revision; | |
| 126 | + __u8 revision; | |
| 127 | 127 | }; |
| 128 | 128 | struct xt_match *match; |
| 129 | 129 | } u; |
| @@ -136,7 +136,7 @@ struct ebt_entry_watcher { · 6 unmodified lines | ||
| 136 | 136 | union { |
| 137 | 137 | struct { |
| 138 | 138 | char name[EBT_EXTENSION_MAXNAMELEN]; |
| 139 | − uint8_t revision; | |
| 139 | + __u8 revision; | |
| 140 | 140 | }; |
| 141 | 141 | struct xt_target *watcher; |
| 142 | 142 | } u; |
| @@ -149,7 +149,7 @@ struct ebt_entry_target { · 6 unmodified lines | ||
| 149 | 149 | union { |
| 150 | 150 | struct { |
| 151 | 151 | char name[EBT_EXTENSION_MAXNAMELEN]; |
| 152 | − uint8_t revision; | |
| 152 | + __u8 revision; | |
| 153 | 153 | }; |
| 154 | 154 | struct xt_target *target; |
| 155 | 155 | } u; |
| @@ -2,8 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _IPT_LOG_H |
| 3 | 3 | #define _IPT_LOG_H |
| 4 | 4 | |
| 5 | −#warning "Please update iptables, this file will be removed soon!" | |
| 6 | − | |
| 7 | 5 | /* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */ |
| 8 | 6 | #define IPT_LOG_TCPSEQ 0x01 /* Log TCP sequence numbers */ |
| 9 | 7 | #define IPT_LOG_TCPOPT 0x02 /* Log TCP options */ |
| @@ -2,8 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _IP6T_LOG_H |
| 3 | 3 | #define _IP6T_LOG_H |
| 4 | 4 | |
| 5 | −#warning "Please update iptables, this file will be removed soon!" | |
| 6 | − | |
| 7 | 5 | /* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */ |
| 8 | 6 | #define IP6T_LOG_TCPSEQ 0x01 /* Log TCP sequence numbers */ |
| 9 | 7 | #define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */ |
| @@ -26,17 +26,22 @@ · 25 unmodified lines | ||
| 26 | 26 | #include <linux/types.h> |
| 27 | 27 | |
| 28 | 28 | /* latest upcall version available */ |
| 29 | −#define CLD_UPCALL_VERSION 1 | |
| 29 | +#define CLD_UPCALL_VERSION 2 | |
| 30 | 30 | |
| 31 | 31 | /* defined by RFC3530 */ |
| 32 | 32 | #define NFS4_OPAQUE_LIMIT 1024 |
| 33 | 33 | |
| 34 | +#ifndef SHA256_DIGEST_SIZE | |
| 35 | +#define SHA256_DIGEST_SIZE 32 | |
| 36 | +#endif | |
| 37 | + | |
| 34 | 38 | enum cld_command { |
| 35 | 39 | Cld_Create, /* create a record for this cm_id */ |
| 36 | 40 | Cld_Remove, /* remove record of this cm_id */ |
| 37 | 41 | Cld_Check, /* is this cm_id allowed? */ |
| 38 | 42 | Cld_GraceDone, /* grace period is complete */ |
| 39 | − Cld_GraceStart, | |
| 43 | + Cld_GraceStart, /* grace start (upload client records) */ | |
| 44 | + Cld_GetVersion, /* query max supported upcall version */ | |
| 40 | 45 | }; |
| 41 | 46 | |
| 42 | 47 | /* representation of long-form NFSv4 client ID */ |
| @@ -45,6 +50,17 @@ struct cld_name { · 2 unmodified lines | ||
| 45 | 50 | unsigned char cn_id[NFS4_OPAQUE_LIMIT]; /* client-provided */ |
| 46 | 51 | } __attribute__((packed)); |
| 47 | 52 | |
| 53 | +/* sha256 hash of the kerberos principal */ | |
| 54 | +struct cld_princhash { | |
| 55 | + __u8 cp_len; /* length of cp_data */ | |
| 56 | + unsigned char cp_data[SHA256_DIGEST_SIZE]; /* hash of principal */ | |
| 57 | +} __attribute__((packed)); | |
| 58 | + | |
| 59 | +struct cld_clntinfo { | |
| 60 | + struct cld_name cc_name; | |
| 61 | + struct cld_princhash cc_princhash; | |
| 62 | +} __attribute__((packed)); | |
| 63 | + | |
| 48 | 64 | /* message struct for communication with userspace */ |
| 49 | 65 | struct cld_msg { |
| 50 | 66 | __u8 cm_vers; /* upcall version */ |
| @@ -54,7 +70,28 @@ struct cld_msg { · 3 unmodified lines | ||
| 54 | 70 | union { |
| 55 | 71 | __s64 cm_gracetime; /* grace period start time */ |
| 56 | 72 | struct cld_name cm_name; |
| 73 | + __u8 cm_version; /* for getting max version */ | |
| 74 | + } __attribute__((packed)) cm_u; | |
| 75 | +} __attribute__((packed)); | |
| 76 | + | |
| 77 | +/* version 2 message can include hash of kerberos principal */ | |
| 78 | +struct cld_msg_v2 { | |
| 79 | + __u8 cm_vers; /* upcall version */ | |
| 80 | + __u8 cm_cmd; /* upcall command */ | |
| 81 | + __s16 cm_status; /* return code */ | |
| 82 | + __u32 cm_xid; /* transaction id */ | |
| 83 | + union { | |
| 84 | + struct cld_name cm_name; | |
| 85 | + __u8 cm_version; /* for getting max version */ | |
| 86 | + struct cld_clntinfo cm_clntinfo; /* name & princ hash */ | |
| 57 | 87 | } __attribute__((packed)) cm_u; |
| 58 | 88 | } __attribute__((packed)); |
| 59 | 89 | |
| 90 | +struct cld_msg_hdr { | |
| 91 | + __u8 cm_vers; /* upcall version */ | |
| 92 | + __u8 cm_cmd; /* upcall command */ | |
| 93 | + __s16 cm_status; /* return code */ | |
| 94 | + __u32 cm_xid; /* transaction id */ | |
| 95 | +} __attribute__((packed)); | |
| 96 | + | |
| 60 | 97 | #endif /* !_NFSD_CLD_H */ |
| @@ -52,6 +52,11 @@ · 51 unmodified lines | ||
| 52 | 52 | #define NL80211_MULTICAST_GROUP_NAN "nan" |
| 53 | 53 | #define NL80211_MULTICAST_GROUP_TESTMODE "testmode" |
| 54 | 54 | |
| 55 | +#define NL80211_EDMG_BW_CONFIG_MIN 4 | |
| 56 | +#define NL80211_EDMG_BW_CONFIG_MAX 15 | |
| 57 | +#define NL80211_EDMG_CHANNELS_MIN 1 | |
| 58 | +#define NL80211_EDMG_CHANNELS_MAX 0x3c /* 0b00111100 */ | |
| 59 | + | |
| 55 | 60 | /** |
| 56 | 61 | * DOC: Station handling |
| 57 | 62 | * |
| @@ -657,7 +662,9 @@ · 599 unmodified lines | ||
| 657 | 662 | * is used during CSA period. |
| 658 | 663 | * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this |
| 659 | 664 | * command may be used with the corresponding cookie to cancel the wait |
| 660 | − * time if it is known that it is no longer necessary. | |
| 665 | + * time if it is known that it is no longer necessary. This command is | |
| 666 | + * also sent as an event whenever the driver has completed the off-channel | |
| 667 | + * wait time. | |
| 661 | 668 | * @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility. |
| 662 | 669 | * @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame |
| 663 | 670 | * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies |
| @@ -2356,6 +2363,16 @@ enum nl80211_commands { · 1692 unmodified lines | ||
| 2356 | 2363 | * |
| 2357 | 2364 | * @NL80211_ATTR_TWT_RESPONDER: Enable target wait time responder support. |
| 2358 | 2365 | * |
| 2366 | + * @NL80211_ATTR_HE_OBSS_PD: nested attribute for OBSS Packet Detection | |
| 2367 | + * functionality. | |
| 2368 | + * | |
| 2369 | + * @NL80211_ATTR_WIPHY_EDMG_CHANNELS: bitmap that indicates the 2.16 GHz | |
| 2370 | + * channel(s) that are allowed to be used for EDMG transmissions. | |
| 2371 | + * Defined by IEEE P802.11ay/D4.0 section 9.4.2.251. (u8 attribute) | |
| 2372 | + * @NL80211_ATTR_WIPHY_EDMG_BW_CONFIG: Channel BW Configuration subfield encodes | |
| 2373 | + * the allowed channel bandwidth configurations. (u8 attribute) | |
| 2374 | + * Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13. | |
| 2375 | + * | |
| 2359 | 2376 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2360 | 2377 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2361 | 2378 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2813,6 +2830,11 @@ enum nl80211_attrs { · 451 unmodified lines | ||
| 2813 | 2830 | |
| 2814 | 2831 | NL80211_ATTR_TWT_RESPONDER, |
| 2815 | 2832 | |
| 2833 | + NL80211_ATTR_HE_OBSS_PD, | |
| 2834 | + | |
| 2835 | + NL80211_ATTR_WIPHY_EDMG_CHANNELS, | |
| 2836 | + NL80211_ATTR_WIPHY_EDMG_BW_CONFIG, | |
| 2837 | + | |
| 2816 | 2838 | /* add attributes here, update the policy in nl80211.c */ |
| 2817 | 2839 | |
| 2818 | 2840 | __NL80211_ATTR_AFTER_LAST, |
| @@ -2863,7 +2885,7 @@ enum nl80211_attrs { · 44 unmodified lines | ||
| 2863 | 2885 | #define NL80211_HT_CAPABILITY_LEN 26 |
| 2864 | 2886 | #define NL80211_VHT_CAPABILITY_LEN 12 |
| 2865 | 2887 | #define NL80211_HE_MIN_CAPABILITY_LEN 16 |
| 2866 | −#define NL80211_HE_MAX_CAPABILITY_LEN 51 | |
| 2888 | +#define NL80211_HE_MAX_CAPABILITY_LEN 54 | |
| 2867 | 2889 | #define NL80211_MAX_NR_CIPHER_SUITES 5 |
| 2868 | 2890 | #define NL80211_MAX_NR_AKM_SUITES 2 |
| 2869 | 2891 | |
| @@ -3194,6 +3216,8 @@ enum nl80211_sta_bss_param { · 324 unmodified lines | ||
| 3194 | 3216 | * sent to the station (u64, usec) |
| 3195 | 3217 | * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16) |
| 3196 | 3218 | * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station |
| 3219 | + * @NL80211_STA_INFO_ASSOC_AT_BOOTTIME: Timestamp (CLOCK_BOOTTIME, nanoseconds) | |
| 3220 | + * of STA's association | |
| 3197 | 3221 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 3198 | 3222 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
| 3199 | 3223 | */ |
| @@ -3240,6 +3264,7 @@ enum nl80211_sta_info { · 40 unmodified lines | ||
| 3240 | 3264 | NL80211_STA_INFO_TX_DURATION, |
| 3241 | 3265 | NL80211_STA_INFO_AIRTIME_WEIGHT, |
| 3242 | 3266 | NL80211_STA_INFO_AIRTIME_LINK_METRIC, |
| 3267 | + NL80211_STA_INFO_ASSOC_AT_BOOTTIME, | |
| 3243 | 3268 | |
| 3244 | 3269 | /* keep last */ |
| 3245 | 3270 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -3421,6 +3446,12 @@ enum nl80211_band_iftype_attr { · 175 unmodified lines | ||
| 3421 | 3446 | * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE |
| 3422 | 3447 | * @NL80211_BAND_ATTR_IFTYPE_DATA: nested array attribute, with each entry using |
| 3423 | 3448 | * attributes from &enum nl80211_band_iftype_attr |
| 3449 | + * @NL80211_BAND_ATTR_EDMG_CHANNELS: bitmap that indicates the 2.16 GHz | |
| 3450 | + * channel(s) that are allowed to be used for EDMG transmissions. | |
| 3451 | + * Defined by IEEE P802.11ay/D4.0 section 9.4.2.251. | |
| 3452 | + * @NL80211_BAND_ATTR_EDMG_BW_CONFIG: Channel BW Configuration subfield encodes | |
| 3453 | + * the allowed channel bandwidth configurations. | |
| 3454 | + * Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13. | |
| 3424 | 3455 | * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined |
| 3425 | 3456 | * @__NL80211_BAND_ATTR_AFTER_LAST: internal use |
| 3426 | 3457 | */ |
| @@ -3438,6 +3469,9 @@ enum nl80211_band_attr { · 11 unmodified lines | ||
| 3438 | 3469 | NL80211_BAND_ATTR_VHT_CAPA, |
| 3439 | 3470 | NL80211_BAND_ATTR_IFTYPE_DATA, |
| 3440 | 3471 | |
| 3472 | + NL80211_BAND_ATTR_EDMG_CHANNELS, | |
| 3473 | + NL80211_BAND_ATTR_EDMG_BW_CONFIG, | |
| 3474 | + | |
| 3441 | 3475 | /* keep last */ |
| 3442 | 3476 | __NL80211_BAND_ATTR_AFTER_LAST, |
| 3443 | 3477 | NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 |
| @@ -3836,6 +3870,8 @@ enum nl80211_user_reg_hint_type { · 392 unmodified lines | ||
| 3836 | 3870 | * @NL80211_SURVEY_INFO_TIME_SCAN: time the radio spent for scan |
| 3837 | 3871 | * (on this channel or globally) |
| 3838 | 3872 | * @NL80211_SURVEY_INFO_PAD: attribute used for padding for 64-bit alignment |
| 3873 | + * @NL80211_SURVEY_INFO_TIME_BSS_RX: amount of time the radio spent | |
| 3874 | + * receiving frames destined to the local BSS | |
| 3839 | 3875 | * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number |
| 3840 | 3876 | * currently defined |
| 3841 | 3877 | * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use |
| @@ -3852,6 +3888,7 @@ enum nl80211_survey_info { · 10 unmodified lines | ||
| 3852 | 3888 | NL80211_SURVEY_INFO_TIME_TX, |
| 3853 | 3889 | NL80211_SURVEY_INFO_TIME_SCAN, |
| 3854 | 3890 | NL80211_SURVEY_INFO_PAD, |
| 3891 | + NL80211_SURVEY_INFO_TIME_BSS_RX, | |
| 3855 | 3892 | |
| 3856 | 3893 | /* keep last */ |
| 3857 | 3894 | __NL80211_SURVEY_INFO_AFTER_LAST, |
| @@ -4536,6 +4573,7 @@ enum nl80211_txrate_gi { · 678 unmodified lines | ||
| 4536 | 4573 | * @NL80211_BAND_2GHZ: 2.4 GHz ISM band |
| 4537 | 4574 | * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) |
| 4538 | 4575 | * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz) |
| 4576 | + * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz) | |
| 4539 | 4577 | * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace |
| 4540 | 4578 | * since newer kernel versions may support more bands |
| 4541 | 4579 | */ |
| @@ -4543,6 +4581,7 @@ enum nl80211_band { · 1 unmodified line | ||
| 4543 | 4581 | NL80211_BAND_2GHZ, |
| 4544 | 4582 | NL80211_BAND_5GHZ, |
| 4545 | 4583 | NL80211_BAND_60GHZ, |
| 4584 | + NL80211_BAND_6GHZ, | |
| 4546 | 4585 | |
| 4547 | 4586 | NUM_NL80211_BANDS, |
| 4548 | 4587 | }; |
| @@ -6488,4 +6527,26 @@ enum nl80211_peer_measurement_ftm_resp { · 1939 unmodified lines | ||
| 6488 | 6527 | NL80211_PMSR_FTM_RESP_ATTR_MAX = NUM_NL80211_PMSR_FTM_RESP_ATTR - 1 |
| 6489 | 6528 | }; |
| 6490 | 6529 | |
| 6530 | +/** | |
| 6531 | + * enum nl80211_obss_pd_attributes - OBSS packet detection attributes | |
| 6532 | + * @__NL80211_HE_OBSS_PD_ATTR_INVALID: Invalid | |
| 6533 | + * | |
| 6534 | + * @NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET: the OBSS PD minimum tx power offset. | |
| 6535 | + * @NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET: the OBSS PD maximum tx power offset. | |
| 6536 | + * | |
| 6537 | + * @__NL80211_HE_OBSS_PD_ATTR_LAST: Internal | |
| 6538 | + * @NL80211_HE_OBSS_PD_ATTR_MAX: highest OBSS PD attribute. | |
| 6539 | + */ | |
| 6540 | +enum nl80211_obss_pd_attributes { | |
| 6541 | + __NL80211_HE_OBSS_PD_ATTR_INVALID, | |
| 6542 | + | |
| 6543 | + NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET, | |
| 6544 | + NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET, | |
| 6545 | + | |
| 6546 | + /* keep last */ | |
| 6547 | + __NL80211_HE_OBSS_PD_ATTR_LAST, | |
| 6548 | + NL80211_HE_OBSS_PD_ATTR_MAX = __NL80211_HE_OBSS_PD_ATTR_LAST - 1, | |
| 6549 | +}; | |
| 6550 | + | |
| 6551 | + | |
| 6491 | 6552 | #endif /* __LINUX_NL80211_H */ |
| @@ -123,6 +123,9 @@ struct ovs_vport_stats { · 122 unmodified lines | ||
| 123 | 123 | /* Allow datapath to associate multiple Netlink PIDs to each vport */ |
| 124 | 124 | #define OVS_DP_F_VPORT_PIDS (1 << 1) |
| 125 | 125 | |
| 126 | +/* Allow tc offload recirc sharing */ | |
| 127 | +#define OVS_DP_F_TC_RECIRC_SHARING (1 << 2) | |
| 128 | + | |
| 126 | 129 | /* Fixed logical ports. */ |
| 127 | 130 | #define OVSP_LOCAL ((__u32)0) |
| 128 | 131 | |
| @@ -591,6 +591,7 @@ · 590 unmodified lines | ||
| 591 | 591 | #define PCI_EXP_SLTCTL_CCIE 0x0010 /* Command Completed Interrupt Enable */ |
| 592 | 592 | #define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */ |
| 593 | 593 | #define PCI_EXP_SLTCTL_AIC 0x00c0 /* Attention Indicator Control */ |
| 594 | +#define PCI_EXP_SLTCTL_ATTN_IND_SHIFT 6 /* Attention Indicator shift */ | |
| 594 | 595 | #define PCI_EXP_SLTCTL_ATTN_IND_ON 0x0040 /* Attention Indicator on */ |
| 595 | 596 | #define PCI_EXP_SLTCTL_ATTN_IND_BLINK 0x0080 /* Attention Indicator blinking */ |
| 596 | 597 | #define PCI_EXP_SLTCTL_ATTN_IND_OFF 0x00c0 /* Attention Indicator off */ |
| @@ -713,7 +714,9 @@ · 116 unmodified lines | ||
| 713 | 714 | #define PCI_EXT_CAP_ID_DPC 0x1D /* Downstream Port Containment */ |
| 714 | 715 | #define PCI_EXT_CAP_ID_L1SS 0x1E /* L1 PM Substates */ |
| 715 | 716 | #define PCI_EXT_CAP_ID_PTM 0x1F /* Precision Time Measurement */ |
| 716 | −#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PTM | |
| 717 | +#define PCI_EXT_CAP_ID_DLF 0x25 /* Data Link Feature */ | |
| 718 | +#define PCI_EXT_CAP_ID_PL_16GT 0x26 /* Physical Layer 16.0 GT/s */ | |
| 719 | +#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PL_16GT | |
| 717 | 720 | |
| 718 | 721 | #define PCI_EXT_CAP_DSN_SIZEOF 12 |
| 719 | 722 | #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40 |
| @@ -1053,4 +1056,14 @@ · 333 unmodified lines | ||
| 1053 | 1056 | #define PCI_L1SS_CTL1_LTR_L12_TH_SCALE 0xe0000000 /* LTR_L1.2_THRESHOLD_Scale */ |
| 1054 | 1057 | #define PCI_L1SS_CTL2 0x0c /* Control 2 Register */ |
| 1055 | 1058 | |
| 1059 | +/* Data Link Feature */ | |
| 1060 | +#define PCI_DLF_CAP 0x04 /* Capabilities Register */ | |
| 1061 | +#define PCI_DLF_EXCHANGE_ENABLE 0x80000000 /* Data Link Feature Exchange Enable */ | |
| 1062 | + | |
| 1063 | +/* Physical Layer 16.0 GT/s */ | |
| 1064 | +#define PCI_PL_16GT_LE_CTRL 0x20 /* Lane Equalization Control Register */ | |
| 1065 | +#define PCI_PL_16GT_LE_CTRL_DSP_TX_PRESET_MASK 0x0000000F | |
| 1066 | +#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK 0x000000F0 | |
| 1067 | +#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT 4 | |
| 1068 | + | |
| 1056 | 1069 | #endif /* LINUX_PCI_REGS_H */ |
| @@ -374,7 +374,8 @@ struct perf_event_attr { · 373 unmodified lines | ||
| 374 | 374 | namespaces : 1, /* include namespaces data */ |
| 375 | 375 | ksymbol : 1, /* include ksymbol events */ |
| 376 | 376 | bpf_event : 1, /* include bpf events */ |
| 377 | − __reserved_1 : 33; | |
| 377 | + aux_output : 1, /* generate AUX records instead of events */ | |
| 378 | + __reserved_1 : 32; | |
| 378 | 379 | |
| 379 | 380 | union { |
| 380 | 381 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -160,6 +160,8 @@ enum { · 159 unmodified lines | ||
| 160 | 160 | TCA_POLICE_RESULT, |
| 161 | 161 | TCA_POLICE_TM, |
| 162 | 162 | TCA_POLICE_PAD, |
| 163 | + TCA_POLICE_RATE64, | |
| 164 | + TCA_POLICE_PEAKRATE64, | |
| 163 | 165 | __TCA_POLICE_MAX |
| 164 | 166 | #define TCA_POLICE_RESULT TCA_POLICE_RESULT |
| 165 | 167 | }; |
| @@ -1160,7 +1160,8 @@ enum { · 1159 unmodified lines | ||
| 1160 | 1160 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL] |
| 1161 | 1161 | */ |
| 1162 | 1162 | |
| 1163 | −#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST 0x1 | |
| 1163 | +#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST BIT(0) | |
| 1164 | +#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD BIT(1) | |
| 1164 | 1165 | |
| 1165 | 1166 | enum { |
| 1166 | 1167 | TCA_TAPRIO_ATTR_UNSPEC, |
| @@ -15,6 +15,9 @@ · 14 unmodified lines | ||
| 15 | 15 | * Added PPGETMODES/PPGETMODE/PPGETPHASE, Fred Barnes <frmb2@ukc.ac.uk>, 03/01/2001 |
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | +#ifndef _UAPI_LINUX_PPDEV_H | |
| 19 | +#define _UAPI_LINUX_PPDEV_H | |
| 20 | + | |
| 18 | 21 | #define PP_IOCTL 'p' |
| 19 | 22 | |
| 20 | 23 | /* Set mode for read/write (e.g. IEEE1284_MODE_EPP) */ |
| @@ -97,4 +100,4 @@ struct ppdev_frob_struct { · 76 unmodified lines | ||
| 97 | 100 | /* only masks user-visible flags */ |
| 98 | 101 | #define PP_FLAGMASK (PP_FASTWRITE | PP_FASTREAD | PP_W91284PIC) |
| 99 | 102 | |
| 100 | − | |
| 103 | +#endif /* _UAPI_LINUX_PPDEV_H */ | |
| @@ -181,7 +181,7 @@ struct prctl_mm_map { · 180 unmodified lines | ||
| 181 | 181 | #define PR_GET_THP_DISABLE 42 |
| 182 | 182 | |
| 183 | 183 | /* |
| 184 | − * Tell the kernel to start/stop helping userspace manage bounds tables. | |
| 184 | + * No longer implemented, but left here to ensure the numbers stay reserved: | |
| 185 | 185 | */ |
| 186 | 186 | #define PR_MPX_ENABLE_MANAGEMENT 43 |
| 187 | 187 | #define PR_MPX_DISABLE_MANAGEMENT 44 |
| @@ -229,4 +229,9 @@ struct prctl_mm_map { · 41 unmodified lines | ||
| 229 | 229 | # define PR_PAC_APDBKEY (1UL << 3) |
| 230 | 230 | # define PR_PAC_APGAKEY (1UL << 4) |
| 231 | 231 | |
| 232 | +/* Tagged user address controls for arm64 */ | |
| 233 | +#define PR_SET_TAGGED_ADDR_CTRL 55 | |
| 234 | +#define PR_GET_TAGGED_ADDR_CTRL 56 | |
| 235 | +# define PR_TAGGED_ADDR_ENABLE (1UL << 0) | |
| 236 | + | |
| 232 | 237 | #endif /* _LINUX_PRCTL_H */ |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0-only */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | |
| 2 | 2 | /* |
| 3 | 3 | * Userspace interface for AMD Secure Encrypted Virtualization (SEV) |
| 4 | 4 | * platform management commands. |
| @@ -25,11 +25,43 @@ · 24 unmodified lines | ||
| 25 | 25 | #include <linux/ioctl.h> |
| 26 | 26 | #include <linux/types.h> |
| 27 | 27 | |
| 28 | −/* PTP_xxx bits, for the flags field within the request structures. */ | |
| 28 | +/* | |
| 29 | + * Bits of the ptp_extts_request.flags field: | |
| 30 | + */ | |
| 29 | 31 | #define PTP_ENABLE_FEATURE (1<<0) |
| 30 | 32 | #define PTP_RISING_EDGE (1<<1) |
| 31 | 33 | #define PTP_FALLING_EDGE (1<<2) |
| 32 | 34 | |
| 35 | +/* | |
| 36 | + * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl. | |
| 37 | + */ | |
| 38 | +#define PTP_EXTTS_VALID_FLAGS (PTP_ENABLE_FEATURE | \ | |
| 39 | + PTP_RISING_EDGE | \ | |
| 40 | + PTP_FALLING_EDGE) | |
| 41 | + | |
| 42 | +/* | |
| 43 | + * flag fields valid for the original PTP_EXTTS_REQUEST ioctl. | |
| 44 | + * DO NOT ADD NEW FLAGS HERE. | |
| 45 | + */ | |
| 46 | +#define PTP_EXTTS_V1_VALID_FLAGS (PTP_ENABLE_FEATURE | \ | |
| 47 | + PTP_RISING_EDGE | \ | |
| 48 | + PTP_FALLING_EDGE) | |
| 49 | + | |
| 50 | +/* | |
| 51 | + * Bits of the ptp_perout_request.flags field: | |
| 52 | + */ | |
| 53 | +#define PTP_PEROUT_ONE_SHOT (1<<0) | |
| 54 | + | |
| 55 | +/* | |
| 56 | + * flag fields valid for the new PTP_PEROUT_REQUEST2 ioctl. | |
| 57 | + */ | |
| 58 | +#define PTP_PEROUT_VALID_FLAGS (PTP_PEROUT_ONE_SHOT) | |
| 59 | + | |
| 60 | +/* | |
| 61 | + * No flags are valid for the original PTP_PEROUT_REQUEST ioctl | |
| 62 | + */ | |
| 63 | +#define PTP_PEROUT_V1_VALID_FLAGS (0) | |
| 64 | + | |
| 33 | 65 | /* |
| 34 | 66 | * struct ptp_clock_time - represents a time value |
| 35 | 67 | * |
| @@ -67,7 +99,7 @@ struct ptp_perout_request { · 31 unmodified lines | ||
| 67 | 99 | struct ptp_clock_time start; /* Absolute start time. */ |
| 68 | 100 | struct ptp_clock_time period; /* Desired period, zero means disable. */ |
| 69 | 101 | unsigned int index; /* Which channel to configure. */ |
| 70 | − unsigned int flags; /* Reserved for future use. */ | |
| 102 | + unsigned int flags; | |
| 71 | 103 | unsigned int rsv[4]; /* Reserved for future use. */ |
| 72 | 104 | }; |
| 73 | 105 | |
| @@ -149,6 +181,18 @@ struct ptp_pin_desc { · 75 unmodified lines | ||
| 149 | 181 | #define PTP_SYS_OFFSET_EXTENDED \ |
| 150 | 182 | _IOWR(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended) |
| 151 | 183 | |
| 184 | +#define PTP_CLOCK_GETCAPS2 _IOR(PTP_CLK_MAGIC, 10, struct ptp_clock_caps) | |
| 185 | +#define PTP_EXTTS_REQUEST2 _IOW(PTP_CLK_MAGIC, 11, struct ptp_extts_request) | |
| 186 | +#define PTP_PEROUT_REQUEST2 _IOW(PTP_CLK_MAGIC, 12, struct ptp_perout_request) | |
| 187 | +#define PTP_ENABLE_PPS2 _IOW(PTP_CLK_MAGIC, 13, int) | |
| 188 | +#define PTP_SYS_OFFSET2 _IOW(PTP_CLK_MAGIC, 14, struct ptp_sys_offset) | |
| 189 | +#define PTP_PIN_GETFUNC2 _IOWR(PTP_CLK_MAGIC, 15, struct ptp_pin_desc) | |
| 190 | +#define PTP_PIN_SETFUNC2 _IOW(PTP_CLK_MAGIC, 16, struct ptp_pin_desc) | |
| 191 | +#define PTP_SYS_OFFSET_PRECISE2 \ | |
| 192 | + _IOWR(PTP_CLK_MAGIC, 17, struct ptp_sys_offset_precise) | |
| 193 | +#define PTP_SYS_OFFSET_EXTENDED2 \ | |
| 194 | + _IOWR(PTP_CLK_MAGIC, 18, struct ptp_sys_offset_extended) | |
| 195 | + | |
| 152 | 196 | struct ptp_extts_event { |
| 153 | 197 | struct ptp_clock_time t; /* Time event occured. */ |
| 154 | 198 | unsigned int index; /* Which channel produced the event. */ |
| @@ -329,6 +329,7 @@ struct mdp_superblock_1 { · 328 unmodified lines | ||
| 329 | 329 | #define MD_FEATURE_JOURNAL 512 /* support write cache */ |
| 330 | 330 | #define MD_FEATURE_PPL 1024 /* support PPL */ |
| 331 | 331 | #define MD_FEATURE_MULTIPLE_PPLS 2048 /* support for multiple PPLs */ |
| 332 | +#define MD_FEATURE_RAID0_LAYOUT 4096 /* layout is meaningful for RAID0 */ | |
| 332 | 333 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ |
| 333 | 334 | |MD_FEATURE_RECOVERY_OFFSET \ |
| 334 | 335 | |MD_FEATURE_RESHAPE_ACTIVE \ |
| @@ -341,6 +342,7 @@ struct mdp_superblock_1 { · 6 unmodified lines | ||
| 341 | 342 | |MD_FEATURE_JOURNAL \ |
| 342 | 343 | |MD_FEATURE_PPL \ |
| 343 | 344 | |MD_FEATURE_MULTIPLE_PPLS \ |
| 345 | + |MD_FEATURE_RAID0_LAYOUT \ | |
| 344 | 346 | ) |
| 345 | 347 | |
| 346 | 348 | struct r5l_payload_header { |
| @@ -250,6 +250,7 @@ struct rds_info_rdma_connection { · 249 unmodified lines | ||
| 250 | 250 | __u32 rdma_mr_max; |
| 251 | 251 | __u32 rdma_mr_size; |
| 252 | 252 | __u8 tos; |
| 253 | + __u8 sl; | |
| 253 | 254 | __u32 cache_allocs; |
| 254 | 255 | }; |
| 255 | 256 | |
| @@ -265,6 +266,7 @@ struct rds6_info_rdma_connection { · 9 unmodified lines | ||
| 265 | 266 | __u32 rdma_mr_max; |
| 266 | 267 | __u32 rdma_mr_size; |
| 267 | 268 | __u8 tos; |
| 269 | + __u8 sl; | |
| 268 | 270 | __u32 cache_allocs; |
| 269 | 271 | }; |
| 270 | 272 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0-or-later */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */ | |
| 2 | 2 | /* Types and definitions for AF_RXRPC. |
| 3 | 3 | * |
| 4 | 4 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. |
| @@ -134,6 +134,9 @@ typedef __s32 sctp_assoc_t; · 133 unmodified lines | ||
| 134 | 134 | #define SCTP_INTERLEAVING_SUPPORTED 125 |
| 135 | 135 | #define SCTP_SENDMSG_CONNECT 126 |
| 136 | 136 | #define SCTP_EVENT 127 |
| 137 | +#define SCTP_ASCONF_SUPPORTED 128 | |
| 138 | +#define SCTP_AUTH_SUPPORTED 129 | |
| 139 | +#define SCTP_ECN_SUPPORTED 130 | |
| 137 | 140 | |
| 138 | 141 | /* PR-SCTP policies */ |
| 139 | 142 | #define SCTP_PR_SCTP_NONE 0x0000 |
| @@ -150,9 +150,6 @@ · 149 unmodified lines | ||
| 150 | 150 | |
| 151 | 151 | #define PORT_PNX8XXX 70 |
| 152 | 152 | |
| 153 | −/* Hilscher netx */ | |
| 154 | −#define PORT_NETX 71 | |
| 155 | − | |
| 156 | 153 | /* SUN4V Hypervisor Console */ |
| 157 | 154 | #define PORT_SUNHV 72 |
| 158 | 155 | |
| @@ -164,9 +161,6 @@ · 5 unmodified lines | ||
| 164 | 161 | /* Blackfin bf5xx */ |
| 165 | 162 | #define PORT_BFIN 75 |
| 166 | 163 | |
| 167 | −/* Micrel KS8695 */ | |
| 168 | −#define PORT_KS8695 76 | |
| 169 | − | |
| 170 | 164 | /* Broadcom SB1250, etc. SOC */ |
| 171 | 165 | #define PORT_SB1250_DUART 77 |
| 172 | 166 | |
| @@ -293,4 +287,10 @@ · 120 unmodified lines | ||
| 293 | 287 | /* SiFive UART */ |
| 294 | 288 | #define PORT_SIFIVE_V0 120 |
| 295 | 289 | |
| 290 | +/* Sunix UART */ | |
| 291 | +#define PORT_SUNIX 121 | |
| 292 | + | |
| 293 | +/* Freescale Linflex UART */ | |
| 294 | +#define PORT_LINFLEXUART 121 | |
| 295 | + | |
| 296 | 296 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |
| @@ -82,5 +82,6 @@ · 81 unmodified lines | ||
| 82 | 82 | #define SERIO_EGALAX 0x3f |
| 83 | 83 | #define SERIO_PULSE8_CEC 0x40 |
| 84 | 84 | #define SERIO_RAINSHADOW_CEC 0x41 |
| 85 | +#define SERIO_FSIA6B 0x42 | |
| 85 | 86 | |
| 86 | 87 | #endif /* _UAPI_SERIO_H */ |
| @@ -6,17 +6,24 @@ · 5 unmodified lines | ||
| 6 | 6 | * Desired design of maximum size and alignment (see RFC2553) |
| 7 | 7 | */ |
| 8 | 8 | #define _K_SS_MAXSIZE 128 /* Implementation specific max size */ |
| 9 | −#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) | |
| 10 | − /* Implementation specific desired alignment */ | |
| 11 | 9 | |
| 12 | 10 | typedef unsigned short __kernel_sa_family_t; |
| 13 | 11 | |
| 12 | +/* | |
| 13 | + * The definition uses anonymous union and struct in order to control the | |
| 14 | + * default alignment. | |
| 15 | + */ | |
| 14 | 16 | struct __kernel_sockaddr_storage { |
| 15 | − __kernel_sa_family_t ss_family; /* address family */ | |
| 16 | − /* Following field(s) are implementation specific */ | |
| 17 | − char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; | |
| 17 | + union { | |
| 18 | + struct { | |
| 19 | + __kernel_sa_family_t ss_family; /* address family */ | |
| 20 | + /* Following field(s) are implementation specific */ | |
| 21 | + char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; | |
| 18 | 22 | /* space to achieve desired size, */ |
| 19 | 23 | /* _SS_MAXSIZE value minus size of ss_family */ |
| 20 | −} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | |
| 24 | + }; | |
| 25 | + void *__align; /* implementation specific desired alignment */ | |
| 26 | + }; | |
| 27 | +}; | |
| 21 | 28 | |
| 22 | 29 | #endif /* _UAPI_LINUX_SOCKET_H */ |
| @@ -270,6 +270,12 @@ struct tcp_info { · 269 unmodified lines | ||
| 270 | 270 | __u64 tcpi_bytes_retrans; /* RFC4898 tcpEStatsPerfOctetsRetrans */ |
| 271 | 271 | __u32 tcpi_dsack_dups; /* RFC4898 tcpEStatsStackDSACKDups */ |
| 272 | 272 | __u32 tcpi_reord_seen; /* reordering events seen */ |
| 273 | + | |
| 274 | + __u32 tcpi_rcv_ooopack; /* Out-of-order packets received */ | |
| 275 | + | |
| 276 | + __u32 tcpi_snd_wnd; /* peer's advertised receive window after | |
| 277 | + * scaling (bytes) | |
| 278 | + */ | |
| 273 | 279 | }; |
| 274 | 280 | |
| 275 | 281 | /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */ |
| @@ -109,4 +109,19 @@ struct tls12_crypto_info_aes_ccm_128 { · 108 unmodified lines | ||
| 109 | 109 | unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE]; |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | +enum { | |
| 113 | + TLS_INFO_UNSPEC, | |
| 114 | + TLS_INFO_VERSION, | |
| 115 | + TLS_INFO_CIPHER, | |
| 116 | + TLS_INFO_TXCONF, | |
| 117 | + TLS_INFO_RXCONF, | |
| 118 | + __TLS_INFO_MAX, | |
| 119 | +}; | |
| 120 | +#define TLS_INFO_MAX (__TLS_INFO_MAX - 1) | |
| 121 | + | |
| 122 | +#define TLS_CONF_BASE 1 | |
| 123 | +#define TLS_CONF_SW 2 | |
| 124 | +#define TLS_CONF_HW 3 | |
| 125 | +#define TLS_CONF_HW_RECORD 4 | |
| 126 | + | |
| 112 | 127 | #endif /* _UAPI_LINUX_TLS_H */ |
| @@ -894,6 +894,8 @@ struct usb_ext_cap_descriptor { /* Link Power Management */ · 893 unmodified lines | ||
| 894 | 894 | #define USB_BESL_SUPPORT (1 << 2) /* supports BESL */ |
| 895 | 895 | #define USB_BESL_BASELINE_VALID (1 << 3) /* Baseline BESL valid*/ |
| 896 | 896 | #define USB_BESL_DEEP_VALID (1 << 4) /* Deep BESL valid */ |
| 897 | +#define USB_SET_BESL_BASELINE(p) (((p) & 0xf) << 8) | |
| 898 | +#define USB_SET_BESL_DEEP(p) (((p) & 0xf) << 12) | |
| 897 | 899 | #define USB_GET_BESL_BASELINE(p) (((p) & (0xf << 8)) >> 8) |
| 898 | 900 | #define USB_GET_BESL_DEEP(p) (((p) & (0xf << 12)) >> 12) |
| 899 | 901 | } __attribute__((packed)); |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | |
| 2 | 2 | /* |
| 3 | 3 | * g_uvc.h -- USB Video Class Gadget driver API |
| 4 | 4 | * |
| @@ -158,6 +158,7 @@ struct usbdevfs_hub_portinfo { · 157 unmodified lines | ||
| 158 | 158 | #define USBDEVFS_CAP_MMAP 0x20 |
| 159 | 159 | #define USBDEVFS_CAP_DROP_PRIVILEGES 0x40 |
| 160 | 160 | #define USBDEVFS_CAP_CONNINFO_EX 0x80 |
| 161 | +#define USBDEVFS_CAP_SUSPEND 0x100 | |
| 161 | 162 | |
| 162 | 163 | /* USBDEVFS_DISCONNECT_CLAIM flags & struct */ |
| 163 | 164 | |
| @@ -223,5 +224,8 @@ struct usbdevfs_streams { · 59 unmodified lines | ||
| 223 | 224 | * extending size of the data returned. |
| 224 | 225 | */ |
| 225 | 226 | #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) |
| 227 | +#define USBDEVFS_FORBID_SUSPEND _IO('U', 33) | |
| 228 | +#define USBDEVFS_ALLOW_SUSPEND _IO('U', 34) | |
| 229 | +#define USBDEVFS_WAIT_FOR_RESUME _IO('U', 35) | |
| 226 | 230 | |
| 227 | 231 | #endif /* _UAPI_LINUX_USBDEVICE_FS_H */ |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */ | |
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */ | |
| 2 | 2 | /* |
| 3 | 3 | * Virtual Device for Guest <-> VMM/Host communication, type definitions |
| 4 | 4 | * which are also used for the vboxguest ioctl interface / by vboxsf |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */ | |
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */ | |
| 2 | 2 | /* |
| 3 | 3 | * VBoxGuest - VirtualBox Guest Additions Driver Interface. |
| 4 | 4 | * |
| @@ -295,15 +295,38 @@ struct vfio_region_info_cap_type { · 294 unmodified lines | ||
| 295 | 295 | __u32 subtype; /* type specific */ |
| 296 | 296 | }; |
| 297 | 297 | |
| 298 | +/* | |
| 299 | + * List of region types, global per bus driver. | |
| 300 | + * If you introduce a new type, please add it here. | |
| 301 | + */ | |
| 302 | + | |
| 303 | +/* PCI region type containing a PCI vendor part */ | |
| 298 | 304 | #define VFIO_REGION_TYPE_PCI_VENDOR_TYPE (1 << 31) |
| 299 | 305 | #define VFIO_REGION_TYPE_PCI_VENDOR_MASK (0xffff) |
| 306 | +#define VFIO_REGION_TYPE_GFX (1) | |
| 307 | +#define VFIO_REGION_TYPE_CCW (2) | |
| 308 | + | |
| 309 | +/* sub-types for VFIO_REGION_TYPE_PCI_* */ | |
| 300 | 310 | |
| 301 | −/* 8086 Vendor sub-types */ | |
| 311 | +/* 8086 vendor PCI sub-types */ | |
| 302 | 312 | #define VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION (1) |
| 303 | 313 | #define VFIO_REGION_SUBTYPE_INTEL_IGD_HOST_CFG (2) |
| 304 | 314 | #define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3) |
| 305 | 315 | |
| 306 | −#define VFIO_REGION_TYPE_GFX (1) | |
| 316 | +/* 10de vendor PCI sub-types */ | |
| 317 | +/* | |
| 318 | + * NVIDIA GPU NVlink2 RAM is coherent RAM mapped onto the host address space. | |
| 319 | + */ | |
| 320 | +#define VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM (1) | |
| 321 | + | |
| 322 | +/* 1014 vendor PCI sub-types */ | |
| 323 | +/* | |
| 324 | + * IBM NPU NVlink2 ATSD (Address Translation Shootdown) register of NPU | |
| 325 | + * to do TLB invalidation on a GPU. | |
| 326 | + */ | |
| 327 | +#define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1) | |
| 328 | + | |
| 329 | +/* sub-types for VFIO_REGION_TYPE_GFX */ | |
| 307 | 330 | #define VFIO_REGION_SUBTYPE_GFX_EDID (1) |
| 308 | 331 | |
| 309 | 332 | /** |
| @@ -353,25 +376,9 @@ struct vfio_region_gfx_edid { · 43 unmodified lines | ||
| 353 | 376 | #define VFIO_DEVICE_GFX_LINK_STATE_DOWN 2 |
| 354 | 377 | }; |
| 355 | 378 | |
| 356 | −#define VFIO_REGION_TYPE_CCW (2) | |
| 357 | −/* ccw sub-types */ | |
| 379 | +/* sub-types for VFIO_REGION_TYPE_CCW */ | |
| 358 | 380 | #define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1) |
| 359 | 381 | |
| 360 | −/* | |
| 361 | − * 10de vendor sub-type | |
| 362 | − * | |
| 363 | − * NVIDIA GPU NVlink2 RAM is coherent RAM mapped onto the host address space. | |
| 364 | − */ | |
| 365 | −#define VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM (1) | |
| 366 | − | |
| 367 | −/* | |
| 368 | − * 1014 vendor sub-type | |
| 369 | − * | |
| 370 | − * IBM NPU NVlink2 ATSD (Address Translation Shootdown) register of NPU | |
| 371 | − * to do TLB invalidation on a GPU. | |
| 372 | − */ | |
| 373 | −#define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1) | |
| 374 | − | |
| 375 | 382 | /* |
| 376 | 383 | * The MSIX mappable capability informs that MSIX data of a BAR can be mmapped |
| 377 | 384 | * which allows direct access to non-MSIX registers which happened to be within |
| @@ -714,7 +721,31 @@ struct vfio_iommu_type1_info { · 336 unmodified lines | ||
| 714 | 721 | __u32 argsz; |
| 715 | 722 | __u32 flags; |
| 716 | 723 | #define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page sizes info */ |
| 717 | − __u64 iova_pgsizes; /* Bitmap of supported page sizes */ | |
| 724 | +#define VFIO_IOMMU_INFO_CAPS (1 << 1) /* Info supports caps */ | |
| 725 | + __u64 iova_pgsizes; /* Bitmap of supported page sizes */ | |
| 726 | + __u32 cap_offset; /* Offset within info struct of first cap */ | |
| 727 | +}; | |
| 728 | + | |
| 729 | +/* | |
| 730 | + * The IOVA capability allows to report the valid IOVA range(s) | |
| 731 | + * excluding any non-relaxable reserved regions exposed by | |
| 732 | + * devices attached to the container. Any DMA map attempt | |
| 733 | + * outside the valid iova range will return error. | |
| 734 | + * | |
| 735 | + * The structures below define version 1 of this capability. | |
| 736 | + */ | |
| 737 | +#define VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE 1 | |
| 738 | + | |
| 739 | +struct vfio_iova_range { | |
| 740 | + __u64 start; | |
| 741 | + __u64 end; | |
| 742 | +}; | |
| 743 | + | |
| 744 | +struct vfio_iommu_type1_info_cap_iova_range { | |
| 745 | + struct vfio_info_cap_header header; | |
| 746 | + __u32 nr_iovas; | |
| 747 | + __u32 reserved; | |
| 748 | + struct vfio_iova_range iova_ranges[]; | |
| 718 | 749 | }; |
| 719 | 750 | |
| 720 | 751 | #define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) |
| @@ -518,7 +518,13 @@ struct v4l2_pix_format { · 517 unmodified lines | ||
| 518 | 518 | #define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */ |
| 519 | 519 | #define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */ |
| 520 | 520 | #define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */ |
| 521 | −#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('B', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */ | |
| 521 | + | |
| 522 | +/* | |
| 523 | + * Originally this had 'BA12' as fourcc, but this clashed with the older | |
| 524 | + * V4L2_PIX_FMT_SGRBG12 which inexplicably used that same fourcc. | |
| 525 | + * So use 'GA12' instead for V4L2_PIX_FMT_BGRA444. | |
| 526 | + */ | |
| 527 | +#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */ | |
| 522 | 528 | #define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */ |
| 523 | 529 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ |
| 524 | 530 | #define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ |
| @@ -768,8 +774,10 @@ struct v4l2_fmtdesc { · 243 unmodified lines | ||
| 768 | 774 | __u32 reserved[4]; |
| 769 | 775 | }; |
| 770 | 776 | |
| 771 | −#define V4L2_FMT_FLAG_COMPRESSED 0x0001 | |
| 772 | −#define V4L2_FMT_FLAG_EMULATED 0x0002 | |
| 777 | +#define V4L2_FMT_FLAG_COMPRESSED 0x0001 | |
| 778 | +#define V4L2_FMT_FLAG_EMULATED 0x0002 | |
| 779 | +#define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004 | |
| 780 | +#define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008 | |
| 773 | 781 | |
| 774 | 782 | /* Frame Size and frame rate enumeration */ |
| 775 | 783 | /* |
| @@ -0,0 +1,19 @@ | ||
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | |
| 2 | + | |
| 3 | +#ifndef _UAPI_LINUX_VIRTIO_FS_H | |
| 4 | +#define _UAPI_LINUX_VIRTIO_FS_H | |
| 5 | + | |
| 6 | +#include <linux/types.h> | |
| 7 | +#include <linux/virtio_ids.h> | |
| 8 | +#include <linux/virtio_config.h> | |
| 9 | +#include <linux/virtio_types.h> | |
| 10 | + | |
| 11 | +struct virtio_fs_config { | |
| 12 | + /* Filesystem name (UTF-8, not NUL-terminated, padded with NULs) */ | |
| 13 | + __u8 tag[36]; | |
| 14 | + | |
| 15 | + /* Number of request queues */ | |
| 16 | + __u32 num_request_queues; | |
| 17 | +} __attribute__((packed)); | |
| 18 | + | |
| 19 | +#endif /* _UAPI_LINUX_VIRTIO_FS_H */ | |
| @@ -44,6 +44,7 @@ · 43 unmodified lines | ||
| 44 | 44 | #define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */ |
| 45 | 45 | #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */ |
| 46 | 46 | #define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */ |
| 47 | +#define VIRTIO_ID_FS 26 /* virtio filesystem */ | |
| 47 | 48 | #define VIRTIO_ID_PMEM 27 /* virtio pmem */ |
| 48 | 49 | |
| 49 | 50 | #endif /* _LINUX_VIRTIO_IDS_H */ |
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: BSD-3-Clause */ |
| 2 | 2 | /* |
| 3 | − * Virtio-iommu definition v0.9 | |
| 3 | + * Virtio-iommu definition v0.12 | |
| 4 | 4 | * |
| 5 | − * Copyright (C) 2018 Arm Ltd. | |
| 5 | + * Copyright (C) 2019 Arm Ltd. | |
| 6 | 6 | */ |
| 7 | 7 | #ifndef _UAPI_LINUX_VIRTIO_IOMMU_H |
| 8 | 8 | #define _UAPI_LINUX_VIRTIO_IOMMU_H |
| @@ -11,26 +11,31 @@ · 2 unmodified lines | ||
| 11 | 11 | |
| 12 | 12 | /* Feature bits */ |
| 13 | 13 | #define VIRTIO_IOMMU_F_INPUT_RANGE 0 |
| 14 | −#define VIRTIO_IOMMU_F_DOMAIN_BITS 1 | |
| 14 | +#define VIRTIO_IOMMU_F_DOMAIN_RANGE 1 | |
| 15 | 15 | #define VIRTIO_IOMMU_F_MAP_UNMAP 2 |
| 16 | 16 | #define VIRTIO_IOMMU_F_BYPASS 3 |
| 17 | 17 | #define VIRTIO_IOMMU_F_PROBE 4 |
| 18 | +#define VIRTIO_IOMMU_F_MMIO 5 | |
| 18 | 19 | |
| 19 | −struct virtio_iommu_range { | |
| 20 | − __u64 start; | |
| 21 | − __u64 end; | |
| 20 | +struct virtio_iommu_range_64 { | |
| 21 | + __le64 start; | |
| 22 | + __le64 end; | |
| 23 | +}; | |
| 24 | + | |
| 25 | +struct virtio_iommu_range_32 { | |
| 26 | + __le32 start; | |
| 27 | + __le32 end; | |
| 22 | 28 | }; |
| 23 | 29 | |
| 24 | 30 | struct virtio_iommu_config { |
| 25 | 31 | /* Supported page sizes */ |
| 26 | − __u64 page_size_mask; | |
| 32 | + __le64 page_size_mask; | |
| 27 | 33 | /* Supported IOVA range */ |
| 28 | − struct virtio_iommu_range input_range; | |
| 34 | + struct virtio_iommu_range_64 input_range; | |
| 29 | 35 | /* Max domain ID size */ |
| 30 | − __u8 domain_bits; | |
| 31 | − __u8 padding[3]; | |
| 36 | + struct virtio_iommu_range_32 domain_range; | |
| 32 | 37 | /* Probe buffer size */ |
| 33 | − __u32 probe_size; | |
| 38 | + __le32 probe_size; | |
| 34 | 39 | }; |
| 35 | 40 | |
| 36 | 41 | /* Request types */ |
| @@ -49,6 +54,7 @@ struct virtio_iommu_config { · 12 unmodified lines | ||
| 49 | 54 | #define VIRTIO_IOMMU_S_RANGE 0x05 |
| 50 | 55 | #define VIRTIO_IOMMU_S_NOENT 0x06 |
| 51 | 56 | #define VIRTIO_IOMMU_S_FAULT 0x07 |
| 57 | +#define VIRTIO_IOMMU_S_NOMEM 0x08 | |
| 52 | 58 | |
| 53 | 59 | struct virtio_iommu_req_head { |
| 54 | 60 | __u8 type; |
| @@ -78,12 +84,10 @@ struct virtio_iommu_req_detach { · 23 unmodified lines | ||
| 78 | 84 | |
| 79 | 85 | #define VIRTIO_IOMMU_MAP_F_READ (1 << 0) |
| 80 | 86 | #define VIRTIO_IOMMU_MAP_F_WRITE (1 << 1) |
| 81 | −#define VIRTIO_IOMMU_MAP_F_EXEC (1 << 2) | |
| 82 | −#define VIRTIO_IOMMU_MAP_F_MMIO (1 << 3) | |
| 87 | +#define VIRTIO_IOMMU_MAP_F_MMIO (1 << 2) | |
| 83 | 88 | |
| 84 | 89 | #define VIRTIO_IOMMU_MAP_F_MASK (VIRTIO_IOMMU_MAP_F_READ | \ |
| 85 | 90 | VIRTIO_IOMMU_MAP_F_WRITE | \ |
| 86 | − VIRTIO_IOMMU_MAP_F_EXEC | \ | |
| 87 | 91 | VIRTIO_IOMMU_MAP_F_MMIO) |
| 88 | 92 | |
| 89 | 93 | struct virtio_iommu_req_map { |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ | |
| 1 | +/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause */ | |
| 2 | 2 | /* |
| 3 | 3 | * Definitions for virtio-pmem devices. |
| 4 | 4 | * |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | #ifndef _UAPI_VMCORE_H |
| 3 | 3 | #define _UAPI_VMCORE_H |
| 4 | 4 | |
| @@ -17,6 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | #define P_ALL 0 |
| 18 | 18 | #define P_PID 1 |
| 19 | 19 | #define P_PGID 2 |
| 20 | +#define P_PIDFD 3 | |
| 20 | 21 | |
| 21 | 22 | |
| 22 | 23 | #endif /* _UAPI_LINUX_WAIT_H */ |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0-only */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | |
| 2 | 2 | /* |
| 3 | 3 | * User API methods for ACPI-WMI mapping driver |
| 4 | 4 | * |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | |
| 3 | 3 | #ifndef __QCOM_FASTRPC_H__ |
| 4 | 4 | #define __QCOM_FASTRPC_H__ |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note |
| 2 | 2 | * |
| 3 | − * Copyright 2016-2018 HabanaLabs, Ltd. | |
| 3 | + * Copyright 2016-2019 HabanaLabs, Ltd. | |
| 4 | 4 | * All Rights Reserved. |
| 5 | 5 | * |
| 6 | 6 | */ |
| @@ -28,20 +28,20 @@ · 21 unmodified lines | ||
| 28 | 28 | |
| 29 | 29 | enum goya_queue_id { |
| 30 | 30 | GOYA_QUEUE_ID_DMA_0 = 0, |
| 31 | − GOYA_QUEUE_ID_DMA_1, | |
| 32 | − GOYA_QUEUE_ID_DMA_2, | |
| 33 | − GOYA_QUEUE_ID_DMA_3, | |
| 34 | − GOYA_QUEUE_ID_DMA_4, | |
| 35 | − GOYA_QUEUE_ID_CPU_PQ, | |
| 36 | − GOYA_QUEUE_ID_MME, /* Internal queues start here */ | |
| 37 | − GOYA_QUEUE_ID_TPC0, | |
| 38 | − GOYA_QUEUE_ID_TPC1, | |
| 39 | − GOYA_QUEUE_ID_TPC2, | |
| 40 | − GOYA_QUEUE_ID_TPC3, | |
| 41 | − GOYA_QUEUE_ID_TPC4, | |
| 42 | − GOYA_QUEUE_ID_TPC5, | |
| 43 | − GOYA_QUEUE_ID_TPC6, | |
| 44 | − GOYA_QUEUE_ID_TPC7, | |
| 31 | + GOYA_QUEUE_ID_DMA_1 = 1, | |
| 32 | + GOYA_QUEUE_ID_DMA_2 = 2, | |
| 33 | + GOYA_QUEUE_ID_DMA_3 = 3, | |
| 34 | + GOYA_QUEUE_ID_DMA_4 = 4, | |
| 35 | + GOYA_QUEUE_ID_CPU_PQ = 5, | |
| 36 | + GOYA_QUEUE_ID_MME = 6, /* Internal queues start here */ | |
| 37 | + GOYA_QUEUE_ID_TPC0 = 7, | |
| 38 | + GOYA_QUEUE_ID_TPC1 = 8, | |
| 39 | + GOYA_QUEUE_ID_TPC2 = 9, | |
| 40 | + GOYA_QUEUE_ID_TPC3 = 10, | |
| 41 | + GOYA_QUEUE_ID_TPC4 = 11, | |
| 42 | + GOYA_QUEUE_ID_TPC5 = 12, | |
| 43 | + GOYA_QUEUE_ID_TPC6 = 13, | |
| 44 | + GOYA_QUEUE_ID_TPC7 = 14, | |
| 45 | 45 | GOYA_QUEUE_ID_SIZE |
| 46 | 46 | }; |
| 47 | 47 | |
| @@ -75,12 +75,34 @@ enum hl_device_status { · 27 unmodified lines | ||
| 75 | 75 | HL_DEVICE_STATUS_MALFUNCTION |
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | −/* Opcode for management ioctl */ | |
| 79 | −#define HL_INFO_HW_IP_INFO 0 | |
| 80 | −#define HL_INFO_HW_EVENTS 1 | |
| 81 | −#define HL_INFO_DRAM_USAGE 2 | |
| 82 | −#define HL_INFO_HW_IDLE 3 | |
| 83 | −#define HL_INFO_DEVICE_STATUS 4 | |
| 78 | +/* Opcode for management ioctl | |
| 79 | + * | |
| 80 | + * HW_IP_INFO - Receive information about different IP blocks in the | |
| 81 | + * device. | |
| 82 | + * HL_INFO_HW_EVENTS - Receive an array describing how many times each event | |
| 83 | + * occurred since the last hard reset. | |
| 84 | + * HL_INFO_DRAM_USAGE - Retrieve the dram usage inside the device and of the | |
| 85 | + * specific context. This is relevant only for devices | |
| 86 | + * where the dram is managed by the kernel driver | |
| 87 | + * HL_INFO_HW_IDLE - Retrieve information about the idle status of each | |
| 88 | + * internal engine. | |
| 89 | + * HL_INFO_DEVICE_STATUS - Retrieve the device's status. This opcode doesn't | |
| 90 | + * require an open context. | |
| 91 | + * HL_INFO_DEVICE_UTILIZATION - Retrieve the total utilization of the device | |
| 92 | + * over the last period specified by the user. | |
| 93 | + * The period can be between 100ms to 1s, in | |
| 94 | + * resolution of 100ms. The return value is a | |
| 95 | + * percentage of the utilization rate. | |
| 96 | + * HL_INFO_HW_EVENTS_AGGREGATE - Receive an array describing how many times each | |
| 97 | + * event occurred since the driver was loaded. | |
| 98 | + */ | |
| 99 | +#define HL_INFO_HW_IP_INFO 0 | |
| 100 | +#define HL_INFO_HW_EVENTS 1 | |
| 101 | +#define HL_INFO_DRAM_USAGE 2 | |
| 102 | +#define HL_INFO_HW_IDLE 3 | |
| 103 | +#define HL_INFO_DEVICE_STATUS 4 | |
| 104 | +#define HL_INFO_DEVICE_UTILIZATION 6 | |
| 105 | +#define HL_INFO_HW_EVENTS_AGGREGATE 7 | |
| 84 | 106 | |
| 85 | 107 | #define HL_INFO_VERSION_MAX_LEN 128 |
| 86 | 108 | |
| @@ -122,6 +144,11 @@ struct hl_info_device_status { · 35 unmodified lines | ||
| 122 | 144 | __u32 pad; |
| 123 | 145 | }; |
| 124 | 146 | |
| 147 | +struct hl_info_device_utilization { | |
| 148 | + __u32 utilization; | |
| 149 | + __u32 pad; | |
| 150 | +}; | |
| 151 | + | |
| 125 | 152 | struct hl_info_args { |
| 126 | 153 | /* Location of relevant struct in userspace */ |
| 127 | 154 | __u64 return_pointer; |
| @@ -137,8 +164,15 @@ struct hl_info_args { · 9 unmodified lines | ||
| 137 | 164 | /* HL_INFO_* */ |
| 138 | 165 | __u32 op; |
| 139 | 166 | |
| 140 | − /* Context ID - Currently not in use */ | |
| 141 | − __u32 ctx_id; | |
| 167 | + union { | |
| 168 | + /* Context ID - Currently not in use */ | |
| 169 | + __u32 ctx_id; | |
| 170 | + /* Period value for utilization rate (100ms - 1000ms, in 100ms | |
| 171 | + * resolution. | |
| 172 | + */ | |
| 173 | + __u32 period_ms; | |
| 174 | + }; | |
| 175 | + | |
| 142 | 176 | __u32 pad; |
| 143 | 177 | }; |
| 144 | 178 | |
| @@ -295,12 +329,12 @@ struct hl_mem_in { · 150 unmodified lines | ||
| 295 | 329 | struct { |
| 296 | 330 | /* |
| 297 | 331 | * Requested virtual address of mapped memory. |
| 298 | − * KMD will try to map the requested region to this | |
| 299 | − * hint address, as long as the address is valid and | |
| 300 | − * not already mapped. The user should check the | |
| 332 | + * The driver will try to map the requested region to | |
| 333 | + * this hint address, as long as the address is valid | |
| 334 | + * and not already mapped. The user should check the | |
| 301 | 335 | * returned address of the IOCTL to make sure he got |
| 302 | − * the hint address. Passing 0 here means that KMD | |
| 303 | − * will choose the address itself. | |
| 336 | + * the hint address. Passing 0 here means that the | |
| 337 | + * driver will choose the address itself. | |
| 304 | 338 | */ |
| 305 | 339 | __u64 hint_addr; |
| 306 | 340 | /* Handle returned from HL_MEM_OP_ALLOC */ |
| @@ -313,12 +347,12 @@ struct hl_mem_in { · 6 unmodified lines | ||
| 313 | 347 | __u64 host_virt_addr; |
| 314 | 348 | /* |
| 315 | 349 | * Requested virtual address of mapped memory. |
| 316 | − * KMD will try to map the requested region to this | |
| 317 | − * hint address, as long as the address is valid and | |
| 318 | − * not already mapped. The user should check the | |
| 350 | + * The driver will try to map the requested region to | |
| 351 | + * this hint address, as long as the address is valid | |
| 352 | + * and not already mapped. The user should check the | |
| 319 | 353 | * returned address of the IOCTL to make sure he got |
| 320 | − * the hint address. Passing 0 here means that KMD | |
| 321 | − * will choose the address itself. | |
| 354 | + * the hint address. Passing 0 here means that the | |
| 355 | + * driver will choose the address itself. | |
| 322 | 356 | */ |
| 323 | 357 | __u64 hint_addr; |
| 324 | 358 | /* Size of allocated host memory */ |
| @@ -439,7 +473,7 @@ struct hl_debug_params_spmu { · 114 unmodified lines | ||
| 439 | 473 | #define HL_DEBUG_OP_BMON 4 |
| 440 | 474 | /* Opcode for SPMU component */ |
| 441 | 475 | #define HL_DEBUG_OP_SPMU 5 |
| 442 | −/* Opcode for timestamp */ | |
| 476 | +/* Opcode for timestamp (deprecated) */ | |
| 443 | 477 | #define HL_DEBUG_OP_TIMESTAMP 6 |
| 444 | 478 | /* Opcode for setting the device into or out of debug mode. The enable |
| 445 | 479 | * variable should be 1 for enabling debug mode and 0 for disabling it |
| @@ -0,0 +1,448 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | |
| 2 | +/* | |
| 3 | + * Xilinx SD-FEC | |
| 4 | + * | |
| 5 | + * Copyright (C) 2019 Xilinx, Inc. | |
| 6 | + * | |
| 7 | + * Description: | |
| 8 | + * This driver is developed for SDFEC16 IP. It provides a char device | |
| 9 | + * in sysfs and supports file operations like open(), close() and ioctl(). | |
| 10 | + */ | |
| 11 | +#ifndef __XILINX_SDFEC_H__ | |
| 12 | +#define __XILINX_SDFEC_H__ | |
| 13 | + | |
| 14 | +#include <linux/types.h> | |
| 15 | + | |
| 16 | +/* Shared LDPC Tables */ | |
| 17 | +#define XSDFEC_LDPC_SC_TABLE_ADDR_BASE (0x10000) | |
| 18 | +#define XSDFEC_LDPC_SC_TABLE_ADDR_HIGH (0x10400) | |
| 19 | +#define XSDFEC_LDPC_LA_TABLE_ADDR_BASE (0x18000) | |
| 20 | +#define XSDFEC_LDPC_LA_TABLE_ADDR_HIGH (0x19000) | |
| 21 | +#define XSDFEC_LDPC_QC_TABLE_ADDR_BASE (0x20000) | |
| 22 | +#define XSDFEC_LDPC_QC_TABLE_ADDR_HIGH (0x28000) | |
| 23 | + | |
| 24 | +/* LDPC tables depth */ | |
| 25 | +#define XSDFEC_SC_TABLE_DEPTH \ | |
| 26 | + (XSDFEC_LDPC_SC_TABLE_ADDR_HIGH - XSDFEC_LDPC_SC_TABLE_ADDR_BASE) | |
| 27 | +#define XSDFEC_LA_TABLE_DEPTH \ | |
| 28 | + (XSDFEC_LDPC_LA_TABLE_ADDR_HIGH - XSDFEC_LDPC_LA_TABLE_ADDR_BASE) | |
| 29 | +#define XSDFEC_QC_TABLE_DEPTH \ | |
| 30 | + (XSDFEC_LDPC_QC_TABLE_ADDR_HIGH - XSDFEC_LDPC_QC_TABLE_ADDR_BASE) | |
| 31 | + | |
| 32 | +/** | |
| 33 | + * enum xsdfec_code - Code Type. | |
| 34 | + * @XSDFEC_TURBO_CODE: Driver is configured for Turbo mode. | |
| 35 | + * @XSDFEC_LDPC_CODE: Driver is configured for LDPC mode. | |
| 36 | + * | |
| 37 | + * This enum is used to indicate the mode of the driver. The mode is determined | |
| 38 | + * by checking which codes are set in the driver. Note that the mode cannot be | |
| 39 | + * changed by the driver. | |
| 40 | + */ | |
| 41 | +enum xsdfec_code { | |
| 42 | + XSDFEC_TURBO_CODE = 0, | |
| 43 | + XSDFEC_LDPC_CODE, | |
| 44 | +}; | |
| 45 | + | |
| 46 | +/** | |
| 47 | + * enum xsdfec_order - Order | |
| 48 | + * @XSDFEC_MAINTAIN_ORDER: Maintain order execution of blocks. | |
| 49 | + * @XSDFEC_OUT_OF_ORDER: Out-of-order execution of blocks. | |
| 50 | + * | |
| 51 | + * This enum is used to indicate whether the order of blocks can change from | |
| 52 | + * input to output. | |
| 53 | + */ | |
| 54 | +enum xsdfec_order { | |
| 55 | + XSDFEC_MAINTAIN_ORDER = 0, | |
| 56 | + XSDFEC_OUT_OF_ORDER, | |
| 57 | +}; | |
| 58 | + | |
| 59 | +/** | |
| 60 | + * enum xsdfec_turbo_alg - Turbo Algorithm Type. | |
| 61 | + * @XSDFEC_MAX_SCALE: Max Log-Map algorithm with extrinsic scaling. When | |
| 62 | + * scaling is set to this is equivalent to the Max Log-Map | |
| 63 | + * algorithm. | |
| 64 | + * @XSDFEC_MAX_STAR: Log-Map algorithm. | |
| 65 | + * @XSDFEC_TURBO_ALG_MAX: Used to indicate out of bound Turbo algorithms. | |
| 66 | + * | |
| 67 | + * This enum specifies which Turbo Decode algorithm is in use. | |
| 68 | + */ | |
| 69 | +enum xsdfec_turbo_alg { | |
| 70 | + XSDFEC_MAX_SCALE = 0, | |
| 71 | + XSDFEC_MAX_STAR, | |
| 72 | + XSDFEC_TURBO_ALG_MAX, | |
| 73 | +}; | |
| 74 | + | |
| 75 | +/** | |
| 76 | + * enum xsdfec_state - State. | |
| 77 | + * @XSDFEC_INIT: Driver is initialized. | |
| 78 | + * @XSDFEC_STARTED: Driver is started. | |
| 79 | + * @XSDFEC_STOPPED: Driver is stopped. | |
| 80 | + * @XSDFEC_NEEDS_RESET: Driver needs to be reset. | |
| 81 | + * @XSDFEC_PL_RECONFIGURE: Programmable Logic needs to be recofigured. | |
| 82 | + * | |
| 83 | + * This enum is used to indicate the state of the driver. | |
| 84 | + */ | |
| 85 | +enum xsdfec_state { | |
| 86 | + XSDFEC_INIT = 0, | |
| 87 | + XSDFEC_STARTED, | |
| 88 | + XSDFEC_STOPPED, | |
| 89 | + XSDFEC_NEEDS_RESET, | |
| 90 | + XSDFEC_PL_RECONFIGURE, | |
| 91 | +}; | |
| 92 | + | |
| 93 | +/** | |
| 94 | + * enum xsdfec_axis_width - AXIS_WIDTH.DIN Setting for 128-bit width. | |
| 95 | + * @XSDFEC_1x128b: DIN data input stream consists of a 128-bit lane | |
| 96 | + * @XSDFEC_2x128b: DIN data input stream consists of two 128-bit lanes | |
| 97 | + * @XSDFEC_4x128b: DIN data input stream consists of four 128-bit lanes | |
| 98 | + * | |
| 99 | + * This enum is used to indicate the AXIS_WIDTH.DIN setting for 128-bit width. | |
| 100 | + * The number of lanes of the DIN data input stream depends upon the | |
| 101 | + * AXIS_WIDTH.DIN parameter. | |
| 102 | + */ | |
| 103 | +enum xsdfec_axis_width { | |
| 104 | + XSDFEC_1x128b = 1, | |
| 105 | + XSDFEC_2x128b = 2, | |
| 106 | + XSDFEC_4x128b = 4, | |
| 107 | +}; | |
| 108 | + | |
| 109 | +/** | |
| 110 | + * enum xsdfec_axis_word_include - Words Configuration. | |
| 111 | + * @XSDFEC_FIXED_VALUE: Fixed, the DIN_WORDS AXI4-Stream interface is removed | |
| 112 | + * from the IP instance and is driven with the specified | |
| 113 | + * number of words. | |
| 114 | + * @XSDFEC_IN_BLOCK: In Block, configures the IP instance to expect a single | |
| 115 | + * DIN_WORDS value per input code block. The DIN_WORDS | |
| 116 | + * interface is present. | |
| 117 | + * @XSDFEC_PER_AXI_TRANSACTION: Per Transaction, configures the IP instance to | |
| 118 | + * expect one DIN_WORDS value per input transaction on the DIN interface. The | |
| 119 | + * DIN_WORDS interface is present. | |
| 120 | + * @XSDFEC_AXIS_WORDS_INCLUDE_MAX: Used to indicate out of bound Words | |
| 121 | + * Configurations. | |
| 122 | + * | |
| 123 | + * This enum is used to specify the DIN_WORDS configuration. | |
| 124 | + */ | |
| 125 | +enum xsdfec_axis_word_include { | |
| 126 | + XSDFEC_FIXED_VALUE = 0, | |
| 127 | + XSDFEC_IN_BLOCK, | |
| 128 | + XSDFEC_PER_AXI_TRANSACTION, | |
| 129 | + XSDFEC_AXIS_WORDS_INCLUDE_MAX, | |
| 130 | +}; | |
| 131 | + | |
| 132 | +/** | |
| 133 | + * struct xsdfec_turbo - User data for Turbo codes. | |
| 134 | + * @alg: Specifies which Turbo decode algorithm to use | |
| 135 | + * @scale: Specifies the extrinsic scaling to apply when the Max Scale algorithm | |
| 136 | + * has been selected | |
| 137 | + * | |
| 138 | + * Turbo code structure to communicate parameters to XSDFEC driver. | |
| 139 | + */ | |
| 140 | +struct xsdfec_turbo { | |
| 141 | + __u32 alg; | |
| 142 | + __u8 scale; | |
| 143 | +}; | |
| 144 | + | |
| 145 | +/** | |
| 146 | + * struct xsdfec_ldpc_params - User data for LDPC codes. | |
| 147 | + * @n: Number of code word bits | |
| 148 | + * @k: Number of information bits | |
| 149 | + * @psize: Size of sub-matrix | |
| 150 | + * @nlayers: Number of layers in code | |
| 151 | + * @nqc: Quasi Cyclic Number | |
| 152 | + * @nmqc: Number of M-sized QC operations in parity check matrix | |
| 153 | + * @nm: Number of M-size vectors in N | |
| 154 | + * @norm_type: Normalization required or not | |
| 155 | + * @no_packing: Determines if multiple QC ops should be performed | |
| 156 | + * @special_qc: Sub-Matrix property for Circulant weight > 0 | |
| 157 | + * @no_final_parity: Decide if final parity check needs to be performed | |
| 158 | + * @max_schedule: Experimental code word scheduling limit | |
| 159 | + * @sc_off: SC offset | |
| 160 | + * @la_off: LA offset | |
| 161 | + * @qc_off: QC offset | |
| 162 | + * @sc_table: Pointer to SC Table which must be page aligned | |
| 163 | + * @la_table: Pointer to LA Table which must be page aligned | |
| 164 | + * @qc_table: Pointer to QC Table which must be page aligned | |
| 165 | + * @code_id: LDPC Code | |
| 166 | + * | |
| 167 | + * This structure describes the LDPC code that is passed to the driver by the | |
| 168 | + * application. | |
| 169 | + */ | |
| 170 | +struct xsdfec_ldpc_params { | |
| 171 | + __u32 n; | |
| 172 | + __u32 k; | |
| 173 | + __u32 psize; | |
| 174 | + __u32 nlayers; | |
| 175 | + __u32 nqc; | |
| 176 | + __u32 nmqc; | |
| 177 | + __u32 nm; | |
| 178 | + __u32 norm_type; | |
| 179 | + __u32 no_packing; | |
| 180 | + __u32 special_qc; | |
| 181 | + __u32 no_final_parity; | |
| 182 | + __u32 max_schedule; | |
| 183 | + __u32 sc_off; | |
| 184 | + __u32 la_off; | |
| 185 | + __u32 qc_off; | |
| 186 | + __u32 *sc_table; | |
| 187 | + __u32 *la_table; | |
| 188 | + __u32 *qc_table; | |
| 189 | + __u16 code_id; | |
| 190 | +}; | |
| 191 | + | |
| 192 | +/** | |
| 193 | + * struct xsdfec_status - Status of SD-FEC core. | |
| 194 | + * @state: State of the SD-FEC core | |
| 195 | + * @activity: Describes if the SD-FEC instance is Active | |
| 196 | + */ | |
| 197 | +struct xsdfec_status { | |
| 198 | + __u32 state; | |
| 199 | + __s8 activity; | |
| 200 | +}; | |
| 201 | + | |
| 202 | +/** | |
| 203 | + * struct xsdfec_irq - Enabling or Disabling Interrupts. | |
| 204 | + * @enable_isr: If true enables the ISR | |
| 205 | + * @enable_ecc_isr: If true enables the ECC ISR | |
| 206 | + */ | |
| 207 | +struct xsdfec_irq { | |
| 208 | + __s8 enable_isr; | |
| 209 | + __s8 enable_ecc_isr; | |
| 210 | +}; | |
| 211 | + | |
| 212 | +/** | |
| 213 | + * struct xsdfec_config - Configuration of SD-FEC core. | |
| 214 | + * @code: The codes being used by the SD-FEC instance | |
| 215 | + * @order: Order of Operation | |
| 216 | + * @din_width: Width of the DIN AXI4-Stream | |
| 217 | + * @din_word_include: How DIN_WORDS are inputted | |
| 218 | + * @dout_width: Width of the DOUT AXI4-Stream | |
| 219 | + * @dout_word_include: HOW DOUT_WORDS are outputted | |
| 220 | + * @irq: Enabling or disabling interrupts | |
| 221 | + * @bypass: Is the core being bypassed | |
| 222 | + * @code_wr_protect: Is write protection of LDPC codes enabled | |
| 223 | + */ | |
| 224 | +struct xsdfec_config { | |
| 225 | + __u32 code; | |
| 226 | + __u32 order; | |
| 227 | + __u32 din_width; | |
| 228 | + __u32 din_word_include; | |
| 229 | + __u32 dout_width; | |
| 230 | + __u32 dout_word_include; | |
| 231 | + struct xsdfec_irq irq; | |
| 232 | + __s8 bypass; | |
| 233 | + __s8 code_wr_protect; | |
| 234 | +}; | |
| 235 | + | |
| 236 | +/** | |
| 237 | + * struct xsdfec_stats - Stats retrived by ioctl XSDFEC_GET_STATS. Used | |
| 238 | + * to buffer atomic_t variables from struct | |
| 239 | + * xsdfec_dev. Counts are accumulated until | |
| 240 | + * the user clears them. | |
| 241 | + * @isr_err_count: Count of ISR errors | |
| 242 | + * @cecc_count: Count of Correctable ECC errors (SBE) | |
| 243 | + * @uecc_count: Count of Uncorrectable ECC errors (MBE) | |
| 244 | + */ | |
| 245 | +struct xsdfec_stats { | |
| 246 | + __u32 isr_err_count; | |
| 247 | + __u32 cecc_count; | |
| 248 | + __u32 uecc_count; | |
| 249 | +}; | |
| 250 | + | |
| 251 | +/** | |
| 252 | + * struct xsdfec_ldpc_param_table_sizes - Used to store sizes of SD-FEC table | |
| 253 | + * entries for an individual LPDC code | |
| 254 | + * parameter. | |
| 255 | + * @sc_size: Size of SC table used | |
| 256 | + * @la_size: Size of LA table used | |
| 257 | + * @qc_size: Size of QC table used | |
| 258 | + */ | |
| 259 | +struct xsdfec_ldpc_param_table_sizes { | |
| 260 | + __u32 sc_size; | |
| 261 | + __u32 la_size; | |
| 262 | + __u32 qc_size; | |
| 263 | +}; | |
| 264 | + | |
| 265 | +/* | |
| 266 | + * XSDFEC IOCTL List | |
| 267 | + */ | |
| 268 | +#define XSDFEC_MAGIC 'f' | |
| 269 | +/** | |
| 270 | + * DOC: XSDFEC_START_DEV | |
| 271 | + * | |
| 272 | + * @Description | |
| 273 | + * | |
| 274 | + * ioctl to start SD-FEC core | |
| 275 | + * | |
| 276 | + * This fails if the XSDFEC_SET_ORDER ioctl has not been previously called | |
| 277 | + */ | |
| 278 | +#define XSDFEC_START_DEV _IO(XSDFEC_MAGIC, 0) | |
| 279 | +/** | |
| 280 | + * DOC: XSDFEC_STOP_DEV | |
| 281 | + * | |
| 282 | + * @Description | |
| 283 | + * | |
| 284 | + * ioctl to stop the SD-FEC core | |
| 285 | + */ | |
| 286 | +#define XSDFEC_STOP_DEV _IO(XSDFEC_MAGIC, 1) | |
| 287 | +/** | |
| 288 | + * DOC: XSDFEC_GET_STATUS | |
| 289 | + * | |
| 290 | + * @Description | |
| 291 | + * | |
| 292 | + * ioctl that returns status of SD-FEC core | |
| 293 | + */ | |
| 294 | +#define XSDFEC_GET_STATUS _IOR(XSDFEC_MAGIC, 2, struct xsdfec_status) | |
| 295 | +/** | |
| 296 | + * DOC: XSDFEC_SET_IRQ | |
| 297 | + * @Parameters | |
| 298 | + * | |
| 299 | + * @struct xsdfec_irq * | |
| 300 | + * Pointer to the &struct xsdfec_irq that contains the interrupt settings | |
| 301 | + * for the SD-FEC core | |
| 302 | + * | |
| 303 | + * @Description | |
| 304 | + * | |
| 305 | + * ioctl to enable or disable irq | |
| 306 | + */ | |
| 307 | +#define XSDFEC_SET_IRQ _IOW(XSDFEC_MAGIC, 3, struct xsdfec_irq) | |
| 308 | +/** | |
| 309 | + * DOC: XSDFEC_SET_TURBO | |
| 310 | + * @Parameters | |
| 311 | + * | |
| 312 | + * @struct xsdfec_turbo * | |
| 313 | + * Pointer to the &struct xsdfec_turbo that contains the Turbo decode | |
| 314 | + * settings for the SD-FEC core | |
| 315 | + * | |
| 316 | + * @Description | |
| 317 | + * | |
| 318 | + * ioctl that sets the SD-FEC Turbo parameter values | |
| 319 | + * | |
| 320 | + * This can only be used when the driver is in the XSDFEC_STOPPED state | |
| 321 | + */ | |
| 322 | +#define XSDFEC_SET_TURBO _IOW(XSDFEC_MAGIC, 4, struct xsdfec_turbo) | |
| 323 | +/** | |
| 324 | + * DOC: XSDFEC_ADD_LDPC_CODE_PARAMS | |
| 325 | + * @Parameters | |
| 326 | + * | |
| 327 | + * @struct xsdfec_ldpc_params * | |
| 328 | + * Pointer to the &struct xsdfec_ldpc_params that contains the LDPC code | |
| 329 | + * parameters to be added to the SD-FEC Block | |
| 330 | + * | |
| 331 | + * @Description | |
| 332 | + * ioctl to add an LDPC code to the SD-FEC LDPC codes | |
| 333 | + * | |
| 334 | + * This can only be used when: | |
| 335 | + * | |
| 336 | + * - Driver is in the XSDFEC_STOPPED state | |
| 337 | + * | |
| 338 | + * - SD-FEC core is configured as LPDC | |
| 339 | + * | |
| 340 | + * - SD-FEC Code Write Protection is disabled | |
| 341 | + */ | |
| 342 | +#define XSDFEC_ADD_LDPC_CODE_PARAMS \ | |
| 343 | + _IOW(XSDFEC_MAGIC, 5, struct xsdfec_ldpc_params) | |
| 344 | +/** | |
| 345 | + * DOC: XSDFEC_GET_CONFIG | |
| 346 | + * @Parameters | |
| 347 | + * | |
| 348 | + * @struct xsdfec_config * | |
| 349 | + * Pointer to the &struct xsdfec_config that contains the current | |
| 350 | + * configuration settings of the SD-FEC Block | |
| 351 | + * | |
| 352 | + * @Description | |
| 353 | + * | |
| 354 | + * ioctl that returns SD-FEC core configuration | |
| 355 | + */ | |
| 356 | +#define XSDFEC_GET_CONFIG _IOR(XSDFEC_MAGIC, 6, struct xsdfec_config) | |
| 357 | +/** | |
| 358 | + * DOC: XSDFEC_GET_TURBO | |
| 359 | + * @Parameters | |
| 360 | + * | |
| 361 | + * @struct xsdfec_turbo * | |
| 362 | + * Pointer to the &struct xsdfec_turbo that contains the current Turbo | |
| 363 | + * decode settings of the SD-FEC Block | |
| 364 | + * | |
| 365 | + * @Description | |
| 366 | + * | |
| 367 | + * ioctl that returns SD-FEC turbo param values | |
| 368 | + */ | |
| 369 | +#define XSDFEC_GET_TURBO _IOR(XSDFEC_MAGIC, 7, struct xsdfec_turbo) | |
| 370 | +/** | |
| 371 | + * DOC: XSDFEC_SET_ORDER | |
| 372 | + * @Parameters | |
| 373 | + * | |
| 374 | + * @struct unsigned long * | |
| 375 | + * Pointer to the unsigned long that contains a value from the | |
| 376 | + * @enum xsdfec_order | |
| 377 | + * | |
| 378 | + * @Description | |
| 379 | + * | |
| 380 | + * ioctl that sets order, if order of blocks can change from input to output | |
| 381 | + * | |
| 382 | + * This can only be used when the driver is in the XSDFEC_STOPPED state | |
| 383 | + */ | |
| 384 | +#define XSDFEC_SET_ORDER _IOW(XSDFEC_MAGIC, 8, unsigned long) | |
| 385 | +/** | |
| 386 | + * DOC: XSDFEC_SET_BYPASS | |
| 387 | + * @Parameters | |
| 388 | + * | |
| 389 | + * @struct bool * | |
| 390 | + * Pointer to bool that sets the bypass value, where false results in | |
| 391 | + * normal operation and false results in the SD-FEC performing the | |
| 392 | + * configured operations (same number of cycles) but output data matches | |
| 393 | + * the input data | |
| 394 | + * | |
| 395 | + * @Description | |
| 396 | + * | |
| 397 | + * ioctl that sets bypass. | |
| 398 | + * | |
| 399 | + * This can only be used when the driver is in the XSDFEC_STOPPED state | |
| 400 | + */ | |
| 401 | +#define XSDFEC_SET_BYPASS _IOW(XSDFEC_MAGIC, 9, bool) | |
| 402 | +/** | |
| 403 | + * DOC: XSDFEC_IS_ACTIVE | |
| 404 | + * @Parameters | |
| 405 | + * | |
| 406 | + * @struct bool * | |
| 407 | + * Pointer to bool that returns true if the SD-FEC is processing data | |
| 408 | + * | |
| 409 | + * @Description | |
| 410 | + * | |
| 411 | + * ioctl that determines if SD-FEC is processing data | |
| 412 | + */ | |
| 413 | +#define XSDFEC_IS_ACTIVE _IOR(XSDFEC_MAGIC, 10, bool) | |
| 414 | +/** | |
| 415 | + * DOC: XSDFEC_CLEAR_STATS | |
| 416 | + * | |
| 417 | + * @Description | |
| 418 | + * | |
| 419 | + * ioctl that clears error stats collected during interrupts | |
| 420 | + */ | |
| 421 | +#define XSDFEC_CLEAR_STATS _IO(XSDFEC_MAGIC, 11) | |
| 422 | +/** | |
| 423 | + * DOC: XSDFEC_GET_STATS | |
| 424 | + * @Parameters | |
| 425 | + * | |
| 426 | + * @struct xsdfec_stats * | |
| 427 | + * Pointer to the &struct xsdfec_stats that will contain the updated stats | |
| 428 | + * values | |
| 429 | + * | |
| 430 | + * @Description | |
| 431 | + * | |
| 432 | + * ioctl that returns SD-FEC core stats | |
| 433 | + * | |
| 434 | + * This can only be used when the driver is in the XSDFEC_STOPPED state | |
| 435 | + */ | |
| 436 | +#define XSDFEC_GET_STATS _IOR(XSDFEC_MAGIC, 12, struct xsdfec_stats) | |
| 437 | +/** | |
| 438 | + * DOC: XSDFEC_SET_DEFAULT_CONFIG | |
| 439 | + * | |
| 440 | + * @Description | |
| 441 | + * | |
| 442 | + * ioctl that returns SD-FEC core to default config, use after a reset | |
| 443 | + * | |
| 444 | + * This can only be used when the driver is in the XSDFEC_STOPPED state | |
| 445 | + */ | |
| 446 | +#define XSDFEC_SET_DEFAULT_CONFIG _IO(XSDFEC_MAGIC, 13) | |
| 447 | + | |
| 448 | +#endif /* __XILINX_SDFEC_H__ */ | |
| @@ -43,6 +43,7 @@ enum mlx5_ib_uapi_flow_table_type { · 42 unmodified lines | ||
| 43 | 43 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX = 0x0, |
| 44 | 44 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, |
| 45 | 45 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB = 0x2, |
| 46 | + MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX = 0x3, | |
| 46 | 47 | }; |
| 47 | 48 | |
| 48 | 49 | enum mlx5_ib_uapi_flow_action_packet_reformat_type { |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ | |
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * This file contains defines, structures, etc. that are used |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ | |
| 1 | +/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) or BSD-3-Clause */ | |
| 2 | 2 | |
| 3 | 3 | /* Authors: Bernard Metzler <bmt@zurich.ibm.com> */ |
| 4 | 4 | /* Copyright (c) 2008-2019, IBM Corporation */ |
| @@ -180,6 +180,7 @@ struct siw_cqe { · 175 unmodified lines | ||
| 180 | 180 | * to control CQ arming. |
| 181 | 181 | */ |
| 182 | 182 | struct siw_cq_ctrl { |
| 183 | − __aligned_u64 notify; | |
| 183 | + __u32 flags; | |
| 184 | + __u32 pad; | |
| 184 | 185 | }; |
| 185 | 186 | #endif |
| @@ -8,6 +8,8 @@ · 7 unmodified lines | ||
| 8 | 8 | #ifndef SCSI_BSG_FC_H |
| 9 | 9 | #define SCSI_BSG_FC_H |
| 10 | 10 | |
| 11 | +#include <linux/types.h> | |
| 12 | + | |
| 11 | 13 | /* |
| 12 | 14 | * This file intended to be included by both kernel and user space |
| 13 | 15 | */ |
| @@ -66,10 +68,10 @@ · 52 unmodified lines | ||
| 66 | 68 | * with the transport upon completion of the login. |
| 67 | 69 | */ |
| 68 | 70 | struct fc_bsg_host_add_rport { |
| 69 | − uint8_t reserved; | |
| 71 | + __u8 reserved; | |
| 70 | 72 | |
| 71 | 73 | /* FC Address Identier of the remote port to login to */ |
| 72 | − uint8_t port_id[3]; | |
| 74 | + __u8 port_id[3]; | |
| 73 | 75 | }; |
| 74 | 76 | |
| 75 | 77 | /* Response: |
| @@ -87,10 +89,10 @@ struct fc_bsg_host_add_rport { · 11 unmodified lines | ||
| 87 | 89 | * remain logged in with the remote port. |
| 88 | 90 | */ |
| 89 | 91 | struct fc_bsg_host_del_rport { |
| 90 | − uint8_t reserved; | |
| 92 | + __u8 reserved; | |
| 91 | 93 | |
| 92 | 94 | /* FC Address Identier of the remote port to logout of */ |
| 93 | − uint8_t port_id[3]; | |
| 95 | + __u8 port_id[3]; | |
| 94 | 96 | }; |
| 95 | 97 | |
| 96 | 98 | /* Response: |
| @@ -111,10 +113,10 @@ struct fc_bsg_host_els { · 14 unmodified lines | ||
| 111 | 113 | * ELS Command Code being sent (must be the same as byte 0 |
| 112 | 114 | * of the payload) |
| 113 | 115 | */ |
| 114 | − uint8_t command_code; | |
| 116 | + __u8 command_code; | |
| 115 | 117 | |
| 116 | 118 | /* FC Address Identier of the remote port to send the ELS to */ |
| 117 | − uint8_t port_id[3]; | |
| 119 | + __u8 port_id[3]; | |
| 118 | 120 | }; |
| 119 | 121 | |
| 120 | 122 | /* Response: |
| @@ -151,14 +153,14 @@ struct fc_bsg_ctels_reply { · 30 unmodified lines | ||
| 151 | 153 | * Note: x_RJT/BSY status will indicae that the rjt_data field |
| 152 | 154 | * is valid and contains the reason/explanation values. |
| 153 | 155 | */ |
| 154 | − uint32_t status; /* See FC_CTELS_STATUS_xxx */ | |
| 156 | + __u32 status; /* See FC_CTELS_STATUS_xxx */ | |
| 155 | 157 | |
| 156 | 158 | /* valid if status is not FC_CTELS_STATUS_OK */ |
| 157 | 159 | struct { |
| 158 | − uint8_t action; /* fragment_id for CT REJECT */ | |
| 159 | − uint8_t reason_code; | |
| 160 | − uint8_t reason_explanation; | |
| 161 | − uint8_t vendor_unique; | |
| 160 | + __u8 action; /* fragment_id for CT REJECT */ | |
| 161 | + __u8 reason_code; | |
| 162 | + __u8 reason_explanation; | |
| 163 | + __u8 vendor_unique; | |
| 162 | 164 | } rjt_data; |
| 163 | 165 | }; |
| 164 | 166 | |
| @@ -174,17 +176,17 @@ struct fc_bsg_ctels_reply { · 9 unmodified lines | ||
| 174 | 176 | * and whether to tear it down after the request. |
| 175 | 177 | */ |
| 176 | 178 | struct fc_bsg_host_ct { |
| 177 | − uint8_t reserved; | |
| 179 | + __u8 reserved; | |
| 178 | 180 | |
| 179 | 181 | /* FC Address Identier of the remote port to send the ELS to */ |
| 180 | − uint8_t port_id[3]; | |
| 182 | + __u8 port_id[3]; | |
| 181 | 183 | |
| 182 | 184 | /* |
| 183 | 185 | * We need words 0-2 of the generic preamble for the LLD's |
| 184 | 186 | */ |
| 185 | − uint32_t preamble_word0; /* revision & IN_ID */ | |
| 186 | − uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ | |
| 187 | − uint32_t preamble_word2; /* Cmd Code, Max Size */ | |
| 187 | + __u32 preamble_word0; /* revision & IN_ID */ | |
| 188 | + __u32 preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ | |
| 189 | + __u32 preamble_word2; /* Cmd Code, Max Size */ | |
| 188 | 190 | |
| 189 | 191 | }; |
| 190 | 192 | /* Response: |
| @@ -204,17 +206,17 @@ struct fc_bsg_host_vendor { · 13 unmodified lines | ||
| 204 | 206 | * Identifies the vendor that the message is formatted for. This |
| 205 | 207 | * should be the recipient of the message. |
| 206 | 208 | */ |
| 207 | − uint64_t vendor_id; | |
| 209 | + __u64 vendor_id; | |
| 208 | 210 | |
| 209 | 211 | /* start of vendor command area */ |
| 210 | − uint32_t vendor_cmd[0]; | |
| 212 | + __u32 vendor_cmd[0]; | |
| 211 | 213 | }; |
| 212 | 214 | |
| 213 | 215 | /* Response: |
| 214 | 216 | */ |
| 215 | 217 | struct fc_bsg_host_vendor_reply { |
| 216 | 218 | /* start of vendor response area */ |
| 217 | − uint32_t vendor_rsp[0]; | |
| 219 | + __u32 vendor_rsp[0]; | |
| 218 | 220 | }; |
| 219 | 221 | |
| 220 | 222 | |
| @@ -233,7 +235,7 @@ struct fc_bsg_rport_els { · 12 unmodified lines | ||
| 233 | 235 | * ELS Command Code being sent (must be the same as |
| 234 | 236 | * byte 0 of the payload) |
| 235 | 237 | */ |
| 236 | − uint8_t els_code; | |
| 238 | + __u8 els_code; | |
| 237 | 239 | }; |
| 238 | 240 | |
| 239 | 241 | /* Response: |
| @@ -251,9 +253,9 @@ struct fc_bsg_rport_ct { · 11 unmodified lines | ||
| 251 | 253 | /* |
| 252 | 254 | * We need words 0-2 of the generic preamble for the LLD's |
| 253 | 255 | */ |
| 254 | − uint32_t preamble_word0; /* revision & IN_ID */ | |
| 255 | − uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ | |
| 256 | − uint32_t preamble_word2; /* Cmd Code, Max Size */ | |
| 256 | + __u32 preamble_word0; /* revision & IN_ID */ | |
| 257 | + __u32 preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ | |
| 258 | + __u32 preamble_word2; /* Cmd Code, Max Size */ | |
| 257 | 259 | }; |
| 258 | 260 | /* Response: |
| 259 | 261 | * |
| @@ -265,7 +267,7 @@ struct fc_bsg_rport_ct { · 5 unmodified lines | ||
| 265 | 267 | |
| 266 | 268 | /* request (CDB) structure of the sg_io_v4 */ |
| 267 | 269 | struct fc_bsg_request { |
| 268 | − uint32_t msgcode; | |
| 270 | + __u32 msgcode; | |
| 269 | 271 | union { |
| 270 | 272 | struct fc_bsg_host_add_rport h_addrport; |
| 271 | 273 | struct fc_bsg_host_del_rport h_delrport; |
| @@ -289,10 +291,10 @@ struct fc_bsg_reply { · 17 unmodified lines | ||
| 289 | 291 | * msg and status fields. The per-msgcode reply structure |
| 290 | 292 | * will contain valid data. |
| 291 | 293 | */ |
| 292 | − uint32_t result; | |
| 294 | + __u32 result; | |
| 293 | 295 | |
| 294 | 296 | /* If there was reply_payload, how much was recevied ? */ |
| 295 | − uint32_t reply_payload_rcv_len; | |
| 297 | + __u32 reply_payload_rcv_len; | |
| 296 | 298 | |
| 297 | 299 | union { |
| 298 | 300 | struct fc_bsg_host_vendor_reply vendor_reply; |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | /* |
| 3 | 3 | * UFS Transport SGIO v4 BSG Message Support |
| 4 | 4 | * |
| @@ -26,12 +26,12 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | /* SCSI_TRANSPORT_MSG event message header */ |
| 28 | 28 | struct scsi_nl_hdr { |
| 29 | − uint8_t version; | |
| 30 | − uint8_t transport; | |
| 31 | − uint16_t magic; | |
| 32 | − uint16_t msgtype; | |
| 33 | − uint16_t msglen; | |
| 34 | −} __attribute__((aligned(sizeof(uint64_t)))); | |
| 29 | + __u8 version; | |
| 30 | + __u8 transport; | |
| 31 | + __u16 magic; | |
| 32 | + __u16 msgtype; | |
| 33 | + __u16 msglen; | |
| 34 | +} __attribute__((aligned(sizeof(__u64)))); | |
| 35 | 35 | |
| 36 | 36 | /* scsi_nl_hdr->version value */ |
| 37 | 37 | #define SCSI_NL_VERSION 1 |
| @@ -75,10 +75,10 @@ struct scsi_nl_hdr { · 37 unmodified lines | ||
| 75 | 75 | */ |
| 76 | 76 | struct scsi_nl_host_vendor_msg { |
| 77 | 77 | struct scsi_nl_hdr snlh; /* must be 1st element ! */ |
| 78 | − uint64_t vendor_id; | |
| 79 | − uint16_t host_no; | |
| 80 | − uint16_t vmsg_datalen; | |
| 81 | −} __attribute__((aligned(sizeof(uint64_t)))); | |
| 78 | + __u64 vendor_id; | |
| 79 | + __u16 host_no; | |
| 80 | + __u16 vmsg_datalen; | |
| 81 | +} __attribute__((aligned(sizeof(__u64)))); | |
| 82 | 82 | |
| 83 | 83 | |
| 84 | 84 | /* |
| @@ -7,6 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | #ifndef SCSI_NETLINK_FC_H |
| 8 | 8 | #define SCSI_NETLINK_FC_H |
| 9 | 9 | |
| 10 | +#include <linux/types.h> | |
| 10 | 11 | #include <scsi/scsi_netlink.h> |
| 11 | 12 | |
| 12 | 13 | /* |
| @@ -43,14 +44,14 @@ · 30 unmodified lines | ||
| 43 | 44 | */ |
| 44 | 45 | struct fc_nl_event { |
| 45 | 46 | struct scsi_nl_hdr snlh; /* must be 1st element ! */ |
| 46 | − uint64_t seconds; | |
| 47 | − uint64_t vendor_id; | |
| 48 | − uint16_t host_no; | |
| 49 | − uint16_t event_datalen; | |
| 50 | − uint32_t event_num; | |
| 51 | − uint32_t event_code; | |
| 52 | − uint32_t event_data; | |
| 53 | −} __attribute__((aligned(sizeof(uint64_t)))); | |
| 47 | + __u64 seconds; | |
| 48 | + __u64 vendor_id; | |
| 49 | + __u16 host_no; | |
| 50 | + __u16 event_datalen; | |
| 51 | + __u32 event_num; | |
| 52 | + __u32 event_code; | |
| 53 | + __u32 event_data; | |
| 54 | +} __attribute__((aligned(sizeof(__u64)))); | |
| 54 | 55 | |
| 55 | 56 | |
| 56 | 57 | #endif /* SCSI_NETLINK_FC_H */ |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | 2 | /* |
| 3 | 3 | * skl-tplg-interface.h - Intel DSP FW private data interface |
| 4 | 4 | * |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | /* SOF ABI version major, minor and patch numbers */ |
| 28 | 28 | #define SOF_ABI_MAJOR 3 |
| 29 | −#define SOF_ABI_MINOR 8 | |
| 29 | +#define SOF_ABI_MINOR 10 | |
| 30 | 30 | #define SOF_ABI_PATCH 0 |
| 31 | 31 | |
| 32 | 32 | /* SOF ABI version number. Format within 32bit word is MMmmmppp */ |
| @@ -13,6 +13,8 @@ · 12 unmodified lines | ||
| 13 | 13 | #ifndef __INCLUDE_UAPI_SOF_FW_H__ |
| 14 | 14 | #define __INCLUDE_UAPI_SOF_FW_H__ |
| 15 | 15 | |
| 16 | +#include <linux/types.h> | |
| 17 | + | |
| 16 | 18 | #define SND_SOF_FW_SIG_SIZE 4 |
| 17 | 19 | #define SND_SOF_FW_ABI 1 |
| 18 | 20 | #define SND_SOF_FW_SIG "Reef" |
| @@ -46,8 +48,8 @@ enum snd_sof_fw_blk_type { · 27 unmodified lines | ||
| 46 | 48 | |
| 47 | 49 | struct snd_sof_blk_hdr { |
| 48 | 50 | enum snd_sof_fw_blk_type type; |
| 49 | − uint32_t size; /* bytes minus this header */ | |
| 50 | − uint32_t offset; /* offset from base */ | |
| 51 | + __u32 size; /* bytes minus this header */ | |
| 52 | + __u32 offset; /* offset from base */ | |
| 51 | 53 | } __packed; |
| 52 | 54 | |
| 53 | 55 | /* |
| @@ -61,8 +63,8 @@ enum snd_sof_fw_mod_type { · 7 unmodified lines | ||
| 61 | 63 | |
| 62 | 64 | struct snd_sof_mod_hdr { |
| 63 | 65 | enum snd_sof_fw_mod_type type; |
| 64 | − uint32_t size; /* bytes minus this header */ | |
| 65 | − uint32_t num_blocks; /* number of blocks */ | |
| 66 | + __u32 size; /* bytes minus this header */ | |
| 67 | + __u32 num_blocks; /* number of blocks */ | |
| 66 | 68 | } __packed; |
| 67 | 69 | |
| 68 | 70 | /* |
| @@ -70,9 +72,9 @@ struct snd_sof_mod_hdr { · 1 unmodified line | ||
| 70 | 72 | */ |
| 71 | 73 | struct snd_sof_fw_header { |
| 72 | 74 | unsigned char sig[SND_SOF_FW_SIG_SIZE]; /* "Reef" */ |
| 73 | − uint32_t file_size; /* size of file minus this header */ | |
| 74 | − uint32_t num_modules; /* number of modules */ | |
| 75 | − uint32_t abi; /* version of header format */ | |
| 75 | + __u32 file_size; /* size of file minus this header */ | |
| 76 | + __u32 num_modules; /* number of modules */ | |
| 77 | + __u32 abi; /* version of header format */ | |
| 76 | 78 | } __packed; |
| 77 | 79 | |
| 78 | 80 | #endif |
| @@ -9,6 +9,8 @@ · 8 unmodified lines | ||
| 9 | 9 | #ifndef __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__ |
| 10 | 10 | #define __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__ |
| 11 | 11 | |
| 12 | +#include <linux/types.h> | |
| 13 | + | |
| 12 | 14 | /* |
| 13 | 15 | * Header for all non IPC ABI data. |
| 14 | 16 | * |
| @@ -16,12 +18,12 @@ · 1 unmodified line | ||
| 16 | 18 | * Used by any bespoke component data structures or binary blobs. |
| 17 | 19 | */ |
| 18 | 20 | struct sof_abi_hdr { |
| 19 | − uint32_t magic; /**< 'S', 'O', 'F', '\0' */ | |
| 20 | − uint32_t type; /**< component specific type */ | |
| 21 | − uint32_t size; /**< size in bytes of data excl. this struct */ | |
| 22 | − uint32_t abi; /**< SOF ABI version */ | |
| 23 | − uint32_t reserved[4]; /**< reserved for future use */ | |
| 24 | − uint32_t data[0]; /**< Component data - opaque to core */ | |
| 21 | + __u32 magic; /**< 'S', 'O', 'F', '\0' */ | |
| 22 | + __u32 type; /**< component specific type */ | |
| 23 | + __u32 size; /**< size in bytes of data excl. this struct */ | |
| 24 | + __u32 abi; /**< SOF ABI version */ | |
| 25 | + __u32 reserved[4]; /**< reserved for future use */ | |
| 26 | + __u32 data[0]; /**< Component data - opaque to core */ | |
| 25 | 27 | } __packed; |
| 26 | 28 | |
| 27 | 29 | #endif |
| @@ -75,6 +75,7 @@ · 74 unmodified lines | ||
| 75 | 75 | #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 503 |
| 76 | 76 | #define SOF_TKN_INTEL_SSP_QUIRKS 504 |
| 77 | 77 | #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT 505 |
| 78 | +#define SOF_TKN_INTEL_SSP_BCLK_DELAY 506 | |
| 78 | 79 | |
| 79 | 80 | /* DMIC */ |
| 80 | 81 | #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600 |
| @@ -105,4 +106,12 @@ · 24 unmodified lines | ||
| 105 | 106 | /* for backward compatibility */ |
| 106 | 107 | #define SOF_TKN_EFFECT_TYPE SOF_TKN_PROCESS_TYPE |
| 107 | 108 | |
| 109 | +/* SAI */ | |
| 110 | +#define SOF_TKN_IMX_SAI_FIRST_TOKEN 1000 | |
| 111 | +/* TODO: Add SAI tokens */ | |
| 112 | + | |
| 113 | +/* ESAI */ | |
| 114 | +#define SOF_TKN_IMX_ESAI_FIRST_TOKEN 1100 | |
| 115 | +/* TODO: Add ESAI tokens */ | |
| 116 | + | |
| 108 | 117 | #endif |