Linux 5.2-rc1
Showing the changes to include/uapi (69 of 11433 files). Show all
Unified · Split
| @@ -8,7 +8,7 @@ · 7 unmodified lines | |||
| 8 | #define FIOGETOWN 0x8903 | 8 | #define FIOGETOWN 0x8903 |
| 9 | #define SIOCGPGRP 0x8904 | 9 | #define SIOCGPGRP 0x8904 |
| 10 | #define SIOCATMARK 0x8905 | 10 | #define SIOCATMARK 0x8905 |
| 11 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | 11 | #define SIOCGSTAMP_OLD 0x8906 /* Get stamp (timeval) */ |
| 12 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | 12 | #define SIOCGSTAMPNS_OLD 0x8907 /* Get stamp (timespec) */ |
| 13 | 13 | ||
| 14 | #endif /* __ASM_GENERIC_SOCKIOS_H */ | 14 | #endif /* __ASM_GENERIC_SOCKIOS_H */ |
| @@ -832,9 +832,21 @@ __SYSCALL(__NR_io_uring_setup, sys_io_uring_setup) · 831 unmodified lines | |||
| 832 | __SYSCALL(__NR_io_uring_enter, sys_io_uring_enter) | 832 | __SYSCALL(__NR_io_uring_enter, sys_io_uring_enter) |
| 833 | #define __NR_io_uring_register 427 | 833 | #define __NR_io_uring_register 427 |
| 834 | __SYSCALL(__NR_io_uring_register, sys_io_uring_register) | 834 | __SYSCALL(__NR_io_uring_register, sys_io_uring_register) |
| 835 | #define __NR_open_tree 428 | ||
| 836 | __SYSCALL(__NR_open_tree, sys_open_tree) | ||
| 837 | #define __NR_move_mount 429 | ||
| 838 | __SYSCALL(__NR_move_mount, sys_move_mount) | ||
| 839 | #define __NR_fsopen 430 | ||
| 840 | __SYSCALL(__NR_fsopen, sys_fsopen) | ||
| 841 | #define __NR_fsconfig 431 | ||
| 842 | __SYSCALL(__NR_fsconfig, sys_fsconfig) | ||
| 843 | #define __NR_fsmount 432 | ||
| 844 | __SYSCALL(__NR_fsmount, sys_fsmount) | ||
| 845 | #define __NR_fspick 433 | ||
| 846 | __SYSCALL(__NR_fspick, sys_fspick) | ||
| 835 | 847 | ||
| 836 | #undef __NR_syscalls | 848 | #undef __NR_syscalls |
| 837 | #define __NR_syscalls 428 | 849 | #define __NR_syscalls 434 |
| 838 | 850 | ||
| 839 | /* | 851 | /* |
| 840 | * 32 bit systems traditionally used different | 852 | * 32 bit systems traditionally used different |
| @@ -210,6 +210,9 @@ union drm_amdgpu_bo_list { · 209 unmodified lines | |||
| 210 | #define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1) | 210 | #define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1) |
| 211 | /* indicate some job from this context once cause gpu hang */ | 211 | /* indicate some job from this context once cause gpu hang */ |
| 212 | #define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2) | 212 | #define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2) |
| 213 | /* indicate some errors are detected by RAS */ | ||
| 214 | #define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE (1<<3) | ||
| 215 | #define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE (1<<4) | ||
| 213 | 216 | ||
| 214 | /* Context priority level */ | 217 | /* Context priority level */ |
| 215 | #define AMDGPU_CTX_PRIORITY_UNSET -2048 | 218 | #define AMDGPU_CTX_PRIORITY_UNSET -2048 |
| @@ -525,6 +528,8 @@ struct drm_amdgpu_gem_va { · 309 unmodified lines | |||
| 525 | #define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05 | 528 | #define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05 |
| 526 | #define AMDGPU_CHUNK_ID_BO_HANDLES 0x06 | 529 | #define AMDGPU_CHUNK_ID_BO_HANDLES 0x06 |
| 527 | #define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES 0x07 | 530 | #define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES 0x07 |
| 531 | #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT 0x08 | ||
| 532 | #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL 0x09 | ||
| 528 | 533 | ||
| 529 | struct drm_amdgpu_cs_chunk { | 534 | struct drm_amdgpu_cs_chunk { |
| 530 | __u32 chunk_id; | 535 | __u32 chunk_id; |
| @@ -605,6 +610,12 @@ struct drm_amdgpu_cs_chunk_sem { · 74 unmodified lines | |||
| 605 | __u32 handle; | 610 | __u32 handle; |
| 606 | }; | 611 | }; |
| 607 | 612 | ||
| 613 | struct drm_amdgpu_cs_chunk_syncobj { | ||
| 614 | __u32 handle; | ||
| 615 | __u32 flags; | ||
| 616 | __u64 point; | ||
| 617 | }; | ||
| 618 | |||
| 608 | #define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0 | 619 | #define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0 |
| 609 | #define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1 | 620 | #define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1 |
| 610 | #define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2 | 621 | #define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2 |
| @@ -680,6 +691,7 @@ struct drm_amdgpu_cs_chunk_data { · 69 unmodified lines | |||
| 680 | #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11 | 691 | #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11 |
| 681 | /* Subquery id: Query DMCU firmware version */ | 692 | /* Subquery id: Query DMCU firmware version */ |
| 682 | #define AMDGPU_INFO_FW_DMCU 0x12 | 693 | #define AMDGPU_INFO_FW_DMCU 0x12 |
| 694 | #define AMDGPU_INFO_FW_TA 0x13 | ||
| 683 | /* number of bytes moved for TTM migration */ | 695 | /* number of bytes moved for TTM migration */ |
| 684 | #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f | 696 | #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f |
| 685 | /* the used VRAM size */ | 697 | /* the used VRAM size */ |
| @@ -733,6 +745,37 @@ struct drm_amdgpu_cs_chunk_data { · 47 unmodified lines | |||
| 733 | /* Number of VRAM page faults on CPU access. */ | 745 | /* Number of VRAM page faults on CPU access. */ |
| 734 | #define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E | 746 | #define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E |
| 735 | #define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F | 747 | #define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F |
| 748 | /* query ras mask of enabled features*/ | ||
| 749 | #define AMDGPU_INFO_RAS_ENABLED_FEATURES 0x20 | ||
| 750 | |||
| 751 | /* RAS MASK: UMC (VRAM) */ | ||
| 752 | #define AMDGPU_INFO_RAS_ENABLED_UMC (1 << 0) | ||
| 753 | /* RAS MASK: SDMA */ | ||
| 754 | #define AMDGPU_INFO_RAS_ENABLED_SDMA (1 << 1) | ||
| 755 | /* RAS MASK: GFX */ | ||
| 756 | #define AMDGPU_INFO_RAS_ENABLED_GFX (1 << 2) | ||
| 757 | /* RAS MASK: MMHUB */ | ||
| 758 | #define AMDGPU_INFO_RAS_ENABLED_MMHUB (1 << 3) | ||
| 759 | /* RAS MASK: ATHUB */ | ||
| 760 | #define AMDGPU_INFO_RAS_ENABLED_ATHUB (1 << 4) | ||
| 761 | /* RAS MASK: PCIE */ | ||
| 762 | #define AMDGPU_INFO_RAS_ENABLED_PCIE (1 << 5) | ||
| 763 | /* RAS MASK: HDP */ | ||
| 764 | #define AMDGPU_INFO_RAS_ENABLED_HDP (1 << 6) | ||
| 765 | /* RAS MASK: XGMI */ | ||
| 766 | #define AMDGPU_INFO_RAS_ENABLED_XGMI (1 << 7) | ||
| 767 | /* RAS MASK: DF */ | ||
| 768 | #define AMDGPU_INFO_RAS_ENABLED_DF (1 << 8) | ||
| 769 | /* RAS MASK: SMN */ | ||
| 770 | #define AMDGPU_INFO_RAS_ENABLED_SMN (1 << 9) | ||
| 771 | /* RAS MASK: SEM */ | ||
| 772 | #define AMDGPU_INFO_RAS_ENABLED_SEM (1 << 10) | ||
| 773 | /* RAS MASK: MP0 */ | ||
| 774 | #define AMDGPU_INFO_RAS_ENABLED_MP0 (1 << 11) | ||
| 775 | /* RAS MASK: MP1 */ | ||
| 776 | #define AMDGPU_INFO_RAS_ENABLED_MP1 (1 << 12) | ||
| 777 | /* RAS MASK: FUSE */ | ||
| 778 | #define AMDGPU_INFO_RAS_ENABLED_FUSE (1 << 13) | ||
| 736 | 779 | ||
| 737 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 | 780 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 |
| 738 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff | 781 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff |
| @@ -649,6 +649,7 @@ struct drm_gem_open { · 648 unmodified lines | |||
| 649 | #define DRM_CAP_PAGE_FLIP_TARGET 0x11 | 649 | #define DRM_CAP_PAGE_FLIP_TARGET 0x11 |
| 650 | #define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 | 650 | #define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 |
| 651 | #define DRM_CAP_SYNCOBJ 0x13 | 651 | #define DRM_CAP_SYNCOBJ 0x13 |
| 652 | #define DRM_CAP_SYNCOBJ_TIMELINE 0x14 | ||
| 652 | 653 | ||
| 653 | /** DRM_IOCTL_GET_CAP ioctl argument type */ | 654 | /** DRM_IOCTL_GET_CAP ioctl argument type */ |
| 654 | struct drm_get_cap { | 655 | struct drm_get_cap { |
| @@ -735,8 +736,18 @@ struct drm_syncobj_handle { · 80 unmodified lines | |||
| 735 | __u32 pad; | 736 | __u32 pad; |
| 736 | }; | 737 | }; |
| 737 | 738 | ||
| 739 | struct drm_syncobj_transfer { | ||
| 740 | __u32 src_handle; | ||
| 741 | __u32 dst_handle; | ||
| 742 | __u64 src_point; | ||
| 743 | __u64 dst_point; | ||
| 744 | __u32 flags; | ||
| 745 | __u32 pad; | ||
| 746 | }; | ||
| 747 | |||
| 738 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) | 748 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) |
| 739 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) | 749 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) |
| 750 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ | ||
| 740 | struct drm_syncobj_wait { | 751 | struct drm_syncobj_wait { |
| 741 | __u64 handles; | 752 | __u64 handles; |
| 742 | /* absolute timeout */ | 753 | /* absolute timeout */ |
| @@ -747,12 +758,33 @@ struct drm_syncobj_wait { · 4 unmodified lines | |||
| 747 | __u32 pad; | 758 | __u32 pad; |
| 748 | }; | 759 | }; |
| 749 | 760 | ||
| 761 | struct drm_syncobj_timeline_wait { | ||
| 762 | __u64 handles; | ||
| 763 | /* wait on specific timeline point for every handles*/ | ||
| 764 | __u64 points; | ||
| 765 | /* absolute timeout */ | ||
| 766 | __s64 timeout_nsec; | ||
| 767 | __u32 count_handles; | ||
| 768 | __u32 flags; | ||
| 769 | __u32 first_signaled; /* only valid when not waiting all */ | ||
| 770 | __u32 pad; | ||
| 771 | }; | ||
| 772 | |||
| 773 | |||
| 750 | struct drm_syncobj_array { | 774 | struct drm_syncobj_array { |
| 751 | __u64 handles; | 775 | __u64 handles; |
| 752 | __u32 count_handles; | 776 | __u32 count_handles; |
| 753 | __u32 pad; | 777 | __u32 pad; |
| 754 | }; | 778 | }; |
| 755 | 779 | ||
| 780 | struct drm_syncobj_timeline_array { | ||
| 781 | __u64 handles; | ||
| 782 | __u64 points; | ||
| 783 | __u32 count_handles; | ||
| 784 | __u32 pad; | ||
| 785 | }; | ||
| 786 | |||
| 787 | |||
| 756 | /* Query current scanout sequence number */ | 788 | /* Query current scanout sequence number */ |
| 757 | struct drm_crtc_get_sequence { | 789 | struct drm_crtc_get_sequence { |
| 758 | __u32 crtc_id; /* requested crtc_id */ | 790 | __u32 crtc_id; /* requested crtc_id */ |
| @@ -909,6 +941,11 @@ extern "C" { · 150 unmodified lines | |||
| 909 | #define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) | 941 | #define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) |
| 910 | #define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) | 942 | #define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) |
| 911 | 943 | ||
| 944 | #define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) | ||
| 945 | #define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) | ||
| 946 | #define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) | ||
| 947 | #define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) | ||
| 948 | |||
| 912 | /** | 949 | /** |
| 913 | * Device specific ioctls should only be in their respective headers | 950 | * Device specific ioctls should only be in their respective headers |
| 914 | * The device specific ioctl range is from 0x40 to 0x9f. | 951 | * The device specific ioctl range is from 0x40 to 0x9f. |
| @@ -144,6 +144,17 @@ extern "C" { · 143 unmodified lines | |||
| 144 | #define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ | 144 | #define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ |
| 145 | #define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ | 145 | #define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ |
| 146 | 146 | ||
| 147 | /* | ||
| 148 | * Floating point 64bpp RGB | ||
| 149 | * IEEE 754-2008 binary16 half-precision float | ||
| 150 | * [15:0] sign:exponent:mantissa 1:5:10 | ||
| 151 | */ | ||
| 152 | #define DRM_FORMAT_XRGB16161616F fourcc_code('X', 'R', '4', 'H') /* [63:0] x:R:G:B 16:16:16:16 little endian */ | ||
| 153 | #define DRM_FORMAT_XBGR16161616F fourcc_code('X', 'B', '4', 'H') /* [63:0] x:B:G:R 16:16:16:16 little endian */ | ||
| 154 | |||
| 155 | #define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H') /* [63:0] A:R:G:B 16:16:16:16 little endian */ | ||
| 156 | #define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */ | ||
| 157 | |||
| 147 | /* packed YCbCr */ | 158 | /* packed YCbCr */ |
| 148 | #define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ | 159 | #define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ |
| 149 | #define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */ | 160 | #define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */ |
| @@ -151,7 +162,29 @@ extern "C" { · 1 unmodified line | |||
| 151 | #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ | 162 | #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ |
| 152 | 163 | ||
| 153 | #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ | 164 | #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ |
| 154 | #define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ | 165 | #define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ |
| 166 | #define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4') /* [23:0] Cr:Cb:Y 8:8:8 little endian */ | ||
| 167 | #define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0') /* Y followed by U then V, 10:10:10. Non-linear modifier only */ | ||
| 168 | |||
| 169 | /* | ||
| 170 | * packed Y2xx indicate for each component, xx valid data occupy msb | ||
| 171 | * 16-xx padding occupy lsb | ||
| 172 | */ | ||
| 173 | #define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0') /* [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels */ | ||
| 174 | #define DRM_FORMAT_Y212 fourcc_code('Y', '2', '1', '2') /* [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels */ | ||
| 175 | #define DRM_FORMAT_Y216 fourcc_code('Y', '2', '1', '6') /* [63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels */ | ||
| 176 | |||
| 177 | /* | ||
| 178 | * packed Y4xx indicate for each component, xx valid data occupy msb | ||
| 179 | * 16-xx padding occupy lsb except Y410 | ||
| 180 | */ | ||
| 181 | #define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0') /* [31:0] A:Cr:Y:Cb 2:10:10:10 little endian */ | ||
| 182 | #define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2') /* [63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian */ | ||
| 183 | #define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6') /* [63:0] A:Cr:Y:Cb 16:16:16:16 little endian */ | ||
| 184 | |||
| 185 | #define DRM_FORMAT_XVYU2101010 fourcc_code('X', 'V', '3', '0') /* [31:0] X:Cr:Y:Cb 2:10:10:10 little endian */ | ||
| 186 | #define DRM_FORMAT_XVYU12_16161616 fourcc_code('X', 'V', '3', '6') /* [63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian */ | ||
| 187 | #define DRM_FORMAT_XVYU16161616 fourcc_code('X', 'V', '4', '8') /* [63:0] X:Cr:Y:Cb 16:16:16:16 little endian */ | ||
| 155 | 188 | ||
| 156 | /* | 189 | /* |
| 157 | * packed YCbCr420 2x2 tiled formats | 190 | * packed YCbCr420 2x2 tiled formats |
| @@ -167,6 +200,15 @@ extern "C" { · 9 unmodified lines | |||
| 167 | /* [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ | 200 | /* [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ |
| 168 | #define DRM_FORMAT_X0L2 fourcc_code('X', '0', 'L', '2') | 201 | #define DRM_FORMAT_X0L2 fourcc_code('X', '0', 'L', '2') |
| 169 | 202 | ||
| 203 | /* | ||
| 204 | * 1-plane YUV 4:2:0 | ||
| 205 | * In these formats, the component ordering is specified (Y, followed by U | ||
| 206 | * then V), but the exact Linear layout is undefined. | ||
| 207 | * These formats can only be used with a non-Linear modifier. | ||
| 208 | */ | ||
| 209 | #define DRM_FORMAT_YUV420_8BIT fourcc_code('Y', 'U', '0', '8') | ||
| 210 | #define DRM_FORMAT_YUV420_10BIT fourcc_code('Y', 'U', '1', '0') | ||
| 211 | |||
| 170 | /* | 212 | /* |
| 171 | * 2 plane RGB + A | 213 | * 2 plane RGB + A |
| 172 | * index 0 = RGB plane, same format as the corresponding non _A8 format has | 214 | * index 0 = RGB plane, same format as the corresponding non _A8 format has |
| @@ -195,6 +237,13 @@ extern "C" { · 22 unmodified lines | |||
| 195 | #define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ | 237 | #define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ |
| 196 | #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ | 238 | #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ |
| 197 | 239 | ||
| 240 | /* | ||
| 241 | * 2 plane YCbCr MSB aligned | ||
| 242 | * index 0 = Y plane, [15:0] Y:x [10:6] little endian | ||
| 243 | * index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [10:6:10:6] little endian | ||
| 244 | */ | ||
| 245 | #define DRM_FORMAT_P210 fourcc_code('P', '2', '1', '0') /* 2x1 subsampled Cr:Cb plane, 10 bit per channel */ | ||
| 246 | |||
| 198 | /* | 247 | /* |
| 199 | * 2 plane YCbCr MSB aligned | 248 | * 2 plane YCbCr MSB aligned |
| 200 | * index 0 = Y plane, [15:0] Y:x [10:6] little endian | 249 | * index 0 = Y plane, [15:0] Y:x [10:6] little endian |
| @@ -33,7 +33,6 @@ · 32 unmodified lines | |||
| 33 | extern "C" { | 33 | extern "C" { |
| 34 | #endif | 34 | #endif |
| 35 | 35 | ||
| 36 | #define DRM_DISPLAY_INFO_LEN 32 | ||
| 37 | #define DRM_CONNECTOR_NAME_LEN 32 | 36 | #define DRM_CONNECTOR_NAME_LEN 32 |
| 38 | #define DRM_DISPLAY_MODE_LEN 32 | 37 | #define DRM_DISPLAY_MODE_LEN 32 |
| 39 | #define DRM_PROP_NAME_LEN 32 | 38 | #define DRM_PROP_NAME_LEN 32 |
| @@ -622,7 +621,8 @@ struct drm_color_ctm { · 582 unmodified lines | |||
| 622 | 621 | ||
| 623 | struct drm_color_lut { | 622 | struct drm_color_lut { |
| 624 | /* | 623 | /* |
| 625 | * Data is U0.16 fixed point format. | 624 | * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and |
| 625 | * 0xffff == 1.0. | ||
| 626 | */ | 626 | */ |
| 627 | __u16 red; | 627 | __u16 red; |
| 628 | __u16 green; | 628 | __u16 green; |
| @@ -62,6 +62,28 @@ extern "C" { · 61 unmodified lines | |||
| 62 | #define I915_ERROR_UEVENT "ERROR" | 62 | #define I915_ERROR_UEVENT "ERROR" |
| 63 | #define I915_RESET_UEVENT "RESET" | 63 | #define I915_RESET_UEVENT "RESET" |
| 64 | 64 | ||
| 65 | /* | ||
| 66 | * i915_user_extension: Base class for defining a chain of extensions | ||
| 67 | * | ||
| 68 | * Many interfaces need to grow over time. In most cases we can simply | ||
| 69 | * extend the struct and have userspace pass in more data. Another option, | ||
| 70 | * as demonstrated by Vulkan's approach to providing extensions for forward | ||
| 71 | * and backward compatibility, is to use a list of optional structs to | ||
| 72 | * provide those extra details. | ||
| 73 | * | ||
| 74 | * The key advantage to using an extension chain is that it allows us to | ||
| 75 | * redefine the interface more easily than an ever growing struct of | ||
| 76 | * increasing complexity, and for large parts of that interface to be | ||
| 77 | * entirely optional. The downside is more pointer chasing; chasing across | ||
| 78 | * the __user boundary with pointers encapsulated inside u64. | ||
| 79 | */ | ||
| 80 | struct i915_user_extension { | ||
| 81 | __u64 next_extension; | ||
| 82 | __u32 name; | ||
| 83 | __u32 flags; /* All undefined bits must be zero. */ | ||
| 84 | __u32 rsvd[4]; /* Reserved for future use; must be zero. */ | ||
| 85 | }; | ||
| 86 | |||
| 65 | /* | 87 | /* |
| 66 | * MOCS indexes used for GPU surfaces, defining the cacheability of the | 88 | * MOCS indexes used for GPU surfaces, defining the cacheability of the |
| 67 | * surface data and the coherency for this data wrt. CPU vs. GPU accesses. | 89 | * surface data and the coherency for this data wrt. CPU vs. GPU accesses. |
| @@ -99,9 +121,23 @@ enum drm_i915_gem_engine_class { · 31 unmodified lines | |||
| 99 | I915_ENGINE_CLASS_VIDEO = 2, | 121 | I915_ENGINE_CLASS_VIDEO = 2, |
| 100 | I915_ENGINE_CLASS_VIDEO_ENHANCE = 3, | 122 | I915_ENGINE_CLASS_VIDEO_ENHANCE = 3, |
| 101 | 123 | ||
| 124 | /* should be kept compact */ | ||
| 125 | |||
| 102 | I915_ENGINE_CLASS_INVALID = -1 | 126 | I915_ENGINE_CLASS_INVALID = -1 |
| 103 | }; | 127 | }; |
| 104 | 128 | ||
| 129 | /* | ||
| 130 | * There may be more than one engine fulfilling any role within the system. | ||
| 131 | * Each engine of a class is given a unique instance number and therefore | ||
| 132 | * any engine can be specified by its class:instance tuplet. APIs that allow | ||
| 133 | * access to any engine in the system will use struct i915_engine_class_instance | ||
| 134 | * for this identification. | ||
| 135 | */ | ||
| 136 | struct i915_engine_class_instance { | ||
| 137 | __u16 engine_class; /* see enum drm_i915_gem_engine_class */ | ||
| 138 | __u16 engine_instance; | ||
| 139 | }; | ||
| 140 | |||
| 105 | /** | 141 | /** |
| 106 | * DOC: perf_events exposed by i915 through /sys/bus/event_sources/drivers/i915 | 142 | * DOC: perf_events exposed by i915 through /sys/bus/event_sources/drivers/i915 |
| 107 | * | 143 | * |
| @@ -319,6 +355,7 @@ typedef struct _drm_i915_sarea { · 211 unmodified lines | |||
| 319 | #define DRM_I915_PERF_ADD_CONFIG 0x37 | 355 | #define DRM_I915_PERF_ADD_CONFIG 0x37 |
| 320 | #define DRM_I915_PERF_REMOVE_CONFIG 0x38 | 356 | #define DRM_I915_PERF_REMOVE_CONFIG 0x38 |
| 321 | #define DRM_I915_QUERY 0x39 | 357 | #define DRM_I915_QUERY 0x39 |
| 358 | /* Must be kept compact -- no holes */ | ||
| 322 | 359 | ||
| 323 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 360 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
| 324 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 361 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
| @@ -367,6 +404,7 @@ typedef struct _drm_i915_sarea { · 42 unmodified lines | |||
| 367 | #define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) | 404 | #define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) |
| 368 | #define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait) | 405 | #define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait) |
| 369 | #define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create) | 406 | #define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create) |
| 407 | #define DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create_ext) | ||
| 370 | #define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy) | 408 | #define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy) |
| 371 | #define DRM_IOCTL_I915_REG_READ DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read) | 409 | #define DRM_IOCTL_I915_REG_READ DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read) |
| 372 | #define DRM_IOCTL_I915_GET_RESET_STATS DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats) | 410 | #define DRM_IOCTL_I915_GET_RESET_STATS DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats) |
| @@ -476,6 +514,7 @@ typedef struct drm_i915_irq_wait { · 103 unmodified lines | |||
| 476 | #define I915_SCHEDULER_CAP_ENABLED (1ul << 0) | 514 | #define I915_SCHEDULER_CAP_ENABLED (1ul << 0) |
| 477 | #define I915_SCHEDULER_CAP_PRIORITY (1ul << 1) | 515 | #define I915_SCHEDULER_CAP_PRIORITY (1ul << 1) |
| 478 | #define I915_SCHEDULER_CAP_PREEMPTION (1ul << 2) | 516 | #define I915_SCHEDULER_CAP_PREEMPTION (1ul << 2) |
| 517 | #define I915_SCHEDULER_CAP_SEMAPHORES (1ul << 3) | ||
| 479 | 518 | ||
| 480 | #define I915_PARAM_HUC_STATUS 42 | 519 | #define I915_PARAM_HUC_STATUS 42 |
| 481 | 520 | ||
| @@ -559,6 +598,8 @@ typedef struct drm_i915_irq_wait { · 77 unmodified lines | |||
| 559 | */ | 598 | */ |
| 560 | #define I915_PARAM_MMAP_GTT_COHERENT 52 | 599 | #define I915_PARAM_MMAP_GTT_COHERENT 52 |
| 561 | 600 | ||
| 601 | /* Must be kept compact -- no holes and well documented */ | ||
| 602 | |||
| 562 | typedef struct drm_i915_getparam { | 603 | typedef struct drm_i915_getparam { |
| 563 | __s32 param; | 604 | __s32 param; |
| 564 | /* | 605 | /* |
| @@ -574,6 +615,7 @@ typedef struct drm_i915_getparam { · 9 unmodified lines | |||
| 574 | #define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2 | 615 | #define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2 |
| 575 | #define I915_SETPARAM_ALLOW_BATCHBUFFER 3 | 616 | #define I915_SETPARAM_ALLOW_BATCHBUFFER 3 |
| 576 | #define I915_SETPARAM_NUM_USED_FENCES 4 | 617 | #define I915_SETPARAM_NUM_USED_FENCES 4 |
| 618 | /* Must be kept compact -- no holes */ | ||
| 577 | 619 | ||
| 578 | typedef struct drm_i915_setparam { | 620 | typedef struct drm_i915_setparam { |
| 579 | int param; | 621 | int param; |
| @@ -972,7 +1014,7 @@ struct drm_i915_gem_execbuffer2 { · 392 unmodified lines | |||
| 972 | * struct drm_i915_gem_exec_fence *fences. | 1014 | * struct drm_i915_gem_exec_fence *fences. |
| 973 | */ | 1015 | */ |
| 974 | __u64 cliprects_ptr; | 1016 | __u64 cliprects_ptr; |
| 975 | #define I915_EXEC_RING_MASK (7<<0) | 1017 | #define I915_EXEC_RING_MASK (0x3f) |
| 976 | #define I915_EXEC_DEFAULT (0<<0) | 1018 | #define I915_EXEC_DEFAULT (0<<0) |
| 977 | #define I915_EXEC_RENDER (1<<0) | 1019 | #define I915_EXEC_RENDER (1<<0) |
| 978 | #define I915_EXEC_BSD (2<<0) | 1020 | #define I915_EXEC_BSD (2<<0) |
| @@ -1120,32 +1162,34 @@ struct drm_i915_gem_busy { · 141 unmodified lines | |||
| 1120 | * as busy may become idle before the ioctl is completed. | 1162 | * as busy may become idle before the ioctl is completed. |
| 1121 | * | 1163 | * |
| 1122 | * Furthermore, if the object is busy, which engine is busy is only | 1164 | * Furthermore, if the object is busy, which engine is busy is only |
| 1123 | * provided as a guide. There are race conditions which prevent the | 1165 | * provided as a guide and only indirectly by reporting its class |
| 1124 | * report of which engines are busy from being always accurate. | 1166 | * (there may be more than one engine in each class). There are race |
| 1125 | * However, the converse is not true. If the object is idle, the | 1167 | * conditions which prevent the report of which engines are busy from |
| 1126 | * result of the ioctl, that all engines are idle, is accurate. | 1168 | * being always accurate. However, the converse is not true. If the |
| 1169 | * object is idle, the result of the ioctl, that all engines are idle, | ||
| 1170 | * is accurate. | ||
| 1127 | * | 1171 | * |
| 1128 | * The returned dword is split into two fields to indicate both | 1172 | * The returned dword is split into two fields to indicate both |
| 1129 | * the engines on which the object is being read, and the | 1173 | * the engine classess on which the object is being read, and the |
| 1130 | * engine on which it is currently being written (if any). | 1174 | * engine class on which it is currently being written (if any). |
| 1131 | * | 1175 | * |
| 1132 | * The low word (bits 0:15) indicate if the object is being written | 1176 | * The low word (bits 0:15) indicate if the object is being written |
| 1133 | * to by any engine (there can only be one, as the GEM implicit | 1177 | * to by any engine (there can only be one, as the GEM implicit |
| 1134 | * synchronisation rules force writes to be serialised). Only the | 1178 | * synchronisation rules force writes to be serialised). Only the |
| 1135 | * engine for the last write is reported. | 1179 | * engine class (offset by 1, I915_ENGINE_CLASS_RENDER is reported as |
| 1180 | * 1 not 0 etc) for the last write is reported. | ||
| 1136 | * | 1181 | * |
| 1137 | * The high word (bits 16:31) are a bitmask of which engines are | 1182 | * The high word (bits 16:31) are a bitmask of which engines classes |
| 1138 | * currently reading from the object. Multiple engines may be | 1183 | * are currently reading from the object. Multiple engines may be |
| 1139 | * reading from the object simultaneously. | 1184 | * reading from the object simultaneously. |
| 1140 | * | 1185 | * |
| 1141 | * The value of each engine is the same as specified in the | 1186 | * The value of each engine class is the same as specified in the |
| 1142 | * EXECBUFFER2 ioctl, i.e. I915_EXEC_RENDER, I915_EXEC_BSD etc. | 1187 | * I915_CONTEXT_SET_ENGINES parameter and via perf, i.e. |
| 1143 | * Note I915_EXEC_DEFAULT is a symbolic value and is mapped to | 1188 | * I915_ENGINE_CLASS_RENDER, I915_ENGINE_CLASS_COPY, etc. |
| 1144 | * the I915_EXEC_RENDER engine for execution, and so it is never | ||
| 1145 | * reported as active itself. Some hardware may have parallel | 1189 | * reported as active itself. Some hardware may have parallel |
| 1146 | * execution engines, e.g. multiple media engines, which are | 1190 | * execution engines, e.g. multiple media engines, which are |
| 1147 | * mapped to the same identifier in the EXECBUFFER2 ioctl and | 1191 | * mapped to the same class identifier and so are not separately |
| 1148 | * so are not separately reported for busyness. | 1192 | * reported for busyness. |
| 1149 | * | 1193 | * |
| 1150 | * Caveat emptor: | 1194 | * Caveat emptor: |
| 1151 | * Only the boolean result of this query is reliable; that is whether | 1195 | * Only the boolean result of this query is reliable; that is whether |
| @@ -1412,65 +1456,17 @@ struct drm_i915_gem_wait { · 260 unmodified lines | |||
| 1412 | }; | 1456 | }; |
| 1413 | 1457 | ||
| 1414 | struct drm_i915_gem_context_create { | 1458 | struct drm_i915_gem_context_create { |
| 1415 | /* output: id of new context*/ | 1459 | __u32 ctx_id; /* output: id of new context*/ |
| 1416 | __u32 ctx_id; | ||
| 1417 | __u32 pad; | ||
| 1418 | }; | ||
| 1419 | |||
| 1420 | struct drm_i915_gem_context_destroy { | ||
| 1421 | __u32 ctx_id; | ||
| 1422 | __u32 pad; | 1460 | __u32 pad; |
| 1423 | }; | 1461 | }; |
| 1424 | 1462 | ||
| 1425 | struct drm_i915_reg_read { | 1463 | struct drm_i915_gem_context_create_ext { |
| 1426 | /* | 1464 | __u32 ctx_id; /* output: id of new context*/ |
| 1427 | * Register offset. | ||
| 1428 | * For 64bit wide registers where the upper 32bits don't immediately | ||
| 1429 | * follow the lower 32bits, the offset of the lower 32bits must | ||
| 1430 | * be specified | ||
| 1431 | */ | ||
| 1432 | __u64 offset; | ||
| 1433 | #define I915_REG_READ_8B_WA (1ul << 0) | ||
| 1434 | |||
| 1435 | __u64 val; /* Return value */ | ||
| 1436 | }; | ||
| 1437 | /* Known registers: | ||
| 1438 | * | ||
| 1439 | * Render engine timestamp - 0x2358 + 64bit - gen7+ | ||
| 1440 | * - Note this register returns an invalid value if using the default | ||
| 1441 | * single instruction 8byte read, in order to workaround that pass | ||
| 1442 | * flag I915_REG_READ_8B_WA in offset field. | ||
| 1443 | * | ||
| 1444 | */ | ||
| 1445 | |||
| 1446 | struct drm_i915_reset_stats { | ||
| 1447 | __u32 ctx_id; | ||
| 1448 | __u32 flags; | ||
| 1449 | |||
| 1450 | /* All resets since boot/module reload, for all contexts */ | ||
| 1451 | __u32 reset_count; | ||
| 1452 | |||
| 1453 | /* Number of batches lost when active in GPU, for this context */ | ||
| 1454 | __u32 batch_active; | ||
| 1455 | |||
| 1456 | /* Number of batches lost pending for execution, for this context */ | ||
| 1457 | __u32 batch_pending; | ||
| 1458 | |||
| 1459 | __u32 pad; | ||
| 1460 | }; | ||
| 1461 | |||
| 1462 | struct drm_i915_gem_userptr { | ||
| 1463 | __u64 user_ptr; | ||
| 1464 | __u64 user_size; | ||
| 1465 | __u32 flags; | 1465 | __u32 flags; |
| 1466 | #define I915_USERPTR_READ_ONLY 0x1 | 1466 | #define I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS (1u << 0) |
| 1467 | #define I915_USERPTR_UNSYNCHRONIZED 0x80000000 | 1467 | #define I915_CONTEXT_CREATE_FLAGS_UNKNOWN \ |
| 1468 | /** | 1468 | (-(I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS << 1)) |
| 1469 | * Returned handle for the object. | 1469 | __u64 extensions; |
| 1470 | * | ||
| 1471 | * Object handles are nonzero. | ||
| 1472 | */ | ||
| 1473 | __u32 handle; | ||
| 1474 | }; | 1470 | }; |
| 1475 | 1471 | ||
| 1476 | struct drm_i915_gem_context_param { | 1472 | struct drm_i915_gem_context_param { |
| @@ -1491,6 +1487,28 @@ struct drm_i915_gem_context_param { · 14 unmodified lines | |||
| 1491 | * drm_i915_gem_context_param_sseu. | 1487 | * drm_i915_gem_context_param_sseu. |
| 1492 | */ | 1488 | */ |
| 1493 | #define I915_CONTEXT_PARAM_SSEU 0x7 | 1489 | #define I915_CONTEXT_PARAM_SSEU 0x7 |
| 1490 | |||
| 1491 | /* | ||
| 1492 | * Not all clients may want to attempt automatic recover of a context after | ||
| 1493 | * a hang (for example, some clients may only submit very small incremental | ||
| 1494 | * batches relying on known logical state of previous batches which will never | ||
| 1495 | * recover correctly and each attempt will hang), and so would prefer that | ||
| 1496 | * the context is forever banned instead. | ||
| 1497 | * | ||
| 1498 | * If set to false (0), after a reset, subsequent (and in flight) rendering | ||
| 1499 | * from this context is discarded, and the client will need to create a new | ||
| 1500 | * context to use instead. | ||
| 1501 | * | ||
| 1502 | * If set to true (1), the kernel will automatically attempt to recover the | ||
| 1503 | * context by skipping the hanging batch and executing the next batch starting | ||
| 1504 | * from the default context state (discarding the incomplete logical context | ||
| 1505 | * state lost due to the reset). | ||
| 1506 | * | ||
| 1507 | * On creation, all new contexts are marked as recoverable. | ||
| 1508 | */ | ||
| 1509 | #define I915_CONTEXT_PARAM_RECOVERABLE 0x8 | ||
| 1510 | /* Must be kept compact -- no holes and well documented */ | ||
| 1511 | |||
| 1494 | __u64 value; | 1512 | __u64 value; |
| 1495 | }; | 1513 | }; |
| 1496 | 1514 | ||
| @@ -1519,8 +1537,7 @@ struct drm_i915_gem_context_param_sseu { · 22 unmodified lines | |||
| 1519 | /* | 1537 | /* |
| 1520 | * Engine class & instance to be configured or queried. | 1538 | * Engine class & instance to be configured or queried. |
| 1521 | */ | 1539 | */ |
| 1522 | __u16 engine_class; | 1540 | struct i915_engine_class_instance engine; |
| 1523 | __u16 engine_instance; | ||
| 1524 | 1541 | ||
| 1525 | /* | 1542 | /* |
| 1526 | * Unused for now. Must be cleared to zero. | 1543 | * Unused for now. Must be cleared to zero. |
| @@ -1553,6 +1570,96 @@ struct drm_i915_gem_context_param_sseu { · 26 unmodified lines | |||
| 1553 | __u32 rsvd; | 1570 | __u32 rsvd; |
| 1554 | }; | 1571 | }; |
| 1555 | 1572 | ||
| 1573 | struct drm_i915_gem_context_create_ext_setparam { | ||
| 1574 | #define I915_CONTEXT_CREATE_EXT_SETPARAM 0 | ||
| 1575 | struct i915_user_extension base; | ||
| 1576 | struct drm_i915_gem_context_param param; | ||
| 1577 | }; | ||
| 1578 | |||
| 1579 | struct drm_i915_gem_context_destroy { | ||
| 1580 | __u32 ctx_id; | ||
| 1581 | __u32 pad; | ||
| 1582 | }; | ||
| 1583 | |||
| 1584 | /* | ||
| 1585 | * DRM_I915_GEM_VM_CREATE - | ||
| 1586 | * | ||
| 1587 | * Create a new virtual memory address space (ppGTT) for use within a context | ||
| 1588 | * on the same file. Extensions can be provided to configure exactly how the | ||
| 1589 | * address space is setup upon creation. | ||
| 1590 | * | ||
| 1591 | * The id of new VM (bound to the fd) for use with I915_CONTEXT_PARAM_VM is | ||
| 1592 | * returned in the outparam @id. | ||
| 1593 | * | ||
| 1594 | * No flags are defined, with all bits reserved and must be zero. | ||
| 1595 | * | ||
| 1596 | * An extension chain maybe provided, starting with @extensions, and terminated | ||
| 1597 | * by the @next_extension being 0. Currently, no extensions are defined. | ||
| 1598 | * | ||
| 1599 | * DRM_I915_GEM_VM_DESTROY - | ||
| 1600 | * | ||
| 1601 | * Destroys a previously created VM id, specified in @id. | ||
| 1602 | * | ||
| 1603 | * No extensions or flags are allowed currently, and so must be zero. | ||
| 1604 | */ | ||
| 1605 | struct drm_i915_gem_vm_control { | ||
| 1606 | __u64 extensions; | ||
| 1607 | __u32 flags; | ||
| 1608 | __u32 vm_id; | ||
| 1609 | }; | ||
| 1610 | |||
| 1611 | struct drm_i915_reg_read { | ||
| 1612 | /* | ||
| 1613 | * Register offset. | ||
| 1614 | * For 64bit wide registers where the upper 32bits don't immediately | ||
| 1615 | * follow the lower 32bits, the offset of the lower 32bits must | ||
| 1616 | * be specified | ||
| 1617 | */ | ||
| 1618 | __u64 offset; | ||
| 1619 | #define I915_REG_READ_8B_WA (1ul << 0) | ||
| 1620 | |||
| 1621 | __u64 val; /* Return value */ | ||
| 1622 | }; | ||
| 1623 | |||
| 1624 | /* Known registers: | ||
| 1625 | * | ||
| 1626 | * Render engine timestamp - 0x2358 + 64bit - gen7+ | ||
| 1627 | * - Note this register returns an invalid value if using the default | ||
| 1628 | * single instruction 8byte read, in order to workaround that pass | ||
| 1629 | * flag I915_REG_READ_8B_WA in offset field. | ||
| 1630 | * | ||
| 1631 | */ | ||
| 1632 | |||
| 1633 | struct drm_i915_reset_stats { | ||
| 1634 | __u32 ctx_id; | ||
| 1635 | __u32 flags; | ||
| 1636 | |||
| 1637 | /* All resets since boot/module reload, for all contexts */ | ||
| 1638 | __u32 reset_count; | ||
| 1639 | |||
| 1640 | /* Number of batches lost when active in GPU, for this context */ | ||
| 1641 | __u32 batch_active; | ||
| 1642 | |||
| 1643 | /* Number of batches lost pending for execution, for this context */ | ||
| 1644 | __u32 batch_pending; | ||
| 1645 | |||
| 1646 | __u32 pad; | ||
| 1647 | }; | ||
| 1648 | |||
| 1649 | struct drm_i915_gem_userptr { | ||
| 1650 | __u64 user_ptr; | ||
| 1651 | __u64 user_size; | ||
| 1652 | __u32 flags; | ||
| 1653 | #define I915_USERPTR_READ_ONLY 0x1 | ||
| 1654 | #define I915_USERPTR_UNSYNCHRONIZED 0x80000000 | ||
| 1655 | /** | ||
| 1656 | * Returned handle for the object. | ||
| 1657 | * | ||
| 1658 | * Object handles are nonzero. | ||
| 1659 | */ | ||
| 1660 | __u32 handle; | ||
| 1661 | }; | ||
| 1662 | |||
| 1556 | enum drm_i915_oa_format { | 1663 | enum drm_i915_oa_format { |
| 1557 | I915_OA_FORMAT_A13 = 1, /* HSW only */ | 1664 | I915_OA_FORMAT_A13 = 1, /* HSW only */ |
| 1558 | I915_OA_FORMAT_A29, /* HSW only */ | 1665 | I915_OA_FORMAT_A29, /* HSW only */ |
| @@ -1714,6 +1821,7 @@ struct drm_i915_perf_oa_config { · 155 unmodified lines | |||
| 1714 | struct drm_i915_query_item { | 1821 | struct drm_i915_query_item { |
| 1715 | __u64 query_id; | 1822 | __u64 query_id; |
| 1716 | #define DRM_I915_QUERY_TOPOLOGY_INFO 1 | 1823 | #define DRM_I915_QUERY_TOPOLOGY_INFO 1 |
| 1824 | /* Must be kept compact -- no holes and well documented */ | ||
| 1717 | 1825 | ||
| 1718 | /* | 1826 | /* |
| 1719 | * When set to zero by userspace, this is filled with the size of the | 1827 | * When set to zero by userspace, this is filled with the size of the |
| @@ -0,0 +1,169 @@ | |||
| 1 | /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */ | ||
| 2 | /* Copyright 2017-2018 Qiang Yu <yuq825@gmail.com> */ | ||
| 3 | |||
| 4 | #ifndef __LIMA_DRM_H__ | ||
| 5 | #define __LIMA_DRM_H__ | ||
| 6 | |||
| 7 | #include "drm.h" | ||
| 8 | |||
| 9 | #if defined(__cplusplus) | ||
| 10 | extern "C" { | ||
| 11 | #endif | ||
| 12 | |||
| 13 | enum drm_lima_param_gpu_id { | ||
| 14 | DRM_LIMA_PARAM_GPU_ID_UNKNOWN, | ||
| 15 | DRM_LIMA_PARAM_GPU_ID_MALI400, | ||
| 16 | DRM_LIMA_PARAM_GPU_ID_MALI450, | ||
| 17 | }; | ||
| 18 | |||
| 19 | enum drm_lima_param { | ||
| 20 | DRM_LIMA_PARAM_GPU_ID, | ||
| 21 | DRM_LIMA_PARAM_NUM_PP, | ||
| 22 | DRM_LIMA_PARAM_GP_VERSION, | ||
| 23 | DRM_LIMA_PARAM_PP_VERSION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * get various information of the GPU | ||
| 28 | */ | ||
| 29 | struct drm_lima_get_param { | ||
| 30 | __u32 param; /* in, value in enum drm_lima_param */ | ||
| 31 | __u32 pad; /* pad, must be zero */ | ||
| 32 | __u64 value; /* out, parameter value */ | ||
| 33 | }; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * create a buffer for used by GPU | ||
| 37 | */ | ||
| 38 | struct drm_lima_gem_create { | ||
| 39 | __u32 size; /* in, buffer size */ | ||
| 40 | __u32 flags; /* in, currently no flags, must be zero */ | ||
| 41 | __u32 handle; /* out, GEM buffer handle */ | ||
| 42 | __u32 pad; /* pad, must be zero */ | ||
| 43 | }; | ||
| 44 | |||
| 45 | /** | ||
| 46 | * get information of a buffer | ||
| 47 | */ | ||
| 48 | struct drm_lima_gem_info { | ||
| 49 | __u32 handle; /* in, GEM buffer handle */ | ||
| 50 | __u32 va; /* out, virtual address mapped into GPU MMU */ | ||
| 51 | __u64 offset; /* out, used to mmap this buffer to CPU */ | ||
| 52 | }; | ||
| 53 | |||
| 54 | #define LIMA_SUBMIT_BO_READ 0x01 | ||
| 55 | #define LIMA_SUBMIT_BO_WRITE 0x02 | ||
| 56 | |||
| 57 | /* buffer information used by one task */ | ||
| 58 | struct drm_lima_gem_submit_bo { | ||
| 59 | __u32 handle; /* in, GEM buffer handle */ | ||
| 60 | __u32 flags; /* in, buffer read/write by GPU */ | ||
| 61 | }; | ||
| 62 | |||
| 63 | #define LIMA_GP_FRAME_REG_NUM 6 | ||
| 64 | |||
| 65 | /* frame used to setup GP for each task */ | ||
| 66 | struct drm_lima_gp_frame { | ||
| 67 | __u32 frame[LIMA_GP_FRAME_REG_NUM]; | ||
| 68 | }; | ||
| 69 | |||
| 70 | #define LIMA_PP_FRAME_REG_NUM 23 | ||
| 71 | #define LIMA_PP_WB_REG_NUM 12 | ||
| 72 | |||
| 73 | /* frame used to setup mali400 GPU PP for each task */ | ||
| 74 | struct drm_lima_m400_pp_frame { | ||
| 75 | __u32 frame[LIMA_PP_FRAME_REG_NUM]; | ||
| 76 | __u32 num_pp; | ||
| 77 | __u32 wb[3 * LIMA_PP_WB_REG_NUM]; | ||
| 78 | __u32 plbu_array_address[4]; | ||
| 79 | __u32 fragment_stack_address[4]; | ||
| 80 | }; | ||
| 81 | |||
| 82 | /* frame used to setup mali450 GPU PP for each task */ | ||
| 83 | struct drm_lima_m450_pp_frame { | ||
| 84 | __u32 frame[LIMA_PP_FRAME_REG_NUM]; | ||
| 85 | __u32 num_pp; | ||
| 86 | __u32 wb[3 * LIMA_PP_WB_REG_NUM]; | ||
| 87 | __u32 use_dlbu; | ||
| 88 | __u32 _pad; | ||
| 89 | union { | ||
| 90 | __u32 plbu_array_address[8]; | ||
| 91 | __u32 dlbu_regs[4]; | ||
| 92 | }; | ||
| 93 | __u32 fragment_stack_address[8]; | ||
| 94 | }; | ||
| 95 | |||
| 96 | #define LIMA_PIPE_GP 0x00 | ||
| 97 | #define LIMA_PIPE_PP 0x01 | ||
| 98 | |||
| 99 | #define LIMA_SUBMIT_FLAG_EXPLICIT_FENCE (1 << 0) | ||
| 100 | |||
| 101 | /** | ||
| 102 | * submit a task to GPU | ||
| 103 | * | ||
| 104 | * User can always merge multi sync_file and drm_syncobj | ||
| 105 | * into one drm_syncobj as in_sync[0], but we reserve | ||
| 106 | * in_sync[1] for another task's out_sync to avoid the | ||
| 107 | * export/import/merge pass when explicit sync. | ||
| 108 | */ | ||
| 109 | struct drm_lima_gem_submit { | ||
| 110 | __u32 ctx; /* in, context handle task is submitted to */ | ||
| 111 | __u32 pipe; /* in, which pipe to use, GP/PP */ | ||
| 112 | __u32 nr_bos; /* in, array length of bos field */ | ||
| 113 | __u32 frame_size; /* in, size of frame field */ | ||
| 114 | __u64 bos; /* in, array of drm_lima_gem_submit_bo */ | ||
| 115 | __u64 frame; /* in, GP/PP frame */ | ||
| 116 | __u32 flags; /* in, submit flags */ | ||
| 117 | __u32 out_sync; /* in, drm_syncobj handle used to wait task finish after submission */ | ||
| 118 | __u32 in_sync[2]; /* in, drm_syncobj handle used to wait before start this task */ | ||
| 119 | }; | ||
| 120 | |||
| 121 | #define LIMA_GEM_WAIT_READ 0x01 | ||
| 122 | #define LIMA_GEM_WAIT_WRITE 0x02 | ||
| 123 | |||
| 124 | /** | ||
| 125 | * wait pending GPU task finish of a buffer | ||
| 126 | */ | ||
| 127 | struct drm_lima_gem_wait { | ||
| 128 | __u32 handle; /* in, GEM buffer handle */ | ||
| 129 | __u32 op; /* in, CPU want to read/write this buffer */ | ||
| 130 | __s64 timeout_ns; /* in, wait timeout in absulute time */ | ||
| 131 | }; | ||
| 132 | |||
| 133 | /** | ||
| 134 | * create a context | ||
| 135 | */ | ||
| 136 | struct drm_lima_ctx_create { | ||
| 137 | __u32 id; /* out, context handle */ | ||
| 138 | __u32 _pad; /* pad, must be zero */ | ||
| 139 | }; | ||
| 140 | |||
| 141 | /** | ||
| 142 | * free a context | ||
| 143 | */ | ||
| 144 | struct drm_lima_ctx_free { | ||
| 145 | __u32 id; /* in, context handle */ | ||
| 146 | __u32 _pad; /* pad, must be zero */ | ||
| 147 | }; | ||
| 148 | |||
| 149 | #define DRM_LIMA_GET_PARAM 0x00 | ||
| 150 | #define DRM_LIMA_GEM_CREATE 0x01 | ||
| 151 | #define DRM_LIMA_GEM_INFO 0x02 | ||
| 152 | #define DRM_LIMA_GEM_SUBMIT 0x03 | ||
| 153 | #define DRM_LIMA_GEM_WAIT 0x04 | ||
| 154 | #define DRM_LIMA_CTX_CREATE 0x05 | ||
| 155 | #define DRM_LIMA_CTX_FREE 0x06 | ||
| 156 | |||
| 157 | #define DRM_IOCTL_LIMA_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GET_PARAM, struct drm_lima_get_param) | ||
| 158 | #define DRM_IOCTL_LIMA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_CREATE, struct drm_lima_gem_create) | ||
| 159 | #define DRM_IOCTL_LIMA_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_INFO, struct drm_lima_gem_info) | ||
| 160 | #define DRM_IOCTL_LIMA_GEM_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_SUBMIT, struct drm_lima_gem_submit) | ||
| 161 | #define DRM_IOCTL_LIMA_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_WAIT, struct drm_lima_gem_wait) | ||
| 162 | #define DRM_IOCTL_LIMA_CTX_CREATE DRM_IOR(DRM_COMMAND_BASE + DRM_LIMA_CTX_CREATE, struct drm_lima_ctx_create) | ||
| 163 | #define DRM_IOCTL_LIMA_CTX_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_CTX_FREE, struct drm_lima_ctx_free) | ||
| 164 | |||
| 165 | #if defined(__cplusplus) | ||
| 166 | } | ||
| 167 | #endif | ||
| 168 | |||
| 169 | #endif /* __LIMA_DRM_H__ */ | ||
| @@ -74,6 +74,8 @@ struct drm_msm_timespec { · 73 unmodified lines | |||
| 74 | #define MSM_PARAM_TIMESTAMP 0x05 | 74 | #define MSM_PARAM_TIMESTAMP 0x05 |
| 75 | #define MSM_PARAM_GMEM_BASE 0x06 | 75 | #define MSM_PARAM_GMEM_BASE 0x06 |
| 76 | #define MSM_PARAM_NR_RINGS 0x07 | 76 | #define MSM_PARAM_NR_RINGS 0x07 |
| 77 | #define MSM_PARAM_PP_PGTABLE 0x08 /* => 1 for per-process pagetables, else 0 */ | ||
| 78 | #define MSM_PARAM_FAULTS 0x09 | ||
| 77 | 79 | ||
| 78 | struct drm_msm_param { | 80 | struct drm_msm_param { |
| 79 | __u32 pipe; /* in, MSM_PIPE_x */ | 81 | __u32 pipe; /* in, MSM_PIPE_x */ |
| @@ -286,6 +288,16 @@ struct drm_msm_submitqueue { · 206 unmodified lines | |||
| 286 | __u32 id; /* out, identifier */ | 288 | __u32 id; /* out, identifier */ |
| 287 | }; | 289 | }; |
| 288 | 290 | ||
| 291 | #define MSM_SUBMITQUEUE_PARAM_FAULTS 0 | ||
| 292 | |||
| 293 | struct drm_msm_submitqueue_query { | ||
| 294 | __u64 data; | ||
| 295 | __u32 id; | ||
| 296 | __u32 param; | ||
| 297 | __u32 len; | ||
| 298 | __u32 pad; | ||
| 299 | }; | ||
| 300 | |||
| 289 | #define DRM_MSM_GET_PARAM 0x00 | 301 | #define DRM_MSM_GET_PARAM 0x00 |
| 290 | /* placeholder: | 302 | /* placeholder: |
| 291 | #define DRM_MSM_SET_PARAM 0x01 | 303 | #define DRM_MSM_SET_PARAM 0x01 |
| @@ -302,6 +314,7 @@ struct drm_msm_submitqueue { · 10 unmodified lines | |||
| 302 | */ | 314 | */ |
| 303 | #define DRM_MSM_SUBMITQUEUE_NEW 0x0A | 315 | #define DRM_MSM_SUBMITQUEUE_NEW 0x0A |
| 304 | #define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B | 316 | #define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B |
| 317 | #define DRM_MSM_SUBMITQUEUE_QUERY 0x0C | ||
| 305 | 318 | ||
| 306 | #define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) | 319 | #define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) |
| 307 | #define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new) | 320 | #define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new) |
| @@ -313,6 +326,7 @@ struct drm_msm_submitqueue { · 5 unmodified lines | |||
| 313 | #define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise) | 326 | #define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise) |
| 314 | #define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue) | 327 | #define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue) |
| 315 | #define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32) | 328 | #define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32) |
| 329 | #define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query) | ||
| 316 | 330 | ||
| 317 | #if defined(__cplusplus) | 331 | #if defined(__cplusplus) |
| 318 | } | 332 | } |
| @@ -0,0 +1,142 @@ | |||
| 1 | /* SPDX-License-Identifier: MIT */ | ||
| 2 | /* | ||
| 3 | * Copyright © 2014-2018 Broadcom | ||
| 4 | * Copyright © 2019 Collabora ltd. | ||
| 5 | */ | ||
| 6 | #ifndef _PANFROST_DRM_H_ | ||
| 7 | #define _PANFROST_DRM_H_ | ||
| 8 | |||
| 9 | #include "drm.h" | ||
| 10 | |||
| 11 | #if defined(__cplusplus) | ||
| 12 | extern "C" { | ||
| 13 | #endif | ||
| 14 | |||
| 15 | #define DRM_PANFROST_SUBMIT 0x00 | ||
| 16 | #define DRM_PANFROST_WAIT_BO 0x01 | ||
| 17 | #define DRM_PANFROST_CREATE_BO 0x02 | ||
| 18 | #define DRM_PANFROST_MMAP_BO 0x03 | ||
| 19 | #define DRM_PANFROST_GET_PARAM 0x04 | ||
| 20 | #define DRM_PANFROST_GET_BO_OFFSET 0x05 | ||
| 21 | |||
| 22 | #define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit) | ||
| 23 | #define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo) | ||
| 24 | #define DRM_IOCTL_PANFROST_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_CREATE_BO, struct drm_panfrost_create_bo) | ||
| 25 | #define DRM_IOCTL_PANFROST_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MMAP_BO, struct drm_panfrost_mmap_bo) | ||
| 26 | #define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param) | ||
| 27 | #define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset) | ||
| 28 | |||
| 29 | #define PANFROST_JD_REQ_FS (1 << 0) | ||
| 30 | /** | ||
| 31 | * struct drm_panfrost_submit - ioctl argument for submitting commands to the 3D | ||
| 32 | * engine. | ||
| 33 | * | ||
| 34 | * This asks the kernel to have the GPU execute a render command list. | ||
| 35 | */ | ||
| 36 | struct drm_panfrost_submit { | ||
| 37 | |||
| 38 | /** Address to GPU mapping of job descriptor */ | ||
| 39 | __u64 jc; | ||
| 40 | |||
| 41 | /** An optional array of sync objects to wait on before starting this job. */ | ||
| 42 | __u64 in_syncs; | ||
| 43 | |||
| 44 | /** Number of sync objects to wait on before starting this job. */ | ||
| 45 | __u32 in_sync_count; | ||
| 46 | |||
| 47 | /** An optional sync object to place the completion fence in. */ | ||
| 48 | __u32 out_sync; | ||
| 49 | |||
| 50 | /** Pointer to a u32 array of the BOs that are referenced by the job. */ | ||
| 51 | __u64 bo_handles; | ||
| 52 | |||
| 53 | /** Number of BO handles passed in (size is that times 4). */ | ||
| 54 | __u32 bo_handle_count; | ||
| 55 | |||
| 56 | /** A combination of PANFROST_JD_REQ_* */ | ||
| 57 | __u32 requirements; | ||
| 58 | }; | ||
| 59 | |||
| 60 | /** | ||
| 61 | * struct drm_panfrost_wait_bo - ioctl argument for waiting for | ||
| 62 | * completion of the last DRM_PANFROST_SUBMIT on a BO. | ||
| 63 | * | ||
| 64 | * This is useful for cases where multiple processes might be | ||
| 65 | * rendering to a BO and you want to wait for all rendering to be | ||
| 66 | * completed. | ||
| 67 | */ | ||
| 68 | struct drm_panfrost_wait_bo { | ||
| 69 | __u32 handle; | ||
| 70 | __u32 pad; | ||
| 71 | __s64 timeout_ns; /* absolute */ | ||
| 72 | }; | ||
| 73 | |||
| 74 | /** | ||
| 75 | * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs. | ||
| 76 | * | ||
| 77 | * There are currently no values for the flags argument, but it may be | ||
| 78 | * used in a future extension. | ||
| 79 | */ | ||
| 80 | struct drm_panfrost_create_bo { | ||
| 81 | __u32 size; | ||
| 82 | __u32 flags; | ||
| 83 | /** Returned GEM handle for the BO. */ | ||
| 84 | __u32 handle; | ||
| 85 | /* Pad, must be zero-filled. */ | ||
| 86 | __u32 pad; | ||
| 87 | /** | ||
| 88 | * Returned offset for the BO in the GPU address space. This offset | ||
| 89 | * is private to the DRM fd and is valid for the lifetime of the GEM | ||
| 90 | * handle. | ||
| 91 | * | ||
| 92 | * This offset value will always be nonzero, since various HW | ||
| 93 | * units treat 0 specially. | ||
| 94 | */ | ||
| 95 | __u64 offset; | ||
| 96 | }; | ||
| 97 | |||
| 98 | /** | ||
| 99 | * struct drm_panfrost_mmap_bo - ioctl argument for mapping Panfrost BOs. | ||
| 100 | * | ||
| 101 | * This doesn't actually perform an mmap. Instead, it returns the | ||
| 102 | * offset you need to use in an mmap on the DRM device node. This | ||
| 103 | * means that tools like valgrind end up knowing about the mapped | ||
| 104 | * memory. | ||
| 105 | * | ||
| 106 | * There are currently no values for the flags argument, but it may be | ||
| 107 | * used in a future extension. | ||
| 108 | */ | ||
| 109 | struct drm_panfrost_mmap_bo { | ||
| 110 | /** Handle for the object being mapped. */ | ||
| 111 | __u32 handle; | ||
| 112 | __u32 flags; | ||
| 113 | /** offset into the drm node to use for subsequent mmap call. */ | ||
| 114 | __u64 offset; | ||
| 115 | }; | ||
| 116 | |||
| 117 | enum drm_panfrost_param { | ||
| 118 | DRM_PANFROST_PARAM_GPU_PROD_ID, | ||
| 119 | }; | ||
| 120 | |||
| 121 | struct drm_panfrost_get_param { | ||
| 122 | __u32 param; | ||
| 123 | __u32 pad; | ||
| 124 | __u64 value; | ||
| 125 | }; | ||
| 126 | |||
| 127 | /** | ||
| 128 | * Returns the offset for the BO in the GPU address space for this DRM fd. | ||
| 129 | * This is the same value returned by drm_panfrost_create_bo, if that was called | ||
| 130 | * from this DRM fd. | ||
| 131 | */ | ||
| 132 | struct drm_panfrost_get_bo_offset { | ||
| 133 | __u32 handle; | ||
| 134 | __u32 pad; | ||
| 135 | __u64 offset; | ||
| 136 | }; | ||
| 137 | |||
| 138 | #if defined(__cplusplus) | ||
| 139 | } | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #endif /* _PANFROST_DRM_H_ */ | ||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright 2019 Google Inc | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License | ||
| 7 | * as published by the Free Software Foundation; either version | ||
| 8 | * 2 of the License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * Provides a simple driver to control the ASPEED P2A interface which allows | ||
| 11 | * the host to read and write to various regions of the BMC's memory. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef _UAPI_LINUX_ASPEED_P2A_CTRL_H | ||
| 15 | #define _UAPI_LINUX_ASPEED_P2A_CTRL_H | ||
| 16 | |||
| 17 | #include <linux/ioctl.h> | ||
| 18 | #include <linux/types.h> | ||
| 19 | |||
| 20 | #define ASPEED_P2A_CTRL_READ_ONLY 0 | ||
| 21 | #define ASPEED_P2A_CTRL_READWRITE 1 | ||
| 22 | |||
| 23 | /* | ||
| 24 | * This driver provides a mechanism for enabling or disabling the read-write | ||
| 25 | * property of specific windows into the ASPEED BMC's memory. | ||
| 26 | * | ||
| 27 | * A user can map a region of the BMC's memory as read-only or read-write, with | ||
| 28 | * the caveat that once any region is mapped, all regions are unlocked for | ||
| 29 | * reading. | ||
| 30 | */ | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Unlock a region of BMC physical memory for access from the host. | ||
| 34 | * | ||
| 35 | * Also used to read back the optional memory-region configuration for the | ||
| 36 | * driver. | ||
| 37 | */ | ||
| 38 | struct aspeed_p2a_ctrl_mapping { | ||
| 39 | __u64 addr; | ||
| 40 | __u32 length; | ||
| 41 | __u32 flags; | ||
| 42 | }; | ||
| 43 | |||
| 44 | #define __ASPEED_P2A_CTRL_IOCTL_MAGIC 0xb3 | ||
| 45 | |||
| 46 | /* | ||
| 47 | * This IOCTL is meant to configure a region or regions of memory given a | ||
| 48 | * starting address and length to be readable by the host, or | ||
| 49 | * readable-writeable. | ||
| 50 | */ | ||
| 51 | #define ASPEED_P2A_CTRL_IOCTL_SET_WINDOW _IOW(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \ | ||
| 52 | 0x00, struct aspeed_p2a_ctrl_mapping) | ||
| 53 | |||
| 54 | /* | ||
| 55 | * This IOCTL is meant to read back to the user the base address and length of | ||
| 56 | * the memory-region specified to the driver for use with mmap. | ||
| 57 | */ | ||
| 58 | #define ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG \ | ||
| 59 | _IOWR(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \ | ||
| 60 | 0x01, struct aspeed_p2a_ctrl_mapping) | ||
| 61 | |||
| 62 | #endif /* _UAPI_LINUX_ASPEED_P2A_CTRL_H */ | ||
| @@ -114,6 +114,8 @@ · 113 unmodified lines | |||
| 114 | #define AUDIT_REPLACE 1329 /* Replace auditd if this packet unanswerd */ | 114 | #define AUDIT_REPLACE 1329 /* Replace auditd if this packet unanswerd */ |
| 115 | #define AUDIT_KERN_MODULE 1330 /* Kernel Module events */ | 115 | #define AUDIT_KERN_MODULE 1330 /* Kernel Module events */ |
| 116 | #define AUDIT_FANOTIFY 1331 /* Fanotify access decision */ | 116 | #define AUDIT_FANOTIFY 1331 /* Fanotify access decision */ |
| 117 | #define AUDIT_TIME_INJOFFSET 1332 /* Timekeeping offset injected */ | ||
| 118 | #define AUDIT_TIME_ADJNTPVAL 1333 /* NTP value adjustment */ | ||
| 117 | 119 | ||
| 118 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 120 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
| 119 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 121 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
| @@ -375,11 +377,19 @@ enum { · 255 unmodified lines | |||
| 375 | 377 | ||
| 376 | #define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 378 | #define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 377 | #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 379 | #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 380 | #define AUDIT_ARCH_ARCOMPACT (EM_ARCOMPACT|__AUDIT_ARCH_LE) | ||
| 381 | #define AUDIT_ARCH_ARCOMPACTBE (EM_ARCOMPACT) | ||
| 382 | #define AUDIT_ARCH_ARCV2 (EM_ARCV2|__AUDIT_ARCH_LE) | ||
| 383 | #define AUDIT_ARCH_ARCV2BE (EM_ARCV2) | ||
| 378 | #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) | 384 | #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) |
| 379 | #define AUDIT_ARCH_ARMEB (EM_ARM) | 385 | #define AUDIT_ARCH_ARMEB (EM_ARM) |
| 386 | #define AUDIT_ARCH_C6X (EM_TI_C6000|__AUDIT_ARCH_LE) | ||
| 387 | #define AUDIT_ARCH_C6XBE (EM_TI_C6000) | ||
| 380 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) | 388 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) |
| 381 | #define AUDIT_ARCH_CSKY (EM_CSKY|__AUDIT_ARCH_LE) | 389 | #define AUDIT_ARCH_CSKY (EM_CSKY|__AUDIT_ARCH_LE) |
| 382 | #define AUDIT_ARCH_FRV (EM_FRV) | 390 | #define AUDIT_ARCH_FRV (EM_FRV) |
| 391 | #define AUDIT_ARCH_H8300 (EM_H8_300) | ||
| 392 | #define AUDIT_ARCH_HEXAGON (EM_HEXAGON) | ||
| 383 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) | 393 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) |
| 384 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 394 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 385 | #define AUDIT_ARCH_M32R (EM_M32R) | 395 | #define AUDIT_ARCH_M32R (EM_M32R) |
| @@ -393,6 +403,9 @@ enum { · 7 unmodified lines | |||
| 393 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 403 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 394 | #define AUDIT_ARCH_MIPSEL64N32 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE|\ | 404 | #define AUDIT_ARCH_MIPSEL64N32 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE|\ |
| 395 | __AUDIT_ARCH_CONVENTION_MIPS64_N32) | 405 | __AUDIT_ARCH_CONVENTION_MIPS64_N32) |
| 406 | #define AUDIT_ARCH_NDS32 (EM_NDS32|__AUDIT_ARCH_LE) | ||
| 407 | #define AUDIT_ARCH_NDS32BE (EM_NDS32) | ||
| 408 | #define AUDIT_ARCH_NIOS2 (EM_ALTERA_NIOS2|__AUDIT_ARCH_LE) | ||
| 396 | #define AUDIT_ARCH_OPENRISC (EM_OPENRISC) | 409 | #define AUDIT_ARCH_OPENRISC (EM_OPENRISC) |
| 397 | #define AUDIT_ARCH_PARISC (EM_PARISC) | 410 | #define AUDIT_ARCH_PARISC (EM_PARISC) |
| 398 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) | 411 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) |
| @@ -413,6 +426,7 @@ enum { · 14 unmodified lines | |||
| 413 | #define AUDIT_ARCH_TILEGX (EM_TILEGX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 426 | #define AUDIT_ARCH_TILEGX (EM_TILEGX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 414 | #define AUDIT_ARCH_TILEGX32 (EM_TILEGX|__AUDIT_ARCH_LE) | 427 | #define AUDIT_ARCH_TILEGX32 (EM_TILEGX|__AUDIT_ARCH_LE) |
| 415 | #define AUDIT_ARCH_TILEPRO (EM_TILEPRO|__AUDIT_ARCH_LE) | 428 | #define AUDIT_ARCH_TILEPRO (EM_TILEPRO|__AUDIT_ARCH_LE) |
| 429 | #define AUDIT_ARCH_UNICORE (EM_UNICORE|__AUDIT_ARCH_LE) | ||
| 416 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 430 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 417 | #define AUDIT_ARCH_XTENSA (EM_XTENSA) | 431 | #define AUDIT_ARCH_XTENSA (EM_XTENSA) |
| 418 | 432 | ||
| @@ -2,18 +2,6 @@ · 1 unmodified line | |||
| 2 | /* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors: | 2 | /* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors: |
| 3 | * | 3 | * |
| 4 | * Marek Lindner, Simon Wunderlich | 4 | * Marek Lindner, Simon Wunderlich |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of version 2 of the GNU General Public | ||
| 8 | * License as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, but | ||
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | 5 | */ |
| 18 | 6 | ||
| 19 | #ifndef _UAPI_LINUX_BATADV_PACKET_H_ | 7 | #ifndef _UAPI_LINUX_BATADV_PACKET_H_ |
| @@ -2,24 +2,6 @@ · 1 unmodified line | |||
| 2 | /* Copyright (C) 2016-2019 B.A.T.M.A.N. contributors: | 2 | /* Copyright (C) 2016-2019 B.A.T.M.A.N. contributors: |
| 3 | * | 3 | * |
| 4 | * Matthias Schiffer | 4 | * Matthias Schiffer |
| 5 | * | ||
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 7 | * copy of this software and associated documentation files (the "Software"), | ||
| 8 | * to deal in the Software without restriction, including without limitation | ||
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice shall be included in | ||
| 14 | * all copies or substantial portions of the Software. | ||
| 15 | * | ||
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| 22 | * DEALINGS IN THE SOFTWARE. | ||
| 23 | */ | 5 | */ |
| 24 | 6 | ||
| 25 | #ifndef _UAPI_LINUX_BATMAN_ADV_H_ | 7 | #ifndef _UAPI_LINUX_BATMAN_ADV_H_ |
| @@ -491,6 +473,13 @@ enum batadv_nl_attrs { · 465 unmodified lines | |||
| 491 | */ | 473 | */ |
| 492 | BATADV_ATTR_THROUGHPUT_OVERRIDE, | 474 | BATADV_ATTR_THROUGHPUT_OVERRIDE, |
| 493 | 475 | ||
| 476 | /** | ||
| 477 | * @BATADV_ATTR_MULTICAST_FANOUT: defines the maximum number of packet | ||
| 478 | * copies that may be generated for a multicast-to-unicast conversion. | ||
| 479 | * Once this limit is exceeded distribution will fall back to broadcast. | ||
| 480 | */ | ||
| 481 | BATADV_ATTR_MULTICAST_FANOUT, | ||
| 482 | |||
| 494 | /* add attributes above here, update the policy in netlink.c */ | 483 | /* add attributes above here, update the policy in netlink.c */ |
| 495 | 484 | ||
| 496 | /** | 485 | /** |
| @@ -105,6 +105,7 @@ enum bpf_cmd { · 104 unmodified lines | |||
| 105 | BPF_BTF_GET_FD_BY_ID, | 105 | BPF_BTF_GET_FD_BY_ID, |
| 106 | BPF_TASK_FD_QUERY, | 106 | BPF_TASK_FD_QUERY, |
| 107 | BPF_MAP_LOOKUP_AND_DELETE_ELEM, | 107 | BPF_MAP_LOOKUP_AND_DELETE_ELEM, |
| 108 | BPF_MAP_FREEZE, | ||
| 108 | }; | 109 | }; |
| 109 | 110 | ||
| 110 | enum bpf_map_type { | 111 | enum bpf_map_type { |
| @@ -132,6 +133,7 @@ enum bpf_map_type { · 21 unmodified lines | |||
| 132 | BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, | 133 | BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, |
| 133 | BPF_MAP_TYPE_QUEUE, | 134 | BPF_MAP_TYPE_QUEUE, |
| 134 | BPF_MAP_TYPE_STACK, | 135 | BPF_MAP_TYPE_STACK, |
| 136 | BPF_MAP_TYPE_SK_STORAGE, | ||
| 135 | }; | 137 | }; |
| 136 | 138 | ||
| 137 | /* Note that tracing related programs such as | 139 | /* Note that tracing related programs such as |
| @@ -166,6 +168,8 @@ enum bpf_prog_type { · 28 unmodified lines | |||
| 166 | BPF_PROG_TYPE_LIRC_MODE2, | 168 | BPF_PROG_TYPE_LIRC_MODE2, |
| 167 | BPF_PROG_TYPE_SK_REUSEPORT, | 169 | BPF_PROG_TYPE_SK_REUSEPORT, |
| 168 | BPF_PROG_TYPE_FLOW_DISSECTOR, | 170 | BPF_PROG_TYPE_FLOW_DISSECTOR, |
| 171 | BPF_PROG_TYPE_CGROUP_SYSCTL, | ||
| 172 | BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, | ||
| 169 | }; | 173 | }; |
| 170 | 174 | ||
| 171 | enum bpf_attach_type { | 175 | enum bpf_attach_type { |
| @@ -187,6 +191,7 @@ enum bpf_attach_type { · 15 unmodified lines | |||
| 187 | BPF_CGROUP_UDP6_SENDMSG, | 191 | BPF_CGROUP_UDP6_SENDMSG, |
| 188 | BPF_LIRC_MODE2, | 192 | BPF_LIRC_MODE2, |
| 189 | BPF_FLOW_DISSECTOR, | 193 | BPF_FLOW_DISSECTOR, |
| 194 | BPF_CGROUP_SYSCTL, | ||
| 190 | __MAX_BPF_ATTACH_TYPE | 195 | __MAX_BPF_ATTACH_TYPE |
| 191 | }; | 196 | }; |
| 192 | 197 | ||
| @@ -255,8 +260,19 @@ enum bpf_attach_type { · 62 unmodified lines | |||
| 255 | */ | 260 | */ |
| 256 | #define BPF_F_ANY_ALIGNMENT (1U << 1) | 261 | #define BPF_F_ANY_ALIGNMENT (1U << 1) |
| 257 | 262 | ||
| 258 | /* when bpf_ldimm64->src_reg == BPF_PSEUDO_MAP_FD, bpf_ldimm64->imm == fd */ | 263 | /* When BPF ldimm64's insn[0].src_reg != 0 then this can have |
| 264 | * two extensions: | ||
| 265 | * | ||
| 266 | * insn[0].src_reg: BPF_PSEUDO_MAP_FD BPF_PSEUDO_MAP_VALUE | ||
| 267 | * insn[0].imm: map fd map fd | ||
| 268 | * insn[1].imm: 0 offset into value | ||
| 269 | * insn[0].off: 0 0 | ||
| 270 | * insn[1].off: 0 0 | ||
| 271 | * ldimm64 rewrite: address of map address of map[0]+offset | ||
| 272 | * verifier type: CONST_PTR_TO_MAP PTR_TO_MAP_VALUE | ||
| 273 | */ | ||
| 259 | #define BPF_PSEUDO_MAP_FD 1 | 274 | #define BPF_PSEUDO_MAP_FD 1 |
| 275 | #define BPF_PSEUDO_MAP_VALUE 2 | ||
| 260 | 276 | ||
| 261 | /* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative | 277 | /* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative |
| 262 | * offset to another bpf function | 278 | * offset to another bpf function |
| @@ -283,7 +299,7 @@ enum bpf_attach_type { · 20 unmodified lines | |||
| 283 | 299 | ||
| 284 | #define BPF_OBJ_NAME_LEN 16U | 300 | #define BPF_OBJ_NAME_LEN 16U |
| 285 | 301 | ||
| 286 | /* Flags for accessing BPF object */ | 302 | /* Flags for accessing BPF object from syscall side. */ |
| 287 | #define BPF_F_RDONLY (1U << 3) | 303 | #define BPF_F_RDONLY (1U << 3) |
| 288 | #define BPF_F_WRONLY (1U << 4) | 304 | #define BPF_F_WRONLY (1U << 4) |
| 289 | 305 | ||
| @@ -293,6 +309,10 @@ enum bpf_attach_type { · 3 unmodified lines | |||
| 293 | /* Zero-initialize hash function seed. This should only be used for testing. */ | 309 | /* Zero-initialize hash function seed. This should only be used for testing. */ |
| 294 | #define BPF_F_ZERO_SEED (1U << 6) | 310 | #define BPF_F_ZERO_SEED (1U << 6) |
| 295 | 311 | ||
| 312 | /* Flags for accessing BPF object from program side. */ | ||
| 313 | #define BPF_F_RDONLY_PROG (1U << 7) | ||
| 314 | #define BPF_F_WRONLY_PROG (1U << 8) | ||
| 315 | |||
| 296 | /* flags for BPF_PROG_QUERY */ | 316 | /* flags for BPF_PROG_QUERY */ |
| 297 | #define BPF_F_QUERY_EFFECTIVE (1U << 0) | 317 | #define BPF_F_QUERY_EFFECTIVE (1U << 0) |
| 298 | 318 | ||
| @@ -396,6 +416,13 @@ union bpf_attr { · 97 unmodified lines | |||
| 396 | __aligned_u64 data_out; | 416 | __aligned_u64 data_out; |
| 397 | __u32 repeat; | 417 | __u32 repeat; |
| 398 | __u32 duration; | 418 | __u32 duration; |
| 419 | __u32 ctx_size_in; /* input: len of ctx_in */ | ||
| 420 | __u32 ctx_size_out; /* input/output: len of ctx_out | ||
| 421 | * returns ENOSPC if ctx_out | ||
| 422 | * is too small. | ||
| 423 | */ | ||
| 424 | __aligned_u64 ctx_in; | ||
| 425 | __aligned_u64 ctx_out; | ||
| 399 | } test; | 426 | } test; |
| 400 | 427 | ||
| 401 | struct { /* anonymous struct used by BPF_*_GET_*_ID */ | 428 | struct { /* anonymous struct used by BPF_*_GET_*_ID */ |
| @@ -602,7 +629,7 @@ union bpf_attr { · 200 unmodified lines | |||
| 602 | * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ | 629 | * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ |
| 603 | * **->swhash** and *skb*\ **->l4hash** to 0). | 630 | * **->swhash** and *skb*\ **->l4hash** to 0). |
| 604 | * | 631 | * |
| 605 | * A call to this helper is susceptible to change the underlaying | 632 | * A call to this helper is susceptible to change the underlying |
| 606 | * packet buffer. Therefore, at load time, all checks on pointers | 633 | * packet buffer. Therefore, at load time, all checks on pointers |
| 607 | * previously done by the verifier are invalidated and must be | 634 | * previously done by the verifier are invalidated and must be |
| 608 | * performed again, if the helper is used in combination with | 635 | * performed again, if the helper is used in combination with |
| @@ -627,7 +654,7 @@ union bpf_attr { · 18 unmodified lines | |||
| 627 | * flexibility and can handle sizes larger than 2 or 4 for the | 654 | * flexibility and can handle sizes larger than 2 or 4 for the |
| 628 | * checksum to update. | 655 | * checksum to update. |
| 629 | * | 656 | * |
| 630 | * A call to this helper is susceptible to change the underlaying | 657 | * A call to this helper is susceptible to change the underlying |
| 631 | * packet buffer. Therefore, at load time, all checks on pointers | 658 | * packet buffer. Therefore, at load time, all checks on pointers |
| 632 | * previously done by the verifier are invalidated and must be | 659 | * previously done by the verifier are invalidated and must be |
| 633 | * performed again, if the helper is used in combination with | 660 | * performed again, if the helper is used in combination with |
| @@ -659,7 +686,7 @@ union bpf_attr { · 25 unmodified lines | |||
| 659 | * flexibility and can handle sizes larger than 2 or 4 for the | 686 | * flexibility and can handle sizes larger than 2 or 4 for the |
| 660 | * checksum to update. | 687 | * checksum to update. |
| 661 | * | 688 | * |
| 662 | * A call to this helper is susceptible to change the underlaying | 689 | * A call to this helper is susceptible to change the underlying |
| 663 | * packet buffer. Therefore, at load time, all checks on pointers | 690 | * packet buffer. Therefore, at load time, all checks on pointers |
| 664 | * previously done by the verifier are invalidated and must be | 691 | * previously done by the verifier are invalidated and must be |
| 665 | * performed again, if the helper is used in combination with | 692 | * performed again, if the helper is used in combination with |
| @@ -714,7 +741,7 @@ union bpf_attr { · 48 unmodified lines | |||
| 714 | * efficient, but it is handled through an action code where the | 741 | * efficient, but it is handled through an action code where the |
| 715 | * redirection happens only after the eBPF program has returned. | 742 | * redirection happens only after the eBPF program has returned. |
| 716 | * | 743 | * |
| 717 | * A call to this helper is susceptible to change the underlaying | 744 | * A call to this helper is susceptible to change the underlying |
| 718 | * packet buffer. Therefore, at load time, all checks on pointers | 745 | * packet buffer. Therefore, at load time, all checks on pointers |
| 719 | * previously done by the verifier are invalidated and must be | 746 | * previously done by the verifier are invalidated and must be |
| 720 | * performed again, if the helper is used in combination with | 747 | * performed again, if the helper is used in combination with |
| @@ -779,7 +806,7 @@ union bpf_attr { · 58 unmodified lines | |||
| 779 | * **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to | 806 | * **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to |
| 780 | * be **ETH_P_8021Q**. | 807 | * be **ETH_P_8021Q**. |
| 781 | * | 808 | * |
| 782 | * A call to this helper is susceptible to change the underlaying | 809 | * A call to this helper is susceptible to change the underlying |
| 783 | * packet buffer. Therefore, at load time, all checks on pointers | 810 | * packet buffer. Therefore, at load time, all checks on pointers |
| 784 | * previously done by the verifier are invalidated and must be | 811 | * previously done by the verifier are invalidated and must be |
| 785 | * performed again, if the helper is used in combination with | 812 | * performed again, if the helper is used in combination with |
| @@ -791,7 +818,7 @@ union bpf_attr { · 5 unmodified lines | |||
| 791 | * Description | 818 | * Description |
| 792 | * Pop a VLAN header from the packet associated to *skb*. | 819 | * Pop a VLAN header from the packet associated to *skb*. |
| 793 | * | 820 | * |
| 794 | * A call to this helper is susceptible to change the underlaying | 821 | * A call to this helper is susceptible to change the underlying |
| 795 | * packet buffer. Therefore, at load time, all checks on pointers | 822 | * packet buffer. Therefore, at load time, all checks on pointers |
| 796 | * previously done by the verifier are invalidated and must be | 823 | * previously done by the verifier are invalidated and must be |
| 797 | * performed again, if the helper is used in combination with | 824 | * performed again, if the helper is used in combination with |
| @@ -1141,7 +1168,7 @@ union bpf_attr { · 343 unmodified lines | |||
| 1141 | * All values for *flags* are reserved for future usage, and must | 1168 | * All values for *flags* are reserved for future usage, and must |
| 1142 | * be left at zero. | 1169 | * be left at zero. |
| 1143 | * | 1170 | * |
| 1144 | * A call to this helper is susceptible to change the underlaying | 1171 | * A call to this helper is susceptible to change the underlying |
| 1145 | * packet buffer. Therefore, at load time, all checks on pointers | 1172 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1146 | * previously done by the verifier are invalidated and must be | 1173 | * previously done by the verifier are invalidated and must be |
| 1147 | * performed again, if the helper is used in combination with | 1174 | * performed again, if the helper is used in combination with |
| @@ -1254,7 +1281,7 @@ union bpf_attr { · 106 unmodified lines | |||
| 1254 | * implicitly linearizes, unclones and drops offloads from the | 1281 | * implicitly linearizes, unclones and drops offloads from the |
| 1255 | * *skb*. | 1282 | * *skb*. |
| 1256 | * | 1283 | * |
| 1257 | * A call to this helper is susceptible to change the underlaying | 1284 | * A call to this helper is susceptible to change the underlying |
| 1258 | * packet buffer. Therefore, at load time, all checks on pointers | 1285 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1259 | * previously done by the verifier are invalidated and must be | 1286 | * previously done by the verifier are invalidated and must be |
| 1260 | * performed again, if the helper is used in combination with | 1287 | * performed again, if the helper is used in combination with |
| @@ -1290,7 +1317,7 @@ union bpf_attr { · 29 unmodified lines | |||
| 1290 | * **bpf_skb_pull_data()** to effectively unclone the *skb* from | 1317 | * **bpf_skb_pull_data()** to effectively unclone the *skb* from |
| 1291 | * the very beginning in case it is indeed cloned. | 1318 | * the very beginning in case it is indeed cloned. |
| 1292 | * | 1319 | * |
| 1293 | * A call to this helper is susceptible to change the underlaying | 1320 | * A call to this helper is susceptible to change the underlying |
| 1294 | * packet buffer. Therefore, at load time, all checks on pointers | 1321 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1295 | * previously done by the verifier are invalidated and must be | 1322 | * previously done by the verifier are invalidated and must be |
| 1296 | * performed again, if the helper is used in combination with | 1323 | * performed again, if the helper is used in combination with |
| @@ -1342,7 +1369,7 @@ union bpf_attr { · 45 unmodified lines | |||
| 1342 | * All values for *flags* are reserved for future usage, and must | 1369 | * All values for *flags* are reserved for future usage, and must |
| 1343 | * be left at zero. | 1370 | * be left at zero. |
| 1344 | * | 1371 | * |
| 1345 | * A call to this helper is susceptible to change the underlaying | 1372 | * A call to this helper is susceptible to change the underlying |
| 1346 | * packet buffer. Therefore, at load time, all checks on pointers | 1373 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1347 | * previously done by the verifier are invalidated and must be | 1374 | * previously done by the verifier are invalidated and must be |
| 1348 | * performed again, if the helper is used in combination with | 1375 | * performed again, if the helper is used in combination with |
| @@ -1357,7 +1384,7 @@ union bpf_attr { · 8 unmodified lines | |||
| 1357 | * can be used to prepare the packet for pushing or popping | 1384 | * can be used to prepare the packet for pushing or popping |
| 1358 | * headers. | 1385 | * headers. |
| 1359 | * | 1386 | * |
| 1360 | * A call to this helper is susceptible to change the underlaying | 1387 | * A call to this helper is susceptible to change the underlying |
| 1361 | * packet buffer. Therefore, at load time, all checks on pointers | 1388 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1362 | * previously done by the verifier are invalidated and must be | 1389 | * previously done by the verifier are invalidated and must be |
| 1363 | * performed again, if the helper is used in combination with | 1390 | * performed again, if the helper is used in combination with |
| @@ -1478,15 +1505,33 @@ union bpf_attr { · 114 unmodified lines | |||
| 1478 | * Grow or shrink the room for data in the packet associated to | 1505 | * Grow or shrink the room for data in the packet associated to |
| 1479 | * *skb* by *len_diff*, and according to the selected *mode*. | 1506 | * *skb* by *len_diff*, and according to the selected *mode*. |
| 1480 | * | 1507 | * |
| 1481 | * There is a single supported mode at this time: | 1508 | * There are two supported modes at this time: |
| 1509 | * | ||
| 1510 | * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer | ||
| 1511 | * (room space is added or removed below the layer 2 header). | ||
| 1482 | * | 1512 | * |
| 1483 | * * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer | 1513 | * * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer |
| 1484 | * (room space is added or removed below the layer 3 header). | 1514 | * (room space is added or removed below the layer 3 header). |
| 1485 | * | 1515 | * |
| 1486 | * All values for *flags* are reserved for future usage, and must | 1516 | * The following flags are supported at this time: |
| 1487 | * be left at zero. | 1517 | * |
| 1518 | * * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size. | ||
| 1519 | * Adjusting mss in this way is not allowed for datagrams. | ||
| 1520 | * | ||
| 1521 | * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4**, | ||
| 1522 | * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6**: | ||
| 1523 | * Any new space is reserved to hold a tunnel header. | ||
| 1524 | * Configure skb offsets and other fields accordingly. | ||
| 1525 | * | ||
| 1526 | * * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE**, | ||
| 1527 | * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP**: | ||
| 1528 | * Use with ENCAP_L3 flags to further specify the tunnel type. | ||
| 1529 | * | ||
| 1530 | * * **BPF_F_ADJ_ROOM_ENCAP_L2**\ (*len*): | ||
| 1531 | * Use with ENCAP_L3/L4 flags to further specify the tunnel | ||
| 1532 | * type; *len* is the length of the inner MAC header. | ||
| 1488 | * | 1533 | * |
| 1489 | * A call to this helper is susceptible to change the underlaying | 1534 | * A call to this helper is susceptible to change the underlying |
| 1490 | * packet buffer. Therefore, at load time, all checks on pointers | 1535 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1491 | * previously done by the verifier are invalidated and must be | 1536 | * previously done by the verifier are invalidated and must be |
| 1492 | * performed again, if the helper is used in combination with | 1537 | * performed again, if the helper is used in combination with |
| @@ -1565,7 +1610,7 @@ union bpf_attr { · 72 unmodified lines | |||
| 1565 | * more flexibility as the user is free to store whatever meta | 1610 | * more flexibility as the user is free to store whatever meta |
| 1566 | * data they need. | 1611 | * data they need. |
| 1567 | * | 1612 | * |
| 1568 | * A call to this helper is susceptible to change the underlaying | 1613 | * A call to this helper is susceptible to change the underlying |
| 1569 | * packet buffer. Therefore, at load time, all checks on pointers | 1614 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1570 | * previously done by the verifier are invalidated and must be | 1615 | * previously done by the verifier are invalidated and must be |
| 1571 | * performed again, if the helper is used in combination with | 1616 | * performed again, if the helper is used in combination with |
| @@ -1694,12 +1739,19 @@ union bpf_attr { · 122 unmodified lines | |||
| 1694 | * error if an eBPF program tries to set a callback that is not | 1739 | * error if an eBPF program tries to set a callback that is not |
| 1695 | * supported in the current kernel. | 1740 | * supported in the current kernel. |
| 1696 | * | 1741 | * |
| 1697 | * The supported callback values that *argval* can combine are: | 1742 | * *argval* is a flag array which can combine these flags: |
| 1698 | * | 1743 | * |
| 1699 | * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out) | 1744 | * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out) |
| 1700 | * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission) | 1745 | * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission) |
| 1701 | * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change) | 1746 | * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change) |
| 1702 | * | 1747 | * |
| 1748 | * Therefore, this function can be used to clear a callback flag by | ||
| 1749 | * setting the appropriate bit to zero. e.g. to disable the RTO | ||
| 1750 | * callback: | ||
| 1751 | * | ||
| 1752 | * **bpf_sock_ops_cb_flags_set(bpf_sock,** | ||
| 1753 | * **bpf_sock->bpf_sock_ops_cb_flags & ~BPF_SOCK_OPS_RTO_CB_FLAG)** | ||
| 1754 | * | ||
| 1703 | * Here are some examples of where one could call such eBPF | 1755 | * Here are some examples of where one could call such eBPF |
| 1704 | * program: | 1756 | * program: |
| 1705 | * | 1757 | * |
| @@ -1800,7 +1852,7 @@ union bpf_attr { · 94 unmodified lines | |||
| 1800 | * copied if necessary (i.e. if data was not linear and if start | 1852 | * copied if necessary (i.e. if data was not linear and if start |
| 1801 | * and end pointers do not point to the same chunk). | 1853 | * and end pointers do not point to the same chunk). |
| 1802 | * | 1854 | * |
| 1803 | * A call to this helper is susceptible to change the underlaying | 1855 | * A call to this helper is susceptible to change the underlying |
| 1804 | * packet buffer. Therefore, at load time, all checks on pointers | 1856 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1805 | * previously done by the verifier are invalidated and must be | 1857 | * previously done by the verifier are invalidated and must be |
| 1806 | * performed again, if the helper is used in combination with | 1858 | * performed again, if the helper is used in combination with |
| @@ -1834,7 +1886,7 @@ union bpf_attr { · 27 unmodified lines | |||
| 1834 | * only possible to shrink the packet as of this writing, | 1886 | * only possible to shrink the packet as of this writing, |
| 1835 | * therefore *delta* must be a negative integer. | 1887 | * therefore *delta* must be a negative integer. |
| 1836 | * | 1888 | * |
| 1837 | * A call to this helper is susceptible to change the underlaying | 1889 | * A call to this helper is susceptible to change the underlying |
| 1838 | * packet buffer. Therefore, at load time, all checks on pointers | 1890 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1839 | * previously done by the verifier are invalidated and must be | 1891 | * previously done by the verifier are invalidated and must be |
| 1840 | * performed again, if the helper is used in combination with | 1892 | * performed again, if the helper is used in combination with |
| @@ -2009,18 +2061,18 @@ union bpf_attr { · 168 unmodified lines | |||
| 2009 | * **BPF_LWT_ENCAP_IP** | 2061 | * **BPF_LWT_ENCAP_IP** |
| 2010 | * IP encapsulation (GRE/GUE/IPIP/etc). The outer header | 2062 | * IP encapsulation (GRE/GUE/IPIP/etc). The outer header |
| 2011 | * must be IPv4 or IPv6, followed by zero or more | 2063 | * must be IPv4 or IPv6, followed by zero or more |
| 2012 | * additional headers, up to LWT_BPF_MAX_HEADROOM total | 2064 | * additional headers, up to **LWT_BPF_MAX_HEADROOM** |
| 2013 | * bytes in all prepended headers. Please note that | 2065 | * total bytes in all prepended headers. Please note that |
| 2014 | * if skb_is_gso(skb) is true, no more than two headers | 2066 | * if **skb_is_gso**\ (*skb*) is true, no more than two |
| 2015 | * can be prepended, and the inner header, if present, | 2067 | * headers can be prepended, and the inner header, if |
| 2016 | * should be either GRE or UDP/GUE. | 2068 | * present, should be either GRE or UDP/GUE. |
| 2017 | * | 2069 | * |
| 2018 | * BPF_LWT_ENCAP_SEG6*** types can be called by bpf programs of | 2070 | * **BPF_LWT_ENCAP_SEG6**\ \* types can be called by BPF programs |
| 2019 | * type BPF_PROG_TYPE_LWT_IN; BPF_LWT_ENCAP_IP type can be called | 2071 | * of type **BPF_PROG_TYPE_LWT_IN**; **BPF_LWT_ENCAP_IP** type can |
| 2020 | * by bpf programs of types BPF_PROG_TYPE_LWT_IN and | 2072 | * be called by bpf programs of types **BPF_PROG_TYPE_LWT_IN** and |
| 2021 | * BPF_PROG_TYPE_LWT_XMIT. | 2073 | * **BPF_PROG_TYPE_LWT_XMIT**. |
| 2022 | * | 2074 | * |
| 2023 | * A call to this helper is susceptible to change the underlaying | 2075 | * A call to this helper is susceptible to change the underlying |
| 2024 | * packet buffer. Therefore, at load time, all checks on pointers | 2076 | * packet buffer. Therefore, at load time, all checks on pointers |
| 2025 | * previously done by the verifier are invalidated and must be | 2077 | * previously done by the verifier are invalidated and must be |
| 2026 | * performed again, if the helper is used in combination with | 2078 | * performed again, if the helper is used in combination with |
| @@ -2035,7 +2087,7 @@ union bpf_attr { · 8 unmodified lines | |||
| 2035 | * inside the outermost IPv6 Segment Routing Header can be | 2087 | * inside the outermost IPv6 Segment Routing Header can be |
| 2036 | * modified through this helper. | 2088 | * modified through this helper. |
| 2037 | * | 2089 | * |
| 2038 | * A call to this helper is susceptible to change the underlaying | 2090 | * A call to this helper is susceptible to change the underlying |
| 2039 | * packet buffer. Therefore, at load time, all checks on pointers | 2091 | * packet buffer. Therefore, at load time, all checks on pointers |
| 2040 | * previously done by the verifier are invalidated and must be | 2092 | * previously done by the verifier are invalidated and must be |
| 2041 | * performed again, if the helper is used in combination with | 2093 | * performed again, if the helper is used in combination with |
| @@ -2051,7 +2103,7 @@ union bpf_attr { · 9 unmodified lines | |||
| 2051 | * after the segments are accepted. *delta* can be as well | 2103 | * after the segments are accepted. *delta* can be as well |
| 2052 | * positive (growing) as negative (shrinking). | 2104 | * positive (growing) as negative (shrinking). |
| 2053 | * | 2105 | * |
| 2054 | * A call to this helper is susceptible to change the underlaying | 2106 | * A call to this helper is susceptible to change the underlying |
| 2055 | * packet buffer. Therefore, at load time, all checks on pointers | 2107 | * packet buffer. Therefore, at load time, all checks on pointers |
| 2056 | * previously done by the verifier are invalidated and must be | 2108 | * previously done by the verifier are invalidated and must be |
| 2057 | * performed again, if the helper is used in combination with | 2109 | * performed again, if the helper is used in combination with |
| @@ -2074,13 +2126,13 @@ union bpf_attr { · 16 unmodified lines | |||
| 2074 | * Type of *param*: **int**. | 2126 | * Type of *param*: **int**. |
| 2075 | * **SEG6_LOCAL_ACTION_END_B6** | 2127 | * **SEG6_LOCAL_ACTION_END_B6** |
| 2076 | * End.B6 action: Endpoint bound to an SRv6 policy. | 2128 | * End.B6 action: Endpoint bound to an SRv6 policy. |
| 2077 | * Type of param: **struct ipv6_sr_hdr**. | 2129 | * Type of *param*: **struct ipv6_sr_hdr**. |
| 2078 | * **SEG6_LOCAL_ACTION_END_B6_ENCAP** | 2130 | * **SEG6_LOCAL_ACTION_END_B6_ENCAP** |
| 2079 | * End.B6.Encap action: Endpoint bound to an SRv6 | 2131 | * End.B6.Encap action: Endpoint bound to an SRv6 |
| 2080 | * encapsulation policy. | 2132 | * encapsulation policy. |
| 2081 | * Type of param: **struct ipv6_sr_hdr**. | 2133 | * Type of *param*: **struct ipv6_sr_hdr**. |
| 2082 | * | 2134 | * |
| 2083 | * A call to this helper is susceptible to change the underlaying | 2135 | * A call to this helper is susceptible to change the underlying |
| 2084 | * packet buffer. Therefore, at load time, all checks on pointers | 2136 | * packet buffer. Therefore, at load time, all checks on pointers |
| 2085 | * previously done by the verifier are invalidated and must be | 2137 | * previously done by the verifier are invalidated and must be |
| 2086 | * performed again, if the helper is used in combination with | 2138 | * performed again, if the helper is used in combination with |
| @@ -2233,7 +2285,8 @@ union bpf_attr { · 146 unmodified lines | |||
| 2233 | * Return | 2285 | * Return |
| 2234 | * Pointer to **struct bpf_sock**, or **NULL** in case of failure. | 2286 | * Pointer to **struct bpf_sock**, or **NULL** in case of failure. |
| 2235 | * For sockets with reuseport option, the **struct bpf_sock** | 2287 | * For sockets with reuseport option, the **struct bpf_sock** |
| 2236 | * result is from **reuse->socks**\ [] using the hash of the tuple. | 2288 | * result is from *reuse*\ **->socks**\ [] using the hash of the |
| 2289 | * tuple. | ||
| 2237 | * | 2290 | * |
| 2238 | * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags) | 2291 | * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags) |
| 2239 | * Description | 2292 | * Description |
| @@ -2269,7 +2322,8 @@ union bpf_attr { · 29 unmodified lines | |||
| 2269 | * Return | 2322 | * Return |
| 2270 | * Pointer to **struct bpf_sock**, or **NULL** in case of failure. | 2323 | * Pointer to **struct bpf_sock**, or **NULL** in case of failure. |
| 2271 | * For sockets with reuseport option, the **struct bpf_sock** | 2324 | * For sockets with reuseport option, the **struct bpf_sock** |
| 2272 | * result is from **reuse->socks**\ [] using the hash of the tuple. | 2325 | * result is from *reuse*\ **->socks**\ [] using the hash of the |
| 2326 | * tuple. | ||
| 2273 | * | 2327 | * |
| 2274 | * int bpf_sk_release(struct bpf_sock *sock) | 2328 | * int bpf_sk_release(struct bpf_sock *sock) |
| 2275 | * Description | 2329 | * Description |
| @@ -2431,6 +2485,193 @@ union bpf_attr { · 155 unmodified lines | |||
| 2431 | * Return | 2485 | * Return |
| 2432 | * A **struct bpf_sock** pointer on success, or **NULL** in | 2486 | * A **struct bpf_sock** pointer on success, or **NULL** in |
| 2433 | * case of failure. | 2487 | * case of failure. |
| 2488 | * | ||
| 2489 | * struct bpf_sock *bpf_skc_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags) | ||
| 2490 | * Description | ||
| 2491 | * Look for TCP socket matching *tuple*, optionally in a child | ||
| 2492 | * network namespace *netns*. The return value must be checked, | ||
| 2493 | * and if non-**NULL**, released via **bpf_sk_release**\ (). | ||
| 2494 | * | ||
| 2495 | * This function is identical to **bpf_sk_lookup_tcp**\ (), except | ||
| 2496 | * that it also returns timewait or request sockets. Use | ||
| 2497 | * **bpf_sk_fullsock**\ () or **bpf_tcp_sock**\ () to access the | ||
| 2498 | * full structure. | ||
| 2499 | * | ||
| 2500 | * This helper is available only if the kernel was compiled with | ||
| 2501 | * **CONFIG_NET** configuration option. | ||
| 2502 | * Return | ||
| 2503 | * Pointer to **struct bpf_sock**, or **NULL** in case of failure. | ||
| 2504 | * For sockets with reuseport option, the **struct bpf_sock** | ||
| 2505 | * result is from *reuse*\ **->socks**\ [] using the hash of the | ||
| 2506 | * tuple. | ||
| 2507 | * | ||
| 2508 | * int bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len) | ||
| 2509 | * Description | ||
| 2510 | * Check whether *iph* and *th* contain a valid SYN cookie ACK for | ||
| 2511 | * the listening socket in *sk*. | ||
| 2512 | * | ||
| 2513 | * *iph* points to the start of the IPv4 or IPv6 header, while | ||
| 2514 | * *iph_len* contains **sizeof**\ (**struct iphdr**) or | ||
| 2515 | * **sizeof**\ (**struct ip6hdr**). | ||
| 2516 | * | ||
| 2517 | * *th* points to the start of the TCP header, while *th_len* | ||
| 2518 | * contains **sizeof**\ (**struct tcphdr**). | ||
| 2519 | * | ||
| 2520 | * Return | ||
| 2521 | * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative | ||
| 2522 | * error otherwise. | ||
| 2523 | * | ||
| 2524 | * int bpf_sysctl_get_name(struct bpf_sysctl *ctx, char *buf, size_t buf_len, u64 flags) | ||
| 2525 | * Description | ||
| 2526 | * Get name of sysctl in /proc/sys/ and copy it into provided by | ||
| 2527 | * program buffer *buf* of size *buf_len*. | ||
| 2528 | * | ||
| 2529 | * The buffer is always NUL terminated, unless it's zero-sized. | ||
| 2530 | * | ||
| 2531 | * If *flags* is zero, full name (e.g. "net/ipv4/tcp_mem") is | ||
| 2532 | * copied. Use **BPF_F_SYSCTL_BASE_NAME** flag to copy base name | ||
| 2533 | * only (e.g. "tcp_mem"). | ||
| 2534 | * Return | ||
| 2535 | * Number of character copied (not including the trailing NUL). | ||
| 2536 | * | ||
| 2537 | * **-E2BIG** if the buffer wasn't big enough (*buf* will contain | ||
| 2538 | * truncated name in this case). | ||
| 2539 | * | ||
| 2540 | * int bpf_sysctl_get_current_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len) | ||
| 2541 | * Description | ||
| 2542 | * Get current value of sysctl as it is presented in /proc/sys | ||
| 2543 | * (incl. newline, etc), and copy it as a string into provided | ||
| 2544 | * by program buffer *buf* of size *buf_len*. | ||
| 2545 | * | ||
| 2546 | * The whole value is copied, no matter what file position user | ||
| 2547 | * space issued e.g. sys_read at. | ||
| 2548 | * | ||
| 2549 | * The buffer is always NUL terminated, unless it's zero-sized. | ||
| 2550 | * Return | ||
| 2551 | * Number of character copied (not including the trailing NUL). | ||
| 2552 | * | ||
| 2553 | * **-E2BIG** if the buffer wasn't big enough (*buf* will contain | ||
| 2554 | * truncated name in this case). | ||
| 2555 | * | ||
| 2556 | * **-EINVAL** if current value was unavailable, e.g. because | ||
| 2557 | * sysctl is uninitialized and read returns -EIO for it. | ||
| 2558 | * | ||
| 2559 | * int bpf_sysctl_get_new_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len) | ||
| 2560 | * Description | ||
| 2561 | * Get new value being written by user space to sysctl (before | ||
| 2562 | * the actual write happens) and copy it as a string into | ||
| 2563 | * provided by program buffer *buf* of size *buf_len*. | ||
| 2564 | * | ||
| 2565 | * User space may write new value at file position > 0. | ||
| 2566 | * | ||
| 2567 | * The buffer is always NUL terminated, unless it's zero-sized. | ||
| 2568 | * Return | ||
| 2569 | * Number of character copied (not including the trailing NUL). | ||
| 2570 | * | ||
| 2571 | * **-E2BIG** if the buffer wasn't big enough (*buf* will contain | ||
| 2572 | * truncated name in this case). | ||
| 2573 | * | ||
| 2574 | * **-EINVAL** if sysctl is being read. | ||
| 2575 | * | ||
| 2576 | * int bpf_sysctl_set_new_value(struct bpf_sysctl *ctx, const char *buf, size_t buf_len) | ||
| 2577 | * Description | ||
| 2578 | * Override new value being written by user space to sysctl with | ||
| 2579 | * value provided by program in buffer *buf* of size *buf_len*. | ||
| 2580 | * | ||
| 2581 | * *buf* should contain a string in same form as provided by user | ||
| 2582 | * space on sysctl write. | ||
| 2583 | * | ||
| 2584 | * User space may write new value at file position > 0. To override | ||
| 2585 | * the whole sysctl value file position should be set to zero. | ||
| 2586 | * Return | ||
| 2587 | * 0 on success. | ||
| 2588 | * | ||
| 2589 | * **-E2BIG** if the *buf_len* is too big. | ||
| 2590 | * | ||
| 2591 | * **-EINVAL** if sysctl is being read. | ||
| 2592 | * | ||
| 2593 | * int bpf_strtol(const char *buf, size_t buf_len, u64 flags, long *res) | ||
| 2594 | * Description | ||
| 2595 | * Convert the initial part of the string from buffer *buf* of | ||
| 2596 | * size *buf_len* to a long integer according to the given base | ||
| 2597 | * and save the result in *res*. | ||
| 2598 | * | ||
| 2599 | * The string may begin with an arbitrary amount of white space | ||
| 2600 | * (as determined by **isspace**\ (3)) followed by a single | ||
| 2601 | * optional '**-**' sign. | ||
| 2602 | * | ||
| 2603 | * Five least significant bits of *flags* encode base, other bits | ||
| 2604 | * are currently unused. | ||
| 2605 | * | ||
| 2606 | * Base must be either 8, 10, 16 or 0 to detect it automatically | ||
| 2607 | * similar to user space **strtol**\ (3). | ||
| 2608 | * Return | ||
| 2609 | * Number of characters consumed on success. Must be positive but | ||
| 2610 | * no more than *buf_len*. | ||
| 2611 | * | ||
| 2612 | * **-EINVAL** if no valid digits were found or unsupported base | ||
| 2613 | * was provided. | ||
| 2614 | * | ||
| 2615 | * **-ERANGE** if resulting value was out of range. | ||
| 2616 | * | ||
| 2617 | * int bpf_strtoul(const char *buf, size_t buf_len, u64 flags, unsigned long *res) | ||
| 2618 | * Description | ||
| 2619 | * Convert the initial part of the string from buffer *buf* of | ||
| 2620 | * size *buf_len* to an unsigned long integer according to the | ||
| 2621 | * given base and save the result in *res*. | ||
| 2622 | * | ||
| 2623 | * The string may begin with an arbitrary amount of white space | ||
| 2624 | * (as determined by **isspace**\ (3)). | ||
| 2625 | * | ||
| 2626 | * Five least significant bits of *flags* encode base, other bits | ||
| 2627 | * are currently unused. | ||
| 2628 | * | ||
| 2629 | * Base must be either 8, 10, 16 or 0 to detect it automatically | ||
| 2630 | * similar to user space **strtoul**\ (3). | ||
| 2631 | * Return | ||
| 2632 | * Number of characters consumed on success. Must be positive but | ||
| 2633 | * no more than *buf_len*. | ||
| 2634 | * | ||
| 2635 | * **-EINVAL** if no valid digits were found or unsupported base | ||
| 2636 | * was provided. | ||
| 2637 | * | ||
| 2638 | * **-ERANGE** if resulting value was out of range. | ||
| 2639 | * | ||
| 2640 | * void *bpf_sk_storage_get(struct bpf_map *map, struct bpf_sock *sk, void *value, u64 flags) | ||
| 2641 | * Description | ||
| 2642 | * Get a bpf-local-storage from a *sk*. | ||
| 2643 | * | ||
| 2644 | * Logically, it could be thought of getting the value from | ||
| 2645 | * a *map* with *sk* as the **key**. From this | ||
| 2646 | * perspective, the usage is not much different from | ||
| 2647 | * **bpf_map_lookup_elem**\ (*map*, **&**\ *sk*) except this | ||
| 2648 | * helper enforces the key must be a full socket and the map must | ||
| 2649 | * be a **BPF_MAP_TYPE_SK_STORAGE** also. | ||
| 2650 | * | ||
| 2651 | * Underneath, the value is stored locally at *sk* instead of | ||
| 2652 | * the *map*. The *map* is used as the bpf-local-storage | ||
| 2653 | * "type". The bpf-local-storage "type" (i.e. the *map*) is | ||
| 2654 | * searched against all bpf-local-storages residing at *sk*. | ||
| 2655 | * | ||
| 2656 | * An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be | ||
| 2657 | * used such that a new bpf-local-storage will be | ||
| 2658 | * created if one does not exist. *value* can be used | ||
| 2659 | * together with **BPF_SK_STORAGE_GET_F_CREATE** to specify | ||
| 2660 | * the initial value of a bpf-local-storage. If *value* is | ||
| 2661 | * **NULL**, the new bpf-local-storage will be zero initialized. | ||
| 2662 | * Return | ||
| 2663 | * A bpf-local-storage pointer is returned on success. | ||
| 2664 | * | ||
| 2665 | * **NULL** if not found or there was an error in adding | ||
| 2666 | * a new bpf-local-storage. | ||
| 2667 | * | ||
| 2668 | * int bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk) | ||
| 2669 | * Description | ||
| 2670 | * Delete a bpf-local-storage from a *sk*. | ||
| 2671 | * Return | ||
| 2672 | * 0 on success. | ||
| 2673 | * | ||
| 2674 | * **-ENOENT** if the bpf-local-storage cannot be found. | ||
| 2434 | */ | 2675 | */ |
| 2435 | #define __BPF_FUNC_MAPPER(FN) \ | 2676 | #define __BPF_FUNC_MAPPER(FN) \ |
| 2436 | FN(unspec), \ | 2677 | FN(unspec), \ |
| @@ -2531,7 +2772,17 @@ union bpf_attr { · 94 unmodified lines | |||
| 2531 | FN(sk_fullsock), \ | 2772 | FN(sk_fullsock), \ |
| 2532 | FN(tcp_sock), \ | 2773 | FN(tcp_sock), \ |
| 2533 | FN(skb_ecn_set_ce), \ | 2774 | FN(skb_ecn_set_ce), \ |
| 2534 | FN(get_listener_sock), | 2775 | FN(get_listener_sock), \ |
| 2776 | FN(skc_lookup_tcp), \ | ||
| 2777 | FN(tcp_check_syncookie), \ | ||
| 2778 | FN(sysctl_get_name), \ | ||
| 2779 | FN(sysctl_get_current_value), \ | ||
| 2780 | FN(sysctl_get_new_value), \ | ||
| 2781 | FN(sysctl_set_new_value), \ | ||
| 2782 | FN(strtol), \ | ||
| 2783 | FN(strtoul), \ | ||
| 2784 | FN(sk_storage_get), \ | ||
| 2785 | FN(sk_storage_delete), | ||
| 2535 | 2786 | ||
| 2536 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 2787 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 2537 | * function eBPF program intends to call | 2788 | * function eBPF program intends to call |
| @@ -2590,9 +2841,30 @@ enum bpf_func_id { · 52 unmodified lines | |||
| 2590 | /* Current network namespace */ | 2841 | /* Current network namespace */ |
| 2591 | #define BPF_F_CURRENT_NETNS (-1L) | 2842 | #define BPF_F_CURRENT_NETNS (-1L) |
| 2592 | 2843 | ||
| 2844 | /* BPF_FUNC_skb_adjust_room flags. */ | ||
| 2845 | #define BPF_F_ADJ_ROOM_FIXED_GSO (1ULL << 0) | ||
| 2846 | |||
| 2847 | #define BPF_ADJ_ROOM_ENCAP_L2_MASK 0xff | ||
| 2848 | #define BPF_ADJ_ROOM_ENCAP_L2_SHIFT 56 | ||
| 2849 | |||
| 2850 | #define BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 (1ULL << 1) | ||
| 2851 | #define BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 (1ULL << 2) | ||
| 2852 | #define BPF_F_ADJ_ROOM_ENCAP_L4_GRE (1ULL << 3) | ||
| 2853 | #define BPF_F_ADJ_ROOM_ENCAP_L4_UDP (1ULL << 4) | ||
| 2854 | #define BPF_F_ADJ_ROOM_ENCAP_L2(len) (((__u64)len & \ | ||
| 2855 | BPF_ADJ_ROOM_ENCAP_L2_MASK) \ | ||
| 2856 | << BPF_ADJ_ROOM_ENCAP_L2_SHIFT) | ||
| 2857 | |||
| 2858 | /* BPF_FUNC_sysctl_get_name flags. */ | ||
| 2859 | #define BPF_F_SYSCTL_BASE_NAME (1ULL << 0) | ||
| 2860 | |||
| 2861 | /* BPF_FUNC_sk_storage_get flags */ | ||
| 2862 | #define BPF_SK_STORAGE_GET_F_CREATE (1ULL << 0) | ||
| 2863 | |||
| 2593 | /* Mode for BPF_FUNC_skb_adjust_room helper. */ | 2864 | /* Mode for BPF_FUNC_skb_adjust_room helper. */ |
| 2594 | enum bpf_adj_room_mode { | 2865 | enum bpf_adj_room_mode { |
| 2595 | BPF_ADJ_ROOM_NET, | 2866 | BPF_ADJ_ROOM_NET, |
| 2867 | BPF_ADJ_ROOM_MAC, | ||
| 2596 | }; | 2868 | }; |
| 2597 | 2869 | ||
| 2598 | /* Mode for BPF_FUNC_skb_load_bytes_relative helper. */ | 2870 | /* Mode for BPF_FUNC_skb_load_bytes_relative helper. */ |
| @@ -3218,4 +3490,14 @@ struct bpf_line_info { · 619 unmodified lines | |||
| 3218 | struct bpf_spin_lock { | 3490 | struct bpf_spin_lock { |
| 3219 | __u32 val; | 3491 | __u32 val; |
| 3220 | }; | 3492 | }; |
| 3493 | |||
| 3494 | struct bpf_sysctl { | ||
| 3495 | __u32 write; /* Sysctl is being read (= 0) or written (= 1). | ||
| 3496 | * Allows 1,2,4-byte read, but no write. | ||
| 3497 | */ | ||
| 3498 | __u32 file_pos; /* Sysctl file position to read from, write to. | ||
| 3499 | * Allows 1,2,4-byte read an 4-byte write. | ||
| 3500 | */ | ||
| 3501 | }; | ||
| 3502 | |||
| 3221 | #endif /* _UAPI__LINUX_BPF_H__ */ | 3503 | #endif /* _UAPI__LINUX_BPF_H__ */ |
| @@ -39,11 +39,11 @@ struct btf_type { · 38 unmodified lines | |||
| 39 | * struct, union and fwd | 39 | * struct, union and fwd |
| 40 | */ | 40 | */ |
| 41 | __u32 info; | 41 | __u32 info; |
| 42 | /* "size" is used by INT, ENUM, STRUCT and UNION. | 42 | /* "size" is used by INT, ENUM, STRUCT, UNION and DATASEC. |
| 43 | * "size" tells the size of the type it is describing. | 43 | * "size" tells the size of the type it is describing. |
| 44 | * | 44 | * |
| 45 | * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT, | 45 | * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT, |
| 46 | * FUNC and FUNC_PROTO. | 46 | * FUNC, FUNC_PROTO and VAR. |
| 47 | * "type" is a type_id referring to another type. | 47 | * "type" is a type_id referring to another type. |
| 48 | */ | 48 | */ |
| 49 | union { | 49 | union { |
| @@ -70,8 +70,10 @@ struct btf_type { · 20 unmodified lines | |||
| 70 | #define BTF_KIND_RESTRICT 11 /* Restrict */ | 70 | #define BTF_KIND_RESTRICT 11 /* Restrict */ |
| 71 | #define BTF_KIND_FUNC 12 /* Function */ | 71 | #define BTF_KIND_FUNC 12 /* Function */ |
| 72 | #define BTF_KIND_FUNC_PROTO 13 /* Function Proto */ | 72 | #define BTF_KIND_FUNC_PROTO 13 /* Function Proto */ |
| 73 | #define BTF_KIND_MAX 13 | 73 | #define BTF_KIND_VAR 14 /* Variable */ |
| 74 | #define NR_BTF_KINDS 14 | 74 | #define BTF_KIND_DATASEC 15 /* Section */ |
| 75 | #define BTF_KIND_MAX BTF_KIND_DATASEC | ||
| 76 | #define NR_BTF_KINDS (BTF_KIND_MAX + 1) | ||
| 75 | 77 | ||
| 76 | /* For some specific BTF_KIND, "struct btf_type" is immediately | 78 | /* For some specific BTF_KIND, "struct btf_type" is immediately |
| 77 | * followed by extra data. | 79 | * followed by extra data. |
| @@ -138,4 +140,26 @@ struct btf_param { · 60 unmodified lines | |||
| 138 | __u32 type; | 140 | __u32 type; |
| 139 | }; | 141 | }; |
| 140 | 142 | ||
| 143 | enum { | ||
| 144 | BTF_VAR_STATIC = 0, | ||
| 145 | BTF_VAR_GLOBAL_ALLOCATED, | ||
| 146 | }; | ||
| 147 | |||
| 148 | /* BTF_KIND_VAR is followed by a single "struct btf_var" to describe | ||
| 149 | * additional information related to the variable such as its linkage. | ||
| 150 | */ | ||
| 151 | struct btf_var { | ||
| 152 | __u32 linkage; | ||
| 153 | }; | ||
| 154 | |||
| 155 | /* BTF_KIND_DATASEC is followed by multiple "struct btf_var_secinfo" | ||
| 156 | * to describe all BTF_KIND_VAR types it contains along with it's | ||
| 157 | * in-section offset as well as size. | ||
| 158 | */ | ||
| 159 | struct btf_var_secinfo { | ||
| 160 | __u32 type; | ||
| 161 | __u32 offset; | ||
| 162 | __u32 size; | ||
| 163 | }; | ||
| 164 | |||
| 141 | #endif /* _UAPI__LINUX_BTF_H__ */ | 165 | #endif /* _UAPI__LINUX_BTF_H__ */ |
| @@ -307,6 +307,8 @@ · 306 unmodified lines | |||
| 307 | * | 307 | * |
| 308 | * Used by: | 308 | * Used by: |
| 309 | * struct btrfs_dir_item.type | 309 | * struct btrfs_dir_item.type |
| 310 | * | ||
| 311 | * Values 0..7 must match common file type values in fs_types.h. | ||
| 310 | */ | 312 | */ |
| 311 | #define BTRFS_FT_UNKNOWN 0 | 313 | #define BTRFS_FT_UNKNOWN 0 |
| 312 | #define BTRFS_FT_REG_FILE 1 | 314 | #define BTRFS_FT_REG_FILE 1 |
| @@ -34,14 +34,20 @@ · 33 unmodified lines | |||
| 34 | #define EM_M32R 88 /* Renesas M32R */ | 34 | #define EM_M32R 88 /* Renesas M32R */ |
| 35 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ | 35 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ |
| 36 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ | 36 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ |
| 37 | #define EM_ARCOMPACT 93 /* ARCompact processor */ | ||
| 37 | #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ | 38 | #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ |
| 38 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ | 39 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ |
| 40 | #define EM_UNICORE 110 /* UniCore-32 */ | ||
| 39 | #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ | 41 | #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ |
| 40 | #define EM_TI_C6000 140 /* TI C6X DSPs */ | 42 | #define EM_TI_C6000 140 /* TI C6X DSPs */ |
| 43 | #define EM_HEXAGON 164 /* QUALCOMM Hexagon */ | ||
| 44 | #define EM_NDS32 167 /* Andes Technology compact code size | ||
| 45 | embedded RISC processor family */ | ||
| 41 | #define EM_AARCH64 183 /* ARM 64 bit */ | 46 | #define EM_AARCH64 183 /* ARM 64 bit */ |
| 42 | #define EM_TILEPRO 188 /* Tilera TILEPro */ | 47 | #define EM_TILEPRO 188 /* Tilera TILEPro */ |
| 43 | #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ | 48 | #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ |
| 44 | #define EM_TILEGX 191 /* Tilera TILE-Gx */ | 49 | #define EM_TILEGX 191 /* Tilera TILE-Gx */ |
| 50 | #define EM_ARCV2 195 /* ARCv2 Cores */ | ||
| 45 | #define EM_RISCV 243 /* RISC-V */ | 51 | #define EM_RISCV 243 /* RISC-V */ |
| 46 | #define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */ | 52 | #define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */ |
| 47 | #define EM_CSKY 252 /* C-SKY */ | 53 | #define EM_CSKY 252 /* C-SKY */ |
| @@ -252,9 +252,17 @@ struct ethtool_tunable { · 251 unmodified lines | |||
| 252 | #define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff | 252 | #define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff |
| 253 | #define DOWNSHIFT_DEV_DISABLE 0 | 253 | #define DOWNSHIFT_DEV_DISABLE 0 |
| 254 | 254 | ||
| 255 | /* Time in msecs after which link is reported as down | ||
| 256 | * 0 = lowest time supported by the PHY | ||
| 257 | * 0xff = off, link down detection according to standard | ||
| 258 | */ | ||
| 259 | #define ETHTOOL_PHY_FAST_LINK_DOWN_ON 0 | ||
| 260 | #define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff | ||
| 261 | |||
| 255 | enum phy_tunable_id { | 262 | enum phy_tunable_id { |
| 256 | ETHTOOL_PHY_ID_UNSPEC, | 263 | ETHTOOL_PHY_ID_UNSPEC, |
| 257 | ETHTOOL_PHY_DOWNSHIFT, | 264 | ETHTOOL_PHY_DOWNSHIFT, |
| 265 | ETHTOOL_PHY_FAST_LINK_DOWN, | ||
| 258 | /* | 266 | /* |
| 259 | * Add your fresh new phy tunable attribute above and remember to update | 267 | * Add your fresh new phy tunable attribute above and remember to update |
| 260 | * phy_tunable_strings[] in net/core/ethtool.c | 268 | * phy_tunable_strings[] in net/core/ethtool.c |
| @@ -1704,6 +1712,9 @@ static inline int ethtool_validate_duplex(__u8 duplex) · 1443 unmodified lines | |||
| 1704 | #define ETH_MODULE_SFF_8436 0x4 | 1712 | #define ETH_MODULE_SFF_8436 0x4 |
| 1705 | #define ETH_MODULE_SFF_8436_LEN 256 | 1713 | #define ETH_MODULE_SFF_8436_LEN 256 |
| 1706 | 1714 | ||
| 1715 | #define ETH_MODULE_SFF_8636_MAX_LEN 640 | ||
| 1716 | #define ETH_MODULE_SFF_8436_MAX_LEN 640 | ||
| 1717 | |||
| 1707 | /* Reset flags */ | 1718 | /* Reset flags */ |
| 1708 | /* The reset() operation must clear the flags for the components which | 1719 | /* The reset() operation must clear the flags for the components which |
| 1709 | * were actually reset. On successful return, the flags indicate the | 1720 | * were actually reset. On successful return, the flags indicate the |
| @@ -91,5 +91,7 @@ · 90 unmodified lines | |||
| 91 | #define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */ | 91 | #define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */ |
| 92 | #define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */ | 92 | #define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */ |
| 93 | 93 | ||
| 94 | #define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */ | ||
| 95 | |||
| 94 | 96 | ||
| 95 | #endif /* _UAPI_LINUX_FCNTL_H */ | 97 | #endif /* _UAPI_LINUX_FCNTL_H */ |
| @@ -16,6 +16,12 @@ enum { · 15 unmodified lines | |||
| 16 | FOU_ATTR_IPPROTO, /* u8 */ | 16 | FOU_ATTR_IPPROTO, /* u8 */ |
| 17 | FOU_ATTR_TYPE, /* u8 */ | 17 | FOU_ATTR_TYPE, /* u8 */ |
| 18 | FOU_ATTR_REMCSUM_NOPARTIAL, /* flag */ | 18 | FOU_ATTR_REMCSUM_NOPARTIAL, /* flag */ |
| 19 | FOU_ATTR_LOCAL_V4, /* u32 */ | ||
| 20 | FOU_ATTR_LOCAL_V6, /* in6_addr */ | ||
| 21 | FOU_ATTR_PEER_V4, /* u32 */ | ||
| 22 | FOU_ATTR_PEER_V6, /* in6_addr */ | ||
| 23 | FOU_ATTR_PEER_PORT, /* u16 */ | ||
| 24 | FOU_ATTR_IFINDEX, /* s32 */ | ||
| 19 | 25 | ||
| 20 | __FOU_ATTR_MAX, | 26 | __FOU_ATTR_MAX, |
| 21 | }; | 27 | }; |
| @@ -320,6 +320,9 @@ struct fscrypt_key { · 319 unmodified lines | |||
| 320 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | 320 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 |
| 321 | #define SYNC_FILE_RANGE_WRITE 2 | 321 | #define SYNC_FILE_RANGE_WRITE 2 |
| 322 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | 322 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 |
| 323 | #define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE | \ | ||
| 324 | SYNC_FILE_RANGE_WAIT_BEFORE | \ | ||
| 325 | SYNC_FILE_RANGE_WAIT_AFTER) | ||
| 323 | 326 | ||
| 324 | /* | 327 | /* |
| 325 | * Flags for preadv2/pwritev2: | 328 | * Flags for preadv2/pwritev2: |
| @@ -44,6 +44,7 @@ · 43 unmodified lines | |||
| 44 | * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in | 44 | * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in |
| 45 | * - add blksize field to fuse_attr | 45 | * - add blksize field to fuse_attr |
| 46 | * - add file flags field to fuse_read_in and fuse_write_in | 46 | * - add file flags field to fuse_read_in and fuse_write_in |
| 47 | * - Add ATIME_NOW and MTIME_NOW flags to fuse_setattr_in | ||
| 47 | * | 48 | * |
| 48 | * 7.10 | 49 | * 7.10 |
| 49 | * - add nonseekable open flag | 50 | * - add nonseekable open flag |
| @@ -54,7 +55,7 @@ · 4 unmodified lines | |||
| 54 | * - add POLL message and NOTIFY_POLL notification | 55 | * - add POLL message and NOTIFY_POLL notification |
| 55 | * | 56 | * |
| 56 | * 7.12 | 57 | * 7.12 |
| 57 | * - add umask flag to input argument of open, mknod and mkdir | 58 | * - add umask flag to input argument of create, mknod and mkdir |
| 58 | * - add notification messages for invalidation of inodes and | 59 | * - add notification messages for invalidation of inodes and |
| 59 | * directory entries | 60 | * directory entries |
| 60 | * | 61 | * |
| @@ -125,6 +126,10 @@ · 64 unmodified lines | |||
| 125 | * | 126 | * |
| 126 | * 7.29 | 127 | * 7.29 |
| 127 | * - add FUSE_NO_OPENDIR_SUPPORT flag | 128 | * - add FUSE_NO_OPENDIR_SUPPORT flag |
| 129 | * | ||
| 130 | * 7.30 | ||
| 131 | * - add FUSE_EXPLICIT_INVAL_DATA | ||
| 132 | * - add FUSE_IOCTL_COMPAT_X32 | ||
| 128 | */ | 133 | */ |
| 129 | 134 | ||
| 130 | #ifndef _LINUX_FUSE_H | 135 | #ifndef _LINUX_FUSE_H |
| @@ -160,7 +165,7 @@ · 29 unmodified lines | |||
| 160 | #define FUSE_KERNEL_VERSION 7 | 165 | #define FUSE_KERNEL_VERSION 7 |
| 161 | 166 | ||
| 162 | /** Minor version number of this interface */ | 167 | /** Minor version number of this interface */ |
| 163 | #define FUSE_KERNEL_MINOR_VERSION 29 | 168 | #define FUSE_KERNEL_MINOR_VERSION 30 |
| 164 | 169 | ||
| 165 | /** The node ID of the root inode */ | 170 | /** The node ID of the root inode */ |
| 166 | #define FUSE_ROOT_ID 1 | 171 | #define FUSE_ROOT_ID 1 |
| @@ -229,11 +234,13 @@ struct fuse_file_lock { · 62 unmodified lines | |||
| 229 | * FOPEN_KEEP_CACHE: don't invalidate the data cache on open | 234 | * FOPEN_KEEP_CACHE: don't invalidate the data cache on open |
| 230 | * FOPEN_NONSEEKABLE: the file is not seekable | 235 | * FOPEN_NONSEEKABLE: the file is not seekable |
| 231 | * FOPEN_CACHE_DIR: allow caching this directory | 236 | * FOPEN_CACHE_DIR: allow caching this directory |
| 237 | * FOPEN_STREAM: the file is stream-like (no file position at all) | ||
| 232 | */ | 238 | */ |
| 233 | #define FOPEN_DIRECT_IO (1 << 0) | 239 | #define FOPEN_DIRECT_IO (1 << 0) |
| 234 | #define FOPEN_KEEP_CACHE (1 << 1) | 240 | #define FOPEN_KEEP_CACHE (1 << 1) |
| 235 | #define FOPEN_NONSEEKABLE (1 << 2) | 241 | #define FOPEN_NONSEEKABLE (1 << 2) |
| 236 | #define FOPEN_CACHE_DIR (1 << 3) | 242 | #define FOPEN_CACHE_DIR (1 << 3) |
| 243 | #define FOPEN_STREAM (1 << 4) | ||
| 237 | 244 | ||
| 238 | /** | 245 | /** |
| 239 | * INIT request/reply flags | 246 | * INIT request/reply flags |
| @@ -263,6 +270,7 @@ struct fuse_file_lock { · 23 unmodified lines | |||
| 263 | * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages | 270 | * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages |
| 264 | * FUSE_CACHE_SYMLINKS: cache READLINK responses | 271 | * FUSE_CACHE_SYMLINKS: cache READLINK responses |
| 265 | * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir | 272 | * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir |
| 273 | * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request | ||
| 266 | */ | 274 | */ |
| 267 | #define FUSE_ASYNC_READ (1 << 0) | 275 | #define FUSE_ASYNC_READ (1 << 0) |
| 268 | #define FUSE_POSIX_LOCKS (1 << 1) | 276 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -289,6 +297,7 @@ struct fuse_file_lock { · 20 unmodified lines | |||
| 289 | #define FUSE_MAX_PAGES (1 << 22) | 297 | #define FUSE_MAX_PAGES (1 << 22) |
| 290 | #define FUSE_CACHE_SYMLINKS (1 << 23) | 298 | #define FUSE_CACHE_SYMLINKS (1 << 23) |
| 291 | #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) | 299 | #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) |
| 300 | #define FUSE_EXPLICIT_INVAL_DATA (1 << 25) | ||
| 292 | 301 | ||
| 293 | /** | 302 | /** |
| 294 | * CUSE INIT request/reply flags | 303 | * CUSE INIT request/reply flags |
| @@ -335,6 +344,7 @@ struct fuse_file_lock { · 40 unmodified lines | |||
| 335 | * FUSE_IOCTL_RETRY: retry with new iovecs | 344 | * FUSE_IOCTL_RETRY: retry with new iovecs |
| 336 | * FUSE_IOCTL_32BIT: 32bit ioctl | 345 | * FUSE_IOCTL_32BIT: 32bit ioctl |
| 337 | * FUSE_IOCTL_DIR: is a directory | 346 | * FUSE_IOCTL_DIR: is a directory |
| 347 | * FUSE_IOCTL_COMPAT_X32: x32 compat ioctl on 64bit machine (64bit time_t) | ||
| 338 | * | 348 | * |
| 339 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs | 349 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs |
| 340 | */ | 350 | */ |
| @@ -343,6 +353,7 @@ struct fuse_file_lock { · 2 unmodified lines | |||
| 343 | #define FUSE_IOCTL_RETRY (1 << 2) | 353 | #define FUSE_IOCTL_RETRY (1 << 2) |
| 344 | #define FUSE_IOCTL_32BIT (1 << 3) | 354 | #define FUSE_IOCTL_32BIT (1 << 3) |
| 345 | #define FUSE_IOCTL_DIR (1 << 4) | 355 | #define FUSE_IOCTL_DIR (1 << 4) |
| 356 | #define FUSE_IOCTL_COMPAT_X32 (1 << 5) | ||
| 346 | 357 | ||
| 347 | #define FUSE_IOCTL_MAX_IOV 256 | 358 | #define FUSE_IOCTL_MAX_IOV 256 |
| 348 | 359 | ||
| @@ -353,6 +364,13 @@ struct fuse_file_lock { · 4 unmodified lines | |||
| 353 | */ | 364 | */ |
| 354 | #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) | 365 | #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) |
| 355 | 366 | ||
| 367 | /** | ||
| 368 | * Fsync flags | ||
| 369 | * | ||
| 370 | * FUSE_FSYNC_FDATASYNC: Sync data only, not metadata | ||
| 371 | */ | ||
| 372 | #define FUSE_FSYNC_FDATASYNC (1 << 0) | ||
| 373 | |||
| 356 | enum fuse_opcode { | 374 | enum fuse_opcode { |
| 357 | FUSE_LOOKUP = 1, | 375 | FUSE_LOOKUP = 1, |
| 358 | FUSE_FORGET = 2, /* no reply */ | 376 | FUSE_FORGET = 2, /* no reply */ |
| @@ -90,6 +90,8 @@ struct icmp6hdr { · 89 unmodified lines | |||
| 90 | #define ICMPV6_TIME_EXCEED 3 | 90 | #define ICMPV6_TIME_EXCEED 3 |
| 91 | #define ICMPV6_PARAMPROB 4 | 91 | #define ICMPV6_PARAMPROB 4 |
| 92 | 92 | ||
| 93 | #define ICMPV6_ERRMSG_MAX 127 | ||
| 94 | |||
| 93 | #define ICMPV6_INFOMSG_MASK 0x80 | 95 | #define ICMPV6_INFOMSG_MASK 0x80 |
| 94 | 96 | ||
| 95 | #define ICMPV6_ECHO_REQUEST 128 | 97 | #define ICMPV6_ECHO_REQUEST 128 |
| @@ -110,6 +112,8 @@ struct icmp6hdr { · 14 unmodified lines | |||
| 110 | 112 | ||
| 111 | #define ICMPV6_MRDISC_ADV 151 | 113 | #define ICMPV6_MRDISC_ADV 151 |
| 112 | 114 | ||
| 115 | #define ICMPV6_MSG_MAX 255 | ||
| 116 | |||
| 113 | /* | 117 | /* |
| 114 | * Codes for Destination Unreachable | 118 | * Codes for Destination Unreachable |
| 115 | */ | 119 | */ |
| @@ -109,6 +109,7 @@ · 108 unmodified lines | |||
| 109 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 109 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 110 | #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 110 | #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 111 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | 111 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 112 | #define ETH_P_DSA_8021Q 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | ||
| 112 | #define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ | 113 | #define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ |
| 113 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ | 114 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 114 | 115 | ||
| @@ -60,6 +60,7 @@ · 59 unmodified lines | |||
| 60 | #define TUNSETSTEERINGEBPF _IOR('T', 224, int) | 60 | #define TUNSETSTEERINGEBPF _IOR('T', 224, int) |
| 61 | #define TUNSETFILTEREBPF _IOR('T', 225, int) | 61 | #define TUNSETFILTEREBPF _IOR('T', 225, int) |
| 62 | #define TUNSETCARRIER _IOW('T', 226, int) | 62 | #define TUNSETCARRIER _IOW('T', 226, int) |
| 63 | #define TUNGETDEVNETNS _IO('T', 227) | ||
| 63 | 64 | ||
| 64 | /* TUNSETIFF ifr flags */ | 65 | /* TUNSETIFF ifr flags */ |
| 65 | #define IFF_TUN 0x0001 | 66 | #define IFF_TUN 0x0001 |
| @@ -32,10 +32,11 @@ enum vlan_ioctl_cmds { · 31 unmodified lines | |||
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | enum vlan_flags { | 34 | enum vlan_flags { |
| 35 | VLAN_FLAG_REORDER_HDR = 0x1, | 35 | VLAN_FLAG_REORDER_HDR = 0x1, |
| 36 | VLAN_FLAG_GVRP = 0x2, | 36 | VLAN_FLAG_GVRP = 0x2, |
| 37 | VLAN_FLAG_LOOSE_BINDING = 0x4, | 37 | VLAN_FLAG_LOOSE_BINDING = 0x4, |
| 38 | VLAN_FLAG_MVRP = 0x8, | 38 | VLAN_FLAG_MVRP = 0x8, |
| 39 | VLAN_FLAG_BRIDGE_BINDING = 0x10, | ||
| 39 | }; | 40 | }; |
| 40 | 41 | ||
| 41 | enum vlan_name_types { | 42 | enum vlan_name_types { |
| @@ -606,6 +606,7 @@ · 605 unmodified lines | |||
| 606 | #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ | 606 | #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ |
| 607 | #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ | 607 | #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ |
| 608 | #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ | 608 | #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ |
| 609 | #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ | ||
| 609 | 610 | ||
| 610 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ | 611 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ |
| 611 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ | 612 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ |
| @@ -26,6 +26,7 @@ struct io_uring_sqe { · 25 unmodified lines | |||
| 26 | __kernel_rwf_t rw_flags; | 26 | __kernel_rwf_t rw_flags; |
| 27 | __u32 fsync_flags; | 27 | __u32 fsync_flags; |
| 28 | __u16 poll_events; | 28 | __u16 poll_events; |
| 29 | __u32 sync_range_flags; | ||
| 29 | }; | 30 | }; |
| 30 | __u64 user_data; /* data to be passed back at completion time */ | 31 | __u64 user_data; /* data to be passed back at completion time */ |
| 31 | union { | 32 | union { |
| @@ -38,6 +39,7 @@ struct io_uring_sqe { · 6 unmodified lines | |||
| 38 | * sqe->flags | 39 | * sqe->flags |
| 39 | */ | 40 | */ |
| 40 | #define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */ | 41 | #define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */ |
| 42 | #define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */ | ||
| 41 | 43 | ||
| 42 | /* | 44 | /* |
| 43 | * io_uring_setup() flags | 45 | * io_uring_setup() flags |
| @@ -54,6 +56,7 @@ struct io_uring_sqe { · 10 unmodified lines | |||
| 54 | #define IORING_OP_WRITE_FIXED 5 | 56 | #define IORING_OP_WRITE_FIXED 5 |
| 55 | #define IORING_OP_POLL_ADD 6 | 57 | #define IORING_OP_POLL_ADD 6 |
| 56 | #define IORING_OP_POLL_REMOVE 7 | 58 | #define IORING_OP_POLL_REMOVE 7 |
| 59 | #define IORING_OP_SYNC_FILE_RANGE 8 | ||
| 57 | 60 | ||
| 58 | /* | 61 | /* |
| 59 | * sqe->fsync_flags | 62 | * sqe->fsync_flags |
| @@ -133,5 +136,7 @@ struct io_uring_params { · 73 unmodified lines | |||
| 133 | #define IORING_UNREGISTER_BUFFERS 1 | 136 | #define IORING_UNREGISTER_BUFFERS 1 |
| 134 | #define IORING_REGISTER_FILES 2 | 137 | #define IORING_REGISTER_FILES 2 |
| 135 | #define IORING_UNREGISTER_FILES 3 | 138 | #define IORING_UNREGISTER_FILES 3 |
| 139 | #define IORING_REGISTER_EVENTFD 4 | ||
| 140 | #define IORING_UNREGISTER_EVENTFD 5 | ||
| 136 | 141 | ||
| 137 | #endif | 142 | #endif |
| @@ -124,6 +124,13 @@ · 123 unmodified lines | |||
| 124 | 124 | ||
| 125 | #define IP_VS_PEDATA_MAXLEN 255 | 125 | #define IP_VS_PEDATA_MAXLEN 255 |
| 126 | 126 | ||
| 127 | /* Tunnel types */ | ||
| 128 | enum { | ||
| 129 | IP_VS_CONN_F_TUNNEL_TYPE_IPIP = 0, /* IPIP */ | ||
| 130 | IP_VS_CONN_F_TUNNEL_TYPE_GUE, /* GUE */ | ||
| 131 | IP_VS_CONN_F_TUNNEL_TYPE_MAX, | ||
| 132 | }; | ||
| 133 | |||
| 127 | /* | 134 | /* |
| 128 | * The struct ip_vs_service_user and struct ip_vs_dest_user are | 135 | * The struct ip_vs_service_user and struct ip_vs_dest_user are |
| 129 | * used to set IPVS rules through setsockopt. | 136 | * used to set IPVS rules through setsockopt. |
| @@ -392,6 +399,10 @@ enum { · 262 unmodified lines | |||
| 392 | 399 | ||
| 393 | IPVS_DEST_ATTR_STATS64, /* nested attribute for dest stats */ | 400 | IPVS_DEST_ATTR_STATS64, /* nested attribute for dest stats */ |
| 394 | 401 | ||
| 402 | IPVS_DEST_ATTR_TUN_TYPE, /* tunnel type */ | ||
| 403 | |||
| 404 | IPVS_DEST_ATTR_TUN_PORT, /* tunnel port */ | ||
| 405 | |||
| 395 | __IPVS_DEST_ATTR_MAX, | 406 | __IPVS_DEST_ATTR_MAX, |
| 396 | }; | 407 | }; |
| 397 | 408 | ||
| @@ -211,6 +211,11 @@ struct kfd_ioctl_dbg_wave_control_args { · 210 unmodified lines | |||
| 211 | #define KFD_HW_EXCEPTION_GPU_HANG 0 | 211 | #define KFD_HW_EXCEPTION_GPU_HANG 0 |
| 212 | #define KFD_HW_EXCEPTION_ECC 1 | 212 | #define KFD_HW_EXCEPTION_ECC 1 |
| 213 | 213 | ||
| 214 | /* For kfd_hsa_memory_exception_data.ErrorType */ | ||
| 215 | #define KFD_MEM_ERR_NO_RAS 0 | ||
| 216 | #define KFD_MEM_ERR_SRAM_ECC 1 | ||
| 217 | #define KFD_MEM_ERR_POISON_CONSUMED 2 | ||
| 218 | #define KFD_MEM_ERR_GPU_HANG 3 | ||
| 214 | 219 | ||
| 215 | struct kfd_ioctl_create_event_args { | 220 | struct kfd_ioctl_create_event_args { |
| 216 | __u64 event_page_offset; /* from KFD */ | 221 | __u64 event_page_offset; /* from KFD */ |
| @@ -250,7 +255,12 @@ struct kfd_hsa_memory_exception_data { · 33 unmodified lines | |||
| 250 | struct kfd_memory_exception_failure failure; | 255 | struct kfd_memory_exception_failure failure; |
| 251 | __u64 va; | 256 | __u64 va; |
| 252 | __u32 gpu_id; | 257 | __u32 gpu_id; |
| 253 | __u32 pad; | 258 | __u32 ErrorType; /* 0 = no RAS error, |
| 259 | * 1 = ECC_SRAM, | ||
| 260 | * 2 = Link_SYNFLOOD (poison), | ||
| 261 | * 3 = GPU hang (not attributable to a specific cause), | ||
| 262 | * other values reserved | ||
| 263 | */ | ||
| 254 | }; | 264 | }; |
| 255 | 265 | ||
| 256 | /* hw exception data */ | 266 | /* hw exception data */ |
| @@ -986,8 +986,13 @@ struct kvm_ppc_resize_hpt { · 985 unmodified lines | |||
| 986 | #define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163 | 986 | #define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163 |
| 987 | #define KVM_CAP_EXCEPTION_PAYLOAD 164 | 987 | #define KVM_CAP_EXCEPTION_PAYLOAD 164 |
| 988 | #define KVM_CAP_ARM_VM_IPA_SIZE 165 | 988 | #define KVM_CAP_ARM_VM_IPA_SIZE 165 |
| 989 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 | 989 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 /* Obsolete */ |
| 990 | #define KVM_CAP_HYPERV_CPUID 167 | 990 | #define KVM_CAP_HYPERV_CPUID 167 |
| 991 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 168 | ||
| 992 | #define KVM_CAP_PPC_IRQ_XIVE 169 | ||
| 993 | #define KVM_CAP_ARM_SVE 170 | ||
| 994 | #define KVM_CAP_ARM_PTRAUTH_ADDRESS 171 | ||
| 995 | #define KVM_CAP_ARM_PTRAUTH_GENERIC 172 | ||
| 991 | 996 | ||
| 992 | #ifdef KVM_CAP_IRQ_ROUTING | 997 | #ifdef KVM_CAP_IRQ_ROUTING |
| 993 | 998 | ||
| @@ -1145,6 +1150,7 @@ struct kvm_dirty_tlb { · 151 unmodified lines | |||
| 1145 | #define KVM_REG_SIZE_U256 0x0050000000000000ULL | 1150 | #define KVM_REG_SIZE_U256 0x0050000000000000ULL |
| 1146 | #define KVM_REG_SIZE_U512 0x0060000000000000ULL | 1151 | #define KVM_REG_SIZE_U512 0x0060000000000000ULL |
| 1147 | #define KVM_REG_SIZE_U1024 0x0070000000000000ULL | 1152 | #define KVM_REG_SIZE_U1024 0x0070000000000000ULL |
| 1153 | #define KVM_REG_SIZE_U2048 0x0080000000000000ULL | ||
| 1148 | 1154 | ||
| 1149 | struct kvm_reg_list { | 1155 | struct kvm_reg_list { |
| 1150 | __u64 n; /* number of regs */ | 1156 | __u64 n; /* number of regs */ |
| @@ -1211,6 +1217,8 @@ enum kvm_device_type { · 60 unmodified lines | |||
| 1211 | #define KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_V3 | 1217 | #define KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_V3 |
| 1212 | KVM_DEV_TYPE_ARM_VGIC_ITS, | 1218 | KVM_DEV_TYPE_ARM_VGIC_ITS, |
| 1213 | #define KVM_DEV_TYPE_ARM_VGIC_ITS KVM_DEV_TYPE_ARM_VGIC_ITS | 1219 | #define KVM_DEV_TYPE_ARM_VGIC_ITS KVM_DEV_TYPE_ARM_VGIC_ITS |
| 1220 | KVM_DEV_TYPE_XIVE, | ||
| 1221 | #define KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_XIVE | ||
| 1214 | KVM_DEV_TYPE_MAX, | 1222 | KVM_DEV_TYPE_MAX, |
| 1215 | }; | 1223 | }; |
| 1216 | 1224 | ||
| @@ -1434,12 +1442,15 @@ struct kvm_enc_region { · 217 unmodified lines | |||
| 1434 | #define KVM_GET_NESTED_STATE _IOWR(KVMIO, 0xbe, struct kvm_nested_state) | 1442 | #define KVM_GET_NESTED_STATE _IOWR(KVMIO, 0xbe, struct kvm_nested_state) |
| 1435 | #define KVM_SET_NESTED_STATE _IOW(KVMIO, 0xbf, struct kvm_nested_state) | 1443 | #define KVM_SET_NESTED_STATE _IOW(KVMIO, 0xbf, struct kvm_nested_state) |
| 1436 | 1444 | ||
| 1437 | /* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT */ | 1445 | /* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */ |
| 1438 | #define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log) | 1446 | #define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log) |
| 1439 | 1447 | ||
| 1440 | /* Available with KVM_CAP_HYPERV_CPUID */ | 1448 | /* Available with KVM_CAP_HYPERV_CPUID */ |
| 1441 | #define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2) | 1449 | #define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2) |
| 1442 | 1450 | ||
| 1451 | /* Available with KVM_CAP_ARM_SVE */ | ||
| 1452 | #define KVM_ARM_VCPU_FINALIZE _IOW(KVMIO, 0xc2, int) | ||
| 1453 | |||
| 1443 | /* Secure Encrypted Virtualization command */ | 1454 | /* Secure Encrypted Virtualization command */ |
| 1444 | enum sev_cmd_id { | 1455 | enum sev_cmd_id { |
| 1445 | /* Guest initialization commands */ | 1456 | /* Guest initialization commands */ |
| @@ -195,6 +195,7 @@ struct lirc_scancode { · 194 unmodified lines | |||
| 195 | * @RC_PROTO_RCMM12: RC-MM protocol 12 bits | 195 | * @RC_PROTO_RCMM12: RC-MM protocol 12 bits |
| 196 | * @RC_PROTO_RCMM24: RC-MM protocol 24 bits | 196 | * @RC_PROTO_RCMM24: RC-MM protocol 24 bits |
| 197 | * @RC_PROTO_RCMM32: RC-MM protocol 32 bits | 197 | * @RC_PROTO_RCMM32: RC-MM protocol 32 bits |
| 198 | * @RC_PROTO_XBOX_DVD: Xbox DVD Movie Playback Kit protocol | ||
| 198 | */ | 199 | */ |
| 199 | enum rc_proto { | 200 | enum rc_proto { |
| 200 | RC_PROTO_UNKNOWN = 0, | 201 | RC_PROTO_UNKNOWN = 0, |
| @@ -224,6 +225,7 @@ enum rc_proto { · 23 unmodified lines | |||
| 224 | RC_PROTO_RCMM12 = 24, | 225 | RC_PROTO_RCMM12 = 24, |
| 225 | RC_PROTO_RCMM24 = 25, | 226 | RC_PROTO_RCMM24 = 25, |
| 226 | RC_PROTO_RCMM32 = 26, | 227 | RC_PROTO_RCMM32 = 26, |
| 228 | RC_PROTO_XBOX_DVD = 27, | ||
| 227 | }; | 229 | }; |
| 228 | 230 | ||
| 229 | #endif | 231 | #endif |
| @@ -34,7 +34,7 @@ · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | #define MEDIA_BUS_FMT_FIXED 0x0001 | 35 | #define MEDIA_BUS_FMT_FIXED 0x0001 |
| 36 | 36 | ||
| 37 | /* RGB - next is 0x101b */ | 37 | /* RGB - next is 0x101c */ |
| 38 | #define MEDIA_BUS_FMT_RGB444_1X12 0x1016 | 38 | #define MEDIA_BUS_FMT_RGB444_1X12 0x1016 |
| 39 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 | 39 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 |
| 40 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 | 40 | #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 |
| @@ -50,6 +50,7 @@ · 9 unmodified lines | |||
| 50 | #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015 | 50 | #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015 |
| 51 | #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010 | 51 | #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010 |
| 52 | #define MEDIA_BUS_FMT_BGR888_1X24 0x1013 | 52 | #define MEDIA_BUS_FMT_BGR888_1X24 0x1013 |
| 53 | #define MEDIA_BUS_FMT_BGR888_3X8 0x101b | ||
| 53 | #define MEDIA_BUS_FMT_GBR888_1X24 0x1014 | 54 | #define MEDIA_BUS_FMT_GBR888_1X24 0x1014 |
| 54 | #define MEDIA_BUS_FMT_RGB888_1X24 0x100a | 55 | #define MEDIA_BUS_FMT_RGB888_1X24 0x100a |
| 55 | #define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b | 56 | #define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b |
| @@ -262,6 +262,11 @@ struct media_links_enum { · 261 unmodified lines | |||
| 262 | #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) | 262 | #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) |
| 263 | #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) | 263 | #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) |
| 264 | 264 | ||
| 265 | #define MEDIA_INTF_T_ALSA_BASE 0x00000300 | ||
| 266 | #define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) | ||
| 267 | #define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) | ||
| 268 | #define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2) | ||
| 269 | |||
| 265 | #if defined(__KERNEL__) | 270 | #if defined(__KERNEL__) |
| 266 | 271 | ||
| 267 | /* | 272 | /* |
| @@ -413,19 +418,19 @@ struct media_v2_topology { · 145 unmodified lines | |||
| 413 | #define MEDIA_ENT_F_DTV_DECODER MEDIA_ENT_F_DV_DECODER | 418 | #define MEDIA_ENT_F_DTV_DECODER MEDIA_ENT_F_DV_DECODER |
| 414 | 419 | ||
| 415 | /* | 420 | /* |
| 416 | * There is still no ALSA support in the media controller. These | 421 | * There is still no full ALSA support in the media controller. These |
| 417 | * defines should not have been added and we leave them here only | 422 | * defines should not have been added and we leave them here only |
| 418 | * in case some application tries to use these defines. | 423 | * in case some application tries to use these defines. |
| 424 | * | ||
| 425 | * The ALSA defines that are in use have been moved into __KERNEL__ | ||
| 426 | * scope. As support gets added to these interface types, they should | ||
| 427 | * be moved into __KERNEL__ scope with the code that uses them. | ||
| 419 | */ | 428 | */ |
| 420 | #define MEDIA_INTF_T_ALSA_BASE 0x00000300 | 429 | #define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3) |
| 421 | #define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) | 430 | #define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4) |
| 422 | #define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) | 431 | #define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5) |
| 423 | #define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2) | 432 | #define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6) |
| 424 | #define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3) | 433 | #define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) |
| 425 | #define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4) | ||
| 426 | #define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5) | ||
| 427 | #define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6) | ||
| 428 | #define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) | ||
| 429 | 434 | ||
| 430 | /* Obsolete symbol for media_version, no longer used in the kernel */ | 435 | /* Obsolete symbol for media_version, no longer used in the kernel */ |
| 431 | #define MEDIA_API_VERSION ((0 << 16) | (1 << 8) | 0) | 436 | #define MEDIA_API_VERSION ((0 << 16) | (1 << 8) | 0) |
| @@ -1,70 +1,9 @@ | |||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ |
| 2 | /****************************************************************************** | 2 | /* |
| 3 | * Copyright(c) 2003-2015 Intel Corporation. All rights reserved. | ||
| 3 | * Intel Management Engine Interface (Intel MEI) Linux driver | 4 | * Intel Management Engine Interface (Intel MEI) Linux driver |
| 4 | * Intel MEI Interface Header | 5 | * Intel MEI Interface Header |
| 5 | * | 6 | */ |
| 6 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
| 7 | * redistributing this file, you may do so under either license. | ||
| 8 | * | ||
| 9 | * GPL LICENSE SUMMARY | ||
| 10 | * | ||
| 11 | * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved. | ||
| 12 | * | ||
| 13 | * This program is free software; you can redistribute it and/or modify | ||
| 14 | * it under the terms of version 2 of the GNU General Public License as | ||
| 15 | * published by the Free Software Foundation. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, but | ||
| 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 20 | * General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
| 25 | * USA | ||
| 26 | * | ||
| 27 | * The full GNU General Public License is included in this distribution | ||
| 28 | * in the file called LICENSE.GPL. | ||
| 29 | * | ||
| 30 | * Contact Information: | ||
| 31 | * Intel Corporation. | ||
| 32 | * linux-mei@linux.intel.com | ||
| 33 | * http://www.intel.com | ||
| 34 | * | ||
| 35 | * BSD LICENSE | ||
| 36 | * | ||
| 37 | * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved. | ||
| 38 | * All rights reserved. | ||
| 39 | * | ||
| 40 | * Redistribution and use in source and binary forms, with or without | ||
| 41 | * modification, are permitted provided that the following conditions | ||
| 42 | * are met: | ||
| 43 | * | ||
| 44 | * * Redistributions of source code must retain the above copyright | ||
| 45 | * notice, this list of conditions and the following disclaimer. | ||
| 46 | * * Redistributions in binary form must reproduce the above copyright | ||
| 47 | * notice, this list of conditions and the following disclaimer in | ||
| 48 | * the documentation and/or other materials provided with the | ||
| 49 | * distribution. | ||
| 50 | * * Neither the name Intel Corporation nor the names of its | ||
| 51 | * contributors may be used to endorse or promote products derived | ||
| 52 | * from this software without specific prior written permission. | ||
| 53 | * | ||
| 54 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 55 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 56 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 57 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 58 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 59 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 60 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 61 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 62 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 63 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 64 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 65 | * | ||
| 66 | *****************************************************************************/ | ||
| 67 | |||
| 68 | #ifndef _LINUX_MEI_H | 7 | #ifndef _LINUX_MEI_H |
| 69 | #define _LINUX_MEI_H | 8 | #define _LINUX_MEI_H |
| 70 | 9 | ||
| @@ -55,4 +55,66 @@ · 54 unmodified lines | |||
| 55 | #define MS_MGC_VAL 0xC0ED0000 | 55 | #define MS_MGC_VAL 0xC0ED0000 |
| 56 | #define MS_MGC_MSK 0xffff0000 | 56 | #define MS_MGC_MSK 0xffff0000 |
| 57 | 57 | ||
| 58 | /* | ||
| 59 | * open_tree() flags. | ||
| 60 | */ | ||
| 61 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */ | ||
| 62 | #define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */ | ||
| 63 | |||
| 64 | /* | ||
| 65 | * move_mount() flags. | ||
| 66 | */ | ||
| 67 | #define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */ | ||
| 68 | #define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */ | ||
| 69 | #define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */ | ||
| 70 | #define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */ | ||
| 71 | #define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */ | ||
| 72 | #define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */ | ||
| 73 | #define MOVE_MOUNT__MASK 0x00000077 | ||
| 74 | |||
| 75 | /* | ||
| 76 | * fsopen() flags. | ||
| 77 | */ | ||
| 78 | #define FSOPEN_CLOEXEC 0x00000001 | ||
| 79 | |||
| 80 | /* | ||
| 81 | * fspick() flags. | ||
| 82 | */ | ||
| 83 | #define FSPICK_CLOEXEC 0x00000001 | ||
| 84 | #define FSPICK_SYMLINK_NOFOLLOW 0x00000002 | ||
| 85 | #define FSPICK_NO_AUTOMOUNT 0x00000004 | ||
| 86 | #define FSPICK_EMPTY_PATH 0x00000008 | ||
| 87 | |||
| 88 | /* | ||
| 89 | * The type of fsconfig() call made. | ||
| 90 | */ | ||
| 91 | enum fsconfig_command { | ||
| 92 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ | ||
| 93 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ | ||
| 94 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */ | ||
| 95 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ | ||
| 96 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */ | ||
| 97 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ | ||
| 98 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */ | ||
| 99 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ | ||
| 100 | }; | ||
| 101 | |||
| 102 | /* | ||
| 103 | * fsmount() flags. | ||
| 104 | */ | ||
| 105 | #define FSMOUNT_CLOEXEC 0x00000001 | ||
| 106 | |||
| 107 | /* | ||
| 108 | * Mount attributes. | ||
| 109 | */ | ||
| 110 | #define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */ | ||
| 111 | #define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits */ | ||
| 112 | #define MOUNT_ATTR_NODEV 0x00000004 /* Disallow access to device special files */ | ||
| 113 | #define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution */ | ||
| 114 | #define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated */ | ||
| 115 | #define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */ | ||
| 116 | #define MOUNT_ATTR_NOATIME 0x00000010 /* - Do not update access times. */ | ||
| 117 | #define MOUNT_ATTR_STRICTATIME 0x00000020 /* - Always perform atime updates */ | ||
| 118 | #define MOUNT_ATTR_NODIRATIME 0x00000080 /* Do not update directory access times */ | ||
| 119 | |||
| 58 | #endif /* _UAPI_LINUX_MOUNT_H */ | 120 | #endif /* _UAPI_LINUX_MOUNT_H */ |
| @@ -966,7 +966,7 @@ enum nft_socket_keys { · 965 unmodified lines | |||
| 966 | * @NFT_CT_DST_IP: conntrack layer 3 protocol destination (IPv4 address) | 966 | * @NFT_CT_DST_IP: conntrack layer 3 protocol destination (IPv4 address) |
| 967 | * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address) | 967 | * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address) |
| 968 | * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address) | 968 | * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address) |
| 969 | * @NFT_CT_TIMEOUT: connection tracking timeout policy assigned to conntrack | 969 | * @NFT_CT_ID: conntrack id |
| 970 | */ | 970 | */ |
| 971 | enum nft_ct_keys { | 971 | enum nft_ct_keys { |
| 972 | NFT_CT_STATE, | 972 | NFT_CT_STATE, |
| @@ -992,7 +992,7 @@ enum nft_ct_keys { · 19 unmodified lines | |||
| 992 | NFT_CT_DST_IP, | 992 | NFT_CT_DST_IP, |
| 993 | NFT_CT_SRC_IP6, | 993 | NFT_CT_SRC_IP6, |
| 994 | NFT_CT_DST_IP6, | 994 | NFT_CT_DST_IP6, |
| 995 | NFT_CT_TIMEOUT, | 995 | NFT_CT_ID, |
| 996 | __NFT_CT_MAX | 996 | __NFT_CT_MAX |
| 997 | }; | 997 | }; |
| 998 | #define NFT_CT_MAX (__NFT_CT_MAX - 1) | 998 | #define NFT_CT_MAX (__NFT_CT_MAX - 1) |
| @@ -1136,7 +1136,7 @@ enum nft_log_level { · 137 unmodified lines | |||
| 1136 | NFT_LOGLEVEL_AUDIT, | 1136 | NFT_LOGLEVEL_AUDIT, |
| 1137 | __NFT_LOGLEVEL_MAX | 1137 | __NFT_LOGLEVEL_MAX |
| 1138 | }; | 1138 | }; |
| 1139 | #define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX + 1) | 1139 | #define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX - 1) |
| 1140 | 1140 | ||
| 1141 | /** | 1141 | /** |
| 1142 | * enum nft_queue_attributes - nf_tables queue expression netlink attributes | 1142 | * enum nft_queue_attributes - nf_tables queue expression netlink attributes |
| @@ -1522,15 +1522,21 @@ enum nft_flowtable_hook_attributes { · 379 unmodified lines | |||
| 1522 | * | 1522 | * |
| 1523 | * @NFTA_OSF_DREG: destination register (NLA_U32: nft_registers) | 1523 | * @NFTA_OSF_DREG: destination register (NLA_U32: nft_registers) |
| 1524 | * @NFTA_OSF_TTL: Value of the TTL osf option (NLA_U8) | 1524 | * @NFTA_OSF_TTL: Value of the TTL osf option (NLA_U8) |
| 1525 | * @NFTA_OSF_FLAGS: flags (NLA_U32) | ||
| 1525 | */ | 1526 | */ |
| 1526 | enum nft_osf_attributes { | 1527 | enum nft_osf_attributes { |
| 1527 | NFTA_OSF_UNSPEC, | 1528 | NFTA_OSF_UNSPEC, |
| 1528 | NFTA_OSF_DREG, | 1529 | NFTA_OSF_DREG, |
| 1529 | NFTA_OSF_TTL, | 1530 | NFTA_OSF_TTL, |
| 1531 | NFTA_OSF_FLAGS, | ||
| 1530 | __NFTA_OSF_MAX, | 1532 | __NFTA_OSF_MAX, |
| 1531 | }; | 1533 | }; |
| 1532 | #define NFTA_OSF_MAX (__NFTA_OSF_MAX - 1) | 1534 | #define NFTA_OSF_MAX (__NFTA_OSF_MAX - 1) |
| 1533 | 1535 | ||
| 1536 | enum nft_osf_flags { | ||
| 1537 | NFT_OSF_F_VERSION = (1 << 0), | ||
| 1538 | }; | ||
| 1539 | |||
| 1534 | /** | 1540 | /** |
| 1535 | * enum nft_device_attributes - nf_tables device netlink attributes | 1541 | * enum nft_device_attributes - nf_tables device netlink attributes |
| 1536 | * | 1542 | * |
| @@ -66,13 +66,4 @@ struct nfs_mount_data { · 65 unmodified lines | |||
| 66 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ | 66 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ |
| 67 | #define NFS_MOUNT_FLAGMASK 0xFFFF | 67 | #define NFS_MOUNT_FLAGMASK 0xFFFF |
| 68 | 68 | ||
| 69 | /* The following are for internal use only */ | ||
| 70 | #define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000 | ||
| 71 | #define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000 | ||
| 72 | #define NFS_MOUNT_NORESVPORT 0x40000 | ||
| 73 | #define NFS_MOUNT_LEGACY_INTERFACE 0x80000 | ||
| 74 | |||
| 75 | #define NFS_MOUNT_LOCAL_FLOCK 0x100000 | ||
| 76 | #define NFS_MOUNT_LOCAL_FCNTL 0x200000 | ||
| 77 | |||
| 78 | #endif | 69 | #endif |
| @@ -36,6 +36,7 @@ enum cld_command { · 35 unmodified lines | |||
| 36 | Cld_Remove, /* remove record of this cm_id */ | 36 | Cld_Remove, /* remove record of this cm_id */ |
| 37 | Cld_Check, /* is this cm_id allowed? */ | 37 | Cld_Check, /* is this cm_id allowed? */ |
| 38 | Cld_GraceDone, /* grace period is complete */ | 38 | Cld_GraceDone, /* grace period is complete */ |
| 39 | Cld_GraceStart, | ||
| 39 | }; | 40 | }; |
| 40 | 41 | ||
| 41 | /* representation of long-form NFSv4 client ID */ | 42 | /* representation of long-form NFSv4 client ID */ |
| @@ -11,7 +11,7 @@ · 10 unmodified lines | |||
| 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> | 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> |
| 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> | 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> |
| 13 | * Copyright 2015-2017 Intel Deutschland GmbH | 13 | * Copyright 2015-2017 Intel Deutschland GmbH |
| 14 | * Copyright (C) 2018 Intel Corporation | 14 | * Copyright (C) 2018-2019 Intel Corporation |
| 15 | * | 15 | * |
| 16 | * Permission to use, copy, modify, and/or distribute this software for any | 16 | * Permission to use, copy, modify, and/or distribute this software for any |
| 17 | * purpose with or without fee is hereby granted, provided that the above | 17 | * purpose with or without fee is hereby granted, provided that the above |
| @@ -1065,6 +1065,26 @@ · 1047 unmodified lines | |||
| 1065 | * indicated by %NL80211_ATTR_WIPHY_FREQ and other attributes | 1065 | * indicated by %NL80211_ATTR_WIPHY_FREQ and other attributes |
| 1066 | * determining the width and type. | 1066 | * determining the width and type. |
| 1067 | * | 1067 | * |
| 1068 | * @NL80211_CMD_UPDATE_OWE_INFO: This interface allows the host driver to | ||
| 1069 | * offload OWE processing to user space. This intends to support | ||
| 1070 | * OWE AKM by the host drivers that implement SME but rely | ||
| 1071 | * on the user space for the cryptographic/DH IE processing in AP mode. | ||
| 1072 | * | ||
| 1073 | * @NL80211_CMD_PROBE_MESH_LINK: The requirement for mesh link metric | ||
| 1074 | * refreshing, is that from one mesh point we be able to send some data | ||
| 1075 | * frames to other mesh points which are not currently selected as a | ||
| 1076 | * primary traffic path, but which are only 1 hop away. The absence of | ||
| 1077 | * the primary path to the chosen node makes it necessary to apply some | ||
| 1078 | * form of marking on a chosen packet stream so that the packets can be | ||
| 1079 | * properly steered to the selected node for testing, and not by the | ||
| 1080 | * regular mesh path lookup. Further, the packets must be of type data | ||
| 1081 | * so that the rate control (often embedded in firmware) is used for | ||
| 1082 | * rate selection. | ||
| 1083 | * | ||
| 1084 | * Here attribute %NL80211_ATTR_MAC is used to specify connected mesh | ||
| 1085 | * peer MAC address and %NL80211_ATTR_FRAME is used to specify the frame | ||
| 1086 | * content. The frame is ethernet data. | ||
| 1087 | * | ||
| 1068 | * @NL80211_CMD_MAX: highest used command number | 1088 | * @NL80211_CMD_MAX: highest used command number |
| 1069 | * @__NL80211_CMD_AFTER_LAST: internal use | 1089 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 1070 | */ | 1090 | */ |
| @@ -1285,6 +1305,10 @@ enum nl80211_commands { · 214 unmodified lines | |||
| 1285 | 1305 | ||
| 1286 | NL80211_CMD_NOTIFY_RADAR, | 1306 | NL80211_CMD_NOTIFY_RADAR, |
| 1287 | 1307 | ||
| 1308 | NL80211_CMD_UPDATE_OWE_INFO, | ||
| 1309 | |||
| 1310 | NL80211_CMD_PROBE_MESH_LINK, | ||
| 1311 | |||
| 1288 | /* add new commands above here */ | 1312 | /* add new commands above here */ |
| 1289 | 1313 | ||
| 1290 | /* used to define NL80211_CMD_MAX below */ | 1314 | /* used to define NL80211_CMD_MAX below */ |
| @@ -2308,6 +2332,15 @@ enum nl80211_commands { · 1017 unmodified lines | |||
| 2308 | * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime | 2332 | * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime |
| 2309 | * scheduler. | 2333 | * scheduler. |
| 2310 | * | 2334 | * |
| 2335 | * @NL80211_ATTR_STA_TX_POWER_SETTING: Transmit power setting type (u8) for | ||
| 2336 | * station associated with the AP. See &enum nl80211_tx_power_setting for | ||
| 2337 | * possible values. | ||
| 2338 | * @NL80211_ATTR_STA_TX_POWER: Transmit power level (s16) in dBm units. This | ||
| 2339 | * allows to set Tx power for a station. If this attribute is not included, | ||
| 2340 | * the default per-interface tx power setting will be overriding. Driver | ||
| 2341 | * should be picking up the lowest tx power, either tx power per-interface | ||
| 2342 | * or per-station. | ||
| 2343 | * | ||
| 2311 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2344 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2312 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2345 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2313 | * @__NL80211_ATTR_AFTER_LAST: internal use | 2346 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2758,6 +2791,8 @@ enum nl80211_attrs { · 444 unmodified lines | |||
| 2758 | NL80211_ATTR_PEER_MEASUREMENTS, | 2791 | NL80211_ATTR_PEER_MEASUREMENTS, |
| 2759 | 2792 | ||
| 2760 | NL80211_ATTR_AIRTIME_WEIGHT, | 2793 | NL80211_ATTR_AIRTIME_WEIGHT, |
| 2794 | NL80211_ATTR_STA_TX_POWER_SETTING, | ||
| 2795 | NL80211_ATTR_STA_TX_POWER, | ||
| 2761 | 2796 | ||
| 2762 | /* add attributes here, update the policy in nl80211.c */ | 2797 | /* add attributes here, update the policy in nl80211.c */ |
| 2763 | 2798 | ||
| @@ -2802,7 +2837,7 @@ enum nl80211_attrs { · 38 unmodified lines | |||
| 2802 | 2837 | ||
| 2803 | #define NL80211_MAX_SUPP_RATES 32 | 2838 | #define NL80211_MAX_SUPP_RATES 32 |
| 2804 | #define NL80211_MAX_SUPP_HT_RATES 77 | 2839 | #define NL80211_MAX_SUPP_HT_RATES 77 |
| 2805 | #define NL80211_MAX_SUPP_REG_RULES 64 | 2840 | #define NL80211_MAX_SUPP_REG_RULES 128 |
| 2806 | #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0 | 2841 | #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0 |
| 2807 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 | 2842 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 |
| 2808 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 | 2843 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
| @@ -3139,6 +3174,7 @@ enum nl80211_sta_bss_param { · 330 unmodified lines | |||
| 3139 | * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames | 3174 | * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames |
| 3140 | * sent to the station (u64, usec) | 3175 | * sent to the station (u64, usec) |
| 3141 | * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16) | 3176 | * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16) |
| 3177 | * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station | ||
| 3142 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 3178 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 3143 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 3179 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
| 3144 | */ | 3180 | */ |
| @@ -3184,6 +3220,7 @@ enum nl80211_sta_info { · 39 unmodified lines | |||
| 3184 | NL80211_STA_INFO_CONNECTED_TO_GATE, | 3220 | NL80211_STA_INFO_CONNECTED_TO_GATE, |
| 3185 | NL80211_STA_INFO_TX_DURATION, | 3221 | NL80211_STA_INFO_TX_DURATION, |
| 3186 | NL80211_STA_INFO_AIRTIME_WEIGHT, | 3222 | NL80211_STA_INFO_AIRTIME_WEIGHT, |
| 3223 | NL80211_STA_INFO_AIRTIME_LINK_METRIC, | ||
| 3187 | 3224 | ||
| 3188 | /* keep last */ | 3225 | /* keep last */ |
| 3189 | __NL80211_STA_INFO_AFTER_LAST, | 3226 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -3638,6 +3675,14 @@ enum nl80211_reg_rule_attr { · 448 unmodified lines | |||
| 3638 | * value as specified by &struct nl80211_bss_select_rssi_adjust. | 3675 | * value as specified by &struct nl80211_bss_select_rssi_adjust. |
| 3639 | * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching | 3676 | * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching |
| 3640 | * (this cannot be used together with SSID). | 3677 | * (this cannot be used together with SSID). |
| 3678 | * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Nested attribute that carries the | ||
| 3679 | * band specific minimum rssi thresholds for the bands defined in | ||
| 3680 | * enum nl80211_band. The minimum rssi threshold value(s32) specific to a | ||
| 3681 | * band shall be encapsulated in attribute with type value equals to one | ||
| 3682 | * of the NL80211_BAND_* defined in enum nl80211_band. For example, the | ||
| 3683 | * minimum rssi threshold value for 2.4GHZ band shall be encapsulated | ||
| 3684 | * within an attribute of type NL80211_BAND_2GHZ. And one or more of such | ||
| 3685 | * attributes will be nested within this attribute. | ||
| 3641 | * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter | 3686 | * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter |
| 3642 | * attribute number currently defined | 3687 | * attribute number currently defined |
| 3643 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use | 3688 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use |
| @@ -3650,6 +3695,7 @@ enum nl80211_sched_scan_match_attr { · 6 unmodified lines | |||
| 3650 | NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI, | 3695 | NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI, |
| 3651 | NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST, | 3696 | NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST, |
| 3652 | NL80211_SCHED_SCAN_MATCH_ATTR_BSSID, | 3697 | NL80211_SCHED_SCAN_MATCH_ATTR_BSSID, |
| 3698 | NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI, | ||
| 3653 | 3699 | ||
| 3654 | /* keep last */ | 3700 | /* keep last */ |
| 3655 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, | 3701 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, |
| @@ -4134,6 +4180,27 @@ enum nl80211_channel_type { · 478 unmodified lines | |||
| 4134 | NL80211_CHAN_HT40PLUS | 4180 | NL80211_CHAN_HT40PLUS |
| 4135 | }; | 4181 | }; |
| 4136 | 4182 | ||
| 4183 | /** | ||
| 4184 | * enum nl80211_key_mode - Key mode | ||
| 4185 | * | ||
| 4186 | * @NL80211_KEY_RX_TX: (Default) | ||
| 4187 | * Key can be used for Rx and Tx immediately | ||
| 4188 | * | ||
| 4189 | * The following modes can only be selected for unicast keys and when the | ||
| 4190 | * driver supports @NL80211_EXT_FEATURE_EXT_KEY_ID: | ||
| 4191 | * | ||
| 4192 | * @NL80211_KEY_NO_TX: Only allowed in combination with @NL80211_CMD_NEW_KEY: | ||
| 4193 | * Unicast key can only be used for Rx, Tx not allowed, yet | ||
| 4194 | * @NL80211_KEY_SET_TX: Only allowed in combination with @NL80211_CMD_SET_KEY: | ||
| 4195 | * The unicast key identified by idx and mac is cleared for Tx and becomes | ||
| 4196 | * the preferred Tx key for the station. | ||
| 4197 | */ | ||
| 4198 | enum nl80211_key_mode { | ||
| 4199 | NL80211_KEY_RX_TX, | ||
| 4200 | NL80211_KEY_NO_TX, | ||
| 4201 | NL80211_KEY_SET_TX | ||
| 4202 | }; | ||
| 4203 | |||
| 4137 | /** | 4204 | /** |
| 4138 | * enum nl80211_chan_width - channel width definitions | 4205 | * enum nl80211_chan_width - channel width definitions |
| 4139 | * | 4206 | * |
| @@ -4377,6 +4444,9 @@ enum nl80211_key_default_types { · 237 unmodified lines | |||
| 4377 | * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags | 4444 | * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags |
| 4378 | * attributes, specifying what a key should be set as default as. | 4445 | * attributes, specifying what a key should be set as default as. |
| 4379 | * See &enum nl80211_key_default_types. | 4446 | * See &enum nl80211_key_default_types. |
| 4447 | * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode. | ||
| 4448 | * Defaults to @NL80211_KEY_RX_TX. | ||
| 4449 | * | ||
| 4380 | * @__NL80211_KEY_AFTER_LAST: internal | 4450 | * @__NL80211_KEY_AFTER_LAST: internal |
| 4381 | * @NL80211_KEY_MAX: highest key attribute | 4451 | * @NL80211_KEY_MAX: highest key attribute |
| 4382 | */ | 4452 | */ |
| @@ -4390,6 +4460,7 @@ enum nl80211_key_attributes { · 7 unmodified lines | |||
| 4390 | NL80211_KEY_DEFAULT_MGMT, | 4460 | NL80211_KEY_DEFAULT_MGMT, |
| 4391 | NL80211_KEY_TYPE, | 4461 | NL80211_KEY_TYPE, |
| 4392 | NL80211_KEY_DEFAULT_TYPES, | 4462 | NL80211_KEY_DEFAULT_TYPES, |
| 4463 | NL80211_KEY_MODE, | ||
| 4393 | 4464 | ||
| 4394 | /* keep last */ | 4465 | /* keep last */ |
| 4395 | __NL80211_KEY_AFTER_LAST, | 4466 | __NL80211_KEY_AFTER_LAST, |
| @@ -5335,6 +5406,8 @@ enum nl80211_feature_flags { · 939 unmodified lines | |||
| 5335 | * able to rekey an in-use key correctly. Userspace must not rekey PTK keys | 5406 | * able to rekey an in-use key correctly. Userspace must not rekey PTK keys |
| 5336 | * if this flag is not set. Ignoring this can leak clear text packets and/or | 5407 | * if this flag is not set. Ignoring this can leak clear text packets and/or |
| 5337 | * freeze the connection. | 5408 | * freeze the connection. |
| 5409 | * @NL80211_EXT_FEATURE_EXT_KEY_ID: Driver supports "Extended Key ID for | ||
| 5410 | * Individually Addressed Frames" from IEEE802.11-2016. | ||
| 5338 | * | 5411 | * |
| 5339 | * @NL80211_EXT_FEATURE_AIRTIME_FAIRNESS: Driver supports getting airtime | 5412 | * @NL80211_EXT_FEATURE_AIRTIME_FAIRNESS: Driver supports getting airtime |
| 5340 | * fairness for transmitted packets and has enabled airtime fairness | 5413 | * fairness for transmitted packets and has enabled airtime fairness |
| @@ -5343,6 +5416,12 @@ enum nl80211_feature_flags { · 2 unmodified lines | |||
| 5343 | * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching | 5416 | * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching |
| 5344 | * (set/del PMKSA operations) in AP mode. | 5417 | * (set/del PMKSA operations) in AP mode. |
| 5345 | * | 5418 | * |
| 5419 | * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Driver supports | ||
| 5420 | * filtering of sched scan results using band specific RSSI thresholds. | ||
| 5421 | * | ||
| 5422 | * @NL80211_EXT_FEATURE_STA_TX_PWR: This driver supports controlling tx power | ||
| 5423 | * to a station. | ||
| 5424 | * | ||
| 5346 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 5425 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 5347 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 5426 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 5348 | */ | 5427 | */ |
| @@ -5384,6 +5463,9 @@ enum nl80211_ext_feature_index { · 35 unmodified lines | |||
| 5384 | NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER, | 5463 | NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER, |
| 5385 | NL80211_EXT_FEATURE_AIRTIME_FAIRNESS, | 5464 | NL80211_EXT_FEATURE_AIRTIME_FAIRNESS, |
| 5386 | NL80211_EXT_FEATURE_AP_PMKSA_CACHING, | 5465 | NL80211_EXT_FEATURE_AP_PMKSA_CACHING, |
| 5466 | NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD, | ||
| 5467 | NL80211_EXT_FEATURE_EXT_KEY_ID, | ||
| 5468 | NL80211_EXT_FEATURE_STA_TX_PWR, | ||
| 5387 | 5469 | ||
| 5388 | /* add new features before the definition below */ | 5470 | /* add new features before the definition below */ |
| 5389 | NUM_NL80211_EXT_FEATURES, | 5471 | NUM_NL80211_EXT_FEATURES, |
| @@ -364,6 +364,7 @@ enum ovs_tunnel_key_attr { · 363 unmodified lines | |||
| 364 | OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ | 364 | OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ |
| 365 | OVS_TUNNEL_KEY_ATTR_PAD, | 365 | OVS_TUNNEL_KEY_ATTR_PAD, |
| 366 | OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */ | 366 | OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */ |
| 367 | OVS_TUNNEL_KEY_ATTR_IPV4_INFO_BRIDGE, /* No argument. IPV4_INFO_BRIDGE mode.*/ | ||
| 367 | __OVS_TUNNEL_KEY_ATTR_MAX | 368 | __OVS_TUNNEL_KEY_ATTR_MAX |
| 368 | }; | 369 | }; |
| 369 | 370 | ||
| @@ -734,6 +735,7 @@ struct ovs_action_hash { · 364 unmodified lines | |||
| 734 | * be received on NFNLGRP_CONNTRACK_NEW and NFNLGRP_CONNTRACK_DESTROY groups, | 735 | * be received on NFNLGRP_CONNTRACK_NEW and NFNLGRP_CONNTRACK_DESTROY groups, |
| 735 | * respectively. Remaining bits control the changes for which an event is | 736 | * respectively. Remaining bits control the changes for which an event is |
| 736 | * delivered on the NFNLGRP_CONNTRACK_UPDATE group. | 737 | * delivered on the NFNLGRP_CONNTRACK_UPDATE group. |
| 738 | * @OVS_CT_ATTR_TIMEOUT: Variable length string defining conntrack timeout. | ||
| 737 | */ | 739 | */ |
| 738 | enum ovs_ct_attr { | 740 | enum ovs_ct_attr { |
| 739 | OVS_CT_ATTR_UNSPEC, | 741 | OVS_CT_ATTR_UNSPEC, |
| @@ -746,6 +748,8 @@ enum ovs_ct_attr { · 6 unmodified lines | |||
| 746 | OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */ | 748 | OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */ |
| 747 | OVS_CT_ATTR_FORCE_COMMIT, /* No argument */ | 749 | OVS_CT_ATTR_FORCE_COMMIT, /* No argument */ |
| 748 | OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */ | 750 | OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */ |
| 751 | OVS_CT_ATTR_TIMEOUT, /* Associate timeout with this connection for | ||
| 752 | * fine-grain timeout tuning. */ | ||
| 749 | __OVS_CT_ATTR_MAX | 753 | __OVS_CT_ATTR_MAX |
| 750 | }; | 754 | }; |
| 751 | 755 | ||
| @@ -798,6 +802,44 @@ struct ovs_action_push_eth { · 46 unmodified lines | |||
| 798 | struct ovs_key_ethernet addresses; | 802 | struct ovs_key_ethernet addresses; |
| 799 | }; | 803 | }; |
| 800 | 804 | ||
| 805 | /* | ||
| 806 | * enum ovs_check_pkt_len_attr - Attributes for %OVS_ACTION_ATTR_CHECK_PKT_LEN. | ||
| 807 | * | ||
| 808 | * @OVS_CHECK_PKT_LEN_ATTR_PKT_LEN: u16 Packet length to check for. | ||
| 809 | * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER: Nested OVS_ACTION_ATTR_* | ||
| 810 | * actions to apply if the packer length is greater than the specified | ||
| 811 | * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN. | ||
| 812 | * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL - Nested OVS_ACTION_ATTR_* | ||
| 813 | * actions to apply if the packer length is lesser or equal to the specified | ||
| 814 | * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN. | ||
| 815 | */ | ||
| 816 | enum ovs_check_pkt_len_attr { | ||
| 817 | OVS_CHECK_PKT_LEN_ATTR_UNSPEC, | ||
| 818 | OVS_CHECK_PKT_LEN_ATTR_PKT_LEN, | ||
| 819 | OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER, | ||
| 820 | OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL, | ||
| 821 | __OVS_CHECK_PKT_LEN_ATTR_MAX, | ||
| 822 | |||
| 823 | #ifdef __KERNEL__ | ||
| 824 | OVS_CHECK_PKT_LEN_ATTR_ARG /* struct check_pkt_len_arg */ | ||
| 825 | #endif | ||
| 826 | }; | ||
| 827 | |||
| 828 | #define OVS_CHECK_PKT_LEN_ATTR_MAX (__OVS_CHECK_PKT_LEN_ATTR_MAX - 1) | ||
| 829 | |||
| 830 | #ifdef __KERNEL__ | ||
| 831 | struct check_pkt_len_arg { | ||
| 832 | u16 pkt_len; /* Same value as OVS_CHECK_PKT_LEN_ATTR_PKT_LEN'. */ | ||
| 833 | bool exec_for_greater; /* When true, actions in IF_GREATER will | ||
| 834 | * not change flow keys. False otherwise. | ||
| 835 | */ | ||
| 836 | bool exec_for_lesser_equal; /* When true, actions in IF_LESS_EQUAL | ||
| 837 | * will not change flow keys. False | ||
| 838 | * otherwise. | ||
| 839 | */ | ||
| 840 | }; | ||
| 841 | #endif | ||
| 842 | |||
| 801 | /** | 843 | /** |
| 802 | * enum ovs_action_attr - Action types. | 844 | * enum ovs_action_attr - Action types. |
| 803 | * | 845 | * |
| @@ -842,6 +884,9 @@ struct ovs_action_push_eth { · 38 unmodified lines | |||
| 842 | * packet, or modify the packet (e.g., change the DSCP field). | 884 | * packet, or modify the packet (e.g., change the DSCP field). |
| 843 | * @OVS_ACTION_ATTR_CLONE: make a copy of the packet and execute a list of | 885 | * @OVS_ACTION_ATTR_CLONE: make a copy of the packet and execute a list of |
| 844 | * actions without affecting the original packet and key. | 886 | * actions without affecting the original packet and key. |
| 887 | * @OVS_ACTION_ATTR_CHECK_PKT_LEN: Check the packet length and execute a set | ||
| 888 | * of actions if greater than the specified packet length, else execute | ||
| 889 | * another set of actions. | ||
| 845 | * | 890 | * |
| 846 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all | 891 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all |
| 847 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment | 892 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment |
| @@ -876,6 +921,7 @@ enum ovs_action_attr { · 28 unmodified lines | |||
| 876 | OVS_ACTION_ATTR_POP_NSH, /* No argument. */ | 921 | OVS_ACTION_ATTR_POP_NSH, /* No argument. */ |
| 877 | OVS_ACTION_ATTR_METER, /* u32 meter ID. */ | 922 | OVS_ACTION_ATTR_METER, /* u32 meter ID. */ |
| 878 | OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */ | 923 | OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */ |
| 924 | OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */ | ||
| 879 | 925 | ||
| 880 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted | 926 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted |
| 881 | * from userspace. */ | 927 | * from userspace. */ |
| @@ -1,7 +1,5 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | /* | 2 | /* |
| 3 | * pci_regs.h | ||
| 4 | * | ||
| 5 | * PCI standard defines | 3 | * PCI standard defines |
| 6 | * Copyright 1994, Drew Eckhardt | 4 | * Copyright 1994, Drew Eckhardt |
| 7 | * Copyright 1997--1999 Martin Mares <mj@ucw.cz> | 5 | * Copyright 1997--1999 Martin Mares <mj@ucw.cz> |
| @@ -15,7 +13,7 @@ · 7 unmodified lines | |||
| 15 | * PCI System Design Guide | 13 | * PCI System Design Guide |
| 16 | * | 14 | * |
| 17 | * For HyperTransport information, please consult the following manuals | 15 | * For HyperTransport information, please consult the following manuals |
| 18 | * from http://www.hypertransport.org | 16 | * from http://www.hypertransport.org : |
| 19 | * | 17 | * |
| 20 | * The HyperTransport I/O Link Specification | 18 | * The HyperTransport I/O Link Specification |
| 21 | */ | 19 | */ |
| @@ -301,7 +299,7 @@ · 279 unmodified lines | |||
| 301 | #define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */ | 299 | #define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */ |
| 302 | #define PCI_SID_CHASSIS_NR 3 /* Chassis Number */ | 300 | #define PCI_SID_CHASSIS_NR 3 /* Chassis Number */ |
| 303 | 301 | ||
| 304 | /* Message Signalled Interrupts registers */ | 302 | /* Message Signalled Interrupt registers */ |
| 305 | 303 | ||
| 306 | #define PCI_MSI_FLAGS 2 /* Message Control */ | 304 | #define PCI_MSI_FLAGS 2 /* Message Control */ |
| 307 | #define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */ | 305 | #define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */ |
| @@ -319,7 +317,7 @@ · 11 unmodified lines | |||
| 319 | #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ | 317 | #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ |
| 320 | #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ | 318 | #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ |
| 321 | 319 | ||
| 322 | /* MSI-X registers */ | 320 | /* MSI-X registers (in MSI-X capability) */ |
| 323 | #define PCI_MSIX_FLAGS 2 /* Message Control */ | 321 | #define PCI_MSIX_FLAGS 2 /* Message Control */ |
| 324 | #define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */ | 322 | #define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */ |
| 325 | #define PCI_MSIX_FLAGS_MASKALL 0x4000 /* Mask all vectors for this function */ | 323 | #define PCI_MSIX_FLAGS_MASKALL 0x4000 /* Mask all vectors for this function */ |
| @@ -333,13 +331,13 @@ · 7 unmodified lines | |||
| 333 | #define PCI_MSIX_FLAGS_BIRMASK PCI_MSIX_PBA_BIR /* deprecated */ | 331 | #define PCI_MSIX_FLAGS_BIRMASK PCI_MSIX_PBA_BIR /* deprecated */ |
| 334 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ | 332 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ |
| 335 | 333 | ||
| 336 | /* MSI-X Table entry format */ | 334 | /* MSI-X Table entry format (in memory mapped by a BAR) */ |
| 337 | #define PCI_MSIX_ENTRY_SIZE 16 | 335 | #define PCI_MSIX_ENTRY_SIZE 16 |
| 338 | #define PCI_MSIX_ENTRY_LOWER_ADDR 0 | 336 | #define PCI_MSIX_ENTRY_LOWER_ADDR 0 /* Message Address */ |
| 339 | #define PCI_MSIX_ENTRY_UPPER_ADDR 4 | 337 | #define PCI_MSIX_ENTRY_UPPER_ADDR 4 /* Message Upper Address */ |
| 340 | #define PCI_MSIX_ENTRY_DATA 8 | 338 | #define PCI_MSIX_ENTRY_DATA 8 /* Message Data */ |
| 341 | #define PCI_MSIX_ENTRY_VECTOR_CTRL 12 | 339 | #define PCI_MSIX_ENTRY_VECTOR_CTRL 12 /* Vector Control */ |
| 342 | #define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 | 340 | #define PCI_MSIX_ENTRY_CTRL_MASKBIT 0x00000001 |
| 343 | 341 | ||
| 344 | /* CompactPCI Hotswap Register */ | 342 | /* CompactPCI Hotswap Register */ |
| 345 | 343 | ||
| @@ -372,6 +370,12 @@ · 26 unmodified lines | |||
| 372 | #define PCI_EA_FIRST_ENT_BRIDGE 8 /* First EA Entry for Bridges */ | 370 | #define PCI_EA_FIRST_ENT_BRIDGE 8 /* First EA Entry for Bridges */ |
| 373 | #define PCI_EA_ES 0x00000007 /* Entry Size */ | 371 | #define PCI_EA_ES 0x00000007 /* Entry Size */ |
| 374 | #define PCI_EA_BEI 0x000000f0 /* BAR Equivalent Indicator */ | 372 | #define PCI_EA_BEI 0x000000f0 /* BAR Equivalent Indicator */ |
| 373 | |||
| 374 | /* EA fixed Secondary and Subordinate bus numbers for Bridge */ | ||
| 375 | #define PCI_EA_SEC_BUS_MASK 0xff | ||
| 376 | #define PCI_EA_SUB_BUS_MASK 0xff00 | ||
| 377 | #define PCI_EA_SUB_BUS_SHIFT 8 | ||
| 378 | |||
| 375 | /* 0-5 map to BARs 0-5 respectively */ | 379 | /* 0-5 map to BARs 0-5 respectively */ |
| 376 | #define PCI_EA_BEI_BAR0 0 | 380 | #define PCI_EA_BEI_BAR0 0 |
| 377 | #define PCI_EA_BEI_BAR5 5 | 381 | #define PCI_EA_BEI_BAR5 5 |
| @@ -465,19 +469,19 @@ · 87 unmodified lines | |||
| 465 | /* PCI Express capability registers */ | 469 | /* PCI Express capability registers */ |
| 466 | 470 | ||
| 467 | #define PCI_EXP_FLAGS 2 /* Capabilities register */ | 471 | #define PCI_EXP_FLAGS 2 /* Capabilities register */ |
| 468 | #define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ | 472 | #define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ |
| 469 | #define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ | 473 | #define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ |
| 470 | #define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ | 474 | #define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ |
| 471 | #define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ | 475 | #define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ |
| 472 | #define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ | 476 | #define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ |
| 473 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ | 477 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ |
| 474 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 478 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
| 475 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCIe to PCI/PCI-X Bridge */ | 479 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCIe to PCI/PCI-X Bridge */ |
| 476 | #define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIe Bridge */ | 480 | #define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIe Bridge */ |
| 477 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | 481 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
| 478 | #define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ | 482 | #define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ |
| 479 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 483 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
| 480 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 484 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
| 481 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 485 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
| 482 | #define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */ | 486 | #define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */ |
| 483 | #define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */ | 487 | #define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */ |
| @@ -616,8 +620,8 @@ · 132 unmodified lines | |||
| 616 | #define PCI_EXP_RTCAP 30 /* Root Capabilities */ | 620 | #define PCI_EXP_RTCAP 30 /* Root Capabilities */ |
| 617 | #define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */ | 621 | #define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */ |
| 618 | #define PCI_EXP_RTSTA 32 /* Root Status */ | 622 | #define PCI_EXP_RTSTA 32 /* Root Status */ |
| 619 | #define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ | 623 | #define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ |
| 620 | #define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ | 624 | #define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ |
| 621 | /* | 625 | /* |
| 622 | * The Device Capabilities 2, Device Status 2, Device Control 2, | 626 | * The Device Capabilities 2, Device Status 2, Device Control 2, |
| 623 | * Link Capabilities 2, Link Status 2, Link Control 2, | 627 | * Link Capabilities 2, Link Status 2, Link Control 2, |
| @@ -637,13 +641,13 @@ · 13 unmodified lines | |||
| 637 | #define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000 /* OBFF support mechanism */ | 641 | #define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000 /* OBFF support mechanism */ |
| 638 | #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */ | 642 | #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */ |
| 639 | #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */ | 643 | #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */ |
| 640 | #define PCI_EXP_DEVCAP2_EE_PREFIX 0x00200000 /* End-End TLP Prefix */ | 644 | #define PCI_EXP_DEVCAP2_EE_PREFIX 0x00200000 /* End-End TLP Prefix */ |
| 641 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ | 645 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ |
| 642 | #define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */ | 646 | #define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */ |
| 643 | #define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS 0x0010 /* Completion Timeout Disable */ | 647 | #define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS 0x0010 /* Completion Timeout Disable */ |
| 644 | #define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */ | 648 | #define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */ |
| 645 | #define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */ | 649 | #define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */ |
| 646 | #define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK 0x0080 /* Block atomic egress */ | 650 | #define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK 0x0080 /* Block atomic egress */ |
| 647 | #define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ | 651 | #define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ |
| 648 | #define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ | 652 | #define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ |
| 649 | #define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */ | 653 | #define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */ |
| @@ -659,11 +663,11 @@ · 9 unmodified lines | |||
| 659 | #define PCI_EXP_LNKCAP2_SLS_16_0GB 0x00000010 /* Supported Speed 16GT/s */ | 663 | #define PCI_EXP_LNKCAP2_SLS_16_0GB 0x00000010 /* Supported Speed 16GT/s */ |
| 660 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ | 664 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ |
| 661 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | 665 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ |
| 662 | #define PCI_EXP_LNKCTL2_TLS 0x000f | 666 | #define PCI_EXP_LNKCTL2_TLS 0x000f |
| 663 | #define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */ | 667 | #define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */ |
| 664 | #define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */ | 668 | #define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */ |
| 665 | #define PCI_EXP_LNKCTL2_TLS_8_0GT 0x0003 /* Supported Speed 8GT/s */ | 669 | #define PCI_EXP_LNKCTL2_TLS_8_0GT 0x0003 /* Supported Speed 8GT/s */ |
| 666 | #define PCI_EXP_LNKCTL2_TLS_16_0GT 0x0004 /* Supported Speed 16GT/s */ | 670 | #define PCI_EXP_LNKCTL2_TLS_16_0GT 0x0004 /* Supported Speed 16GT/s */ |
| 667 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ | 671 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ |
| 668 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */ | 672 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */ |
| 669 | #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ | 673 | #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ |
| @@ -752,18 +756,18 @@ · 82 unmodified lines | |||
| 752 | #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ | 756 | #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ |
| 753 | #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ | 757 | #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ |
| 754 | #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ | 758 | #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ |
| 755 | #define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */ | 759 | #define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */ |
| 756 | #define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */ | 760 | #define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */ |
| 757 | #define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */ | 761 | #define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */ |
| 758 | #define PCI_ERR_ROOT_STATUS 48 | 762 | #define PCI_ERR_ROOT_STATUS 48 |
| 759 | #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ | 763 | #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ |
| 760 | #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */ | 764 | #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */ |
| 761 | #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */ | 765 | #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */ |
| 762 | #define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 /* Multiple FATAL/NONFATAL */ | 766 | #define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 /* Multiple FATAL/NONFATAL */ |
| 763 | #define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First UNC is Fatal */ | 767 | #define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First UNC is Fatal */ |
| 764 | #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ | 768 | #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ |
| 765 | #define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ | 769 | #define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ |
| 766 | #define PCI_ERR_ROOT_AER_IRQ 0xf8000000 /* Advanced Error Interrupt Message Number */ | 770 | #define PCI_ERR_ROOT_AER_IRQ 0xf8000000 /* Advanced Error Interrupt Message Number */ |
| 767 | #define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */ | 771 | #define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */ |
| 768 | 772 | ||
| 769 | /* Virtual Channel */ | 773 | /* Virtual Channel */ |
| @@ -875,12 +879,12 @@ · 105 unmodified lines | |||
| 875 | 879 | ||
| 876 | /* Page Request Interface */ | 880 | /* Page Request Interface */ |
| 877 | #define PCI_PRI_CTRL 0x04 /* PRI control register */ | 881 | #define PCI_PRI_CTRL 0x04 /* PRI control register */ |
| 878 | #define PCI_PRI_CTRL_ENABLE 0x01 /* Enable */ | 882 | #define PCI_PRI_CTRL_ENABLE 0x0001 /* Enable */ |
| 879 | #define PCI_PRI_CTRL_RESET 0x02 /* Reset */ | 883 | #define PCI_PRI_CTRL_RESET 0x0002 /* Reset */ |
| 880 | #define PCI_PRI_STATUS 0x06 /* PRI status register */ | 884 | #define PCI_PRI_STATUS 0x06 /* PRI status register */ |
| 881 | #define PCI_PRI_STATUS_RF 0x001 /* Response Failure */ | 885 | #define PCI_PRI_STATUS_RF 0x0001 /* Response Failure */ |
| 882 | #define PCI_PRI_STATUS_UPRGI 0x002 /* Unexpected PRG index */ | 886 | #define PCI_PRI_STATUS_UPRGI 0x0002 /* Unexpected PRG index */ |
| 883 | #define PCI_PRI_STATUS_STOPPED 0x100 /* PRI Stopped */ | 887 | #define PCI_PRI_STATUS_STOPPED 0x0100 /* PRI Stopped */ |
| 884 | #define PCI_PRI_STATUS_PASID 0x8000 /* PRG Response PASID Required */ | 888 | #define PCI_PRI_STATUS_PASID 0x8000 /* PRG Response PASID Required */ |
| 885 | #define PCI_PRI_MAX_REQ 0x08 /* PRI max reqs supported */ | 889 | #define PCI_PRI_MAX_REQ 0x08 /* PRI max reqs supported */ |
| 886 | #define PCI_PRI_ALLOC_REQ 0x0c /* PRI max reqs allowed */ | 890 | #define PCI_PRI_ALLOC_REQ 0x0c /* PRI max reqs allowed */ |
| @@ -898,16 +902,16 @@ · 11 unmodified lines | |||
| 898 | 902 | ||
| 899 | /* Single Root I/O Virtualization */ | 903 | /* Single Root I/O Virtualization */ |
| 900 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ | 904 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ |
| 901 | #define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ | 905 | #define PCI_SRIOV_CAP_VFM 0x00000001 /* VF Migration Capable */ |
| 902 | #define PCI_SRIOV_CAP_INTR(x) ((x) >> 21) /* Interrupt Message Number */ | 906 | #define PCI_SRIOV_CAP_INTR(x) ((x) >> 21) /* Interrupt Message Number */ |
| 903 | #define PCI_SRIOV_CTRL 0x08 /* SR-IOV Control */ | 907 | #define PCI_SRIOV_CTRL 0x08 /* SR-IOV Control */ |
| 904 | #define PCI_SRIOV_CTRL_VFE 0x01 /* VF Enable */ | 908 | #define PCI_SRIOV_CTRL_VFE 0x0001 /* VF Enable */ |
| 905 | #define PCI_SRIOV_CTRL_VFM 0x02 /* VF Migration Enable */ | 909 | #define PCI_SRIOV_CTRL_VFM 0x0002 /* VF Migration Enable */ |
| 906 | #define PCI_SRIOV_CTRL_INTR 0x04 /* VF Migration Interrupt Enable */ | 910 | #define PCI_SRIOV_CTRL_INTR 0x0004 /* VF Migration Interrupt Enable */ |
| 907 | #define PCI_SRIOV_CTRL_MSE 0x08 /* VF Memory Space Enable */ | 911 | #define PCI_SRIOV_CTRL_MSE 0x0008 /* VF Memory Space Enable */ |
| 908 | #define PCI_SRIOV_CTRL_ARI 0x10 /* ARI Capable Hierarchy */ | 912 | #define PCI_SRIOV_CTRL_ARI 0x0010 /* ARI Capable Hierarchy */ |
| 909 | #define PCI_SRIOV_STATUS 0x0a /* SR-IOV Status */ | 913 | #define PCI_SRIOV_STATUS 0x0a /* SR-IOV Status */ |
| 910 | #define PCI_SRIOV_STATUS_VFM 0x01 /* VF Migration Status */ | 914 | #define PCI_SRIOV_STATUS_VFM 0x0001 /* VF Migration Status */ |
| 911 | #define PCI_SRIOV_INITIAL_VF 0x0c /* Initial VFs */ | 915 | #define PCI_SRIOV_INITIAL_VF 0x0c /* Initial VFs */ |
| 912 | #define PCI_SRIOV_TOTAL_VF 0x0e /* Total VFs */ | 916 | #define PCI_SRIOV_TOTAL_VF 0x0e /* Total VFs */ |
| 913 | #define PCI_SRIOV_NUM_VF 0x10 /* Number of VFs */ | 917 | #define PCI_SRIOV_NUM_VF 0x10 /* Number of VFs */ |
| @@ -937,13 +941,13 @@ · 23 unmodified lines | |||
| 937 | 941 | ||
| 938 | /* Access Control Service */ | 942 | /* Access Control Service */ |
| 939 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ | 943 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ |
| 940 | #define PCI_ACS_SV 0x01 /* Source Validation */ | 944 | #define PCI_ACS_SV 0x0001 /* Source Validation */ |
| 941 | #define PCI_ACS_TB 0x02 /* Translation Blocking */ | 945 | #define PCI_ACS_TB 0x0002 /* Translation Blocking */ |
| 942 | #define PCI_ACS_RR 0x04 /* P2P Request Redirect */ | 946 | #define PCI_ACS_RR 0x0004 /* P2P Request Redirect */ |
| 943 | #define PCI_ACS_CR 0x08 /* P2P Completion Redirect */ | 947 | #define PCI_ACS_CR 0x0008 /* P2P Completion Redirect */ |
| 944 | #define PCI_ACS_UF 0x10 /* Upstream Forwarding */ | 948 | #define PCI_ACS_UF 0x0010 /* Upstream Forwarding */ |
| 945 | #define PCI_ACS_EC 0x20 /* P2P Egress Control */ | 949 | #define PCI_ACS_EC 0x0020 /* P2P Egress Control */ |
| 946 | #define PCI_ACS_DT 0x40 /* Direct Translated P2P */ | 950 | #define PCI_ACS_DT 0x0040 /* Direct Translated P2P */ |
| 947 | #define PCI_ACS_EGRESS_BITS 0x05 /* ACS Egress Control Vector Size */ | 951 | #define PCI_ACS_EGRESS_BITS 0x05 /* ACS Egress Control Vector Size */ |
| 948 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ | 952 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ |
| 949 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ | 953 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ |
| @@ -993,9 +997,9 @@ · 43 unmodified lines | |||
| 993 | #define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */ | 997 | #define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */ |
| 994 | 998 | ||
| 995 | #define PCI_EXP_DPC_CTL 6 /* DPC control */ | 999 | #define PCI_EXP_DPC_CTL 6 /* DPC control */ |
| 996 | #define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */ | 1000 | #define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */ |
| 997 | #define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */ | 1001 | #define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */ |
| 998 | #define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */ | 1002 | #define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */ |
| 999 | 1003 | ||
| 1000 | #define PCI_EXP_DPC_STATUS 8 /* DPC Status */ | 1004 | #define PCI_EXP_DPC_STATUS 8 /* DPC Status */ |
| 1001 | #define PCI_EXP_DPC_STATUS_TRIGGER 0x0001 /* Trigger Status */ | 1005 | #define PCI_EXP_DPC_STATUS_TRIGGER 0x0001 /* Trigger Status */ |
| @@ -1148,6 +1148,16 @@ enum { · 1147 unmodified lines | |||
| 1148 | 1148 | ||
| 1149 | #define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1) | 1149 | #define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1) |
| 1150 | 1150 | ||
| 1151 | /* The format for the admin sched (dump only): | ||
| 1152 | * [TCA_TAPRIO_SCHED_ADMIN_SCHED] | ||
| 1153 | * [TCA_TAPRIO_ATTR_SCHED_BASE_TIME] | ||
| 1154 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST] | ||
| 1155 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY] | ||
| 1156 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY_CMD] | ||
| 1157 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY_GATES] | ||
| 1158 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL] | ||
| 1159 | */ | ||
| 1160 | |||
| 1151 | enum { | 1161 | enum { |
| 1152 | TCA_TAPRIO_ATTR_UNSPEC, | 1162 | TCA_TAPRIO_ATTR_UNSPEC, |
| 1153 | TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */ | 1163 | TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */ |
| @@ -1156,6 +1166,9 @@ enum { · 2 unmodified lines | |||
| 1156 | TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */ | 1166 | TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */ |
| 1157 | TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ | 1167 | TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ |
| 1158 | TCA_TAPRIO_PAD, | 1168 | TCA_TAPRIO_PAD, |
| 1169 | TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */ | ||
| 1170 | TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */ | ||
| 1171 | TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */ | ||
| 1159 | __TCA_TAPRIO_ATTR_MAX, | 1172 | __TCA_TAPRIO_ATTR_MAX, |
| 1160 | }; | 1173 | }; |
| 1161 | 1174 | ||
| @@ -49,8 +49,11 @@ · 48 unmodified lines | |||
| 49 | 49 | ||
| 50 | #define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10) | 50 | #define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10) |
| 51 | #define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14) | 51 | #define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14) |
| 52 | #define PSCI_1_0_FN_SET_SUSPEND_MODE PSCI_0_2_FN(15) | ||
| 53 | #define PSCI_1_1_FN_SYSTEM_RESET2 PSCI_0_2_FN(18) | ||
| 52 | 54 | ||
| 53 | #define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) | 55 | #define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) |
| 56 | #define PSCI_1_1_FN64_SYSTEM_RESET2 PSCI_0_2_FN64(18) | ||
| 54 | 57 | ||
| 55 | /* PSCI v0.2 power state encoding for CPU_SUSPEND function */ | 58 | /* PSCI v0.2 power state encoding for CPU_SUSPEND function */ |
| 56 | #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff | 59 | #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff |
| @@ -97,6 +100,10 @@ · 40 unmodified lines | |||
| 97 | #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ | 100 | #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ |
| 98 | (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) | 101 | (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) |
| 99 | 102 | ||
| 103 | #define PSCI_1_0_OS_INITIATED BIT(0) | ||
| 104 | #define PSCI_1_0_SUSPEND_MODE_PC 0 | ||
| 105 | #define PSCI_1_0_SUSPEND_MODE_OSI 1 | ||
| 106 | |||
| 100 | /* PSCI return values (inclusive of all PSCI versions) */ | 107 | /* PSCI return values (inclusive of all PSCI versions) */ |
| 101 | #define PSCI_RET_SUCCESS 0 | 108 | #define PSCI_RET_SUCCESS 0 |
| 102 | #define PSCI_RET_NOT_SUPPORTED -1 | 109 | #define PSCI_RET_NOT_SUPPORTED -1 |
| @@ -6,8 +6,7 @@ · 5 unmodified lines | |||
| 6 | * | 6 | * |
| 7 | * Author: Brijesh Singh <brijesh.singh@amd.com> | 7 | * Author: Brijesh Singh <brijesh.singh@amd.com> |
| 8 | * | 8 | * |
| 9 | * SEV spec 0.14 is available at: | 9 | * SEV API specification is available at: https://developer.amd.com/sev/ |
| 10 | * http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf | ||
| 11 | * | 10 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
| @@ -30,7 +29,8 @@ enum { · 16 unmodified lines | |||
| 30 | SEV_PDH_GEN, | 29 | SEV_PDH_GEN, |
| 31 | SEV_PDH_CERT_EXPORT, | 30 | SEV_PDH_CERT_EXPORT, |
| 32 | SEV_PEK_CERT_IMPORT, | 31 | SEV_PEK_CERT_IMPORT, |
| 33 | SEV_GET_ID, | 32 | SEV_GET_ID, /* This command is deprecated, use SEV_GET_ID2 */ |
| 33 | SEV_GET_ID2, | ||
| 34 | 34 | ||
| 35 | SEV_MAX, | 35 | SEV_MAX, |
| 36 | }; | 36 | }; |
| @@ -125,7 +125,7 @@ struct sev_user_data_pdh_cert_export { · 88 unmodified lines | |||
| 125 | } __packed; | 125 | } __packed; |
| 126 | 126 | ||
| 127 | /** | 127 | /** |
| 128 | * struct sev_user_data_get_id - GET_ID command parameters | 128 | * struct sev_user_data_get_id - GET_ID command parameters (deprecated) |
| 129 | * | 129 | * |
| 130 | * @socket1: Buffer to pass unique ID of first socket | 130 | * @socket1: Buffer to pass unique ID of first socket |
| 131 | * @socket2: Buffer to pass unique ID of second socket | 131 | * @socket2: Buffer to pass unique ID of second socket |
| @@ -135,6 +135,16 @@ struct sev_user_data_get_id { · 3 unmodified lines | |||
| 135 | __u8 socket2[64]; /* Out */ | 135 | __u8 socket2[64]; /* Out */ |
| 136 | } __packed; | 136 | } __packed; |
| 137 | 137 | ||
| 138 | /** | ||
| 139 | * struct sev_user_data_get_id2 - GET_ID command parameters | ||
| 140 | * @address: Buffer to store unique ID | ||
| 141 | * @length: length of the unique ID | ||
| 142 | */ | ||
| 143 | struct sev_user_data_get_id2 { | ||
| 144 | __u64 address; /* In */ | ||
| 145 | __u32 length; /* In/Out */ | ||
| 146 | } __packed; | ||
| 147 | |||
| 138 | /** | 148 | /** |
| 139 | * struct sev_issue_cmd - SEV ioctl parameters | 149 | * struct sev_issue_cmd - SEV ioctl parameters |
| 140 | * | 150 | * |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | |||
| 10 | #define CLONE_FS 0x00000200 /* set if fs info shared between processes */ | 10 | #define CLONE_FS 0x00000200 /* set if fs info shared between processes */ |
| 11 | #define CLONE_FILES 0x00000400 /* set if open files shared between processes */ | 11 | #define CLONE_FILES 0x00000400 /* set if open files shared between processes */ |
| 12 | #define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ | 12 | #define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ |
| 13 | #define CLONE_PIDFD 0x00001000 /* set if a pidfd should be placed in parent */ | ||
| 13 | #define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ | 14 | #define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ |
| 14 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ | 15 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ |
| 15 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ | 16 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ |
| @@ -5,15 +5,6 @@ · 4 unmodified lines | |||
| 5 | * Authors: | 5 | * Authors: |
| 6 | * Rafael Antognolli <rafael.antognolli@intel.com> | 6 | * Rafael Antognolli <rafael.antognolli@intel.com> |
| 7 | * Scott Bauer <scott.bauer@intel.com> | 7 | * Scott Bauer <scott.bauer@intel.com> |
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify it | ||
| 10 | * under the terms and conditions of the GNU General Public License, | ||
| 11 | * version 2, as published by the Free Software Foundation. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 16 | * more details. | ||
| 17 | */ | 8 | */ |
| 18 | 9 | ||
| 19 | #ifndef _UAPI_SED_OPAL_H | 10 | #ifndef _UAPI_SED_OPAL_H |
| @@ -58,7 +49,7 @@ struct opal_key { · 38 unmodified lines | |||
| 58 | struct opal_lr_act { | 49 | struct opal_lr_act { |
| 59 | struct opal_key key; | 50 | struct opal_key key; |
| 60 | __u32 sum; | 51 | __u32 sum; |
| 61 | __u8 num_lrs; | 52 | __u8 num_lrs; |
| 62 | __u8 lr[OPAL_MAX_LRS]; | 53 | __u8 lr[OPAL_MAX_LRS]; |
| 63 | __u8 align[2]; /* Align to 8 byte boundary */ | 54 | __u8 align[2]; /* Align to 8 byte boundary */ |
| 64 | }; | 55 | }; |
| @@ -287,4 +287,10 @@ · 286 unmodified lines | |||
| 287 | /* RDA UART */ | 287 | /* RDA UART */ |
| 288 | #define PORT_RDA 118 | 288 | #define PORT_RDA 118 |
| 289 | 289 | ||
| 290 | /* Socionext Milbeaut UART */ | ||
| 291 | #define PORT_MLB_USIO 119 | ||
| 292 | |||
| 293 | /* SiFive UART */ | ||
| 294 | #define PORT_SIFIVE_V0 120 | ||
| 295 | |||
| 290 | #endif /* _UAPILINUX_SERIAL_CORE_H */ | 296 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |
| @@ -19,6 +19,7 @@ · 18 unmodified lines | |||
| 19 | #ifndef _LINUX_SOCKIOS_H | 19 | #ifndef _LINUX_SOCKIOS_H |
| 20 | #define _LINUX_SOCKIOS_H | 20 | #define _LINUX_SOCKIOS_H |
| 21 | 21 | ||
| 22 | #include <asm/bitsperlong.h> | ||
| 22 | #include <asm/sockios.h> | 23 | #include <asm/sockios.h> |
| 23 | 24 | ||
| 24 | /* Linux-specific socket ioctls */ | 25 | /* Linux-specific socket ioctls */ |
| @@ -27,6 +28,26 @@ · 2 unmodified lines | |||
| 27 | 28 | ||
| 28 | #define SOCK_IOC_TYPE 0x89 | 29 | #define SOCK_IOC_TYPE 0x89 |
| 29 | 30 | ||
| 31 | /* | ||
| 32 | * the timeval/timespec data structure layout is defined by libc, | ||
| 33 | * so we need to cover both possible versions on 32-bit. | ||
| 34 | */ | ||
| 35 | /* Get stamp (timeval) */ | ||
| 36 | #define SIOCGSTAMP_NEW _IOR(SOCK_IOC_TYPE, 0x06, long long[2]) | ||
| 37 | /* Get stamp (timespec) */ | ||
| 38 | #define SIOCGSTAMPNS_NEW _IOR(SOCK_IOC_TYPE, 0x07, long long[2]) | ||
| 39 | |||
| 40 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) | ||
| 41 | /* on 64-bit and x32, avoid the ?: operator */ | ||
| 42 | #define SIOCGSTAMP SIOCGSTAMP_OLD | ||
| 43 | #define SIOCGSTAMPNS SIOCGSTAMPNS_OLD | ||
| 44 | #else | ||
| 45 | #define SIOCGSTAMP ((sizeof(struct timeval)) == 8 ? \ | ||
| 46 | SIOCGSTAMP_OLD : SIOCGSTAMP_NEW) | ||
| 47 | #define SIOCGSTAMPNS ((sizeof(struct timespec)) == 8 ? \ | ||
| 48 | SIOCGSTAMPNS_OLD : SIOCGSTAMPNS_NEW) | ||
| 49 | #endif | ||
| 50 | |||
| 30 | /* Routing table calls. */ | 51 | /* Routing table calls. */ |
| 31 | #define SIOCADDRT 0x890B /* add routing table entry */ | 52 | #define SIOCADDRT 0x890B /* add routing table entry */ |
| 32 | #define SIOCDELRT 0x890C /* delete routing table entry */ | 53 | #define SIOCDELRT 0x890C /* delete routing table entry */ |
| @@ -66,6 +66,9 @@ · 65 unmodified lines | |||
| 66 | * @delay_usecs: If nonzero, how long to delay after the last bit transfer | 66 | * @delay_usecs: If nonzero, how long to delay after the last bit transfer |
| 67 | * before optionally deselecting the device before the next transfer. | 67 | * before optionally deselecting the device before the next transfer. |
| 68 | * @cs_change: True to deselect device before starting the next transfer. | 68 | * @cs_change: True to deselect device before starting the next transfer. |
| 69 | * @word_delay_usecs: If nonzero, how long to wait between words within one | ||
| 70 | * transfer. This property needs explicit support in the SPI controller, | ||
| 71 | * otherwise it is silently ignored. | ||
| 69 | * | 72 | * |
| 70 | * This structure is mapped directly to the kernel spi_transfer structure; | 73 | * This structure is mapped directly to the kernel spi_transfer structure; |
| 71 | * the fields have the same meanings, except of course that the pointers | 74 | * the fields have the same meanings, except of course that the pointers |
| @@ -100,7 +103,8 @@ struct spi_ioc_transfer { · 28 unmodified lines | |||
| 100 | __u8 cs_change; | 103 | __u8 cs_change; |
| 101 | __u8 tx_nbits; | 104 | __u8 tx_nbits; |
| 102 | __u8 rx_nbits; | 105 | __u8 rx_nbits; |
| 103 | __u16 pad; | 106 | __u8 word_delay_usecs; |
| 107 | __u8 pad; | ||
| 104 | 108 | ||
| 105 | /* If the contents of 'struct spi_ioc_transfer' ever change | 109 | /* If the contents of 'struct spi_ioc_transfer' ever change |
| 106 | * incompatibly, then the ioctl number (currently 0) must change; | 110 | * incompatibly, then the ioctl number (currently 0) must change; |
| @@ -50,7 +50,7 @@ struct switchtec_ioctl_flash_part_info { · 49 unmodified lines | |||
| 50 | __u32 active; | 50 | __u32 active; |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | struct switchtec_ioctl_event_summary { | 53 | struct switchtec_ioctl_event_summary_legacy { |
| 54 | __u64 global; | 54 | __u64 global; |
| 55 | __u64 part_bitmap; | 55 | __u64 part_bitmap; |
| 56 | __u32 local_part; | 56 | __u32 local_part; |
| @@ -59,6 +59,15 @@ struct switchtec_ioctl_event_summary { · 2 unmodified lines | |||
| 59 | __u32 pff[48]; | 59 | __u32 pff[48]; |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | struct switchtec_ioctl_event_summary { | ||
| 63 | __u64 global; | ||
| 64 | __u64 part_bitmap; | ||
| 65 | __u32 local_part; | ||
| 66 | __u32 padding; | ||
| 67 | __u32 part[48]; | ||
| 68 | __u32 pff[255]; | ||
| 69 | }; | ||
| 70 | |||
| 62 | #define SWITCHTEC_IOCTL_EVENT_STACK_ERROR 0 | 71 | #define SWITCHTEC_IOCTL_EVENT_STACK_ERROR 0 |
| 63 | #define SWITCHTEC_IOCTL_EVENT_PPU_ERROR 1 | 72 | #define SWITCHTEC_IOCTL_EVENT_PPU_ERROR 1 |
| 64 | #define SWITCHTEC_IOCTL_EVENT_ISP_ERROR 2 | 73 | #define SWITCHTEC_IOCTL_EVENT_ISP_ERROR 2 |
| @@ -127,6 +136,8 @@ struct switchtec_ioctl_pff_port { · 62 unmodified lines | |||
| 127 | _IOWR('W', 0x41, struct switchtec_ioctl_flash_part_info) | 136 | _IOWR('W', 0x41, struct switchtec_ioctl_flash_part_info) |
| 128 | #define SWITCHTEC_IOCTL_EVENT_SUMMARY \ | 137 | #define SWITCHTEC_IOCTL_EVENT_SUMMARY \ |
| 129 | _IOR('W', 0x42, struct switchtec_ioctl_event_summary) | 138 | _IOR('W', 0x42, struct switchtec_ioctl_event_summary) |
| 139 | #define SWITCHTEC_IOCTL_EVENT_SUMMARY_LEGACY \ | ||
| 140 | _IOR('W', 0x42, struct switchtec_ioctl_event_summary_legacy) | ||
| 130 | #define SWITCHTEC_IOCTL_EVENT_CTL \ | 141 | #define SWITCHTEC_IOCTL_EVENT_CTL \ |
| 131 | _IOWR('W', 0x43, struct switchtec_ioctl_event_ctl) | 142 | _IOWR('W', 0x43, struct switchtec_ioctl_event_ctl) |
| 132 | #define SWITCHTEC_IOCTL_PFF_TO_PORT \ | 143 | #define SWITCHTEC_IOCTL_PFF_TO_PORT \ |
| @@ -160,15 +160,42 @@ enum { · 159 unmodified lines | |||
| 160 | #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ | 160 | #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ |
| 161 | #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ | 161 | #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ |
| 162 | 162 | ||
| 163 | /* | ||
| 164 | * Sender's congestion state indicating normal or abnormal situations | ||
| 165 | * in the last round of packets sent. The state is driven by the ACK | ||
| 166 | * information and timer events. | ||
| 167 | */ | ||
| 163 | enum tcp_ca_state { | 168 | enum tcp_ca_state { |
| 169 | /* | ||
| 170 | * Nothing bad has been observed recently. | ||
| 171 | * No apparent reordering, packet loss, or ECN marks. | ||
| 172 | */ | ||
| 164 | TCP_CA_Open = 0, | 173 | TCP_CA_Open = 0, |
| 165 | #define TCPF_CA_Open (1<<TCP_CA_Open) | 174 | #define TCPF_CA_Open (1<<TCP_CA_Open) |
| 175 | /* | ||
| 176 | * The sender enters disordered state when it has received DUPACKs or | ||
| 177 | * SACKs in the last round of packets sent. This could be due to packet | ||
| 178 | * loss or reordering but needs further information to confirm packets | ||
| 179 | * have been lost. | ||
| 180 | */ | ||
| 166 | TCP_CA_Disorder = 1, | 181 | TCP_CA_Disorder = 1, |
| 167 | #define TCPF_CA_Disorder (1<<TCP_CA_Disorder) | 182 | #define TCPF_CA_Disorder (1<<TCP_CA_Disorder) |
| 183 | /* | ||
| 184 | * The sender enters Congestion Window Reduction (CWR) state when it | ||
| 185 | * has received ACKs with ECN-ECE marks, or has experienced congestion | ||
| 186 | * or packet discard on the sender host (e.g. qdisc). | ||
| 187 | */ | ||
| 168 | TCP_CA_CWR = 2, | 188 | TCP_CA_CWR = 2, |
| 169 | #define TCPF_CA_CWR (1<<TCP_CA_CWR) | 189 | #define TCPF_CA_CWR (1<<TCP_CA_CWR) |
| 190 | /* | ||
| 191 | * The sender is in fast recovery and retransmitting lost packets, | ||
| 192 | * typically triggered by ACK events. | ||
| 193 | */ | ||
| 170 | TCP_CA_Recovery = 3, | 194 | TCP_CA_Recovery = 3, |
| 171 | #define TCPF_CA_Recovery (1<<TCP_CA_Recovery) | 195 | #define TCPF_CA_Recovery (1<<TCP_CA_Recovery) |
| 196 | /* | ||
| 197 | * The sender is in loss recovery triggered by retransmission timeout. | ||
| 198 | */ | ||
| 172 | TCP_CA_Loss = 4 | 199 | TCP_CA_Loss = 4 |
| 173 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) | 200 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) |
| 174 | }; | 201 | }; |
| @@ -190,6 +190,7 @@ struct sockaddr_tipc { · 189 unmodified lines | |||
| 190 | #define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */ | 190 | #define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */ |
| 191 | #define TIPC_GROUP_JOIN 135 /* Takes struct tipc_group_req* */ | 191 | #define TIPC_GROUP_JOIN 135 /* Takes struct tipc_group_req* */ |
| 192 | #define TIPC_GROUP_LEAVE 136 /* No argument */ | 192 | #define TIPC_GROUP_LEAVE 136 /* No argument */ |
| 193 | #define TIPC_SOCK_RECVQ_USED 137 /* Default: none (read only) */ | ||
| 193 | 194 | ||
| 194 | /* | 195 | /* |
| 195 | * Flag values | 196 | * Flag values |
| @@ -281,6 +281,8 @@ enum { · 280 unmodified lines | |||
| 281 | TIPC_NLA_PROP_TOL, /* u32 */ | 281 | TIPC_NLA_PROP_TOL, /* u32 */ |
| 282 | TIPC_NLA_PROP_WIN, /* u32 */ | 282 | TIPC_NLA_PROP_WIN, /* u32 */ |
| 283 | TIPC_NLA_PROP_MTU, /* u32 */ | 283 | TIPC_NLA_PROP_MTU, /* u32 */ |
| 284 | TIPC_NLA_PROP_BROADCAST, /* u32 */ | ||
| 285 | TIPC_NLA_PROP_BROADCAST_RATIO, /* u32 */ | ||
| 284 | 286 | ||
| 285 | __TIPC_NLA_PROP_MAX, | 287 | __TIPC_NLA_PROP_MAX, |
| 286 | TIPC_NLA_PROP_MAX = __TIPC_NLA_PROP_MAX - 1 | 288 | TIPC_NLA_PROP_MAX = __TIPC_NLA_PROP_MAX - 1 |
| @@ -70,6 +70,13 @@ · 69 unmodified lines | |||
| 70 | #define TLS_CIPHER_AES_GCM_256_TAG_SIZE 16 | 70 | #define TLS_CIPHER_AES_GCM_256_TAG_SIZE 16 |
| 71 | #define TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE 8 | 71 | #define TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE 8 |
| 72 | 72 | ||
| 73 | #define TLS_CIPHER_AES_CCM_128 53 | ||
| 74 | #define TLS_CIPHER_AES_CCM_128_IV_SIZE 8 | ||
| 75 | #define TLS_CIPHER_AES_CCM_128_KEY_SIZE 16 | ||
| 76 | #define TLS_CIPHER_AES_CCM_128_SALT_SIZE 4 | ||
| 77 | #define TLS_CIPHER_AES_CCM_128_TAG_SIZE 16 | ||
| 78 | #define TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE 8 | ||
| 79 | |||
| 73 | #define TLS_SET_RECORD_TYPE 1 | 80 | #define TLS_SET_RECORD_TYPE 1 |
| 74 | #define TLS_GET_RECORD_TYPE 2 | 81 | #define TLS_GET_RECORD_TYPE 2 |
| 75 | 82 | ||
| @@ -94,4 +101,12 @@ struct tls12_crypto_info_aes_gcm_256 { · 18 unmodified lines | |||
| 94 | unsigned char rec_seq[TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE]; | 101 | unsigned char rec_seq[TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE]; |
| 95 | }; | 102 | }; |
| 96 | 103 | ||
| 104 | struct tls12_crypto_info_aes_ccm_128 { | ||
| 105 | struct tls_crypto_info info; | ||
| 106 | unsigned char iv[TLS_CIPHER_AES_CCM_128_IV_SIZE]; | ||
| 107 | unsigned char key[TLS_CIPHER_AES_CCM_128_KEY_SIZE]; | ||
| 108 | unsigned char salt[TLS_CIPHER_AES_CCM_128_SALT_SIZE]; | ||
| 109 | unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE]; | ||
| 110 | }; | ||
| 111 | |||
| 97 | #endif /* _UAPI_LINUX_TLS_H */ | 112 | #endif /* _UAPI_LINUX_TLS_H */ |
| @@ -404,6 +404,10 @@ enum v4l2_mpeg_video_multi_slice_mode { · 403 unmodified lines | |||
| 404 | #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) | 404 | #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) |
| 405 | #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229) | 405 | #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229) |
| 406 | 406 | ||
| 407 | /* CIDs for the FWHT codec as used by the vicodec driver. */ | ||
| 408 | #define V4L2_CID_FWHT_I_FRAME_QP (V4L2_CID_MPEG_BASE + 290) | ||
| 409 | #define V4L2_CID_FWHT_P_FRAME_QP (V4L2_CID_MPEG_BASE + 291) | ||
| 410 | |||
| 407 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) | 411 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) |
| 408 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) | 412 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) |
| 409 | #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) | 413 | #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) |
| @@ -535,6 +539,10 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type { · 125 unmodified lines | |||
| 535 | #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382) | 539 | #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382) |
| 536 | #define V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (V4L2_CID_MPEG_BASE+383) | 540 | #define V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (V4L2_CID_MPEG_BASE+383) |
| 537 | #define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (V4L2_CID_MPEG_BASE+384) | 541 | #define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (V4L2_CID_MPEG_BASE+384) |
| 542 | #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (V4L2_CID_MPEG_BASE+385) | ||
| 543 | #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (V4L2_CID_MPEG_BASE+386) | ||
| 544 | #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (V4L2_CID_MPEG_BASE+387) | ||
| 545 | #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (V4L2_CID_MPEG_BASE+388) | ||
| 538 | #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) | 546 | #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) |
| 539 | #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) | 547 | #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) |
| 540 | #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) | 548 | #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) |
| @@ -353,6 +353,10 @@ struct vfio_region_gfx_edid { · 352 unmodified lines | |||
| 353 | #define VFIO_DEVICE_GFX_LINK_STATE_DOWN 2 | 353 | #define VFIO_DEVICE_GFX_LINK_STATE_DOWN 2 |
| 354 | }; | 354 | }; |
| 355 | 355 | ||
| 356 | #define VFIO_REGION_TYPE_CCW (2) | ||
| 357 | /* ccw sub-types */ | ||
| 358 | #define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1) | ||
| 359 | |||
| 356 | /* | 360 | /* |
| 357 | * 10de vendor sub-type | 361 | * 10de vendor sub-type |
| 358 | * | 362 | * |
| @@ -12,6 +12,7 @@ · 11 unmodified lines | |||
| 12 | 12 | ||
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | 14 | ||
| 15 | /* used for START SUBCHANNEL, always present */ | ||
| 15 | struct ccw_io_region { | 16 | struct ccw_io_region { |
| 16 | #define ORB_AREA_SIZE 12 | 17 | #define ORB_AREA_SIZE 12 |
| 17 | __u8 orb_area[ORB_AREA_SIZE]; | 18 | __u8 orb_area[ORB_AREA_SIZE]; |
| @@ -22,4 +23,15 @@ struct ccw_io_region { · 4 unmodified lines | |||
| 22 | __u32 ret_code; | 23 | __u32 ret_code; |
| 23 | } __packed; | 24 | } __packed; |
| 24 | 25 | ||
| 26 | /* | ||
| 27 | * used for processing commands that trigger asynchronous actions | ||
| 28 | * Note: this is controlled by a capability | ||
| 29 | */ | ||
| 30 | #define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0) | ||
| 31 | #define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1) | ||
| 32 | struct ccw_cmd_region { | ||
| 33 | __u32 command; | ||
| 34 | __u32 ret_code; | ||
| 35 | } __packed; | ||
| 36 | |||
| 25 | #endif | 37 | #endif |
| @@ -514,9 +514,21 @@ struct v4l2_pix_format { · 513 unmodified lines | |||
| 514 | #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ | 514 | #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ |
| 515 | #define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */ | 515 | #define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */ |
| 516 | #define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */ | 516 | #define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */ |
| 517 | #define V4L2_PIX_FMT_RGBA444 v4l2_fourcc('R', 'A', '1', '2') /* 16 rrrrgggg bbbbaaaa */ | ||
| 518 | #define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */ | ||
| 519 | #define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */ | ||
| 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 */ | ||
| 522 | #define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */ | ||
| 517 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ | 523 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ |
| 518 | #define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ | 524 | #define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ |
| 519 | #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ | 525 | #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ |
| 526 | #define V4L2_PIX_FMT_RGBA555 v4l2_fourcc('R', 'A', '1', '5') /* 16 RGBA-5-5-5-1 */ | ||
| 527 | #define V4L2_PIX_FMT_RGBX555 v4l2_fourcc('R', 'X', '1', '5') /* 16 RGBX-5-5-5-1 */ | ||
| 528 | #define V4L2_PIX_FMT_ABGR555 v4l2_fourcc('A', 'B', '1', '5') /* 16 ABGR-1-5-5-5 */ | ||
| 529 | #define V4L2_PIX_FMT_XBGR555 v4l2_fourcc('X', 'B', '1', '5') /* 16 XBGR-1-5-5-5 */ | ||
| 530 | #define V4L2_PIX_FMT_BGRA555 v4l2_fourcc('B', 'A', '1', '5') /* 16 BGRA-5-5-5-1 */ | ||
| 531 | #define V4L2_PIX_FMT_BGRX555 v4l2_fourcc('B', 'X', '1', '5') /* 16 BGRX-5-5-5-1 */ | ||
| 520 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ | 532 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ |
| 521 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ | 533 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ |
| 522 | #define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ | 534 | #define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ |
| @@ -528,7 +540,11 @@ struct v4l2_pix_format { · 5 unmodified lines | |||
| 528 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ | 540 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ |
| 529 | #define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */ | 541 | #define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */ |
| 530 | #define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */ | 542 | #define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */ |
| 543 | #define V4L2_PIX_FMT_BGRA32 v4l2_fourcc('R', 'A', '2', '4') /* 32 ABGR-8-8-8-8 */ | ||
| 544 | #define V4L2_PIX_FMT_BGRX32 v4l2_fourcc('R', 'X', '2', '4') /* 32 XBGR-8-8-8-8 */ | ||
| 531 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ | 545 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ |
| 546 | #define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4') /* 32 RGBA-8-8-8-8 */ | ||
| 547 | #define V4L2_PIX_FMT_RGBX32 v4l2_fourcc('X', 'B', '2', '4') /* 32 RGBX-8-8-8-8 */ | ||
| 532 | #define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */ | 548 | #define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */ |
| 533 | #define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */ | 549 | #define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */ |
| 534 | 550 | ||
| @@ -669,6 +685,7 @@ struct v4l2_pix_format { · 134 unmodified lines | |||
| 669 | #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ | 685 | #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ |
| 670 | #define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */ | 686 | #define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */ |
| 671 | #define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */ | 687 | #define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */ |
| 688 | #define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ | ||
| 672 | 689 | ||
| 673 | /* Vendor-specific formats */ | 690 | /* Vendor-specific formats */ |
| 674 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | 691 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ |
| @@ -40,8 +40,16 @@ · 39 unmodified lines | |||
| 40 | 40 | ||
| 41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
| 42 | 42 | ||
| 43 | #define VIRTIO_GPU_F_VIRGL 0 | 43 | /* |
| 44 | #define VIRTIO_GPU_F_EDID 1 | 44 | * VIRTIO_GPU_CMD_CTX_* |
| 45 | * VIRTIO_GPU_CMD_*_3D | ||
| 46 | */ | ||
| 47 | #define VIRTIO_GPU_F_VIRGL 0 | ||
| 48 | |||
| 49 | /* | ||
| 50 | * VIRTIO_GPU_CMD_GET_EDID | ||
| 51 | */ | ||
| 52 | #define VIRTIO_GPU_F_EDID 1 | ||
| 45 | 53 | ||
| 46 | enum virtio_gpu_ctrl_type { | 54 | enum virtio_gpu_ctrl_type { |
| 47 | VIRTIO_GPU_UNDEFINED = 0, | 55 | VIRTIO_GPU_UNDEFINED = 0, |
| @@ -20,8 +20,8 @@ · 19 unmodified lines | |||
| 20 | /* | 20 | /* |
| 21 | * Queue Numbering | 21 | * Queue Numbering |
| 22 | * | 22 | * |
| 23 | * The external queues (DMA channels + CPU) MUST be before the internal queues | 23 | * The external queues (PCI DMA channels) MUST be before the internal queues |
| 24 | * and each group (DMA channels + CPU and internal) must be contiguous inside | 24 | * and each group (PCI DMA channels and internal) must be contiguous inside |
| 25 | * itself but there can be a gap between the two groups (although not | 25 | * itself but there can be a gap between the two groups (although not |
| 26 | * recommended) | 26 | * recommended) |
| 27 | */ | 27 | */ |
| @@ -33,7 +33,7 @@ enum goya_queue_id { · 5 unmodified lines | |||
| 33 | GOYA_QUEUE_ID_DMA_3, | 33 | GOYA_QUEUE_ID_DMA_3, |
| 34 | GOYA_QUEUE_ID_DMA_4, | 34 | GOYA_QUEUE_ID_DMA_4, |
| 35 | GOYA_QUEUE_ID_CPU_PQ, | 35 | GOYA_QUEUE_ID_CPU_PQ, |
| 36 | GOYA_QUEUE_ID_MME, | 36 | GOYA_QUEUE_ID_MME, /* Internal queues start here */ |
| 37 | GOYA_QUEUE_ID_TPC0, | 37 | GOYA_QUEUE_ID_TPC0, |
| 38 | GOYA_QUEUE_ID_TPC1, | 38 | GOYA_QUEUE_ID_TPC1, |
| 39 | GOYA_QUEUE_ID_TPC2, | 39 | GOYA_QUEUE_ID_TPC2, |
| @@ -45,11 +45,18 @@ enum goya_queue_id { · 5 unmodified lines | |||
| 45 | GOYA_QUEUE_ID_SIZE | 45 | GOYA_QUEUE_ID_SIZE |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | enum hl_device_status { | ||
| 49 | HL_DEVICE_STATUS_OPERATIONAL, | ||
| 50 | HL_DEVICE_STATUS_IN_RESET, | ||
| 51 | HL_DEVICE_STATUS_MALFUNCTION | ||
| 52 | }; | ||
| 53 | |||
| 48 | /* Opcode for management ioctl */ | 54 | /* Opcode for management ioctl */ |
| 49 | #define HL_INFO_HW_IP_INFO 0 | 55 | #define HL_INFO_HW_IP_INFO 0 |
| 50 | #define HL_INFO_HW_EVENTS 1 | 56 | #define HL_INFO_HW_EVENTS 1 |
| 51 | #define HL_INFO_DRAM_USAGE 2 | 57 | #define HL_INFO_DRAM_USAGE 2 |
| 52 | #define HL_INFO_HW_IDLE 3 | 58 | #define HL_INFO_HW_IDLE 3 |
| 59 | #define HL_INFO_DEVICE_STATUS 4 | ||
| 53 | 60 | ||
| 54 | #define HL_INFO_VERSION_MAX_LEN 128 | 61 | #define HL_INFO_VERSION_MAX_LEN 128 |
| 55 | 62 | ||
| @@ -82,6 +89,11 @@ struct hl_info_hw_idle { · 26 unmodified lines | |||
| 82 | __u32 pad; | 89 | __u32 pad; |
| 83 | }; | 90 | }; |
| 84 | 91 | ||
| 92 | struct hl_info_device_status { | ||
| 93 | __u32 status; | ||
| 94 | __u32 pad; | ||
| 95 | }; | ||
| 96 | |||
| 85 | struct hl_info_args { | 97 | struct hl_info_args { |
| 86 | /* Location of relevant struct in userspace */ | 98 | /* Location of relevant struct in userspace */ |
| 87 | __u64 return_pointer; | 99 | __u64 return_pointer; |
| @@ -181,7 +193,10 @@ struct hl_cs_in { · 93 unmodified lines | |||
| 181 | }; | 193 | }; |
| 182 | 194 | ||
| 183 | struct hl_cs_out { | 195 | struct hl_cs_out { |
| 184 | /* this holds the sequence number of the CS to pass to wait ioctl */ | 196 | /* |
| 197 | * seq holds the sequence number of the CS to pass to wait ioctl. All | ||
| 198 | * values are valid except for 0 and ULLONG_MAX | ||
| 199 | */ | ||
| 185 | __u64 seq; | 200 | __u64 seq; |
| 186 | /* HL_CS_STATUS_* */ | 201 | /* HL_CS_STATUS_* */ |
| 187 | __u32 status; | 202 | __u32 status; |
| @@ -320,6 +335,110 @@ union hl_mem_args { · 132 unmodified lines | |||
| 320 | struct hl_mem_out out; | 335 | struct hl_mem_out out; |
| 321 | }; | 336 | }; |
| 322 | 337 | ||
| 338 | #define HL_DEBUG_MAX_AUX_VALUES 10 | ||
| 339 | |||
| 340 | struct hl_debug_params_etr { | ||
| 341 | /* Address in memory to allocate buffer */ | ||
| 342 | __u64 buffer_address; | ||
| 343 | |||
| 344 | /* Size of buffer to allocate */ | ||
| 345 | __u64 buffer_size; | ||
| 346 | |||
| 347 | /* Sink operation mode: SW fifo, HW fifo, Circular buffer */ | ||
| 348 | __u32 sink_mode; | ||
| 349 | __u32 pad; | ||
| 350 | }; | ||
| 351 | |||
| 352 | struct hl_debug_params_etf { | ||
| 353 | /* Address in memory to allocate buffer */ | ||
| 354 | __u64 buffer_address; | ||
| 355 | |||
| 356 | /* Size of buffer to allocate */ | ||
| 357 | __u64 buffer_size; | ||
| 358 | |||
| 359 | /* Sink operation mode: SW fifo, HW fifo, Circular buffer */ | ||
| 360 | __u32 sink_mode; | ||
| 361 | __u32 pad; | ||
| 362 | }; | ||
| 363 | |||
| 364 | struct hl_debug_params_stm { | ||
| 365 | /* Two bit masks for HW event and Stimulus Port */ | ||
| 366 | __u64 he_mask; | ||
| 367 | __u64 sp_mask; | ||
| 368 | |||
| 369 | /* Trace source ID */ | ||
| 370 | __u32 id; | ||
| 371 | |||
| 372 | /* Frequency for the timestamp register */ | ||
| 373 | __u32 frequency; | ||
| 374 | }; | ||
| 375 | |||
| 376 | struct hl_debug_params_bmon { | ||
| 377 | /* Two address ranges that the user can request to filter */ | ||
| 378 | __u64 start_addr0; | ||
| 379 | __u64 addr_mask0; | ||
| 380 | |||
| 381 | __u64 start_addr1; | ||
| 382 | __u64 addr_mask1; | ||
| 383 | |||
| 384 | /* Capture window configuration */ | ||
| 385 | __u32 bw_win; | ||
| 386 | __u32 win_capture; | ||
| 387 | |||
| 388 | /* Trace source ID */ | ||
| 389 | __u32 id; | ||
| 390 | __u32 pad; | ||
| 391 | }; | ||
| 392 | |||
| 393 | struct hl_debug_params_spmu { | ||
| 394 | /* Event types selection */ | ||
| 395 | __u64 event_types[HL_DEBUG_MAX_AUX_VALUES]; | ||
| 396 | |||
| 397 | /* Number of event types selection */ | ||
| 398 | __u32 event_types_num; | ||
| 399 | __u32 pad; | ||
| 400 | }; | ||
| 401 | |||
| 402 | /* Opcode for ETR component */ | ||
| 403 | #define HL_DEBUG_OP_ETR 0 | ||
| 404 | /* Opcode for ETF component */ | ||
| 405 | #define HL_DEBUG_OP_ETF 1 | ||
| 406 | /* Opcode for STM component */ | ||
| 407 | #define HL_DEBUG_OP_STM 2 | ||
| 408 | /* Opcode for FUNNEL component */ | ||
| 409 | #define HL_DEBUG_OP_FUNNEL 3 | ||
| 410 | /* Opcode for BMON component */ | ||
| 411 | #define HL_DEBUG_OP_BMON 4 | ||
| 412 | /* Opcode for SPMU component */ | ||
| 413 | #define HL_DEBUG_OP_SPMU 5 | ||
| 414 | /* Opcode for timestamp */ | ||
| 415 | #define HL_DEBUG_OP_TIMESTAMP 6 | ||
| 416 | |||
| 417 | struct hl_debug_args { | ||
| 418 | /* | ||
| 419 | * Pointer to user input structure. | ||
| 420 | * This field is relevant to specific opcodes. | ||
| 421 | */ | ||
| 422 | __u64 input_ptr; | ||
| 423 | /* Pointer to user output structure */ | ||
| 424 | __u64 output_ptr; | ||
| 425 | /* Size of user input structure */ | ||
| 426 | __u32 input_size; | ||
| 427 | /* Size of user output structure */ | ||
| 428 | __u32 output_size; | ||
| 429 | /* HL_DEBUG_OP_* */ | ||
| 430 | __u32 op; | ||
| 431 | /* | ||
| 432 | * Register index in the component, taken from the debug_regs_index enum | ||
| 433 | * in the various ASIC header files | ||
| 434 | */ | ||
| 435 | __u32 reg_idx; | ||
| 436 | /* Enable/disable */ | ||
| 437 | __u32 enable; | ||
| 438 | /* Context ID - Currently not in use */ | ||
| 439 | __u32 ctx_id; | ||
| 440 | }; | ||
| 441 | |||
| 323 | /* | 442 | /* |
| 324 | * Various information operations such as: | 443 | * Various information operations such as: |
| 325 | * - H/W IP information | 444 | * - H/W IP information |
| @@ -361,6 +480,12 @@ union hl_mem_args { · 35 unmodified lines | |||
| 361 | * Each JOB will be enqueued on a specific queue, according to the user's input. | 480 | * Each JOB will be enqueued on a specific queue, according to the user's input. |
| 362 | * There can be more then one JOB per queue. | 481 | * There can be more then one JOB per queue. |
| 363 | * | 482 | * |
| 483 | * The CS IOCTL will receive three sets of JOBS. One set is for "restore" phase, | ||
| 484 | * a second set is for "execution" phase and a third set is for "store" phase. | ||
| 485 | * The JOBS on the "restore" phase are enqueued only after context-switch | ||
| 486 | * (or if its the first CS for this context). The user can also order the | ||
| 487 | * driver to run the "restore" phase explicitly | ||
| 488 | * | ||
| 364 | * There are two types of queues - external and internal. External queues | 489 | * There are two types of queues - external and internal. External queues |
| 365 | * are DMA queues which transfer data from/to the Host. All other queues are | 490 | * are DMA queues which transfer data from/to the Host. All other queues are |
| 366 | * internal. The driver will get completion notifications from the device only | 491 | * internal. The driver will get completion notifications from the device only |
| @@ -377,19 +502,18 @@ union hl_mem_args { · 10 unmodified lines | |||
| 377 | * relevant queues. Therefore, the user mustn't assume the CS has been completed | 502 | * relevant queues. Therefore, the user mustn't assume the CS has been completed |
| 378 | * or has even started to execute. | 503 | * or has even started to execute. |
| 379 | * | 504 | * |
| 380 | * Upon successful enqueue, the IOCTL returns an opaque handle which the user | 505 | * Upon successful enqueue, the IOCTL returns a sequence number which the user |
| 381 | * can use with the "Wait for CS" IOCTL to check whether the handle's CS | 506 | * can use with the "Wait for CS" IOCTL to check whether the handle's CS |
| 382 | * external JOBS have been completed. Note that if the CS has internal JOBS | 507 | * external JOBS have been completed. Note that if the CS has internal JOBS |
| 383 | * which can execute AFTER the external JOBS have finished, the driver might | 508 | * which can execute AFTER the external JOBS have finished, the driver might |
| 384 | * report that the CS has finished executing BEFORE the internal JOBS have | 509 | * report that the CS has finished executing BEFORE the internal JOBS have |
| 385 | * actually finish executing. | 510 | * actually finish executing. |
| 386 | * | 511 | * |
| 387 | * The CS IOCTL will receive three sets of JOBS. One set is for "restore" phase, | 512 | * Even though the sequence number increments per CS, the user can NOT |
| 388 | * a second set is for "execution" phase and a third set is for "store" phase. | 513 | * automatically assume that if CS with sequence number N finished, then CS |
| 389 | * The JOBS on the "restore" phase are enqueued only after context-switch | 514 | * with sequence number N-1 also finished. The user can make this assumption if |
| 390 | * (or if its the first CS for this context). The user can also order the | 515 | * and only if CS N and CS N-1 are exactly the same (same CBs for the same |
| 391 | * driver to run the "restore" phase explicitly | 516 | * queues). |
| 392 | * | ||
| 393 | */ | 517 | */ |
| 394 | #define HL_IOCTL_CS \ | 518 | #define HL_IOCTL_CS \ |
| 395 | _IOWR('H', 0x03, union hl_cs_args) | 519 | _IOWR('H', 0x03, union hl_cs_args) |
| @@ -444,7 +568,20 @@ union hl_mem_args { · 48 unmodified lines | |||
| 444 | #define HL_IOCTL_MEMORY \ | 568 | #define HL_IOCTL_MEMORY \ |
| 445 | _IOWR('H', 0x05, union hl_mem_args) | 569 | _IOWR('H', 0x05, union hl_mem_args) |
| 446 | 570 | ||
| 571 | /* | ||
| 572 | * Debug | ||
| 573 | * - Enable/disable the ETR/ETF/FUNNEL/STM/BMON/SPMU debug traces | ||
| 574 | * | ||
| 575 | * This IOCTL allows the user to get debug traces from the chip. | ||
| 576 | * | ||
| 577 | * The user needs to provide the register index and essential data such as | ||
| 578 | * buffer address and size. | ||
| 579 | * | ||
| 580 | */ | ||
| 581 | #define HL_IOCTL_DEBUG \ | ||
| 582 | _IOWR('H', 0x06, struct hl_debug_args) | ||
| 583 | |||
| 447 | #define HL_COMMAND_START 0x01 | 584 | #define HL_COMMAND_START 0x01 |
| 448 | #define HL_COMMAND_END 0x06 | 585 | #define HL_COMMAND_END 0x07 |
| 449 | 586 | ||
| 450 | #endif /* HABANALABS_H_ */ | 587 | #endif /* HABANALABS_H_ */ |
| @@ -0,0 +1,101 @@ | |||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ | ||
| 2 | /* | ||
| 3 | * Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All rights reserved. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef EFA_ABI_USER_H | ||
| 7 | #define EFA_ABI_USER_H | ||
| 8 | |||
| 9 | #include <linux/types.h> | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Increment this value if any changes that break userspace ABI | ||
| 13 | * compatibility are made. | ||
| 14 | */ | ||
| 15 | #define EFA_UVERBS_ABI_VERSION 1 | ||
| 16 | |||
| 17 | /* | ||
| 18 | * Keep structs aligned to 8 bytes. | ||
| 19 | * Keep reserved fields as arrays of __u8 named reserved_XXX where XXX is the | ||
| 20 | * hex bit offset of the field. | ||
| 21 | */ | ||
| 22 | |||
| 23 | enum efa_ibv_user_cmds_supp_udata { | ||
| 24 | EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0, | ||
| 25 | EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1, | ||
| 26 | }; | ||
| 27 | |||
| 28 | struct efa_ibv_alloc_ucontext_resp { | ||
| 29 | __u32 comp_mask; | ||
| 30 | __u32 cmds_supp_udata_mask; | ||
| 31 | __u16 sub_cqs_per_cq; | ||
| 32 | __u16 inline_buf_size; | ||
| 33 | __u32 max_llq_size; /* bytes */ | ||
| 34 | }; | ||
| 35 | |||
| 36 | struct efa_ibv_alloc_pd_resp { | ||
| 37 | __u32 comp_mask; | ||
| 38 | __u16 pdn; | ||
| 39 | __u8 reserved_30[2]; | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct efa_ibv_create_cq { | ||
| 43 | __u32 comp_mask; | ||
| 44 | __u32 cq_entry_size; | ||
| 45 | __u16 num_sub_cqs; | ||
| 46 | __u8 reserved_50[6]; | ||
| 47 | }; | ||
| 48 | |||
| 49 | struct efa_ibv_create_cq_resp { | ||
| 50 | __u32 comp_mask; | ||
| 51 | __u8 reserved_20[4]; | ||
| 52 | __aligned_u64 q_mmap_key; | ||
| 53 | __aligned_u64 q_mmap_size; | ||
| 54 | __u16 cq_idx; | ||
| 55 | __u8 reserved_d0[6]; | ||
| 56 | }; | ||
| 57 | |||
| 58 | enum { | ||
| 59 | EFA_QP_DRIVER_TYPE_SRD = 0, | ||
| 60 | }; | ||
| 61 | |||
| 62 | struct efa_ibv_create_qp { | ||
| 63 | __u32 comp_mask; | ||
| 64 | __u32 rq_ring_size; /* bytes */ | ||
| 65 | __u32 sq_ring_size; /* bytes */ | ||
| 66 | __u32 driver_qp_type; | ||
| 67 | }; | ||
| 68 | |||
| 69 | struct efa_ibv_create_qp_resp { | ||
| 70 | __u32 comp_mask; | ||
| 71 | /* the offset inside the page of the rq db */ | ||
| 72 | __u32 rq_db_offset; | ||
| 73 | /* the offset inside the page of the sq db */ | ||
| 74 | __u32 sq_db_offset; | ||
| 75 | /* the offset inside the page of descriptors buffer */ | ||
| 76 | __u32 llq_desc_offset; | ||
| 77 | __aligned_u64 rq_mmap_key; | ||
| 78 | __aligned_u64 rq_mmap_size; | ||
| 79 | __aligned_u64 rq_db_mmap_key; | ||
| 80 | __aligned_u64 sq_db_mmap_key; | ||
| 81 | __aligned_u64 llq_desc_mmap_key; | ||
| 82 | __u16 send_sub_cq_idx; | ||
| 83 | __u16 recv_sub_cq_idx; | ||
| 84 | __u8 reserved_1e0[4]; | ||
| 85 | }; | ||
| 86 | |||
| 87 | struct efa_ibv_create_ah_resp { | ||
| 88 | __u32 comp_mask; | ||
| 89 | __u16 efa_address_handle; | ||
| 90 | __u8 reserved_30[2]; | ||
| 91 | }; | ||
| 92 | |||
| 93 | struct efa_ibv_ex_query_device_resp { | ||
| 94 | __u32 comp_mask; | ||
| 95 | __u32 max_sq_wr; | ||
| 96 | __u32 max_rq_wr; | ||
| 97 | __u16 max_sq_sge; | ||
| 98 | __u16 max_rq_sge; | ||
| 99 | }; | ||
| 100 | |||
| 101 | #endif /* EFA_ABI_USER_H */ | ||
| @@ -360,6 +360,7 @@ enum mlx5_ib_create_qp_resp_mask { · 359 unmodified lines | |||
| 360 | MLX5_IB_CREATE_QP_RESP_MASK_TISN = 1UL << 1, | 360 | MLX5_IB_CREATE_QP_RESP_MASK_TISN = 1UL << 1, |
| 361 | MLX5_IB_CREATE_QP_RESP_MASK_RQN = 1UL << 2, | 361 | MLX5_IB_CREATE_QP_RESP_MASK_RQN = 1UL << 2, |
| 362 | MLX5_IB_CREATE_QP_RESP_MASK_SQN = 1UL << 3, | 362 | MLX5_IB_CREATE_QP_RESP_MASK_SQN = 1UL << 3, |
| 363 | MLX5_IB_CREATE_QP_RESP_MASK_TIR_ICM_ADDR = 1UL << 4, | ||
| 363 | }; | 364 | }; |
| 364 | 365 | ||
| 365 | struct mlx5_ib_create_qp_resp { | 366 | struct mlx5_ib_create_qp_resp { |
| @@ -371,6 +372,7 @@ struct mlx5_ib_create_qp_resp { · 5 unmodified lines | |||
| 371 | __u32 rqn; | 372 | __u32 rqn; |
| 372 | __u32 sqn; | 373 | __u32 sqn; |
| 373 | __u32 reserved1; | 374 | __u32 reserved1; |
| 375 | __u64 tir_icm_addr; | ||
| 374 | }; | 376 | }; |
| 375 | 377 | ||
| 376 | struct mlx5_ib_alloc_mw { | 378 | struct mlx5_ib_alloc_mw { |
| @@ -44,6 +44,7 @@ enum mlx5_ib_create_flow_action_attrs { · 43 unmodified lines | |||
| 44 | enum mlx5_ib_alloc_dm_attrs { | 44 | enum mlx5_ib_alloc_dm_attrs { |
| 45 | MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT), | 45 | MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT), |
| 46 | MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, | 46 | MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, |
| 47 | MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE, | ||
| 47 | }; | 48 | }; |
| 48 | 49 | ||
| 49 | enum mlx5_ib_devx_methods { | 50 | enum mlx5_ib_devx_methods { |
| @@ -144,6 +145,7 @@ enum mlx5_ib_flow_matcher_create_attrs { · 94 unmodified lines | |||
| 144 | MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, | 145 | MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, |
| 145 | MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, | 146 | MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, |
| 146 | MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, | 147 | MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, |
| 148 | MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE, | ||
| 147 | }; | 149 | }; |
| 148 | 150 | ||
| 149 | enum mlx5_ib_flow_matcher_destroy_attrs { | 151 | enum mlx5_ib_flow_matcher_destroy_attrs { |
| @@ -42,6 +42,7 @@ enum mlx5_ib_uapi_flow_action_flags { · 41 unmodified lines | |||
| 42 | enum mlx5_ib_uapi_flow_table_type { | 42 | enum mlx5_ib_uapi_flow_table_type { |
| 43 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX = 0x0, | 43 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX = 0x0, |
| 44 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, | 44 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, |
| 45 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB = 0x2, | ||
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| 47 | enum mlx5_ib_uapi_flow_action_packet_reformat_type { | 48 | enum mlx5_ib_uapi_flow_action_packet_reformat_type { |
| @@ -56,5 +57,11 @@ struct mlx5_ib_uapi_devx_async_cmd_hdr { · 8 unmodified lines | |||
| 56 | __u8 out_data[]; | 57 | __u8 out_data[]; |
| 57 | }; | 58 | }; |
| 58 | 59 | ||
| 60 | enum mlx5_ib_uapi_dm_type { | ||
| 61 | MLX5_IB_UAPI_DM_TYPE_MEMIC, | ||
| 62 | MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM, | ||
| 63 | MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM, | ||
| 64 | }; | ||
| 65 | |||
| 59 | #endif | 66 | #endif |
| 60 | 67 | ||
| @@ -49,17 +49,6 @@ enum { · 48 unmodified lines | |||
| 49 | RDMA_NL_IWPM_NUM_OPS | 49 | RDMA_NL_IWPM_NUM_OPS |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | struct rdma_cm_id_stats { | ||
| 53 | __u32 qp_num; | ||
| 54 | __u32 bound_dev_if; | ||
| 55 | __u32 port_space; | ||
| 56 | __s32 pid; | ||
| 57 | __u8 cm_state; | ||
| 58 | __u8 node_type; | ||
| 59 | __u8 port_num; | ||
| 60 | __u8 qp_type; | ||
| 61 | }; | ||
| 62 | |||
| 63 | enum { | 52 | enum { |
| 64 | IWPM_NLA_REG_PID_UNSPEC = 0, | 53 | IWPM_NLA_REG_PID_UNSPEC = 0, |
| 65 | IWPM_NLA_REG_PID_SEQ, | 54 | IWPM_NLA_REG_PID_SEQ, |
| @@ -261,7 +250,10 @@ enum rdma_nldev_command { · 195 unmodified lines | |||
| 261 | 250 | ||
| 262 | RDMA_NLDEV_CMD_PORT_GET, /* can dump */ | 251 | RDMA_NLDEV_CMD_PORT_GET, /* can dump */ |
| 263 | 252 | ||
| 264 | /* 6 - 8 are free to use */ | 253 | RDMA_NLDEV_CMD_SYS_GET, |
| 254 | RDMA_NLDEV_CMD_SYS_SET, | ||
| 255 | |||
| 256 | /* 8 is free to use */ | ||
| 265 | 257 | ||
| 266 | RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */ | 258 | RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */ |
| 267 | 259 | ||
| @@ -472,6 +464,21 @@ enum rdma_nldev_attr { · 204 unmodified lines | |||
| 472 | */ | 464 | */ |
| 473 | RDMA_NLDEV_ATTR_LINK_TYPE, /* string */ | 465 | RDMA_NLDEV_ATTR_LINK_TYPE, /* string */ |
| 474 | 466 | ||
| 467 | /* | ||
| 468 | * net namespace mode for rdma subsystem: | ||
| 469 | * either shared or exclusive among multiple net namespaces. | ||
| 470 | */ | ||
| 471 | RDMA_NLDEV_SYS_ATTR_NETNS_MODE, /* u8 */ | ||
| 472 | /* | ||
| 473 | * Device protocol, e.g. ib, iw, usnic, roce and opa | ||
| 474 | */ | ||
| 475 | RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */ | ||
| 476 | |||
| 477 | /* | ||
| 478 | * File descriptor handle of the net namespace object | ||
| 479 | */ | ||
| 480 | RDMA_NLDEV_NET_NS_FD, /* u32 */ | ||
| 481 | |||
| 475 | /* | 482 | /* |
| 476 | * Always the end | 483 | * Always the end |
| 477 | */ | 484 | */ |
| @@ -102,6 +102,7 @@ enum rdma_driver_id { · 101 unmodified lines | |||
| 102 | RDMA_DRIVER_RXE, | 102 | RDMA_DRIVER_RXE, |
| 103 | RDMA_DRIVER_HFI1, | 103 | RDMA_DRIVER_HFI1, |
| 104 | RDMA_DRIVER_QIB, | 104 | RDMA_DRIVER_QIB, |
| 105 | RDMA_DRIVER_EFA, | ||
| 105 | }; | 106 | }; |
| 106 | 107 | ||
| 107 | #endif | 108 | #endif |
| @@ -52,6 +52,7 @@ enum fc_els_cmd { · 51 unmodified lines | |||
| 52 | ELS_RRQ = 0x12, /* reinstate recovery qualifier */ | 52 | ELS_RRQ = 0x12, /* reinstate recovery qualifier */ |
| 53 | ELS_REC = 0x13, /* read exchange concise */ | 53 | ELS_REC = 0x13, /* read exchange concise */ |
| 54 | ELS_SRR = 0x14, /* sequence retransmission request */ | 54 | ELS_SRR = 0x14, /* sequence retransmission request */ |
| 55 | ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */ | ||
| 55 | ELS_PRLI = 0x20, /* process login */ | 56 | ELS_PRLI = 0x20, /* process login */ |
| 56 | ELS_PRLO = 0x21, /* process logout */ | 57 | ELS_PRLO = 0x21, /* process logout */ |
| 57 | ELS_SCN = 0x22, /* state change notification */ | 58 | ELS_SCN = 0x22, /* state change notification */ |
| @@ -119,6 +120,7 @@ enum fc_els_cmd { · 61 unmodified lines | |||
| 119 | [ELS_RRQ] = "RRQ", \ | 120 | [ELS_RRQ] = "RRQ", \ |
| 120 | [ELS_REC] = "REC", \ | 121 | [ELS_REC] = "REC", \ |
| 121 | [ELS_SRR] = "SRR", \ | 122 | [ELS_SRR] = "SRR", \ |
| 123 | [ELS_FPIN] = "FPIN", \ | ||
| 122 | [ELS_PRLI] = "PRLI", \ | 124 | [ELS_PRLI] = "PRLI", \ |
| 123 | [ELS_PRLO] = "PRLO", \ | 125 | [ELS_PRLO] = "PRLO", \ |
| 124 | [ELS_SCN] = "SCN", \ | 126 | [ELS_SCN] = "SCN", \ |
| @@ -829,4 +831,35 @@ enum fc_els_clid_ic { · 704 unmodified lines | |||
| 829 | ELS_CLID_IC_LIP = 8, /* receiving LIP */ | 831 | ELS_CLID_IC_LIP = 8, /* receiving LIP */ |
| 830 | }; | 832 | }; |
| 831 | 833 | ||
| 834 | |||
| 835 | /* | ||
| 836 | * Fabric Notification Descriptor Tag values | ||
| 837 | */ | ||
| 838 | enum fc_fn_dtag { | ||
| 839 | ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001, /* Link Integrity */ | ||
| 840 | ELS_FN_DTAG_PEER_CONGEST = 0x00020003, /* Peer Congestion */ | ||
| 841 | ELS_FN_DTAG_CONGESTION = 0x00020004, /* Congestion */ | ||
| 842 | }; | ||
| 843 | |||
| 844 | /* | ||
| 845 | * Fabric Notification Descriptor | ||
| 846 | */ | ||
| 847 | struct fc_fn_desc { | ||
| 848 | __be32 fn_desc_tag; /* Notification Descriptor Tag */ | ||
| 849 | __be32 fn_desc_value_len; /* Length of Descriptor Value field | ||
| 850 | * (in bytes) | ||
| 851 | */ | ||
| 852 | __u8 fn_desc_value[0]; /* Descriptor Value */ | ||
| 853 | }; | ||
| 854 | |||
| 855 | /* | ||
| 856 | * ELS_FPIN - Fabric Performance Impact Notification | ||
| 857 | */ | ||
| 858 | struct fc_els_fpin { | ||
| 859 | __u8 fpin_cmd; /* command (0x16) */ | ||
| 860 | __u8 fpin_zero[3]; /* specified as zero - part of cmd */ | ||
| 861 | __be32 fpin_desc_cnt; /* count of descriptors */ | ||
| 862 | struct fc_fn_desc fpin_desc[0]; /* Descriptor list */ | ||
| 863 | }; | ||
| 864 | |||
| 832 | #endif /* _FC_ELS_H_ */ | 865 | #endif /* _FC_ELS_H_ */ |