| author | |
| committer | |
| log | df1909900c60a55cf93281ed7c476646c6d4c10c |
| tree | 502720be3f34e94d7aa43cf5972630cf1d84e32b |
| parent | f624191f9a759c0d310f3615c10dbfbbc6ae511e |
241 files changed, 9871 insertions(+), 2259 deletions(-)
lib/libc/include/aarch64-linux-any/asm/hwcap.h+17| ... | @@ -56,6 +56,21 @@ | ... | @@ -56,6 +56,21 @@ |
| 56 | #define HWCAP_PACA		(1 << 30) | 56 | #define HWCAP_PACA		(1 << 30) |
| 57 | #define HWCAP_PACG		(1UL << 31) | 57 | #define HWCAP_PACG		(1UL << 31) |
| 58 | #define HWCAP_GCS		(1UL << 32) | 58 | #define HWCAP_GCS		(1UL << 32) |
| 59 | #define HWCAP_CMPBR		(1UL << 33) | ||
| 60 | #define HWCAP_FPRCVT		(1UL << 34) | ||
| 61 | #define HWCAP_F8MM8		(1UL << 35) | ||
| 62 | #define HWCAP_F8MM4		(1UL << 36) | ||
| 63 | #define HWCAP_SVE_F16MM		(1UL << 37) | ||
| 64 | #define HWCAP_SVE_ELTPERM	(1UL << 38) | ||
| 65 | #define HWCAP_SVE_AES2		(1UL << 39) | ||
| 66 | #define HWCAP_SVE_BFSCALE	(1UL << 40) | ||
| 67 | #define HWCAP_SVE2P2		(1UL << 41) | ||
| 68 | #define HWCAP_SME2P2		(1UL << 42) | ||
| 69 | #define HWCAP_SME_SBITPERM	(1UL << 43) | ||
| 70 | #define HWCAP_SME_AES		(1UL << 44) | ||
| 71 | #define HWCAP_SME_SFEXPA	(1UL << 45) | ||
| 72 | #define HWCAP_SME_STMOP		(1UL << 46) | ||
| 73 | #define HWCAP_SME_SMOP4		(1UL << 47) | ||
| 59 | 74 | ||
| 60 | /* | 75 | /* |
| 61 | * HWCAP2 flags - for AT_HWCAP2 | 76 | * HWCAP2 flags - for AT_HWCAP2 |
| ... | @@ -128,5 +143,7 @@ | ... | @@ -128,5 +143,7 @@ |
| 128 | /* | 143 | /* |
| 129 | * HWCAP3 flags - for AT_HWCAP3 | 144 | * HWCAP3 flags - for AT_HWCAP3 |
| 130 | */ | 145 | */ |
| 146 | #define HWCAP3_MTE_FAR		(1UL << 0) | ||
| 147 | #define HWCAP3_MTE_STORE_ONLY		(1UL << 1) | ||
| 131 | 148 | ||
| 132 | #endif /* __ASM_HWCAP_H */ | 149 | #endif /* __ASM_HWCAP_H */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-linux-any/asm/kvm.h+16-7| ... | @@ -43,9 +43,6 @@ | ... | @@ -43,9 +43,6 @@ |
| 43 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 43 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 44 | #define KVM_DIRTY_LOG_PAGE_OFFSET 64 | 44 | #define KVM_DIRTY_LOG_PAGE_OFFSET 64 |
| 45 | 45 | ||
| 46 | #define KVM_REG_SIZE(id)						\ | ||
| 47 | 	(1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) | ||
| 48 | |||
| 49 | struct kvm_regs { | 46 | struct kvm_regs { |
| 50 | 	struct user_pt_regs regs;	/* sp = sp_el0 */ | 47 | 	struct user_pt_regs regs;	/* sp = sp_el0 */ |
| 51 | 48 | ||
| ... | @@ -108,6 +105,7 @@ struct kvm_regs { | ... | @@ -108,6 +105,7 @@ struct kvm_regs { |
| 108 | #define KVM_ARM_VCPU_PTRAUTH_ADDRESS	5 /* VCPU uses address authentication */ | 105 | #define KVM_ARM_VCPU_PTRAUTH_ADDRESS	5 /* VCPU uses address authentication */ |
| 109 | #define KVM_ARM_VCPU_PTRAUTH_GENERIC	6 /* VCPU uses generic authentication */ | 106 | #define KVM_ARM_VCPU_PTRAUTH_GENERIC	6 /* VCPU uses generic authentication */ |
| 110 | #define KVM_ARM_VCPU_HAS_EL2		7 /* Support nested virtualization */ | 107 | #define KVM_ARM_VCPU_HAS_EL2		7 /* Support nested virtualization */ |
| 108 | #define KVM_ARM_VCPU_HAS_EL2_E2H0	8 /* Limit NV support to E2H RES0 */ | ||
| 111 | 109 | ||
| 112 | struct kvm_vcpu_init { | 110 | struct kvm_vcpu_init { |
| 113 | 	__u32 target; | 111 | 	__u32 target; |
| ... | @@ -368,6 +366,7 @@ enum { | ... | @@ -368,6 +366,7 @@ enum { |
| 368 | 	KVM_REG_ARM_STD_HYP_BIT_PV_TIME	= 0, | 366 | 	KVM_REG_ARM_STD_HYP_BIT_PV_TIME	= 0, |
| 369 | }; | 367 | }; |
| 370 | 368 | ||
| 369 | /* Vendor hyper call function numbers 0-63 */ | ||
| 371 | #define KVM_REG_ARM_VENDOR_HYP_BMAP		KVM_REG_ARM_FW_FEAT_BMAP_REG(2) | 370 | #define KVM_REG_ARM_VENDOR_HYP_BMAP		KVM_REG_ARM_FW_FEAT_BMAP_REG(2) |
| 372 | 371 | ||
| 373 | enum { | 372 | enum { |
| ... | @@ -375,6 +374,14 @@ enum { | ... | @@ -375,6 +374,14 @@ enum { |
| 375 | 	KVM_REG_ARM_VENDOR_HYP_BIT_PTP		= 1, | 374 | 	KVM_REG_ARM_VENDOR_HYP_BIT_PTP		= 1, |
| 376 | }; | 375 | }; |
| 377 | 376 | ||
| 377 | /* Vendor hyper call function numbers 64-127 */ | ||
| 378 | #define KVM_REG_ARM_VENDOR_HYP_BMAP_2		KVM_REG_ARM_FW_FEAT_BMAP_REG(3) | ||
| 379 | |||
| 380 | enum { | ||
| 381 | 	KVM_REG_ARM_VENDOR_HYP_BIT_DISCOVER_IMPL_VER	= 0, | ||
| 382 | 	KVM_REG_ARM_VENDOR_HYP_BIT_DISCOVER_IMPL_CPUS	= 1, | ||
| 383 | }; | ||
| 384 | |||
| 378 | /* Device Control API on vm fd */ | 385 | /* Device Control API on vm fd */ |
| 379 | #define KVM_ARM_VM_SMCCC_CTRL		0 | 386 | #define KVM_ARM_VM_SMCCC_CTRL		0 |
| 380 | #define KVM_ARM_VM_SMCCC_FILTER	0 | 387 | #define KVM_ARM_VM_SMCCC_FILTER	0 |
| ... | @@ -397,6 +404,7 @@ enum { | ... | @@ -397,6 +404,7 @@ enum { |
| 397 | #define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 | 404 | #define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 |
| 398 | #define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 | 405 | #define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 |
| 399 | #define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 | 406 | #define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 |
| 407 | #define KVM_DEV_ARM_VGIC_GRP_MAINT_IRQ 9 | ||
| 400 | #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT	10 | 408 | #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT	10 |
| 401 | #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ | 409 | #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ |
| 402 | 			(0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) | 410 | 			(0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) |
| ... | @@ -411,10 +419,11 @@ enum { | ... | @@ -411,10 +419,11 @@ enum { |
| 411 | 419 | ||
| 412 | /* Device Control API on vcpu fd */ | 420 | /* Device Control API on vcpu fd */ |
| 413 | #define KVM_ARM_VCPU_PMU_V3_CTRL	0 | 421 | #define KVM_ARM_VCPU_PMU_V3_CTRL	0 |
| 414 | #define KVM_ARM_VCPU_PMU_V3_IRQ	0 | 422 | #define KVM_ARM_VCPU_PMU_V3_IRQ		0 |
| 415 | #define KVM_ARM_VCPU_PMU_V3_INIT	1 | 423 | #define KVM_ARM_VCPU_PMU_V3_INIT		1 |
| 416 | #define KVM_ARM_VCPU_PMU_V3_FILTER	2 | 424 | #define KVM_ARM_VCPU_PMU_V3_FILTER		2 |
| 417 | #define KVM_ARM_VCPU_PMU_V3_SET_PMU	3 | 425 | #define KVM_ARM_VCPU_PMU_V3_SET_PMU		3 |
| 426 | #define KVM_ARM_VCPU_PMU_V3_SET_NR_COUNTERS	4 | ||
| 418 | #define KVM_ARM_VCPU_TIMER_CTRL		1 | 427 | #define KVM_ARM_VCPU_TIMER_CTRL		1 |
| 419 | #define KVM_ARM_VCPU_TIMER_IRQ_VTIMER		0 | 428 | #define KVM_ARM_VCPU_TIMER_IRQ_VTIMER		0 |
| 420 | #define KVM_ARM_VCPU_TIMER_IRQ_PTIMER		1 | 429 | #define KVM_ARM_VCPU_TIMER_IRQ_PTIMER		1 |
lib/libc/include/aarch64-linux-any/asm/unistd_64.h+3| ... | @@ -323,6 +323,9 @@ | ... | @@ -323,6 +323,9 @@ |
| 323 | #define __NR_getxattrat 464 | 323 | #define __NR_getxattrat 464 |
| 324 | #define __NR_listxattrat 465 | 324 | #define __NR_listxattrat 465 |
| 325 | #define __NR_removexattrat 466 | 325 | #define __NR_removexattrat 466 |
| 326 | #define __NR_open_tree_attr 467 | ||
| 327 | #define __NR_file_getattr 468 | ||
| 328 | #define __NR_file_setattr 469 | ||
| 326 | 329 | ||
| 327 | 330 | ||
| 328 | #endif /* _ASM_UNISTD_64_H */ | 331 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/asm-generic/fcntl.h-1| ... | @@ -6,7 +6,6 @@ | ... | @@ -6,7 +6,6 @@ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * FMODE_EXEC is 0x20 | 8 | * FMODE_EXEC is 0x20 |
| 9 | * FMODE_NONOTIFY is 0x4000000 | ||
| 10 | * These cannot be used by userspace O_* until internal and external open | 9 | * These cannot be used by userspace O_* until internal and external open |
| 11 | * flags are split. | 10 | * flags are split. |
| 12 | * -Eric Paris | 11 | * -Eric Paris |
lib/libc/include/any-linux-any/asm-generic/mman-common.h+1| ... | @@ -85,6 +85,7 @@ | ... | @@ -85,6 +85,7 @@ |
| 85 | /* compatibility flags */ | 85 | /* compatibility flags */ |
| 86 | #define MAP_FILE	0 | 86 | #define MAP_FILE	0 |
| 87 | 87 | ||
| 88 | #define PKEY_UNRESTRICTED	0x0 | ||
| 88 | #define PKEY_DISABLE_ACCESS	0x1 | 89 | #define PKEY_DISABLE_ACCESS	0x1 |
| 89 | #define PKEY_DISABLE_WRITE	0x2 | 90 | #define PKEY_DISABLE_WRITE	0x2 |
| 90 | #define PKEY_ACCESS_MASK	(PKEY_DISABLE_ACCESS |\ | 91 | #define PKEY_ACCESS_MASK	(PKEY_DISABLE_ACCESS |\ |
lib/libc/include/any-linux-any/asm-generic/param.h+5-1| ... | @@ -2,8 +2,12 @@ | ... | @@ -2,8 +2,12 @@ |
| 2 | #ifndef __ASM_GENERIC_PARAM_H | 2 | #ifndef __ASM_GENERIC_PARAM_H |
| 3 | #define __ASM_GENERIC_PARAM_H | 3 | #define __ASM_GENERIC_PARAM_H |
| 4 | 4 | ||
| 5 | #ifndef __USER_HZ | ||
| 6 | #define __USER_HZ	100 | ||
| 7 | #endif | ||
| 8 | |||
| 5 | #ifndef HZ | 9 | #ifndef HZ |
| 6 | #define HZ 100 | 10 | #define HZ __USER_HZ |
| 7 | #endif | 11 | #endif |
| 8 | 12 | ||
| 9 | #ifndef EXEC_PAGESIZE | 13 | #ifndef EXEC_PAGESIZE |
lib/libc/include/any-linux-any/asm-generic/socket.h+7| ... | @@ -143,6 +143,13 @@ | ... | @@ -143,6 +143,13 @@ |
| 143 | 143 | ||
| 144 | #define SCM_TS_OPT_ID		81 | 144 | #define SCM_TS_OPT_ID		81 |
| 145 | 145 | ||
| 146 | #define SO_RCVPRIORITY		82 | ||
| 147 | |||
| 148 | #define SO_PASSRIGHTS		83 | ||
| 149 | |||
| 150 | #define SO_INQ			84 | ||
| 151 | #define SCM_INQ			SO_INQ | ||
| 152 | |||
| 146 | 153 | ||
| 147 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) | 154 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) |
| 148 | /* on 64-bit and x32, avoid the ?: operator */ | 155 | /* on 64-bit and x32, avoid the ?: operator */ |
lib/libc/include/any-linux-any/asm-generic/unistd.h+9-1| ... | @@ -849,9 +849,17 @@ __SYSCALL(__NR_getxattrat, sys_getxattrat) | ... | @@ -849,9 +849,17 @@ __SYSCALL(__NR_getxattrat, sys_getxattrat) |
| 849 | __SYSCALL(__NR_listxattrat, sys_listxattrat) | 849 | __SYSCALL(__NR_listxattrat, sys_listxattrat) |
| 850 | #define __NR_removexattrat 466 | 850 | #define __NR_removexattrat 466 |
| 851 | __SYSCALL(__NR_removexattrat, sys_removexattrat) | 851 | __SYSCALL(__NR_removexattrat, sys_removexattrat) |
| 852 | #define __NR_open_tree_attr 467 | ||
| 853 | __SYSCALL(__NR_open_tree_attr, sys_open_tree_attr) | ||
| 854 | |||
| 855 | /* fs/inode.c */ | ||
| 856 | #define __NR_file_getattr 468 | ||
| 857 | __SYSCALL(__NR_file_getattr, sys_file_getattr) | ||
| 858 | #define __NR_file_setattr 469 | ||
| 859 | __SYSCALL(__NR_file_setattr, sys_file_setattr) | ||
| 852 | 860 | ||
| 853 | #undef __NR_syscalls | 861 | #undef __NR_syscalls |
| 854 | #define __NR_syscalls 467 | 862 | #define __NR_syscalls 470 |
| 855 | 863 | ||
| 856 | /* | 864 | /* |
| 857 | * 32 bit systems traditionally used different | 865 | * 32 bit systems traditionally used different |
lib/libc/include/any-linux-any/asm/setup.h deleted-1| ... | @@ -1 +0,0 @@ | ||
| 1 | #include <asm-generic/setup.h> | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/cxl/features.h created+168| ... | @@ -0,0 +1,168 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2024,2025, Intel Corporation | ||
| 4 | * | ||
| 5 | * These are definitions for the mailbox command interface of CXL subsystem. | ||
| 6 | */ | ||
| 7 | #ifndef _CXL_FEATURES_H_ | ||
| 8 | #define _CXL_FEATURES_H_ | ||
| 9 | |||
| 10 | #include <linux/types.h> | ||
| 11 | |||
| 12 | typedef unsigned char __uapi_uuid_t[16]; | ||
| 13 | |||
| 14 | |||
| 15 | /* | ||
| 16 | * struct cxl_mbox_get_sup_feats_in - Get Supported Features input | ||
| 17 | * | ||
| 18 | * @count: bytes of Feature data to return in output | ||
| 19 | * @start_idx: index of first requested Supported Feature Entry, 0 based. | ||
| 20 | * @reserved: reserved field, must be 0s. | ||
| 21 | * | ||
| 22 | * Get Supported Features (0x500h) CXL r3.2 8.2.9.6.1 command. | ||
| 23 | * Input block for Get support Feature | ||
| 24 | */ | ||
| 25 | struct cxl_mbox_get_sup_feats_in { | ||
| 26 | 	__le32 count; | ||
| 27 | 	__le16 start_idx; | ||
| 28 | 	__u8 reserved[2]; | ||
| 29 | } __attribute__ ((__packed__)); | ||
| 30 | |||
| 31 | /* CXL spec r3.2 Table 8-87 command effects */ | ||
| 32 | #define CXL_CMD_CONFIG_CHANGE_COLD_RESET	BIT(0) | ||
| 33 | #define CXL_CMD_CONFIG_CHANGE_IMMEDIATE		BIT(1) | ||
| 34 | #define CXL_CMD_DATA_CHANGE_IMMEDIATE		BIT(2) | ||
| 35 | #define CXL_CMD_POLICY_CHANGE_IMMEDIATE		BIT(3) | ||
| 36 | #define CXL_CMD_LOG_CHANGE_IMMEDIATE		BIT(4) | ||
| 37 | #define CXL_CMD_SECURITY_STATE_CHANGE		BIT(5) | ||
| 38 | #define CXL_CMD_BACKGROUND			BIT(6) | ||
| 39 | #define CXL_CMD_BGCMD_ABORT_SUPPORTED		BIT(7) | ||
| 40 | #define CXL_CMD_EFFECTS_VALID			BIT(9) | ||
| 41 | #define CXL_CMD_CONFIG_CHANGE_CONV_RESET	BIT(10) | ||
| 42 | #define CXL_CMD_CONFIG_CHANGE_CXL_RESET		BIT(11) | ||
| 43 | #define CXL_CMD_EFFECTS_RESERVED		GENMASK(15, 12) | ||
| 44 | |||
| 45 | /* | ||
| 46 | * struct cxl_feat_entry - Supported Feature Entry | ||
| 47 | * @uuid: UUID of the Feature | ||
| 48 | * @id: id to identify the feature. 0 based | ||
| 49 | * @get_feat_size: max bytes required for Get Feature command for this Feature | ||
| 50 | * @set_feat_size: max bytes required for Set Feature command for this Feature | ||
| 51 | * @flags: attribute flags | ||
| 52 | * @get_feat_ver: Get Feature version | ||
| 53 | * @set_feat_ver: Set Feature version | ||
| 54 | * @effects: Set Feature command effects | ||
| 55 | * @reserved: reserved, must be 0 | ||
| 56 | * | ||
| 57 | * CXL spec r3.2 Table 8-109 | ||
| 58 | * Get Supported Features Supported Feature Entry | ||
| 59 | */ | ||
| 60 | struct cxl_feat_entry { | ||
| 61 | 	__uapi_uuid_t uuid; | ||
| 62 | 	__le16 id; | ||
| 63 | 	__le16 get_feat_size; | ||
| 64 | 	__le16 set_feat_size; | ||
| 65 | 	__le32 flags; | ||
| 66 | 	__u8 get_feat_ver; | ||
| 67 | 	__u8 set_feat_ver; | ||
| 68 | 	__le16 effects; | ||
| 69 | 	__u8 reserved[18]; | ||
| 70 | } __attribute__ ((__packed__)); | ||
| 71 | |||
| 72 | /* @flags field for 'struct cxl_feat_entry' */ | ||
| 73 | #define CXL_FEATURE_F_CHANGEABLE		BIT(0) | ||
| 74 | #define CXL_FEATURE_F_PERSIST_FW_UPDATE		BIT(4) | ||
| 75 | #define CXL_FEATURE_F_DEFAULT_SEL		BIT(5) | ||
| 76 | #define CXL_FEATURE_F_SAVED_SEL			BIT(6) | ||
| 77 | |||
| 78 | /* | ||
| 79 | * struct cxl_mbox_get_sup_feats_out - Get Supported Features output | ||
| 80 | * @num_entries: number of Supported Feature Entries returned | ||
| 81 | * @supported_feats: number of supported Features | ||
| 82 | * @reserved: reserved, must be 0s. | ||
| 83 | * @ents: Supported Feature Entries array | ||
| 84 | * | ||
| 85 | * CXL spec r3.2 Table 8-108 | ||
| 86 | * Get supported Features Output Payload | ||
| 87 | */ | ||
| 88 | struct cxl_mbox_get_sup_feats_out { | ||
| 89 | 	__struct_group(cxl_mbox_get_sup_feats_out_hdr, hdr, /* no attrs */, | ||
| 90 | 		__le16 num_entries; | ||
| 91 | 		__le16 supported_feats; | ||
| 92 | 		__u8 reserved[4]; | ||
| 93 | 	); | ||
| 94 | 	struct cxl_feat_entry ents[] __counted_by_le(num_entries); | ||
| 95 | } __attribute__ ((__packed__)); | ||
| 96 | |||
| 97 | /* | ||
| 98 | * Get Feature CXL spec r3.2 Spec 8.2.9.6.2 | ||
| 99 | */ | ||
| 100 | |||
| 101 | /* | ||
| 102 | * struct cxl_mbox_get_feat_in - Get Feature input | ||
| 103 | * @uuid: UUID for Feature | ||
| 104 | * @offset: offset of the first byte in Feature data for output payload | ||
| 105 | * @count: count in bytes of Feature data returned | ||
| 106 | * @selection: 0 current value, 1 default value, 2 saved value | ||
| 107 | * | ||
| 108 | * CXL spec r3.2 section 8.2.9.6.2 Table 8-99 | ||
| 109 | */ | ||
| 110 | struct cxl_mbox_get_feat_in { | ||
| 111 | 	__uapi_uuid_t uuid; | ||
| 112 | 	__le16 offset; | ||
| 113 | 	__le16 count; | ||
| 114 | 	__u8 selection; | ||
| 115 | } __attribute__ ((__packed__)); | ||
| 116 | |||
| 117 | /* | ||
| 118 | * enum cxl_get_feat_selection - selection field of Get Feature input | ||
| 119 | */ | ||
| 120 | enum cxl_get_feat_selection { | ||
| 121 | 	CXL_GET_FEAT_SEL_CURRENT_VALUE, | ||
| 122 | 	CXL_GET_FEAT_SEL_DEFAULT_VALUE, | ||
| 123 | 	CXL_GET_FEAT_SEL_SAVED_VALUE, | ||
| 124 | 	CXL_GET_FEAT_SEL_MAX | ||
| 125 | }; | ||
| 126 | |||
| 127 | /* | ||
| 128 | * Set Feature CXL spec r3.2 8.2.9.6.3 | ||
| 129 | */ | ||
| 130 | |||
| 131 | /* | ||
| 132 | * struct cxl_mbox_set_feat_in - Set Features input | ||
| 133 | * @uuid: UUID for Feature | ||
| 134 | * @flags: set feature flags | ||
| 135 | * @offset: byte offset of Feature data to update | ||
| 136 | * @version: Feature version of the data in Feature Data | ||
| 137 | * @rsvd: reserved, must be 0s. | ||
| 138 | * @feat_data: raw byte stream of Features data to update | ||
| 139 | * | ||
| 140 | * CXL spec r3.2 section 8.2.9.6.3 Table 8-101 | ||
| 141 | */ | ||
| 142 | struct cxl_mbox_set_feat_in { | ||
| 143 | 	__struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */, | ||
| 144 | 		__uapi_uuid_t uuid; | ||
| 145 | 		__le32 flags; | ||
| 146 | 		__le16 offset; | ||
| 147 | 		__u8 version; | ||
| 148 | 		__u8 rsvd[9]; | ||
| 149 | 	); | ||
| 150 | 	__u8 feat_data[]; | ||
| 151 | } __attribute__((packed)); | ||
| 152 | |||
| 153 | /* | ||
| 154 | * enum cxl_set_feat_flag_data_transfer - Set Feature flags field | ||
| 155 | */ | ||
| 156 | enum cxl_set_feat_flag_data_transfer { | ||
| 157 | 	CXL_SET_FEAT_FLAG_FULL_DATA_TRANSFER = 0, | ||
| 158 | 	CXL_SET_FEAT_FLAG_INITIATE_DATA_TRANSFER, | ||
| 159 | 	CXL_SET_FEAT_FLAG_CONTINUE_DATA_TRANSFER, | ||
| 160 | 	CXL_SET_FEAT_FLAG_FINISH_DATA_TRANSFER, | ||
| 161 | 	CXL_SET_FEAT_FLAG_ABORT_DATA_TRANSFER, | ||
| 162 | 	CXL_SET_FEAT_FLAG_DATA_TRANSFER_MAX | ||
| 163 | }; | ||
| 164 | |||
| 165 | #define CXL_SET_FEAT_FLAG_DATA_TRANSFER_MASK		GENMASK(2, 0) | ||
| 166 | #define CXL_SET_FEAT_FLAG_DATA_SAVED_ACROSS_RESET	BIT(3) | ||
| 167 | |||
| 168 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/amdgpu_drm.h+329| ... | @@ -54,6 +54,9 @@ extern "C" { | ... | @@ -54,6 +54,9 @@ extern "C" { |
| 54 | #define DRM_AMDGPU_VM			0x13 | 54 | #define DRM_AMDGPU_VM			0x13 |
| 55 | #define DRM_AMDGPU_FENCE_TO_HANDLE	0x14 | 55 | #define DRM_AMDGPU_FENCE_TO_HANDLE	0x14 |
| 56 | #define DRM_AMDGPU_SCHED		0x15 | 56 | #define DRM_AMDGPU_SCHED		0x15 |
| 57 | #define DRM_AMDGPU_USERQ		0x16 | ||
| 58 | #define DRM_AMDGPU_USERQ_SIGNAL		0x17 | ||
| 59 | #define DRM_AMDGPU_USERQ_WAIT		0x18 | ||
| 57 | 60 | ||
| 58 | #define DRM_IOCTL_AMDGPU_GEM_CREATE	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) | 61 | #define DRM_IOCTL_AMDGPU_GEM_CREATE	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) |
| 59 | #define DRM_IOCTL_AMDGPU_GEM_MMAP	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) | 62 | #define DRM_IOCTL_AMDGPU_GEM_MMAP	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) |
| ... | @@ -71,6 +74,9 @@ extern "C" { | ... | @@ -71,6 +74,9 @@ extern "C" { |
| 71 | #define DRM_IOCTL_AMDGPU_VM		DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) | 74 | #define DRM_IOCTL_AMDGPU_VM		DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) |
| 72 | #define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle) | 75 | #define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle) |
| 73 | #define DRM_IOCTL_AMDGPU_SCHED		DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched) | 76 | #define DRM_IOCTL_AMDGPU_SCHED		DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched) |
| 77 | #define DRM_IOCTL_AMDGPU_USERQ		DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ, union drm_amdgpu_userq) | ||
| 78 | #define DRM_IOCTL_AMDGPU_USERQ_SIGNAL	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal) | ||
| 79 | #define DRM_IOCTL_AMDGPU_USERQ_WAIT	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait) | ||
| 74 | 80 | ||
| 75 | /** | 81 | /** |
| 76 | * DOC: memory domains | 82 | * DOC: memory domains |
| ... | @@ -319,6 +325,260 @@ union drm_amdgpu_ctx { | ... | @@ -319,6 +325,260 @@ union drm_amdgpu_ctx { |
| 319 | 	union drm_amdgpu_ctx_out out; | 325 | 	union drm_amdgpu_ctx_out out; |
| 320 | }; | 326 | }; |
| 321 | 327 | ||
| 328 | /* user queue IOCTL operations */ | ||
| 329 | #define AMDGPU_USERQ_OP_CREATE	1 | ||
| 330 | #define AMDGPU_USERQ_OP_FREE	2 | ||
| 331 | |||
| 332 | /* queue priority levels */ | ||
| 333 | /* low < normal low < normal high < high */ | ||
| 334 | #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_MASK 0x3 | ||
| 335 | #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_SHIFT 0 | ||
| 336 | #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_NORMAL_LOW 0 | ||
| 337 | #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_LOW 1 | ||
| 338 | #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_NORMAL_HIGH 2 | ||
| 339 | #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH 3 /* admin only */ | ||
| 340 | /* for queues that need access to protected content */ | ||
| 341 | #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_SECURE (1 << 2) | ||
| 342 | |||
| 343 | /* | ||
| 344 | * This structure is a container to pass input configuration | ||
| 345 | * info for all supported userqueue related operations. | ||
| 346 | * For operation AMDGPU_USERQ_OP_CREATE: user is expected | ||
| 347 | * to set all fields, excep the parameter 'queue_id'. | ||
| 348 | * For operation AMDGPU_USERQ_OP_FREE: the only input parameter expected | ||
| 349 | * to be set is 'queue_id', eveything else is ignored. | ||
| 350 | */ | ||
| 351 | struct drm_amdgpu_userq_in { | ||
| 352 | 	/** AMDGPU_USERQ_OP_* */ | ||
| 353 | 	__u32	op; | ||
| 354 | 	/** Queue id passed for operation USERQ_OP_FREE */ | ||
| 355 | 	__u32	queue_id; | ||
| 356 | 	/** the target GPU engine to execute workload (AMDGPU_HW_IP_*) */ | ||
| 357 | 	__u32 ip_type; | ||
| 358 | 	/** | ||
| 359 | 	 * @doorbell_handle: the handle of doorbell GEM object | ||
| 360 | 	 * associated with this userqueue client. | ||
| 361 | 	 */ | ||
| 362 | 	__u32 doorbell_handle; | ||
| 363 | 	/** | ||
| 364 | 	 * @doorbell_offset: 32-bit offset of the doorbell in the doorbell bo. | ||
| 365 | 	 * Kernel will generate absolute doorbell offset using doorbell_handle | ||
| 366 | 	 * and doorbell_offset in the doorbell bo. | ||
| 367 | 	 */ | ||
| 368 | 	__u32 doorbell_offset; | ||
| 369 | 	/** | ||
| 370 | 	 * @flags: flags used for queue parameters | ||
| 371 | 	 */ | ||
| 372 | 	__u32 flags; | ||
| 373 | 	/** | ||
| 374 | 	 * @queue_va: Virtual address of the GPU memory which holds the queue | ||
| 375 | 	 * object. The queue holds the workload packets. | ||
| 376 | 	 */ | ||
| 377 | 	__u64 queue_va; | ||
| 378 | 	/** | ||
| 379 | 	 * @queue_size: Size of the queue in bytes, this needs to be 256-byte | ||
| 380 | 	 * aligned. | ||
| 381 | 	 */ | ||
| 382 | 	__u64 queue_size; | ||
| 383 | 	/** | ||
| 384 | 	 * @rptr_va : Virtual address of the GPU memory which holds the ring RPTR. | ||
| 385 | 	 * This object must be at least 8 byte in size and aligned to 8-byte offset. | ||
| 386 | 	 */ | ||
| 387 | 	__u64 rptr_va; | ||
| 388 | 	/** | ||
| 389 | 	 * @wptr_va : Virtual address of the GPU memory which holds the ring WPTR. | ||
| 390 | 	 * This object must be at least 8 byte in size and aligned to 8-byte offset. | ||
| 391 | 	 * | ||
| 392 | 	 * Queue, RPTR and WPTR can come from the same object, as long as the size | ||
| 393 | 	 * and alignment related requirements are met. | ||
| 394 | 	 */ | ||
| 395 | 	__u64 wptr_va; | ||
| 396 | 	/** | ||
| 397 | 	 * @mqd: MQD (memory queue descriptor) is a set of parameters which allow | ||
| 398 | 	 * the GPU to uniquely define and identify a usermode queue. | ||
| 399 | 	 * | ||
| 400 | 	 * MQD data can be of different size for different GPU IP/engine and | ||
| 401 | 	 * their respective versions/revisions, so this points to a __u64 * | ||
| 402 | 	 * which holds IP specific MQD of this usermode queue. | ||
| 403 | 	 */ | ||
| 404 | 	__u64 mqd; | ||
| 405 | 	/** | ||
| 406 | 	 * @size: size of MQD data in bytes, it must match the MQD structure | ||
| 407 | 	 * size of the respective engine/revision defined in UAPI for ex, for | ||
| 408 | 	 * gfx11 workloads, size = sizeof(drm_amdgpu_userq_mqd_gfx11). | ||
| 409 | 	 */ | ||
| 410 | 	__u64 mqd_size; | ||
| 411 | }; | ||
| 412 | |||
| 413 | /* The structure to carry output of userqueue ops */ | ||
| 414 | struct drm_amdgpu_userq_out { | ||
| 415 | 	/** | ||
| 416 | 	 * For operation AMDGPU_USERQ_OP_CREATE: This field contains a unique | ||
| 417 | 	 * queue ID to represent the newly created userqueue in the system, otherwise | ||
| 418 | 	 * it should be ignored. | ||
| 419 | 	 */ | ||
| 420 | 	__u32	queue_id; | ||
| 421 | 	__u32 _pad; | ||
| 422 | }; | ||
| 423 | |||
| 424 | union drm_amdgpu_userq { | ||
| 425 | 	struct drm_amdgpu_userq_in in; | ||
| 426 | 	struct drm_amdgpu_userq_out out; | ||
| 427 | }; | ||
| 428 | |||
| 429 | /* GFX V11 IP specific MQD parameters */ | ||
| 430 | struct drm_amdgpu_userq_mqd_gfx11 { | ||
| 431 | 	/** | ||
| 432 | 	 * @shadow_va: Virtual address of the GPU memory to hold the shadow buffer. | ||
| 433 | 	 * Use AMDGPU_INFO_IOCTL to find the exact size of the object. | ||
| 434 | 	 */ | ||
| 435 | 	__u64 shadow_va; | ||
| 436 | 	/** | ||
| 437 | 	 * @csa_va: Virtual address of the GPU memory to hold the CSA buffer. | ||
| 438 | 	 * Use AMDGPU_INFO_IOCTL to find the exact size of the object. | ||
| 439 | 	 */ | ||
| 440 | 	__u64 csa_va; | ||
| 441 | }; | ||
| 442 | |||
| 443 | /* GFX V11 SDMA IP specific MQD parameters */ | ||
| 444 | struct drm_amdgpu_userq_mqd_sdma_gfx11 { | ||
| 445 | 	/** | ||
| 446 | 	 * @csa_va: Virtual address of the GPU memory to hold the CSA buffer. | ||
| 447 | 	 * This must be a from a separate GPU object, and use AMDGPU_INFO IOCTL | ||
| 448 | 	 * to get the size. | ||
| 449 | 	 */ | ||
| 450 | 	__u64 csa_va; | ||
| 451 | }; | ||
| 452 | |||
| 453 | /* GFX V11 Compute IP specific MQD parameters */ | ||
| 454 | struct drm_amdgpu_userq_mqd_compute_gfx11 { | ||
| 455 | 	/** | ||
| 456 | 	 * @eop_va: Virtual address of the GPU memory to hold the EOP buffer. | ||
| 457 | 	 * This must be a from a separate GPU object, and use AMDGPU_INFO IOCTL | ||
| 458 | 	 * to get the size. | ||
| 459 | 	 */ | ||
| 460 | 	__u64 eop_va; | ||
| 461 | }; | ||
| 462 | |||
| 463 | /* userq signal/wait ioctl */ | ||
| 464 | struct drm_amdgpu_userq_signal { | ||
| 465 | 	/** | ||
| 466 | 	 * @queue_id: Queue handle used by the userq fence creation function | ||
| 467 | 	 * to retrieve the WPTR. | ||
| 468 | 	 */ | ||
| 469 | 	__u32	queue_id; | ||
| 470 | 	__u32	pad; | ||
| 471 | 	/** | ||
| 472 | 	 * @syncobj_handles: The list of syncobj handles submitted by the user queue | ||
| 473 | 	 * job to be signaled. | ||
| 474 | 	 */ | ||
| 475 | 	__u64	syncobj_handles; | ||
| 476 | 	/** | ||
| 477 | 	 * @num_syncobj_handles: A count that represents the number of syncobj handles in | ||
| 478 | 	 * @syncobj_handles. | ||
| 479 | 	 */ | ||
| 480 | 	__u64	num_syncobj_handles; | ||
| 481 | 	/** | ||
| 482 | 	 * @bo_read_handles: The list of BO handles that the submitted user queue job | ||
| 483 | 	 * is using for read only. This will update BO fences in the kernel. | ||
| 484 | 	 */ | ||
| 485 | 	__u64	bo_read_handles; | ||
| 486 | 	/** | ||
| 487 | 	 * @bo_write_handles: The list of BO handles that the submitted user queue job | ||
| 488 | 	 * is using for write only. This will update BO fences in the kernel. | ||
| 489 | 	 */ | ||
| 490 | 	__u64	bo_write_handles; | ||
| 491 | 	/** | ||
| 492 | 	 * @num_bo_read_handles: A count that represents the number of read BO handles in | ||
| 493 | 	 * @bo_read_handles. | ||
| 494 | 	 */ | ||
| 495 | 	__u32	num_bo_read_handles; | ||
| 496 | 	/** | ||
| 497 | 	 * @num_bo_write_handles: A count that represents the number of write BO handles in | ||
| 498 | 	 * @bo_write_handles. | ||
| 499 | 	 */ | ||
| 500 | 	__u32	num_bo_write_handles; | ||
| 501 | }; | ||
| 502 | |||
| 503 | struct drm_amdgpu_userq_fence_info { | ||
| 504 | 	/** | ||
| 505 | 	 * @va: A gpu address allocated for each queue which stores the | ||
| 506 | 	 * read pointer (RPTR) value. | ||
| 507 | 	 */ | ||
| 508 | 	__u64	va; | ||
| 509 | 	/** | ||
| 510 | 	 * @value: A 64 bit value represents the write pointer (WPTR) of the | ||
| 511 | 	 * queue commands which compared with the RPTR value to signal the | ||
| 512 | 	 * fences. | ||
| 513 | 	 */ | ||
| 514 | 	__u64	value; | ||
| 515 | }; | ||
| 516 | |||
| 517 | struct drm_amdgpu_userq_wait { | ||
| 518 | 	/** | ||
| 519 | 	 * @waitq_id: Queue handle used by the userq wait IOCTL to retrieve the | ||
| 520 | 	 * wait queue and maintain the fence driver references in it. | ||
| 521 | 	 */ | ||
| 522 | 	__u32	waitq_id; | ||
| 523 | 	__u32	pad; | ||
| 524 | 	/** | ||
| 525 | 	 * @syncobj_handles: The list of syncobj handles submitted by the user queue | ||
| 526 | 	 * job to get the va/value pairs. | ||
| 527 | 	 */ | ||
| 528 | 	__u64	syncobj_handles; | ||
| 529 | 	/** | ||
| 530 | 	 * @syncobj_timeline_handles: The list of timeline syncobj handles submitted by | ||
| 531 | 	 * the user queue job to get the va/value pairs at given @syncobj_timeline_points. | ||
| 532 | 	 */ | ||
| 533 | 	__u64	syncobj_timeline_handles; | ||
| 534 | 	/** | ||
| 535 | 	 * @syncobj_timeline_points: The list of timeline syncobj points submitted by the | ||
| 536 | 	 * user queue job for the corresponding @syncobj_timeline_handles. | ||
| 537 | 	 */ | ||
| 538 | 	__u64	syncobj_timeline_points; | ||
| 539 | 	/** | ||
| 540 | 	 * @bo_read_handles: The list of read BO handles submitted by the user queue | ||
| 541 | 	 * job to get the va/value pairs. | ||
| 542 | 	 */ | ||
| 543 | 	__u64	bo_read_handles; | ||
| 544 | 	/** | ||
| 545 | 	 * @bo_write_handles: The list of write BO handles submitted by the user queue | ||
| 546 | 	 * job to get the va/value pairs. | ||
| 547 | 	 */ | ||
| 548 | 	__u64	bo_write_handles; | ||
| 549 | 	/** | ||
| 550 | 	 * @num_syncobj_timeline_handles: A count that represents the number of timeline | ||
| 551 | 	 * syncobj handles in @syncobj_timeline_handles. | ||
| 552 | 	 */ | ||
| 553 | 	__u16	num_syncobj_timeline_handles; | ||
| 554 | 	/** | ||
| 555 | 	 * @num_fences: This field can be used both as input and output. As input it defines | ||
| 556 | 	 * the maximum number of fences that can be returned and as output it will specify | ||
| 557 | 	 * how many fences were actually returned from the ioctl. | ||
| 558 | 	 */ | ||
| 559 | 	__u16	num_fences; | ||
| 560 | 	/** | ||
| 561 | 	 * @num_syncobj_handles: A count that represents the number of syncobj handles in | ||
| 562 | 	 * @syncobj_handles. | ||
| 563 | 	 */ | ||
| 564 | 	__u32	num_syncobj_handles; | ||
| 565 | 	/** | ||
| 566 | 	 * @num_bo_read_handles: A count that represents the number of read BO handles in | ||
| 567 | 	 * @bo_read_handles. | ||
| 568 | 	 */ | ||
| 569 | 	__u32	num_bo_read_handles; | ||
| 570 | 	/** | ||
| 571 | 	 * @num_bo_write_handles: A count that represents the number of write BO handles in | ||
| 572 | 	 * @bo_write_handles. | ||
| 573 | 	 */ | ||
| 574 | 	__u32	num_bo_write_handles; | ||
| 575 | 	/** | ||
| 576 | 	 * @out_fences: The field is a return value from the ioctl containing the list of | ||
| 577 | 	 * address/value pairs to wait for. | ||
| 578 | 	 */ | ||
| 579 | 	__u64	out_fences; | ||
| 580 | }; | ||
| 581 | |||
| 322 | /* vm ioctl */ | 582 | /* vm ioctl */ |
| 323 | #define AMDGPU_VM_OP_RESERVE_VMID	1 | 583 | #define AMDGPU_VM_OP_RESERVE_VMID	1 |
| 324 | #define AMDGPU_VM_OP_UNRESERVE_VMID	2 | 584 | #define AMDGPU_VM_OP_UNRESERVE_VMID	2 |
| ... | @@ -599,6 +859,19 @@ struct drm_amdgpu_gem_va { | ... | @@ -599,6 +859,19 @@ struct drm_amdgpu_gem_va { |
| 599 | 	__u64 offset_in_bo; | 859 | 	__u64 offset_in_bo; |
| 600 | 	/** Specify mapping size. Must be correctly aligned. */ | 860 | 	/** Specify mapping size. Must be correctly aligned. */ |
| 601 | 	__u64 map_size; | 861 | 	__u64 map_size; |
| 862 | 	/** | ||
| 863 | 	 * vm_timeline_point is a sequence number used to add new timeline point. | ||
| 864 | 	 */ | ||
| 865 | 	__u64 vm_timeline_point; | ||
| 866 | 	/** | ||
| 867 | 	 * The vm page table update fence is installed in given vm_timeline_syncobj_out | ||
| 868 | 	 * at vm_timeline_point. | ||
| 869 | 	 */ | ||
| 870 | 	__u32 vm_timeline_syncobj_out; | ||
| 871 | 	/** the number of syncobj handles in @input_fence_syncobj_handles */ | ||
| 872 | 	__u32 num_syncobj_handles; | ||
| 873 | 	/** Array of sync object handle to wait for given input fences */ | ||
| 874 | 	__u64 input_fence_syncobj_handles; | ||
| 602 | }; | 875 | }; |
| 603 | 876 | ||
| 604 | #define AMDGPU_HW_IP_GFX 0 | 877 | #define AMDGPU_HW_IP_GFX 0 |
| ... | @@ -763,6 +1036,16 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow { | ... | @@ -763,6 +1036,16 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow { |
| 763 | #define AMDGPU_IDS_FLAGS_TMZ 0x4 | 1036 | #define AMDGPU_IDS_FLAGS_TMZ 0x4 |
| 764 | #define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x8 | 1037 | #define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x8 |
| 765 | 1038 | ||
| 1039 | /* | ||
| 1040 | * Query h/w info: Flag identifying VF/PF/PT mode | ||
| 1041 | * | ||
| 1042 | */ | ||
| 1043 | #define AMDGPU_IDS_FLAGS_MODE_MASK 0x300 | ||
| 1044 | #define AMDGPU_IDS_FLAGS_MODE_SHIFT 0x8 | ||
| 1045 | #define AMDGPU_IDS_FLAGS_MODE_PF 0x0 | ||
| 1046 | #define AMDGPU_IDS_FLAGS_MODE_VF 0x1 | ||
| 1047 | #define AMDGPU_IDS_FLAGS_MODE_PT 0x2 | ||
| 1048 | |||
| 766 | /* indicate if acceleration can be working */ | 1049 | /* indicate if acceleration can be working */ |
| 767 | #define AMDGPU_INFO_ACCEL_WORKING		0x00 | 1050 | #define AMDGPU_INFO_ACCEL_WORKING		0x00 |
| 768 | /* get the crtc_id from the mode object id? */ | 1051 | /* get the crtc_id from the mode object id? */ |
| ... | @@ -930,6 +1213,8 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow { | ... | @@ -930,6 +1213,8 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow { |
| 930 | #define AMDGPU_INFO_MAX_IBS			0x22 | 1213 | #define AMDGPU_INFO_MAX_IBS			0x22 |
| 931 | /* query last page fault info */ | 1214 | /* query last page fault info */ |
| 932 | #define AMDGPU_INFO_GPUVM_FAULT			0x23 | 1215 | #define AMDGPU_INFO_GPUVM_FAULT			0x23 |
| 1216 | /* query FW object size and alignment */ | ||
| 1217 | #define AMDGPU_INFO_UQ_FW_AREAS			0x24 | ||
| 933 | 1218 | ||
| 934 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT	0 | 1219 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT	0 |
| 935 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK	0xff | 1220 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK	0xff |
| ... | @@ -1083,6 +1368,7 @@ struct drm_amdgpu_info_vbios { | ... | @@ -1083,6 +1368,7 @@ struct drm_amdgpu_info_vbios { |
| 1083 | #define AMDGPU_VRAM_TYPE_DDR5 10 | 1368 | #define AMDGPU_VRAM_TYPE_DDR5 10 |
| 1084 | #define AMDGPU_VRAM_TYPE_LPDDR4 11 | 1369 | #define AMDGPU_VRAM_TYPE_LPDDR4 11 |
| 1085 | #define AMDGPU_VRAM_TYPE_LPDDR5 12 | 1370 | #define AMDGPU_VRAM_TYPE_LPDDR5 12 |
| 1371 | #define AMDGPU_VRAM_TYPE_HBM3E 13 | ||
| 1086 | 1372 | ||
| 1087 | struct drm_amdgpu_info_device { | 1373 | struct drm_amdgpu_info_device { |
| 1088 | 	/** PCI Device ID */ | 1374 | 	/** PCI Device ID */ |
| ... | @@ -1188,6 +1474,9 @@ struct drm_amdgpu_info_device { | ... | @@ -1188,6 +1474,9 @@ struct drm_amdgpu_info_device { |
| 1188 | 	__u32 csa_size; | 1474 | 	__u32 csa_size; |
| 1189 | 	/* context save area base virtual alignment for gfx11 */ | 1475 | 	/* context save area base virtual alignment for gfx11 */ |
| 1190 | 	__u32 csa_alignment; | 1476 | 	__u32 csa_alignment; |
| 1477 | 	/* Userq IP mask (1 << AMDGPU_HW_IP_*) */ | ||
| 1478 | 	__u32 userq_ip_mask; | ||
| 1479 | 	__u32 pad; | ||
| 1191 | }; | 1480 | }; |
| 1192 | 1481 | ||
| 1193 | struct drm_amdgpu_info_hw_ip { | 1482 | struct drm_amdgpu_info_hw_ip { |
| ... | @@ -1204,6 +1493,29 @@ struct drm_amdgpu_info_hw_ip { | ... | @@ -1204,6 +1493,29 @@ struct drm_amdgpu_info_hw_ip { |
| 1204 | 	__u32 available_rings; | 1493 | 	__u32 available_rings; |
| 1205 | 	/** version info: bits 23:16 major, 15:8 minor, 7:0 revision */ | 1494 | 	/** version info: bits 23:16 major, 15:8 minor, 7:0 revision */ |
| 1206 | 	__u32 ip_discovery_version; | 1495 | 	__u32 ip_discovery_version; |
| 1496 | 	/* Userq available slots */ | ||
| 1497 | 	__u32 userq_num_slots; | ||
| 1498 | }; | ||
| 1499 | |||
| 1500 | /* GFX metadata BO sizes and alignment info (in bytes) */ | ||
| 1501 | struct drm_amdgpu_info_uq_fw_areas_gfx { | ||
| 1502 | 	/* shadow area size */ | ||
| 1503 | 	__u32 shadow_size; | ||
| 1504 | 	/* shadow area base virtual mem alignment */ | ||
| 1505 | 	__u32 shadow_alignment; | ||
| 1506 | 	/* context save area size */ | ||
| 1507 | 	__u32 csa_size; | ||
| 1508 | 	/* context save area base virtual mem alignment */ | ||
| 1509 | 	__u32 csa_alignment; | ||
| 1510 | }; | ||
| 1511 | |||
| 1512 | /* IP specific fw related information used in the | ||
| 1513 | * subquery AMDGPU_INFO_UQ_FW_AREAS | ||
| 1514 | */ | ||
| 1515 | struct drm_amdgpu_info_uq_fw_areas { | ||
| 1516 | 	union { | ||
| 1517 | 		struct drm_amdgpu_info_uq_fw_areas_gfx gfx; | ||
| 1518 | 	}; | ||
| 1207 | }; | 1519 | }; |
| 1208 | 1520 | ||
| 1209 | struct drm_amdgpu_info_num_handles { | 1521 | struct drm_amdgpu_info_num_handles { |
| ... | @@ -1269,6 +1581,23 @@ struct drm_amdgpu_info_gpuvm_fault { | ... | @@ -1269,6 +1581,23 @@ struct drm_amdgpu_info_gpuvm_fault { |
| 1269 | 	__u32 vmhub; | 1581 | 	__u32 vmhub; |
| 1270 | }; | 1582 | }; |
| 1271 | 1583 | ||
| 1584 | struct drm_amdgpu_info_uq_metadata_gfx { | ||
| 1585 | 	/* shadow area size for gfx11 */ | ||
| 1586 | 	__u32 shadow_size; | ||
| 1587 | 	/* shadow area base virtual alignment for gfx11 */ | ||
| 1588 | 	__u32 shadow_alignment; | ||
| 1589 | 	/* context save area size for gfx11 */ | ||
| 1590 | 	__u32 csa_size; | ||
| 1591 | 	/* context save area base virtual alignment for gfx11 */ | ||
| 1592 | 	__u32 csa_alignment; | ||
| 1593 | }; | ||
| 1594 | |||
| 1595 | struct drm_amdgpu_info_uq_metadata { | ||
| 1596 | 	union { | ||
| 1597 | 		struct drm_amdgpu_info_uq_metadata_gfx gfx; | ||
| 1598 | 	}; | ||
| 1599 | }; | ||
| 1600 | |||
| 1272 | /* | 1601 | /* |
| 1273 | * Supported GPU families | 1602 | * Supported GPU families |
| 1274 | */ | 1603 | */ |
lib/libc/include/any-linux-any/drm/amdxdna_accel.h created+501| ... | @@ -0,0 +1,501 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2022-2024, Advanced Micro Devices, Inc. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _AMDXDNA_ACCEL_H_ | ||
| 7 | #define _AMDXDNA_ACCEL_H_ | ||
| 8 | |||
| 9 | #include <linux/stddef.h> | ||
| 10 | #include "drm.h" | ||
| 11 | |||
| 12 | #if defined(__cplusplus) | ||
| 13 | extern "C" { | ||
| 14 | #endif | ||
| 15 | |||
| 16 | #define AMDXDNA_INVALID_CMD_HANDLE	(~0UL) | ||
| 17 | #define AMDXDNA_INVALID_ADDR		(~0UL) | ||
| 18 | #define AMDXDNA_INVALID_CTX_HANDLE	0 | ||
| 19 | #define AMDXDNA_INVALID_BO_HANDLE	0 | ||
| 20 | #define AMDXDNA_INVALID_FENCE_HANDLE	0 | ||
| 21 | |||
| 22 | enum amdxdna_device_type { | ||
| 23 | 	AMDXDNA_DEV_TYPE_UNKNOWN = -1, | ||
| 24 | 	AMDXDNA_DEV_TYPE_KMQ, | ||
| 25 | }; | ||
| 26 | |||
| 27 | enum amdxdna_drm_ioctl_id { | ||
| 28 | 	DRM_AMDXDNA_CREATE_HWCTX, | ||
| 29 | 	DRM_AMDXDNA_DESTROY_HWCTX, | ||
| 30 | 	DRM_AMDXDNA_CONFIG_HWCTX, | ||
| 31 | 	DRM_AMDXDNA_CREATE_BO, | ||
| 32 | 	DRM_AMDXDNA_GET_BO_INFO, | ||
| 33 | 	DRM_AMDXDNA_SYNC_BO, | ||
| 34 | 	DRM_AMDXDNA_EXEC_CMD, | ||
| 35 | 	DRM_AMDXDNA_GET_INFO, | ||
| 36 | 	DRM_AMDXDNA_SET_STATE, | ||
| 37 | }; | ||
| 38 | |||
| 39 | /** | ||
| 40 | * struct qos_info - QoS information for driver. | ||
| 41 | * @gops: Giga operations per second. | ||
| 42 | * @fps: Frames per second. | ||
| 43 | * @dma_bandwidth: DMA bandwidtha. | ||
| 44 | * @latency: Frame response latency. | ||
| 45 | * @frame_exec_time: Frame execution time. | ||
| 46 | * @priority: Request priority. | ||
| 47 | * | ||
| 48 | * User program can provide QoS hints to driver. | ||
| 49 | */ | ||
| 50 | struct amdxdna_qos_info { | ||
| 51 | 	__u32 gops; | ||
| 52 | 	__u32 fps; | ||
| 53 | 	__u32 dma_bandwidth; | ||
| 54 | 	__u32 latency; | ||
| 55 | 	__u32 frame_exec_time; | ||
| 56 | 	__u32 priority; | ||
| 57 | }; | ||
| 58 | |||
| 59 | /** | ||
| 60 | * struct amdxdna_drm_create_hwctx - Create hardware context. | ||
| 61 | * @ext: MBZ. | ||
| 62 | * @ext_flags: MBZ. | ||
| 63 | * @qos_p: Address of QoS info. | ||
| 64 | * @umq_bo: BO handle for user mode queue(UMQ). | ||
| 65 | * @log_buf_bo: BO handle for log buffer. | ||
| 66 | * @max_opc: Maximum operations per cycle. | ||
| 67 | * @num_tiles: Number of AIE tiles. | ||
| 68 | * @mem_size: Size of AIE tile memory. | ||
| 69 | * @umq_doorbell: Returned offset of doorbell associated with UMQ. | ||
| 70 | * @handle: Returned hardware context handle. | ||
| 71 | * @syncobj_handle: Returned syncobj handle for command completion. | ||
| 72 | */ | ||
| 73 | struct amdxdna_drm_create_hwctx { | ||
| 74 | 	__u64 ext; | ||
| 75 | 	__u64 ext_flags; | ||
| 76 | 	__u64 qos_p; | ||
| 77 | 	__u32 umq_bo; | ||
| 78 | 	__u32 log_buf_bo; | ||
| 79 | 	__u32 max_opc; | ||
| 80 | 	__u32 num_tiles; | ||
| 81 | 	__u32 mem_size; | ||
| 82 | 	__u32 umq_doorbell; | ||
| 83 | 	__u32 handle; | ||
| 84 | 	__u32 syncobj_handle; | ||
| 85 | }; | ||
| 86 | |||
| 87 | /** | ||
| 88 | * struct amdxdna_drm_destroy_hwctx - Destroy hardware context. | ||
| 89 | * @handle: Hardware context handle. | ||
| 90 | * @pad: MBZ. | ||
| 91 | */ | ||
| 92 | struct amdxdna_drm_destroy_hwctx { | ||
| 93 | 	__u32 handle; | ||
| 94 | 	__u32 pad; | ||
| 95 | }; | ||
| 96 | |||
| 97 | /** | ||
| 98 | * struct amdxdna_cu_config - configuration for one CU | ||
| 99 | * @cu_bo: CU configuration buffer bo handle. | ||
| 100 | * @cu_func: Function of a CU. | ||
| 101 | * @pad: MBZ. | ||
| 102 | */ | ||
| 103 | struct amdxdna_cu_config { | ||
| 104 | 	__u32 cu_bo; | ||
| 105 | 	__u8 cu_func; | ||
| 106 | 	__u8 pad[3]; | ||
| 107 | }; | ||
| 108 | |||
| 109 | /** | ||
| 110 | * struct amdxdna_hwctx_param_config_cu - configuration for CUs in hardware context | ||
| 111 | * @num_cus: Number of CUs to configure. | ||
| 112 | * @pad: MBZ. | ||
| 113 | * @cu_configs: Array of CU configurations of struct amdxdna_cu_config. | ||
| 114 | */ | ||
| 115 | struct amdxdna_hwctx_param_config_cu { | ||
| 116 | 	__u16 num_cus; | ||
| 117 | 	__u16 pad[3]; | ||
| 118 | 	struct amdxdna_cu_config cu_configs[] __counted_by(num_cus); | ||
| 119 | }; | ||
| 120 | |||
| 121 | enum amdxdna_drm_config_hwctx_param { | ||
| 122 | 	DRM_AMDXDNA_HWCTX_CONFIG_CU, | ||
| 123 | 	DRM_AMDXDNA_HWCTX_ASSIGN_DBG_BUF, | ||
| 124 | 	DRM_AMDXDNA_HWCTX_REMOVE_DBG_BUF, | ||
| 125 | }; | ||
| 126 | |||
| 127 | /** | ||
| 128 | * struct amdxdna_drm_config_hwctx - Configure hardware context. | ||
| 129 | * @handle: hardware context handle. | ||
| 130 | * @param_type: Value in enum amdxdna_drm_config_hwctx_param. Specifies the | ||
| 131 | * structure passed in via param_val. | ||
| 132 | * @param_val: A structure specified by the param_type struct member. | ||
| 133 | * @param_val_size: Size of the parameter buffer pointed to by the param_val. | ||
| 134 | *		 If param_val is not a pointer, driver can ignore this. | ||
| 135 | * @pad: MBZ. | ||
| 136 | * | ||
| 137 | * Note: if the param_val is a pointer pointing to a buffer, the maximum size | ||
| 138 | * of the buffer is 4KiB(PAGE_SIZE). | ||
| 139 | */ | ||
| 140 | struct amdxdna_drm_config_hwctx { | ||
| 141 | 	__u32 handle; | ||
| 142 | 	__u32 param_type; | ||
| 143 | 	__u64 param_val; | ||
| 144 | 	__u32 param_val_size; | ||
| 145 | 	__u32 pad; | ||
| 146 | }; | ||
| 147 | |||
| 148 | enum amdxdna_bo_type { | ||
| 149 | 	AMDXDNA_BO_INVALID = 0, | ||
| 150 | 	AMDXDNA_BO_SHMEM, | ||
| 151 | 	AMDXDNA_BO_DEV_HEAP, | ||
| 152 | 	AMDXDNA_BO_DEV, | ||
| 153 | 	AMDXDNA_BO_CMD, | ||
| 154 | }; | ||
| 155 | |||
| 156 | /** | ||
| 157 | * struct amdxdna_drm_create_bo - Create a buffer object. | ||
| 158 | * @flags: Buffer flags. MBZ. | ||
| 159 | * @vaddr: User VA of buffer if applied. MBZ. | ||
| 160 | * @size: Size in bytes. | ||
| 161 | * @type: Buffer type. | ||
| 162 | * @handle: Returned DRM buffer object handle. | ||
| 163 | */ | ||
| 164 | struct amdxdna_drm_create_bo { | ||
| 165 | 	__u64	flags; | ||
| 166 | 	__u64	vaddr; | ||
| 167 | 	__u64	size; | ||
| 168 | 	__u32	type; | ||
| 169 | 	__u32	handle; | ||
| 170 | }; | ||
| 171 | |||
| 172 | /** | ||
| 173 | * struct amdxdna_drm_get_bo_info - Get buffer object information. | ||
| 174 | * @ext: MBZ. | ||
| 175 | * @ext_flags: MBZ. | ||
| 176 | * @handle: DRM buffer object handle. | ||
| 177 | * @pad: MBZ. | ||
| 178 | * @map_offset: Returned DRM fake offset for mmap(). | ||
| 179 | * @vaddr: Returned user VA of buffer. 0 in case user needs mmap(). | ||
| 180 | * @xdna_addr: Returned XDNA device virtual address. | ||
| 181 | */ | ||
| 182 | struct amdxdna_drm_get_bo_info { | ||
| 183 | 	__u64 ext; | ||
| 184 | 	__u64 ext_flags; | ||
| 185 | 	__u32 handle; | ||
| 186 | 	__u32 pad; | ||
| 187 | 	__u64 map_offset; | ||
| 188 | 	__u64 vaddr; | ||
| 189 | 	__u64 xdna_addr; | ||
| 190 | }; | ||
| 191 | |||
| 192 | /** | ||
| 193 | * struct amdxdna_drm_sync_bo - Sync buffer object. | ||
| 194 | * @handle: Buffer object handle. | ||
| 195 | * @direction: Direction of sync, can be from device or to device. | ||
| 196 | * @offset: Offset in the buffer to sync. | ||
| 197 | * @size: Size in bytes. | ||
| 198 | */ | ||
| 199 | struct amdxdna_drm_sync_bo { | ||
| 200 | 	__u32 handle; | ||
| 201 | #define SYNC_DIRECT_TO_DEVICE	0U | ||
| 202 | #define SYNC_DIRECT_FROM_DEVICE	1U | ||
| 203 | 	__u32 direction; | ||
| 204 | 	__u64 offset; | ||
| 205 | 	__u64 size; | ||
| 206 | }; | ||
| 207 | |||
| 208 | enum amdxdna_cmd_type { | ||
| 209 | 	AMDXDNA_CMD_SUBMIT_EXEC_BUF = 0, | ||
| 210 | 	AMDXDNA_CMD_SUBMIT_DEPENDENCY, | ||
| 211 | 	AMDXDNA_CMD_SUBMIT_SIGNAL, | ||
| 212 | }; | ||
| 213 | |||
| 214 | /** | ||
| 215 | * struct amdxdna_drm_exec_cmd - Execute command. | ||
| 216 | * @ext: MBZ. | ||
| 217 | * @ext_flags: MBZ. | ||
| 218 | * @hwctx: Hardware context handle. | ||
| 219 | * @type: One of command type in enum amdxdna_cmd_type. | ||
| 220 | * @cmd_handles: Array of command handles or the command handle itself | ||
| 221 | * in case of just one. | ||
| 222 | * @args: Array of arguments for all command handles. | ||
| 223 | * @cmd_count: Number of command handles in the cmd_handles array. | ||
| 224 | * @arg_count: Number of arguments in the args array. | ||
| 225 | * @seq: Returned sequence number for this command. | ||
| 226 | */ | ||
| 227 | struct amdxdna_drm_exec_cmd { | ||
| 228 | 	__u64 ext; | ||
| 229 | 	__u64 ext_flags; | ||
| 230 | 	__u32 hwctx; | ||
| 231 | 	__u32 type; | ||
| 232 | 	__u64 cmd_handles; | ||
| 233 | 	__u64 args; | ||
| 234 | 	__u32 cmd_count; | ||
| 235 | 	__u32 arg_count; | ||
| 236 | 	__u64 seq; | ||
| 237 | }; | ||
| 238 | |||
| 239 | /** | ||
| 240 | * struct amdxdna_drm_query_aie_status - Query the status of the AIE hardware | ||
| 241 | * @buffer: The user space buffer that will return the AIE status. | ||
| 242 | * @buffer_size: The size of the user space buffer. | ||
| 243 | * @cols_filled: A bitmap of AIE columns whose data has been returned in the buffer. | ||
| 244 | */ | ||
| 245 | struct amdxdna_drm_query_aie_status { | ||
| 246 | 	__u64 buffer; /* out */ | ||
| 247 | 	__u32 buffer_size; /* in */ | ||
| 248 | 	__u32 cols_filled; /* out */ | ||
| 249 | }; | ||
| 250 | |||
| 251 | /** | ||
| 252 | * struct amdxdna_drm_query_aie_version - Query the version of the AIE hardware | ||
| 253 | * @major: The major version number. | ||
| 254 | * @minor: The minor version number. | ||
| 255 | */ | ||
| 256 | struct amdxdna_drm_query_aie_version { | ||
| 257 | 	__u32 major; /* out */ | ||
| 258 | 	__u32 minor; /* out */ | ||
| 259 | }; | ||
| 260 | |||
| 261 | /** | ||
| 262 | * struct amdxdna_drm_query_aie_tile_metadata - Query the metadata of AIE tile (core, mem, shim) | ||
| 263 | * @row_count: The number of rows. | ||
| 264 | * @row_start: The starting row number. | ||
| 265 | * @dma_channel_count: The number of dma channels. | ||
| 266 | * @lock_count: The number of locks. | ||
| 267 | * @event_reg_count: The number of events. | ||
| 268 | * @pad: Structure padding. | ||
| 269 | */ | ||
| 270 | struct amdxdna_drm_query_aie_tile_metadata { | ||
| 271 | 	__u16 row_count; | ||
| 272 | 	__u16 row_start; | ||
| 273 | 	__u16 dma_channel_count; | ||
| 274 | 	__u16 lock_count; | ||
| 275 | 	__u16 event_reg_count; | ||
| 276 | 	__u16 pad[3]; | ||
| 277 | }; | ||
| 278 | |||
| 279 | /** | ||
| 280 | * struct amdxdna_drm_query_aie_metadata - Query the metadata of the AIE hardware | ||
| 281 | * @col_size: The size of a column in bytes. | ||
| 282 | * @cols: The total number of columns. | ||
| 283 | * @rows: The total number of rows. | ||
| 284 | * @version: The version of the AIE hardware. | ||
| 285 | * @core: The metadata for all core tiles. | ||
| 286 | * @mem: The metadata for all mem tiles. | ||
| 287 | * @shim: The metadata for all shim tiles. | ||
| 288 | */ | ||
| 289 | struct amdxdna_drm_query_aie_metadata { | ||
| 290 | 	__u32 col_size; | ||
| 291 | 	__u16 cols; | ||
| 292 | 	__u16 rows; | ||
| 293 | 	struct amdxdna_drm_query_aie_version version; | ||
| 294 | 	struct amdxdna_drm_query_aie_tile_metadata core; | ||
| 295 | 	struct amdxdna_drm_query_aie_tile_metadata mem; | ||
| 296 | 	struct amdxdna_drm_query_aie_tile_metadata shim; | ||
| 297 | }; | ||
| 298 | |||
| 299 | /** | ||
| 300 | * struct amdxdna_drm_query_clock - Metadata for a clock | ||
| 301 | * @name: The clock name. | ||
| 302 | * @freq_mhz: The clock frequency. | ||
| 303 | * @pad: Structure padding. | ||
| 304 | */ | ||
| 305 | struct amdxdna_drm_query_clock { | ||
| 306 | 	__u8 name[16]; | ||
| 307 | 	__u32 freq_mhz; | ||
| 308 | 	__u32 pad; | ||
| 309 | }; | ||
| 310 | |||
| 311 | /** | ||
| 312 | * struct amdxdna_drm_query_clock_metadata - Query metadata for clocks | ||
| 313 | * @mp_npu_clock: The metadata for MP-NPU clock. | ||
| 314 | * @h_clock: The metadata for H clock. | ||
| 315 | */ | ||
| 316 | struct amdxdna_drm_query_clock_metadata { | ||
| 317 | 	struct amdxdna_drm_query_clock mp_npu_clock; | ||
| 318 | 	struct amdxdna_drm_query_clock h_clock; | ||
| 319 | }; | ||
| 320 | |||
| 321 | enum amdxdna_sensor_type { | ||
| 322 | 	AMDXDNA_SENSOR_TYPE_POWER | ||
| 323 | }; | ||
| 324 | |||
| 325 | /** | ||
| 326 | * struct amdxdna_drm_query_sensor - The data for single sensor. | ||
| 327 | * @label: The name for a sensor. | ||
| 328 | * @input: The current value of the sensor. | ||
| 329 | * @max: The maximum value possible for the sensor. | ||
| 330 | * @average: The average value of the sensor. | ||
| 331 | * @highest: The highest recorded sensor value for this driver load for the sensor. | ||
| 332 | * @status: The sensor status. | ||
| 333 | * @units: The sensor units. | ||
| 334 | * @unitm: Translates value member variables into the correct unit via (pow(10, unitm) * value). | ||
| 335 | * @type: The sensor type from enum amdxdna_sensor_type. | ||
| 336 | * @pad: Structure padding. | ||
| 337 | */ | ||
| 338 | struct amdxdna_drm_query_sensor { | ||
| 339 | 	__u8 label[64]; | ||
| 340 | 	__u32 input; | ||
| 341 | 	__u32 max; | ||
| 342 | 	__u32 average; | ||
| 343 | 	__u32 highest; | ||
| 344 | 	__u8 status[64]; | ||
| 345 | 	__u8 units[16]; | ||
| 346 | 	__s8 unitm; | ||
| 347 | 	__u8 type; | ||
| 348 | 	__u8 pad[6]; | ||
| 349 | }; | ||
| 350 | |||
| 351 | /** | ||
| 352 | * struct amdxdna_drm_query_hwctx - The data for single context. | ||
| 353 | * @context_id: The ID for this context. | ||
| 354 | * @start_col: The starting column for the partition assigned to this context. | ||
| 355 | * @num_col: The number of columns in the partition assigned to this context. | ||
| 356 | * @pad: Structure padding. | ||
| 357 | * @pid: The Process ID of the process that created this context. | ||
| 358 | * @command_submissions: The number of commands submitted to this context. | ||
| 359 | * @command_completions: The number of commands completed by this context. | ||
| 360 | * @migrations: The number of times this context has been moved to a different partition. | ||
| 361 | * @preemptions: The number of times this context has been preempted by another context in the | ||
| 362 | * same partition. | ||
| 363 | * @errors: The errors for this context. | ||
| 364 | */ | ||
| 365 | struct amdxdna_drm_query_hwctx { | ||
| 366 | 	__u32 context_id; | ||
| 367 | 	__u32 start_col; | ||
| 368 | 	__u32 num_col; | ||
| 369 | 	__u32 pad; | ||
| 370 | 	__s64 pid; | ||
| 371 | 	__u64 command_submissions; | ||
| 372 | 	__u64 command_completions; | ||
| 373 | 	__u64 migrations; | ||
| 374 | 	__u64 preemptions; | ||
| 375 | 	__u64 errors; | ||
| 376 | }; | ||
| 377 | |||
| 378 | enum amdxdna_power_mode_type { | ||
| 379 | 	POWER_MODE_DEFAULT, /* Fallback to calculated DPM */ | ||
| 380 | 	POWER_MODE_LOW, /* Set frequency to lowest DPM */ | ||
| 381 | 	POWER_MODE_MEDIUM, /* Set frequency to medium DPM */ | ||
| 382 | 	POWER_MODE_HIGH, /* Set frequency to highest DPM */ | ||
| 383 | 	POWER_MODE_TURBO, /* Maximum power */ | ||
| 384 | }; | ||
| 385 | |||
| 386 | /** | ||
| 387 | * struct amdxdna_drm_get_power_mode - Get the configured power mode | ||
| 388 | * @power_mode: The mode type from enum amdxdna_power_mode_type | ||
| 389 | * @pad: Structure padding. | ||
| 390 | */ | ||
| 391 | struct amdxdna_drm_get_power_mode { | ||
| 392 | 	__u8 power_mode; | ||
| 393 | 	__u8 pad[7]; | ||
| 394 | }; | ||
| 395 | |||
| 396 | /** | ||
| 397 | * struct amdxdna_drm_query_firmware_version - Query the firmware version | ||
| 398 | * @major: The major version number | ||
| 399 | * @minor: The minor version number | ||
| 400 | * @patch: The patch level version number | ||
| 401 | * @build: The build ID | ||
| 402 | */ | ||
| 403 | struct amdxdna_drm_query_firmware_version { | ||
| 404 | 	__u32 major; /* out */ | ||
| 405 | 	__u32 minor; /* out */ | ||
| 406 | 	__u32 patch; /* out */ | ||
| 407 | 	__u32 build; /* out */ | ||
| 408 | }; | ||
| 409 | |||
| 410 | enum amdxdna_drm_get_param { | ||
| 411 | 	DRM_AMDXDNA_QUERY_AIE_STATUS, | ||
| 412 | 	DRM_AMDXDNA_QUERY_AIE_METADATA, | ||
| 413 | 	DRM_AMDXDNA_QUERY_AIE_VERSION, | ||
| 414 | 	DRM_AMDXDNA_QUERY_CLOCK_METADATA, | ||
| 415 | 	DRM_AMDXDNA_QUERY_SENSORS, | ||
| 416 | 	DRM_AMDXDNA_QUERY_HW_CONTEXTS, | ||
| 417 | 	DRM_AMDXDNA_QUERY_FIRMWARE_VERSION = 8, | ||
| 418 | 	DRM_AMDXDNA_GET_POWER_MODE, | ||
| 419 | }; | ||
| 420 | |||
| 421 | /** | ||
| 422 | * struct amdxdna_drm_get_info - Get some information from the AIE hardware. | ||
| 423 | * @param: Value in enum amdxdna_drm_get_param. Specifies the structure passed in the buffer. | ||
| 424 | * @buffer_size: Size of the input buffer. Size needed/written by the kernel. | ||
| 425 | * @buffer: A structure specified by the param struct member. | ||
| 426 | */ | ||
| 427 | struct amdxdna_drm_get_info { | ||
| 428 | 	__u32 param; /* in */ | ||
| 429 | 	__u32 buffer_size; /* in/out */ | ||
| 430 | 	__u64 buffer; /* in/out */ | ||
| 431 | }; | ||
| 432 | |||
| 433 | enum amdxdna_drm_set_param { | ||
| 434 | 	DRM_AMDXDNA_SET_POWER_MODE, | ||
| 435 | 	DRM_AMDXDNA_WRITE_AIE_MEM, | ||
| 436 | 	DRM_AMDXDNA_WRITE_AIE_REG, | ||
| 437 | }; | ||
| 438 | |||
| 439 | /** | ||
| 440 | * struct amdxdna_drm_set_state - Set the state of the AIE hardware. | ||
| 441 | * @param: Value in enum amdxdna_drm_set_param. | ||
| 442 | * @buffer_size: Size of the input param. | ||
| 443 | * @buffer: Pointer to the input param. | ||
| 444 | */ | ||
| 445 | struct amdxdna_drm_set_state { | ||
| 446 | 	__u32 param; /* in */ | ||
| 447 | 	__u32 buffer_size; /* in */ | ||
| 448 | 	__u64 buffer; /* in */ | ||
| 449 | }; | ||
| 450 | |||
| 451 | /** | ||
| 452 | * struct amdxdna_drm_set_power_mode - Set the power mode of the AIE hardware | ||
| 453 | * @power_mode: The sensor type from enum amdxdna_power_mode_type | ||
| 454 | * @pad: MBZ. | ||
| 455 | */ | ||
| 456 | struct amdxdna_drm_set_power_mode { | ||
| 457 | 	__u8 power_mode; | ||
| 458 | 	__u8 pad[7]; | ||
| 459 | }; | ||
| 460 | |||
| 461 | #define DRM_IOCTL_AMDXDNA_CREATE_HWCTX \ | ||
| 462 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CREATE_HWCTX, \ | ||
| 463 | 		 struct amdxdna_drm_create_hwctx) | ||
| 464 | |||
| 465 | #define DRM_IOCTL_AMDXDNA_DESTROY_HWCTX \ | ||
| 466 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_DESTROY_HWCTX, \ | ||
| 467 | 		 struct amdxdna_drm_destroy_hwctx) | ||
| 468 | |||
| 469 | #define DRM_IOCTL_AMDXDNA_CONFIG_HWCTX \ | ||
| 470 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CONFIG_HWCTX, \ | ||
| 471 | 		 struct amdxdna_drm_config_hwctx) | ||
| 472 | |||
| 473 | #define DRM_IOCTL_AMDXDNA_CREATE_BO \ | ||
| 474 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_CREATE_BO, \ | ||
| 475 | 		 struct amdxdna_drm_create_bo) | ||
| 476 | |||
| 477 | #define DRM_IOCTL_AMDXDNA_GET_BO_INFO \ | ||
| 478 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_BO_INFO, \ | ||
| 479 | 		 struct amdxdna_drm_get_bo_info) | ||
| 480 | |||
| 481 | #define DRM_IOCTL_AMDXDNA_SYNC_BO \ | ||
| 482 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SYNC_BO, \ | ||
| 483 | 		 struct amdxdna_drm_sync_bo) | ||
| 484 | |||
| 485 | #define DRM_IOCTL_AMDXDNA_EXEC_CMD \ | ||
| 486 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_EXEC_CMD, \ | ||
| 487 | 		 struct amdxdna_drm_exec_cmd) | ||
| 488 | |||
| 489 | #define DRM_IOCTL_AMDXDNA_GET_INFO \ | ||
| 490 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_INFO, \ | ||
| 491 | 		 struct amdxdna_drm_get_info) | ||
| 492 | |||
| 493 | #define DRM_IOCTL_AMDXDNA_SET_STATE \ | ||
| 494 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_SET_STATE, \ | ||
| 495 | 		 struct amdxdna_drm_set_state) | ||
| 496 | |||
| 497 | #if defined(__cplusplus) | ||
| 498 | } /* extern c end */ | ||
| 499 | #endif | ||
| 500 | |||
| 501 | #endif /* _AMDXDNA_ACCEL_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/asahi_drm.h created+1194| ... | @@ -0,0 +1,1194 @@ | ||
| 1 | /* SPDX-License-Identifier: MIT */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) The Asahi Linux Contributors | ||
| 4 | * Copyright (C) 2018-2023 Collabora Ltd. | ||
| 5 | * Copyright (C) 2014-2018 Broadcom | ||
| 6 | */ | ||
| 7 | #ifndef _ASAHI_DRM_H_ | ||
| 8 | #define _ASAHI_DRM_H_ | ||
| 9 | |||
| 10 | #include "drm.h" | ||
| 11 | |||
| 12 | #if defined(__cplusplus) | ||
| 13 | extern "C" { | ||
| 14 | #endif | ||
| 15 | |||
| 16 | /** | ||
| 17 | * DOC: Introduction to the Asahi UAPI | ||
| 18 | * | ||
| 19 | * This documentation describes the Asahi IOCTLs. | ||
| 20 | * | ||
| 21 | * Just a few generic rules about the data passed to the Asahi IOCTLs (cribbed | ||
| 22 | * from Panthor): | ||
| 23 | * | ||
| 24 | * - Structures must be aligned on 64-bit/8-byte. If the object is not | ||
| 25 | * naturally aligned, a padding field must be added. | ||
| 26 | * - Fields must be explicitly aligned to their natural type alignment with | ||
| 27 | * pad[0..N] fields. | ||
| 28 | * - All padding fields will be checked by the driver to make sure they are | ||
| 29 | * zeroed. | ||
| 30 | * - Flags can be added, but not removed/replaced. | ||
| 31 | * - New fields can be added to the main structures (the structures | ||
| 32 | * directly passed to the ioctl). Those fields can be added at the end of | ||
| 33 | * the structure, or replace existing padding fields. Any new field being | ||
| 34 | * added must preserve the behavior that existed before those fields were | ||
| 35 | * added when a value of zero is passed. | ||
| 36 | * - New fields can be added to indirect objects (objects pointed by the | ||
| 37 | * main structure), iff those objects are passed a size to reflect the | ||
| 38 | * size known by the userspace driver (see | ||
| 39 | * drm_asahi_cmd_header::size). | ||
| 40 | * - If the kernel driver is too old to know some fields, those will be | ||
| 41 | * ignored if zero, and otherwise rejected (and so will be zero on output). | ||
| 42 | * - If userspace is too old to know some fields, those will be zeroed | ||
| 43 | * (input) before the structure is parsed by the kernel driver. | ||
| 44 | * - Each new flag/field addition must come with a driver version update so | ||
| 45 | * the userspace driver doesn't have to guess which flags are supported. | ||
| 46 | * - Structures should not contain unions, as this would defeat the | ||
| 47 | * extensibility of such structures. | ||
| 48 | * - IOCTLs can't be removed or replaced. New IOCTL IDs should be placed | ||
| 49 | * at the end of the drm_asahi_ioctl_id enum. | ||
| 50 | */ | ||
| 51 | |||
| 52 | /** | ||
| 53 | * enum drm_asahi_ioctl_id - IOCTL IDs | ||
| 54 | * | ||
| 55 | * Place new ioctls at the end, don't re-order, don't replace or remove entries. | ||
| 56 | * | ||
| 57 | * These IDs are not meant to be used directly. Use the DRM_IOCTL_ASAHI_xxx | ||
| 58 | * definitions instead. | ||
| 59 | */ | ||
| 60 | enum drm_asahi_ioctl_id { | ||
| 61 | 	/** @DRM_ASAHI_GET_PARAMS: Query device properties. */ | ||
| 62 | 	DRM_ASAHI_GET_PARAMS = 0, | ||
| 63 | |||
| 64 | 	/** @DRM_ASAHI_GET_TIME: Query device time. */ | ||
| 65 | 	DRM_ASAHI_GET_TIME, | ||
| 66 | |||
| 67 | 	/** @DRM_ASAHI_VM_CREATE: Create a GPU VM address space. */ | ||
| 68 | 	DRM_ASAHI_VM_CREATE, | ||
| 69 | |||
| 70 | 	/** @DRM_ASAHI_VM_DESTROY: Destroy a VM. */ | ||
| 71 | 	DRM_ASAHI_VM_DESTROY, | ||
| 72 | |||
| 73 | 	/** @DRM_ASAHI_VM_BIND: Bind/unbind memory to a VM. */ | ||
| 74 | 	DRM_ASAHI_VM_BIND, | ||
| 75 | |||
| 76 | 	/** @DRM_ASAHI_GEM_CREATE: Create a buffer object. */ | ||
| 77 | 	DRM_ASAHI_GEM_CREATE, | ||
| 78 | |||
| 79 | 	/** | ||
| 80 | 	 * @DRM_ASAHI_GEM_MMAP_OFFSET: Get offset to pass to mmap() to map a | ||
| 81 | 	 * given GEM handle. | ||
| 82 | 	 */ | ||
| 83 | 	DRM_ASAHI_GEM_MMAP_OFFSET, | ||
| 84 | |||
| 85 | 	/** @DRM_ASAHI_GEM_BIND_OBJECT: Bind memory as a special object */ | ||
| 86 | 	DRM_ASAHI_GEM_BIND_OBJECT, | ||
| 87 | |||
| 88 | 	/** @DRM_ASAHI_QUEUE_CREATE: Create a scheduling queue. */ | ||
| 89 | 	DRM_ASAHI_QUEUE_CREATE, | ||
| 90 | |||
| 91 | 	/** @DRM_ASAHI_QUEUE_DESTROY: Destroy a scheduling queue. */ | ||
| 92 | 	DRM_ASAHI_QUEUE_DESTROY, | ||
| 93 | |||
| 94 | 	/** @DRM_ASAHI_SUBMIT: Submit commands to a queue. */ | ||
| 95 | 	DRM_ASAHI_SUBMIT, | ||
| 96 | }; | ||
| 97 | |||
| 98 | #define DRM_ASAHI_MAX_CLUSTERS	64 | ||
| 99 | |||
| 100 | /** | ||
| 101 | * struct drm_asahi_params_global - Global parameters. | ||
| 102 | * | ||
| 103 | * This struct may be queried by drm_asahi_get_params. | ||
| 104 | */ | ||
| 105 | struct drm_asahi_params_global { | ||
| 106 | 	/** @features: Feature bits from drm_asahi_feature */ | ||
| 107 | 	__u64 features; | ||
| 108 | |||
| 109 | 	/** @gpu_generation: GPU generation, e.g. 13 for G13G */ | ||
| 110 | 	__u32 gpu_generation; | ||
| 111 | |||
| 112 | 	/** @gpu_variant: GPU variant as a character, e.g. 'C' for G13C */ | ||
| 113 | 	__u32 gpu_variant; | ||
| 114 | |||
| 115 | 	/** | ||
| 116 | 	 * @gpu_revision: GPU revision in BCD, e.g. 0x00 for 'A0' or | ||
| 117 | 	 * 0x21 for 'C1' | ||
| 118 | 	 */ | ||
| 119 | 	__u32 gpu_revision; | ||
| 120 | |||
| 121 | 	/** @chip_id: Chip ID in BCD, e.g. 0x8103 for T8103 */ | ||
| 122 | 	__u32 chip_id; | ||
| 123 | |||
| 124 | 	/** @num_dies: Number of dies in the SoC */ | ||
| 125 | 	__u32 num_dies; | ||
| 126 | |||
| 127 | 	/** @num_clusters_total: Number of GPU clusters (across all dies) */ | ||
| 128 | 	__u32 num_clusters_total; | ||
| 129 | |||
| 130 | 	/** | ||
| 131 | 	 * @num_cores_per_cluster: Number of logical cores per cluster | ||
| 132 | 	 * (including inactive/nonexistent) | ||
| 133 | 	 */ | ||
| 134 | 	__u32 num_cores_per_cluster; | ||
| 135 | |||
| 136 | 	/** @max_frequency_khz: Maximum GPU core clock frequency */ | ||
| 137 | 	__u32 max_frequency_khz; | ||
| 138 | |||
| 139 | 	/** @core_masks: Bitmask of present/enabled cores per cluster */ | ||
| 140 | 	__u64 core_masks[DRM_ASAHI_MAX_CLUSTERS]; | ||
| 141 | |||
| 142 | 	/** | ||
| 143 | 	 * @vm_start: VM range start VMA. Together with @vm_end, this defines | ||
| 144 | 	 * the window of valid GPU VAs. Userspace is expected to subdivide VAs | ||
| 145 | 	 * out of this window. | ||
| 146 | 	 * | ||
| 147 | 	 * This window contains all virtual addresses that userspace needs to | ||
| 148 | 	 * know about. There may be kernel-internal GPU VAs outside this range, | ||
| 149 | 	 * but that detail is not relevant here. | ||
| 150 | 	 */ | ||
| 151 | 	__u64 vm_start; | ||
| 152 | |||
| 153 | 	/** @vm_end: VM range end VMA */ | ||
| 154 | 	__u64 vm_end; | ||
| 155 | |||
| 156 | 	/** | ||
| 157 | 	 * @vm_kernel_min_size: Minimum kernel VMA window size. | ||
| 158 | 	 * | ||
| 159 | 	 * When creating a VM, userspace is required to carve out a section of | ||
| 160 | 	 * virtual addresses (within the range given by @vm_start and | ||
| 161 | 	 * @vm_end). The kernel will allocate various internal structures | ||
| 162 | 	 * within the specified VA range. | ||
| 163 | 	 * | ||
| 164 | 	 * Allowing userspace to choose the VA range for the kernel, rather than | ||
| 165 | 	 * the kernel reserving VAs and requiring userspace to cope, can assist | ||
| 166 | 	 * in implementing SVM. | ||
| 167 | 	 */ | ||
| 168 | 	__u64 vm_kernel_min_size; | ||
| 169 | |||
| 170 | 	/** | ||
| 171 | 	 * @max_commands_per_submission: Maximum number of supported commands | ||
| 172 | 	 * per submission. This mirrors firmware limits. Userspace must split up | ||
| 173 | 	 * larger command buffers, which may require inserting additional | ||
| 174 | 	 * synchronization. | ||
| 175 | 	 */ | ||
| 176 | 	__u32 max_commands_per_submission; | ||
| 177 | |||
| 178 | 	/** | ||
| 179 | 	 * @max_attachments: Maximum number of drm_asahi_attachment's per | ||
| 180 | 	 * command | ||
| 181 | 	 */ | ||
| 182 | 	__u32 max_attachments; | ||
| 183 | |||
| 184 | 	/** | ||
| 185 | 	 * @command_timestamp_frequency_hz: Timebase frequency for timestamps | ||
| 186 | 	 * written during command execution, specified via drm_asahi_timestamp | ||
| 187 | 	 * structures. As this rate is controlled by the firmware, it is a | ||
| 188 | 	 * queryable parameter. | ||
| 189 | 	 * | ||
| 190 | 	 * Userspace must divide by this frequency to convert timestamps to | ||
| 191 | 	 * seconds, rather than hardcoding a particular firmware's rate. | ||
| 192 | 	 */ | ||
| 193 | 	__u64 command_timestamp_frequency_hz; | ||
| 194 | }; | ||
| 195 | |||
| 196 | /** | ||
| 197 | * enum drm_asahi_feature - Feature bits | ||
| 198 | * | ||
| 199 | * This covers only features that userspace cannot infer from the architecture | ||
| 200 | * version. Most features don't need to be here. | ||
| 201 | */ | ||
| 202 | enum drm_asahi_feature { | ||
| 203 | 	/** | ||
| 204 | 	 * @DRM_ASAHI_FEATURE_SOFT_FAULTS: GPU has "soft fault" enabled. Shader | ||
| 205 | 	 * loads of unmapped memory will return zero. Shader stores to unmapped | ||
| 206 | 	 * memory will be silently discarded. Note that only shader load/store | ||
| 207 | 	 * is affected. Other hardware units are not affected, notably including | ||
| 208 | 	 * texture sampling. | ||
| 209 | 	 * | ||
| 210 | 	 * Soft fault is set when initializing the GPU and cannot be runtime | ||
| 211 | 	 * toggled. Therefore, it is exposed as a feature bit and not a | ||
| 212 | 	 * userspace-settable flag on the VM. When soft fault is enabled, | ||
| 213 | 	 * userspace can speculate memory accesses more aggressively. | ||
| 214 | 	 */ | ||
| 215 | 	DRM_ASAHI_FEATURE_SOFT_FAULTS = (1UL) << 0, | ||
| 216 | }; | ||
| 217 | |||
| 218 | /** | ||
| 219 | * struct drm_asahi_get_params - Arguments passed to DRM_IOCTL_ASAHI_GET_PARAMS | ||
| 220 | */ | ||
| 221 | struct drm_asahi_get_params { | ||
| 222 | 	/** @param_group: Parameter group to fetch (MBZ) */ | ||
| 223 | 	__u32 param_group; | ||
| 224 | |||
| 225 | 	/** @pad: MBZ */ | ||
| 226 | 	__u32 pad; | ||
| 227 | |||
| 228 | 	/** @pointer: User pointer to write parameter struct */ | ||
| 229 | 	__u64 pointer; | ||
| 230 | |||
| 231 | 	/** | ||
| 232 | 	 * @size: Size of the user buffer. In case of older userspace, this may | ||
| 233 | 	 * be less than sizeof(struct drm_asahi_params_global). The kernel will | ||
| 234 | 	 * not write past the length specified here, allowing extensibility. | ||
| 235 | 	 */ | ||
| 236 | 	__u64 size; | ||
| 237 | }; | ||
| 238 | |||
| 239 | /** | ||
| 240 | * struct drm_asahi_vm_create - Arguments passed to DRM_IOCTL_ASAHI_VM_CREATE | ||
| 241 | */ | ||
| 242 | struct drm_asahi_vm_create { | ||
| 243 | 	/** | ||
| 244 | 	 * @kernel_start: Start of the kernel-reserved address range. See | ||
| 245 | 	 * drm_asahi_params_global::vm_kernel_min_size. | ||
| 246 | 	 * | ||
| 247 | 	 * Both @kernel_start and @kernel_end must be within the range of | ||
| 248 | 	 * valid VAs given by drm_asahi_params_global::vm_start and | ||
| 249 | 	 * drm_asahi_params_global::vm_end. The size of the kernel range | ||
| 250 | 	 * (@kernel_end - @kernel_start) must be at least | ||
| 251 | 	 * drm_asahi_params_global::vm_kernel_min_size. | ||
| 252 | 	 * | ||
| 253 | 	 * Userspace must not bind any memory on this VM into this reserved | ||
| 254 | 	 * range, it is for kernel use only. | ||
| 255 | 	 */ | ||
| 256 | 	__u64 kernel_start; | ||
| 257 | |||
| 258 | 	/** | ||
| 259 | 	 * @kernel_end: End of the kernel-reserved address range. See | ||
| 260 | 	 * @kernel_start. | ||
| 261 | 	 */ | ||
| 262 | 	__u64 kernel_end; | ||
| 263 | |||
| 264 | 	/** @vm_id: Returned VM ID */ | ||
| 265 | 	__u32 vm_id; | ||
| 266 | |||
| 267 | 	/** @pad: MBZ */ | ||
| 268 | 	__u32 pad; | ||
| 269 | }; | ||
| 270 | |||
| 271 | /** | ||
| 272 | * struct drm_asahi_vm_destroy - Arguments passed to DRM_IOCTL_ASAHI_VM_DESTROY | ||
| 273 | */ | ||
| 274 | struct drm_asahi_vm_destroy { | ||
| 275 | 	/** @vm_id: VM ID to be destroyed */ | ||
| 276 | 	__u32 vm_id; | ||
| 277 | |||
| 278 | 	/** @pad: MBZ */ | ||
| 279 | 	__u32 pad; | ||
| 280 | }; | ||
| 281 | |||
| 282 | /** | ||
| 283 | * enum drm_asahi_gem_flags - Flags for GEM creation | ||
| 284 | */ | ||
| 285 | enum drm_asahi_gem_flags { | ||
| 286 | 	/** | ||
| 287 | 	 * @DRM_ASAHI_GEM_WRITEBACK: BO should be CPU-mapped as writeback. | ||
| 288 | 	 * | ||
| 289 | 	 * Map as writeback instead of write-combine. This optimizes for CPU | ||
| 290 | 	 * reads. | ||
| 291 | 	 */ | ||
| 292 | 	DRM_ASAHI_GEM_WRITEBACK = (1L << 0), | ||
| 293 | |||
| 294 | 	/** | ||
| 295 | 	 * @DRM_ASAHI_GEM_VM_PRIVATE: BO is private to this GPU VM (no exports). | ||
| 296 | 	 */ | ||
| 297 | 	DRM_ASAHI_GEM_VM_PRIVATE = (1L << 1), | ||
| 298 | }; | ||
| 299 | |||
| 300 | /** | ||
| 301 | * struct drm_asahi_gem_create - Arguments passed to DRM_IOCTL_ASAHI_GEM_CREATE | ||
| 302 | */ | ||
| 303 | struct drm_asahi_gem_create { | ||
| 304 | 	/** @size: Size of the BO */ | ||
| 305 | 	__u64 size; | ||
| 306 | |||
| 307 | 	/** @flags: Combination of drm_asahi_gem_flags flags. */ | ||
| 308 | 	__u32 flags; | ||
| 309 | |||
| 310 | 	/** | ||
| 311 | 	 * @vm_id: VM ID to assign to the BO, if DRM_ASAHI_GEM_VM_PRIVATE is set | ||
| 312 | 	 */ | ||
| 313 | 	__u32 vm_id; | ||
| 314 | |||
| 315 | 	/** @handle: Returned GEM handle for the BO */ | ||
| 316 | 	__u32 handle; | ||
| 317 | |||
| 318 | 	/** @pad: MBZ */ | ||
| 319 | 	__u32 pad; | ||
| 320 | }; | ||
| 321 | |||
| 322 | /** | ||
| 323 | * struct drm_asahi_gem_mmap_offset - Arguments passed to | ||
| 324 | * DRM_IOCTL_ASAHI_GEM_MMAP_OFFSET | ||
| 325 | */ | ||
| 326 | struct drm_asahi_gem_mmap_offset { | ||
| 327 | 	/** @handle: Handle for the object being mapped. */ | ||
| 328 | 	__u32 handle; | ||
| 329 | |||
| 330 | 	/** @flags: Must be zero */ | ||
| 331 | 	__u32 flags; | ||
| 332 | |||
| 333 | 	/** @offset: The fake offset to use for subsequent mmap call */ | ||
| 334 | 	__u64 offset; | ||
| 335 | }; | ||
| 336 | |||
| 337 | /** | ||
| 338 | * enum drm_asahi_bind_flags - Flags for GEM binding | ||
| 339 | */ | ||
| 340 | enum drm_asahi_bind_flags { | ||
| 341 | 	/** | ||
| 342 | 	 * @DRM_ASAHI_BIND_UNBIND: Instead of binding a GEM object to the range, | ||
| 343 | 	 * simply unbind the GPU VMA range. | ||
| 344 | 	 */ | ||
| 345 | 	DRM_ASAHI_BIND_UNBIND = (1L << 0), | ||
| 346 | |||
| 347 | 	/** @DRM_ASAHI_BIND_READ: Map BO with GPU read permission */ | ||
| 348 | 	DRM_ASAHI_BIND_READ = (1L << 1), | ||
| 349 | |||
| 350 | 	/** @DRM_ASAHI_BIND_WRITE: Map BO with GPU write permission */ | ||
| 351 | 	DRM_ASAHI_BIND_WRITE = (1L << 2), | ||
| 352 | |||
| 353 | 	/** | ||
| 354 | 	 * @DRM_ASAHI_BIND_SINGLE_PAGE: Map a single page of the BO repeatedly | ||
| 355 | 	 * across the VA range. | ||
| 356 | 	 * | ||
| 357 | 	 * This is useful to fill a VA range with scratch pages or zero pages. | ||
| 358 | 	 * It is intended as a mechanism to accelerate sparse. | ||
| 359 | 	 */ | ||
| 360 | 	DRM_ASAHI_BIND_SINGLE_PAGE = (1L << 3), | ||
| 361 | }; | ||
| 362 | |||
| 363 | /** | ||
| 364 | * struct drm_asahi_gem_bind_op - Description of a single GEM bind operation. | ||
| 365 | */ | ||
| 366 | struct drm_asahi_gem_bind_op { | ||
| 367 | 	/** @flags: Combination of drm_asahi_bind_flags flags. */ | ||
| 368 | 	__u32 flags; | ||
| 369 | |||
| 370 | 	/** @handle: GEM object to bind (except for UNBIND) */ | ||
| 371 | 	__u32 handle; | ||
| 372 | |||
| 373 | 	/** | ||
| 374 | 	 * @offset: Offset into the object (except for UNBIND). | ||
| 375 | 	 * | ||
| 376 | 	 * For a regular bind, this is the beginning of the region of the GEM | ||
| 377 | 	 * object to bind. | ||
| 378 | 	 * | ||
| 379 | 	 * For a single-page bind, this is the offset to the single page that | ||
| 380 | 	 * will be repeatedly bound. | ||
| 381 | 	 * | ||
| 382 | 	 * Must be page-size aligned. | ||
| 383 | 	 */ | ||
| 384 | 	__u64 offset; | ||
| 385 | |||
| 386 | 	/** | ||
| 387 | 	 * @range: Number of bytes to bind/unbind to @addr. | ||
| 388 | 	 * | ||
| 389 | 	 * Must be page-size aligned. | ||
| 390 | 	 */ | ||
| 391 | 	__u64 range; | ||
| 392 | |||
| 393 | 	/** | ||
| 394 | 	 * @addr: Address to bind to. | ||
| 395 | 	 * | ||
| 396 | 	 * Must be page-size aligned. | ||
| 397 | 	 */ | ||
| 398 | 	__u64 addr; | ||
| 399 | }; | ||
| 400 | |||
| 401 | /** | ||
| 402 | * struct drm_asahi_vm_bind - Arguments passed to | ||
| 403 | * DRM_IOCTL_ASAHI_VM_BIND | ||
| 404 | */ | ||
| 405 | struct drm_asahi_vm_bind { | ||
| 406 | 	/** @vm_id: The ID of the VM to bind to */ | ||
| 407 | 	__u32 vm_id; | ||
| 408 | |||
| 409 | 	/** @num_binds: number of binds in this IOCTL. */ | ||
| 410 | 	__u32 num_binds; | ||
| 411 | |||
| 412 | 	/** | ||
| 413 | 	 * @stride: Stride in bytes between consecutive binds. This allows | ||
| 414 | 	 * extensibility of drm_asahi_gem_bind_op. | ||
| 415 | 	 */ | ||
| 416 | 	__u32 stride; | ||
| 417 | |||
| 418 | 	/** @pad: MBZ */ | ||
| 419 | 	__u32 pad; | ||
| 420 | |||
| 421 | 	/** | ||
| 422 | 	 * @userptr: User pointer to an array of @num_binds structures of type | ||
| 423 | 	 * @drm_asahi_gem_bind_op and size @stride bytes. | ||
| 424 | 	 */ | ||
| 425 | 	__u64 userptr; | ||
| 426 | }; | ||
| 427 | |||
| 428 | /** | ||
| 429 | * enum drm_asahi_bind_object_op - Special object bind operation | ||
| 430 | */ | ||
| 431 | enum drm_asahi_bind_object_op { | ||
| 432 | 	/** @DRM_ASAHI_BIND_OBJECT_OP_BIND: Bind a BO as a special GPU object */ | ||
| 433 | 	DRM_ASAHI_BIND_OBJECT_OP_BIND = 0, | ||
| 434 | |||
| 435 | 	/** @DRM_ASAHI_BIND_OBJECT_OP_UNBIND: Unbind a special GPU object */ | ||
| 436 | 	DRM_ASAHI_BIND_OBJECT_OP_UNBIND = 1, | ||
| 437 | }; | ||
| 438 | |||
| 439 | /** | ||
| 440 | * enum drm_asahi_bind_object_flags - Special object bind flags | ||
| 441 | */ | ||
| 442 | enum drm_asahi_bind_object_flags { | ||
| 443 | 	/** | ||
| 444 | 	 * @DRM_ASAHI_BIND_OBJECT_USAGE_TIMESTAMPS: Map a BO as a timestamp | ||
| 445 | 	 * buffer. | ||
| 446 | 	 */ | ||
| 447 | 	DRM_ASAHI_BIND_OBJECT_USAGE_TIMESTAMPS = (1L << 0), | ||
| 448 | }; | ||
| 449 | |||
| 450 | /** | ||
| 451 | * struct drm_asahi_gem_bind_object - Arguments passed to | ||
| 452 | * DRM_IOCTL_ASAHI_GEM_BIND_OBJECT | ||
| 453 | */ | ||
| 454 | struct drm_asahi_gem_bind_object { | ||
| 455 | 	/** @op: Bind operation (enum drm_asahi_bind_object_op) */ | ||
| 456 | 	__u32 op; | ||
| 457 | |||
| 458 | 	/** @flags: Combination of drm_asahi_bind_object_flags flags. */ | ||
| 459 | 	__u32 flags; | ||
| 460 | |||
| 461 | 	/** @handle: GEM object to bind/unbind (BIND) */ | ||
| 462 | 	__u32 handle; | ||
| 463 | |||
| 464 | 	/** @vm_id: The ID of the VM to operate on (MBZ currently) */ | ||
| 465 | 	__u32 vm_id; | ||
| 466 | |||
| 467 | 	/** @offset: Offset into the object (BIND only) */ | ||
| 468 | 	__u64 offset; | ||
| 469 | |||
| 470 | 	/** @range: Number of bytes to bind/unbind (BIND only) */ | ||
| 471 | 	__u64 range; | ||
| 472 | |||
| 473 | 	/** @object_handle: Object handle (out for BIND, in for UNBIND) */ | ||
| 474 | 	__u32 object_handle; | ||
| 475 | |||
| 476 | 	/** @pad: MBZ */ | ||
| 477 | 	__u32 pad; | ||
| 478 | }; | ||
| 479 | |||
| 480 | /** | ||
| 481 | * enum drm_asahi_cmd_type - Command type | ||
| 482 | */ | ||
| 483 | enum drm_asahi_cmd_type { | ||
| 484 | 	/** | ||
| 485 | 	 * @DRM_ASAHI_CMD_RENDER: Render command, executing on the render | ||
| 486 | 	 * subqueue. Combined vertex and fragment operation. | ||
| 487 | 	 * | ||
| 488 | 	 * Followed by a @drm_asahi_cmd_render payload. | ||
| 489 | 	 */ | ||
| 490 | 	DRM_ASAHI_CMD_RENDER = 0, | ||
| 491 | |||
| 492 | 	/** | ||
| 493 | 	 * @DRM_ASAHI_CMD_COMPUTE: Compute command on the compute subqueue. | ||
| 494 | 	 * | ||
| 495 | 	 * Followed by a @drm_asahi_cmd_compute payload. | ||
| 496 | 	 */ | ||
| 497 | 	DRM_ASAHI_CMD_COMPUTE = 1, | ||
| 498 | |||
| 499 | 	/** | ||
| 500 | 	 * @DRM_ASAHI_SET_VERTEX_ATTACHMENTS: Software command to set | ||
| 501 | 	 * attachments for subsequent vertex shaders in the same submit. | ||
| 502 | 	 * | ||
| 503 | 	 * Followed by (possibly multiple) @drm_asahi_attachment payloads. | ||
| 504 | 	 */ | ||
| 505 | 	DRM_ASAHI_SET_VERTEX_ATTACHMENTS = 2, | ||
| 506 | |||
| 507 | 	/** | ||
| 508 | 	 * @DRM_ASAHI_SET_FRAGMENT_ATTACHMENTS: Software command to set | ||
| 509 | 	 * attachments for subsequent fragment shaders in the same submit. | ||
| 510 | 	 * | ||
| 511 | 	 * Followed by (possibly multiple) @drm_asahi_attachment payloads. | ||
| 512 | 	 */ | ||
| 513 | 	DRM_ASAHI_SET_FRAGMENT_ATTACHMENTS = 3, | ||
| 514 | |||
| 515 | 	/** | ||
| 516 | 	 * @DRM_ASAHI_SET_COMPUTE_ATTACHMENTS: Software command to set | ||
| 517 | 	 * attachments for subsequent compute shaders in the same submit. | ||
| 518 | 	 * | ||
| 519 | 	 * Followed by (possibly multiple) @drm_asahi_attachment payloads. | ||
| 520 | 	 */ | ||
| 521 | 	DRM_ASAHI_SET_COMPUTE_ATTACHMENTS = 4, | ||
| 522 | }; | ||
| 523 | |||
| 524 | /** | ||
| 525 | * enum drm_asahi_priority - Scheduling queue priority. | ||
| 526 | * | ||
| 527 | * These priorities are forwarded to the firmware to influence firmware | ||
| 528 | * scheduling. The exact policy is ultimately decided by firmware, but | ||
| 529 | * these enums allow userspace to communicate the intentions. | ||
| 530 | */ | ||
| 531 | enum drm_asahi_priority { | ||
| 532 | 	/** @DRM_ASAHI_PRIORITY_LOW: Low priority queue. */ | ||
| 533 | 	DRM_ASAHI_PRIORITY_LOW = 0, | ||
| 534 | |||
| 535 | 	/** @DRM_ASAHI_PRIORITY_MEDIUM: Medium priority queue. */ | ||
| 536 | 	DRM_ASAHI_PRIORITY_MEDIUM = 1, | ||
| 537 | |||
| 538 | 	/** | ||
| 539 | 	 * @DRM_ASAHI_PRIORITY_HIGH: High priority queue. | ||
| 540 | 	 * | ||
| 541 | 	 * Reserved for future extension. | ||
| 542 | 	 */ | ||
| 543 | 	DRM_ASAHI_PRIORITY_HIGH = 2, | ||
| 544 | |||
| 545 | 	/** | ||
| 546 | 	 * @DRM_ASAHI_PRIORITY_REALTIME: Real-time priority queue. | ||
| 547 | 	 * | ||
| 548 | 	 * Reserved for future extension. | ||
| 549 | 	 */ | ||
| 550 | 	DRM_ASAHI_PRIORITY_REALTIME = 3, | ||
| 551 | }; | ||
| 552 | |||
| 553 | /** | ||
| 554 | * struct drm_asahi_queue_create - Arguments passed to | ||
| 555 | * DRM_IOCTL_ASAHI_QUEUE_CREATE | ||
| 556 | */ | ||
| 557 | struct drm_asahi_queue_create { | ||
| 558 | 	/** @flags: MBZ */ | ||
| 559 | 	__u32 flags; | ||
| 560 | |||
| 561 | 	/** @vm_id: The ID of the VM this queue is bound to */ | ||
| 562 | 	__u32 vm_id; | ||
| 563 | |||
| 564 | 	/** @priority: One of drm_asahi_priority */ | ||
| 565 | 	__u32 priority; | ||
| 566 | |||
| 567 | 	/** @queue_id: The returned queue ID */ | ||
| 568 | 	__u32 queue_id; | ||
| 569 | |||
| 570 | 	/** | ||
| 571 | 	 * @usc_exec_base: GPU base address for all USC binaries (shaders) on | ||
| 572 | 	 * this queue. USC addresses are 32-bit relative to this 64-bit base. | ||
| 573 | 	 * | ||
| 574 | 	 * This sets the following registers on all queue commands: | ||
| 575 | 	 * | ||
| 576 | 	 *	USC_EXEC_BASE_TA (vertex) | ||
| 577 | 	 *	USC_EXEC_BASE_ISP (fragment) | ||
| 578 | 	 *	USC_EXEC_BASE_CP (compute) | ||
| 579 | 	 * | ||
| 580 | 	 * While the hardware lets us configure these independently per command, | ||
| 581 | 	 * we do not have a use case for this. Instead, we expect userspace to | ||
| 582 | 	 * fix a 4GiB VA carveout for USC memory and pass its base address here. | ||
| 583 | 	 */ | ||
| 584 | 	__u64 usc_exec_base; | ||
| 585 | }; | ||
| 586 | |||
| 587 | /** | ||
| 588 | * struct drm_asahi_queue_destroy - Arguments passed to | ||
| 589 | * DRM_IOCTL_ASAHI_QUEUE_DESTROY | ||
| 590 | */ | ||
| 591 | struct drm_asahi_queue_destroy { | ||
| 592 | 	/** @queue_id: The queue ID to be destroyed */ | ||
| 593 | 	__u32 queue_id; | ||
| 594 | |||
| 595 | 	/** @pad: MBZ */ | ||
| 596 | 	__u32 pad; | ||
| 597 | }; | ||
| 598 | |||
| 599 | /** | ||
| 600 | * enum drm_asahi_sync_type - Sync item type | ||
| 601 | */ | ||
| 602 | enum drm_asahi_sync_type { | ||
| 603 | 	/** @DRM_ASAHI_SYNC_SYNCOBJ: Binary sync object */ | ||
| 604 | 	DRM_ASAHI_SYNC_SYNCOBJ = 0, | ||
| 605 | |||
| 606 | 	/** @DRM_ASAHI_SYNC_TIMELINE_SYNCOBJ: Timeline sync object */ | ||
| 607 | 	DRM_ASAHI_SYNC_TIMELINE_SYNCOBJ = 1, | ||
| 608 | }; | ||
| 609 | |||
| 610 | /** | ||
| 611 | * struct drm_asahi_sync - Sync item | ||
| 612 | */ | ||
| 613 | struct drm_asahi_sync { | ||
| 614 | 	/** @sync_type: One of drm_asahi_sync_type */ | ||
| 615 | 	__u32 sync_type; | ||
| 616 | |||
| 617 | 	/** @handle: The sync object handle */ | ||
| 618 | 	__u32 handle; | ||
| 619 | |||
| 620 | 	/** @timeline_value: Timeline value for timeline sync objects */ | ||
| 621 | 	__u64 timeline_value; | ||
| 622 | }; | ||
| 623 | |||
| 624 | /** | ||
| 625 | * define DRM_ASAHI_BARRIER_NONE - Command index for no barrier | ||
| 626 | * | ||
| 627 | * This special value may be passed in to drm_asahi_command::vdm_barrier or | ||
| 628 | * drm_asahi_command::cdm_barrier to indicate that the respective subqueue | ||
| 629 | * should not wait on any previous work. | ||
| 630 | */ | ||
| 631 | #define DRM_ASAHI_BARRIER_NONE (0xFFFFu) | ||
| 632 | |||
| 633 | /** | ||
| 634 | * struct drm_asahi_cmd_header - Top level command structure | ||
| 635 | * | ||
| 636 | * This struct is core to the command buffer definition and therefore is not | ||
| 637 | * extensible. | ||
| 638 | */ | ||
| 639 | struct drm_asahi_cmd_header { | ||
| 640 | 	/** @cmd_type: One of drm_asahi_cmd_type */ | ||
| 641 | 	__u16 cmd_type; | ||
| 642 | |||
| 643 | 	/** | ||
| 644 | 	 * @size: Size of this command, not including this header. | ||
| 645 | 	 * | ||
| 646 | 	 * For hardware commands, this enables extensibility of commands without | ||
| 647 | 	 * requiring extra command types. Passing a command that is shorter | ||
| 648 | 	 * than expected is explicitly allowed for backwards-compatibility. | ||
| 649 | 	 * Truncated fields will be zeroed. | ||
| 650 | 	 * | ||
| 651 | 	 * For the synthetic attachment setting commands, this implicitly | ||
| 652 | 	 * encodes the number of attachments. These commands take multiple | ||
| 653 | 	 * fixed-size @drm_asahi_attachment structures as their payload, so size | ||
| 654 | 	 * equals number of attachments * sizeof(struct drm_asahi_attachment). | ||
| 655 | 	 */ | ||
| 656 | 	__u16 size; | ||
| 657 | |||
| 658 | 	/** | ||
| 659 | 	 * @vdm_barrier: VDM (render) command index to wait on. | ||
| 660 | 	 * | ||
| 661 | 	 * Barriers are indices relative to the beginning of a given submit. A | ||
| 662 | 	 * barrier of 0 waits on commands submitted to the respective subqueue | ||
| 663 | 	 * in previous submit ioctls. A barrier of N waits on N previous | ||
| 664 | 	 * commands on the subqueue within the current submit ioctl. As a | ||
| 665 | 	 * special case, passing @DRM_ASAHI_BARRIER_NONE avoids waiting on any | ||
| 666 | 	 * commands in the subqueue. | ||
| 667 | 	 * | ||
| 668 | 	 * Examples: | ||
| 669 | 	 * | ||
| 670 | 	 * 0: This waits on all previous work. | ||
| 671 | 	 * | ||
| 672 | 	 * NONE: This does not wait for anything on this subqueue. | ||
| 673 | 	 * | ||
| 674 | 	 * 1: This waits on the first render command in the submit. | ||
| 675 | 	 * This is valid only if there are multiple render commands in the | ||
| 676 | 	 * same submit. | ||
| 677 | 	 * | ||
| 678 | 	 * Barriers are valid only for hardware commands. Synthetic software | ||
| 679 | 	 * commands to set attachments must pass NONE here. | ||
| 680 | 	 */ | ||
| 681 | 	__u16 vdm_barrier; | ||
| 682 | |||
| 683 | 	/** | ||
| 684 | 	 * @cdm_barrier: CDM (compute) command index to wait on. | ||
| 685 | 	 * | ||
| 686 | 	 * See @vdm_barrier, and replace VDM/render with CDM/compute. | ||
| 687 | 	 */ | ||
| 688 | 	__u16 cdm_barrier; | ||
| 689 | }; | ||
| 690 | |||
| 691 | /** | ||
| 692 | * struct drm_asahi_submit - Arguments passed to DRM_IOCTL_ASAHI_SUBMIT | ||
| 693 | */ | ||
| 694 | struct drm_asahi_submit { | ||
| 695 | 	/** | ||
| 696 | 	 * @syncs: An optional pointer to an array of drm_asahi_sync. The first | ||
| 697 | 	 * @in_sync_count elements are in-syncs, then the remaining | ||
| 698 | 	 * @out_sync_count elements are out-syncs. Using a single array with | ||
| 699 | 	 * explicit partitioning simplifies handling. | ||
| 700 | 	 */ | ||
| 701 | 	__u64 syncs; | ||
| 702 | |||
| 703 | 	/** | ||
| 704 | 	 * @cmdbuf: Pointer to the command buffer to submit. | ||
| 705 | 	 * | ||
| 706 | 	 * This is a flat command buffer. By design, it contains no CPU | ||
| 707 | 	 * pointers, which makes it suitable for a virtgpu wire protocol without | ||
| 708 | 	 * requiring any serializing/deserializing step. | ||
| 709 | 	 * | ||
| 710 | 	 * It consists of a series of commands. Each command begins with a | ||
| 711 | 	 * fixed-size @drm_asahi_cmd_header header and is followed by a | ||
| 712 | 	 * variable-length payload according to the type and size in the header. | ||
| 713 | 	 * | ||
| 714 | 	 * The combined count of "real" hardware commands must be nonzero and at | ||
| 715 | 	 * most drm_asahi_params_global::max_commands_per_submission. | ||
| 716 | 	 */ | ||
| 717 | 	__u64 cmdbuf; | ||
| 718 | |||
| 719 | 	/** @flags: Flags for command submission (MBZ) */ | ||
| 720 | 	__u32 flags; | ||
| 721 | |||
| 722 | 	/** @queue_id: The queue ID to be submitted to */ | ||
| 723 | 	__u32 queue_id; | ||
| 724 | |||
| 725 | 	/** | ||
| 726 | 	 * @in_sync_count: Number of sync objects to wait on before starting | ||
| 727 | 	 * this job. | ||
| 728 | 	 */ | ||
| 729 | 	__u32 in_sync_count; | ||
| 730 | |||
| 731 | 	/** | ||
| 732 | 	 * @out_sync_count: Number of sync objects to signal upon completion of | ||
| 733 | 	 * this job. | ||
| 734 | 	 */ | ||
| 735 | 	__u32 out_sync_count; | ||
| 736 | |||
| 737 | 	/** @cmdbuf_size: Command buffer size in bytes */ | ||
| 738 | 	__u32 cmdbuf_size; | ||
| 739 | |||
| 740 | 	/** @pad: MBZ */ | ||
| 741 | 	__u32 pad; | ||
| 742 | }; | ||
| 743 | |||
| 744 | /** | ||
| 745 | * struct drm_asahi_attachment - Describe an "attachment". | ||
| 746 | * | ||
| 747 | * Attachments are any memory written by shaders, notably including render | ||
| 748 | * target attachments written by the end-of-tile program. This is purely a hint | ||
| 749 | * about the accessed memory regions. It is optional to specify, which is | ||
| 750 | * fortunate as it cannot be specified precisely with bindless access anyway. | ||
| 751 | * But where possible, it's probably a good idea for userspace to include these | ||
| 752 | * hints, forwarded to the firmware. | ||
| 753 | * | ||
| 754 | * This struct is implicitly sized and therefore is not extensible. | ||
| 755 | */ | ||
| 756 | struct drm_asahi_attachment { | ||
| 757 | 	/** @pointer: Base address of the attachment */ | ||
| 758 | 	__u64 pointer; | ||
| 759 | |||
| 760 | 	/** @size: Size of the attachment in bytes */ | ||
| 761 | 	__u64 size; | ||
| 762 | |||
| 763 | 	/** @pad: MBZ */ | ||
| 764 | 	__u32 pad; | ||
| 765 | |||
| 766 | 	/** @flags: MBZ */ | ||
| 767 | 	__u32 flags; | ||
| 768 | }; | ||
| 769 | |||
| 770 | enum drm_asahi_render_flags { | ||
| 771 | 	/** | ||
| 772 | 	 * @DRM_ASAHI_RENDER_VERTEX_SCRATCH: A vertex stage shader uses scratch | ||
| 773 | 	 * memory. | ||
| 774 | 	 */ | ||
| 775 | 	DRM_ASAHI_RENDER_VERTEX_SCRATCH = (1U << 0), | ||
| 776 | |||
| 777 | 	/** | ||
| 778 | 	 * @DRM_ASAHI_RENDER_PROCESS_EMPTY_TILES: Process even empty tiles. | ||
| 779 | 	 * This must be set when clearing render targets. | ||
| 780 | 	 */ | ||
| 781 | 	DRM_ASAHI_RENDER_PROCESS_EMPTY_TILES = (1U << 1), | ||
| 782 | |||
| 783 | 	/** | ||
| 784 | 	 * @DRM_ASAHI_RENDER_NO_VERTEX_CLUSTERING: Run vertex stage on a single | ||
| 785 | 	 * cluster (on multi-cluster GPUs) | ||
| 786 | 	 * | ||
| 787 | 	 * This harms performance but can workaround certain sync/coherency | ||
| 788 | 	 * bugs, and therefore is useful for debugging. | ||
| 789 | 	 */ | ||
| 790 | 	DRM_ASAHI_RENDER_NO_VERTEX_CLUSTERING = (1U << 2), | ||
| 791 | |||
| 792 | 	/** | ||
| 793 | 	 * @DRM_ASAHI_RENDER_DBIAS_IS_INT: Use integer depth bias formula. | ||
| 794 | 	 * | ||
| 795 | 	 * Graphics specifications contain two alternate formulas for depth | ||
| 796 | 	 * bias, a float formula used with floating-point depth buffers and an | ||
| 797 | 	 * integer formula using with unorm depth buffers. This flag specifies | ||
| 798 | 	 * that the integer formula should be used. If omitted, the float | ||
| 799 | 	 * formula is used instead. | ||
| 800 | 	 * | ||
| 801 | 	 * This corresponds to bit 18 of the relevant hardware control register, | ||
| 802 | 	 * so we match that here for efficiency. | ||
| 803 | 	 */ | ||
| 804 | 	DRM_ASAHI_RENDER_DBIAS_IS_INT = (1U << 18), | ||
| 805 | }; | ||
| 806 | |||
| 807 | /** | ||
| 808 | * struct drm_asahi_zls_buffer - Describe a depth or stencil buffer. | ||
| 809 | * | ||
| 810 | * These fields correspond to hardware registers in the ZLS (Z Load/Store) unit. | ||
| 811 | * There are three hardware registers for each field respectively for loads, | ||
| 812 | * stores, and partial renders. In practice, it makes sense to set all to the | ||
| 813 | * same values, except in exceptional cases not yet implemented in userspace, so | ||
| 814 | * we do not duplicate here for simplicity/efficiency. | ||
| 815 | * | ||
| 816 | * This struct is embedded in other structs and therefore is not extensible. | ||
| 817 | */ | ||
| 818 | struct drm_asahi_zls_buffer { | ||
| 819 | 	/** @base: Base address of the buffer */ | ||
| 820 | 	__u64 base; | ||
| 821 | |||
| 822 | 	/** | ||
| 823 | 	 * @comp_base: If the load buffer is compressed, address of the | ||
| 824 | 	 * compression metadata section. | ||
| 825 | 	 */ | ||
| 826 | 	__u64 comp_base; | ||
| 827 | |||
| 828 | 	/** | ||
| 829 | 	 * @stride: If layered rendering is enabled, the number of bytes | ||
| 830 | 	 * between each layer of the buffer. | ||
| 831 | 	 */ | ||
| 832 | 	__u32 stride; | ||
| 833 | |||
| 834 | 	/** | ||
| 835 | 	 * @comp_stride: If layered rendering is enabled, the number of bytes | ||
| 836 | 	 * between each layer of the compression metadata. | ||
| 837 | 	 */ | ||
| 838 | 	__u32 comp_stride; | ||
| 839 | }; | ||
| 840 | |||
| 841 | /** | ||
| 842 | * struct drm_asahi_timestamp - Describe a timestamp write. | ||
| 843 | * | ||
| 844 | * The firmware can optionally write the GPU timestamp at render pass | ||
| 845 | * granularities, but it needs to be mapped specially via | ||
| 846 | * DRM_IOCTL_ASAHI_GEM_BIND_OBJECT. This structure therefore describes where to | ||
| 847 | * write as a handle-offset pair, rather than a GPU address like normal. | ||
| 848 | * | ||
| 849 | * This struct is embedded in other structs and therefore is not extensible. | ||
| 850 | */ | ||
| 851 | struct drm_asahi_timestamp { | ||
| 852 | 	/** | ||
| 853 | 	 * @handle: Handle of the timestamp buffer, or 0 to skip this | ||
| 854 | 	 * timestamp. If nonzero, this must equal the value returned in | ||
| 855 | 	 * drm_asahi_gem_bind_object::object_handle. | ||
| 856 | 	 */ | ||
| 857 | 	__u32 handle; | ||
| 858 | |||
| 859 | 	/** @offset: Offset to write into the timestamp buffer */ | ||
| 860 | 	__u32 offset; | ||
| 861 | }; | ||
| 862 | |||
| 863 | /** | ||
| 864 | * struct drm_asahi_timestamps - Describe timestamp writes. | ||
| 865 | * | ||
| 866 | * Each operation that can be timestamped, can be timestamped at the start and | ||
| 867 | * end. Therefore, drm_asahi_timestamp structs always come in pairs, bundled | ||
| 868 | * together into drm_asahi_timestamps. | ||
| 869 | * | ||
| 870 | * This struct is embedded in other structs and therefore is not extensible. | ||
| 871 | */ | ||
| 872 | struct drm_asahi_timestamps { | ||
| 873 | 	/** @start: Timestamp recorded at the start of the operation */ | ||
| 874 | 	struct drm_asahi_timestamp start; | ||
| 875 | |||
| 876 | 	/** @end: Timestamp recorded at the end of the operation */ | ||
| 877 | 	struct drm_asahi_timestamp end; | ||
| 878 | }; | ||
| 879 | |||
| 880 | /** | ||
| 881 | * struct drm_asahi_helper_program - Describe helper program configuration. | ||
| 882 | * | ||
| 883 | * The helper program is a compute-like kernel required for various hardware | ||
| 884 | * functionality. Its most important role is dynamically allocating | ||
| 885 | * scratch/stack memory for individual subgroups, by partitioning a static | ||
| 886 | * allocation shared for the whole device. It is supplied by userspace via | ||
| 887 | * drm_asahi_helper_program and internally dispatched by the hardware as needed. | ||
| 888 | * | ||
| 889 | * This struct is embedded in other structs and therefore is not extensible. | ||
| 890 | */ | ||
| 891 | struct drm_asahi_helper_program { | ||
| 892 | 	/** | ||
| 893 | 	 * @binary: USC address to the helper program binary. This is a tagged | ||
| 894 | 	 * pointer with configuration in the bottom bits. | ||
| 895 | 	 */ | ||
| 896 | 	__u32 binary; | ||
| 897 | |||
| 898 | 	/** @cfg: Additional configuration bits for the helper program. */ | ||
| 899 | 	__u32 cfg; | ||
| 900 | |||
| 901 | 	/** | ||
| 902 | 	 * @data: Data passed to the helper program. This value is not | ||
| 903 | 	 * interpreted by the kernel, firmware, or hardware in any way. It is | ||
| 904 | 	 * simply a sideband for userspace, set with the submit ioctl and read | ||
| 905 | 	 * via special registers inside the helper program. | ||
| 906 | 	 * | ||
| 907 | 	 * In practice, userspace will pass a 64-bit GPU VA here pointing to the | ||
| 908 | 	 * actual arguments, which presumably don't fit in 64-bits. | ||
| 909 | 	 */ | ||
| 910 | 	__u64 data; | ||
| 911 | }; | ||
| 912 | |||
| 913 | /** | ||
| 914 | * struct drm_asahi_bg_eot - Describe a background or end-of-tile program. | ||
| 915 | * | ||
| 916 | * The background and end-of-tile programs are dispatched by the hardware at the | ||
| 917 | * beginning and end of rendering. As the hardware "tilebuffer" is simply local | ||
| 918 | * memory, these programs are necessary to implement API-level render targets. | ||
| 919 | * The fragment-like background program is responsible for loading either the | ||
| 920 | * clear colour or the existing render target contents, while the compute-like | ||
| 921 | * end-of-tile program stores the tilebuffer contents to memory. | ||
| 922 | * | ||
| 923 | * This struct is embedded in other structs and therefore is not extensible. | ||
| 924 | */ | ||
| 925 | struct drm_asahi_bg_eot { | ||
| 926 | 	/** | ||
| 927 | 	 * @usc: USC address of the hardware USC words binding resources | ||
| 928 | 	 * (including images and uniforms) and the program itself. Note this is | ||
| 929 | 	 * an additional layer of indirection compared to the helper program, | ||
| 930 | 	 * avoiding the need for a sideband for data. This is a tagged pointer | ||
| 931 | 	 * with additional configuration in the bottom bits. | ||
| 932 | 	 */ | ||
| 933 | 	__u32 usc; | ||
| 934 | |||
| 935 | 	/** | ||
| 936 | 	 * @rsrc_spec: Resource specifier for the program. This is a packed | ||
| 937 | 	 * hardware data structure describing the required number of registers, | ||
| 938 | 	 * uniforms, bound textures, and bound samplers. | ||
| 939 | 	 */ | ||
| 940 | 	__u32 rsrc_spec; | ||
| 941 | }; | ||
| 942 | |||
| 943 | /** | ||
| 944 | * struct drm_asahi_cmd_render - Command to submit 3D | ||
| 945 | * | ||
| 946 | * This command submits a single render pass. The hardware control stream may | ||
| 947 | * include many draws and subpasses, but within the command, the framebuffer | ||
| 948 | * dimensions and attachments are fixed. | ||
| 949 | * | ||
| 950 | * The hardware requires the firmware to set a large number of Control Registers | ||
| 951 | * setting up state at render pass granularity before each command rendering 3D. | ||
| 952 | * The firmware bundles this state into data structures. Unfortunately, we | ||
| 953 | * cannot expose either any of that directly to userspace, because the | ||
| 954 | * kernel-firmware ABI is not stable. Although we can guarantee the firmware | ||
| 955 | * updates in tandem with the kernel, we cannot break old userspace when | ||
| 956 | * upgrading the firmware and kernel. Therefore, we need to abstract well the | ||
| 957 | * data structures to avoid tying our hands with future firmwares. | ||
| 958 | * | ||
| 959 | * The bulk of drm_asahi_cmd_render therefore consists of values of hardware | ||
| 960 | * control registers, marshalled via the firmware interface. | ||
| 961 | * | ||
| 962 | * The framebuffer/tilebuffer dimensions are also specified here. In addition to | ||
| 963 | * being passed to the firmware/hardware, the kernel requires these dimensions | ||
| 964 | * to calculate various essential tiling-related data structures. It is | ||
| 965 | * unfortunate that our submits are heavier than on vendors with saner | ||
| 966 | * hardware-software interfaces. The upshot is all of this information is | ||
| 967 | * readily available to userspace with all current APIs. | ||
| 968 | * | ||
| 969 | * It looks odd - but it's not overly burdensome and it ensures we can remain | ||
| 970 | * compatible with old userspace. | ||
| 971 | */ | ||
| 972 | struct drm_asahi_cmd_render { | ||
| 973 | 	/** @flags: Combination of drm_asahi_render_flags flags. */ | ||
| 974 | 	__u32 flags; | ||
| 975 | |||
| 976 | 	/** | ||
| 977 | 	 * @isp_zls_pixels: ISP_ZLS_PIXELS register value. This contains the | ||
| 978 | 	 * depth/stencil width/height, which may differ from the framebuffer | ||
| 979 | 	 * width/height. | ||
| 980 | 	 */ | ||
| 981 | 	__u32 isp_zls_pixels; | ||
| 982 | |||
| 983 | 	/** | ||
| 984 | 	 * @vdm_ctrl_stream_base: VDM_CTRL_STREAM_BASE register value. GPU | ||
| 985 | 	 * address to the beginning of the VDM control stream. | ||
| 986 | 	 */ | ||
| 987 | 	__u64 vdm_ctrl_stream_base; | ||
| 988 | |||
| 989 | 	/** @vertex_helper: Helper program used for the vertex shader */ | ||
| 990 | 	struct drm_asahi_helper_program vertex_helper; | ||
| 991 | |||
| 992 | 	/** @fragment_helper: Helper program used for the fragment shader */ | ||
| 993 | 	struct drm_asahi_helper_program fragment_helper; | ||
| 994 | |||
| 995 | 	/** | ||
| 996 | 	 * @isp_scissor_base: ISP_SCISSOR_BASE register value. GPU address of an | ||
| 997 | 	 * array of scissor descriptors indexed in the render pass. | ||
| 998 | 	 */ | ||
| 999 | 	__u64 isp_scissor_base; | ||
| 1000 | |||
| 1001 | 	/** | ||
| 1002 | 	 * @isp_dbias_base: ISP_DBIAS_BASE register value. GPU address of an | ||
| 1003 | 	 * array of depth bias values indexed in the render pass. | ||
| 1004 | 	 */ | ||
| 1005 | 	__u64 isp_dbias_base; | ||
| 1006 | |||
| 1007 | 	/** | ||
| 1008 | 	 * @isp_oclqry_base: ISP_OCLQRY_BASE register value. GPU address of an | ||
| 1009 | 	 * array of occlusion query results written by the render pass. | ||
| 1010 | 	 */ | ||
| 1011 | 	__u64 isp_oclqry_base; | ||
| 1012 | |||
| 1013 | 	/** @depth: Depth buffer */ | ||
| 1014 | 	struct drm_asahi_zls_buffer depth; | ||
| 1015 | |||
| 1016 | 	/** @stencil: Stencil buffer */ | ||
| 1017 | 	struct drm_asahi_zls_buffer stencil; | ||
| 1018 | |||
| 1019 | 	/** @zls_ctrl: ZLS_CTRL register value */ | ||
| 1020 | 	__u64 zls_ctrl; | ||
| 1021 | |||
| 1022 | 	/** @ppp_multisamplectl: PPP_MULTISAMPLECTL register value */ | ||
| 1023 | 	__u64 ppp_multisamplectl; | ||
| 1024 | |||
| 1025 | 	/** | ||
| 1026 | 	 * @sampler_heap: Base address of the sampler heap. This heap is used | ||
| 1027 | 	 * for both vertex shaders and fragment shaders. The registers are | ||
| 1028 | 	 * per-stage, but there is no known use case for separate heaps. | ||
| 1029 | 	 */ | ||
| 1030 | 	__u64 sampler_heap; | ||
| 1031 | |||
| 1032 | 	/** @ppp_ctrl: PPP_CTRL register value */ | ||
| 1033 | 	__u32 ppp_ctrl; | ||
| 1034 | |||
| 1035 | 	/** @width_px: Framebuffer width in pixels */ | ||
| 1036 | 	__u16 width_px; | ||
| 1037 | |||
| 1038 | 	/** @height_px: Framebuffer height in pixels */ | ||
| 1039 | 	__u16 height_px; | ||
| 1040 | |||
| 1041 | 	/** @layers: Number of layers in the framebuffer */ | ||
| 1042 | 	__u16 layers; | ||
| 1043 | |||
| 1044 | 	/** @sampler_count: Number of samplers in the sampler heap. */ | ||
| 1045 | 	__u16 sampler_count; | ||
| 1046 | |||
| 1047 | 	/** @utile_width_px: Width of a logical tilebuffer tile in pixels */ | ||
| 1048 | 	__u8 utile_width_px; | ||
| 1049 | |||
| 1050 | 	/** @utile_height_px: Height of a logical tilebuffer tile in pixels */ | ||
| 1051 | 	__u8 utile_height_px; | ||
| 1052 | |||
| 1053 | 	/** @samples: # of samples in the framebuffer. Must be 1, 2, or 4. */ | ||
| 1054 | 	__u8 samples; | ||
| 1055 | |||
| 1056 | 	/** @sample_size_B: # of bytes in the tilebuffer required per sample. */ | ||
| 1057 | 	__u8 sample_size_B; | ||
| 1058 | |||
| 1059 | 	/** | ||
| 1060 | 	 * @isp_merge_upper_x: 32-bit float used in the hardware triangle | ||
| 1061 | 	 * merging. Calculate as: tan(60 deg) * width. | ||
| 1062 | 	 * | ||
| 1063 | 	 * Making these values UAPI avoids requiring floating-point calculations | ||
| 1064 | 	 * in the kernel in the hot path. | ||
| 1065 | 	 */ | ||
| 1066 | 	__u32 isp_merge_upper_x; | ||
| 1067 | |||
| 1068 | 	/** | ||
| 1069 | 	 * @isp_merge_upper_y: 32-bit float. Calculate as: tan(60 deg) * height. | ||
| 1070 | 	 * See @isp_merge_upper_x. | ||
| 1071 | 	 */ | ||
| 1072 | 	__u32 isp_merge_upper_y; | ||
| 1073 | |||
| 1074 | 	/** @bg: Background program run for each tile at the start */ | ||
| 1075 | 	struct drm_asahi_bg_eot bg; | ||
| 1076 | |||
| 1077 | 	/** @eot: End-of-tile program ran for each tile at the end */ | ||
| 1078 | 	struct drm_asahi_bg_eot eot; | ||
| 1079 | |||
| 1080 | 	/** | ||
| 1081 | 	 * @partial_bg: Background program ran at the start of each tile when | ||
| 1082 | 	 * resuming the render pass during a partial render. | ||
| 1083 | 	 */ | ||
| 1084 | 	struct drm_asahi_bg_eot partial_bg; | ||
| 1085 | |||
| 1086 | 	/** | ||
| 1087 | 	 * @partial_eot: End-of-tile program ran at the end of each tile when | ||
| 1088 | 	 * pausing the render pass during a partial render. | ||
| 1089 | 	 */ | ||
| 1090 | 	struct drm_asahi_bg_eot partial_eot; | ||
| 1091 | |||
| 1092 | 	/** | ||
| 1093 | 	 * @isp_bgobjdepth: ISP_BGOBJDEPTH register value. This is the depth | ||
| 1094 | 	 * buffer clear value, encoded in the depth buffer's format: either a | ||
| 1095 | 	 * 32-bit float or a 16-bit unorm (with upper bits zeroed). | ||
| 1096 | 	 */ | ||
| 1097 | 	__u32 isp_bgobjdepth; | ||
| 1098 | |||
| 1099 | 	/** | ||
| 1100 | 	 * @isp_bgobjvals: ISP_BGOBJVALS register value. The bottom 8-bits | ||
| 1101 | 	 * contain the stencil buffer clear value. | ||
| 1102 | 	 */ | ||
| 1103 | 	__u32 isp_bgobjvals; | ||
| 1104 | |||
| 1105 | 	/** @ts_vtx: Timestamps for the vertex portion of the render */ | ||
| 1106 | 	struct drm_asahi_timestamps ts_vtx; | ||
| 1107 | |||
| 1108 | 	/** @ts_frag: Timestamps for the fragment portion of the render */ | ||
| 1109 | 	struct drm_asahi_timestamps ts_frag; | ||
| 1110 | }; | ||
| 1111 | |||
| 1112 | /** | ||
| 1113 | * struct drm_asahi_cmd_compute - Command to submit compute | ||
| 1114 | * | ||
| 1115 | * This command submits a control stream consisting of compute dispatches. There | ||
| 1116 | * is essentially no limit on how many compute dispatches may be included in a | ||
| 1117 | * single compute command, although timestamps are at command granularity. | ||
| 1118 | */ | ||
| 1119 | struct drm_asahi_cmd_compute { | ||
| 1120 | 	/** @flags: MBZ */ | ||
| 1121 | 	__u32 flags; | ||
| 1122 | |||
| 1123 | 	/** @sampler_count: Number of samplers in the sampler heap. */ | ||
| 1124 | 	__u32 sampler_count; | ||
| 1125 | |||
| 1126 | 	/** | ||
| 1127 | 	 * @cdm_ctrl_stream_base: CDM_CTRL_STREAM_BASE register value. GPU | ||
| 1128 | 	 * address to the beginning of the CDM control stream. | ||
| 1129 | 	 */ | ||
| 1130 | 	__u64 cdm_ctrl_stream_base; | ||
| 1131 | |||
| 1132 | 	/** | ||
| 1133 | 	 * @cdm_ctrl_stream_end: GPU base address to the end of the hardware | ||
| 1134 | 	 * control stream. Note this only considers the first contiguous segment | ||
| 1135 | 	 * of the control stream, as the stream might jump elsewhere. | ||
| 1136 | 	 */ | ||
| 1137 | 	__u64 cdm_ctrl_stream_end; | ||
| 1138 | |||
| 1139 | 	/** @sampler_heap: Base address of the sampler heap. */ | ||
| 1140 | 	__u64 sampler_heap; | ||
| 1141 | |||
| 1142 | 	/** @helper: Helper program used for this compute command */ | ||
| 1143 | 	struct drm_asahi_helper_program helper; | ||
| 1144 | |||
| 1145 | 	/** @ts: Timestamps for the compute command */ | ||
| 1146 | 	struct drm_asahi_timestamps ts; | ||
| 1147 | }; | ||
| 1148 | |||
| 1149 | /** | ||
| 1150 | * struct drm_asahi_get_time - Arguments passed to DRM_IOCTL_ASAHI_GET_TIME | ||
| 1151 | */ | ||
| 1152 | struct drm_asahi_get_time { | ||
| 1153 | 	/** @flags: MBZ. */ | ||
| 1154 | 	__u64 flags; | ||
| 1155 | |||
| 1156 | 	/** @gpu_timestamp: On return, the GPU timestamp in nanoseconds. */ | ||
| 1157 | 	__u64 gpu_timestamp; | ||
| 1158 | }; | ||
| 1159 | |||
| 1160 | /** | ||
| 1161 | * DRM_IOCTL_ASAHI() - Build an Asahi IOCTL number | ||
| 1162 | * @__access: Access type. Must be R, W or RW. | ||
| 1163 | * @__id: One of the DRM_ASAHI_xxx id. | ||
| 1164 | * @__type: Suffix of the type being passed to the IOCTL. | ||
| 1165 | * | ||
| 1166 | * Don't use this macro directly, use the DRM_IOCTL_ASAHI_xxx | ||
| 1167 | * values instead. | ||
| 1168 | * | ||
| 1169 | * Return: An IOCTL number to be passed to ioctl() from userspace. | ||
| 1170 | */ | ||
| 1171 | #define DRM_IOCTL_ASAHI(__access, __id, __type) \ | ||
| 1172 | 	DRM_IO ## __access(DRM_COMMAND_BASE + DRM_ASAHI_ ## __id, \ | ||
| 1173 | 			 struct drm_asahi_ ## __type) | ||
| 1174 | |||
| 1175 | /* Note: this is an enum so that it can be resolved by Rust bindgen. */ | ||
| 1176 | enum { | ||
| 1177 | 	DRM_IOCTL_ASAHI_GET_PARAMS = DRM_IOCTL_ASAHI(W, GET_PARAMS, get_params), | ||
| 1178 | 	DRM_IOCTL_ASAHI_GET_TIME = DRM_IOCTL_ASAHI(WR, GET_TIME, get_time), | ||
| 1179 | 	DRM_IOCTL_ASAHI_VM_CREATE = DRM_IOCTL_ASAHI(WR, VM_CREATE, vm_create), | ||
| 1180 | 	DRM_IOCTL_ASAHI_VM_DESTROY = DRM_IOCTL_ASAHI(W, VM_DESTROY, vm_destroy), | ||
| 1181 | 	DRM_IOCTL_ASAHI_VM_BIND = DRM_IOCTL_ASAHI(W, VM_BIND, vm_bind), | ||
| 1182 | 	DRM_IOCTL_ASAHI_GEM_CREATE = DRM_IOCTL_ASAHI(WR, GEM_CREATE, gem_create), | ||
| 1183 | 	DRM_IOCTL_ASAHI_GEM_MMAP_OFFSET = DRM_IOCTL_ASAHI(WR, GEM_MMAP_OFFSET, gem_mmap_offset), | ||
| 1184 | 	DRM_IOCTL_ASAHI_GEM_BIND_OBJECT = DRM_IOCTL_ASAHI(WR, GEM_BIND_OBJECT, gem_bind_object), | ||
| 1185 | 	DRM_IOCTL_ASAHI_QUEUE_CREATE = DRM_IOCTL_ASAHI(WR, QUEUE_CREATE, queue_create), | ||
| 1186 | 	DRM_IOCTL_ASAHI_QUEUE_DESTROY = DRM_IOCTL_ASAHI(W, QUEUE_DESTROY, queue_destroy), | ||
| 1187 | 	DRM_IOCTL_ASAHI_SUBMIT = DRM_IOCTL_ASAHI(W, SUBMIT, submit), | ||
| 1188 | }; | ||
| 1189 | |||
| 1190 | #if defined(__cplusplus) | ||
| 1191 | } | ||
| 1192 | #endif | ||
| 1193 | |||
| 1194 | #endif /* _ASAHI_DRM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/drm.h+4| ... | @@ -899,13 +899,17 @@ struct drm_syncobj_destroy { | ... | @@ -899,13 +899,17 @@ struct drm_syncobj_destroy { |
| 899 | }; | 899 | }; |
| 900 | 900 | ||
| 901 | #define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) | 901 | #define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) |
| 902 | #define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_TIMELINE (1 << 1) | ||
| 902 | #define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) | 903 | #define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) |
| 904 | #define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_TIMELINE (1 << 1) | ||
| 903 | struct drm_syncobj_handle { | 905 | struct drm_syncobj_handle { |
| 904 | 	__u32 handle; | 906 | 	__u32 handle; |
| 905 | 	__u32 flags; | 907 | 	__u32 flags; |
| 906 | 908 | ||
| 907 | 	__s32 fd; | 909 | 	__s32 fd; |
| 908 | 	__u32 pad; | 910 | 	__u32 pad; |
| 911 | |||
| 912 | 	__u64 point; | ||
| 909 | }; | 913 | }; |
| 910 | 914 | ||
| 911 | struct drm_syncobj_transfer { | 915 | struct drm_syncobj_transfer { |
lib/libc/include/any-linux-any/drm/drm_fourcc.h+141-1| ... | @@ -210,6 +210,10 @@ extern "C" { | ... | @@ -210,6 +210,10 @@ extern "C" { |
| 210 | #define DRM_FORMAT_RGBA1010102	fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ | 210 | #define DRM_FORMAT_RGBA1010102	fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ |
| 211 | #define DRM_FORMAT_BGRA1010102	fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ | 211 | #define DRM_FORMAT_BGRA1010102	fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ |
| 212 | 212 | ||
| 213 | /* 48 bpp RGB */ | ||
| 214 | #define DRM_FORMAT_RGB161616 fourcc_code('R', 'G', '4', '8') /* [47:0] R:G:B 16:16:16 little endian */ | ||
| 215 | #define DRM_FORMAT_BGR161616 fourcc_code('B', 'G', '4', '8') /* [47:0] B:G:R 16:16:16 little endian */ | ||
| 216 | |||
| 213 | /* 64 bpp RGB */ | 217 | /* 64 bpp RGB */ |
| 214 | #define DRM_FORMAT_XRGB16161616	fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */ | 218 | #define DRM_FORMAT_XRGB16161616	fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */ |
| 215 | #define DRM_FORMAT_XBGR16161616	fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */ | 219 | #define DRM_FORMAT_XBGR16161616	fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */ |
| ... | @@ -218,7 +222,7 @@ extern "C" { | ... | @@ -218,7 +222,7 @@ extern "C" { |
| 218 | #define DRM_FORMAT_ABGR16161616	fourcc_code('A', 'B', '4', '8') /* [63:0] A:B:G:R 16:16:16:16 little endian */ | 222 | #define DRM_FORMAT_ABGR16161616	fourcc_code('A', 'B', '4', '8') /* [63:0] A:B:G:R 16:16:16:16 little endian */ |
| 219 | 223 | ||
| 220 | /* | 224 | /* |
| 221 | * Floating point 64bpp RGB | 225 | * Half-Floating point - 16b/component |
| 222 | * IEEE 754-2008 binary16 half-precision float | 226 | * IEEE 754-2008 binary16 half-precision float |
| 223 | * [15:0] sign:exponent:mantissa 1:5:10 | 227 | * [15:0] sign:exponent:mantissa 1:5:10 |
| 224 | */ | 228 | */ |
| ... | @@ -228,6 +232,20 @@ extern "C" { | ... | @@ -228,6 +232,20 @@ extern "C" { |
| 228 | #define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H') /* [63:0] A:R:G:B 16:16:16:16 little endian */ | 232 | #define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H') /* [63:0] A:R:G:B 16:16:16:16 little endian */ |
| 229 | #define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */ | 233 | #define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */ |
| 230 | 234 | ||
| 235 | #define DRM_FORMAT_R16F fourcc_code('R', ' ', ' ', 'H') /* [15:0] R 16 little endian */ | ||
| 236 | #define DRM_FORMAT_GR1616F fourcc_code('G', 'R', ' ', 'H') /* [31:0] G:R 16:16 little endian */ | ||
| 237 | #define DRM_FORMAT_BGR161616F fourcc_code('B', 'G', 'R', 'H') /* [47:0] B:G:R 16:16:16 little endian */ | ||
| 238 | |||
| 239 | /* | ||
| 240 | * Floating point - 32b/component | ||
| 241 | * IEEE 754-2008 binary32 float | ||
| 242 | * [31:0] sign:exponent:mantissa 1:8:23 | ||
| 243 | */ | ||
| 244 | #define DRM_FORMAT_R32F fourcc_code('R', ' ', ' ', 'F') /* [31:0] R 32 little endian */ | ||
| 245 | #define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] R:G 32:32 little endian */ | ||
| 246 | #define DRM_FORMAT_BGR323232F fourcc_code('B', 'G', 'R', 'F') /* [95:0] R:G:B 32:32:32 little endian */ | ||
| 247 | #define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') /* [127:0] R:G:B:A 32:32:32:32 little endian */ | ||
| 248 | |||
| 231 | /* | 249 | /* |
| 232 | * RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits | 250 | * RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits |
| 233 | * of unused padding per component: | 251 | * of unused padding per component: |
| ... | @@ -377,6 +395,42 @@ extern "C" { | ... | @@ -377,6 +395,42 @@ extern "C" { |
| 377 | */ | 395 | */ |
| 378 | #define DRM_FORMAT_Q401		fourcc_code('Q', '4', '0', '1') | 396 | #define DRM_FORMAT_Q401		fourcc_code('Q', '4', '0', '1') |
| 379 | 397 | ||
| 398 | /* | ||
| 399 | * 3 plane YCbCr LSB aligned | ||
| 400 | * In order to use these formats in a similar fashion to MSB aligned ones | ||
| 401 | * implementation can multiply the values by 2^6=64. For that reason the padding | ||
| 402 | * must only contain zeros. | ||
| 403 | * index 0 = Y plane, [15:0] z:Y [6:10] little endian | ||
| 404 | * index 1 = Cr plane, [15:0] z:Cr [6:10] little endian | ||
| 405 | * index 2 = Cb plane, [15:0] z:Cb [6:10] little endian | ||
| 406 | */ | ||
| 407 | #define DRM_FORMAT_S010	fourcc_code('S', '0', '1', '0') /* 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel */ | ||
| 408 | #define DRM_FORMAT_S210	fourcc_code('S', '2', '1', '0') /* 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel */ | ||
| 409 | #define DRM_FORMAT_S410	fourcc_code('S', '4', '1', '0') /* non-subsampled Cb (1) and Cr (2) planes 10 bits per channel */ | ||
| 410 | |||
| 411 | /* | ||
| 412 | * 3 plane YCbCr LSB aligned | ||
| 413 | * In order to use these formats in a similar fashion to MSB aligned ones | ||
| 414 | * implementation can multiply the values by 2^4=16. For that reason the padding | ||
| 415 | * must only contain zeros. | ||
| 416 | * index 0 = Y plane, [15:0] z:Y [4:12] little endian | ||
| 417 | * index 1 = Cr plane, [15:0] z:Cr [4:12] little endian | ||
| 418 | * index 2 = Cb plane, [15:0] z:Cb [4:12] little endian | ||
| 419 | */ | ||
| 420 | #define DRM_FORMAT_S012	fourcc_code('S', '0', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel */ | ||
| 421 | #define DRM_FORMAT_S212	fourcc_code('S', '2', '1', '2') /* 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel */ | ||
| 422 | #define DRM_FORMAT_S412	fourcc_code('S', '4', '1', '2') /* non-subsampled Cb (1) and Cr (2) planes 12 bits per channel */ | ||
| 423 | |||
| 424 | /* | ||
| 425 | * 3 plane YCbCr | ||
| 426 | * index 0 = Y plane, [15:0] Y little endian | ||
| 427 | * index 1 = Cr plane, [15:0] Cr little endian | ||
| 428 | * index 2 = Cb plane, [15:0] Cb little endian | ||
| 429 | */ | ||
| 430 | #define DRM_FORMAT_S016	fourcc_code('S', '0', '1', '6') /* 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel */ | ||
| 431 | #define DRM_FORMAT_S216	fourcc_code('S', '2', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel */ | ||
| 432 | #define DRM_FORMAT_S416	fourcc_code('S', '4', '1', '6') /* non-subsampled Cb (1) and Cr (2) planes 16 bits per channel */ | ||
| 433 | |||
| 380 | /* | 434 | /* |
| 381 | * 3 plane YCbCr | 435 | * 3 plane YCbCr |
| 382 | * index 0: Y plane, [7:0] Y | 436 | * index 0: Y plane, [7:0] Y |
| ... | @@ -421,6 +475,8 @@ extern "C" { | ... | @@ -421,6 +475,8 @@ extern "C" { |
| 421 | #define DRM_FORMAT_MOD_VENDOR_ARM 0x08 | 475 | #define DRM_FORMAT_MOD_VENDOR_ARM 0x08 |
| 422 | #define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 | 476 | #define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 |
| 423 | #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a | 477 | #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a |
| 478 | #define DRM_FORMAT_MOD_VENDOR_MTK 0x0b | ||
| 479 | #define DRM_FORMAT_MOD_VENDOR_APPLE 0x0c | ||
| 424 | 480 | ||
| 425 | /* add more to the end as needed */ | 481 | /* add more to the end as needed */ |
| 426 | 482 | ||
| ... | @@ -1453,6 +1509,90 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) | ... | @@ -1453,6 +1509,90 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) |
| 1453 | */ | 1509 | */ |
| 1454 | #define AMLOGIC_FBC_OPTION_MEM_SAVING		(1ULL << 0) | 1510 | #define AMLOGIC_FBC_OPTION_MEM_SAVING		(1ULL << 0) |
| 1455 | 1511 | ||
| 1512 | /* MediaTek modifiers | ||
| 1513 | * Bits Parameter Notes | ||
| 1514 | * ----- ------------------------ --------------------------------------------- | ||
| 1515 | * 7: 0 TILE LAYOUT Values are MTK_FMT_MOD_TILE_* | ||
| 1516 | * 15: 8 COMPRESSION Values are MTK_FMT_MOD_COMPRESS_* | ||
| 1517 | * 23:16 10 BIT LAYOUT Values are MTK_FMT_MOD_10BIT_LAYOUT_* | ||
| 1518 | * | ||
| 1519 | */ | ||
| 1520 | |||
| 1521 | #define DRM_FORMAT_MOD_MTK(__flags)		fourcc_mod_code(MTK, __flags) | ||
| 1522 | |||
| 1523 | /* | ||
| 1524 | * MediaTek Tiled Modifier | ||
| 1525 | * The lowest 8 bits of the modifier is used to specify the tiling | ||
| 1526 | * layout. Only the 16L_32S tiling is used for now, but we define an | ||
| 1527 | * "untiled" version and leave room for future expansion. | ||
| 1528 | */ | ||
| 1529 | #define MTK_FMT_MOD_TILE_MASK 0xf | ||
| 1530 | #define MTK_FMT_MOD_TILE_NONE 0x0 | ||
| 1531 | #define MTK_FMT_MOD_TILE_16L32S 0x1 | ||
| 1532 | |||
| 1533 | /* | ||
| 1534 | * Bits 8-15 specify compression options | ||
| 1535 | */ | ||
| 1536 | #define MTK_FMT_MOD_COMPRESS_MASK (0xf << 8) | ||
| 1537 | #define MTK_FMT_MOD_COMPRESS_NONE (0x0 << 8) | ||
| 1538 | #define MTK_FMT_MOD_COMPRESS_V1 (0x1 << 8) | ||
| 1539 | |||
| 1540 | /* | ||
| 1541 | * Bits 16-23 specify how the bits of 10 bit formats are | ||
| 1542 | * stored out in memory | ||
| 1543 | */ | ||
| 1544 | #define MTK_FMT_MOD_10BIT_LAYOUT_MASK (0xf << 16) | ||
| 1545 | #define MTK_FMT_MOD_10BIT_LAYOUT_PACKED (0x0 << 16) | ||
| 1546 | #define MTK_FMT_MOD_10BIT_LAYOUT_LSBTILED (0x1 << 16) | ||
| 1547 | #define MTK_FMT_MOD_10BIT_LAYOUT_LSBRASTER (0x2 << 16) | ||
| 1548 | |||
| 1549 | /* alias for the most common tiling format */ | ||
| 1550 | #define DRM_FORMAT_MOD_MTK_16L_32S_TILE DRM_FORMAT_MOD_MTK(MTK_FMT_MOD_TILE_16L32S) | ||
| 1551 | |||
| 1552 | /* | ||
| 1553 | * Apple GPU-tiled layouts. | ||
| 1554 | * | ||
| 1555 | * Apple GPUs support nonlinear tilings with optional lossless compression. | ||
| 1556 | * | ||
| 1557 | * GPU-tiled images are divided into 16KiB tiles: | ||
| 1558 | * | ||
| 1559 | * Bytes per pixel Tile size | ||
| 1560 | * --------------- --------- | ||
| 1561 | * 1 128x128 | ||
| 1562 | * 2 128x64 | ||
| 1563 | * 4 64x64 | ||
| 1564 | * 8 64x32 | ||
| 1565 | * 16 32x32 | ||
| 1566 | * | ||
| 1567 | * Tiles are raster-order. Pixels within a tile are interleaved (Morton order). | ||
| 1568 | * | ||
| 1569 | * Compressed images pad the body to 128-bytes and are immediately followed by a | ||
| 1570 | * metadata section. The metadata section rounds the image dimensions to | ||
| 1571 | * powers-of-two and contains 8 bytes for each 16x16 compression subtile. | ||
| 1572 | * Subtiles are interleaved (Morton order). | ||
| 1573 | * | ||
| 1574 | * All images are 128-byte aligned. | ||
| 1575 | * | ||
| 1576 | * These layouts fundamentally do not have meaningful strides. No matter how we | ||
| 1577 | * specify strides for these layouts, userspace unaware of Apple image layouts | ||
| 1578 | * will be unable to use correctly the specified stride for any purpose. | ||
| 1579 | * Userspace aware of the image layouts do not use strides. The most "correct" | ||
| 1580 | * convention would be setting the image stride to 0. Unfortunately, some | ||
| 1581 | * software assumes the stride is at least (width * bytes per pixel). We | ||
| 1582 | * therefore require that stride equals (width * bytes per pixel). Since the | ||
| 1583 | * stride is arbitrary here, we pick the simplest convention. | ||
| 1584 | * | ||
| 1585 | * Although containing two sections, compressed image layouts are treated in | ||
| 1586 | * software as a single plane. This is modelled after AFBC, a similar | ||
| 1587 | * scheme. Attempting to separate the sections to be "explicit" in DRM would | ||
| 1588 | * only generate more confusion, as software does not treat the image this way. | ||
| 1589 | * | ||
| 1590 | * For detailed information on the hardware image layouts, see | ||
| 1591 | * https://docs.mesa3d.org/drivers/asahi.html#image-layouts | ||
| 1592 | */ | ||
| 1593 | #define DRM_FORMAT_MOD_APPLE_GPU_TILED fourcc_mod_code(APPLE, 1) | ||
| 1594 | #define DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED fourcc_mod_code(APPLE, 2) | ||
| 1595 | |||
| 1456 | /* | 1596 | /* |
| 1457 | * AMD modifiers | 1597 | * AMD modifiers |
| 1458 | * | 1598 | * |
lib/libc/include/any-linux-any/drm/ivpu_accel.h+100-2| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (C) 2020-2024 Intel Corporation | 3 | * Copyright (C) 2020-2025 Intel Corporation |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef __UAPI_IVPU_DRM_H__ | 6 | #ifndef __UAPI_IVPU_DRM_H__ |
| ... | @@ -22,6 +22,9 @@ extern "C" { | ... | @@ -22,6 +22,9 @@ extern "C" { |
| 22 | #define DRM_IVPU_METRIC_STREAMER_STOP	 0x08 | 22 | #define DRM_IVPU_METRIC_STREAMER_STOP	 0x08 |
| 23 | #define DRM_IVPU_METRIC_STREAMER_GET_DATA 0x09 | 23 | #define DRM_IVPU_METRIC_STREAMER_GET_DATA 0x09 |
| 24 | #define DRM_IVPU_METRIC_STREAMER_GET_INFO 0x0a | 24 | #define DRM_IVPU_METRIC_STREAMER_GET_INFO 0x0a |
| 25 | #define DRM_IVPU_CMDQ_CREATE 0x0b | ||
| 26 | #define DRM_IVPU_CMDQ_DESTROY 0x0c | ||
| 27 | #define DRM_IVPU_CMDQ_SUBMIT 0x0d | ||
| 25 | 28 | ||
| 26 | #define DRM_IOCTL_IVPU_GET_PARAM \ | 29 | #define DRM_IOCTL_IVPU_GET_PARAM \ |
| 27 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param) | 30 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param) |
| ... | @@ -57,6 +60,15 @@ extern "C" { | ... | @@ -57,6 +60,15 @@ extern "C" { |
| 57 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_GET_INFO, \ | 60 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_METRIC_STREAMER_GET_INFO, \ |
| 58 | 		 struct drm_ivpu_metric_streamer_get_data) | 61 | 		 struct drm_ivpu_metric_streamer_get_data) |
| 59 | 62 | ||
| 63 | #define DRM_IOCTL_IVPU_CMDQ_CREATE \ | ||
| 64 | 	DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_CREATE, struct drm_ivpu_cmdq_create) | ||
| 65 | |||
| 66 | #define DRM_IOCTL_IVPU_CMDQ_DESTROY \ | ||
| 67 | 	DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_DESTROY, struct drm_ivpu_cmdq_destroy) | ||
| 68 | |||
| 69 | #define DRM_IOCTL_IVPU_CMDQ_SUBMIT \ | ||
| 70 | 	DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_CMDQ_SUBMIT, struct drm_ivpu_cmdq_submit) | ||
| 71 | |||
| 60 | /** | 72 | /** |
| 61 | * DOC: contexts | 73 | * DOC: contexts |
| 62 | * | 74 | * |
| ... | @@ -107,6 +119,13 @@ extern "C" { | ... | @@ -107,6 +119,13 @@ extern "C" { |
| 107 | * accessible by hardware DMA. | 119 | * accessible by hardware DMA. |
| 108 | */ | 120 | */ |
| 109 | #define DRM_IVPU_CAP_DMA_MEMORY_RANGE	2 | 121 | #define DRM_IVPU_CAP_DMA_MEMORY_RANGE	2 |
| 122 | /** | ||
| 123 | * DRM_IVPU_CAP_MANAGE_CMDQ | ||
| 124 | * | ||
| 125 | * Driver supports explicit command queue operations like command queue create, | ||
| 126 | * command queue destroy and submit job on specific command queue. | ||
| 127 | */ | ||
| 128 | #define DRM_IVPU_CAP_MANAGE_CMDQ 3 | ||
| 110 | 129 | ||
| 111 | /** | 130 | /** |
| 112 | * struct drm_ivpu_param - Get/Set VPU parameters | 131 | * struct drm_ivpu_param - Get/Set VPU parameters |
| ... | @@ -128,7 +147,7 @@ struct drm_ivpu_param { | ... | @@ -128,7 +147,7 @@ struct drm_ivpu_param { |
| 128 | 	 * platform type when executing on a simulator or emulator (read-only) | 147 | 	 * platform type when executing on a simulator or emulator (read-only) |
| 129 | 	 * | 148 | 	 * |
| 130 | 	 * %DRM_IVPU_PARAM_CORE_CLOCK_RATE: | 149 | 	 * %DRM_IVPU_PARAM_CORE_CLOCK_RATE: |
| 131 | 	 * Current PLL frequency (read-only) | 150 | 	 * Maximum frequency of the NPU data processing unit clock (read-only) |
| 132 | 	 * | 151 | 	 * |
| 133 | 	 * %DRM_IVPU_PARAM_NUM_CONTEXTS: | 152 | 	 * %DRM_IVPU_PARAM_NUM_CONTEXTS: |
| 134 | 	 * Maximum number of simultaneously existing contexts (read-only) | 153 | 	 * Maximum number of simultaneously existing contexts (read-only) |
| ... | @@ -316,6 +335,44 @@ struct drm_ivpu_submit { | ... | @@ -316,6 +335,44 @@ struct drm_ivpu_submit { |
| 316 | 	__u32 priority; | 335 | 	__u32 priority; |
| 317 | }; | 336 | }; |
| 318 | 337 | ||
| 338 | /** | ||
| 339 | * struct drm_ivpu_cmdq_submit - Submit commands to the VPU using explicit command queue | ||
| 340 | * | ||
| 341 | * Execute a single command buffer on a given command queue. | ||
| 342 | * Handles to all referenced buffer objects have to be provided in @buffers_ptr. | ||
| 343 | * | ||
| 344 | * User space may wait on job completion using %DRM_IVPU_BO_WAIT ioctl. | ||
| 345 | */ | ||
| 346 | struct drm_ivpu_cmdq_submit { | ||
| 347 | 	/** | ||
| 348 | 	 * @buffers_ptr: | ||
| 349 | 	 * | ||
| 350 | 	 * A pointer to an u32 array of GEM handles of the BOs required for this job. | ||
| 351 | 	 * The number of elements in the array must be equal to the value given by @buffer_count. | ||
| 352 | 	 * | ||
| 353 | 	 * The first BO is the command buffer. The rest of array has to contain all | ||
| 354 | 	 * BOs referenced from the command buffer. | ||
| 355 | 	 */ | ||
| 356 | 	__u64 buffers_ptr; | ||
| 357 | |||
| 358 | 	/** @buffer_count: Number of elements in the @buffers_ptr */ | ||
| 359 | 	__u32 buffer_count; | ||
| 360 | |||
| 361 | 	/** @cmdq_id: ID for the command queue where job will be submitted */ | ||
| 362 | 	__u32 cmdq_id; | ||
| 363 | |||
| 364 | 	/** @flags: Reserved for future use - must be zero */ | ||
| 365 | 	__u32 flags; | ||
| 366 | |||
| 367 | 	/** | ||
| 368 | 	 * @commands_offset: | ||
| 369 | 	 * | ||
| 370 | 	 * Offset inside the first buffer in @buffers_ptr containing commands | ||
| 371 | 	 * to be executed. The offset has to be 8-byte aligned. | ||
| 372 | 	 */ | ||
| 373 | 	__u32 commands_offset; | ||
| 374 | }; | ||
| 375 | |||
| 319 | /* drm_ivpu_bo_wait job status codes */ | 376 | /* drm_ivpu_bo_wait job status codes */ |
| 320 | #define DRM_IVPU_JOB_STATUS_SUCCESS 0 | 377 | #define DRM_IVPU_JOB_STATUS_SUCCESS 0 |
| 321 | #define DRM_IVPU_JOB_STATUS_ABORTED 256 | 378 | #define DRM_IVPU_JOB_STATUS_ABORTED 256 |
| ... | @@ -388,6 +445,47 @@ struct drm_ivpu_metric_streamer_get_data { | ... | @@ -388,6 +445,47 @@ struct drm_ivpu_metric_streamer_get_data { |
| 388 | 	__u64 data_size; | 445 | 	__u64 data_size; |
| 389 | }; | 446 | }; |
| 390 | 447 | ||
| 448 | /* Command queue flags */ | ||
| 449 | #define DRM_IVPU_CMDQ_FLAG_TURBO 0x00000001 | ||
| 450 | |||
| 451 | /** | ||
| 452 | * struct drm_ivpu_cmdq_create - Create command queue for job submission | ||
| 453 | */ | ||
| 454 | struct drm_ivpu_cmdq_create { | ||
| 455 | 	/** @cmdq_id: Returned ID of created command queue */ | ||
| 456 | 	__u32 cmdq_id; | ||
| 457 | 	/** | ||
| 458 | 	 * @priority: | ||
| 459 | 	 * | ||
| 460 | 	 * Priority to be set for related job command queue, can be one of the following: | ||
| 461 | 	 * %DRM_IVPU_JOB_PRIORITY_DEFAULT | ||
| 462 | 	 * %DRM_IVPU_JOB_PRIORITY_IDLE | ||
| 463 | 	 * %DRM_IVPU_JOB_PRIORITY_NORMAL | ||
| 464 | 	 * %DRM_IVPU_JOB_PRIORITY_FOCUS | ||
| 465 | 	 * %DRM_IVPU_JOB_PRIORITY_REALTIME | ||
| 466 | 	 */ | ||
| 467 | 	__u32 priority; | ||
| 468 | 	/** | ||
| 469 | 	 * @flags: | ||
| 470 | 	 * | ||
| 471 | 	 * Supported flags: | ||
| 472 | 	 * | ||
| 473 | 	 * %DRM_IVPU_CMDQ_FLAG_TURBO | ||
| 474 | 	 * | ||
| 475 | 	 * Enable low-latency mode for the command queue. The NPU will maximize performance | ||
| 476 | 	 * when executing jobs from such queue at the cost of increased power usage. | ||
| 477 | 	 */ | ||
| 478 | 	__u32 flags; | ||
| 479 | }; | ||
| 480 | |||
| 481 | /** | ||
| 482 | * struct drm_ivpu_cmdq_destroy - Destroy a command queue | ||
| 483 | */ | ||
| 484 | struct drm_ivpu_cmdq_destroy { | ||
| 485 | 	/** @cmdq_id: ID of command queue to destroy */ | ||
| 486 | 	__u32 cmdq_id; | ||
| 487 | }; | ||
| 488 | |||
| 391 | /** | 489 | /** |
| 392 | * struct drm_ivpu_metric_streamer_stop - Stop collecting metric data | 490 | * struct drm_ivpu_metric_streamer_stop - Stop collecting metric data |
| 393 | */ | 491 | */ |
lib/libc/include/any-linux-any/drm/msm_drm.h+135-15| ... | @@ -90,6 +90,33 @@ struct drm_msm_timespec { | ... | @@ -90,6 +90,33 @@ struct drm_msm_timespec { |
| 90 | #define MSM_PARAM_RAYTRACING 0x11 /* RO */ | 90 | #define MSM_PARAM_RAYTRACING 0x11 /* RO */ |
| 91 | #define MSM_PARAM_UBWC_SWIZZLE 0x12 /* RO */ | 91 | #define MSM_PARAM_UBWC_SWIZZLE 0x12 /* RO */ |
| 92 | #define MSM_PARAM_MACROTILE_MODE 0x13 /* RO */ | 92 | #define MSM_PARAM_MACROTILE_MODE 0x13 /* RO */ |
| 93 | #define MSM_PARAM_UCHE_TRAP_BASE 0x14 /* RO */ | ||
| 94 | /* PRR (Partially Resident Region) is required for sparse residency: */ | ||
| 95 | #define MSM_PARAM_HAS_PRR 0x15 /* RO */ | ||
| 96 | /* MSM_PARAM_EN_VM_BIND is set to 1 to enable VM_BIND ops. | ||
| 97 | * | ||
| 98 | * With VM_BIND enabled, userspace is required to allocate iova and use the | ||
| 99 | * VM_BIND ops for map/unmap ioctls. MSM_INFO_SET_IOVA and MSM_INFO_GET_IOVA | ||
| 100 | * will be rejected. (The latter does not have a sensible meaning when a BO | ||
| 101 | * can have multiple and/or partial mappings.) | ||
| 102 | * | ||
| 103 | * With VM_BIND enabled, userspace does not include a submit_bo table in the | ||
| 104 | * SUBMIT ioctl (this will be rejected), the resident set is determined by | ||
| 105 | * the the VM_BIND ops. | ||
| 106 | * | ||
| 107 | * Enabling VM_BIND will fail on devices which do not have per-process pgtables. | ||
| 108 | * And it is not allowed to disable VM_BIND once it has been enabled. | ||
| 109 | * | ||
| 110 | * Enabling VM_BIND should be done (attempted) prior to allocating any BOs or | ||
| 111 | * submitqueues of type MSM_SUBMITQUEUE_VM_BIND. | ||
| 112 | * | ||
| 113 | * Relatedly, when VM_BIND mode is enabled, the kernel will not try to recover | ||
| 114 | * from GPU faults or failed async VM_BIND ops, in particular because it is | ||
| 115 | * difficult to communicate to userspace which op failed so that userspace | ||
| 116 | * could rewind and try again. When the VM is marked unusable, the SUBMIT | ||
| 117 | * ioctl will throw -EPIPE. | ||
| 118 | */ | ||
| 119 | #define MSM_PARAM_EN_VM_BIND 0x16 /* WO, once */ | ||
| 93 | 120 | ||
| 94 | /* For backwards compat. The original support for preemption was based on | 121 | /* For backwards compat. The original support for preemption was based on |
| 95 | * a single ring per priority level so # of priority levels equals the # | 122 | * a single ring per priority level so # of priority levels equals the # |
| ... | @@ -113,6 +140,19 @@ struct drm_msm_param { | ... | @@ -113,6 +140,19 @@ struct drm_msm_param { |
| 113 | 140 | ||
| 114 | #define MSM_BO_SCANOUT 0x00000001 /* scanout capable */ | 141 | #define MSM_BO_SCANOUT 0x00000001 /* scanout capable */ |
| 115 | #define MSM_BO_GPU_READONLY 0x00000002 | 142 | #define MSM_BO_GPU_READONLY 0x00000002 |
| 143 | /* Private buffers do not need to be explicitly listed in the SUBMIT | ||
| 144 | * ioctl, unless referenced by a drm_msm_gem_submit_cmd. Private | ||
| 145 | * buffers may NOT be imported/exported or used for scanout (or any | ||
| 146 | * other situation where buffers can be indefinitely pinned, but | ||
| 147 | * cases other than scanout are all kernel owned BOs which are not | ||
| 148 | * visible to userspace). | ||
| 149 | * | ||
| 150 | * In exchange for those constraints, all private BOs associated with | ||
| 151 | * a single context (drm_file) share a single dma_resv, and if there | ||
| 152 | * has been no eviction since the last submit, there are no per-BO | ||
| 153 | * bookeeping to do, significantly cutting the SUBMIT overhead. | ||
| 154 | */ | ||
| 155 | #define MSM_BO_NO_SHARE 0x00000004 | ||
| 116 | #define MSM_BO_CACHE_MASK 0x000f0000 | 156 | #define MSM_BO_CACHE_MASK 0x000f0000 |
| 117 | /* cache modes */ | 157 | /* cache modes */ |
| 118 | #define MSM_BO_CACHED 0x00010000 | 158 | #define MSM_BO_CACHED 0x00010000 |
| ... | @@ -122,6 +162,7 @@ struct drm_msm_param { | ... | @@ -122,6 +162,7 @@ struct drm_msm_param { |
| 122 | 162 | ||
| 123 | #define MSM_BO_FLAGS (MSM_BO_SCANOUT | \ | 163 | #define MSM_BO_FLAGS (MSM_BO_SCANOUT | \ |
| 124 | MSM_BO_GPU_READONLY | \ | 164 | MSM_BO_GPU_READONLY | \ |
| 165 | MSM_BO_NO_SHARE | \ | ||
| 125 | MSM_BO_CACHE_MASK) | 166 | MSM_BO_CACHE_MASK) |
| 126 | 167 | ||
| 127 | struct drm_msm_gem_new { | 168 | struct drm_msm_gem_new { |
| ... | @@ -179,6 +220,17 @@ struct drm_msm_gem_cpu_fini { | ... | @@ -179,6 +220,17 @@ struct drm_msm_gem_cpu_fini { |
| 179 | * Cmdstream Submission: | 220 | * Cmdstream Submission: |
| 180 | */ | 221 | */ |
| 181 | 222 | ||
| 223 | #define MSM_SYNCOBJ_RESET 0x00000001 /* Reset syncobj after wait. */ | ||
| 224 | #define MSM_SYNCOBJ_FLAGS ( \ | ||
| 225 | 		MSM_SYNCOBJ_RESET | \ | ||
| 226 | 		0) | ||
| 227 | |||
| 228 | struct drm_msm_syncobj { | ||
| 229 | 	__u32 handle; /* in, syncobj handle. */ | ||
| 230 | 	__u32 flags; /* in, from MSM_SUBMIT_SYNCOBJ_FLAGS */ | ||
| 231 | 	__u64 point; /* in, timepoint for timeline syncobjs. */ | ||
| 232 | }; | ||
| 233 | |||
| 182 | /* The value written into the cmdstream is logically: | 234 | /* The value written into the cmdstream is logically: |
| 183 | * | 235 | * |
| 184 | * ((relocbuf->gpuaddr + reloc_offset) << shift) | or | 236 | * ((relocbuf->gpuaddr + reloc_offset) << shift) | or |
| ... | @@ -220,7 +272,10 @@ struct drm_msm_gem_submit_cmd { | ... | @@ -220,7 +272,10 @@ struct drm_msm_gem_submit_cmd { |
| 220 | 	__u32 size; /* in, cmdstream size */ | 272 | 	__u32 size; /* in, cmdstream size */ |
| 221 | 	__u32 pad; | 273 | 	__u32 pad; |
| 222 | 	__u32 nr_relocs; /* in, number of submit_reloc's */ | 274 | 	__u32 nr_relocs; /* in, number of submit_reloc's */ |
| 223 | 	__u64 relocs; /* in, ptr to array of submit_reloc's */ | 275 | 	union { |
| 276 | 		__u64 relocs; /* in, ptr to array of submit_reloc's */ | ||
| 277 | 		__u64 iova; /* cmdstream address (for VM_BIND contexts) */ | ||
| 278 | 	}; | ||
| 224 | }; | 279 | }; |
| 225 | 280 | ||
| 226 | /* Each buffer referenced elsewhere in the cmdstream submit (ie. the | 281 | /* Each buffer referenced elsewhere in the cmdstream submit (ie. the |
| ... | @@ -268,17 +323,6 @@ struct drm_msm_gem_submit_bo { | ... | @@ -268,17 +323,6 @@ struct drm_msm_gem_submit_bo { |
| 268 | 		MSM_SUBMIT_FENCE_SN_IN | \ | 323 | 		MSM_SUBMIT_FENCE_SN_IN | \ |
| 269 | 		0) | 324 | 		0) |
| 270 | 325 | ||
| 271 | #define MSM_SUBMIT_SYNCOBJ_RESET 0x00000001 /* Reset syncobj after wait. */ | ||
| 272 | #define MSM_SUBMIT_SYNCOBJ_FLAGS ( \ | ||
| 273 | 		MSM_SUBMIT_SYNCOBJ_RESET | \ | ||
| 274 | 		0) | ||
| 275 | |||
| 276 | struct drm_msm_gem_submit_syncobj { | ||
| 277 | 	__u32 handle; /* in, syncobj handle. */ | ||
| 278 | 	__u32 flags; /* in, from MSM_SUBMIT_SYNCOBJ_FLAGS */ | ||
| 279 | 	__u64 point; /* in, timepoint for timeline syncobjs. */ | ||
| 280 | }; | ||
| 281 | |||
| 282 | /* Each cmdstream submit consists of a table of buffers involved, and | 326 | /* Each cmdstream submit consists of a table of buffers involved, and |
| 283 | * one or more cmdstream buffers. This allows for conditional execution | 327 | * one or more cmdstream buffers. This allows for conditional execution |
| 284 | * (context-restore), and IB buffers needed for per tile/bin draw cmds. | 328 | * (context-restore), and IB buffers needed for per tile/bin draw cmds. |
| ... | @@ -292,13 +336,80 @@ struct drm_msm_gem_submit { | ... | @@ -292,13 +336,80 @@ struct drm_msm_gem_submit { |
| 292 | 	__u64 cmds; /* in, ptr to array of submit_cmd's */ | 336 | 	__u64 cmds; /* in, ptr to array of submit_cmd's */ |
| 293 | 	__s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */ | 337 | 	__s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */ |
| 294 | 	__u32 queueid; /* in, submitqueue id */ | 338 | 	__u32 queueid; /* in, submitqueue id */ |
| 295 | 	__u64 in_syncobjs; /* in, ptr to array of drm_msm_gem_submit_syncobj */ | 339 | 	__u64 in_syncobjs; /* in, ptr to array of drm_msm_syncobj */ |
| 296 | 	__u64 out_syncobjs; /* in, ptr to array of drm_msm_gem_submit_syncobj */ | 340 | 	__u64 out_syncobjs; /* in, ptr to array of drm_msm_syncobj */ |
| 297 | 	__u32 nr_in_syncobjs; /* in, number of entries in in_syncobj */ | 341 | 	__u32 nr_in_syncobjs; /* in, number of entries in in_syncobj */ |
| 298 | 	__u32 nr_out_syncobjs; /* in, number of entries in out_syncobj. */ | 342 | 	__u32 nr_out_syncobjs; /* in, number of entries in out_syncobj. */ |
| 299 | 	__u32 syncobj_stride; /* in, stride of syncobj arrays. */ | 343 | 	__u32 syncobj_stride; /* in, stride of syncobj arrays. */ |
| 300 | 	__u32 pad; /*in, reserved for future use, always 0. */ | 344 | 	__u32 pad; /*in, reserved for future use, always 0. */ |
| 345 | }; | ||
| 301 | 346 | ||
| 347 | #define MSM_VM_BIND_OP_UNMAP	0 | ||
| 348 | #define MSM_VM_BIND_OP_MAP	1 | ||
| 349 | #define MSM_VM_BIND_OP_MAP_NULL	2 | ||
| 350 | |||
| 351 | #define MSM_VM_BIND_OP_DUMP	1 | ||
| 352 | #define MSM_VM_BIND_OP_FLAGS ( \ | ||
| 353 | 		MSM_VM_BIND_OP_DUMP | \ | ||
| 354 | 		0) | ||
| 355 | |||
| 356 | /** | ||
| 357 | * struct drm_msm_vm_bind_op - bind/unbind op to run | ||
| 358 | */ | ||
| 359 | struct drm_msm_vm_bind_op { | ||
| 360 | 	/** @op: one of MSM_VM_BIND_OP_x */ | ||
| 361 | 	__u32 op; | ||
| 362 | 	/** @handle: GEM object handle, MBZ for UNMAP or MAP_NULL */ | ||
| 363 | 	__u32 handle; | ||
| 364 | 	/** @obj_offset: Offset into GEM object, MBZ for UNMAP or MAP_NULL */ | ||
| 365 | 	__u64 obj_offset; | ||
| 366 | 	/** @iova: Address to operate on */ | ||
| 367 | 	__u64 iova; | ||
| 368 | 	/** @range: Number of bites to to map/unmap */ | ||
| 369 | 	__u64 range; | ||
| 370 | 	/** @flags: Bitmask of MSM_VM_BIND_OP_FLAG_x */ | ||
| 371 | 	__u32 flags; | ||
| 372 | 	/** @pad: MBZ */ | ||
| 373 | 	__u32 pad; | ||
| 374 | }; | ||
| 375 | |||
| 376 | #define MSM_VM_BIND_FENCE_FD_IN		0x00000001 | ||
| 377 | #define MSM_VM_BIND_FENCE_FD_OUT	0x00000002 | ||
| 378 | #define MSM_VM_BIND_FLAGS ( \ | ||
| 379 | 		MSM_VM_BIND_FENCE_FD_IN | \ | ||
| 380 | 		MSM_VM_BIND_FENCE_FD_OUT | \ | ||
| 381 | 		0) | ||
| 382 | |||
| 383 | /** | ||
| 384 | * struct drm_msm_vm_bind - Input of &DRM_IOCTL_MSM_VM_BIND | ||
| 385 | */ | ||
| 386 | struct drm_msm_vm_bind { | ||
| 387 | 	/** @flags: in, bitmask of MSM_VM_BIND_x */ | ||
| 388 | 	__u32 flags; | ||
| 389 | 	/** @nr_ops: the number of bind ops in this ioctl */ | ||
| 390 | 	__u32 nr_ops; | ||
| 391 | 	/** @fence_fd: in/out fence fd (see MSM_VM_BIND_FENCE_FD_IN/OUT) */ | ||
| 392 | 	__s32 fence_fd; | ||
| 393 | 	/** @queue_id: in, submitqueue id */ | ||
| 394 | 	__u32 queue_id; | ||
| 395 | 	/** @in_syncobjs: in, ptr to array of drm_msm_gem_syncobj */ | ||
| 396 | 	__u64 in_syncobjs; | ||
| 397 | 	/** @out_syncobjs: in, ptr to array of drm_msm_gem_syncobj */ | ||
| 398 | 	__u64 out_syncobjs; | ||
| 399 | 	/** @nr_in_syncobjs: in, number of entries in in_syncobj */ | ||
| 400 | 	__u32 nr_in_syncobjs; | ||
| 401 | 	/** @nr_out_syncobjs: in, number of entries in out_syncobj */ | ||
| 402 | 	__u32 nr_out_syncobjs; | ||
| 403 | 	/** @syncobj_stride: in, stride of syncobj arrays */ | ||
| 404 | 	__u32 syncobj_stride; | ||
| 405 | 	/** @op_stride: sizeof each struct drm_msm_vm_bind_op in @ops */ | ||
| 406 | 	__u32 op_stride; | ||
| 407 | 	union { | ||
| 408 | 		/** @op: used if num_ops == 1 */ | ||
| 409 | 		struct drm_msm_vm_bind_op op; | ||
| 410 | 		/** @ops: userptr to array of drm_msm_vm_bind_op if num_ops > 1 */ | ||
| 411 | 		__u64 ops; | ||
| 412 | 	}; | ||
| 302 | }; | 413 | }; |
| 303 | 414 | ||
| 304 | #define MSM_WAIT_FENCE_BOOST	0x00000001 | 415 | #define MSM_WAIT_FENCE_BOOST	0x00000001 |
| ... | @@ -344,12 +455,19 @@ struct drm_msm_gem_madvise { | ... | @@ -344,12 +455,19 @@ struct drm_msm_gem_madvise { |
| 344 | /* | 455 | /* |
| 345 | * Draw queues allow the user to set specific submission parameter. Command | 456 | * Draw queues allow the user to set specific submission parameter. Command |
| 346 | * submissions specify a specific submitqueue to use. ID 0 is reserved for | 457 | * submissions specify a specific submitqueue to use. ID 0 is reserved for |
| 347 | * backwards compatibility as a "default" submitqueue | 458 | * backwards compatibility as a "default" submitqueue. |
| 459 | * | ||
| 460 | * Because VM_BIND async updates happen on the CPU, they must run on a | ||
| 461 | * virtual queue created with the flag MSM_SUBMITQUEUE_VM_BIND. If we had | ||
| 462 | * a way to do pgtable updates on the GPU, we could drop this restriction. | ||
| 348 | */ | 463 | */ |
| 349 | 464 | ||
| 350 | #define MSM_SUBMITQUEUE_ALLOW_PREEMPT	0x00000001 | 465 | #define MSM_SUBMITQUEUE_ALLOW_PREEMPT	0x00000001 |
| 466 | #define MSM_SUBMITQUEUE_VM_BIND	0x00000002 /* virtual queue for VM_BIND ops */ | ||
| 467 | |||
| 351 | #define MSM_SUBMITQUEUE_FLAGS		 ( \ | 468 | #define MSM_SUBMITQUEUE_FLAGS		 ( \ |
| 352 | 		MSM_SUBMITQUEUE_ALLOW_PREEMPT | \ | 469 | 		MSM_SUBMITQUEUE_ALLOW_PREEMPT | \ |
| 470 | 		MSM_SUBMITQUEUE_VM_BIND | \ | ||
| 353 | 		0) | 471 | 		0) |
| 354 | 472 | ||
| 355 | /* | 473 | /* |
| ... | @@ -387,6 +505,7 @@ struct drm_msm_submitqueue_query { | ... | @@ -387,6 +505,7 @@ struct drm_msm_submitqueue_query { |
| 387 | #define DRM_MSM_SUBMITQUEUE_NEW 0x0A | 505 | #define DRM_MSM_SUBMITQUEUE_NEW 0x0A |
| 388 | #define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B | 506 | #define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B |
| 389 | #define DRM_MSM_SUBMITQUEUE_QUERY 0x0C | 507 | #define DRM_MSM_SUBMITQUEUE_QUERY 0x0C |
| 508 | #define DRM_MSM_VM_BIND 0x0D | ||
| 390 | 509 | ||
| 391 | #define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) | 510 | #define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) |
| 392 | #define DRM_IOCTL_MSM_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param) | 511 | #define DRM_IOCTL_MSM_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param) |
| ... | @@ -400,6 +519,7 @@ struct drm_msm_submitqueue_query { | ... | @@ -400,6 +519,7 @@ struct drm_msm_submitqueue_query { |
| 400 | #define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue) | 519 | #define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue) |
| 401 | #define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32) | 520 | #define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32) |
| 402 | #define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query) | 521 | #define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query) |
| 522 | #define DRM_IOCTL_MSM_VM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_VM_BIND, struct drm_msm_vm_bind) | ||
| 403 | 523 | ||
| 404 | #if defined(__cplusplus) | 524 | #if defined(__cplusplus) |
| 405 | } | 525 | } |
lib/libc/include/any-linux-any/drm/nova_drm.h created+101| ... | @@ -0,0 +1,101 @@ | ||
| 1 | /* SPDX-License-Identifier: MIT */ | ||
| 2 | |||
| 3 | #ifndef __NOVA_DRM_H__ | ||
| 4 | #define __NOVA_DRM_H__ | ||
| 5 | |||
| 6 | #include "drm.h" | ||
| 7 | |||
| 8 | /* DISCLAIMER: Do not use, this is not a stable uAPI. | ||
| 9 | * | ||
| 10 | * This uAPI serves only testing purposes as long as this driver is still in | ||
| 11 | * development. It is required to implement and test infrastructure which is | ||
| 12 | * upstreamed in the context of this driver. See also [1]. | ||
| 13 | * | ||
| 14 | * [1] https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u | ||
| 15 | */ | ||
| 16 | |||
| 17 | #if defined(__cplusplus) | ||
| 18 | extern "C" { | ||
| 19 | #endif | ||
| 20 | |||
| 21 | /* | ||
| 22 | * NOVA_GETPARAM_VRAM_BAR_SIZE | ||
| 23 | * | ||
| 24 | * Query the VRAM BAR size in bytes. | ||
| 25 | */ | ||
| 26 | #define NOVA_GETPARAM_VRAM_BAR_SIZE	0x1 | ||
| 27 | |||
| 28 | /** | ||
| 29 | * struct drm_nova_getparam - query GPU and driver metadata | ||
| 30 | */ | ||
| 31 | struct drm_nova_getparam { | ||
| 32 | 	/** | ||
| 33 | 	 * @param: The identifier of the parameter to query. | ||
| 34 | 	 */ | ||
| 35 | 	__u64 param; | ||
| 36 | |||
| 37 | 	/** | ||
| 38 | 	 * @value: The value for the specified parameter. | ||
| 39 | 	 */ | ||
| 40 | 	__u64 value; | ||
| 41 | }; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * struct drm_nova_gem_create - create a new DRM GEM object | ||
| 45 | */ | ||
| 46 | struct drm_nova_gem_create { | ||
| 47 | 	/** | ||
| 48 | 	 * @handle: The handle of the new DRM GEM object. | ||
| 49 | 	 */ | ||
| 50 | 	__u32 handle; | ||
| 51 | |||
| 52 | 	/** | ||
| 53 | 	 * @pad: 32 bit padding, should be 0. | ||
| 54 | 	 */ | ||
| 55 | 	__u32 pad; | ||
| 56 | |||
| 57 | 	/** | ||
| 58 | 	 * @size: The size of the new DRM GEM object. | ||
| 59 | 	 */ | ||
| 60 | 	__u64 size; | ||
| 61 | }; | ||
| 62 | |||
| 63 | /** | ||
| 64 | * struct drm_nova_gem_info - query DRM GEM object metadata | ||
| 65 | */ | ||
| 66 | struct drm_nova_gem_info { | ||
| 67 | 	/** | ||
| 68 | 	 * @handle: The handle of the DRM GEM object to query. | ||
| 69 | 	 */ | ||
| 70 | 	__u32 handle; | ||
| 71 | |||
| 72 | 	/** | ||
| 73 | 	 * @pad: 32 bit padding, should be 0. | ||
| 74 | 	 */ | ||
| 75 | 	__u32 pad; | ||
| 76 | |||
| 77 | 	/** | ||
| 78 | 	 * @size: The size of the DRM GEM obejct. | ||
| 79 | 	 */ | ||
| 80 | 	__u64 size; | ||
| 81 | }; | ||
| 82 | |||
| 83 | #define DRM_NOVA_GETPARAM		0x00 | ||
| 84 | #define DRM_NOVA_GEM_CREATE		0x01 | ||
| 85 | #define DRM_NOVA_GEM_INFO		0x02 | ||
| 86 | |||
| 87 | /* Note: this is an enum so that it can be resolved by Rust bindgen. */ | ||
| 88 | enum { | ||
| 89 | 	DRM_IOCTL_NOVA_GETPARAM		= DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GETPARAM, | ||
| 90 | 						 struct drm_nova_getparam), | ||
| 91 | 	DRM_IOCTL_NOVA_GEM_CREATE	= DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_CREATE, | ||
| 92 | 						 struct drm_nova_gem_create), | ||
| 93 | 	DRM_IOCTL_NOVA_GEM_INFO		= DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_INFO, | ||
| 94 | 						 struct drm_nova_gem_info), | ||
| 95 | }; | ||
| 96 | |||
| 97 | #if defined(__cplusplus) | ||
| 98 | } | ||
| 99 | #endif | ||
| 100 | |||
| 101 | #endif /* __NOVA_DRM_H__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/drm/panfrost_drm.h+21| ... | @@ -21,6 +21,7 @@ extern "C" { | ... | @@ -21,6 +21,7 @@ extern "C" { |
| 21 | #define DRM_PANFROST_PERFCNT_ENABLE		0x06 | 21 | #define DRM_PANFROST_PERFCNT_ENABLE		0x06 |
| 22 | #define DRM_PANFROST_PERFCNT_DUMP		0x07 | 22 | #define DRM_PANFROST_PERFCNT_DUMP		0x07 |
| 23 | #define DRM_PANFROST_MADVISE			0x08 | 23 | #define DRM_PANFROST_MADVISE			0x08 |
| 24 | #define DRM_PANFROST_SET_LABEL_BO		0x09 | ||
| 24 | 25 | ||
| 25 | #define DRM_IOCTL_PANFROST_SUBMIT		DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit) | 26 | #define DRM_IOCTL_PANFROST_SUBMIT		DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit) |
| 26 | #define DRM_IOCTL_PANFROST_WAIT_BO		DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo) | 27 | #define DRM_IOCTL_PANFROST_WAIT_BO		DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo) |
| ... | @@ -29,6 +30,7 @@ extern "C" { | ... | @@ -29,6 +30,7 @@ extern "C" { |
| 29 | #define DRM_IOCTL_PANFROST_GET_PARAM		DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param) | 30 | #define DRM_IOCTL_PANFROST_GET_PARAM		DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param) |
| 30 | #define DRM_IOCTL_PANFROST_GET_BO_OFFSET	DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset) | 31 | #define DRM_IOCTL_PANFROST_GET_BO_OFFSET	DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset) |
| 31 | #define DRM_IOCTL_PANFROST_MADVISE		DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise) | 32 | #define DRM_IOCTL_PANFROST_MADVISE		DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise) |
| 33 | #define DRM_IOCTL_PANFROST_SET_LABEL_BO		DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo) | ||
| 32 | 34 | ||
| 33 | /* | 35 | /* |
| 34 | * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module | 36 | * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module |
| ... | @@ -227,6 +229,25 @@ struct drm_panfrost_madvise { | ... | @@ -227,6 +229,25 @@ struct drm_panfrost_madvise { |
| 227 | 	__u32 retained; /* out, whether backing store still exists */ | 229 | 	__u32 retained; /* out, whether backing store still exists */ |
| 228 | }; | 230 | }; |
| 229 | 231 | ||
| 232 | /** | ||
| 233 | * struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs. | ||
| 234 | */ | ||
| 235 | struct drm_panfrost_set_label_bo { | ||
| 236 | 	/** @handle: Handle of the buffer object to label. */ | ||
| 237 | 	__u32 handle; | ||
| 238 | |||
| 239 | 	/** @pad: MBZ. */ | ||
| 240 | 	__u32 pad; | ||
| 241 | |||
| 242 | 	/** | ||
| 243 | 	 * @label: User pointer to a NUL-terminated string | ||
| 244 | 	 * | ||
| 245 | 	 * Length cannot be greater than 4096. | ||
| 246 | 	 * NULL is permitted and means clear the label. | ||
| 247 | 	 */ | ||
| 248 | 	__u64 label; | ||
| 249 | }; | ||
| 250 | |||
| 230 | /* Definitions for coredump decoding in user space */ | 251 | /* Definitions for coredump decoding in user space */ |
| 231 | #define PANFROSTDUMP_MAJOR 1 | 252 | #define PANFROSTDUMP_MAJOR 1 |
| 232 | #define PANFROSTDUMP_MINOR 0 | 253 | #define PANFROSTDUMP_MINOR 0 |
lib/libc/include/any-linux-any/drm/panthor_drm.h+116-41| ... | @@ -127,49 +127,24 @@ enum drm_panthor_ioctl_id { | ... | @@ -127,49 +127,24 @@ enum drm_panthor_ioctl_id { |
| 127 | 127 | ||
| 128 | 	/** @DRM_PANTHOR_TILER_HEAP_DESTROY: Destroy a tiler heap. */ | 128 | 	/** @DRM_PANTHOR_TILER_HEAP_DESTROY: Destroy a tiler heap. */ |
| 129 | 	DRM_PANTHOR_TILER_HEAP_DESTROY, | 129 | 	DRM_PANTHOR_TILER_HEAP_DESTROY, |
| 130 | }; | ||
| 131 | 130 | ||
| 132 | /** | 131 | 	/** @DRM_PANTHOR_BO_SET_LABEL: Label a BO. */ |
| 133 | * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number | 132 | 	DRM_PANTHOR_BO_SET_LABEL, |
| 134 | * @__access: Access type. Must be R, W or RW. | ||
| 135 | * @__id: One of the DRM_PANTHOR_xxx id. | ||
| 136 | * @__type: Suffix of the type being passed to the IOCTL. | ||
| 137 | * | ||
| 138 | * Don't use this macro directly, use the DRM_IOCTL_PANTHOR_xxx | ||
| 139 | * values instead. | ||
| 140 | * | ||
| 141 | * Return: An IOCTL number to be passed to ioctl() from userspace. | ||
| 142 | */ | ||
| 143 | #define DRM_IOCTL_PANTHOR(__access, __id, __type) \ | ||
| 144 | 	DRM_IO ## __access(DRM_COMMAND_BASE + DRM_PANTHOR_ ## __id, \ | ||
| 145 | 			 struct drm_panthor_ ## __type) | ||
| 146 | 133 | ||
| 147 | #define DRM_IOCTL_PANTHOR_DEV_QUERY \ | 134 | 	/** |
| 148 | 	DRM_IOCTL_PANTHOR(WR, DEV_QUERY, dev_query) | 135 | 	 * @DRM_PANTHOR_SET_USER_MMIO_OFFSET: Set the offset to use as the user MMIO offset. |
| 149 | #define DRM_IOCTL_PANTHOR_VM_CREATE \ | 136 | 	 * |
| 150 | 	DRM_IOCTL_PANTHOR(WR, VM_CREATE, vm_create) | 137 | 	 * The default behavior is to pick the MMIO offset based on the size of the pgoff_t |
| 151 | #define DRM_IOCTL_PANTHOR_VM_DESTROY \ | 138 | 	 * type seen by the process that manipulates the FD, such that a 32-bit process can |
| 152 | 	DRM_IOCTL_PANTHOR(WR, VM_DESTROY, vm_destroy) | 139 | 	 * always map the user MMIO ranges. But this approach doesn't work well for emulators |
| 153 | #define DRM_IOCTL_PANTHOR_VM_BIND \ | 140 | 	 * like FEX, where the emulator is an 64-bit binary which might be executing 32-bit |
| 154 | 	DRM_IOCTL_PANTHOR(WR, VM_BIND, vm_bind) | 141 | 	 * code. In that case, the kernel thinks it's the 64-bit process and assumes |
| 155 | #define DRM_IOCTL_PANTHOR_VM_GET_STATE \ | 142 | 	 * DRM_PANTHOR_USER_MMIO_OFFSET_64BIT is in use, but the UMD library expects |
| 156 | 	DRM_IOCTL_PANTHOR(WR, VM_GET_STATE, vm_get_state) | 143 | 	 * DRM_PANTHOR_USER_MMIO_OFFSET_32BIT, because it can't mmap() anything above the |
| 157 | #define DRM_IOCTL_PANTHOR_BO_CREATE \ | 144 | 	 * pgoff_t size. |
| 158 | 	DRM_IOCTL_PANTHOR(WR, BO_CREATE, bo_create) | 145 | 	 */ |
| 159 | #define DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET \ | 146 | 	DRM_PANTHOR_SET_USER_MMIO_OFFSET, |
| 160 | 	DRM_IOCTL_PANTHOR(WR, BO_MMAP_OFFSET, bo_mmap_offset) | 147 | }; |
| 161 | #define DRM_IOCTL_PANTHOR_GROUP_CREATE \ | ||
| 162 | 	DRM_IOCTL_PANTHOR(WR, GROUP_CREATE, group_create) | ||
| 163 | #define DRM_IOCTL_PANTHOR_GROUP_DESTROY \ | ||
| 164 | 	DRM_IOCTL_PANTHOR(WR, GROUP_DESTROY, group_destroy) | ||
| 165 | #define DRM_IOCTL_PANTHOR_GROUP_SUBMIT \ | ||
| 166 | 	DRM_IOCTL_PANTHOR(WR, GROUP_SUBMIT, group_submit) | ||
| 167 | #define DRM_IOCTL_PANTHOR_GROUP_GET_STATE \ | ||
| 168 | 	DRM_IOCTL_PANTHOR(WR, GROUP_GET_STATE, group_get_state) | ||
| 169 | #define DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE \ | ||
| 170 | 	DRM_IOCTL_PANTHOR(WR, TILER_HEAP_CREATE, tiler_heap_create) | ||
| 171 | #define DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY \ | ||
| 172 | 	DRM_IOCTL_PANTHOR(WR, TILER_HEAP_DESTROY, tiler_heap_destroy) | ||
| 173 | 148 | ||
| 174 | /** | 149 | /** |
| 175 | * DOC: IOCTL arguments | 150 | * DOC: IOCTL arguments |
| ... | @@ -335,6 +310,9 @@ struct drm_panthor_gpu_info { | ... | @@ -335,6 +310,9 @@ struct drm_panthor_gpu_info { |
| 335 | 	/** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */ | 310 | 	/** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */ |
| 336 | 	__u32 as_present; | 311 | 	__u32 as_present; |
| 337 | 312 | ||
| 313 | 	/** @pad0: MBZ. */ | ||
| 314 | 	__u32 pad0; | ||
| 315 | |||
| 338 | 	/** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */ | 316 | 	/** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */ |
| 339 | 	__u64 shader_present; | 317 | 	__u64 shader_present; |
| 340 | 318 | ||
| ... | @@ -923,6 +901,15 @@ enum drm_panthor_group_state_flags { | ... | @@ -923,6 +901,15 @@ enum drm_panthor_group_state_flags { |
| 923 | 	 * When a group ends up with this flag set, no jobs can be submitted to its queues. | 901 | 	 * When a group ends up with this flag set, no jobs can be submitted to its queues. |
| 924 | 	 */ | 902 | 	 */ |
| 925 | 	DRM_PANTHOR_GROUP_STATE_FATAL_FAULT = 1 << 1, | 903 | 	DRM_PANTHOR_GROUP_STATE_FATAL_FAULT = 1 << 1, |
| 904 | |||
| 905 | 	/** | ||
| 906 | 	 * @DRM_PANTHOR_GROUP_STATE_INNOCENT: Group was killed during a reset caused by other | ||
| 907 | 	 * groups. | ||
| 908 | 	 * | ||
| 909 | 	 * This flag can only be set if DRM_PANTHOR_GROUP_STATE_TIMEDOUT is set and | ||
| 910 | 	 * DRM_PANTHOR_GROUP_STATE_FATAL_FAULT is not. | ||
| 911 | 	 */ | ||
| 912 | 	DRM_PANTHOR_GROUP_STATE_INNOCENT = 1 << 2, | ||
| 926 | }; | 913 | }; |
| 927 | 914 | ||
| 928 | /** | 915 | /** |
| ... | @@ -1010,6 +997,94 @@ struct drm_panthor_tiler_heap_destroy { | ... | @@ -1010,6 +997,94 @@ struct drm_panthor_tiler_heap_destroy { |
| 1010 | 	__u32 pad; | 997 | 	__u32 pad; |
| 1011 | }; | 998 | }; |
| 1012 | 999 | ||
| 1000 | /** | ||
| 1001 | * struct drm_panthor_bo_set_label - Arguments passed to DRM_IOCTL_PANTHOR_BO_SET_LABEL | ||
| 1002 | */ | ||
| 1003 | struct drm_panthor_bo_set_label { | ||
| 1004 | 	/** @handle: Handle of the buffer object to label. */ | ||
| 1005 | 	__u32 handle; | ||
| 1006 | |||
| 1007 | 	/** @pad: MBZ. */ | ||
| 1008 | 	__u32 pad; | ||
| 1009 | |||
| 1010 | 	/** | ||
| 1011 | 	 * @label: User pointer to a NUL-terminated string | ||
| 1012 | 	 * | ||
| 1013 | 	 * Length cannot be greater than 4096 | ||
| 1014 | 	 */ | ||
| 1015 | 	__u64 label; | ||
| 1016 | }; | ||
| 1017 | |||
| 1018 | /** | ||
| 1019 | * struct drm_panthor_set_user_mmio_offset - Arguments passed to | ||
| 1020 | * DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET | ||
| 1021 | * | ||
| 1022 | * This ioctl is only really useful if you want to support userspace | ||
| 1023 | * CPU emulation environments where the size of an unsigned long differs | ||
| 1024 | * between the host and the guest architectures. | ||
| 1025 | */ | ||
| 1026 | struct drm_panthor_set_user_mmio_offset { | ||
| 1027 | 	/** | ||
| 1028 | 	 * @offset: User MMIO offset to use. | ||
| 1029 | 	 * | ||
| 1030 | 	 * Must be either DRM_PANTHOR_USER_MMIO_OFFSET_32BIT or | ||
| 1031 | 	 * DRM_PANTHOR_USER_MMIO_OFFSET_64BIT. | ||
| 1032 | 	 * | ||
| 1033 | 	 * Use DRM_PANTHOR_USER_MMIO_OFFSET (which selects OFFSET_32BIT or | ||
| 1034 | 	 * OFFSET_64BIT based on the size of an unsigned long) unless you | ||
| 1035 | 	 * have a very good reason to overrule this decision. | ||
| 1036 | 	 */ | ||
| 1037 | 	__u64 offset; | ||
| 1038 | }; | ||
| 1039 | |||
| 1040 | /** | ||
| 1041 | * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number | ||
| 1042 | * @__access: Access type. Must be R, W or RW. | ||
| 1043 | * @__id: One of the DRM_PANTHOR_xxx id. | ||
| 1044 | * @__type: Suffix of the type being passed to the IOCTL. | ||
| 1045 | * | ||
| 1046 | * Don't use this macro directly, use the DRM_IOCTL_PANTHOR_xxx | ||
| 1047 | * values instead. | ||
| 1048 | * | ||
| 1049 | * Return: An IOCTL number to be passed to ioctl() from userspace. | ||
| 1050 | */ | ||
| 1051 | #define DRM_IOCTL_PANTHOR(__access, __id, __type) \ | ||
| 1052 | 	DRM_IO ## __access(DRM_COMMAND_BASE + DRM_PANTHOR_ ## __id, \ | ||
| 1053 | 			 struct drm_panthor_ ## __type) | ||
| 1054 | |||
| 1055 | enum { | ||
| 1056 | 	DRM_IOCTL_PANTHOR_DEV_QUERY = | ||
| 1057 | 		DRM_IOCTL_PANTHOR(WR, DEV_QUERY, dev_query), | ||
| 1058 | 	DRM_IOCTL_PANTHOR_VM_CREATE = | ||
| 1059 | 		DRM_IOCTL_PANTHOR(WR, VM_CREATE, vm_create), | ||
| 1060 | 	DRM_IOCTL_PANTHOR_VM_DESTROY = | ||
| 1061 | 		DRM_IOCTL_PANTHOR(WR, VM_DESTROY, vm_destroy), | ||
| 1062 | 	DRM_IOCTL_PANTHOR_VM_BIND = | ||
| 1063 | 		DRM_IOCTL_PANTHOR(WR, VM_BIND, vm_bind), | ||
| 1064 | 	DRM_IOCTL_PANTHOR_VM_GET_STATE = | ||
| 1065 | 		DRM_IOCTL_PANTHOR(WR, VM_GET_STATE, vm_get_state), | ||
| 1066 | 	DRM_IOCTL_PANTHOR_BO_CREATE = | ||
| 1067 | 		DRM_IOCTL_PANTHOR(WR, BO_CREATE, bo_create), | ||
| 1068 | 	DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET = | ||
| 1069 | 		DRM_IOCTL_PANTHOR(WR, BO_MMAP_OFFSET, bo_mmap_offset), | ||
| 1070 | 	DRM_IOCTL_PANTHOR_GROUP_CREATE = | ||
| 1071 | 		DRM_IOCTL_PANTHOR(WR, GROUP_CREATE, group_create), | ||
| 1072 | 	DRM_IOCTL_PANTHOR_GROUP_DESTROY = | ||
| 1073 | 		DRM_IOCTL_PANTHOR(WR, GROUP_DESTROY, group_destroy), | ||
| 1074 | 	DRM_IOCTL_PANTHOR_GROUP_SUBMIT = | ||
| 1075 | 		DRM_IOCTL_PANTHOR(WR, GROUP_SUBMIT, group_submit), | ||
| 1076 | 	DRM_IOCTL_PANTHOR_GROUP_GET_STATE = | ||
| 1077 | 		DRM_IOCTL_PANTHOR(WR, GROUP_GET_STATE, group_get_state), | ||
| 1078 | 	DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE = | ||
| 1079 | 		DRM_IOCTL_PANTHOR(WR, TILER_HEAP_CREATE, tiler_heap_create), | ||
| 1080 | 	DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY = | ||
| 1081 | 		DRM_IOCTL_PANTHOR(WR, TILER_HEAP_DESTROY, tiler_heap_destroy), | ||
| 1082 | 	DRM_IOCTL_PANTHOR_BO_SET_LABEL = | ||
| 1083 | 		DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label), | ||
| 1084 | 	DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET = | ||
| 1085 | 		DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset), | ||
| 1086 | }; | ||
| 1087 | |||
| 1013 | #if defined(__cplusplus) | 1088 | #if defined(__cplusplus) |
| 1014 | } | 1089 | } |
| 1015 | #endif | 1090 | #endif |
lib/libc/include/any-linux-any/drm/qaic_accel.h+1-1| ... | @@ -64,7 +64,7 @@ struct qaic_manage_trans_hdr { | ... | @@ -64,7 +64,7 @@ struct qaic_manage_trans_hdr { |
| 64 | /** | 64 | /** |
| 65 | * struct qaic_manage_trans_passthrough - Defines a passthrough transaction. | 65 | * struct qaic_manage_trans_passthrough - Defines a passthrough transaction. |
| 66 | * @hdr: In. Header to identify this transaction. | 66 | * @hdr: In. Header to identify this transaction. |
| 67 | * @data: In. Payload of this ransaction. Opaque to the driver. Userspace must | 67 | * @data: In. Payload of this transaction. Opaque to the driver. Userspace must |
| 68 | *	 encode in little endian and align/pad to 64-bit. | 68 | *	 encode in little endian and align/pad to 64-bit. |
| 69 | */ | 69 | */ |
| 70 | struct qaic_manage_trans_passthrough { | 70 | struct qaic_manage_trans_passthrough { |
lib/libc/include/any-linux-any/drm/v3d_drm.h+18| ... | @@ -43,6 +43,7 @@ extern "C" { | ... | @@ -43,6 +43,7 @@ extern "C" { |
| 43 | #define DRM_V3D_PERFMON_GET_VALUES 0x0a | 43 | #define DRM_V3D_PERFMON_GET_VALUES 0x0a |
| 44 | #define DRM_V3D_SUBMIT_CPU 0x0b | 44 | #define DRM_V3D_SUBMIT_CPU 0x0b |
| 45 | #define DRM_V3D_PERFMON_GET_COUNTER 0x0c | 45 | #define DRM_V3D_PERFMON_GET_COUNTER 0x0c |
| 46 | #define DRM_V3D_PERFMON_SET_GLOBAL 0x0d | ||
| 46 | 47 | ||
| 47 | #define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl) | 48 | #define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl) |
| 48 | #define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo) | 49 | #define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo) |
| ... | @@ -61,6 +62,8 @@ extern "C" { | ... | @@ -61,6 +62,8 @@ extern "C" { |
| 61 | #define DRM_IOCTL_V3D_SUBMIT_CPU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, struct drm_v3d_submit_cpu) | 62 | #define DRM_IOCTL_V3D_SUBMIT_CPU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, struct drm_v3d_submit_cpu) |
| 62 | #define DRM_IOCTL_V3D_PERFMON_GET_COUNTER DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_COUNTER, \ | 63 | #define DRM_IOCTL_V3D_PERFMON_GET_COUNTER DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_COUNTER, \ |
| 63 | 						 struct drm_v3d_perfmon_get_counter) | 64 | 						 struct drm_v3d_perfmon_get_counter) |
| 65 | #define DRM_IOCTL_V3D_PERFMON_SET_GLOBAL DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_PERFMON_SET_GLOBAL, \ | ||
| 66 | 						 struct drm_v3d_perfmon_set_global) | ||
| 64 | 67 | ||
| 65 | #define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01 | 68 | #define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01 |
| 66 | #define DRM_V3D_SUBMIT_EXTENSION		 0x02 | 69 | #define DRM_V3D_SUBMIT_EXTENSION		 0x02 |
| ... | @@ -766,6 +769,21 @@ struct drm_v3d_perfmon_get_counter { | ... | @@ -766,6 +769,21 @@ struct drm_v3d_perfmon_get_counter { |
| 766 | 	__u8 reserved[7]; | 769 | 	__u8 reserved[7]; |
| 767 | }; | 770 | }; |
| 768 | 771 | ||
| 772 | #define DRM_V3D_PERFMON_CLEAR_GLOBAL 0x0001 | ||
| 773 | |||
| 774 | /** | ||
| 775 | * struct drm_v3d_perfmon_set_global - ioctl to define a global performance | ||
| 776 | * monitor | ||
| 777 | * | ||
| 778 | * The global performance monitor will be used for all jobs. If a global | ||
| 779 | * performance monitor is defined, jobs with a self-defined performance | ||
| 780 | * monitor won't be allowed. | ||
| 781 | */ | ||
| 782 | struct drm_v3d_perfmon_set_global { | ||
| 783 | 	__u32 flags; | ||
| 784 | 	__u32 id; | ||
| 785 | }; | ||
| 786 | |||
| 769 | #if defined(__cplusplus) | 787 | #if defined(__cplusplus) |
| 770 | } | 788 | } |
| 771 | #endif | 789 | #endif |
lib/libc/include/any-linux-any/drm/virtgpu_drm.h+6| ... | @@ -163,6 +163,12 @@ struct drm_virtgpu_3d_wait { | ... | @@ -163,6 +163,12 @@ struct drm_virtgpu_3d_wait { |
| 163 | 	__u32 flags; | 163 | 	__u32 flags; |
| 164 | }; | 164 | }; |
| 165 | 165 | ||
| 166 | #define VIRTGPU_DRM_CAPSET_VIRGL 1 | ||
| 167 | #define VIRTGPU_DRM_CAPSET_VIRGL2 2 | ||
| 168 | #define VIRTGPU_DRM_CAPSET_GFXSTREAM_VULKAN 3 | ||
| 169 | #define VIRTGPU_DRM_CAPSET_VENUS 4 | ||
| 170 | #define VIRTGPU_DRM_CAPSET_CROSS_DOMAIN 5 | ||
| 171 | #define VIRTGPU_DRM_CAPSET_DRM 6 | ||
| 166 | struct drm_virtgpu_get_caps { | 172 | struct drm_virtgpu_get_caps { |
| 167 | 	__u32 cap_set_id; | 173 | 	__u32 cap_set_id; |
| 168 | 	__u32 cap_set_ver; | 174 | 	__u32 cap_set_ver; |
lib/libc/include/any-linux-any/drm/xe_drm.h+254-9| ... | @@ -393,6 +393,10 @@ struct drm_xe_query_mem_regions { | ... | @@ -393,6 +393,10 @@ struct drm_xe_query_mem_regions { |
| 393 | * | 393 | * |
| 394 | * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM - Flag is set if the device | 394 | * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM - Flag is set if the device |
| 395 | * has usable VRAM | 395 | * has usable VRAM |
| 396 | * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY - Flag is set if the device | ||
| 397 | * has low latency hint support | ||
| 398 | * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR - Flag is set if the | ||
| 399 | * device has CPU address mirroring support | ||
| 396 | * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment | 400 | * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment |
| 397 | * required by this device, typically SZ_4K or SZ_64K | 401 | * required by this device, typically SZ_4K or SZ_64K |
| 398 | * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address | 402 | * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address |
| ... | @@ -409,6 +413,8 @@ struct drm_xe_query_config { | ... | @@ -409,6 +413,8 @@ struct drm_xe_query_config { |
| 409 | #define DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID	0 | 413 | #define DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID	0 |
| 410 | #define DRM_XE_QUERY_CONFIG_FLAGS			1 | 414 | #define DRM_XE_QUERY_CONFIG_FLAGS			1 |
| 411 | 	#define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM	(1 << 0) | 415 | 	#define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM	(1 << 0) |
| 416 | 	#define DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY	(1 << 1) | ||
| 417 | 	#define DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR	(1 << 2) | ||
| 412 | #define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT		2 | 418 | #define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT		2 |
| 413 | #define DRM_XE_QUERY_CONFIG_VA_BITS			3 | 419 | #define DRM_XE_QUERY_CONFIG_VA_BITS			3 |
| 414 | #define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY	4 | 420 | #define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY	4 |
| ... | @@ -629,6 +635,39 @@ struct drm_xe_query_uc_fw_version { | ... | @@ -629,6 +635,39 @@ struct drm_xe_query_uc_fw_version { |
| 629 | 	__u64 reserved; | 635 | 	__u64 reserved; |
| 630 | }; | 636 | }; |
| 631 | 637 | ||
| 638 | /** | ||
| 639 | * struct drm_xe_query_pxp_status - query if PXP is ready | ||
| 640 | * | ||
| 641 | * If PXP is enabled and no fatal error has occurred, the status will be set to | ||
| 642 | * one of the following values: | ||
| 643 | * 0: PXP init still in progress | ||
| 644 | * 1: PXP init complete | ||
| 645 | * | ||
| 646 | * If PXP is not enabled or something has gone wrong, the query will be failed | ||
| 647 | * with one of the following error codes: | ||
| 648 | * -ENODEV: PXP not supported or disabled; | ||
| 649 | * -EIO: fatal error occurred during init, so PXP will never be enabled; | ||
| 650 | * -EINVAL: incorrect value provided as part of the query; | ||
| 651 | * -EFAULT: error copying the memory between kernel and userspace. | ||
| 652 | * | ||
| 653 | * The status can only be 0 in the first few seconds after driver load. If | ||
| 654 | * everything works as expected, the status will transition to init complete in | ||
| 655 | * less than 1 second, while in case of errors the driver might take longer to | ||
| 656 | * start returning an error code, but it should still take less than 10 seconds. | ||
| 657 | * | ||
| 658 | * The supported session type bitmask is based on the values in | ||
| 659 | * enum drm_xe_pxp_session_type. TYPE_NONE is always supported and therefore | ||
| 660 | * is not reported in the bitmask. | ||
| 661 | * | ||
| 662 | */ | ||
| 663 | struct drm_xe_query_pxp_status { | ||
| 664 | 	/** @status: current PXP status */ | ||
| 665 | 	__u32 status; | ||
| 666 | |||
| 667 | 	/** @supported_session_types: bitmask of supported PXP session types */ | ||
| 668 | 	__u32 supported_session_types; | ||
| 669 | }; | ||
| 670 | |||
| 632 | /** | 671 | /** |
| 633 | * struct drm_xe_device_query - Input of &DRM_IOCTL_XE_DEVICE_QUERY - main | 672 | * struct drm_xe_device_query - Input of &DRM_IOCTL_XE_DEVICE_QUERY - main |
| 634 | * structure to query device information | 673 | * structure to query device information |
| ... | @@ -648,6 +687,7 @@ struct drm_xe_query_uc_fw_version { | ... | @@ -648,6 +687,7 @@ struct drm_xe_query_uc_fw_version { |
| 648 | * attributes. | 687 | * attributes. |
| 649 | * - %DRM_XE_DEVICE_QUERY_GT_TOPOLOGY | 688 | * - %DRM_XE_DEVICE_QUERY_GT_TOPOLOGY |
| 650 | * - %DRM_XE_DEVICE_QUERY_ENGINE_CYCLES | 689 | * - %DRM_XE_DEVICE_QUERY_ENGINE_CYCLES |
| 690 | * - %DRM_XE_DEVICE_QUERY_PXP_STATUS | ||
| 651 | * | 691 | * |
| 652 | * If size is set to 0, the driver fills it with the required size for | 692 | * If size is set to 0, the driver fills it with the required size for |
| 653 | * the requested type of data to query. If size is equal to the required | 693 | * the requested type of data to query. If size is equal to the required |
| ... | @@ -700,6 +740,8 @@ struct drm_xe_device_query { | ... | @@ -700,6 +740,8 @@ struct drm_xe_device_query { |
| 700 | #define DRM_XE_DEVICE_QUERY_ENGINE_CYCLES	6 | 740 | #define DRM_XE_DEVICE_QUERY_ENGINE_CYCLES	6 |
| 701 | #define DRM_XE_DEVICE_QUERY_UC_FW_VERSION	7 | 741 | #define DRM_XE_DEVICE_QUERY_UC_FW_VERSION	7 |
| 702 | #define DRM_XE_DEVICE_QUERY_OA_UNITS		8 | 742 | #define DRM_XE_DEVICE_QUERY_OA_UNITS		8 |
| 743 | #define DRM_XE_DEVICE_QUERY_PXP_STATUS		9 | ||
| 744 | #define DRM_XE_DEVICE_QUERY_EU_STALL		10 | ||
| 703 | 	/** @query: The type of data to query */ | 745 | 	/** @query: The type of data to query */ |
| 704 | 	__u32 query; | 746 | 	__u32 query; |
| 705 | 747 | ||
| ... | @@ -743,8 +785,23 @@ struct drm_xe_device_query { | ... | @@ -743,8 +785,23 @@ struct drm_xe_device_query { |
| 743 | * - %DRM_XE_GEM_CPU_CACHING_WC - Allocate the pages as write-combined. This | 785 | * - %DRM_XE_GEM_CPU_CACHING_WC - Allocate the pages as write-combined. This |
| 744 | * is uncached. Scanout surfaces should likely use this. All objects | 786 | * is uncached. Scanout surfaces should likely use this. All objects |
| 745 | * that can be placed in VRAM must use this. | 787 | * that can be placed in VRAM must use this. |
| 788 | * | ||
| 789 | * This ioctl supports setting the following properties via the | ||
| 790 | * %DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY extension, which uses the | ||
| 791 | * generic @drm_xe_ext_set_property struct: | ||
| 792 | * | ||
| 793 | * - %DRM_XE_GEM_CREATE_SET_PROPERTY_PXP_TYPE - set the type of PXP session | ||
| 794 | * this object will be used with. Valid values are listed in enum | ||
| 795 | * drm_xe_pxp_session_type. %DRM_XE_PXP_TYPE_NONE is the default behavior, so | ||
| 796 | * there is no need to explicitly set that. Objects used with session of type | ||
| 797 | * %DRM_XE_PXP_TYPE_HWDRM will be marked as invalid if a PXP invalidation | ||
| 798 | * event occurs after their creation. Attempting to flip an invalid object | ||
| 799 | * will cause a black frame to be displayed instead. Submissions with invalid | ||
| 800 | * objects mapped in the VM will be rejected. | ||
| 746 | */ | 801 | */ |
| 747 | struct drm_xe_gem_create { | 802 | struct drm_xe_gem_create { |
| 803 | #define DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY	0 | ||
| 804 | #define DRM_XE_GEM_CREATE_SET_PROPERTY_PXP_TYPE	0 | ||
| 748 | 	/** @extensions: Pointer to the first extension struct, if any */ | 805 | 	/** @extensions: Pointer to the first extension struct, if any */ |
| 749 | 	__u64 extensions; | 806 | 	__u64 extensions; |
| 750 | 807 | ||
| ... | @@ -811,6 +868,32 @@ struct drm_xe_gem_create { | ... | @@ -811,6 +868,32 @@ struct drm_xe_gem_create { |
| 811 | 868 | ||
| 812 | /** | 869 | /** |
| 813 | * struct drm_xe_gem_mmap_offset - Input of &DRM_IOCTL_XE_GEM_MMAP_OFFSET | 870 | * struct drm_xe_gem_mmap_offset - Input of &DRM_IOCTL_XE_GEM_MMAP_OFFSET |
| 871 | * | ||
| 872 | * The @flags can be: | ||
| 873 | * - %DRM_XE_MMAP_OFFSET_FLAG_PCI_BARRIER - For user to query special offset | ||
| 874 | * for use in mmap ioctl. Writing to the returned mmap address will generate a | ||
| 875 | * PCI memory barrier with low overhead (avoiding IOCTL call as well as writing | ||
| 876 | * to VRAM which would also add overhead), acting like an MI_MEM_FENCE | ||
| 877 | * instruction. | ||
| 878 | * | ||
| 879 | * Note: The mmap size can be at most 4K, due to HW limitations. As a result | ||
| 880 | * this interface is only supported on CPU architectures that support 4K page | ||
| 881 | * size. The mmap_offset ioctl will detect this and gracefully return an | ||
| 882 | * error, where userspace is expected to have a different fallback method for | ||
| 883 | * triggering a barrier. | ||
| 884 | * | ||
| 885 | * Roughly the usage would be as follows: | ||
| 886 | * | ||
| 887 | * .. code-block:: C | ||
| 888 | * | ||
| 889 | * struct drm_xe_gem_mmap_offset mmo = { | ||
| 890 | * .handle = 0, // must be set to 0 | ||
| 891 | * .flags = DRM_XE_MMAP_OFFSET_FLAG_PCI_BARRIER, | ||
| 892 | * }; | ||
| 893 | * | ||
| 894 | * err = ioctl(fd, DRM_IOCTL_XE_GEM_MMAP_OFFSET, &mmo); | ||
| 895 | * map = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, mmo.offset); | ||
| 896 | * map[i] = 0xdeadbeaf; // issue barrier | ||
| 814 | */ | 897 | */ |
| 815 | struct drm_xe_gem_mmap_offset { | 898 | struct drm_xe_gem_mmap_offset { |
| 816 | 	/** @extensions: Pointer to the first extension struct, if any */ | 899 | 	/** @extensions: Pointer to the first extension struct, if any */ |
| ... | @@ -819,7 +902,8 @@ struct drm_xe_gem_mmap_offset { | ... | @@ -819,7 +902,8 @@ struct drm_xe_gem_mmap_offset { |
| 819 | 	/** @handle: Handle for the object being mapped. */ | 902 | 	/** @handle: Handle for the object being mapped. */ |
| 820 | 	__u32 handle; | 903 | 	__u32 handle; |
| 821 | 904 | ||
| 822 | 	/** @flags: Must be zero */ | 905 | #define DRM_XE_MMAP_OFFSET_FLAG_PCI_BARRIER (1 << 0) |
| 906 | 	/** @flags: Flags */ | ||
| 823 | 	__u32 flags; | 907 | 	__u32 flags; |
| 824 | 908 | ||
| 825 | 	/** @offset: The fake offset to use for subsequent mmap call */ | 909 | 	/** @offset: The fake offset to use for subsequent mmap call */ |
| ... | @@ -833,13 +917,17 @@ struct drm_xe_gem_mmap_offset { | ... | @@ -833,13 +917,17 @@ struct drm_xe_gem_mmap_offset { |
| 833 | * struct drm_xe_vm_create - Input of &DRM_IOCTL_XE_VM_CREATE | 917 | * struct drm_xe_vm_create - Input of &DRM_IOCTL_XE_VM_CREATE |
| 834 | * | 918 | * |
| 835 | * The @flags can be: | 919 | * The @flags can be: |
| 836 | * - %DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE | 920 | * - %DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE - Map the whole virtual address |
| 921 | * space of the VM to scratch page. A vm_bind would overwrite the scratch | ||
| 922 | * page mapping. This flag is mutually exclusive with the | ||
| 923 | * %DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception of on x2 and | ||
| 924 | * xe3 platform. | ||
| 837 | * - %DRM_XE_VM_CREATE_FLAG_LR_MODE - An LR, or Long Running VM accepts | 925 | * - %DRM_XE_VM_CREATE_FLAG_LR_MODE - An LR, or Long Running VM accepts |
| 838 | * exec submissions to its exec_queues that don't have an upper time | 926 | * exec submissions to its exec_queues that don't have an upper time |
| 839 | * limit on the job execution time. But exec submissions to these | 927 | * limit on the job execution time. But exec submissions to these |
| 840 | * don't allow any of the flags DRM_XE_SYNC_FLAG_SYNCOBJ, | 928 | * don't allow any of the sync types DRM_XE_SYNC_TYPE_SYNCOBJ, |
| 841 | * DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ, DRM_XE_SYNC_FLAG_DMA_BUF, | 929 | * DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ, used as out-syncobjs, that is, |
| 842 | * used as out-syncobjs, that is, together with DRM_XE_SYNC_FLAG_SIGNAL. | 930 | * together with sync flag DRM_XE_SYNC_FLAG_SIGNAL. |
| 843 | * LR VMs can be created in recoverable page-fault mode using | 931 | * LR VMs can be created in recoverable page-fault mode using |
| 844 | * DRM_XE_VM_CREATE_FLAG_FAULT_MODE, if the device supports it. | 932 | * DRM_XE_VM_CREATE_FLAG_FAULT_MODE, if the device supports it. |
| 845 | * If that flag is omitted, the UMD can not rely on the slightly | 933 | * If that flag is omitted, the UMD can not rely on the slightly |
| ... | @@ -906,6 +994,15 @@ struct drm_xe_vm_destroy { | ... | @@ -906,6 +994,15 @@ struct drm_xe_vm_destroy { |
| 906 | * will only be valid for DRM_XE_VM_BIND_OP_MAP operations, the BO | 994 | * will only be valid for DRM_XE_VM_BIND_OP_MAP operations, the BO |
| 907 | * handle MBZ, and the BO offset MBZ. This flag is intended to | 995 | * handle MBZ, and the BO offset MBZ. This flag is intended to |
| 908 | * implement VK sparse bindings. | 996 | * implement VK sparse bindings. |
| 997 | * - %DRM_XE_VM_BIND_FLAG_CHECK_PXP - If the object is encrypted via PXP, | ||
| 998 | * reject the binding if the encryption key is no longer valid. This | ||
| 999 | * flag has no effect on BOs that are not marked as using PXP. | ||
| 1000 | * - %DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR - When the CPU address mirror flag is | ||
| 1001 | * set, no mappings are created rather the range is reserved for CPU address | ||
| 1002 | * mirroring which will be populated on GPU page faults or prefetches. Only | ||
| 1003 | * valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address | ||
| 1004 | * mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO | ||
| 1005 | * handle MBZ, and the BO offset MBZ. | ||
| 909 | */ | 1006 | */ |
| 910 | struct drm_xe_vm_bind_op { | 1007 | struct drm_xe_vm_bind_op { |
| 911 | 	/** @extensions: Pointer to the first extension struct, if any */ | 1008 | 	/** @extensions: Pointer to the first extension struct, if any */ |
| ... | @@ -958,7 +1055,9 @@ struct drm_xe_vm_bind_op { | ... | @@ -958,7 +1055,9 @@ struct drm_xe_vm_bind_op { |
| 958 | 	 * on the @pat_index. For such mappings there is no actual memory being | 1055 | 	 * on the @pat_index. For such mappings there is no actual memory being |
| 959 | 	 * mapped (the address in the PTE is invalid), so the various PAT memory | 1056 | 	 * mapped (the address in the PTE is invalid), so the various PAT memory |
| 960 | 	 * attributes likely do not apply. Simply leaving as zero is one | 1057 | 	 * attributes likely do not apply. Simply leaving as zero is one |
| 961 | 	 * option (still a valid pat_index). | 1058 | 	 * option (still a valid pat_index). Same applies to |
| 1059 | 	 * DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR bindings as for such mapping | ||
| 1060 | 	 * there is no actual memory being mapped. | ||
| 962 | 	 */ | 1061 | 	 */ |
| 963 | 	__u16 pat_index; | 1062 | 	__u16 pat_index; |
| 964 | 1063 | ||
| ... | @@ -974,6 +1073,14 @@ struct drm_xe_vm_bind_op { | ... | @@ -974,6 +1073,14 @@ struct drm_xe_vm_bind_op { |
| 974 | 1073 | ||
| 975 | 		/** @userptr: user pointer to bind on */ | 1074 | 		/** @userptr: user pointer to bind on */ |
| 976 | 		__u64 userptr; | 1075 | 		__u64 userptr; |
| 1076 | |||
| 1077 | 		/** | ||
| 1078 | 		 * @cpu_addr_mirror_offset: Offset from GPU @addr to create | ||
| 1079 | 		 * CPU address mirror mappings. MBZ with current level of | ||
| 1080 | 		 * support (e.g. 1 to 1 mapping between GPU and CPU mappings | ||
| 1081 | 		 * only supported). | ||
| 1082 | 		 */ | ||
| 1083 | 		__s64 cpu_addr_mirror_offset; | ||
| 977 | 	}; | 1084 | 	}; |
| 978 | 1085 | ||
| 979 | 	/** | 1086 | 	/** |
| ... | @@ -996,6 +1103,8 @@ struct drm_xe_vm_bind_op { | ... | @@ -996,6 +1103,8 @@ struct drm_xe_vm_bind_op { |
| 996 | #define DRM_XE_VM_BIND_FLAG_IMMEDIATE	(1 << 1) | 1103 | #define DRM_XE_VM_BIND_FLAG_IMMEDIATE	(1 << 1) |
| 997 | #define DRM_XE_VM_BIND_FLAG_NULL	(1 << 2) | 1104 | #define DRM_XE_VM_BIND_FLAG_NULL	(1 << 2) |
| 998 | #define DRM_XE_VM_BIND_FLAG_DUMPABLE	(1 << 3) | 1105 | #define DRM_XE_VM_BIND_FLAG_DUMPABLE	(1 << 3) |
| 1106 | #define DRM_XE_VM_BIND_FLAG_CHECK_PXP	(1 << 4) | ||
| 1107 | #define DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR	(1 << 5) | ||
| 999 | 	/** @flags: Bind flags */ | 1108 | 	/** @flags: Bind flags */ |
| 1000 | 	__u32 flags; | 1109 | 	__u32 flags; |
| 1001 | 1110 | ||
| ... | @@ -1087,6 +1196,29 @@ struct drm_xe_vm_bind { | ... | @@ -1087,6 +1196,29 @@ struct drm_xe_vm_bind { |
| 1087 | /** | 1196 | /** |
| 1088 | * struct drm_xe_exec_queue_create - Input of &DRM_IOCTL_XE_EXEC_QUEUE_CREATE | 1197 | * struct drm_xe_exec_queue_create - Input of &DRM_IOCTL_XE_EXEC_QUEUE_CREATE |
| 1089 | * | 1198 | * |
| 1199 | * This ioctl supports setting the following properties via the | ||
| 1200 | * %DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY extension, which uses the | ||
| 1201 | * generic @drm_xe_ext_set_property struct: | ||
| 1202 | * | ||
| 1203 | * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY - set the queue priority. | ||
| 1204 | * CAP_SYS_NICE is required to set a value above normal. | ||
| 1205 | * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE - set the queue timeslice | ||
| 1206 | * duration in microseconds. | ||
| 1207 | * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE - set the type of PXP session | ||
| 1208 | * this queue will be used with. Valid values are listed in enum | ||
| 1209 | * drm_xe_pxp_session_type. %DRM_XE_PXP_TYPE_NONE is the default behavior, so | ||
| 1210 | * there is no need to explicitly set that. When a queue of type | ||
| 1211 | * %DRM_XE_PXP_TYPE_HWDRM is created, the PXP default HWDRM session | ||
| 1212 | * (%XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if isn't already running. | ||
| 1213 | * The user is expected to query the PXP status via the query ioctl (see | ||
| 1214 | * %DRM_XE_DEVICE_QUERY_PXP_STATUS) and to wait for PXP to be ready before | ||
| 1215 | * attempting to create a queue with this property. When a queue is created | ||
| 1216 | * before PXP is ready, the ioctl will return -EBUSY if init is still in | ||
| 1217 | * progress or -EIO if init failed. | ||
| 1218 | * Given that going into a power-saving state kills PXP HWDRM sessions, | ||
| 1219 | * runtime PM will be blocked while queues of this type are alive. | ||
| 1220 | * All PXP queues will be killed if a PXP invalidation event occurs. | ||
| 1221 | * | ||
| 1090 | * The example below shows how to use @drm_xe_exec_queue_create to create | 1222 | * The example below shows how to use @drm_xe_exec_queue_create to create |
| 1091 | * a simple exec_queue (no parallel submission) of class | 1223 | * a simple exec_queue (no parallel submission) of class |
| 1092 | * &DRM_XE_ENGINE_CLASS_RENDER. | 1224 | * &DRM_XE_ENGINE_CLASS_RENDER. |
| ... | @@ -1105,12 +1237,27 @@ struct drm_xe_vm_bind { | ... | @@ -1105,12 +1237,27 @@ struct drm_xe_vm_bind { |
| 1105 | * }; | 1237 | * }; |
| 1106 | * ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create); | 1238 | * ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create); |
| 1107 | * | 1239 | * |
| 1240 | * Allow users to provide a hint to kernel for cases demanding low latency | ||
| 1241 | * profile. Please note it will have impact on power consumption. User can | ||
| 1242 | * indicate low latency hint with flag while creating exec queue as | ||
| 1243 | * mentioned below, | ||
| 1244 | * | ||
| 1245 | * struct drm_xe_exec_queue_create exec_queue_create = { | ||
| 1246 | * .flags = DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT, | ||
| 1247 | * .extensions = 0, | ||
| 1248 | * .vm_id = vm, | ||
| 1249 | * .num_bb_per_exec = 1, | ||
| 1250 | * .num_eng_per_bb = 1, | ||
| 1251 | * .instances = to_user_pointer(&instance), | ||
| 1252 | * }; | ||
| 1253 | * ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create); | ||
| 1254 | * | ||
| 1108 | */ | 1255 | */ |
| 1109 | struct drm_xe_exec_queue_create { | 1256 | struct drm_xe_exec_queue_create { |
| 1110 | #define DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY		0 | 1257 | #define DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY		0 |
| 1111 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY		0 | 1258 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY		0 |
| 1112 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE		1 | 1259 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE		1 |
| 1113 | 1260 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE		2 | |
| 1114 | 	/** @extensions: Pointer to the first extension struct, if any */ | 1261 | 	/** @extensions: Pointer to the first extension struct, if any */ |
| 1115 | 	__u64 extensions; | 1262 | 	__u64 extensions; |
| 1116 | 1263 | ||
| ... | @@ -1123,7 +1270,8 @@ struct drm_xe_exec_queue_create { | ... | @@ -1123,7 +1270,8 @@ struct drm_xe_exec_queue_create { |
| 1123 | 	/** @vm_id: VM to use for this exec queue */ | 1270 | 	/** @vm_id: VM to use for this exec queue */ |
| 1124 | 	__u32 vm_id; | 1271 | 	__u32 vm_id; |
| 1125 | 1272 | ||
| 1126 | 	/** @flags: MBZ */ | 1273 | #define DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT	(1 << 0) |
| 1274 | 	/** @flags: flags to use for this exec queue */ | ||
| 1127 | 	__u32 flags; | 1275 | 	__u32 flags; |
| 1128 | 1276 | ||
| 1129 | 	/** @exec_queue_id: Returned exec queue ID */ | 1277 | 	/** @exec_queue_id: Returned exec queue ID */ |
| ... | @@ -1246,7 +1394,7 @@ struct drm_xe_sync { | ... | @@ -1246,7 +1394,7 @@ struct drm_xe_sync { |
| 1246 | 1394 | ||
| 1247 | 	/** | 1395 | 	/** |
| 1248 | 	 * @timeline_value: Input for the timeline sync object. Needs to be | 1396 | 	 * @timeline_value: Input for the timeline sync object. Needs to be |
| 1249 | 	 * different than 0 when used with %DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ. | 1397 | 	 * different than 0 when used with %DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ. |
| 1250 | 	 */ | 1398 | 	 */ |
| 1251 | 	__u64 timeline_value; | 1399 | 	__u64 timeline_value; |
| 1252 | 1400 | ||
| ... | @@ -1397,6 +1545,8 @@ struct drm_xe_wait_user_fence { | ... | @@ -1397,6 +1545,8 @@ struct drm_xe_wait_user_fence { |
| 1397 | enum drm_xe_observation_type { | 1545 | enum drm_xe_observation_type { |
| 1398 | 	/** @DRM_XE_OBSERVATION_TYPE_OA: OA observation stream type */ | 1546 | 	/** @DRM_XE_OBSERVATION_TYPE_OA: OA observation stream type */ |
| 1399 | 	DRM_XE_OBSERVATION_TYPE_OA, | 1547 | 	DRM_XE_OBSERVATION_TYPE_OA, |
| 1548 | 	/** @DRM_XE_OBSERVATION_TYPE_EU_STALL: EU stall sampling observation stream type */ | ||
| 1549 | 	DRM_XE_OBSERVATION_TYPE_EU_STALL, | ||
| 1400 | }; | 1550 | }; |
| 1401 | 1551 | ||
| 1402 | /** | 1552 | /** |
| ... | @@ -1467,6 +1617,9 @@ enum drm_xe_oa_unit_type { | ... | @@ -1467,6 +1617,9 @@ enum drm_xe_oa_unit_type { |
| 1467 | 1617 | ||
| 1468 | 	/** @DRM_XE_OA_UNIT_TYPE_OAM: OAM OA unit */ | 1618 | 	/** @DRM_XE_OA_UNIT_TYPE_OAM: OAM OA unit */ |
| 1469 | 	DRM_XE_OA_UNIT_TYPE_OAM, | 1619 | 	DRM_XE_OA_UNIT_TYPE_OAM, |
| 1620 | |||
| 1621 | 	/** @DRM_XE_OA_UNIT_TYPE_OAM_SAG: OAM_SAG OA unit */ | ||
| 1622 | 	DRM_XE_OA_UNIT_TYPE_OAM_SAG, | ||
| 1470 | }; | 1623 | }; |
| 1471 | 1624 | ||
| 1472 | /** | 1625 | /** |
| ... | @@ -1488,6 +1641,7 @@ struct drm_xe_oa_unit { | ... | @@ -1488,6 +1641,7 @@ struct drm_xe_oa_unit { |
| 1488 | #define DRM_XE_OA_CAPS_SYNCS		(1 << 1) | 1641 | #define DRM_XE_OA_CAPS_SYNCS		(1 << 1) |
| 1489 | #define DRM_XE_OA_CAPS_OA_BUFFER_SIZE	(1 << 2) | 1642 | #define DRM_XE_OA_CAPS_OA_BUFFER_SIZE	(1 << 2) |
| 1490 | #define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS	(1 << 3) | 1643 | #define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS	(1 << 3) |
| 1644 | #define DRM_XE_OA_CAPS_OAM		(1 << 4) | ||
| 1491 | 1645 | ||
| 1492 | 	/** @oa_timestamp_freq: OA timestamp freq */ | 1646 | 	/** @oa_timestamp_freq: OA timestamp freq */ |
| 1493 | 	__u64 oa_timestamp_freq; | 1647 | 	__u64 oa_timestamp_freq; |
| ... | @@ -1729,6 +1883,97 @@ struct drm_xe_oa_stream_info { | ... | @@ -1729,6 +1883,97 @@ struct drm_xe_oa_stream_info { |
| 1729 | 	__u64 reserved[3]; | 1883 | 	__u64 reserved[3]; |
| 1730 | }; | 1884 | }; |
| 1731 | 1885 | ||
| 1886 | /** | ||
| 1887 | * enum drm_xe_pxp_session_type - Supported PXP session types. | ||
| 1888 | * | ||
| 1889 | * We currently only support HWDRM sessions, which are used for protected | ||
| 1890 | * content that ends up being displayed, but the HW supports multiple types, so | ||
| 1891 | * we might extend support in the future. | ||
| 1892 | */ | ||
| 1893 | enum drm_xe_pxp_session_type { | ||
| 1894 | 	/** @DRM_XE_PXP_TYPE_NONE: PXP not used */ | ||
| 1895 | 	DRM_XE_PXP_TYPE_NONE = 0, | ||
| 1896 | 	/** | ||
| 1897 | 	 * @DRM_XE_PXP_TYPE_HWDRM: HWDRM sessions are used for content that ends | ||
| 1898 | 	 * up on the display. | ||
| 1899 | 	 */ | ||
| 1900 | 	DRM_XE_PXP_TYPE_HWDRM = 1, | ||
| 1901 | }; | ||
| 1902 | |||
| 1903 | /* ID of the protected content session managed by Xe when PXP is active */ | ||
| 1904 | #define DRM_XE_PXP_HWDRM_DEFAULT_SESSION 0xf | ||
| 1905 | |||
| 1906 | /** | ||
| 1907 | * enum drm_xe_eu_stall_property_id - EU stall sampling input property ids. | ||
| 1908 | * | ||
| 1909 | * These properties are passed to the driver at open as a chain of | ||
| 1910 | * @drm_xe_ext_set_property structures with @property set to these | ||
| 1911 | * properties' enums and @value set to the corresponding values of these | ||
| 1912 | * properties. @drm_xe_user_extension base.name should be set to | ||
| 1913 | * @DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY. | ||
| 1914 | * | ||
| 1915 | * With the file descriptor obtained from open, user space must enable | ||
| 1916 | * the EU stall stream fd with @DRM_XE_OBSERVATION_IOCTL_ENABLE before | ||
| 1917 | * calling read(). EIO errno from read() indicates HW dropped data | ||
| 1918 | * due to full buffer. | ||
| 1919 | */ | ||
| 1920 | enum drm_xe_eu_stall_property_id { | ||
| 1921 | #define DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY		0 | ||
| 1922 | 	/** | ||
| 1923 | 	 * @DRM_XE_EU_STALL_PROP_GT_ID: @gt_id of the GT on which | ||
| 1924 | 	 * EU stall data will be captured. | ||
| 1925 | 	 */ | ||
| 1926 | 	DRM_XE_EU_STALL_PROP_GT_ID = 1, | ||
| 1927 | |||
| 1928 | 	/** | ||
| 1929 | 	 * @DRM_XE_EU_STALL_PROP_SAMPLE_RATE: Sampling rate in | ||
| 1930 | 	 * GPU cycles from @sampling_rates in struct @drm_xe_query_eu_stall | ||
| 1931 | 	 */ | ||
| 1932 | 	DRM_XE_EU_STALL_PROP_SAMPLE_RATE, | ||
| 1933 | |||
| 1934 | 	/** | ||
| 1935 | 	 * @DRM_XE_EU_STALL_PROP_WAIT_NUM_REPORTS: Minimum number of | ||
| 1936 | 	 * EU stall data reports to be present in the kernel buffer | ||
| 1937 | 	 * before unblocking a blocked poll or read. | ||
| 1938 | 	 */ | ||
| 1939 | 	DRM_XE_EU_STALL_PROP_WAIT_NUM_REPORTS, | ||
| 1940 | }; | ||
| 1941 | |||
| 1942 | /** | ||
| 1943 | * struct drm_xe_query_eu_stall - Information about EU stall sampling. | ||
| 1944 | * | ||
| 1945 | * If a query is made with a struct @drm_xe_device_query where .query | ||
| 1946 | * is equal to @DRM_XE_DEVICE_QUERY_EU_STALL, then the reply uses | ||
| 1947 | * struct @drm_xe_query_eu_stall in .data. | ||
| 1948 | */ | ||
| 1949 | struct drm_xe_query_eu_stall { | ||
| 1950 | 	/** @extensions: Pointer to the first extension struct, if any */ | ||
| 1951 | 	__u64 extensions; | ||
| 1952 | |||
| 1953 | 	/** @capabilities: EU stall capabilities bit-mask */ | ||
| 1954 | 	__u64 capabilities; | ||
| 1955 | #define DRM_XE_EU_STALL_CAPS_BASE		(1 << 0) | ||
| 1956 | |||
| 1957 | 	/** @record_size: size of each EU stall data record */ | ||
| 1958 | 	__u64 record_size; | ||
| 1959 | |||
| 1960 | 	/** @per_xecore_buf_size: internal per XeCore buffer size */ | ||
| 1961 | 	__u64 per_xecore_buf_size; | ||
| 1962 | |||
| 1963 | 	/** @reserved: Reserved */ | ||
| 1964 | 	__u64 reserved[5]; | ||
| 1965 | |||
| 1966 | 	/** @num_sampling_rates: Number of sampling rates in @sampling_rates array */ | ||
| 1967 | 	__u64 num_sampling_rates; | ||
| 1968 | |||
| 1969 | 	/** | ||
| 1970 | 	 * @sampling_rates: Flexible array of sampling rates | ||
| 1971 | 	 * sorted in the fastest to slowest order. | ||
| 1972 | 	 * Sampling rates are specified in GPU clock cycles. | ||
| 1973 | 	 */ | ||
| 1974 | 	__u64 sampling_rates[]; | ||
| 1975 | }; | ||
| 1976 | |||
| 1732 | #if defined(__cplusplus) | 1977 | #if defined(__cplusplus) |
| 1733 | } | 1978 | } |
| 1734 | #endif | 1979 | #endif |
lib/libc/include/any-linux-any/fwctl/cxl.h created+56| ... | @@ -0,0 +1,56 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2024-2025 Intel Corporation | ||
| 4 | * | ||
| 5 | * These are definitions for the mailbox command interface of CXL subsystem. | ||
| 6 | */ | ||
| 7 | #ifndef _FWCTL_CXL_H_ | ||
| 8 | #define _FWCTL_CXL_H_ | ||
| 9 | |||
| 10 | #include <linux/types.h> | ||
| 11 | #include <linux/stddef.h> | ||
| 12 | #include <cxl/features.h> | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct fwctl_rpc_cxl - ioctl(FWCTL_RPC) input for CXL | ||
| 16 | * @opcode: CXL mailbox command opcode | ||
| 17 | * @flags: Flags for the command (input). | ||
| 18 | * @op_size: Size of input payload. | ||
| 19 | * @reserved1: Reserved. Must be 0s. | ||
| 20 | * @get_sup_feats_in: Get Supported Features input | ||
| 21 | * @get_feat_in: Get Feature input | ||
| 22 | * @set_feat_in: Set Feature input | ||
| 23 | */ | ||
| 24 | struct fwctl_rpc_cxl { | ||
| 25 | 	__struct_group(fwctl_rpc_cxl_hdr, hdr, /* no attrs */, | ||
| 26 | 		__u32 opcode; | ||
| 27 | 		__u32 flags; | ||
| 28 | 		__u32 op_size; | ||
| 29 | 		__u32 reserved1; | ||
| 30 | 	); | ||
| 31 | 	union { | ||
| 32 | 		struct cxl_mbox_get_sup_feats_in get_sup_feats_in; | ||
| 33 | 		struct cxl_mbox_get_feat_in get_feat_in; | ||
| 34 | 		struct cxl_mbox_set_feat_in set_feat_in; | ||
| 35 | 	}; | ||
| 36 | }; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * struct fwctl_rpc_cxl_out - ioctl(FWCTL_RPC) output for CXL | ||
| 40 | * @size: Size of the output payload | ||
| 41 | * @retval: Return value from device | ||
| 42 | * @get_sup_feats_out: Get Supported Features output | ||
| 43 | * @payload: raw byte stream of payload | ||
| 44 | */ | ||
| 45 | struct fwctl_rpc_cxl_out { | ||
| 46 | 	__struct_group(fwctl_rpc_cxl_out_hdr, hdr, /* no attrs */, | ||
| 47 | 		__u32 size; | ||
| 48 | 		__u32 retval; | ||
| 49 | 	); | ||
| 50 | 	union { | ||
| 51 | 		struct cxl_mbox_get_sup_feats_out get_sup_feats_out; | ||
| 52 | 		__DECLARE_FLEX_ARRAY(__u8, payload); | ||
| 53 | 	}; | ||
| 54 | }; | ||
| 55 | |||
| 56 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/fwctl/fwctl.h created+141| ... | @@ -0,0 +1,141 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. | ||
| 3 | */ | ||
| 4 | #ifndef _FWCTL_H | ||
| 5 | #define _FWCTL_H | ||
| 6 | |||
| 7 | #include <linux/types.h> | ||
| 8 | #include <linux/ioctl.h> | ||
| 9 | |||
| 10 | #define FWCTL_TYPE 0x9A | ||
| 11 | |||
| 12 | /** | ||
| 13 | * DOC: General ioctl format | ||
| 14 | * | ||
| 15 | * The ioctl interface follows a general format to allow for extensibility. Each | ||
| 16 | * ioctl is passed a structure pointer as the argument providing the size of | ||
| 17 | * the structure in the first u32. The kernel checks that any structure space | ||
| 18 | * beyond what it understands is 0. This allows userspace to use the backward | ||
| 19 | * compatible portion while consistently using the newer, larger, structures. | ||
| 20 | * | ||
| 21 | * ioctls use a standard meaning for common errnos: | ||
| 22 | * | ||
| 23 | * - ENOTTY: The IOCTL number itself is not supported at all | ||
| 24 | * - E2BIG: The IOCTL number is supported, but the provided structure has | ||
| 25 | * non-zero in a part the kernel does not understand. | ||
| 26 | * - EOPNOTSUPP: The IOCTL number is supported, and the structure is | ||
| 27 | * understood, however a known field has a value the kernel does not | ||
| 28 | * understand or support. | ||
| 29 | * - EINVAL: Everything about the IOCTL was understood, but a field is not | ||
| 30 | * correct. | ||
| 31 | * - ENOMEM: Out of memory. | ||
| 32 | * - ENODEV: The underlying device has been hot-unplugged and the FD is | ||
| 33 | * orphaned. | ||
| 34 | * | ||
| 35 | * As well as additional errnos, within specific ioctls. | ||
| 36 | */ | ||
| 37 | enum { | ||
| 38 | 	FWCTL_CMD_BASE = 0, | ||
| 39 | 	FWCTL_CMD_INFO = 0, | ||
| 40 | 	FWCTL_CMD_RPC = 1, | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum fwctl_device_type { | ||
| 44 | 	FWCTL_DEVICE_TYPE_ERROR = 0, | ||
| 45 | 	FWCTL_DEVICE_TYPE_MLX5 = 1, | ||
| 46 | 	FWCTL_DEVICE_TYPE_CXL = 2, | ||
| 47 | 	FWCTL_DEVICE_TYPE_PDS = 4, | ||
| 48 | }; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * struct fwctl_info - ioctl(FWCTL_INFO) | ||
| 52 | * @size: sizeof(struct fwctl_info) | ||
| 53 | * @flags: Must be 0 | ||
| 54 | * @out_device_type: Returns the type of the device from enum fwctl_device_type | ||
| 55 | * @device_data_len: On input the length of the out_device_data memory. On | ||
| 56 | *	output the size of the kernel's device_data which may be larger or | ||
| 57 | *	smaller than the input. Maybe 0 on input. | ||
| 58 | * @out_device_data: Pointer to a memory of device_data_len bytes. Kernel will | ||
| 59 | *	fill the entire memory, zeroing as required. | ||
| 60 | * | ||
| 61 | * Returns basic information about this fwctl instance, particularly what driver | ||
| 62 | * is being used to define the device_data format. | ||
| 63 | */ | ||
| 64 | struct fwctl_info { | ||
| 65 | 	__u32 size; | ||
| 66 | 	__u32 flags; | ||
| 67 | 	__u32 out_device_type; | ||
| 68 | 	__u32 device_data_len; | ||
| 69 | 	__aligned_u64 out_device_data; | ||
| 70 | }; | ||
| 71 | #define FWCTL_INFO _IO(FWCTL_TYPE, FWCTL_CMD_INFO) | ||
| 72 | |||
| 73 | /** | ||
| 74 | * enum fwctl_rpc_scope - Scope of access for the RPC | ||
| 75 | * | ||
| 76 | * Refer to fwctl.rst for a more detailed discussion of these scopes. | ||
| 77 | */ | ||
| 78 | enum fwctl_rpc_scope { | ||
| 79 | 	/** | ||
| 80 | 	 * @FWCTL_RPC_CONFIGURATION: Device configuration access scope | ||
| 81 | 	 * | ||
| 82 | 	 * Read/write access to device configuration. When configuration | ||
| 83 | 	 * is written to the device it remains in a fully supported state. | ||
| 84 | 	 */ | ||
| 85 | 	FWCTL_RPC_CONFIGURATION = 0, | ||
| 86 | 	/** | ||
| 87 | 	 * @FWCTL_RPC_DEBUG_READ_ONLY: Read only access to debug information | ||
| 88 | 	 * | ||
| 89 | 	 * Readable debug information. Debug information is compatible with | ||
| 90 | 	 * kernel lockdown, and does not disclose any sensitive information. For | ||
| 91 | 	 * instance exposing any encryption secrets from this information is | ||
| 92 | 	 * forbidden. | ||
| 93 | 	 */ | ||
| 94 | 	FWCTL_RPC_DEBUG_READ_ONLY = 1, | ||
| 95 | 	/** | ||
| 96 | 	 * @FWCTL_RPC_DEBUG_WRITE: Writable access to lockdown compatible debug information | ||
| 97 | 	 * | ||
| 98 | 	 * Allows write access to data in the device which may leave a fully | ||
| 99 | 	 * supported state. This is intended to permit intensive and possibly | ||
| 100 | 	 * invasive debugging. This scope will taint the kernel. | ||
| 101 | 	 */ | ||
| 102 | 	FWCTL_RPC_DEBUG_WRITE = 2, | ||
| 103 | 	/** | ||
| 104 | 	 * @FWCTL_RPC_DEBUG_WRITE_FULL: Write access to all debug information | ||
| 105 | 	 * | ||
| 106 | 	 * Allows read/write access to everything. Requires CAP_SYS_RAW_IO, so | ||
| 107 | 	 * it is not required to follow lockdown principals. If in doubt | ||
| 108 | 	 * debugging should be placed in this scope. This scope will taint the | ||
| 109 | 	 * kernel. | ||
| 110 | 	 */ | ||
| 111 | 	FWCTL_RPC_DEBUG_WRITE_FULL = 3, | ||
| 112 | }; | ||
| 113 | |||
| 114 | /** | ||
| 115 | * struct fwctl_rpc - ioctl(FWCTL_RPC) | ||
| 116 | * @size: sizeof(struct fwctl_rpc) | ||
| 117 | * @scope: One of enum fwctl_rpc_scope, required scope for the RPC | ||
| 118 | * @in_len: Length of the in memory | ||
| 119 | * @out_len: Length of the out memory | ||
| 120 | * @in: Request message in device specific format | ||
| 121 | * @out: Response message in device specific format | ||
| 122 | * | ||
| 123 | * Deliver a Remote Procedure Call to the device FW and return the response. The | ||
| 124 | * call's parameters and return are marshaled into linear buffers of memory. Any | ||
| 125 | * errno indicates that delivery of the RPC to the device failed. Return status | ||
| 126 | * originating in the device during a successful delivery must be encoded into | ||
| 127 | * out. | ||
| 128 | * | ||
| 129 | * The format of the buffers matches the out_device_type from FWCTL_INFO. | ||
| 130 | */ | ||
| 131 | struct fwctl_rpc { | ||
| 132 | 	__u32 size; | ||
| 133 | 	__u32 scope; | ||
| 134 | 	__u32 in_len; | ||
| 135 | 	__u32 out_len; | ||
| 136 | 	__aligned_u64 in; | ||
| 137 | 	__aligned_u64 out; | ||
| 138 | }; | ||
| 139 | #define FWCTL_RPC _IO(FWCTL_TYPE, FWCTL_CMD_RPC) | ||
| 140 | |||
| 141 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/fwctl/mlx5.h created+36| ... | @@ -0,0 +1,36 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES | ||
| 4 | * | ||
| 5 | * These are definitions for the command interface for mlx5 HW. mlx5 FW has a | ||
| 6 | * User Context mechanism which allows the FW to understand a security scope. | ||
| 7 | * FWCTL binds each FD to a FW user context and then places the User Context ID | ||
| 8 | * (UID) in each command header. The created User Context has a capability set | ||
| 9 | * that is appropriate for FWCTL's security model. | ||
| 10 | * | ||
| 11 | * Command formation should use a copy of the structs in mlx5_ifc.h following | ||
| 12 | * the Programmers Reference Manual. A open release is available here: | ||
| 13 | * | ||
| 14 | * https://network.nvidia.com/files/doc-2020/ethernet-adapters-programming-manual.pdf | ||
| 15 | * | ||
| 16 | * The device_type for this file is FWCTL_DEVICE_TYPE_MLX5. | ||
| 17 | */ | ||
| 18 | #ifndef _FWCTL_MLX5_H | ||
| 19 | #define _FWCTL_MLX5_H | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | |||
| 23 | /** | ||
| 24 | * struct fwctl_info_mlx5 - ioctl(FWCTL_INFO) out_device_data | ||
| 25 | * @uid: The FW UID this FD is bound to. Each command header will force | ||
| 26 | *	this value. | ||
| 27 | * @uctx_caps: The FW capabilities that are enabled for the uid. | ||
| 28 | * | ||
| 29 | * Return basic information about the FW interface available. | ||
| 30 | */ | ||
| 31 | struct fwctl_info_mlx5 { | ||
| 32 | 	__u32 uid; | ||
| 33 | 	__u32 uctx_caps; | ||
| 34 | }; | ||
| 35 | |||
| 36 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/fwctl/pds.h created+62| ... | @@ -0,0 +1,62 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* Copyright(c) Advanced Micro Devices, Inc */ | ||
| 3 | |||
| 4 | /* | ||
| 5 | * fwctl interface info for pds_fwctl | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _FWCTL_PDS_H_ | ||
| 9 | #define _FWCTL_PDS_H_ | ||
| 10 | |||
| 11 | #include <linux/types.h> | ||
| 12 | |||
| 13 | /** | ||
| 14 | * struct fwctl_info_pds | ||
| 15 | * @uctx_caps: bitmap of firmware capabilities | ||
| 16 | * | ||
| 17 | * Return basic information about the FW interface available. | ||
| 18 | */ | ||
| 19 | struct fwctl_info_pds { | ||
| 20 | 	__u32 uctx_caps; | ||
| 21 | }; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * enum pds_fwctl_capabilities | ||
| 25 | * @PDS_FWCTL_QUERY_CAP: firmware can be queried for information | ||
| 26 | * @PDS_FWCTL_SEND_CAP: firmware can be sent commands | ||
| 27 | */ | ||
| 28 | enum pds_fwctl_capabilities { | ||
| 29 | 	PDS_FWCTL_QUERY_CAP = 0, | ||
| 30 | 	PDS_FWCTL_SEND_CAP, | ||
| 31 | }; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * struct fwctl_rpc_pds | ||
| 35 | * @in.op: requested operation code | ||
| 36 | * @in.ep: firmware endpoint to operate on | ||
| 37 | * @in.rsvd: reserved | ||
| 38 | * @in.len: length of payload data | ||
| 39 | * @in.payload: address of payload buffer | ||
| 40 | * @in: rpc in parameters | ||
| 41 | * @out.retval: operation result value | ||
| 42 | * @out.rsvd: reserved | ||
| 43 | * @out.len: length of result data buffer | ||
| 44 | * @out.payload: address of payload data buffer | ||
| 45 | * @out: rpc out parameters | ||
| 46 | */ | ||
| 47 | struct fwctl_rpc_pds { | ||
| 48 | 	struct { | ||
| 49 | 		__u32 op; | ||
| 50 | 		__u32 ep; | ||
| 51 | 		__u32 rsvd; | ||
| 52 | 		__u32 len; | ||
| 53 | 		__aligned_u64 payload; | ||
| 54 | 	} in; | ||
| 55 | 	struct { | ||
| 56 | 		__u32 retval; | ||
| 57 | 		__u32 rsvd[2]; | ||
| 58 | 		__u32 len; | ||
| 59 | 		__aligned_u64 payload; | ||
| 60 | 	} out; | ||
| 61 | }; | ||
| 62 | #endif /* _FWCTL_PDS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/audit.h+4-1| ... | @@ -33,7 +33,7 @@ | ... | @@ -33,7 +33,7 @@ |
| 33 | * 1100 - 1199 user space trusted application messages | 33 | * 1100 - 1199 user space trusted application messages |
| 34 | * 1200 - 1299 messages internal to the audit daemon | 34 | * 1200 - 1299 messages internal to the audit daemon |
| 35 | * 1300 - 1399 audit event messages | 35 | * 1300 - 1399 audit event messages |
| 36 | * 1400 - 1499 SE Linux use | 36 | * 1400 - 1499 access control messages |
| 37 | * 1500 - 1599 kernel LSPP events | 37 | * 1500 - 1599 kernel LSPP events |
| 38 | * 1600 - 1699 kernel crypto events | 38 | * 1600 - 1699 kernel crypto events |
| 39 | * 1700 - 1799 kernel anomaly records | 39 | * 1700 - 1799 kernel anomaly records |
| ... | @@ -146,6 +146,8 @@ | ... | @@ -146,6 +146,8 @@ |
| 146 | #define AUDIT_IPE_ACCESS	1420	/* IPE denial or grant */ | 146 | #define AUDIT_IPE_ACCESS	1420	/* IPE denial or grant */ |
| 147 | #define AUDIT_IPE_CONFIG_CHANGE	1421	/* IPE config change */ | 147 | #define AUDIT_IPE_CONFIG_CHANGE	1421	/* IPE config change */ |
| 148 | #define AUDIT_IPE_POLICY_LOAD	1422	/* IPE policy load */ | 148 | #define AUDIT_IPE_POLICY_LOAD	1422	/* IPE policy load */ |
| 149 | #define AUDIT_LANDLOCK_ACCESS	1423	/* Landlock denial */ | ||
| 150 | #define AUDIT_LANDLOCK_DOMAIN	1424	/* Landlock domain status */ | ||
| 149 | 151 | ||
| 150 | #define AUDIT_FIRST_KERN_ANOM_MSG 1700 | 152 | #define AUDIT_FIRST_KERN_ANOM_MSG 1700 |
| 151 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 | 153 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 |
| ... | @@ -161,6 +163,7 @@ | ... | @@ -161,6 +163,7 @@ |
| 161 | #define AUDIT_INTEGRITY_RULE	 1805 /* policy rule */ | 163 | #define AUDIT_INTEGRITY_RULE	 1805 /* policy rule */ |
| 162 | #define AUDIT_INTEGRITY_EVM_XATTR 1806 /* New EVM-covered xattr */ | 164 | #define AUDIT_INTEGRITY_EVM_XATTR 1806 /* New EVM-covered xattr */ |
| 163 | #define AUDIT_INTEGRITY_POLICY_RULE 1807 /* IMA policy rules */ | 165 | #define AUDIT_INTEGRITY_POLICY_RULE 1807 /* IMA policy rules */ |
| 166 | #define AUDIT_INTEGRITY_USERSPACE 1808 /* Userspace enforced data integrity */ | ||
| 164 | 167 | ||
| 165 | #define AUDIT_KERNEL		2000	/* Asynchronous audit record. NOT A REQUEST. */ | 168 | #define AUDIT_KERNEL		2000	/* Asynchronous audit record. NOT A REQUEST. */ |
| 166 | 169 |
lib/libc/include/any-linux-any/linux/batman_adv.h+9-9| ... | @@ -342,7 +342,7 @@ enum batadv_nl_attrs { | ... | @@ -342,7 +342,7 @@ enum batadv_nl_attrs { |
| 342 | 	BATADV_ATTR_MCAST_FLAGS_PRIV, | 342 | 	BATADV_ATTR_MCAST_FLAGS_PRIV, |
| 343 | 343 | ||
| 344 | 	/** | 344 | 	/** |
| 345 | 	 * @BATADV_ATTR_VLANID: VLAN id on top of soft interface | 345 | 	 * @BATADV_ATTR_VLANID: VLAN id on top of mesh interface |
| 346 | 	 */ | 346 | 	 */ |
| 347 | 	BATADV_ATTR_VLANID, | 347 | 	BATADV_ATTR_VLANID, |
| 348 | 348 | ||
| ... | @@ -380,7 +380,7 @@ enum batadv_nl_attrs { | ... | @@ -380,7 +380,7 @@ enum batadv_nl_attrs { |
| 380 | 	/** | 380 | 	/** |
| 381 | 	 * @BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED: whether the bridge loop | 381 | 	 * @BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED: whether the bridge loop |
| 382 | 	 * avoidance feature is enabled. This feature detects and avoids loops | 382 | 	 * avoidance feature is enabled. This feature detects and avoids loops |
| 383 | 	 * between the mesh and devices bridged with the soft interface | 383 | 	 * between the mesh and devices bridged with the mesh interface |
| 384 | 	 */ | 384 | 	 */ |
| 385 | 	BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED, | 385 | 	BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED, |
| 386 | 386 | ||
| ... | @@ -509,7 +509,7 @@ enum batadv_nl_commands { | ... | @@ -509,7 +509,7 @@ enum batadv_nl_commands { |
| 509 | 	BATADV_CMD_UNSPEC, | 509 | 	BATADV_CMD_UNSPEC, |
| 510 | 510 | ||
| 511 | 	/** | 511 | 	/** |
| 512 | 	 * @BATADV_CMD_GET_MESH: Get attributes from softif/mesh | 512 | 	 * @BATADV_CMD_GET_MESH: Get attributes from mesh(if) |
| 513 | 	 */ | 513 | 	 */ |
| 514 | 	BATADV_CMD_GET_MESH, | 514 | 	BATADV_CMD_GET_MESH, |
| 515 | 515 | ||
| ... | @@ -535,7 +535,7 @@ enum batadv_nl_commands { | ... | @@ -535,7 +535,7 @@ enum batadv_nl_commands { |
| 535 | 535 | ||
| 536 | 	/** | 536 | 	/** |
| 537 | 	 * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the | 537 | 	 * @BATADV_CMD_GET_HARDIF: Get attributes from a hardif of the |
| 538 | 	 * current softif | 538 | 	 * current mesh(if) |
| 539 | 	 */ | 539 | 	 */ |
| 540 | 	BATADV_CMD_GET_HARDIF, | 540 | 	BATADV_CMD_GET_HARDIF, |
| 541 | 541 | ||
| ... | @@ -591,25 +591,25 @@ enum batadv_nl_commands { | ... | @@ -591,25 +591,25 @@ enum batadv_nl_commands { |
| 591 | 	BATADV_CMD_GET_MCAST_FLAGS, | 591 | 	BATADV_CMD_GET_MCAST_FLAGS, |
| 592 | 592 | ||
| 593 | 	/** | 593 | 	/** |
| 594 | 	 * @BATADV_CMD_SET_MESH: Set attributes for softif/mesh | 594 | 	 * @BATADV_CMD_SET_MESH: Set attributes for mesh(if) |
| 595 | 	 */ | 595 | 	 */ |
| 596 | 	BATADV_CMD_SET_MESH, | 596 | 	BATADV_CMD_SET_MESH, |
| 597 | 597 | ||
| 598 | 	/** | 598 | 	/** |
| 599 | 	 * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the | 599 | 	 * @BATADV_CMD_SET_HARDIF: Set attributes for hardif of the |
| 600 | 	 * current softif | 600 | 	 * current mesh(if) |
| 601 | 	 */ | 601 | 	 */ |
| 602 | 	BATADV_CMD_SET_HARDIF, | 602 | 	BATADV_CMD_SET_HARDIF, |
| 603 | 603 | ||
| 604 | 	/** | 604 | 	/** |
| 605 | 	 * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the | 605 | 	 * @BATADV_CMD_GET_VLAN: Get attributes from a VLAN of the |
| 606 | 	 * current softif | 606 | 	 * current mesh(if) |
| 607 | 	 */ | 607 | 	 */ |
| 608 | 	BATADV_CMD_GET_VLAN, | 608 | 	BATADV_CMD_GET_VLAN, |
| 609 | 609 | ||
| 610 | 	/** | 610 | 	/** |
| 611 | 	 * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the | 611 | 	 * @BATADV_CMD_SET_VLAN: Set attributes for VLAN of the |
| 612 | 	 * current softif | 612 | 	 * current mesh(if) |
| 613 | 	 */ | 613 | 	 */ |
| 614 | 	BATADV_CMD_SET_VLAN, | 614 | 	BATADV_CMD_SET_VLAN, |
| 615 | 615 | ||
| ... | @@ -691,7 +691,7 @@ enum batadv_ifla_attrs { | ... | @@ -691,7 +691,7 @@ enum batadv_ifla_attrs { |
| 691 | 	 */ | 691 | 	 */ |
| 692 | 	IFLA_BATADV_ALGO_NAME, | 692 | 	IFLA_BATADV_ALGO_NAME, |
| 693 | 693 | ||
| 694 | 	/* add attributes above here, update the policy in soft-interface.c */ | 694 | 	/* add attributes above here, update the policy in mesh-interface.c */ |
| 695 | 695 | ||
| 696 | 	/** | 696 | 	/** |
| 697 | 	 * @__IFLA_BATADV_MAX: internal use | 697 | 	 * @__IFLA_BATADV_MAX: internal use |
lib/libc/include/any-linux-any/linux/bits.h+2-6| ... | @@ -4,13 +4,9 @@ | ... | @@ -4,13 +4,9 @@ |
| 4 | #ifndef _LINUX_BITS_H | 4 | #ifndef _LINUX_BITS_H |
| 5 | #define _LINUX_BITS_H | 5 | #define _LINUX_BITS_H |
| 6 | 6 | ||
| 7 | #define __GENMASK(h, l) \ | 7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (__BITS_PER_LONG - 1 - (h)))) |
| 8 | (((~_UL(0)) - (_UL(1) << (l)) + 1) & \ | ||
| 9 | (~_UL(0) >> (__BITS_PER_LONG - 1 - (h)))) | ||
| 10 | 8 | ||
| 11 | #define __GENMASK_ULL(h, l) \ | 9 | #define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h)))) |
| 12 | (((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \ | ||
| 13 | (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h)))) | ||
| 14 | 10 | ||
| 15 | #define __GENMASK_U128(h, l) \ | 11 | #define __GENMASK_U128(h, l) \ |
| 16 | 	((_BIT128((h)) << 1) - (_BIT128(l))) | 12 | 	((_BIT128((h)) << 1) - (_BIT128(l))) |
lib/libc/include/any-linux-any/linux/blk-crypto.h created+44| ... | @@ -0,0 +1,44 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _LINUX_BLK_CRYPTO_H | ||
| 3 | #define _LINUX_BLK_CRYPTO_H | ||
| 4 | |||
| 5 | #include <linux/ioctl.h> | ||
| 6 | #include <linux/types.h> | ||
| 7 | |||
| 8 | struct blk_crypto_import_key_arg { | ||
| 9 | 	/* Raw key (input) */ | ||
| 10 | 	__u64 raw_key_ptr; | ||
| 11 | 	__u64 raw_key_size; | ||
| 12 | 	/* Long-term wrapped key blob (output) */ | ||
| 13 | 	__u64 lt_key_ptr; | ||
| 14 | 	__u64 lt_key_size; | ||
| 15 | 	__u64 reserved[4]; | ||
| 16 | }; | ||
| 17 | |||
| 18 | struct blk_crypto_generate_key_arg { | ||
| 19 | 	/* Long-term wrapped key blob (output) */ | ||
| 20 | 	__u64 lt_key_ptr; | ||
| 21 | 	__u64 lt_key_size; | ||
| 22 | 	__u64 reserved[4]; | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct blk_crypto_prepare_key_arg { | ||
| 26 | 	/* Long-term wrapped key blob (input) */ | ||
| 27 | 	__u64 lt_key_ptr; | ||
| 28 | 	__u64 lt_key_size; | ||
| 29 | 	/* Ephemerally-wrapped key blob (output) */ | ||
| 30 | 	__u64 eph_key_ptr; | ||
| 31 | 	__u64 eph_key_size; | ||
| 32 | 	__u64 reserved[4]; | ||
| 33 | }; | ||
| 34 | |||
| 35 | /* | ||
| 36 | * These ioctls share the block device ioctl space; see uapi/linux/fs.h. | ||
| 37 | * 140-141 are reserved for future blk-crypto ioctls; any more than that would | ||
| 38 | * require an additional allocation from the block device ioctl space. | ||
| 39 | */ | ||
| 40 | #define BLKCRYPTOIMPORTKEY _IOWR(0x12, 137, struct blk_crypto_import_key_arg) | ||
| 41 | #define BLKCRYPTOGENERATEKEY _IOWR(0x12, 138, struct blk_crypto_generate_key_arg) | ||
| 42 | #define BLKCRYPTOPREPAREKEY _IOWR(0x12, 139, struct blk_crypto_prepare_key_arg) | ||
| 43 | |||
| 44 | #endif /* _LINUX_BLK_CRYPTO_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/blktrace_api.h+1-1| ... | @@ -49,7 +49,7 @@ enum blktrace_act { | ... | @@ -49,7 +49,7 @@ enum blktrace_act { |
| 49 | 	__BLK_TA_UNPLUG_TIMER,		/* queue was unplugged by timer */ | 49 | 	__BLK_TA_UNPLUG_TIMER,		/* queue was unplugged by timer */ |
| 50 | 	__BLK_TA_INSERT,		/* insert request */ | 50 | 	__BLK_TA_INSERT,		/* insert request */ |
| 51 | 	__BLK_TA_SPLIT,			/* bio was split */ | 51 | 	__BLK_TA_SPLIT,			/* bio was split */ |
| 52 | 	__BLK_TA_BOUNCE,		/* bio was bounced */ | 52 | 	__BLK_TA_BOUNCE,		/* unused, was: bio was bounced */ |
| 53 | 	__BLK_TA_REMAP,			/* bio was remapped */ | 53 | 	__BLK_TA_REMAP,			/* bio was remapped */ |
| 54 | 	__BLK_TA_ABORT,			/* request aborted */ | 54 | 	__BLK_TA_ABORT,			/* request aborted */ |
| 55 | 	__BLK_TA_DRV_DATA,		/* driver-specific binary data */ | 55 | 	__BLK_TA_DRV_DATA,		/* driver-specific binary data */ |
lib/libc/include/any-linux-any/linux/bpf.h+110-9| ... | @@ -51,6 +51,9 @@ | ... | @@ -51,6 +51,9 @@ |
| 51 | #define BPF_XCHG	(0xe0 | BPF_FETCH)	/* atomic exchange */ | 51 | #define BPF_XCHG	(0xe0 | BPF_FETCH)	/* atomic exchange */ |
| 52 | #define BPF_CMPXCHG	(0xf0 | BPF_FETCH)	/* atomic compare-and-write */ | 52 | #define BPF_CMPXCHG	(0xf0 | BPF_FETCH)	/* atomic compare-and-write */ |
| 53 | 53 | ||
| 54 | #define BPF_LOAD_ACQ	0x100	/* load-acquire */ | ||
| 55 | #define BPF_STORE_REL	0x110	/* store-release */ | ||
| 56 | |||
| 54 | enum bpf_cond_pseudo_jmp { | 57 | enum bpf_cond_pseudo_jmp { |
| 55 | 	BPF_MAY_GOTO = 0, | 58 | 	BPF_MAY_GOTO = 0, |
| 56 | }; | 59 | }; |
| ... | @@ -447,6 +450,7 @@ union bpf_iter_link_info { | ... | @@ -447,6 +450,7 @@ union bpf_iter_link_info { |
| 447 | *		* **struct bpf_map_info** | 450 | *		* **struct bpf_map_info** |
| 448 | *		* **struct bpf_btf_info** | 451 | *		* **struct bpf_btf_info** |
| 449 | *		* **struct bpf_link_info** | 452 | *		* **struct bpf_link_info** |
| 453 | *		* **struct bpf_token_info** | ||
| 450 | * | 454 | * |
| 451 | *	Return | 455 | *	Return |
| 452 | *		Returns zero on success. On error, -1 is returned and *errno* | 456 | *		Returns zero on success. On error, -1 is returned and *errno* |
| ... | @@ -903,6 +907,17 @@ union bpf_iter_link_info { | ... | @@ -903,6 +907,17 @@ union bpf_iter_link_info { |
| 903 | *		A new file descriptor (a nonnegative integer), or -1 if an | 907 | *		A new file descriptor (a nonnegative integer), or -1 if an |
| 904 | *		error occurred (in which case, *errno* is set appropriately). | 908 | *		error occurred (in which case, *errno* is set appropriately). |
| 905 | * | 909 | * |
| 910 | * BPF_PROG_STREAM_READ_BY_FD | ||
| 911 | *	Description | ||
| 912 | *		Read data of a program's BPF stream. The program is identified | ||
| 913 | *		by *prog_fd*, and the stream is identified by the *stream_id*. | ||
| 914 | *		The data is copied to a buffer pointed to by *stream_buf*, and | ||
| 915 | *		filled less than or equal to *stream_buf_len* bytes. | ||
| 916 | * | ||
| 917 | *	Return | ||
| 918 | *		Number of bytes read from the stream on success, or -1 if an | ||
| 919 | *		error occurred (in which case, *errno* is set appropriately). | ||
| 920 | * | ||
| 906 | * NOTES | 921 | * NOTES |
| 907 | *	eBPF objects (maps and programs) can be shared between processes. | 922 | *	eBPF objects (maps and programs) can be shared between processes. |
| 908 | * | 923 | * |
| ... | @@ -958,6 +973,7 @@ enum bpf_cmd { | ... | @@ -958,6 +973,7 @@ enum bpf_cmd { |
| 958 | 	BPF_LINK_DETACH, | 973 | 	BPF_LINK_DETACH, |
| 959 | 	BPF_PROG_BIND_MAP, | 974 | 	BPF_PROG_BIND_MAP, |
| 960 | 	BPF_TOKEN_CREATE, | 975 | 	BPF_TOKEN_CREATE, |
| 976 | 	BPF_PROG_STREAM_READ_BY_FD, | ||
| 961 | 	__MAX_BPF_CMD, | 977 | 	__MAX_BPF_CMD, |
| 962 | }; | 978 | }; |
| 963 | 979 | ||
| ... | @@ -1207,6 +1223,7 @@ enum bpf_perf_event_type { | ... | @@ -1207,6 +1223,7 @@ enum bpf_perf_event_type { |
| 1207 | #define BPF_F_BEFORE		(1U << 3) | 1223 | #define BPF_F_BEFORE		(1U << 3) |
| 1208 | #define BPF_F_AFTER		(1U << 4) | 1224 | #define BPF_F_AFTER		(1U << 4) |
| 1209 | #define BPF_F_ID		(1U << 5) | 1225 | #define BPF_F_ID		(1U << 5) |
| 1226 | #define BPF_F_PREORDER		(1U << 6) | ||
| 1210 | #define BPF_F_LINK		BPF_F_LINK /* 1 << 13 */ | 1227 | #define BPF_F_LINK		BPF_F_LINK /* 1 << 13 */ |
| 1211 | 1228 | ||
| 1212 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the | 1229 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the |
| ... | @@ -1459,6 +1476,11 @@ struct bpf_stack_build_id { | ... | @@ -1459,6 +1476,11 @@ struct bpf_stack_build_id { |
| 1459 | 1476 | ||
| 1460 | #define BPF_OBJ_NAME_LEN 16U | 1477 | #define BPF_OBJ_NAME_LEN 16U |
| 1461 | 1478 | ||
| 1479 | enum { | ||
| 1480 | 	BPF_STREAM_STDOUT = 1, | ||
| 1481 | 	BPF_STREAM_STDERR = 2, | ||
| 1482 | }; | ||
| 1483 | |||
| 1462 | union bpf_attr { | 1484 | union bpf_attr { |
| 1463 | 	struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 1485 | 	struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
| 1464 | 		__u32	map_type;	/* one of enum bpf_map_type */ | 1486 | 		__u32	map_type;	/* one of enum bpf_map_type */ |
| ... | @@ -1502,7 +1524,7 @@ union bpf_attr { | ... | @@ -1502,7 +1524,7 @@ union bpf_attr { |
| 1502 | 		__s32	map_token_fd; | 1524 | 		__s32	map_token_fd; |
| 1503 | 	}; | 1525 | 	}; |
| 1504 | 1526 | ||
| 1505 | 	struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 1527 | 	struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */ |
| 1506 | 		__u32		map_fd; | 1528 | 		__u32		map_fd; |
| 1507 | 		__aligned_u64	key; | 1529 | 		__aligned_u64	key; |
| 1508 | 		union { | 1530 | 		union { |
| ... | @@ -1573,6 +1595,16 @@ union bpf_attr { | ... | @@ -1573,6 +1595,16 @@ union bpf_attr { |
| 1573 | 		 * If provided, prog_flags should have BPF_F_TOKEN_FD flag set. | 1595 | 		 * If provided, prog_flags should have BPF_F_TOKEN_FD flag set. |
| 1574 | 		 */ | 1596 | 		 */ |
| 1575 | 		__s32		prog_token_fd; | 1597 | 		__s32		prog_token_fd; |
| 1598 | 		/* The fd_array_cnt can be used to pass the length of the | ||
| 1599 | 		 * fd_array array. In this case all the [map] file descriptors | ||
| 1600 | 		 * passed in this array will be bound to the program, even if | ||
| 1601 | 		 * the maps are not referenced directly. The functionality is | ||
| 1602 | 		 * similar to the BPF_PROG_BIND_MAP syscall, but maps can be | ||
| 1603 | 		 * used by the verifier during the program load. If provided, | ||
| 1604 | 		 * then the fd_array[0,...,fd_array_cnt-1] is expected to be | ||
| 1605 | 		 * continuous. | ||
| 1606 | 		 */ | ||
| 1607 | 		__u32		fd_array_cnt; | ||
| 1576 | 	}; | 1608 | 	}; |
| 1577 | 1609 | ||
| 1578 | 	struct { /* anonymous struct used by BPF_OBJ_* commands */ | 1610 | 	struct { /* anonymous struct used by BPF_OBJ_* commands */ |
| ... | @@ -1638,6 +1670,7 @@ union bpf_attr { | ... | @@ -1638,6 +1670,7 @@ union bpf_attr { |
| 1638 | 		}; | 1670 | 		}; |
| 1639 | 		__u32		next_id; | 1671 | 		__u32		next_id; |
| 1640 | 		__u32		open_flags; | 1672 | 		__u32		open_flags; |
| 1673 | 		__s32		fd_by_id_token_fd; | ||
| 1641 | 	}; | 1674 | 	}; |
| 1642 | 1675 | ||
| 1643 | 	struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ | 1676 | 	struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ |
| ... | @@ -1779,6 +1812,13 @@ union bpf_attr { | ... | @@ -1779,6 +1812,13 @@ union bpf_attr { |
| 1779 | 				}; | 1812 | 				}; |
| 1780 | 				__u64		expected_revision; | 1813 | 				__u64		expected_revision; |
| 1781 | 			} netkit; | 1814 | 			} netkit; |
| 1815 | 			struct { | ||
| 1816 | 				union { | ||
| 1817 | 					__u32	relative_fd; | ||
| 1818 | 					__u32	relative_id; | ||
| 1819 | 				}; | ||
| 1820 | 				__u64		expected_revision; | ||
| 1821 | 			} cgroup; | ||
| 1782 | 		}; | 1822 | 		}; |
| 1783 | 	} link_create; | 1823 | 	} link_create; |
| 1784 | 1824 | ||
| ... | @@ -1827,6 +1867,13 @@ union bpf_attr { | ... | @@ -1827,6 +1867,13 @@ union bpf_attr { |
| 1827 | 		__u32		bpffs_fd; | 1867 | 		__u32		bpffs_fd; |
| 1828 | 	} token_create; | 1868 | 	} token_create; |
| 1829 | 1869 | ||
| 1870 | 	struct { | ||
| 1871 | 		__aligned_u64	stream_buf; | ||
| 1872 | 		__u32		stream_buf_len; | ||
| 1873 | 		__u32		stream_id; | ||
| 1874 | 		__u32		prog_fd; | ||
| 1875 | 	} prog_stream_read; | ||
| 1876 | |||
| 1830 | } __attribute__((aligned(8))); | 1877 | } __attribute__((aligned(8))); |
| 1831 | 1878 | ||
| 1832 | /* The description below is an attempt at providing documentation to eBPF | 1879 | /* The description below is an attempt at providing documentation to eBPF |
| ... | @@ -1980,11 +2027,15 @@ union bpf_attr { | ... | @@ -1980,11 +2027,15 @@ union bpf_attr { |
| 1980 | * long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags) | 2027 | * long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags) |
| 1981 | * 	Description | 2028 | * 	Description |
| 1982 | * 		Store *len* bytes from address *from* into the packet | 2029 | * 		Store *len* bytes from address *from* into the packet |
| 1983 | * 		associated to *skb*, at *offset*. *flags* are a combination of | 2030 | * 		associated to *skb*, at *offset*. The *flags* are a combination |
| 1984 | * 		**BPF_F_RECOMPUTE_CSUM** (automatically recompute the | 2031 | * 		of the following values: |
| 1985 | * 		checksum for the packet after storing the bytes) and | 2032 | * |
| 1986 | * 		**BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ | 2033 | * 		**BPF_F_RECOMPUTE_CSUM** |
| 1987 | * 		**->swhash** and *skb*\ **->l4hash** to 0). | 2034 | * 			Automatically update *skb*\ **->csum** after storing the |
| 2035 | * 			bytes. | ||
| 2036 | * 		**BPF_F_INVALIDATE_HASH** | ||
| 2037 | * 			Set *skb*\ **->hash**, *skb*\ **->swhash** and *skb*\ | ||
| 2038 | * 			**->l4hash** to 0. | ||
| 1988 | * | 2039 | * |
| 1989 | * 		A call to this helper is susceptible to change the underlying | 2040 | * 		A call to this helper is susceptible to change the underlying |
| 1990 | * 		packet buffer. Therefore, at load time, all checks on pointers | 2041 | * 		packet buffer. Therefore, at load time, all checks on pointers |
| ... | @@ -2036,7 +2087,8 @@ union bpf_attr { | ... | @@ -2036,7 +2087,8 @@ union bpf_attr { |
| 2036 | * 		untouched (unless **BPF_F_MARK_ENFORCE** is added as well), and | 2087 | * 		untouched (unless **BPF_F_MARK_ENFORCE** is added as well), and |
| 2037 | * 		for updates resulting in a null checksum the value is set to | 2088 | * 		for updates resulting in a null checksum the value is set to |
| 2038 | * 		**CSUM_MANGLED_0** instead. Flag **BPF_F_PSEUDO_HDR** indicates | 2089 | * 		**CSUM_MANGLED_0** instead. Flag **BPF_F_PSEUDO_HDR** indicates |
| 2039 | * 		the checksum is to be computed against a pseudo-header. | 2090 | * 		that the modified header field is part of the pseudo-header. |
| 2091 | * 		Flag **BPF_F_IPV6** should be set for IPv6 packets. | ||
| 2040 | * | 2092 | * |
| 2041 | * 		This helper works in combination with **bpf_csum_diff**\ (), | 2093 | * 		This helper works in combination with **bpf_csum_diff**\ (), |
| 2042 | * 		which does not update the checksum in-place, but offers more | 2094 | * 		which does not update the checksum in-place, but offers more |
| ... | @@ -2383,7 +2435,7 @@ union bpf_attr { | ... | @@ -2383,7 +2435,7 @@ union bpf_attr { |
| 2383 | * 		into it. An example is available in file | 2435 | * 		into it. An example is available in file |
| 2384 | * 		*samples/bpf/trace_output_user.c* in the Linux kernel source | 2436 | * 		*samples/bpf/trace_output_user.c* in the Linux kernel source |
| 2385 | * 		tree (the eBPF program counterpart is in | 2437 | * 		tree (the eBPF program counterpart is in |
| 2386 | * 		*samples/bpf/trace_output_kern.c*). | 2438 | *		*samples/bpf/trace_output.bpf.c*). |
| 2387 | * | 2439 | * |
| 2388 | * 		**bpf_perf_event_output**\ () achieves better performance | 2440 | * 		**bpf_perf_event_output**\ () achieves better performance |
| 2389 | * 		than **bpf_trace_printk**\ () for sharing data with user | 2441 | * 		than **bpf_trace_printk**\ () for sharing data with user |
| ... | @@ -4953,6 +5005,9 @@ union bpf_attr { | ... | @@ -4953,6 +5005,9 @@ union bpf_attr { |
| 4953 | * 		the netns switch takes place from ingress to ingress without | 5005 | * 		the netns switch takes place from ingress to ingress without |
| 4954 | * 		going through the CPU's backlog queue. | 5006 | * 		going through the CPU's backlog queue. |
| 4955 | * | 5007 | * |
| 5008 | * 		*skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during | ||
| 5009 | * 		the netns switch. | ||
| 5010 | * | ||
| 4956 | * 		The *flags* argument is reserved and must be 0. The helper is | 5011 | * 		The *flags* argument is reserved and must be 0. The helper is |
| 4957 | * 		currently only supported for tc BPF program types at the | 5012 | * 		currently only supported for tc BPF program types at the |
| 4958 | * 		ingress hook and for veth and netkit target device types. The | 5013 | * 		ingress hook and for veth and netkit target device types. The |
| ... | @@ -6009,7 +6064,10 @@ union bpf_attr { | ... | @@ -6009,7 +6064,10 @@ union bpf_attr { |
| 6009 | 	FN(user_ringbuf_drain, 209, ##ctx)		\ | 6064 | 	FN(user_ringbuf_drain, 209, ##ctx)		\ |
| 6010 | 	FN(cgrp_storage_get, 210, ##ctx)		\ | 6065 | 	FN(cgrp_storage_get, 210, ##ctx)		\ |
| 6011 | 	FN(cgrp_storage_delete, 211, ##ctx)		\ | 6066 | 	FN(cgrp_storage_delete, 211, ##ctx)		\ |
| 6012 | 	/* */ | 6067 | 	/* This helper list is effectively frozen. If you are trying to	\ |
| 6068 | 	 * add a new helper, you should add a kfunc instead which has	\ | ||
| 6069 | 	 * less stability guarantees. See Documentation/bpf/kfuncs.rst	\ | ||
| 6070 | 	 */ | ||
| 6013 | 6071 | ||
| 6014 | /* backwards-compatibility macros for users of __BPF_FUNC_MAPPER that don't | 6072 | /* backwards-compatibility macros for users of __BPF_FUNC_MAPPER that don't |
| 6015 | * know or care about integer value that is now passed as second argument | 6073 | * know or care about integer value that is now passed as second argument |
| ... | @@ -6047,6 +6105,7 @@ enum { | ... | @@ -6047,6 +6105,7 @@ enum { |
| 6047 | 	BPF_F_PSEUDO_HDR		= (1ULL << 4), | 6105 | 	BPF_F_PSEUDO_HDR		= (1ULL << 4), |
| 6048 | 	BPF_F_MARK_MANGLED_0		= (1ULL << 5), | 6106 | 	BPF_F_MARK_MANGLED_0		= (1ULL << 5), |
| 6049 | 	BPF_F_MARK_ENFORCE		= (1ULL << 6), | 6107 | 	BPF_F_MARK_ENFORCE		= (1ULL << 6), |
| 6108 | 	BPF_F_IPV6			= (1ULL << 7), | ||
| 6050 | }; | 6109 | }; |
| 6051 | 6110 | ||
| 6052 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ | 6111 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ |
| ... | @@ -6626,11 +6685,15 @@ struct bpf_link_info { | ... | @@ -6626,11 +6685,15 @@ struct bpf_link_info { |
| 6626 | 		struct { | 6685 | 		struct { |
| 6627 | 			__aligned_u64 tp_name; /* in/out: tp_name buffer ptr */ | 6686 | 			__aligned_u64 tp_name; /* in/out: tp_name buffer ptr */ |
| 6628 | 			__u32 tp_name_len; /* in/out: tp_name buffer len */ | 6687 | 			__u32 tp_name_len; /* in/out: tp_name buffer len */ |
| 6688 | 			__u32 :32; | ||
| 6689 | 			__u64 cookie; | ||
| 6629 | 		} raw_tracepoint; | 6690 | 		} raw_tracepoint; |
| 6630 | 		struct { | 6691 | 		struct { |
| 6631 | 			__u32 attach_type; | 6692 | 			__u32 attach_type; |
| 6632 | 			__u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */ | 6693 | 			__u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */ |
| 6633 | 			__u32 target_btf_id; /* BTF type id inside the object */ | 6694 | 			__u32 target_btf_id; /* BTF type id inside the object */ |
| 6695 | 			__u32 :32; | ||
| 6696 | 			__u64 cookie; | ||
| 6634 | 		} tracing; | 6697 | 		} tracing; |
| 6635 | 		struct { | 6698 | 		struct { |
| 6636 | 			__u64 cgroup_id; | 6699 | 			__u64 cgroup_id; |
| ... | @@ -6702,6 +6765,7 @@ struct bpf_link_info { | ... | @@ -6702,6 +6765,7 @@ struct bpf_link_info { |
| 6702 | 					__u32 name_len; | 6765 | 					__u32 name_len; |
| 6703 | 					__u32 offset; /* offset from file_name */ | 6766 | 					__u32 offset; /* offset from file_name */ |
| 6704 | 					__u64 cookie; | 6767 | 					__u64 cookie; |
| 6768 | 					__u64 ref_ctr_offset; | ||
| 6705 | 				} uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ | 6769 | 				} uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ |
| 6706 | 				struct { | 6770 | 				struct { |
| 6707 | 					__aligned_u64 func_name; /* in/out */ | 6771 | 					__aligned_u64 func_name; /* in/out */ |
| ... | @@ -6740,6 +6804,13 @@ struct bpf_link_info { | ... | @@ -6740,6 +6804,13 @@ struct bpf_link_info { |
| 6740 | 	}; | 6804 | 	}; |
| 6741 | } __attribute__((aligned(8))); | 6805 | } __attribute__((aligned(8))); |
| 6742 | 6806 | ||
| 6807 | struct bpf_token_info { | ||
| 6808 | 	__u64 allowed_cmds; | ||
| 6809 | 	__u64 allowed_maps; | ||
| 6810 | 	__u64 allowed_progs; | ||
| 6811 | 	__u64 allowed_attachs; | ||
| 6812 | } __attribute__((aligned(8))); | ||
| 6813 | |||
| 6743 | /* User bpf_sock_addr struct to access socket fields and sockaddr struct passed | 6814 | /* User bpf_sock_addr struct to access socket fields and sockaddr struct passed |
| 6744 | * by user and intended to be used by socket (e.g. to bind to, depends on | 6815 | * by user and intended to be used by socket (e.g. to bind to, depends on |
| 6745 | * attach type). | 6816 | * attach type). |
| ... | @@ -6903,6 +6974,12 @@ enum { | ... | @@ -6903,6 +6974,12 @@ enum { |
| 6903 | 	BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F, | 6974 | 	BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F, |
| 6904 | }; | 6975 | }; |
| 6905 | 6976 | ||
| 6977 | enum { | ||
| 6978 | 	SK_BPF_CB_TX_TIMESTAMPING	= 1<<0, | ||
| 6979 | 	SK_BPF_CB_MASK			= (SK_BPF_CB_TX_TIMESTAMPING - 1) | | ||
| 6980 | 					 SK_BPF_CB_TX_TIMESTAMPING | ||
| 6981 | }; | ||
| 6982 | |||
| 6906 | /* List of known BPF sock_ops operators. | 6983 | /* List of known BPF sock_ops operators. |
| 6907 | * New entries can only be added at the end | 6984 | * New entries can only be added at the end |
| 6908 | */ | 6985 | */ |
| ... | @@ -7015,6 +7092,29 @@ enum { | ... | @@ -7015,6 +7092,29 @@ enum { |
| 7015 | 					 * by the kernel or the | 7092 | 					 * by the kernel or the |
| 7016 | 					 * earlier bpf-progs. | 7093 | 					 * earlier bpf-progs. |
| 7017 | 					 */ | 7094 | 					 */ |
| 7095 | 	BPF_SOCK_OPS_TSTAMP_SCHED_CB,	/* Called when skb is passing | ||
| 7096 | 					 * through dev layer when | ||
| 7097 | 					 * SK_BPF_CB_TX_TIMESTAMPING | ||
| 7098 | 					 * feature is on. | ||
| 7099 | 					 */ | ||
| 7100 | 	BPF_SOCK_OPS_TSTAMP_SND_SW_CB,	/* Called when skb is about to send | ||
| 7101 | 					 * to the nic when SK_BPF_CB_TX_TIMESTAMPING | ||
| 7102 | 					 * feature is on. | ||
| 7103 | 					 */ | ||
| 7104 | 	BPF_SOCK_OPS_TSTAMP_SND_HW_CB,	/* Called in hardware phase when | ||
| 7105 | 					 * SK_BPF_CB_TX_TIMESTAMPING feature | ||
| 7106 | 					 * is on. | ||
| 7107 | 					 */ | ||
| 7108 | 	BPF_SOCK_OPS_TSTAMP_ACK_CB,	/* Called when all the skbs in the | ||
| 7109 | 					 * same sendmsg call are acked | ||
| 7110 | 					 * when SK_BPF_CB_TX_TIMESTAMPING | ||
| 7111 | 					 * feature is on. | ||
| 7112 | 					 */ | ||
| 7113 | 	BPF_SOCK_OPS_TSTAMP_SENDMSG_CB,	/* Called when every sendmsg syscall | ||
| 7114 | 					 * is triggered. It's used to correlate | ||
| 7115 | 					 * sendmsg timestamp with corresponding | ||
| 7116 | 					 * tskey. | ||
| 7117 | 					 */ | ||
| 7018 | }; | 7118 | }; |
| 7019 | 7119 | ||
| 7020 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect | 7120 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect |
| ... | @@ -7081,6 +7181,7 @@ enum { | ... | @@ -7081,6 +7181,7 @@ enum { |
| 7081 | 	TCP_BPF_SYN_IP		= 1006, /* Copy the IP[46] and TCP header */ | 7181 | 	TCP_BPF_SYN_IP		= 1006, /* Copy the IP[46] and TCP header */ |
| 7082 | 	TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */ | 7182 | 	TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */ |
| 7083 | 	TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */ | 7183 | 	TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */ |
| 7184 | 	SK_BPF_CB_FLAGS		= 1009, /* Get or set sock ops flags in socket */ | ||
| 7084 | }; | 7185 | }; |
| 7085 | 7186 | ||
| 7086 | enum { | 7187 | enum { |
lib/libc/include/any-linux-any/linux/btf.h+2-1| ... | @@ -36,7 +36,8 @@ struct btf_type { | ... | @@ -36,7 +36,8 @@ struct btf_type { |
| 36 | 	 * bits 24-28: kind (e.g. int, ptr, array...etc) | 36 | 	 * bits 24-28: kind (e.g. int, ptr, array...etc) |
| 37 | 	 * bits 29-30: unused | 37 | 	 * bits 29-30: unused |
| 38 | 	 * bit 31: kind_flag, currently used by | 38 | 	 * bit 31: kind_flag, currently used by |
| 39 | 	 * struct, union, enum, fwd and enum64 | 39 | 	 * struct, union, enum, fwd, enum64, |
| 40 | 	 * decl_tag and type_tag | ||
| 40 | 	 */ | 41 | 	 */ |
| 41 | 	__u32 info; | 42 | 	__u32 info; |
| 42 | 	/* "size" is used by INT, ENUM, STRUCT, UNION, DATASEC and ENUM64. | 43 | 	/* "size" is used by INT, ENUM, STRUCT, UNION, DATASEC and ENUM64. |
lib/libc/include/any-linux-any/linux/btrfs.h+16-3| ... | @@ -613,7 +613,12 @@ struct btrfs_ioctl_clone_range_args { | ... | @@ -613,7 +613,12 @@ struct btrfs_ioctl_clone_range_args { |
| 613 | */ | 613 | */ |
| 614 | #define BTRFS_DEFRAG_RANGE_COMPRESS 1 | 614 | #define BTRFS_DEFRAG_RANGE_COMPRESS 1 |
| 615 | #define BTRFS_DEFRAG_RANGE_START_IO 2 | 615 | #define BTRFS_DEFRAG_RANGE_START_IO 2 |
| 616 | #define BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL 4 | ||
| 617 | /* Request no compression on the range (uncompress if necessary). */ | ||
| 618 | #define BTRFS_DEFRAG_RANGE_NOCOMPRESS	8 | ||
| 616 | #define BTRFS_DEFRAG_RANGE_FLAGS_SUPP	(BTRFS_DEFRAG_RANGE_COMPRESS |		\ | 619 | #define BTRFS_DEFRAG_RANGE_FLAGS_SUPP	(BTRFS_DEFRAG_RANGE_COMPRESS |		\ |
| 620 | 					 BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL |	\ | ||
| 621 | 					 BTRFS_DEFRAG_RANGE_NOCOMPRESS |	\ | ||
| 617 | 					 BTRFS_DEFRAG_RANGE_START_IO) | 622 | 					 BTRFS_DEFRAG_RANGE_START_IO) |
| 618 | 623 | ||
| 619 | struct btrfs_ioctl_defrag_range_args { | 624 | struct btrfs_ioctl_defrag_range_args { |
| ... | @@ -638,10 +643,18 @@ struct btrfs_ioctl_defrag_range_args { | ... | @@ -638,10 +643,18 @@ struct btrfs_ioctl_defrag_range_args { |
| 638 | 643 | ||
| 639 | 	/* | 644 | 	/* |
| 640 | 	 * which compression method to use if turning on compression | 645 | 	 * which compression method to use if turning on compression |
| 641 | 	 * for this defrag operation. If unspecified, zlib will | 646 | 	 * for this defrag operation. If unspecified, zlib will be |
| 642 | 	 * be used | 647 | 	 * used. If compression level is also being specified, set the |
| 648 | 	 * BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL flag and fill the compress | ||
| 649 | 	 * member structure instead of the compress_type field. | ||
| 643 | 	 */ | 650 | 	 */ |
| 644 | 	__u32 compress_type; | 651 | 	union { |
| 652 | 		__u32 compress_type; | ||
| 653 | 		struct { | ||
| 654 | 			__u8 type; | ||
| 655 | 			__s8 level; | ||
| 656 | 		} compress; | ||
| 657 | 	}; | ||
| 645 | 658 | ||
| 646 | 	/* spare for later */ | 659 | 	/* spare for later */ |
| 647 | 	__u32 unused[4]; | 660 | 	__u32 unused[4]; |
lib/libc/include/any-linux-any/linux/can.h+2-1| ... | @@ -182,7 +182,7 @@ struct canfd_frame { | ... | @@ -182,7 +182,7 @@ struct canfd_frame { |
| 182 | /* | 182 | /* |
| 183 | * defined bits for canxl_frame.flags | 183 | * defined bits for canxl_frame.flags |
| 184 | * | 184 | * |
| 185 | * The canxl_frame.flags element contains two bits CANXL_XLF and CANXL_SEC | 185 | * The canxl_frame.flags element contains three bits CANXL_[XLF|SEC|RRS] |
| 186 | * and shares the relative position of the struct can[fd]_frame.len element. | 186 | * and shares the relative position of the struct can[fd]_frame.len element. |
| 187 | * The CANXL_XLF bit ALWAYS needs to be set to indicate a valid CAN XL frame. | 187 | * The CANXL_XLF bit ALWAYS needs to be set to indicate a valid CAN XL frame. |
| 188 | * As a side effect setting this bit intentionally breaks the length checks | 188 | * As a side effect setting this bit intentionally breaks the length checks |
| ... | @@ -192,6 +192,7 @@ struct canfd_frame { | ... | @@ -192,6 +192,7 @@ struct canfd_frame { |
| 192 | */ | 192 | */ |
| 193 | #define CANXL_XLF 0x80 /* mandatory CAN XL frame flag (must always be set!) */ | 193 | #define CANXL_XLF 0x80 /* mandatory CAN XL frame flag (must always be set!) */ |
| 194 | #define CANXL_SEC 0x01 /* Simple Extended Content (security/segmentation) */ | 194 | #define CANXL_SEC 0x01 /* Simple Extended Content (security/segmentation) */ |
| 195 | #define CANXL_RRS 0x02 /* Remote Request Substitution */ | ||
| 195 | 196 | ||
| 196 | /* the 8-bit VCID is optionally placed in the canxl_frame.prio element */ | 197 | /* the 8-bit VCID is optionally placed in the canxl_frame.prio element */ |
| 197 | #define CANXL_VCID_OFFSET 16 /* bit offset of VCID in prio element */ | 198 | #define CANXL_VCID_OFFSET 16 /* bit offset of VCID in prio element */ |
lib/libc/include/any-linux-any/linux/capability.h+4-2| ... | @@ -6,9 +6,10 @@ | ... | @@ -6,9 +6,10 @@ |
| 6 | * Alexander Kjeldaas <astor@guardian.no> | 6 | * Alexander Kjeldaas <astor@guardian.no> |
| 7 | * with help from Aleph1, Roland Buresund and Andrew Main. | 7 | * with help from Aleph1, Roland Buresund and Andrew Main. |
| 8 | * | 8 | * |
| 9 | * See here for the libcap library ("POSIX draft" compliance): | 9 | * See here for the libcap2 library (compliant with Section 25 of |
| 10 | * the withdrawn POSIX 1003.1e Draft 17): | ||
| 10 | * | 11 | * |
| 11 | * ftp://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ | 12 | * https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/ |
| 12 | */ | 13 | */ |
| 13 | 14 | ||
| 14 | #ifndef _LINUX_CAPABILITY_H | 15 | #ifndef _LINUX_CAPABILITY_H |
| ... | @@ -273,6 +274,7 @@ struct vfs_ns_cap_data { | ... | @@ -273,6 +274,7 @@ struct vfs_ns_cap_data { |
| 273 | /* Allow setting encryption key on loopback filesystem */ | 274 | /* Allow setting encryption key on loopback filesystem */ |
| 274 | /* Allow setting zone reclaim policy */ | 275 | /* Allow setting zone reclaim policy */ |
| 275 | /* Allow everything under CAP_BPF and CAP_PERFMON for backward compatibility */ | 276 | /* Allow everything under CAP_BPF and CAP_PERFMON for backward compatibility */ |
| 277 | /* Allow setting hardware protection emergency action */ | ||
| 276 | 278 | ||
| 277 | #define CAP_SYS_ADMIN 21 | 279 | #define CAP_SYS_ADMIN 21 |
| 278 | 280 |
lib/libc/include/any-linux-any/linux/cec-funcs.h+20-20| ... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
| 14 | static __inline__ void cec_msg_active_source(struct cec_msg *msg, __u16 phys_addr) | 14 | static __inline__ void cec_msg_active_source(struct cec_msg *msg, __u16 phys_addr) |
| 15 | { | 15 | { |
| 16 | 	msg->len = 4; | 16 | 	msg->len = 4; |
| 17 | 	msg->msg[0] |= 0xf; /* broadcast */ | 17 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 18 | 	msg->msg[1] = CEC_MSG_ACTIVE_SOURCE; | 18 | 	msg->msg[1] = CEC_MSG_ACTIVE_SOURCE; |
| 19 | 	msg->msg[2] = phys_addr >> 8; | 19 | 	msg->msg[2] = phys_addr >> 8; |
| 20 | 	msg->msg[3] = phys_addr & 0xff; | 20 | 	msg->msg[3] = phys_addr & 0xff; |
| ... | @@ -59,7 +59,7 @@ static __inline__ void cec_msg_request_active_source(struct cec_msg *msg, | ... | @@ -59,7 +59,7 @@ static __inline__ void cec_msg_request_active_source(struct cec_msg *msg, |
| 59 | 						 int reply) | 59 | 						 int reply) |
| 60 | { | 60 | { |
| 61 | 	msg->len = 2; | 61 | 	msg->len = 2; |
| 62 | 	msg->msg[0] |= 0xf; /* broadcast */ | 62 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 63 | 	msg->msg[1] = CEC_MSG_REQUEST_ACTIVE_SOURCE; | 63 | 	msg->msg[1] = CEC_MSG_REQUEST_ACTIVE_SOURCE; |
| 64 | 	msg->reply = reply ? CEC_MSG_ACTIVE_SOURCE : 0; | 64 | 	msg->reply = reply ? CEC_MSG_ACTIVE_SOURCE : 0; |
| 65 | } | 65 | } |
| ... | @@ -68,7 +68,7 @@ static __inline__ void cec_msg_routing_information(struct cec_msg *msg, | ... | @@ -68,7 +68,7 @@ static __inline__ void cec_msg_routing_information(struct cec_msg *msg, |
| 68 | 					 __u16 phys_addr) | 68 | 					 __u16 phys_addr) |
| 69 | { | 69 | { |
| 70 | 	msg->len = 4; | 70 | 	msg->len = 4; |
| 71 | 	msg->msg[0] |= 0xf; /* broadcast */ | 71 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 72 | 	msg->msg[1] = CEC_MSG_ROUTING_INFORMATION; | 72 | 	msg->msg[1] = CEC_MSG_ROUTING_INFORMATION; |
| 73 | 	msg->msg[2] = phys_addr >> 8; | 73 | 	msg->msg[2] = phys_addr >> 8; |
| 74 | 	msg->msg[3] = phys_addr & 0xff; | 74 | 	msg->msg[3] = phys_addr & 0xff; |
| ... | @@ -86,7 +86,7 @@ static __inline__ void cec_msg_routing_change(struct cec_msg *msg, | ... | @@ -86,7 +86,7 @@ static __inline__ void cec_msg_routing_change(struct cec_msg *msg, |
| 86 | 					 __u16 new_phys_addr) | 86 | 					 __u16 new_phys_addr) |
| 87 | { | 87 | { |
| 88 | 	msg->len = 6; | 88 | 	msg->len = 6; |
| 89 | 	msg->msg[0] |= 0xf; /* broadcast */ | 89 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 90 | 	msg->msg[1] = CEC_MSG_ROUTING_CHANGE; | 90 | 	msg->msg[1] = CEC_MSG_ROUTING_CHANGE; |
| 91 | 	msg->msg[2] = orig_phys_addr >> 8; | 91 | 	msg->msg[2] = orig_phys_addr >> 8; |
| 92 | 	msg->msg[3] = orig_phys_addr & 0xff; | 92 | 	msg->msg[3] = orig_phys_addr & 0xff; |
| ... | @@ -106,7 +106,7 @@ static __inline__ void cec_ops_routing_change(const struct cec_msg *msg, | ... | @@ -106,7 +106,7 @@ static __inline__ void cec_ops_routing_change(const struct cec_msg *msg, |
| 106 | static __inline__ void cec_msg_set_stream_path(struct cec_msg *msg, __u16 phys_addr) | 106 | static __inline__ void cec_msg_set_stream_path(struct cec_msg *msg, __u16 phys_addr) |
| 107 | { | 107 | { |
| 108 | 	msg->len = 4; | 108 | 	msg->len = 4; |
| 109 | 	msg->msg[0] |= 0xf; /* broadcast */ | 109 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 110 | 	msg->msg[1] = CEC_MSG_SET_STREAM_PATH; | 110 | 	msg->msg[1] = CEC_MSG_SET_STREAM_PATH; |
| 111 | 	msg->msg[2] = phys_addr >> 8; | 111 | 	msg->msg[2] = phys_addr >> 8; |
| 112 | 	msg->msg[3] = phys_addr & 0xff; | 112 | 	msg->msg[3] = phys_addr & 0xff; |
| ... | @@ -791,7 +791,7 @@ static __inline__ void cec_msg_report_physical_addr(struct cec_msg *msg, | ... | @@ -791,7 +791,7 @@ static __inline__ void cec_msg_report_physical_addr(struct cec_msg *msg, |
| 791 | 					__u16 phys_addr, __u8 prim_devtype) | 791 | 					__u16 phys_addr, __u8 prim_devtype) |
| 792 | { | 792 | { |
| 793 | 	msg->len = 5; | 793 | 	msg->len = 5; |
| 794 | 	msg->msg[0] |= 0xf; /* broadcast */ | 794 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 795 | 	msg->msg[1] = CEC_MSG_REPORT_PHYSICAL_ADDR; | 795 | 	msg->msg[1] = CEC_MSG_REPORT_PHYSICAL_ADDR; |
| 796 | 	msg->msg[2] = phys_addr >> 8; | 796 | 	msg->msg[2] = phys_addr >> 8; |
| 797 | 	msg->msg[3] = phys_addr & 0xff; | 797 | 	msg->msg[3] = phys_addr & 0xff; |
| ... | @@ -817,7 +817,7 @@ static __inline__ void cec_msg_set_menu_language(struct cec_msg *msg, | ... | @@ -817,7 +817,7 @@ static __inline__ void cec_msg_set_menu_language(struct cec_msg *msg, |
| 817 | 					 const char *language) | 817 | 					 const char *language) |
| 818 | { | 818 | { |
| 819 | 	msg->len = 5; | 819 | 	msg->len = 5; |
| 820 | 	msg->msg[0] |= 0xf; /* broadcast */ | 820 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 821 | 	msg->msg[1] = CEC_MSG_SET_MENU_LANGUAGE; | 821 | 	msg->msg[1] = CEC_MSG_SET_MENU_LANGUAGE; |
| 822 | 	memcpy(msg->msg + 2, language, 3); | 822 | 	memcpy(msg->msg + 2, language, 3); |
| 823 | } | 823 | } |
| ... | @@ -850,7 +850,7 @@ static __inline__ void cec_msg_report_features(struct cec_msg *msg, | ... | @@ -850,7 +850,7 @@ static __inline__ void cec_msg_report_features(struct cec_msg *msg, |
| 850 | 				__u8 rc_profile, __u8 dev_features) | 850 | 				__u8 rc_profile, __u8 dev_features) |
| 851 | { | 851 | { |
| 852 | 	msg->len = 6; | 852 | 	msg->len = 6; |
| 853 | 	msg->msg[0] |= 0xf; /* broadcast */ | 853 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 854 | 	msg->msg[1] = CEC_MSG_REPORT_FEATURES; | 854 | 	msg->msg[1] = CEC_MSG_REPORT_FEATURES; |
| 855 | 	msg->msg[2] = cec_version; | 855 | 	msg->msg[2] = cec_version; |
| 856 | 	msg->msg[3] = all_device_types; | 856 | 	msg->msg[3] = all_device_types; |
| ... | @@ -1092,7 +1092,7 @@ static __inline__ void cec_msg_tuner_step_increment(struct cec_msg *msg) | ... | @@ -1092,7 +1092,7 @@ static __inline__ void cec_msg_tuner_step_increment(struct cec_msg *msg) |
| 1092 | static __inline__ void cec_msg_device_vendor_id(struct cec_msg *msg, __u32 vendor_id) | 1092 | static __inline__ void cec_msg_device_vendor_id(struct cec_msg *msg, __u32 vendor_id) |
| 1093 | { | 1093 | { |
| 1094 | 	msg->len = 5; | 1094 | 	msg->len = 5; |
| 1095 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1095 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1096 | 	msg->msg[1] = CEC_MSG_DEVICE_VENDOR_ID; | 1096 | 	msg->msg[1] = CEC_MSG_DEVICE_VENDOR_ID; |
| 1097 | 	msg->msg[2] = vendor_id >> 16; | 1097 | 	msg->msg[2] = vendor_id >> 16; |
| 1098 | 	msg->msg[3] = (vendor_id >> 8) & 0xff; | 1098 | 	msg->msg[3] = (vendor_id >> 8) & 0xff; |
| ... | @@ -1655,7 +1655,7 @@ static __inline__ void cec_msg_report_current_latency(struct cec_msg *msg, | ... | @@ -1655,7 +1655,7 @@ static __inline__ void cec_msg_report_current_latency(struct cec_msg *msg, |
| 1655 | 						 __u8 audio_out_delay) | 1655 | 						 __u8 audio_out_delay) |
| 1656 | { | 1656 | { |
| 1657 | 	msg->len = 6; | 1657 | 	msg->len = 6; |
| 1658 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1658 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1659 | 	msg->msg[1] = CEC_MSG_REPORT_CURRENT_LATENCY; | 1659 | 	msg->msg[1] = CEC_MSG_REPORT_CURRENT_LATENCY; |
| 1660 | 	msg->msg[2] = phys_addr >> 8; | 1660 | 	msg->msg[2] = phys_addr >> 8; |
| 1661 | 	msg->msg[3] = phys_addr & 0xff; | 1661 | 	msg->msg[3] = phys_addr & 0xff; |
| ... | @@ -1687,7 +1687,7 @@ static __inline__ void cec_msg_request_current_latency(struct cec_msg *msg, | ... | @@ -1687,7 +1687,7 @@ static __inline__ void cec_msg_request_current_latency(struct cec_msg *msg, |
| 1687 | 						 __u16 phys_addr) | 1687 | 						 __u16 phys_addr) |
| 1688 | { | 1688 | { |
| 1689 | 	msg->len = 4; | 1689 | 	msg->len = 4; |
| 1690 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1690 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1691 | 	msg->msg[1] = CEC_MSG_REQUEST_CURRENT_LATENCY; | 1691 | 	msg->msg[1] = CEC_MSG_REQUEST_CURRENT_LATENCY; |
| 1692 | 	msg->msg[2] = phys_addr >> 8; | 1692 | 	msg->msg[2] = phys_addr >> 8; |
| 1693 | 	msg->msg[3] = phys_addr & 0xff; | 1693 | 	msg->msg[3] = phys_addr & 0xff; |
| ... | @@ -1707,7 +1707,7 @@ static __inline__ void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg, | ... | @@ -1707,7 +1707,7 @@ static __inline__ void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg, |
| 1707 | 						 __u16 phys_addr2) | 1707 | 						 __u16 phys_addr2) |
| 1708 | { | 1708 | { |
| 1709 | 	msg->len = 9; | 1709 | 	msg->len = 9; |
| 1710 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1710 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1711 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1711 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1712 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1712 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1713 | 	msg->msg[4] = CEC_MSG_CDC_HEC_INQUIRE_STATE; | 1713 | 	msg->msg[4] = CEC_MSG_CDC_HEC_INQUIRE_STATE; |
| ... | @@ -1737,7 +1737,7 @@ static __inline__ void cec_msg_cdc_hec_report_state(struct cec_msg *msg, | ... | @@ -1737,7 +1737,7 @@ static __inline__ void cec_msg_cdc_hec_report_state(struct cec_msg *msg, |
| 1737 | 						__u16 hec_field) | 1737 | 						__u16 hec_field) |
| 1738 | { | 1738 | { |
| 1739 | 	msg->len = has_field ? 10 : 8; | 1739 | 	msg->len = has_field ? 10 : 8; |
| 1740 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1740 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1741 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1741 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1742 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1742 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1743 | 	msg->msg[4] = CEC_MSG_CDC_HEC_REPORT_STATE; | 1743 | 	msg->msg[4] = CEC_MSG_CDC_HEC_REPORT_STATE; |
| ... | @@ -1782,7 +1782,7 @@ static __inline__ void cec_msg_cdc_hec_set_state(struct cec_msg *msg, | ... | @@ -1782,7 +1782,7 @@ static __inline__ void cec_msg_cdc_hec_set_state(struct cec_msg *msg, |
| 1782 | 					 __u16 phys_addr5) | 1782 | 					 __u16 phys_addr5) |
| 1783 | { | 1783 | { |
| 1784 | 	msg->len = 10; | 1784 | 	msg->len = 10; |
| 1785 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1785 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1786 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1786 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1787 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1787 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1788 | 	msg->msg[4] = CEC_MSG_CDC_HEC_INQUIRE_STATE; | 1788 | 	msg->msg[4] = CEC_MSG_CDC_HEC_INQUIRE_STATE; |
| ... | @@ -1832,7 +1832,7 @@ static __inline__ void cec_msg_cdc_hec_set_state_adjacent(struct cec_msg *msg, | ... | @@ -1832,7 +1832,7 @@ static __inline__ void cec_msg_cdc_hec_set_state_adjacent(struct cec_msg *msg, |
| 1832 | 						 __u8 hec_set_state) | 1832 | 						 __u8 hec_set_state) |
| 1833 | { | 1833 | { |
| 1834 | 	msg->len = 8; | 1834 | 	msg->len = 8; |
| 1835 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1835 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1836 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1836 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1837 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1837 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1838 | 	msg->msg[4] = CEC_MSG_CDC_HEC_SET_STATE_ADJACENT; | 1838 | 	msg->msg[4] = CEC_MSG_CDC_HEC_SET_STATE_ADJACENT; |
| ... | @@ -1857,7 +1857,7 @@ static __inline__ void cec_msg_cdc_hec_request_deactivation(struct cec_msg *msg, | ... | @@ -1857,7 +1857,7 @@ static __inline__ void cec_msg_cdc_hec_request_deactivation(struct cec_msg *msg, |
| 1857 | 							__u16 phys_addr3) | 1857 | 							__u16 phys_addr3) |
| 1858 | { | 1858 | { |
| 1859 | 	msg->len = 11; | 1859 | 	msg->len = 11; |
| 1860 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1860 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1861 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1861 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1862 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1862 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1863 | 	msg->msg[4] = CEC_MSG_CDC_HEC_REQUEST_DEACTIVATION; | 1863 | 	msg->msg[4] = CEC_MSG_CDC_HEC_REQUEST_DEACTIVATION; |
| ... | @@ -1884,7 +1884,7 @@ static __inline__ void cec_ops_cdc_hec_request_deactivation(const struct cec_msg | ... | @@ -1884,7 +1884,7 @@ static __inline__ void cec_ops_cdc_hec_request_deactivation(const struct cec_msg |
| 1884 | static __inline__ void cec_msg_cdc_hec_notify_alive(struct cec_msg *msg) | 1884 | static __inline__ void cec_msg_cdc_hec_notify_alive(struct cec_msg *msg) |
| 1885 | { | 1885 | { |
| 1886 | 	msg->len = 5; | 1886 | 	msg->len = 5; |
| 1887 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1887 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1888 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1888 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1889 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1889 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1890 | 	msg->msg[4] = CEC_MSG_CDC_HEC_NOTIFY_ALIVE; | 1890 | 	msg->msg[4] = CEC_MSG_CDC_HEC_NOTIFY_ALIVE; |
| ... | @@ -1899,7 +1899,7 @@ static __inline__ void cec_ops_cdc_hec_notify_alive(const struct cec_msg *msg, | ... | @@ -1899,7 +1899,7 @@ static __inline__ void cec_ops_cdc_hec_notify_alive(const struct cec_msg *msg, |
| 1899 | static __inline__ void cec_msg_cdc_hec_discover(struct cec_msg *msg) | 1899 | static __inline__ void cec_msg_cdc_hec_discover(struct cec_msg *msg) |
| 1900 | { | 1900 | { |
| 1901 | 	msg->len = 5; | 1901 | 	msg->len = 5; |
| 1902 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1902 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1903 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1903 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1904 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1904 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1905 | 	msg->msg[4] = CEC_MSG_CDC_HEC_DISCOVER; | 1905 | 	msg->msg[4] = CEC_MSG_CDC_HEC_DISCOVER; |
| ... | @@ -1916,7 +1916,7 @@ static __inline__ void cec_msg_cdc_hpd_set_state(struct cec_msg *msg, | ... | @@ -1916,7 +1916,7 @@ static __inline__ void cec_msg_cdc_hpd_set_state(struct cec_msg *msg, |
| 1916 | 					 __u8 hpd_state) | 1916 | 					 __u8 hpd_state) |
| 1917 | { | 1917 | { |
| 1918 | 	msg->len = 6; | 1918 | 	msg->len = 6; |
| 1919 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1919 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1920 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1920 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1921 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1921 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1922 | 	msg->msg[4] = CEC_MSG_CDC_HPD_SET_STATE; | 1922 | 	msg->msg[4] = CEC_MSG_CDC_HPD_SET_STATE; |
| ... | @@ -1938,7 +1938,7 @@ static __inline__ void cec_msg_cdc_hpd_report_state(struct cec_msg *msg, | ... | @@ -1938,7 +1938,7 @@ static __inline__ void cec_msg_cdc_hpd_report_state(struct cec_msg *msg, |
| 1938 | 						__u8 hpd_error) | 1938 | 						__u8 hpd_error) |
| 1939 | { | 1939 | { |
| 1940 | 	msg->len = 6; | 1940 | 	msg->len = 6; |
| 1941 | 	msg->msg[0] |= 0xf; /* broadcast */ | 1941 | 	msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; |
| 1942 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; | 1942 | 	msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1943 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ | 1943 | 	/* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1944 | 	msg->msg[4] = CEC_MSG_CDC_HPD_REPORT_STATE; | 1944 | 	msg->msg[4] = CEC_MSG_CDC_HPD_REPORT_STATE; |
lib/libc/include/any-linux-any/linux/const.h+1-1| ... | @@ -33,7 +33,7 @@ | ... | @@ -33,7 +33,7 @@ |
| 33 | * Missing __asm__ support | 33 | * Missing __asm__ support |
| 34 | * | 34 | * |
| 35 | * __BIT128() would not work in the __asm__ code, as it shifts an | 35 | * __BIT128() would not work in the __asm__ code, as it shifts an |
| 36 | * 'unsigned __init128' data type as direct representation of | 36 | * 'unsigned __int128' data type as direct representation of |
| 37 | * 128 bit constants is not supported in the gcc compiler, as | 37 | * 128 bit constants is not supported in the gcc compiler, as |
| 38 | * they get silently truncated. | 38 | * they get silently truncated. |
| 39 | * | 39 | * |
lib/libc/include/any-linux-any/linux/coredump.h created+104| ... | @@ -0,0 +1,104 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | |||
| 3 | #ifndef _LINUX_COREDUMP_H | ||
| 4 | #define _LINUX_COREDUMP_H | ||
| 5 | |||
| 6 | #include <linux/types.h> | ||
| 7 | |||
| 8 | /** | ||
| 9 | * coredump_{req,ack} flags | ||
| 10 | * @COREDUMP_KERNEL: kernel writes coredump | ||
| 11 | * @COREDUMP_USERSPACE: userspace writes coredump | ||
| 12 | * @COREDUMP_REJECT: don't generate coredump | ||
| 13 | * @COREDUMP_WAIT: wait for coredump server | ||
| 14 | */ | ||
| 15 | enum { | ||
| 16 | 	COREDUMP_KERNEL		= (1ULL << 0), | ||
| 17 | 	COREDUMP_USERSPACE	= (1ULL << 1), | ||
| 18 | 	COREDUMP_REJECT		= (1ULL << 2), | ||
| 19 | 	COREDUMP_WAIT		= (1ULL << 3), | ||
| 20 | }; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * struct coredump_req - message kernel sends to userspace | ||
| 24 | * @size: size of struct coredump_req | ||
| 25 | * @size_ack: known size of struct coredump_ack on this kernel | ||
| 26 | * @mask: supported features | ||
| 27 | * | ||
| 28 | * When a coredump happens the kernel will connect to the coredump | ||
| 29 | * socket and send a coredump request to the coredump server. The @size | ||
| 30 | * member is set to the size of struct coredump_req and provides a hint | ||
| 31 | * to userspace how much data can be read. Userspace may use MSG_PEEK to | ||
| 32 | * peek the size of struct coredump_req and then choose to consume it in | ||
| 33 | * one go. Userspace may also simply read a COREDUMP_ACK_SIZE_VER0 | ||
| 34 | * request. If the size the kernel sends is larger userspace simply | ||
| 35 | * discards any remaining data. | ||
| 36 | * | ||
| 37 | * The coredump_req->mask member is set to the currently know features. | ||
| 38 | * Userspace may only set coredump_ack->mask to the bits raised by the | ||
| 39 | * kernel in coredump_req->mask. | ||
| 40 | * | ||
| 41 | * The coredump_req->size_ack member is set by the kernel to the size of | ||
| 42 | * struct coredump_ack the kernel knows. Userspace may only send up to | ||
| 43 | * coredump_req->size_ack bytes to the kernel and must set | ||
| 44 | * coredump_ack->size accordingly. | ||
| 45 | */ | ||
| 46 | struct coredump_req { | ||
| 47 | 	__u32 size; | ||
| 48 | 	__u32 size_ack; | ||
| 49 | 	__u64 mask; | ||
| 50 | }; | ||
| 51 | |||
| 52 | enum { | ||
| 53 | 	COREDUMP_REQ_SIZE_VER0 = 16U, /* size of first published struct */ | ||
| 54 | }; | ||
| 55 | |||
| 56 | /** | ||
| 57 | * struct coredump_ack - message userspace sends to kernel | ||
| 58 | * @size: size of the struct | ||
| 59 | * @spare: unused | ||
| 60 | * @mask: features kernel is supposed to use | ||
| 61 | * | ||
| 62 | * The @size member must be set to the size of struct coredump_ack. It | ||
| 63 | * may never exceed what the kernel returned in coredump_req->size_ack | ||
| 64 | * but it may of course be smaller (>= COREDUMP_ACK_SIZE_VER0 and <= | ||
| 65 | * coredump_req->size_ack). | ||
| 66 | * | ||
| 67 | * The @mask member must be set to the features the coredump server | ||
| 68 | * wants the kernel to use. Only bits the kernel returned in | ||
| 69 | * coredump_req->mask may be set. | ||
| 70 | */ | ||
| 71 | struct coredump_ack { | ||
| 72 | 	__u32 size; | ||
| 73 | 	__u32 spare; | ||
| 74 | 	__u64 mask; | ||
| 75 | }; | ||
| 76 | |||
| 77 | enum { | ||
| 78 | 	COREDUMP_ACK_SIZE_VER0 = 16U, /* size of first published struct */ | ||
| 79 | }; | ||
| 80 | |||
| 81 | /** | ||
| 82 | * enum coredump_mark - Markers for the coredump socket | ||
| 83 | * | ||
| 84 | * The kernel will place a single byte on the coredump socket. The | ||
| 85 | * markers notify userspace whether the coredump ack succeeded or | ||
| 86 | * failed. | ||
| 87 | * | ||
| 88 | * @COREDUMP_MARK_MINSIZE: the provided coredump_ack size was too small | ||
| 89 | * @COREDUMP_MARK_MAXSIZE: the provided coredump_ack size was too big | ||
| 90 | * @COREDUMP_MARK_UNSUPPORTED: the provided coredump_ack mask was invalid | ||
| 91 | * @COREDUMP_MARK_CONFLICTING: the provided coredump_ack mask has conflicting options | ||
| 92 | * @COREDUMP_MARK_REQACK: the coredump request and ack was successful | ||
| 93 | * @__COREDUMP_MARK_MAX: the maximum coredump mark value | ||
| 94 | */ | ||
| 95 | enum coredump_mark { | ||
| 96 | 	COREDUMP_MARK_REQACK		= 0U, | ||
| 97 | 	COREDUMP_MARK_MINSIZE		= 1U, | ||
| 98 | 	COREDUMP_MARK_MAXSIZE		= 2U, | ||
| 99 | 	COREDUMP_MARK_UNSUPPORTED	= 3U, | ||
| 100 | 	COREDUMP_MARK_CONFLICTING	= 4U, | ||
| 101 | 	__COREDUMP_MARK_MAX		= (1U << 31), | ||
| 102 | }; | ||
| 103 | |||
| 104 | #endif /* _LINUX_COREDUMP_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/counter.h+2| ... | @@ -65,6 +65,8 @@ enum counter_event_type { | ... | @@ -65,6 +65,8 @@ enum counter_event_type { |
| 65 | 	COUNTER_EVENT_CHANGE_OF_STATE, | 65 | 	COUNTER_EVENT_CHANGE_OF_STATE, |
| 66 | 	/* Count value captured */ | 66 | 	/* Count value captured */ |
| 67 | 	COUNTER_EVENT_CAPTURE, | 67 | 	COUNTER_EVENT_CAPTURE, |
| 68 | 	/* Direction change detected */ | ||
| 69 | 	COUNTER_EVENT_DIRECTION_CHANGE, | ||
| 68 | }; | 70 | }; |
| 69 | 71 | ||
| 70 | /** | 72 | /** |
lib/libc/include/any-linux-any/linux/counter/microchip-tcb-capture.h created+40| ... | @@ -0,0 +1,40 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Channel numbers used by the microchip-tcb-capture driver | ||
| 4 | * Copyright (C) 2025 Bence Csókás | ||
| 5 | */ | ||
| 6 | #ifndef _COUNTER_MCHP_TCB_H_ | ||
| 7 | #define _COUNTER_MCHP_TCB_H_ | ||
| 8 | |||
| 9 | /* | ||
| 10 | * The driver defines the following components: | ||
| 11 | * | ||
| 12 | * Count 0 | ||
| 13 | * \__ Synapse 0 -- Signal 0 (Channel A, i.e. TIOA) | ||
| 14 | * \__ Synapse 1 -- Signal 1 (Channel B, i.e. TIOB) | ||
| 15 | * \__ Extension capture0 (RA register) | ||
| 16 | * \__ Extension capture1 (RB register) | ||
| 17 | * | ||
| 18 | * It also supports the following events: | ||
| 19 | * | ||
| 20 | * Channel 0: | ||
| 21 | * - CV register changed | ||
| 22 | * - CV overflowed | ||
| 23 | * - RA captured | ||
| 24 | * Channel 1: | ||
| 25 | * - RB captured | ||
| 26 | * Channel 2: | ||
| 27 | * - RC compare triggered | ||
| 28 | */ | ||
| 29 | |||
| 30 | /* Capture extensions */ | ||
| 31 | #define COUNTER_MCHP_EXCAP_RA 0 | ||
| 32 | #define COUNTER_MCHP_EXCAP_RB 1 | ||
| 33 | |||
| 34 | /* Event channels */ | ||
| 35 | #define COUNTER_MCHP_EVCHN_CV 0 | ||
| 36 | #define COUNTER_MCHP_EVCHN_RA 0 | ||
| 37 | #define COUNTER_MCHP_EVCHN_RB 1 | ||
| 38 | #define COUNTER_MCHP_EVCHN_RC 2 | ||
| 39 | |||
| 40 | #endif /* _COUNTER_MCHP_TCB_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/devlink.h+31| ... | @@ -221,6 +221,11 @@ enum devlink_port_flavour { | ... | @@ -221,6 +221,11 @@ enum devlink_port_flavour { |
| 221 | 				 */ | 221 | 				 */ |
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | /* IEEE 802.1Qaz standard supported values. */ | ||
| 225 | |||
| 226 | #define DEVLINK_RATE_TCS_MAX 8 | ||
| 227 | #define DEVLINK_RATE_TC_INDEX_MAX (DEVLINK_RATE_TCS_MAX - 1) | ||
| 228 | |||
| 224 | enum devlink_rate_type { | 229 | enum devlink_rate_type { |
| 225 | 	DEVLINK_RATE_TYPE_LEAF, | 230 | 	DEVLINK_RATE_TYPE_LEAF, |
| 226 | 	DEVLINK_RATE_TYPE_NODE, | 231 | 	DEVLINK_RATE_TYPE_NODE, |
| ... | @@ -385,6 +390,21 @@ enum devlink_linecard_state { | ... | @@ -385,6 +390,21 @@ enum devlink_linecard_state { |
| 385 | 	DEVLINK_LINECARD_STATE_MAX = __DEVLINK_LINECARD_STATE_MAX - 1 | 390 | 	DEVLINK_LINECARD_STATE_MAX = __DEVLINK_LINECARD_STATE_MAX - 1 |
| 386 | }; | 391 | }; |
| 387 | 392 | ||
| 393 | /* Variable attribute type. */ | ||
| 394 | enum devlink_var_attr_type { | ||
| 395 | 	/* Following values relate to the internal NLA_* values */ | ||
| 396 | 	DEVLINK_VAR_ATTR_TYPE_U8 = 1, | ||
| 397 | 	DEVLINK_VAR_ATTR_TYPE_U16, | ||
| 398 | 	DEVLINK_VAR_ATTR_TYPE_U32, | ||
| 399 | 	DEVLINK_VAR_ATTR_TYPE_U64, | ||
| 400 | 	DEVLINK_VAR_ATTR_TYPE_STRING, | ||
| 401 | 	DEVLINK_VAR_ATTR_TYPE_FLAG, | ||
| 402 | 	DEVLINK_VAR_ATTR_TYPE_NUL_STRING = 10, | ||
| 403 | 	DEVLINK_VAR_ATTR_TYPE_BINARY, | ||
| 404 | 	__DEVLINK_VAR_ATTR_TYPE_CUSTOM_BASE = 0x80, | ||
| 405 | 	/* Any possible custom types, unrelated to NLA_* values go below */ | ||
| 406 | }; | ||
| 407 | |||
| 388 | enum devlink_attr { | 408 | enum devlink_attr { |
| 389 | 	/* don't change the order or add anything between, this is ABI! */ | 409 | 	/* don't change the order or add anything between, this is ABI! */ |
| 390 | 	DEVLINK_ATTR_UNSPEC, | 410 | 	DEVLINK_ATTR_UNSPEC, |
| ... | @@ -614,6 +634,8 @@ enum devlink_attr { | ... | @@ -614,6 +634,8 @@ enum devlink_attr { |
| 614 | 634 | ||
| 615 | 	DEVLINK_ATTR_REGION_DIRECT,		/* flag */ | 635 | 	DEVLINK_ATTR_REGION_DIRECT,		/* flag */ |
| 616 | 636 | ||
| 637 | 	DEVLINK_ATTR_RATE_TC_BWS,		/* nested */ | ||
| 638 | |||
| 617 | 	/* Add new attributes above here, update the spec in | 639 | 	/* Add new attributes above here, update the spec in |
| 618 | 	 * Documentation/netlink/specs/devlink.yaml and re-generate | 640 | 	 * Documentation/netlink/specs/devlink.yaml and re-generate |
| 619 | 	 * net/devlink/netlink_gen.c. | 641 | 	 * net/devlink/netlink_gen.c. |
| ... | @@ -623,6 +645,15 @@ enum devlink_attr { | ... | @@ -623,6 +645,15 @@ enum devlink_attr { |
| 623 | 	DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1 | 645 | 	DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1 |
| 624 | }; | 646 | }; |
| 625 | 647 | ||
| 648 | enum devlink_rate_tc_attr { | ||
| 649 | 	DEVLINK_RATE_TC_ATTR_UNSPEC, | ||
| 650 | 	DEVLINK_RATE_TC_ATTR_INDEX,		/* u8 */ | ||
| 651 | 	DEVLINK_RATE_TC_ATTR_BW,		/* u32 */ | ||
| 652 | |||
| 653 | 	__DEVLINK_RATE_TC_ATTR_MAX, | ||
| 654 | 	DEVLINK_RATE_TC_ATTR_MAX = __DEVLINK_RATE_TC_ATTR_MAX - 1 | ||
| 655 | }; | ||
| 656 | |||
| 626 | /* Mapping between internal resource described by the field and system | 657 | /* Mapping between internal resource described by the field and system |
| 627 | * structure | 658 | * structure |
| 628 | */ | 659 | */ |
lib/libc/include/any-linux-any/linux/dm-ioctl.h+7-2| ... | @@ -258,10 +258,12 @@ enum { | ... | @@ -258,10 +258,12 @@ enum { |
| 258 | 	DM_DEV_SET_GEOMETRY_CMD, | 258 | 	DM_DEV_SET_GEOMETRY_CMD, |
| 259 | 	DM_DEV_ARM_POLL_CMD, | 259 | 	DM_DEV_ARM_POLL_CMD, |
| 260 | 	DM_GET_TARGET_VERSION_CMD, | 260 | 	DM_GET_TARGET_VERSION_CMD, |
| 261 | 	DM_MPATH_PROBE_PATHS_CMD, | ||
| 261 | }; | 262 | }; |
| 262 | 263 | ||
| 263 | #define DM_IOCTL 0xfd | 264 | #define DM_IOCTL 0xfd |
| 264 | 265 | ||
| 266 | /* Control device ioctls */ | ||
| 265 | #define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl) | 267 | #define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl) |
| 266 | #define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl) | 268 | #define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl) |
| 267 | #define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl) | 269 | #define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl) |
| ... | @@ -285,10 +287,13 @@ enum { | ... | @@ -285,10 +287,13 @@ enum { |
| 285 | #define DM_TARGET_MSG	 _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) | 287 | #define DM_TARGET_MSG	 _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) |
| 286 | #define DM_DEV_SET_GEOMETRY	_IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 288 | #define DM_DEV_SET_GEOMETRY	_IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 287 | 289 | ||
| 290 | /* Block device ioctls */ | ||
| 291 | #define DM_MPATH_PROBE_PATHS _IO(DM_IOCTL, DM_MPATH_PROBE_PATHS_CMD) | ||
| 292 | |||
| 288 | #define DM_VERSION_MAJOR	4 | 293 | #define DM_VERSION_MAJOR	4 |
| 289 | #define DM_VERSION_MINOR	48 | 294 | #define DM_VERSION_MINOR	50 |
| 290 | #define DM_VERSION_PATCHLEVEL	0 | 295 | #define DM_VERSION_PATCHLEVEL	0 |
| 291 | #define DM_VERSION_EXTRA	"-ioctl (2023-03-01)" | 296 | #define DM_VERSION_EXTRA	"-ioctl (2025-04-28)" |
| 292 | 297 | ||
| 293 | /* Status bits */ | 298 | /* Status bits */ |
| 294 | #define DM_READONLY_FLAG	(1 << 0) /* In/Out */ | 299 | #define DM_READONLY_FLAG	(1 << 0) /* In/Out */ |
lib/libc/include/any-linux-any/linux/dpll.h+13| ... | @@ -192,6 +192,17 @@ enum dpll_pin_capabilities { | ... | @@ -192,6 +192,17 @@ enum dpll_pin_capabilities { |
| 192 | 192 | ||
| 193 | #define DPLL_PHASE_OFFSET_DIVIDER	1000 | 193 | #define DPLL_PHASE_OFFSET_DIVIDER	1000 |
| 194 | 194 | ||
| 195 | /** | ||
| 196 | * enum dpll_feature_state - Allow control (enable/disable) and status checking | ||
| 197 | * over features. | ||
| 198 | * @DPLL_FEATURE_STATE_DISABLE: feature shall be disabled | ||
| 199 | * @DPLL_FEATURE_STATE_ENABLE: feature shall be enabled | ||
| 200 | */ | ||
| 201 | enum dpll_feature_state { | ||
| 202 | 	DPLL_FEATURE_STATE_DISABLE, | ||
| 203 | 	DPLL_FEATURE_STATE_ENABLE, | ||
| 204 | }; | ||
| 205 | |||
| 195 | enum dpll_a { | 206 | enum dpll_a { |
| 196 | 	DPLL_A_ID = 1, | 207 | 	DPLL_A_ID = 1, |
| 197 | 	DPLL_A_MODULE_NAME, | 208 | 	DPLL_A_MODULE_NAME, |
| ... | @@ -204,6 +215,7 @@ enum dpll_a { | ... | @@ -204,6 +215,7 @@ enum dpll_a { |
| 204 | 	DPLL_A_TYPE, | 215 | 	DPLL_A_TYPE, |
| 205 | 	DPLL_A_LOCK_STATUS_ERROR, | 216 | 	DPLL_A_LOCK_STATUS_ERROR, |
| 206 | 	DPLL_A_CLOCK_QUALITY_LEVEL, | 217 | 	DPLL_A_CLOCK_QUALITY_LEVEL, |
| 218 | 	DPLL_A_PHASE_OFFSET_MONITOR, | ||
| 207 | 219 | ||
| 208 | 	__DPLL_A_MAX, | 220 | 	__DPLL_A_MAX, |
| 209 | 	DPLL_A_MAX = (__DPLL_A_MAX - 1) | 221 | 	DPLL_A_MAX = (__DPLL_A_MAX - 1) |
| ... | @@ -237,6 +249,7 @@ enum dpll_a_pin { | ... | @@ -237,6 +249,7 @@ enum dpll_a_pin { |
| 237 | 	DPLL_A_PIN_ESYNC_FREQUENCY, | 249 | 	DPLL_A_PIN_ESYNC_FREQUENCY, |
| 238 | 	DPLL_A_PIN_ESYNC_FREQUENCY_SUPPORTED, | 250 | 	DPLL_A_PIN_ESYNC_FREQUENCY_SUPPORTED, |
| 239 | 	DPLL_A_PIN_ESYNC_PULSE, | 251 | 	DPLL_A_PIN_ESYNC_PULSE, |
| 252 | 	DPLL_A_PIN_REFERENCE_SYNC, | ||
| 240 | 253 | ||
| 241 | 	__DPLL_A_PIN_MAX, | 254 | 	__DPLL_A_PIN_MAX, |
| 242 | 	DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1) | 255 | 	DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1) |
lib/libc/include/any-linux-any/linux/elf.h+132-5| ... | @@ -11,6 +11,7 @@ typedef __u16	Elf32_Half; | ... | @@ -11,6 +11,7 @@ typedef __u16	Elf32_Half; |
| 11 | typedef __u32	Elf32_Off; | 11 | typedef __u32	Elf32_Off; |
| 12 | typedef __s32	Elf32_Sword; | 12 | typedef __s32	Elf32_Sword; |
| 13 | typedef __u32	Elf32_Word; | 13 | typedef __u32	Elf32_Word; |
| 14 | typedef __u16	Elf32_Versym; | ||
| 14 | 15 | ||
| 15 | /* 64-bit ELF base types. */ | 16 | /* 64-bit ELF base types. */ |
| 16 | typedef __u64	Elf64_Addr; | 17 | typedef __u64	Elf64_Addr; |
| ... | @@ -21,6 +22,7 @@ typedef __s32	Elf64_Sword; | ... | @@ -21,6 +22,7 @@ typedef __s32	Elf64_Sword; |
| 21 | typedef __u32	Elf64_Word; | 22 | typedef __u32	Elf64_Word; |
| 22 | typedef __u64	Elf64_Xword; | 23 | typedef __u64	Elf64_Xword; |
| 23 | typedef __s64	Elf64_Sxword; | 24 | typedef __s64	Elf64_Sxword; |
| 25 | typedef __u16	Elf64_Versym; | ||
| 24 | 26 | ||
| 25 | /* These constants are for the segment types stored in the image headers */ | 27 | /* These constants are for the segment types stored in the image headers */ |
| 26 | #define PT_NULL 0 | 28 | #define PT_NULL 0 |
| ... | @@ -107,6 +109,7 @@ typedef __s64	Elf64_Sxword; | ... | @@ -107,6 +109,7 @@ typedef __s64	Elf64_Sxword; |
| 107 | #define DT_VALRNGLO	0x6ffffd00 | 109 | #define DT_VALRNGLO	0x6ffffd00 |
| 108 | #define DT_VALRNGHI	0x6ffffdff | 110 | #define DT_VALRNGHI	0x6ffffdff |
| 109 | #define DT_ADDRRNGLO	0x6ffffe00 | 111 | #define DT_ADDRRNGLO	0x6ffffe00 |
| 112 | #define DT_GNU_HASH	0x6ffffef5 | ||
| 110 | #define DT_ADDRRNGHI	0x6ffffeff | 113 | #define DT_ADDRRNGHI	0x6ffffeff |
| 111 | #define DT_VERSYM	0x6ffffff0 | 114 | #define DT_VERSYM	0x6ffffff0 |
| 112 | #define DT_RELACOUNT	0x6ffffff9 | 115 | #define DT_RELACOUNT	0x6ffffff9 |
| ... | @@ -125,6 +128,8 @@ typedef __s64	Elf64_Sxword; | ... | @@ -125,6 +128,8 @@ typedef __s64	Elf64_Sxword; |
| 125 | #define STB_GLOBAL 1 | 128 | #define STB_GLOBAL 1 |
| 126 | #define STB_WEAK 2 | 129 | #define STB_WEAK 2 |
| 127 | 130 | ||
| 131 | #define STN_UNDEF 0 | ||
| 132 | |||
| 128 | #define STT_NOTYPE 0 | 133 | #define STT_NOTYPE 0 |
| 129 | #define STT_OBJECT 1 | 134 | #define STT_OBJECT 1 |
| 130 | #define STT_FUNC 2 | 135 | #define STT_FUNC 2 |
| ... | @@ -133,6 +138,9 @@ typedef __s64	Elf64_Sxword; | ... | @@ -133,6 +138,9 @@ typedef __s64	Elf64_Sxword; |
| 133 | #define STT_COMMON 5 | 138 | #define STT_COMMON 5 |
| 134 | #define STT_TLS 6 | 139 | #define STT_TLS 6 |
| 135 | 140 | ||
| 141 | #define VER_FLG_BASE 0x1 | ||
| 142 | #define VER_FLG_WEAK 0x2 | ||
| 143 | |||
| 136 | #define ELF_ST_BIND(x)		((x) >> 4) | 144 | #define ELF_ST_BIND(x)		((x) >> 4) |
| 137 | #define ELF_ST_TYPE(x)		((x) & 0xf) | 145 | #define ELF_ST_TYPE(x)		((x) & 0xf) |
| 138 | #define ELF32_ST_BIND(x)	ELF_ST_BIND(x) | 146 | #define ELF32_ST_BIND(x)	ELF_ST_BIND(x) |
| ... | @@ -291,8 +299,18 @@ typedef struct elf64_phdr { | ... | @@ -291,8 +299,18 @@ typedef struct elf64_phdr { |
| 291 | #define SHF_WRITE		0x1 | 299 | #define SHF_WRITE		0x1 |
| 292 | #define SHF_ALLOC		0x2 | 300 | #define SHF_ALLOC		0x2 |
| 293 | #define SHF_EXECINSTR		0x4 | 301 | #define SHF_EXECINSTR		0x4 |
| 302 | #define SHF_MERGE		0x10 | ||
| 303 | #define SHF_STRINGS		0x20 | ||
| 304 | #define SHF_INFO_LINK		0x40 | ||
| 305 | #define SHF_LINK_ORDER		0x80 | ||
| 306 | #define SHF_OS_NONCONFORMING	0x100 | ||
| 307 | #define SHF_GROUP		0x200 | ||
| 308 | #define SHF_TLS			0x400 | ||
| 294 | #define SHF_RELA_LIVEPATCH	0x00100000 | 309 | #define SHF_RELA_LIVEPATCH	0x00100000 |
| 295 | #define SHF_RO_AFTER_INIT	0x00200000 | 310 | #define SHF_RO_AFTER_INIT	0x00200000 |
| 311 | #define SHF_ORDERED		0x04000000 | ||
| 312 | #define SHF_EXCLUDE		0x08000000 | ||
| 313 | #define SHF_MASKOS		0x0ff00000 | ||
| 296 | #define SHF_MASKPROC		0xf0000000 | 314 | #define SHF_MASKPROC		0xf0000000 |
| 297 | 315 | ||
| 298 | /* special section indexes */ | 316 | /* special section indexes */ |
| ... | @@ -368,101 +386,180 @@ typedef struct elf64_shdr { | ... | @@ -368,101 +386,180 @@ typedef struct elf64_shdr { |
| 368 | #define ELF_OSABI ELFOSABI_NONE | 386 | #define ELF_OSABI ELFOSABI_NONE |
| 369 | #endif | 387 | #endif |
| 370 | 388 | ||
| 389 | /* Note definitions: NN_ defines names. NT_ defines types. */ | ||
| 390 | |||
| 391 | #define NN_GNU_PROPERTY_TYPE_0	"GNU" | ||
| 392 | #define NT_GNU_PROPERTY_TYPE_0	5 | ||
| 393 | |||
| 371 | /* | 394 | /* |
| 372 | * Notes used in ET_CORE. Architectures export some of the arch register sets | 395 | * Notes used in ET_CORE. Architectures export some of the arch register sets |
| 373 | * using the corresponding note types via the PTRACE_GETREGSET and | 396 | * using the corresponding note types via the PTRACE_GETREGSET and |
| 374 | * PTRACE_SETREGSET requests. | 397 | * PTRACE_SETREGSET requests. |
| 375 | * The note name for these types is "LINUX", except NT_PRFPREG that is named | ||
| 376 | * "CORE". | ||
| 377 | */ | 398 | */ |
| 399 | #define NN_PRSTATUS	"CORE" | ||
| 378 | #define NT_PRSTATUS	1 | 400 | #define NT_PRSTATUS	1 |
| 401 | #define NN_PRFPREG	"CORE" | ||
| 379 | #define NT_PRFPREG	2 | 402 | #define NT_PRFPREG	2 |
| 403 | #define NN_PRPSINFO	"CORE" | ||
| 380 | #define NT_PRPSINFO	3 | 404 | #define NT_PRPSINFO	3 |
| 405 | #define NN_TASKSTRUCT	"CORE" | ||
| 381 | #define NT_TASKSTRUCT	4 | 406 | #define NT_TASKSTRUCT	4 |
| 407 | #define NN_AUXV		"CORE" | ||
| 382 | #define NT_AUXV		6 | 408 | #define NT_AUXV		6 |
| 383 | /* | 409 | /* |
| 384 | * Note to userspace developers: size of NT_SIGINFO note may increase | 410 | * Note to userspace developers: size of NT_SIGINFO note may increase |
| 385 | * in the future to accomodate more fields, don't assume it is fixed! | 411 | * in the future to accomodate more fields, don't assume it is fixed! |
| 386 | */ | 412 | */ |
| 413 | #define NN_SIGINFO "CORE" | ||
| 387 | #define NT_SIGINFO 0x53494749 | 414 | #define NT_SIGINFO 0x53494749 |
| 415 | #define NN_FILE "CORE" | ||
| 388 | #define NT_FILE 0x46494c45 | 416 | #define NT_FILE 0x46494c45 |
| 417 | #define NN_PRXFPREG "LINUX" | ||
| 389 | #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ | 418 | #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ |
| 419 | #define NN_PPC_VMX	"LINUX" | ||
| 390 | #define NT_PPC_VMX	0x100		/* PowerPC Altivec/VMX registers */ | 420 | #define NT_PPC_VMX	0x100		/* PowerPC Altivec/VMX registers */ |
| 421 | #define NN_PPC_SPE	"LINUX" | ||
| 391 | #define NT_PPC_SPE	0x101		/* PowerPC SPE/EVR registers */ | 422 | #define NT_PPC_SPE	0x101		/* PowerPC SPE/EVR registers */ |
| 423 | #define NN_PPC_VSX	"LINUX" | ||
| 392 | #define NT_PPC_VSX	0x102		/* PowerPC VSX registers */ | 424 | #define NT_PPC_VSX	0x102		/* PowerPC VSX registers */ |
| 425 | #define NN_PPC_TAR	"LINUX" | ||
| 393 | #define NT_PPC_TAR	0x103		/* Target Address Register */ | 426 | #define NT_PPC_TAR	0x103		/* Target Address Register */ |
| 427 | #define NN_PPC_PPR	"LINUX" | ||
| 394 | #define NT_PPC_PPR	0x104		/* Program Priority Register */ | 428 | #define NT_PPC_PPR	0x104		/* Program Priority Register */ |
| 429 | #define NN_PPC_DSCR	"LINUX" | ||
| 395 | #define NT_PPC_DSCR	0x105		/* Data Stream Control Register */ | 430 | #define NT_PPC_DSCR	0x105		/* Data Stream Control Register */ |
| 431 | #define NN_PPC_EBB	"LINUX" | ||
| 396 | #define NT_PPC_EBB	0x106		/* Event Based Branch Registers */ | 432 | #define NT_PPC_EBB	0x106		/* Event Based Branch Registers */ |
| 433 | #define NN_PPC_PMU	"LINUX" | ||
| 397 | #define NT_PPC_PMU	0x107		/* Performance Monitor Registers */ | 434 | #define NT_PPC_PMU	0x107		/* Performance Monitor Registers */ |
| 435 | #define NN_PPC_TM_CGPR	"LINUX" | ||
| 398 | #define NT_PPC_TM_CGPR	0x108		/* TM checkpointed GPR Registers */ | 436 | #define NT_PPC_TM_CGPR	0x108		/* TM checkpointed GPR Registers */ |
| 437 | #define NN_PPC_TM_CFPR	"LINUX" | ||
| 399 | #define NT_PPC_TM_CFPR	0x109		/* TM checkpointed FPR Registers */ | 438 | #define NT_PPC_TM_CFPR	0x109		/* TM checkpointed FPR Registers */ |
| 439 | #define NN_PPC_TM_CVMX	"LINUX" | ||
| 400 | #define NT_PPC_TM_CVMX	0x10a		/* TM checkpointed VMX Registers */ | 440 | #define NT_PPC_TM_CVMX	0x10a		/* TM checkpointed VMX Registers */ |
| 441 | #define NN_PPC_TM_CVSX	"LINUX" | ||
| 401 | #define NT_PPC_TM_CVSX	0x10b		/* TM checkpointed VSX Registers */ | 442 | #define NT_PPC_TM_CVSX	0x10b		/* TM checkpointed VSX Registers */ |
| 443 | #define NN_PPC_TM_SPR	"LINUX" | ||
| 402 | #define NT_PPC_TM_SPR	0x10c		/* TM Special Purpose Registers */ | 444 | #define NT_PPC_TM_SPR	0x10c		/* TM Special Purpose Registers */ |
| 445 | #define NN_PPC_TM_CTAR	"LINUX" | ||
| 403 | #define NT_PPC_TM_CTAR	0x10d		/* TM checkpointed Target Address Register */ | 446 | #define NT_PPC_TM_CTAR	0x10d		/* TM checkpointed Target Address Register */ |
| 447 | #define NN_PPC_TM_CPPR	"LINUX" | ||
| 404 | #define NT_PPC_TM_CPPR	0x10e		/* TM checkpointed Program Priority Register */ | 448 | #define NT_PPC_TM_CPPR	0x10e		/* TM checkpointed Program Priority Register */ |
| 449 | #define NN_PPC_TM_CDSCR	"LINUX" | ||
| 405 | #define NT_PPC_TM_CDSCR	0x10f		/* TM checkpointed Data Stream Control Register */ | 450 | #define NT_PPC_TM_CDSCR	0x10f		/* TM checkpointed Data Stream Control Register */ |
| 451 | #define NN_PPC_PKEY	"LINUX" | ||
| 406 | #define NT_PPC_PKEY	0x110		/* Memory Protection Keys registers */ | 452 | #define NT_PPC_PKEY	0x110		/* Memory Protection Keys registers */ |
| 453 | #define NN_PPC_DEXCR	"LINUX" | ||
| 407 | #define NT_PPC_DEXCR	0x111		/* PowerPC DEXCR registers */ | 454 | #define NT_PPC_DEXCR	0x111		/* PowerPC DEXCR registers */ |
| 455 | #define NN_PPC_HASHKEYR	"LINUX" | ||
| 408 | #define NT_PPC_HASHKEYR	0x112		/* PowerPC HASHKEYR register */ | 456 | #define NT_PPC_HASHKEYR	0x112		/* PowerPC HASHKEYR register */ |
| 457 | #define NN_386_TLS	"LINUX" | ||
| 409 | #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */ | 458 | #define NT_386_TLS	0x200		/* i386 TLS slots (struct user_desc) */ |
| 459 | #define NN_386_IOPERM	"LINUX" | ||
| 410 | #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */ | 460 | #define NT_386_IOPERM	0x201		/* x86 io permission bitmap (1=deny) */ |
| 461 | #define NN_X86_XSTATE	"LINUX" | ||
| 411 | #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */ | 462 | #define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */ |
| 412 | /* Old binutils treats 0x203 as a CET state */ | 463 | /* Old binutils treats 0x203 as a CET state */ |
| 464 | #define NN_X86_SHSTK	"LINUX" | ||
| 413 | #define NT_X86_SHSTK	0x204		/* x86 SHSTK state */ | 465 | #define NT_X86_SHSTK	0x204		/* x86 SHSTK state */ |
| 466 | #define NN_X86_XSAVE_LAYOUT	"LINUX" | ||
| 414 | #define NT_X86_XSAVE_LAYOUT	0x205	/* XSAVE layout description */ | 467 | #define NT_X86_XSAVE_LAYOUT	0x205	/* XSAVE layout description */ |
| 468 | #define NN_S390_HIGH_GPRS	"LINUX" | ||
| 415 | #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */ | 469 | #define NT_S390_HIGH_GPRS	0x300	/* s390 upper register halves */ |
| 470 | #define NN_S390_TIMER	"LINUX" | ||
| 416 | #define NT_S390_TIMER	0x301		/* s390 timer register */ | 471 | #define NT_S390_TIMER	0x301		/* s390 timer register */ |
| 472 | #define NN_S390_TODCMP	"LINUX" | ||
| 417 | #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator register */ | 473 | #define NT_S390_TODCMP	0x302		/* s390 TOD clock comparator register */ |
| 474 | #define NN_S390_TODPREG	"LINUX" | ||
| 418 | #define NT_S390_TODPREG	0x303		/* s390 TOD programmable register */ | 475 | #define NT_S390_TODPREG	0x303		/* s390 TOD programmable register */ |
| 476 | #define NN_S390_CTRS	"LINUX" | ||
| 419 | #define NT_S390_CTRS	0x304		/* s390 control registers */ | 477 | #define NT_S390_CTRS	0x304		/* s390 control registers */ |
| 478 | #define NN_S390_PREFIX	"LINUX" | ||
| 420 | #define NT_S390_PREFIX	0x305		/* s390 prefix register */ | 479 | #define NT_S390_PREFIX	0x305		/* s390 prefix register */ |
| 480 | #define NN_S390_LAST_BREAK	"LINUX" | ||
| 421 | #define NT_S390_LAST_BREAK	0x306	/* s390 breaking event address */ | 481 | #define NT_S390_LAST_BREAK	0x306	/* s390 breaking event address */ |
| 482 | #define NN_S390_SYSTEM_CALL	"LINUX" | ||
| 422 | #define NT_S390_SYSTEM_CALL	0x307	/* s390 system call restart data */ | 483 | #define NT_S390_SYSTEM_CALL	0x307	/* s390 system call restart data */ |
| 484 | #define NN_S390_TDB	"LINUX" | ||
| 423 | #define NT_S390_TDB	0x308		/* s390 transaction diagnostic block */ | 485 | #define NT_S390_TDB	0x308		/* s390 transaction diagnostic block */ |
| 486 | #define NN_S390_VXRS_LOW	"LINUX" | ||
| 424 | #define NT_S390_VXRS_LOW	0x309	/* s390 vector registers 0-15 upper half */ | 487 | #define NT_S390_VXRS_LOW	0x309	/* s390 vector registers 0-15 upper half */ |
| 488 | #define NN_S390_VXRS_HIGH	"LINUX" | ||
| 425 | #define NT_S390_VXRS_HIGH	0x30a	/* s390 vector registers 16-31 */ | 489 | #define NT_S390_VXRS_HIGH	0x30a	/* s390 vector registers 16-31 */ |
| 490 | #define NN_S390_GS_CB	"LINUX" | ||
| 426 | #define NT_S390_GS_CB	0x30b		/* s390 guarded storage registers */ | 491 | #define NT_S390_GS_CB	0x30b		/* s390 guarded storage registers */ |
| 492 | #define NN_S390_GS_BC	"LINUX" | ||
| 427 | #define NT_S390_GS_BC	0x30c		/* s390 guarded storage broadcast control block */ | 493 | #define NT_S390_GS_BC	0x30c		/* s390 guarded storage broadcast control block */ |
| 494 | #define NN_S390_RI_CB	"LINUX" | ||
| 428 | #define NT_S390_RI_CB	0x30d		/* s390 runtime instrumentation */ | 495 | #define NT_S390_RI_CB	0x30d		/* s390 runtime instrumentation */ |
| 496 | #define NN_S390_PV_CPU_DATA	"LINUX" | ||
| 429 | #define NT_S390_PV_CPU_DATA	0x30e	/* s390 protvirt cpu dump data */ | 497 | #define NT_S390_PV_CPU_DATA	0x30e	/* s390 protvirt cpu dump data */ |
| 498 | #define NN_ARM_VFP	"LINUX" | ||
| 430 | #define NT_ARM_VFP	0x400		/* ARM VFP/NEON registers */ | 499 | #define NT_ARM_VFP	0x400		/* ARM VFP/NEON registers */ |
| 500 | #define NN_ARM_TLS	"LINUX" | ||
| 431 | #define NT_ARM_TLS	0x401		/* ARM TLS register */ | 501 | #define NT_ARM_TLS	0x401		/* ARM TLS register */ |
| 502 | #define NN_ARM_HW_BREAK	"LINUX" | ||
| 432 | #define NT_ARM_HW_BREAK	0x402		/* ARM hardware breakpoint registers */ | 503 | #define NT_ARM_HW_BREAK	0x402		/* ARM hardware breakpoint registers */ |
| 504 | #define NN_ARM_HW_WATCH	"LINUX" | ||
| 433 | #define NT_ARM_HW_WATCH	0x403		/* ARM hardware watchpoint registers */ | 505 | #define NT_ARM_HW_WATCH	0x403		/* ARM hardware watchpoint registers */ |
| 506 | #define NN_ARM_SYSTEM_CALL	"LINUX" | ||
| 434 | #define NT_ARM_SYSTEM_CALL	0x404	/* ARM system call number */ | 507 | #define NT_ARM_SYSTEM_CALL	0x404	/* ARM system call number */ |
| 508 | #define NN_ARM_SVE	"LINUX" | ||
| 435 | #define NT_ARM_SVE	0x405		/* ARM Scalable Vector Extension registers */ | 509 | #define NT_ARM_SVE	0x405		/* ARM Scalable Vector Extension registers */ |
| 510 | #define NN_ARM_PAC_MASK		"LINUX" | ||
| 436 | #define NT_ARM_PAC_MASK		0x406	/* ARM pointer authentication code masks */ | 511 | #define NT_ARM_PAC_MASK		0x406	/* ARM pointer authentication code masks */ |
| 512 | #define NN_ARM_PACA_KEYS	"LINUX" | ||
| 437 | #define NT_ARM_PACA_KEYS	0x407	/* ARM pointer authentication address keys */ | 513 | #define NT_ARM_PACA_KEYS	0x407	/* ARM pointer authentication address keys */ |
| 514 | #define NN_ARM_PACG_KEYS	"LINUX" | ||
| 438 | #define NT_ARM_PACG_KEYS	0x408	/* ARM pointer authentication generic key */ | 515 | #define NT_ARM_PACG_KEYS	0x408	/* ARM pointer authentication generic key */ |
| 516 | #define NN_ARM_TAGGED_ADDR_CTRL	"LINUX" | ||
| 439 | #define NT_ARM_TAGGED_ADDR_CTRL	0x409	/* arm64 tagged address control (prctl()) */ | 517 | #define NT_ARM_TAGGED_ADDR_CTRL	0x409	/* arm64 tagged address control (prctl()) */ |
| 518 | #define NN_ARM_PAC_ENABLED_KEYS	"LINUX" | ||
| 440 | #define NT_ARM_PAC_ENABLED_KEYS	0x40a	/* arm64 ptr auth enabled keys (prctl()) */ | 519 | #define NT_ARM_PAC_ENABLED_KEYS	0x40a	/* arm64 ptr auth enabled keys (prctl()) */ |
| 520 | #define NN_ARM_SSVE	"LINUX" | ||
| 441 | #define NT_ARM_SSVE	0x40b		/* ARM Streaming SVE registers */ | 521 | #define NT_ARM_SSVE	0x40b		/* ARM Streaming SVE registers */ |
| 522 | #define NN_ARM_ZA	"LINUX" | ||
| 442 | #define NT_ARM_ZA	0x40c		/* ARM SME ZA registers */ | 523 | #define NT_ARM_ZA	0x40c		/* ARM SME ZA registers */ |
| 524 | #define NN_ARM_ZT	"LINUX" | ||
| 443 | #define NT_ARM_ZT	0x40d		/* ARM SME ZT registers */ | 525 | #define NT_ARM_ZT	0x40d		/* ARM SME ZT registers */ |
| 526 | #define NN_ARM_FPMR	"LINUX" | ||
| 444 | #define NT_ARM_FPMR	0x40e		/* ARM floating point mode register */ | 527 | #define NT_ARM_FPMR	0x40e		/* ARM floating point mode register */ |
| 528 | #define NN_ARM_POE	"LINUX" | ||
| 445 | #define NT_ARM_POE	0x40f		/* ARM POE registers */ | 529 | #define NT_ARM_POE	0x40f		/* ARM POE registers */ |
| 530 | #define NN_ARM_GCS	"LINUX" | ||
| 446 | #define NT_ARM_GCS	0x410		/* ARM GCS state */ | 531 | #define NT_ARM_GCS	0x410		/* ARM GCS state */ |
| 532 | #define NN_ARC_V2	"LINUX" | ||
| 447 | #define NT_ARC_V2	0x600		/* ARCv2 accumulator/extra registers */ | 533 | #define NT_ARC_V2	0x600		/* ARCv2 accumulator/extra registers */ |
| 534 | #define NN_VMCOREDD	"LINUX" | ||
| 448 | #define NT_VMCOREDD	0x700		/* Vmcore Device Dump Note */ | 535 | #define NT_VMCOREDD	0x700		/* Vmcore Device Dump Note */ |
| 536 | #define NN_MIPS_DSP	"LINUX" | ||
| 449 | #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers */ | 537 | #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers */ |
| 538 | #define NN_MIPS_FP_MODE	"LINUX" | ||
| 450 | #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode */ | 539 | #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode */ |
| 540 | #define NN_MIPS_MSA	"LINUX" | ||
| 451 | #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers */ | 541 | #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers */ |
| 542 | #define NN_RISCV_CSR	"LINUX" | ||
| 452 | #define NT_RISCV_CSR	0x900		/* RISC-V Control and Status Registers */ | 543 | #define NT_RISCV_CSR	0x900		/* RISC-V Control and Status Registers */ |
| 544 | #define NN_RISCV_VECTOR	"LINUX" | ||
| 453 | #define NT_RISCV_VECTOR	0x901		/* RISC-V vector registers */ | 545 | #define NT_RISCV_VECTOR	0x901		/* RISC-V vector registers */ |
| 546 | #define NN_RISCV_TAGGED_ADDR_CTRL "LINUX" | ||
| 454 | #define NT_RISCV_TAGGED_ADDR_CTRL 0x902	/* RISC-V tagged address control (prctl()) */ | 547 | #define NT_RISCV_TAGGED_ADDR_CTRL 0x902	/* RISC-V tagged address control (prctl()) */ |
| 548 | #define NN_LOONGARCH_CPUCFG	"LINUX" | ||
| 455 | #define NT_LOONGARCH_CPUCFG	0xa00	/* LoongArch CPU config registers */ | 549 | #define NT_LOONGARCH_CPUCFG	0xa00	/* LoongArch CPU config registers */ |
| 550 | #define NN_LOONGARCH_CSR	"LINUX" | ||
| 456 | #define NT_LOONGARCH_CSR	0xa01	/* LoongArch control and status registers */ | 551 | #define NT_LOONGARCH_CSR	0xa01	/* LoongArch control and status registers */ |
| 552 | #define NN_LOONGARCH_LSX	"LINUX" | ||
| 457 | #define NT_LOONGARCH_LSX	0xa02	/* LoongArch Loongson SIMD Extension registers */ | 553 | #define NT_LOONGARCH_LSX	0xa02	/* LoongArch Loongson SIMD Extension registers */ |
| 554 | #define NN_LOONGARCH_LASX	"LINUX" | ||
| 458 | #define NT_LOONGARCH_LASX	0xa03	/* LoongArch Loongson Advanced SIMD Extension registers */ | 555 | #define NT_LOONGARCH_LASX	0xa03	/* LoongArch Loongson Advanced SIMD Extension registers */ |
| 556 | #define NN_LOONGARCH_LBT	"LINUX" | ||
| 459 | #define NT_LOONGARCH_LBT	0xa04	/* LoongArch Loongson Binary Translation registers */ | 557 | #define NT_LOONGARCH_LBT	0xa04	/* LoongArch Loongson Binary Translation registers */ |
| 558 | #define NN_LOONGARCH_HW_BREAK	"LINUX" | ||
| 460 | #define NT_LOONGARCH_HW_BREAK	0xa05 /* LoongArch hardware breakpoint registers */ | 559 | #define NT_LOONGARCH_HW_BREAK	0xa05 /* LoongArch hardware breakpoint registers */ |
| 560 | #define NN_LOONGARCH_HW_WATCH	"LINUX" | ||
| 461 | #define NT_LOONGARCH_HW_WATCH	0xa06 /* LoongArch hardware watchpoint registers */ | 561 | #define NT_LOONGARCH_HW_WATCH	0xa06 /* LoongArch hardware watchpoint registers */ |
| 462 | 562 | ||
| 463 | /* Note types with note name "GNU" */ | ||
| 464 | #define NT_GNU_PROPERTY_TYPE_0	5 | ||
| 465 | |||
| 466 | /* Note header in a PT_NOTE section */ | 563 | /* Note header in a PT_NOTE section */ |
| 467 | typedef struct elf32_note { | 564 | typedef struct elf32_note { |
| 468 | Elf32_Word	n_namesz;	/* Name size */ | 565 | Elf32_Word	n_namesz;	/* Name size */ |
| ... | @@ -483,4 +580,34 @@ typedef struct elf64_note { | ... | @@ -483,4 +580,34 @@ typedef struct elf64_note { |
| 483 | /* Bits for GNU_PROPERTY_AARCH64_FEATURE_1_BTI */ | 580 | /* Bits for GNU_PROPERTY_AARCH64_FEATURE_1_BTI */ |
| 484 | #define GNU_PROPERTY_AARCH64_FEATURE_1_BTI	(1U << 0) | 581 | #define GNU_PROPERTY_AARCH64_FEATURE_1_BTI	(1U << 0) |
| 485 | 582 | ||
| 583 | typedef struct { | ||
| 584 | Elf32_Half	vd_version; | ||
| 585 | Elf32_Half	vd_flags; | ||
| 586 | Elf32_Half	vd_ndx; | ||
| 587 | Elf32_Half	vd_cnt; | ||
| 588 | Elf32_Word	vd_hash; | ||
| 589 | Elf32_Word	vd_aux; | ||
| 590 | Elf32_Word	vd_next; | ||
| 591 | } Elf32_Verdef; | ||
| 592 | |||
| 593 | typedef struct { | ||
| 594 | Elf64_Half	vd_version; | ||
| 595 | Elf64_Half	vd_flags; | ||
| 596 | Elf64_Half	vd_ndx; | ||
| 597 | Elf64_Half	vd_cnt; | ||
| 598 | Elf64_Word	vd_hash; | ||
| 599 | Elf64_Word	vd_aux; | ||
| 600 | Elf64_Word	vd_next; | ||
| 601 | } Elf64_Verdef; | ||
| 602 | |||
| 603 | typedef struct { | ||
| 604 | Elf32_Word vda_name; | ||
| 605 | Elf32_Word vda_next; | ||
| 606 | } Elf32_Verdaux; | ||
| 607 | |||
| 608 | typedef struct { | ||
| 609 | Elf64_Word vda_name; | ||
| 610 | Elf64_Word vda_next; | ||
| 611 | } Elf64_Verdaux; | ||
| 612 | |||
| 486 | #endif /* _LINUX_ELF_H */ | 613 | #endif /* _LINUX_ELF_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/errqueue.h+1| ... | @@ -69,6 +69,7 @@ enum { | ... | @@ -69,6 +69,7 @@ enum { |
| 69 | 	SCM_TSTAMP_SND,		/* driver passed skb to NIC, or HW */ | 69 | 	SCM_TSTAMP_SND,		/* driver passed skb to NIC, or HW */ |
| 70 | 	SCM_TSTAMP_SCHED,	/* data entered the packet scheduler */ | 70 | 	SCM_TSTAMP_SCHED,	/* data entered the packet scheduler */ |
| 71 | 	SCM_TSTAMP_ACK,		/* data acknowledged by peer */ | 71 | 	SCM_TSTAMP_ACK,		/* data acknowledged by peer */ |
| 72 | 	SCM_TSTAMP_COMPLETION,	/* packet tx completion */ | ||
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | #endif /* _LINUX_ERRQUEUE_H */ | 75 | #endif /* _LINUX_ERRQUEUE_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ethtool.h+96-66| ... | @@ -679,6 +679,8 @@ enum ethtool_link_ext_substate_module { | ... | @@ -679,6 +679,8 @@ enum ethtool_link_ext_substate_module { |
| 679 | * @ETH_SS_STATS_ETH_MAC: names of IEEE 802.3 MAC statistics | 679 | * @ETH_SS_STATS_ETH_MAC: names of IEEE 802.3 MAC statistics |
| 680 | * @ETH_SS_STATS_ETH_CTRL: names of IEEE 802.3 MAC Control statistics | 680 | * @ETH_SS_STATS_ETH_CTRL: names of IEEE 802.3 MAC Control statistics |
| 681 | * @ETH_SS_STATS_RMON: names of RMON statistics | 681 | * @ETH_SS_STATS_RMON: names of RMON statistics |
| 682 | * @ETH_SS_STATS_PHY: names of PHY(dev) statistics | ||
| 683 | * @ETH_SS_TS_FLAGS: hardware timestamping flags | ||
| 682 | * | 684 | * |
| 683 | * @ETH_SS_COUNT: number of defined string sets | 685 | * @ETH_SS_COUNT: number of defined string sets |
| 684 | */ | 686 | */ |
| ... | @@ -704,6 +706,8 @@ enum ethtool_stringset { | ... | @@ -704,6 +706,8 @@ enum ethtool_stringset { |
| 704 | 	ETH_SS_STATS_ETH_MAC, | 706 | 	ETH_SS_STATS_ETH_MAC, |
| 705 | 	ETH_SS_STATS_ETH_CTRL, | 707 | 	ETH_SS_STATS_ETH_CTRL, |
| 706 | 	ETH_SS_STATS_RMON, | 708 | 	ETH_SS_STATS_RMON, |
| 709 | 	ETH_SS_STATS_PHY, | ||
| 710 | 	ETH_SS_TS_FLAGS, | ||
| 707 | 711 | ||
| 708 | 	/* add new constants above here */ | 712 | 	/* add new constants above here */ |
| 709 | 	ETH_SS_COUNT | 713 | 	ETH_SS_COUNT |
| ... | @@ -2053,6 +2057,24 @@ enum ethtool_link_mode_bit_indices { | ... | @@ -2053,6 +2057,24 @@ enum ethtool_link_mode_bit_indices { |
| 2053 | 	ETHTOOL_LINK_MODE_10baseT1S_Half_BIT		 = 100, | 2057 | 	ETHTOOL_LINK_MODE_10baseT1S_Half_BIT		 = 100, |
| 2054 | 	ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half_BIT	 = 101, | 2058 | 	ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half_BIT	 = 101, |
| 2055 | 	ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT		 = 102, | 2059 | 	ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT		 = 102, |
| 2060 | 	ETHTOOL_LINK_MODE_200000baseCR_Full_BIT		 = 103, | ||
| 2061 | 	ETHTOOL_LINK_MODE_200000baseKR_Full_BIT		 = 104, | ||
| 2062 | 	ETHTOOL_LINK_MODE_200000baseDR_Full_BIT		 = 105, | ||
| 2063 | 	ETHTOOL_LINK_MODE_200000baseDR_2_Full_BIT	 = 106, | ||
| 2064 | 	ETHTOOL_LINK_MODE_200000baseSR_Full_BIT		 = 107, | ||
| 2065 | 	ETHTOOL_LINK_MODE_200000baseVR_Full_BIT		 = 108, | ||
| 2066 | 	ETHTOOL_LINK_MODE_400000baseCR2_Full_BIT	 = 109, | ||
| 2067 | 	ETHTOOL_LINK_MODE_400000baseKR2_Full_BIT	 = 110, | ||
| 2068 | 	ETHTOOL_LINK_MODE_400000baseDR2_Full_BIT	 = 111, | ||
| 2069 | 	ETHTOOL_LINK_MODE_400000baseDR2_2_Full_BIT	 = 112, | ||
| 2070 | 	ETHTOOL_LINK_MODE_400000baseSR2_Full_BIT	 = 113, | ||
| 2071 | 	ETHTOOL_LINK_MODE_400000baseVR2_Full_BIT	 = 114, | ||
| 2072 | 	ETHTOOL_LINK_MODE_800000baseCR4_Full_BIT	 = 115, | ||
| 2073 | 	ETHTOOL_LINK_MODE_800000baseKR4_Full_BIT	 = 116, | ||
| 2074 | 	ETHTOOL_LINK_MODE_800000baseDR4_Full_BIT	 = 117, | ||
| 2075 | 	ETHTOOL_LINK_MODE_800000baseDR4_2_Full_BIT	 = 118, | ||
| 2076 | 	ETHTOOL_LINK_MODE_800000baseSR4_Full_BIT	 = 119, | ||
| 2077 | 	ETHTOOL_LINK_MODE_800000baseVR4_Full_BIT	 = 120, | ||
| 2056 | 2078 | ||
| 2057 | 	/* must be last entry */ | 2079 | 	/* must be last entry */ |
| 2058 | 	__ETHTOOL_LINK_MODE_MASK_NBITS | 2080 | 	__ETHTOOL_LINK_MODE_MASK_NBITS |
| ... | @@ -2265,73 +2287,81 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) | ... | @@ -2265,73 +2287,81 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) |
| 2265 | * be exploited to reduce the RSS queue spread. | 2287 | * be exploited to reduce the RSS queue spread. |
| 2266 | */ | 2288 | */ |
| 2267 | #define	RXH_XFRM_SYM_XOR	(1 << 0) | 2289 | #define	RXH_XFRM_SYM_XOR	(1 << 0) |
| 2290 | /* Similar to SYM_XOR, except that one copy of the XOR'ed fields is replaced by | ||
| 2291 | * an OR of the same fields | ||
| 2292 | */ | ||
| 2293 | #define	RXH_XFRM_SYM_OR_XOR	(1 << 1) | ||
| 2268 | #define	RXH_XFRM_NO_CHANGE	0xff | 2294 | #define	RXH_XFRM_NO_CHANGE	0xff |
| 2269 | 2295 | ||
| 2270 | /* L2-L4 network traffic flow types */ | 2296 | enum { |
| 2271 | #define	TCP_V4_FLOW	0x01	/* hash or spec (tcp_ip4_spec) */ | 2297 | 	/* L2-L4 network traffic flow types */ |
| 2272 | #define	UDP_V4_FLOW	0x02	/* hash or spec (udp_ip4_spec) */ | 2298 | 	TCP_V4_FLOW	= 0x01,	/* hash or spec (tcp_ip4_spec) */ |
| 2273 | #define	SCTP_V4_FLOW	0x03	/* hash or spec (sctp_ip4_spec) */ | 2299 | 	UDP_V4_FLOW	= 0x02,	/* hash or spec (udp_ip4_spec) */ |
| 2274 | #define	AH_ESP_V4_FLOW	0x04	/* hash only */ | 2300 | 	SCTP_V4_FLOW	= 0x03,	/* hash or spec (sctp_ip4_spec) */ |
| 2275 | #define	TCP_V6_FLOW	0x05	/* hash or spec (tcp_ip6_spec; nfc only) */ | 2301 | 	AH_ESP_V4_FLOW	= 0x04,	/* hash only */ |
| 2276 | #define	UDP_V6_FLOW	0x06	/* hash or spec (udp_ip6_spec; nfc only) */ | 2302 | 	TCP_V6_FLOW	= 0x05,	/* hash or spec (tcp_ip6_spec; nfc only) */ |
| 2277 | #define	SCTP_V6_FLOW	0x07	/* hash or spec (sctp_ip6_spec; nfc only) */ | 2303 | 	UDP_V6_FLOW	= 0x06,	/* hash or spec (udp_ip6_spec; nfc only) */ |
| 2278 | #define	AH_ESP_V6_FLOW	0x08	/* hash only */ | 2304 | 	SCTP_V6_FLOW	= 0x07,	/* hash or spec (sctp_ip6_spec; nfc only) */ |
| 2279 | #define	AH_V4_FLOW	0x09	/* hash or spec (ah_ip4_spec) */ | 2305 | 	AH_ESP_V6_FLOW	= 0x08,	/* hash only */ |
| 2280 | #define	ESP_V4_FLOW	0x0a	/* hash or spec (esp_ip4_spec) */ | 2306 | 	AH_V4_FLOW	= 0x09,	/* hash or spec (ah_ip4_spec) */ |
| 2281 | #define	AH_V6_FLOW	0x0b	/* hash or spec (ah_ip6_spec; nfc only) */ | 2307 | 	ESP_V4_FLOW	= 0x0a,	/* hash or spec (esp_ip4_spec) */ |
| 2282 | #define	ESP_V6_FLOW	0x0c	/* hash or spec (esp_ip6_spec; nfc only) */ | 2308 | 	AH_V6_FLOW	= 0x0b,	/* hash or spec (ah_ip6_spec; nfc only) */ |
| 2283 | #define	IPV4_USER_FLOW	0x0d	/* spec only (usr_ip4_spec) */ | 2309 | 	ESP_V6_FLOW	= 0x0c,	/* hash or spec (esp_ip6_spec; nfc only) */ |
| 2284 | #define	IP_USER_FLOW	IPV4_USER_FLOW | 2310 | 	IPV4_USER_FLOW	= 0x0d,	/* spec only (usr_ip4_spec) */ |
| 2285 | #define	IPV6_USER_FLOW	0x0e	/* spec only (usr_ip6_spec; nfc only) */ | 2311 | 	IP_USER_FLOW	= IPV4_USER_FLOW, |
| 2286 | #define	IPV4_FLOW	0x10	/* hash only */ | 2312 | 	IPV6_USER_FLOW	= 0x0e, /* spec only (usr_ip6_spec; nfc only) */ |
| 2287 | #define	IPV6_FLOW	0x11	/* hash only */ | 2313 | 	IPV4_FLOW	= 0x10, /* hash only */ |
| 2288 | #define	ETHER_FLOW	0x12	/* spec only (ether_spec) */ | 2314 | 	IPV6_FLOW	= 0x11, /* hash only */ |
| 2289 | 2315 | 	ETHER_FLOW	= 0x12, /* hash or spec (ether_spec) */ | |
| 2290 | /* Used for GTP-U IPv4 and IPv6. | 2316 | |
| 2291 | * The format of GTP packets only includes | 2317 | 	/* Used for GTP-U IPv4 and IPv6. |
| 2292 | * elements such as TEID and GTP version. | 2318 | 	 * The format of GTP packets only includes |
| 2293 | * It is primarily intended for data communication of the UE. | 2319 | 	 * elements such as TEID and GTP version. |
| 2294 | */ | 2320 | 	 * It is primarily intended for data communication of the UE. |
| 2295 | #define GTPU_V4_FLOW 0x13	/* hash only */ | 2321 | 	 */ |
| 2296 | #define GTPU_V6_FLOW 0x14	/* hash only */ | 2322 | 	GTPU_V4_FLOW	= 0x13,	/* hash only */ |
| 2297 | 2323 | 	GTPU_V6_FLOW	= 0x14,	/* hash only */ | |
| 2298 | /* Use for GTP-C IPv4 and v6. | 2324 | |
| 2299 | * The format of these GTP packets does not include TEID. | 2325 | 	/* Use for GTP-C IPv4 and v6. |
| 2300 | * Primarily expected to be used for communication | 2326 | 	 * The format of these GTP packets does not include TEID. |
| 2301 | * to create sessions for UE data communication, | 2327 | 	 * Primarily expected to be used for communication |
| 2302 | * commonly referred to as CSR (Create Session Request). | 2328 | 	 * to create sessions for UE data communication, |
| 2303 | */ | 2329 | 	 * commonly referred to as CSR (Create Session Request). |
| 2304 | #define GTPC_V4_FLOW 0x15	/* hash only */ | 2330 | 	 */ |
| 2305 | #define GTPC_V6_FLOW 0x16	/* hash only */ | 2331 | 	GTPC_V4_FLOW	= 0x15,	/* hash only */ |
| 2306 | 2332 | 	GTPC_V6_FLOW	= 0x16,	/* hash only */ | |
| 2307 | /* Use for GTP-C IPv4 and v6. | 2333 | |
| 2308 | * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID. | 2334 | 	/* Use for GTP-C IPv4 and v6. |
| 2309 | * After session creation, it becomes this packet. | 2335 | 	 * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID. |
| 2310 | * This is mainly used for requests to realize UE handover. | 2336 | 	 * After session creation, it becomes this packet. |
| 2311 | */ | 2337 | 	 * This is mainly used for requests to realize UE handover. |
| 2312 | #define GTPC_TEID_V4_FLOW 0x17	/* hash only */ | 2338 | 	 */ |
| 2313 | #define GTPC_TEID_V6_FLOW 0x18	/* hash only */ | 2339 | 	GTPC_TEID_V4_FLOW	= 0x17,	/* hash only */ |
| 2314 | 2340 | 	GTPC_TEID_V6_FLOW	= 0x18,	/* hash only */ | |
| 2315 | /* Use for GTP-U and extended headers for the PSC (PDU Session Container). | 2341 | |
| 2316 | * The format of these GTP packets includes TEID and QFI. | 2342 | 	/* Use for GTP-U and extended headers for the PSC (PDU Session Container). |
| 2317 | * In 5G communication using UPF (User Plane Function), | 2343 | 	 * The format of these GTP packets includes TEID and QFI. |
| 2318 | * data communication with this extended header is performed. | 2344 | 	 * In 5G communication using UPF (User Plane Function), |
| 2319 | */ | 2345 | 	 * data communication with this extended header is performed. |
| 2320 | #define GTPU_EH_V4_FLOW 0x19	/* hash only */ | 2346 | 	 */ |
| 2321 | #define GTPU_EH_V6_FLOW 0x1a	/* hash only */ | 2347 | 	GTPU_EH_V4_FLOW	= 0x19,	/* hash only */ |
| 2322 | 2348 | 	GTPU_EH_V6_FLOW	= 0x1a,	/* hash only */ | |
| 2323 | /* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers. | 2349 | |
| 2324 | * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by | 2350 | 	/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers. |
| 2325 | * UL/DL included in the PSC. | 2351 | 	 * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by |
| 2326 | * There are differences in the data included based on Downlink/Uplink, | 2352 | 	 * UL/DL included in the PSC. |
| 2327 | * and can be used to distinguish packets. | 2353 | 	 * There are differences in the data included based on Downlink/Uplink, |
| 2328 | * The functions described so far are useful when you want to | 2354 | 	 * and can be used to distinguish packets. |
| 2329 | * handle communication from the mobile network in UPF, PGW, etc. | 2355 | 	 * The functions described so far are useful when you want to |
| 2330 | */ | 2356 | 	 * handle communication from the mobile network in UPF, PGW, etc. |
| 2331 | #define GTPU_UL_V4_FLOW 0x1b	/* hash only */ | 2357 | 	 */ |
| 2332 | #define GTPU_UL_V6_FLOW 0x1c	/* hash only */ | 2358 | 	GTPU_UL_V4_FLOW	= 0x1b,	/* hash only */ |
| 2333 | #define GTPU_DL_V4_FLOW 0x1d	/* hash only */ | 2359 | 	GTPU_UL_V6_FLOW	= 0x1c,	/* hash only */ |
| 2334 | #define GTPU_DL_V6_FLOW 0x1e	/* hash only */ | 2360 | 	GTPU_DL_V4_FLOW	= 0x1d,	/* hash only */ |
| 2361 | 	GTPU_DL_V6_FLOW	= 0x1e,	/* hash only */ | ||
| 2362 | |||
| 2363 | 	__FLOW_TYPE_COUNT, | ||
| 2364 | }; | ||
| 2335 | 2365 | ||
| 2336 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ | 2366 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ |
| 2337 | #define	FLOW_EXT	0x80000000 | 2367 | #define	FLOW_EXT	0x80000000 |
| ... | @@ -2339,7 +2369,7 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) | ... | @@ -2339,7 +2369,7 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) |
| 2339 | /* Flag to enable RSS spreading of traffic matching rule (nfc only) */ | 2369 | /* Flag to enable RSS spreading of traffic matching rule (nfc only) */ |
| 2340 | #define	FLOW_RSS	0x20000000 | 2370 | #define	FLOW_RSS	0x20000000 |
| 2341 | 2371 | ||
| 2342 | /* L3-L4 network traffic flow hash options */ | 2372 | /* L2-L4 network traffic flow hash options */ |
| 2343 | #define	RXH_L2DA	(1 << 1) | 2373 | #define	RXH_L2DA	(1 << 1) |
| 2344 | #define	RXH_VLAN	(1 << 2) | 2374 | #define	RXH_VLAN	(1 << 2) |
| 2345 | #define	RXH_L3_PROTO	(1 << 3) | 2375 | #define	RXH_L3_PROTO	(1 << 3) |
lib/libc/include/any-linux-any/linux/ethtool_netlink.h+11-894| ... | @@ -10,545 +10,12 @@ | ... | @@ -10,545 +10,12 @@ |
| 10 | #define _LINUX_ETHTOOL_NETLINK_H_ | 10 | #define _LINUX_ETHTOOL_NETLINK_H_ |
| 11 | 11 | ||
| 12 | #include <linux/ethtool.h> | 12 | #include <linux/ethtool.h> |
| 13 | 13 | #include <linux/ethtool_netlink_generated.h> | |
| 14 | /* message types - userspace to kernel */ | ||
| 15 | enum { | ||
| 16 | 	ETHTOOL_MSG_USER_NONE, | ||
| 17 | 	ETHTOOL_MSG_STRSET_GET, | ||
| 18 | 	ETHTOOL_MSG_LINKINFO_GET, | ||
| 19 | 	ETHTOOL_MSG_LINKINFO_SET, | ||
| 20 | 	ETHTOOL_MSG_LINKMODES_GET, | ||
| 21 | 	ETHTOOL_MSG_LINKMODES_SET, | ||
| 22 | 	ETHTOOL_MSG_LINKSTATE_GET, | ||
| 23 | 	ETHTOOL_MSG_DEBUG_GET, | ||
| 24 | 	ETHTOOL_MSG_DEBUG_SET, | ||
| 25 | 	ETHTOOL_MSG_WOL_GET, | ||
| 26 | 	ETHTOOL_MSG_WOL_SET, | ||
| 27 | 	ETHTOOL_MSG_FEATURES_GET, | ||
| 28 | 	ETHTOOL_MSG_FEATURES_SET, | ||
| 29 | 	ETHTOOL_MSG_PRIVFLAGS_GET, | ||
| 30 | 	ETHTOOL_MSG_PRIVFLAGS_SET, | ||
| 31 | 	ETHTOOL_MSG_RINGS_GET, | ||
| 32 | 	ETHTOOL_MSG_RINGS_SET, | ||
| 33 | 	ETHTOOL_MSG_CHANNELS_GET, | ||
| 34 | 	ETHTOOL_MSG_CHANNELS_SET, | ||
| 35 | 	ETHTOOL_MSG_COALESCE_GET, | ||
| 36 | 	ETHTOOL_MSG_COALESCE_SET, | ||
| 37 | 	ETHTOOL_MSG_PAUSE_GET, | ||
| 38 | 	ETHTOOL_MSG_PAUSE_SET, | ||
| 39 | 	ETHTOOL_MSG_EEE_GET, | ||
| 40 | 	ETHTOOL_MSG_EEE_SET, | ||
| 41 | 	ETHTOOL_MSG_TSINFO_GET, | ||
| 42 | 	ETHTOOL_MSG_CABLE_TEST_ACT, | ||
| 43 | 	ETHTOOL_MSG_CABLE_TEST_TDR_ACT, | ||
| 44 | 	ETHTOOL_MSG_TUNNEL_INFO_GET, | ||
| 45 | 	ETHTOOL_MSG_FEC_GET, | ||
| 46 | 	ETHTOOL_MSG_FEC_SET, | ||
| 47 | 	ETHTOOL_MSG_MODULE_EEPROM_GET, | ||
| 48 | 	ETHTOOL_MSG_STATS_GET, | ||
| 49 | 	ETHTOOL_MSG_PHC_VCLOCKS_GET, | ||
| 50 | 	ETHTOOL_MSG_MODULE_GET, | ||
| 51 | 	ETHTOOL_MSG_MODULE_SET, | ||
| 52 | 	ETHTOOL_MSG_PSE_GET, | ||
| 53 | 	ETHTOOL_MSG_PSE_SET, | ||
| 54 | 	ETHTOOL_MSG_RSS_GET, | ||
| 55 | 	ETHTOOL_MSG_PLCA_GET_CFG, | ||
| 56 | 	ETHTOOL_MSG_PLCA_SET_CFG, | ||
| 57 | 	ETHTOOL_MSG_PLCA_GET_STATUS, | ||
| 58 | 	ETHTOOL_MSG_MM_GET, | ||
| 59 | 	ETHTOOL_MSG_MM_SET, | ||
| 60 | 	ETHTOOL_MSG_MODULE_FW_FLASH_ACT, | ||
| 61 | 	ETHTOOL_MSG_PHY_GET, | ||
| 62 | |||
| 63 | 	/* add new constants above here */ | ||
| 64 | 	__ETHTOOL_MSG_USER_CNT, | ||
| 65 | 	ETHTOOL_MSG_USER_MAX = __ETHTOOL_MSG_USER_CNT - 1 | ||
| 66 | }; | ||
| 67 | |||
| 68 | /* message types - kernel to userspace */ | ||
| 69 | enum { | ||
| 70 | 	ETHTOOL_MSG_KERNEL_NONE, | ||
| 71 | 	ETHTOOL_MSG_STRSET_GET_REPLY, | ||
| 72 | 	ETHTOOL_MSG_LINKINFO_GET_REPLY, | ||
| 73 | 	ETHTOOL_MSG_LINKINFO_NTF, | ||
| 74 | 	ETHTOOL_MSG_LINKMODES_GET_REPLY, | ||
| 75 | 	ETHTOOL_MSG_LINKMODES_NTF, | ||
| 76 | 	ETHTOOL_MSG_LINKSTATE_GET_REPLY, | ||
| 77 | 	ETHTOOL_MSG_DEBUG_GET_REPLY, | ||
| 78 | 	ETHTOOL_MSG_DEBUG_NTF, | ||
| 79 | 	ETHTOOL_MSG_WOL_GET_REPLY, | ||
| 80 | 	ETHTOOL_MSG_WOL_NTF, | ||
| 81 | 	ETHTOOL_MSG_FEATURES_GET_REPLY, | ||
| 82 | 	ETHTOOL_MSG_FEATURES_SET_REPLY, | ||
| 83 | 	ETHTOOL_MSG_FEATURES_NTF, | ||
| 84 | 	ETHTOOL_MSG_PRIVFLAGS_GET_REPLY, | ||
| 85 | 	ETHTOOL_MSG_PRIVFLAGS_NTF, | ||
| 86 | 	ETHTOOL_MSG_RINGS_GET_REPLY, | ||
| 87 | 	ETHTOOL_MSG_RINGS_NTF, | ||
| 88 | 	ETHTOOL_MSG_CHANNELS_GET_REPLY, | ||
| 89 | 	ETHTOOL_MSG_CHANNELS_NTF, | ||
| 90 | 	ETHTOOL_MSG_COALESCE_GET_REPLY, | ||
| 91 | 	ETHTOOL_MSG_COALESCE_NTF, | ||
| 92 | 	ETHTOOL_MSG_PAUSE_GET_REPLY, | ||
| 93 | 	ETHTOOL_MSG_PAUSE_NTF, | ||
| 94 | 	ETHTOOL_MSG_EEE_GET_REPLY, | ||
| 95 | 	ETHTOOL_MSG_EEE_NTF, | ||
| 96 | 	ETHTOOL_MSG_TSINFO_GET_REPLY, | ||
| 97 | 	ETHTOOL_MSG_CABLE_TEST_NTF, | ||
| 98 | 	ETHTOOL_MSG_CABLE_TEST_TDR_NTF, | ||
| 99 | 	ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY, | ||
| 100 | 	ETHTOOL_MSG_FEC_GET_REPLY, | ||
| 101 | 	ETHTOOL_MSG_FEC_NTF, | ||
| 102 | 	ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY, | ||
| 103 | 	ETHTOOL_MSG_STATS_GET_REPLY, | ||
| 104 | 	ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY, | ||
| 105 | 	ETHTOOL_MSG_MODULE_GET_REPLY, | ||
| 106 | 	ETHTOOL_MSG_MODULE_NTF, | ||
| 107 | 	ETHTOOL_MSG_PSE_GET_REPLY, | ||
| 108 | 	ETHTOOL_MSG_RSS_GET_REPLY, | ||
| 109 | 	ETHTOOL_MSG_PLCA_GET_CFG_REPLY, | ||
| 110 | 	ETHTOOL_MSG_PLCA_GET_STATUS_REPLY, | ||
| 111 | 	ETHTOOL_MSG_PLCA_NTF, | ||
| 112 | 	ETHTOOL_MSG_MM_GET_REPLY, | ||
| 113 | 	ETHTOOL_MSG_MM_NTF, | ||
| 114 | 	ETHTOOL_MSG_MODULE_FW_FLASH_NTF, | ||
| 115 | 	ETHTOOL_MSG_PHY_GET_REPLY, | ||
| 116 | 	ETHTOOL_MSG_PHY_NTF, | ||
| 117 | |||
| 118 | 	/* add new constants above here */ | ||
| 119 | 	__ETHTOOL_MSG_KERNEL_CNT, | ||
| 120 | 	ETHTOOL_MSG_KERNEL_MAX = __ETHTOOL_MSG_KERNEL_CNT - 1 | ||
| 121 | }; | ||
| 122 | |||
| 123 | /* request header */ | ||
| 124 | |||
| 125 | enum ethtool_header_flags { | ||
| 126 | 	ETHTOOL_FLAG_COMPACT_BITSETS	= 1 << 0,	/* use compact bitsets in reply */ | ||
| 127 | 	ETHTOOL_FLAG_OMIT_REPLY		= 1 << 1,	/* provide optional reply for SET or ACT requests */ | ||
| 128 | 	ETHTOOL_FLAG_STATS		= 1 << 2,	/* request statistics, if supported by the driver */ | ||
| 129 | }; | ||
| 130 | 14 | ||
| 131 | #define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \ | 15 | #define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \ |
| 132 | 			 ETHTOOL_FLAG_OMIT_REPLY | \ | 16 | 			 ETHTOOL_FLAG_OMIT_REPLY | \ |
| 133 | 			 ETHTOOL_FLAG_STATS) | 17 | 			 ETHTOOL_FLAG_STATS) |
| 134 | 18 | ||
| 135 | enum { | ||
| 136 | 	ETHTOOL_A_HEADER_UNSPEC, | ||
| 137 | 	ETHTOOL_A_HEADER_DEV_INDEX,		/* u32 */ | ||
| 138 | 	ETHTOOL_A_HEADER_DEV_NAME,		/* string */ | ||
| 139 | 	ETHTOOL_A_HEADER_FLAGS,			/* u32 - ETHTOOL_FLAG_* */ | ||
| 140 | 	ETHTOOL_A_HEADER_PHY_INDEX,		/* u32 */ | ||
| 141 | |||
| 142 | 	/* add new constants above here */ | ||
| 143 | 	__ETHTOOL_A_HEADER_CNT, | ||
| 144 | 	ETHTOOL_A_HEADER_MAX = __ETHTOOL_A_HEADER_CNT - 1 | ||
| 145 | }; | ||
| 146 | |||
| 147 | /* bit sets */ | ||
| 148 | |||
| 149 | enum { | ||
| 150 | 	ETHTOOL_A_BITSET_BIT_UNSPEC, | ||
| 151 | 	ETHTOOL_A_BITSET_BIT_INDEX,		/* u32 */ | ||
| 152 | 	ETHTOOL_A_BITSET_BIT_NAME,		/* string */ | ||
| 153 | 	ETHTOOL_A_BITSET_BIT_VALUE,		/* flag */ | ||
| 154 | |||
| 155 | 	/* add new constants above here */ | ||
| 156 | 	__ETHTOOL_A_BITSET_BIT_CNT, | ||
| 157 | 	ETHTOOL_A_BITSET_BIT_MAX = __ETHTOOL_A_BITSET_BIT_CNT - 1 | ||
| 158 | }; | ||
| 159 | |||
| 160 | enum { | ||
| 161 | 	ETHTOOL_A_BITSET_BITS_UNSPEC, | ||
| 162 | 	ETHTOOL_A_BITSET_BITS_BIT,		/* nest - _A_BITSET_BIT_* */ | ||
| 163 | |||
| 164 | 	/* add new constants above here */ | ||
| 165 | 	__ETHTOOL_A_BITSET_BITS_CNT, | ||
| 166 | 	ETHTOOL_A_BITSET_BITS_MAX = __ETHTOOL_A_BITSET_BITS_CNT - 1 | ||
| 167 | }; | ||
| 168 | |||
| 169 | enum { | ||
| 170 | 	ETHTOOL_A_BITSET_UNSPEC, | ||
| 171 | 	ETHTOOL_A_BITSET_NOMASK,		/* flag */ | ||
| 172 | 	ETHTOOL_A_BITSET_SIZE,			/* u32 */ | ||
| 173 | 	ETHTOOL_A_BITSET_BITS,			/* nest - _A_BITSET_BITS_* */ | ||
| 174 | 	ETHTOOL_A_BITSET_VALUE,			/* binary */ | ||
| 175 | 	ETHTOOL_A_BITSET_MASK,			/* binary */ | ||
| 176 | |||
| 177 | 	/* add new constants above here */ | ||
| 178 | 	__ETHTOOL_A_BITSET_CNT, | ||
| 179 | 	ETHTOOL_A_BITSET_MAX = __ETHTOOL_A_BITSET_CNT - 1 | ||
| 180 | }; | ||
| 181 | |||
| 182 | /* string sets */ | ||
| 183 | |||
| 184 | enum { | ||
| 185 | 	ETHTOOL_A_STRING_UNSPEC, | ||
| 186 | 	ETHTOOL_A_STRING_INDEX,			/* u32 */ | ||
| 187 | 	ETHTOOL_A_STRING_VALUE,			/* string */ | ||
| 188 | |||
| 189 | 	/* add new constants above here */ | ||
| 190 | 	__ETHTOOL_A_STRING_CNT, | ||
| 191 | 	ETHTOOL_A_STRING_MAX = __ETHTOOL_A_STRING_CNT - 1 | ||
| 192 | }; | ||
| 193 | |||
| 194 | enum { | ||
| 195 | 	ETHTOOL_A_STRINGS_UNSPEC, | ||
| 196 | 	ETHTOOL_A_STRINGS_STRING,		/* nest - _A_STRINGS_* */ | ||
| 197 | |||
| 198 | 	/* add new constants above here */ | ||
| 199 | 	__ETHTOOL_A_STRINGS_CNT, | ||
| 200 | 	ETHTOOL_A_STRINGS_MAX = __ETHTOOL_A_STRINGS_CNT - 1 | ||
| 201 | }; | ||
| 202 | |||
| 203 | enum { | ||
| 204 | 	ETHTOOL_A_STRINGSET_UNSPEC, | ||
| 205 | 	ETHTOOL_A_STRINGSET_ID,			/* u32 */ | ||
| 206 | 	ETHTOOL_A_STRINGSET_COUNT,		/* u32 */ | ||
| 207 | 	ETHTOOL_A_STRINGSET_STRINGS,		/* nest - _A_STRINGS_* */ | ||
| 208 | |||
| 209 | 	/* add new constants above here */ | ||
| 210 | 	__ETHTOOL_A_STRINGSET_CNT, | ||
| 211 | 	ETHTOOL_A_STRINGSET_MAX = __ETHTOOL_A_STRINGSET_CNT - 1 | ||
| 212 | }; | ||
| 213 | |||
| 214 | enum { | ||
| 215 | 	ETHTOOL_A_STRINGSETS_UNSPEC, | ||
| 216 | 	ETHTOOL_A_STRINGSETS_STRINGSET,		/* nest - _A_STRINGSET_* */ | ||
| 217 | |||
| 218 | 	/* add new constants above here */ | ||
| 219 | 	__ETHTOOL_A_STRINGSETS_CNT, | ||
| 220 | 	ETHTOOL_A_STRINGSETS_MAX = __ETHTOOL_A_STRINGSETS_CNT - 1 | ||
| 221 | }; | ||
| 222 | |||
| 223 | /* STRSET */ | ||
| 224 | |||
| 225 | enum { | ||
| 226 | 	ETHTOOL_A_STRSET_UNSPEC, | ||
| 227 | 	ETHTOOL_A_STRSET_HEADER,		/* nest - _A_HEADER_* */ | ||
| 228 | 	ETHTOOL_A_STRSET_STRINGSETS,		/* nest - _A_STRINGSETS_* */ | ||
| 229 | 	ETHTOOL_A_STRSET_COUNTS_ONLY,		/* flag */ | ||
| 230 | |||
| 231 | 	/* add new constants above here */ | ||
| 232 | 	__ETHTOOL_A_STRSET_CNT, | ||
| 233 | 	ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1 | ||
| 234 | }; | ||
| 235 | |||
| 236 | /* LINKINFO */ | ||
| 237 | |||
| 238 | enum { | ||
| 239 | 	ETHTOOL_A_LINKINFO_UNSPEC, | ||
| 240 | 	ETHTOOL_A_LINKINFO_HEADER,		/* nest - _A_HEADER_* */ | ||
| 241 | 	ETHTOOL_A_LINKINFO_PORT,		/* u8 */ | ||
| 242 | 	ETHTOOL_A_LINKINFO_PHYADDR,		/* u8 */ | ||
| 243 | 	ETHTOOL_A_LINKINFO_TP_MDIX,		/* u8 */ | ||
| 244 | 	ETHTOOL_A_LINKINFO_TP_MDIX_CTRL,	/* u8 */ | ||
| 245 | 	ETHTOOL_A_LINKINFO_TRANSCEIVER,		/* u8 */ | ||
| 246 | |||
| 247 | 	/* add new constants above here */ | ||
| 248 | 	__ETHTOOL_A_LINKINFO_CNT, | ||
| 249 | 	ETHTOOL_A_LINKINFO_MAX = __ETHTOOL_A_LINKINFO_CNT - 1 | ||
| 250 | }; | ||
| 251 | |||
| 252 | /* LINKMODES */ | ||
| 253 | |||
| 254 | enum { | ||
| 255 | 	ETHTOOL_A_LINKMODES_UNSPEC, | ||
| 256 | 	ETHTOOL_A_LINKMODES_HEADER,		/* nest - _A_HEADER_* */ | ||
| 257 | 	ETHTOOL_A_LINKMODES_AUTONEG,		/* u8 */ | ||
| 258 | 	ETHTOOL_A_LINKMODES_OURS,		/* bitset */ | ||
| 259 | 	ETHTOOL_A_LINKMODES_PEER,		/* bitset */ | ||
| 260 | 	ETHTOOL_A_LINKMODES_SPEED,		/* u32 */ | ||
| 261 | 	ETHTOOL_A_LINKMODES_DUPLEX,		/* u8 */ | ||
| 262 | 	ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG,	/* u8 */ | ||
| 263 | 	ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE,	/* u8 */ | ||
| 264 | 	ETHTOOL_A_LINKMODES_LANES,		/* u32 */ | ||
| 265 | 	ETHTOOL_A_LINKMODES_RATE_MATCHING,	/* u8 */ | ||
| 266 | |||
| 267 | 	/* add new constants above here */ | ||
| 268 | 	__ETHTOOL_A_LINKMODES_CNT, | ||
| 269 | 	ETHTOOL_A_LINKMODES_MAX = __ETHTOOL_A_LINKMODES_CNT - 1 | ||
| 270 | }; | ||
| 271 | |||
| 272 | /* LINKSTATE */ | ||
| 273 | |||
| 274 | enum { | ||
| 275 | 	ETHTOOL_A_LINKSTATE_UNSPEC, | ||
| 276 | 	ETHTOOL_A_LINKSTATE_HEADER,		/* nest - _A_HEADER_* */ | ||
| 277 | 	ETHTOOL_A_LINKSTATE_LINK,		/* u8 */ | ||
| 278 | 	ETHTOOL_A_LINKSTATE_SQI,		/* u32 */ | ||
| 279 | 	ETHTOOL_A_LINKSTATE_SQI_MAX,		/* u32 */ | ||
| 280 | 	ETHTOOL_A_LINKSTATE_EXT_STATE,		/* u8 */ | ||
| 281 | 	ETHTOOL_A_LINKSTATE_EXT_SUBSTATE,	/* u8 */ | ||
| 282 | 	ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT,	/* u32 */ | ||
| 283 | |||
| 284 | 	/* add new constants above here */ | ||
| 285 | 	__ETHTOOL_A_LINKSTATE_CNT, | ||
| 286 | 	ETHTOOL_A_LINKSTATE_MAX = __ETHTOOL_A_LINKSTATE_CNT - 1 | ||
| 287 | }; | ||
| 288 | |||
| 289 | /* DEBUG */ | ||
| 290 | |||
| 291 | enum { | ||
| 292 | 	ETHTOOL_A_DEBUG_UNSPEC, | ||
| 293 | 	ETHTOOL_A_DEBUG_HEADER,			/* nest - _A_HEADER_* */ | ||
| 294 | 	ETHTOOL_A_DEBUG_MSGMASK,		/* bitset */ | ||
| 295 | |||
| 296 | 	/* add new constants above here */ | ||
| 297 | 	__ETHTOOL_A_DEBUG_CNT, | ||
| 298 | 	ETHTOOL_A_DEBUG_MAX = __ETHTOOL_A_DEBUG_CNT - 1 | ||
| 299 | }; | ||
| 300 | |||
| 301 | /* WOL */ | ||
| 302 | |||
| 303 | enum { | ||
| 304 | 	ETHTOOL_A_WOL_UNSPEC, | ||
| 305 | 	ETHTOOL_A_WOL_HEADER,			/* nest - _A_HEADER_* */ | ||
| 306 | 	ETHTOOL_A_WOL_MODES,			/* bitset */ | ||
| 307 | 	ETHTOOL_A_WOL_SOPASS,			/* binary */ | ||
| 308 | |||
| 309 | 	/* add new constants above here */ | ||
| 310 | 	__ETHTOOL_A_WOL_CNT, | ||
| 311 | 	ETHTOOL_A_WOL_MAX = __ETHTOOL_A_WOL_CNT - 1 | ||
| 312 | }; | ||
| 313 | |||
| 314 | /* FEATURES */ | ||
| 315 | |||
| 316 | enum { | ||
| 317 | 	ETHTOOL_A_FEATURES_UNSPEC, | ||
| 318 | 	ETHTOOL_A_FEATURES_HEADER,			/* nest - _A_HEADER_* */ | ||
| 319 | 	ETHTOOL_A_FEATURES_HW,				/* bitset */ | ||
| 320 | 	ETHTOOL_A_FEATURES_WANTED,			/* bitset */ | ||
| 321 | 	ETHTOOL_A_FEATURES_ACTIVE,			/* bitset */ | ||
| 322 | 	ETHTOOL_A_FEATURES_NOCHANGE,			/* bitset */ | ||
| 323 | |||
| 324 | 	/* add new constants above here */ | ||
| 325 | 	__ETHTOOL_A_FEATURES_CNT, | ||
| 326 | 	ETHTOOL_A_FEATURES_MAX = __ETHTOOL_A_FEATURES_CNT - 1 | ||
| 327 | }; | ||
| 328 | |||
| 329 | /* PRIVFLAGS */ | ||
| 330 | |||
| 331 | enum { | ||
| 332 | 	ETHTOOL_A_PRIVFLAGS_UNSPEC, | ||
| 333 | 	ETHTOOL_A_PRIVFLAGS_HEADER,			/* nest - _A_HEADER_* */ | ||
| 334 | 	ETHTOOL_A_PRIVFLAGS_FLAGS,			/* bitset */ | ||
| 335 | |||
| 336 | 	/* add new constants above here */ | ||
| 337 | 	__ETHTOOL_A_PRIVFLAGS_CNT, | ||
| 338 | 	ETHTOOL_A_PRIVFLAGS_MAX = __ETHTOOL_A_PRIVFLAGS_CNT - 1 | ||
| 339 | }; | ||
| 340 | |||
| 341 | /* RINGS */ | ||
| 342 | |||
| 343 | enum { | ||
| 344 | 	ETHTOOL_TCP_DATA_SPLIT_UNKNOWN = 0, | ||
| 345 | 	ETHTOOL_TCP_DATA_SPLIT_DISABLED, | ||
| 346 | 	ETHTOOL_TCP_DATA_SPLIT_ENABLED, | ||
| 347 | }; | ||
| 348 | |||
| 349 | enum { | ||
| 350 | 	ETHTOOL_A_RINGS_UNSPEC, | ||
| 351 | 	ETHTOOL_A_RINGS_HEADER,				/* nest - _A_HEADER_* */ | ||
| 352 | 	ETHTOOL_A_RINGS_RX_MAX,				/* u32 */ | ||
| 353 | 	ETHTOOL_A_RINGS_RX_MINI_MAX,			/* u32 */ | ||
| 354 | 	ETHTOOL_A_RINGS_RX_JUMBO_MAX,			/* u32 */ | ||
| 355 | 	ETHTOOL_A_RINGS_TX_MAX,				/* u32 */ | ||
| 356 | 	ETHTOOL_A_RINGS_RX,				/* u32 */ | ||
| 357 | 	ETHTOOL_A_RINGS_RX_MINI,			/* u32 */ | ||
| 358 | 	ETHTOOL_A_RINGS_RX_JUMBO,			/* u32 */ | ||
| 359 | 	ETHTOOL_A_RINGS_TX,				/* u32 */ | ||
| 360 | 	ETHTOOL_A_RINGS_RX_BUF_LEN, /* u32 */ | ||
| 361 | 	ETHTOOL_A_RINGS_TCP_DATA_SPLIT,			/* u8 */ | ||
| 362 | 	ETHTOOL_A_RINGS_CQE_SIZE,			/* u32 */ | ||
| 363 | 	ETHTOOL_A_RINGS_TX_PUSH,			/* u8 */ | ||
| 364 | 	ETHTOOL_A_RINGS_RX_PUSH,			/* u8 */ | ||
| 365 | 	ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN,		/* u32 */ | ||
| 366 | 	ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX,		/* u32 */ | ||
| 367 | |||
| 368 | 	/* add new constants above here */ | ||
| 369 | 	__ETHTOOL_A_RINGS_CNT, | ||
| 370 | 	ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1) | ||
| 371 | }; | ||
| 372 | |||
| 373 | /* CHANNELS */ | ||
| 374 | |||
| 375 | enum { | ||
| 376 | 	ETHTOOL_A_CHANNELS_UNSPEC, | ||
| 377 | 	ETHTOOL_A_CHANNELS_HEADER,			/* nest - _A_HEADER_* */ | ||
| 378 | 	ETHTOOL_A_CHANNELS_RX_MAX,			/* u32 */ | ||
| 379 | 	ETHTOOL_A_CHANNELS_TX_MAX,			/* u32 */ | ||
| 380 | 	ETHTOOL_A_CHANNELS_OTHER_MAX,			/* u32 */ | ||
| 381 | 	ETHTOOL_A_CHANNELS_COMBINED_MAX,		/* u32 */ | ||
| 382 | 	ETHTOOL_A_CHANNELS_RX_COUNT,			/* u32 */ | ||
| 383 | 	ETHTOOL_A_CHANNELS_TX_COUNT,			/* u32 */ | ||
| 384 | 	ETHTOOL_A_CHANNELS_OTHER_COUNT,			/* u32 */ | ||
| 385 | 	ETHTOOL_A_CHANNELS_COMBINED_COUNT,		/* u32 */ | ||
| 386 | |||
| 387 | 	/* add new constants above here */ | ||
| 388 | 	__ETHTOOL_A_CHANNELS_CNT, | ||
| 389 | 	ETHTOOL_A_CHANNELS_MAX = (__ETHTOOL_A_CHANNELS_CNT - 1) | ||
| 390 | }; | ||
| 391 | |||
| 392 | /* COALESCE */ | ||
| 393 | |||
| 394 | enum { | ||
| 395 | 	ETHTOOL_A_COALESCE_UNSPEC, | ||
| 396 | 	ETHTOOL_A_COALESCE_HEADER,			/* nest - _A_HEADER_* */ | ||
| 397 | 	ETHTOOL_A_COALESCE_RX_USECS,			/* u32 */ | ||
| 398 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES,		/* u32 */ | ||
| 399 | 	ETHTOOL_A_COALESCE_RX_USECS_IRQ,		/* u32 */ | ||
| 400 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ,		/* u32 */ | ||
| 401 | 	ETHTOOL_A_COALESCE_TX_USECS,			/* u32 */ | ||
| 402 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES,		/* u32 */ | ||
| 403 | 	ETHTOOL_A_COALESCE_TX_USECS_IRQ,		/* u32 */ | ||
| 404 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ,		/* u32 */ | ||
| 405 | 	ETHTOOL_A_COALESCE_STATS_BLOCK_USECS,		/* u32 */ | ||
| 406 | 	ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX,		/* u8 */ | ||
| 407 | 	ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX,		/* u8 */ | ||
| 408 | 	ETHTOOL_A_COALESCE_PKT_RATE_LOW,		/* u32 */ | ||
| 409 | 	ETHTOOL_A_COALESCE_RX_USECS_LOW,		/* u32 */ | ||
| 410 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW,		/* u32 */ | ||
| 411 | 	ETHTOOL_A_COALESCE_TX_USECS_LOW,		/* u32 */ | ||
| 412 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW,		/* u32 */ | ||
| 413 | 	ETHTOOL_A_COALESCE_PKT_RATE_HIGH,		/* u32 */ | ||
| 414 | 	ETHTOOL_A_COALESCE_RX_USECS_HIGH,		/* u32 */ | ||
| 415 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH,		/* u32 */ | ||
| 416 | 	ETHTOOL_A_COALESCE_TX_USECS_HIGH,		/* u32 */ | ||
| 417 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH,		/* u32 */ | ||
| 418 | 	ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL,	/* u32 */ | ||
| 419 | 	ETHTOOL_A_COALESCE_USE_CQE_MODE_TX,		/* u8 */ | ||
| 420 | 	ETHTOOL_A_COALESCE_USE_CQE_MODE_RX,		/* u8 */ | ||
| 421 | 	ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES,		/* u32 */ | ||
| 422 | 	ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES,		/* u32 */ | ||
| 423 | 	ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS,		/* u32 */ | ||
| 424 | 	/* nest - _A_PROFILE_IRQ_MODERATION */ | ||
| 425 | 	ETHTOOL_A_COALESCE_RX_PROFILE, | ||
| 426 | 	/* nest - _A_PROFILE_IRQ_MODERATION */ | ||
| 427 | 	ETHTOOL_A_COALESCE_TX_PROFILE, | ||
| 428 | |||
| 429 | 	/* add new constants above here */ | ||
| 430 | 	__ETHTOOL_A_COALESCE_CNT, | ||
| 431 | 	ETHTOOL_A_COALESCE_MAX = (__ETHTOOL_A_COALESCE_CNT - 1) | ||
| 432 | }; | ||
| 433 | |||
| 434 | enum { | ||
| 435 | 	ETHTOOL_A_PROFILE_UNSPEC, | ||
| 436 | 	/* nest, _A_IRQ_MODERATION_* */ | ||
| 437 | 	ETHTOOL_A_PROFILE_IRQ_MODERATION, | ||
| 438 | 	__ETHTOOL_A_PROFILE_CNT, | ||
| 439 | 	ETHTOOL_A_PROFILE_MAX = (__ETHTOOL_A_PROFILE_CNT - 1) | ||
| 440 | }; | ||
| 441 | |||
| 442 | enum { | ||
| 443 | 	ETHTOOL_A_IRQ_MODERATION_UNSPEC, | ||
| 444 | 	ETHTOOL_A_IRQ_MODERATION_USEC,			/* u32 */ | ||
| 445 | 	ETHTOOL_A_IRQ_MODERATION_PKTS,			/* u32 */ | ||
| 446 | 	ETHTOOL_A_IRQ_MODERATION_COMPS,			/* u32 */ | ||
| 447 | |||
| 448 | 	__ETHTOOL_A_IRQ_MODERATION_CNT, | ||
| 449 | 	ETHTOOL_A_IRQ_MODERATION_MAX = (__ETHTOOL_A_IRQ_MODERATION_CNT - 1) | ||
| 450 | }; | ||
| 451 | |||
| 452 | /* PAUSE */ | ||
| 453 | |||
| 454 | enum { | ||
| 455 | 	ETHTOOL_A_PAUSE_UNSPEC, | ||
| 456 | 	ETHTOOL_A_PAUSE_HEADER,				/* nest - _A_HEADER_* */ | ||
| 457 | 	ETHTOOL_A_PAUSE_AUTONEG,			/* u8 */ | ||
| 458 | 	ETHTOOL_A_PAUSE_RX,				/* u8 */ | ||
| 459 | 	ETHTOOL_A_PAUSE_TX,				/* u8 */ | ||
| 460 | 	ETHTOOL_A_PAUSE_STATS,				/* nest - _PAUSE_STAT_* */ | ||
| 461 | 	ETHTOOL_A_PAUSE_STATS_SRC,			/* u32 */ | ||
| 462 | |||
| 463 | 	/* add new constants above here */ | ||
| 464 | 	__ETHTOOL_A_PAUSE_CNT, | ||
| 465 | 	ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1) | ||
| 466 | }; | ||
| 467 | |||
| 468 | enum { | ||
| 469 | 	ETHTOOL_A_PAUSE_STAT_UNSPEC, | ||
| 470 | 	ETHTOOL_A_PAUSE_STAT_PAD, | ||
| 471 | |||
| 472 | 	ETHTOOL_A_PAUSE_STAT_TX_FRAMES, | ||
| 473 | 	ETHTOOL_A_PAUSE_STAT_RX_FRAMES, | ||
| 474 | |||
| 475 | 	/* add new constants above here | ||
| 476 | 	 * adjust ETHTOOL_PAUSE_STAT_CNT if adding non-stats! | ||
| 477 | 	 */ | ||
| 478 | 	__ETHTOOL_A_PAUSE_STAT_CNT, | ||
| 479 | 	ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1) | ||
| 480 | }; | ||
| 481 | |||
| 482 | /* EEE */ | ||
| 483 | |||
| 484 | enum { | ||
| 485 | 	ETHTOOL_A_EEE_UNSPEC, | ||
| 486 | 	ETHTOOL_A_EEE_HEADER,				/* nest - _A_HEADER_* */ | ||
| 487 | 	ETHTOOL_A_EEE_MODES_OURS,			/* bitset */ | ||
| 488 | 	ETHTOOL_A_EEE_MODES_PEER,			/* bitset */ | ||
| 489 | 	ETHTOOL_A_EEE_ACTIVE,				/* u8 */ | ||
| 490 | 	ETHTOOL_A_EEE_ENABLED,				/* u8 */ | ||
| 491 | 	ETHTOOL_A_EEE_TX_LPI_ENABLED,			/* u8 */ | ||
| 492 | 	ETHTOOL_A_EEE_TX_LPI_TIMER,			/* u32 */ | ||
| 493 | |||
| 494 | 	/* add new constants above here */ | ||
| 495 | 	__ETHTOOL_A_EEE_CNT, | ||
| 496 | 	ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1) | ||
| 497 | }; | ||
| 498 | |||
| 499 | /* TSINFO */ | ||
| 500 | |||
| 501 | enum { | ||
| 502 | 	ETHTOOL_A_TSINFO_UNSPEC, | ||
| 503 | 	ETHTOOL_A_TSINFO_HEADER,			/* nest - _A_HEADER_* */ | ||
| 504 | 	ETHTOOL_A_TSINFO_TIMESTAMPING,			/* bitset */ | ||
| 505 | 	ETHTOOL_A_TSINFO_TX_TYPES,			/* bitset */ | ||
| 506 | 	ETHTOOL_A_TSINFO_RX_FILTERS,			/* bitset */ | ||
| 507 | 	ETHTOOL_A_TSINFO_PHC_INDEX,			/* u32 */ | ||
| 508 | 	ETHTOOL_A_TSINFO_STATS,				/* nest - _A_TSINFO_STAT */ | ||
| 509 | |||
| 510 | 	/* add new constants above here */ | ||
| 511 | 	__ETHTOOL_A_TSINFO_CNT, | ||
| 512 | 	ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) | ||
| 513 | }; | ||
| 514 | |||
| 515 | enum { | ||
| 516 | 	ETHTOOL_A_TS_STAT_UNSPEC, | ||
| 517 | |||
| 518 | 	ETHTOOL_A_TS_STAT_TX_PKTS,			/* uint */ | ||
| 519 | 	ETHTOOL_A_TS_STAT_TX_LOST,			/* uint */ | ||
| 520 | 	ETHTOOL_A_TS_STAT_TX_ERR,			/* uint */ | ||
| 521 | |||
| 522 | 	/* add new constants above here */ | ||
| 523 | 	__ETHTOOL_A_TS_STAT_CNT, | ||
| 524 | 	ETHTOOL_A_TS_STAT_MAX = (__ETHTOOL_A_TS_STAT_CNT - 1) | ||
| 525 | |||
| 526 | }; | ||
| 527 | |||
| 528 | /* PHC VCLOCKS */ | ||
| 529 | |||
| 530 | enum { | ||
| 531 | 	ETHTOOL_A_PHC_VCLOCKS_UNSPEC, | ||
| 532 | 	ETHTOOL_A_PHC_VCLOCKS_HEADER,			/* nest - _A_HEADER_* */ | ||
| 533 | 	ETHTOOL_A_PHC_VCLOCKS_NUM,			/* u32 */ | ||
| 534 | 	ETHTOOL_A_PHC_VCLOCKS_INDEX,			/* array, s32 */ | ||
| 535 | |||
| 536 | 	/* add new constants above here */ | ||
| 537 | 	__ETHTOOL_A_PHC_VCLOCKS_CNT, | ||
| 538 | 	ETHTOOL_A_PHC_VCLOCKS_MAX = (__ETHTOOL_A_PHC_VCLOCKS_CNT - 1) | ||
| 539 | }; | ||
| 540 | |||
| 541 | /* CABLE TEST */ | ||
| 542 | |||
| 543 | enum { | ||
| 544 | 	ETHTOOL_A_CABLE_TEST_UNSPEC, | ||
| 545 | 	ETHTOOL_A_CABLE_TEST_HEADER,		/* nest - _A_HEADER_* */ | ||
| 546 | |||
| 547 | 	/* add new constants above here */ | ||
| 548 | 	__ETHTOOL_A_CABLE_TEST_CNT, | ||
| 549 | 	ETHTOOL_A_CABLE_TEST_MAX = __ETHTOOL_A_CABLE_TEST_CNT - 1 | ||
| 550 | }; | ||
| 551 | |||
| 552 | /* CABLE TEST NOTIFY */ | 19 | /* CABLE TEST NOTIFY */ |
| 553 | enum { | 20 | enum { |
| 554 | 	ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC, | 21 | 	ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC, |
| ... | @@ -582,74 +49,12 @@ enum { | ... | @@ -582,74 +49,12 @@ enum { |
| 582 | 	ETHTOOL_A_CABLE_INF_SRC_ALCD, | 49 | 	ETHTOOL_A_CABLE_INF_SRC_ALCD, |
| 583 | }; | 50 | }; |
| 584 | 51 | ||
| 585 | enum { | ||
| 586 | 	ETHTOOL_A_CABLE_RESULT_UNSPEC, | ||
| 587 | 	ETHTOOL_A_CABLE_RESULT_PAIR,		/* u8 ETHTOOL_A_CABLE_PAIR_ */ | ||
| 588 | 	ETHTOOL_A_CABLE_RESULT_CODE,		/* u8 ETHTOOL_A_CABLE_RESULT_CODE_ */ | ||
| 589 | 	ETHTOOL_A_CABLE_RESULT_SRC,		/* u32 ETHTOOL_A_CABLE_INF_SRC_ */ | ||
| 590 | |||
| 591 | 	__ETHTOOL_A_CABLE_RESULT_CNT, | ||
| 592 | 	ETHTOOL_A_CABLE_RESULT_MAX = (__ETHTOOL_A_CABLE_RESULT_CNT - 1) | ||
| 593 | }; | ||
| 594 | |||
| 595 | enum { | ||
| 596 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC, | ||
| 597 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR,	/* u8 ETHTOOL_A_CABLE_PAIR_ */ | ||
| 598 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_CM,	/* u32 */ | ||
| 599 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_SRC,	/* u32 ETHTOOL_A_CABLE_INF_SRC_ */ | ||
| 600 | |||
| 601 | 	__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT, | ||
| 602 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1) | ||
| 603 | }; | ||
| 604 | |||
| 605 | enum { | 52 | enum { |
| 606 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC, | 53 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC, |
| 607 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED, | 54 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED, |
| 608 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED | 55 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED |
| 609 | }; | 56 | }; |
| 610 | 57 | ||
| 611 | enum { | ||
| 612 | 	ETHTOOL_A_CABLE_NEST_UNSPEC, | ||
| 613 | 	ETHTOOL_A_CABLE_NEST_RESULT,		/* nest - ETHTOOL_A_CABLE_RESULT_ */ | ||
| 614 | 	ETHTOOL_A_CABLE_NEST_FAULT_LENGTH,	/* nest - ETHTOOL_A_CABLE_FAULT_LENGTH_ */ | ||
| 615 | 	__ETHTOOL_A_CABLE_NEST_CNT, | ||
| 616 | 	ETHTOOL_A_CABLE_NEST_MAX = (__ETHTOOL_A_CABLE_NEST_CNT - 1) | ||
| 617 | }; | ||
| 618 | |||
| 619 | enum { | ||
| 620 | 	ETHTOOL_A_CABLE_TEST_NTF_UNSPEC, | ||
| 621 | 	ETHTOOL_A_CABLE_TEST_NTF_HEADER,	/* nest - ETHTOOL_A_HEADER_* */ | ||
| 622 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS,	/* u8 - _STARTED/_COMPLETE */ | ||
| 623 | 	ETHTOOL_A_CABLE_TEST_NTF_NEST,		/* nest - of results: */ | ||
| 624 | |||
| 625 | 	__ETHTOOL_A_CABLE_TEST_NTF_CNT, | ||
| 626 | 	ETHTOOL_A_CABLE_TEST_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_NTF_CNT - 1) | ||
| 627 | }; | ||
| 628 | |||
| 629 | /* CABLE TEST TDR */ | ||
| 630 | |||
| 631 | enum { | ||
| 632 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC, | ||
| 633 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST,		/* u32 */ | ||
| 634 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST,		/* u32 */ | ||
| 635 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP,		/* u32 */ | ||
| 636 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR,		/* u8 */ | ||
| 637 | |||
| 638 | 	/* add new constants above here */ | ||
| 639 | 	__ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT, | ||
| 640 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1 | ||
| 641 | }; | ||
| 642 | |||
| 643 | enum { | ||
| 644 | 	ETHTOOL_A_CABLE_TEST_TDR_UNSPEC, | ||
| 645 | 	ETHTOOL_A_CABLE_TEST_TDR_HEADER,	/* nest - _A_HEADER_* */ | ||
| 646 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG,		/* nest - *_TDR_CFG_* */ | ||
| 647 | |||
| 648 | 	/* add new constants above here */ | ||
| 649 | 	__ETHTOOL_A_CABLE_TEST_TDR_CNT, | ||
| 650 | 	ETHTOOL_A_CABLE_TEST_TDR_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CNT - 1 | ||
| 651 | }; | ||
| 652 | |||
| 653 | /* CABLE TEST TDR NOTIFY */ | 58 | /* CABLE TEST TDR NOTIFY */ |
| 654 | 59 | ||
| 655 | enum { | 60 | enum { |
| ... | @@ -689,163 +94,17 @@ enum { | ... | @@ -689,163 +94,17 @@ enum { |
| 689 | 	ETHTOOL_A_CABLE_TDR_NEST_MAX = (__ETHTOOL_A_CABLE_TDR_NEST_CNT - 1) | 94 | 	ETHTOOL_A_CABLE_TDR_NEST_MAX = (__ETHTOOL_A_CABLE_TDR_NEST_CNT - 1) |
| 690 | }; | 95 | }; |
| 691 | 96 | ||
| 692 | enum { | ||
| 693 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC, | ||
| 694 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER,	/* nest - ETHTOOL_A_HEADER_* */ | ||
| 695 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS,	/* u8 - _STARTED/_COMPLETE */ | ||
| 696 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST,	/* nest - of results: */ | ||
| 697 | |||
| 698 | 	/* add new constants above here */ | ||
| 699 | 	__ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT, | ||
| 700 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1 | ||
| 701 | }; | ||
| 702 | |||
| 703 | /* TUNNEL INFO */ | ||
| 704 | |||
| 705 | enum { | ||
| 706 | 	ETHTOOL_UDP_TUNNEL_TYPE_VXLAN, | ||
| 707 | 	ETHTOOL_UDP_TUNNEL_TYPE_GENEVE, | ||
| 708 | 	ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE, | ||
| 709 | |||
| 710 | 	__ETHTOOL_UDP_TUNNEL_TYPE_CNT | ||
| 711 | }; | ||
| 712 | |||
| 713 | enum { | ||
| 714 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC, | ||
| 715 | |||
| 716 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT,		/* be16 */ | ||
| 717 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE,		/* u32 */ | ||
| 718 | |||
| 719 | 	/* add new constants above here */ | ||
| 720 | 	__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT, | ||
| 721 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = (__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT - 1) | ||
| 722 | }; | ||
| 723 | |||
| 724 | enum { | ||
| 725 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC, | ||
| 726 | |||
| 727 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE,		/* u32 */ | ||
| 728 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES,		/* bitset */ | ||
| 729 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY,		/* nest - _UDP_ENTRY_* */ | ||
| 730 | |||
| 731 | 	/* add new constants above here */ | ||
| 732 | 	__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT, | ||
| 733 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1) | ||
| 734 | }; | ||
| 735 | |||
| 736 | enum { | ||
| 737 | 	ETHTOOL_A_TUNNEL_UDP_UNSPEC, | ||
| 738 | |||
| 739 | 	ETHTOOL_A_TUNNEL_UDP_TABLE,			/* nest - _UDP_TABLE_* */ | ||
| 740 | |||
| 741 | 	/* add new constants above here */ | ||
| 742 | 	__ETHTOOL_A_TUNNEL_UDP_CNT, | ||
| 743 | 	ETHTOOL_A_TUNNEL_UDP_MAX = (__ETHTOOL_A_TUNNEL_UDP_CNT - 1) | ||
| 744 | }; | ||
| 745 | |||
| 746 | enum { | ||
| 747 | 	ETHTOOL_A_TUNNEL_INFO_UNSPEC, | ||
| 748 | 	ETHTOOL_A_TUNNEL_INFO_HEADER,			/* nest - _A_HEADER_* */ | ||
| 749 | |||
| 750 | 	ETHTOOL_A_TUNNEL_INFO_UDP_PORTS,		/* nest - _UDP_TABLE */ | ||
| 751 | |||
| 752 | 	/* add new constants above here */ | ||
| 753 | 	__ETHTOOL_A_TUNNEL_INFO_CNT, | ||
| 754 | 	ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1) | ||
| 755 | }; | ||
| 756 | |||
| 757 | /* FEC */ | ||
| 758 | |||
| 759 | enum { | ||
| 760 | 	ETHTOOL_A_FEC_UNSPEC, | ||
| 761 | 	ETHTOOL_A_FEC_HEADER,				/* nest - _A_HEADER_* */ | ||
| 762 | 	ETHTOOL_A_FEC_MODES,				/* bitset */ | ||
| 763 | 	ETHTOOL_A_FEC_AUTO,				/* u8 */ | ||
| 764 | 	ETHTOOL_A_FEC_ACTIVE,				/* u32 */ | ||
| 765 | 	ETHTOOL_A_FEC_STATS,				/* nest - _A_FEC_STAT */ | ||
| 766 | |||
| 767 | 	__ETHTOOL_A_FEC_CNT, | ||
| 768 | 	ETHTOOL_A_FEC_MAX = (__ETHTOOL_A_FEC_CNT - 1) | ||
| 769 | }; | ||
| 770 | |||
| 771 | enum { | ||
| 772 | 	ETHTOOL_A_FEC_STAT_UNSPEC, | ||
| 773 | 	ETHTOOL_A_FEC_STAT_PAD, | ||
| 774 | |||
| 775 | 	ETHTOOL_A_FEC_STAT_CORRECTED,			/* array, u64 */ | ||
| 776 | 	ETHTOOL_A_FEC_STAT_UNCORR,			/* array, u64 */ | ||
| 777 | 	ETHTOOL_A_FEC_STAT_CORR_BITS,			/* array, u64 */ | ||
| 778 | |||
| 779 | 	/* add new constants above here */ | ||
| 780 | 	__ETHTOOL_A_FEC_STAT_CNT, | ||
| 781 | 	ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1) | ||
| 782 | }; | ||
| 783 | |||
| 784 | /* MODULE EEPROM */ | ||
| 785 | |||
| 786 | enum { | ||
| 787 | 	ETHTOOL_A_MODULE_EEPROM_UNSPEC, | ||
| 788 | 	ETHTOOL_A_MODULE_EEPROM_HEADER,			/* nest - _A_HEADER_* */ | ||
| 789 | |||
| 790 | 	ETHTOOL_A_MODULE_EEPROM_OFFSET,			/* u32 */ | ||
| 791 | 	ETHTOOL_A_MODULE_EEPROM_LENGTH,			/* u32 */ | ||
| 792 | 	ETHTOOL_A_MODULE_EEPROM_PAGE,			/* u8 */ | ||
| 793 | 	ETHTOOL_A_MODULE_EEPROM_BANK,			/* u8 */ | ||
| 794 | 	ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS,		/* u8 */ | ||
| 795 | 	ETHTOOL_A_MODULE_EEPROM_DATA,			/* binary */ | ||
| 796 | |||
| 797 | 	__ETHTOOL_A_MODULE_EEPROM_CNT, | ||
| 798 | 	ETHTOOL_A_MODULE_EEPROM_MAX = (__ETHTOOL_A_MODULE_EEPROM_CNT - 1) | ||
| 799 | }; | ||
| 800 | |||
| 801 | /* STATS */ | ||
| 802 | |||
| 803 | enum { | ||
| 804 | 	ETHTOOL_A_STATS_UNSPEC, | ||
| 805 | 	ETHTOOL_A_STATS_PAD, | ||
| 806 | 	ETHTOOL_A_STATS_HEADER,			/* nest - _A_HEADER_* */ | ||
| 807 | 	ETHTOOL_A_STATS_GROUPS,			/* bitset */ | ||
| 808 | |||
| 809 | 	ETHTOOL_A_STATS_GRP,			/* nest - _A_STATS_GRP_* */ | ||
| 810 | |||
| 811 | 	ETHTOOL_A_STATS_SRC,			/* u32 */ | ||
| 812 | |||
| 813 | 	/* add new constants above here */ | ||
| 814 | 	__ETHTOOL_A_STATS_CNT, | ||
| 815 | 	ETHTOOL_A_STATS_MAX = (__ETHTOOL_A_STATS_CNT - 1) | ||
| 816 | }; | ||
| 817 | |||
| 818 | enum { | 97 | enum { |
| 819 | 	ETHTOOL_STATS_ETH_PHY, | 98 | 	ETHTOOL_STATS_ETH_PHY, |
| 820 | 	ETHTOOL_STATS_ETH_MAC, | 99 | 	ETHTOOL_STATS_ETH_MAC, |
| 821 | 	ETHTOOL_STATS_ETH_CTRL, | 100 | 	ETHTOOL_STATS_ETH_CTRL, |
| 822 | 	ETHTOOL_STATS_RMON, | 101 | 	ETHTOOL_STATS_RMON, |
| 102 | 	ETHTOOL_STATS_PHY, | ||
| 823 | 103 | ||
| 824 | 	/* add new constants above here */ | 104 | 	/* add new constants above here */ |
| 825 | 	__ETHTOOL_STATS_CNT | 105 | 	__ETHTOOL_STATS_CNT |
| 826 | }; | 106 | }; |
| 827 | 107 | ||
| 828 | enum { | ||
| 829 | 	ETHTOOL_A_STATS_GRP_UNSPEC, | ||
| 830 | 	ETHTOOL_A_STATS_GRP_PAD, | ||
| 831 | |||
| 832 | 	ETHTOOL_A_STATS_GRP_ID,			/* u32 */ | ||
| 833 | 	ETHTOOL_A_STATS_GRP_SS_ID,		/* u32 */ | ||
| 834 | |||
| 835 | 	ETHTOOL_A_STATS_GRP_STAT,		/* nest */ | ||
| 836 | |||
| 837 | 	ETHTOOL_A_STATS_GRP_HIST_RX,		/* nest */ | ||
| 838 | 	ETHTOOL_A_STATS_GRP_HIST_TX,		/* nest */ | ||
| 839 | |||
| 840 | 	ETHTOOL_A_STATS_GRP_HIST_BKT_LOW,	/* u32 */ | ||
| 841 | 	ETHTOOL_A_STATS_GRP_HIST_BKT_HI,	/* u32 */ | ||
| 842 | 	ETHTOOL_A_STATS_GRP_HIST_VAL,		/* u64 */ | ||
| 843 | |||
| 844 | 	/* add new constants above here */ | ||
| 845 | 	__ETHTOOL_A_STATS_GRP_CNT, | ||
| 846 | 	ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_GRP_CNT - 1) | ||
| 847 | }; | ||
| 848 | |||
| 849 | enum { | 108 | enum { |
| 850 | 	/* 30.3.2.1.5 aSymbolErrorDuringCarrier */ | 109 | 	/* 30.3.2.1.5 aSymbolErrorDuringCarrier */ |
| 851 | 	ETHTOOL_A_STATS_ETH_PHY_5_SYM_ERR, | 110 | 	ETHTOOL_A_STATS_ETH_PHY_5_SYM_ERR, |
| ... | @@ -935,160 +194,18 @@ enum { | ... | @@ -935,160 +194,18 @@ enum { |
| 935 | 	ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1) | 194 | 	ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1) |
| 936 | }; | 195 | }; |
| 937 | 196 | ||
| 938 | /* MODULE */ | ||
| 939 | |||
| 940 | enum { | ||
| 941 | 	ETHTOOL_A_MODULE_UNSPEC, | ||
| 942 | 	ETHTOOL_A_MODULE_HEADER,		/* nest - _A_HEADER_* */ | ||
| 943 | 	ETHTOOL_A_MODULE_POWER_MODE_POLICY,	/* u8 */ | ||
| 944 | 	ETHTOOL_A_MODULE_POWER_MODE,		/* u8 */ | ||
| 945 | |||
| 946 | 	/* add new constants above here */ | ||
| 947 | 	__ETHTOOL_A_MODULE_CNT, | ||
| 948 | 	ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1) | ||
| 949 | }; | ||
| 950 | |||
| 951 | /* Power Sourcing Equipment */ | ||
| 952 | enum { | ||
| 953 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_UNSPEC, | ||
| 954 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_MIN,	/* u32 */ | ||
| 955 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_MAX,	/* u32 */ | ||
| 956 | }; | ||
| 957 | |||
| 958 | enum { | ||
| 959 | 	ETHTOOL_A_PSE_UNSPEC, | ||
| 960 | 	ETHTOOL_A_PSE_HEADER,			/* nest - _A_HEADER_* */ | ||
| 961 | 	ETHTOOL_A_PODL_PSE_ADMIN_STATE,		/* u32 */ | ||
| 962 | 	ETHTOOL_A_PODL_PSE_ADMIN_CONTROL,	/* u32 */ | ||
| 963 | 	ETHTOOL_A_PODL_PSE_PW_D_STATUS,		/* u32 */ | ||
| 964 | 	ETHTOOL_A_C33_PSE_ADMIN_STATE,		/* u32 */ | ||
| 965 | 	ETHTOOL_A_C33_PSE_ADMIN_CONTROL,	/* u32 */ | ||
| 966 | 	ETHTOOL_A_C33_PSE_PW_D_STATUS,		/* u32 */ | ||
| 967 | 	ETHTOOL_A_C33_PSE_PW_CLASS,		/* u32 */ | ||
| 968 | 	ETHTOOL_A_C33_PSE_ACTUAL_PW,		/* u32 */ | ||
| 969 | 	ETHTOOL_A_C33_PSE_EXT_STATE,		/* u32 */ | ||
| 970 | 	ETHTOOL_A_C33_PSE_EXT_SUBSTATE,		/* u32 */ | ||
| 971 | 	ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT,	/* u32 */ | ||
| 972 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES,	/* nest - _C33_PSE_PW_LIMIT_* */ | ||
| 973 | |||
| 974 | 	/* add new constants above here */ | ||
| 975 | 	__ETHTOOL_A_PSE_CNT, | ||
| 976 | 	ETHTOOL_A_PSE_MAX = (__ETHTOOL_A_PSE_CNT - 1) | ||
| 977 | }; | ||
| 978 | |||
| 979 | enum { | ||
| 980 | 	ETHTOOL_A_RSS_UNSPEC, | ||
| 981 | 	ETHTOOL_A_RSS_HEADER, | ||
| 982 | 	ETHTOOL_A_RSS_CONTEXT,		/* u32 */ | ||
| 983 | 	ETHTOOL_A_RSS_HFUNC,		/* u32 */ | ||
| 984 | 	ETHTOOL_A_RSS_INDIR,		/* binary */ | ||
| 985 | 	ETHTOOL_A_RSS_HKEY,		/* binary */ | ||
| 986 | 	ETHTOOL_A_RSS_INPUT_XFRM,	/* u32 */ | ||
| 987 | 	ETHTOOL_A_RSS_START_CONTEXT,	/* u32 */ | ||
| 988 | |||
| 989 | 	__ETHTOOL_A_RSS_CNT, | ||
| 990 | 	ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1), | ||
| 991 | }; | ||
| 992 | |||
| 993 | /* PLCA */ | ||
| 994 | |||
| 995 | enum { | 197 | enum { |
| 996 | 	ETHTOOL_A_PLCA_UNSPEC, | 198 | 	/* Basic packet counters if PHY has separate counters from the MAC */ |
| 997 | 	ETHTOOL_A_PLCA_HEADER,			/* nest - _A_HEADER_* */ | 199 | 	ETHTOOL_A_STATS_PHY_RX_PKTS, |
| 998 | 	ETHTOOL_A_PLCA_VERSION,			/* u16 */ | 200 | 	ETHTOOL_A_STATS_PHY_RX_BYTES, |
| 999 | 	ETHTOOL_A_PLCA_ENABLED,			/* u8 */ | 201 | 	ETHTOOL_A_STATS_PHY_RX_ERRORS, |
| 1000 | 	ETHTOOL_A_PLCA_STATUS,			/* u8 */ | 202 | 	ETHTOOL_A_STATS_PHY_TX_PKTS, |
| 1001 | 	ETHTOOL_A_PLCA_NODE_CNT,		/* u32 */ | 203 | 	ETHTOOL_A_STATS_PHY_TX_BYTES, |
| 1002 | 	ETHTOOL_A_PLCA_NODE_ID,			/* u32 */ | 204 | 	ETHTOOL_A_STATS_PHY_TX_ERRORS, |
| 1003 | 	ETHTOOL_A_PLCA_TO_TMR,			/* u32 */ | ||
| 1004 | 	ETHTOOL_A_PLCA_BURST_CNT,		/* u32 */ | ||
| 1005 | 	ETHTOOL_A_PLCA_BURST_TMR,		/* u32 */ | ||
| 1006 | 205 | ||
| 1007 | 	/* add new constants above here */ | 206 | 	/* add new constants above here */ |
| 1008 | 	__ETHTOOL_A_PLCA_CNT, | 207 | 	__ETHTOOL_A_STATS_PHY_CNT, |
| 1009 | 	ETHTOOL_A_PLCA_MAX = (__ETHTOOL_A_PLCA_CNT - 1) | 208 | 	ETHTOOL_A_STATS_PHY_MAX = (__ETHTOOL_A_STATS_PHY_CNT - 1) |
| 1010 | }; | 209 | }; |
| 1011 | 210 | ||
| 1012 | /* MAC Merge (802.3) */ | ||
| 1013 | |||
| 1014 | enum { | ||
| 1015 | 	ETHTOOL_A_MM_STAT_UNSPEC, | ||
| 1016 | 	ETHTOOL_A_MM_STAT_PAD, | ||
| 1017 | |||
| 1018 | 	/* aMACMergeFrameAssErrorCount */ | ||
| 1019 | 	ETHTOOL_A_MM_STAT_REASSEMBLY_ERRORS,	/* u64 */ | ||
| 1020 | 	/* aMACMergeFrameSmdErrorCount */ | ||
| 1021 | 	ETHTOOL_A_MM_STAT_SMD_ERRORS,		/* u64 */ | ||
| 1022 | 	/* aMACMergeFrameAssOkCount */ | ||
| 1023 | 	ETHTOOL_A_MM_STAT_REASSEMBLY_OK,	/* u64 */ | ||
| 1024 | 	/* aMACMergeFragCountRx */ | ||
| 1025 | 	ETHTOOL_A_MM_STAT_RX_FRAG_COUNT,	/* u64 */ | ||
| 1026 | 	/* aMACMergeFragCountTx */ | ||
| 1027 | 	ETHTOOL_A_MM_STAT_TX_FRAG_COUNT,	/* u64 */ | ||
| 1028 | 	/* aMACMergeHoldCount */ | ||
| 1029 | 	ETHTOOL_A_MM_STAT_HOLD_COUNT,		/* u64 */ | ||
| 1030 | |||
| 1031 | 	/* add new constants above here */ | ||
| 1032 | 	__ETHTOOL_A_MM_STAT_CNT, | ||
| 1033 | 	ETHTOOL_A_MM_STAT_MAX = (__ETHTOOL_A_MM_STAT_CNT - 1) | ||
| 1034 | }; | ||
| 1035 | |||
| 1036 | enum { | ||
| 1037 | 	ETHTOOL_A_MM_UNSPEC, | ||
| 1038 | 	ETHTOOL_A_MM_HEADER,			/* nest - _A_HEADER_* */ | ||
| 1039 | 	ETHTOOL_A_MM_PMAC_ENABLED,		/* u8 */ | ||
| 1040 | 	ETHTOOL_A_MM_TX_ENABLED,		/* u8 */ | ||
| 1041 | 	ETHTOOL_A_MM_TX_ACTIVE,			/* u8 */ | ||
| 1042 | 	ETHTOOL_A_MM_TX_MIN_FRAG_SIZE,		/* u32 */ | ||
| 1043 | 	ETHTOOL_A_MM_RX_MIN_FRAG_SIZE,		/* u32 */ | ||
| 1044 | 	ETHTOOL_A_MM_VERIFY_ENABLED,		/* u8 */ | ||
| 1045 | 	ETHTOOL_A_MM_VERIFY_STATUS,		/* u8 */ | ||
| 1046 | 	ETHTOOL_A_MM_VERIFY_TIME,		/* u32 */ | ||
| 1047 | 	ETHTOOL_A_MM_MAX_VERIFY_TIME,		/* u32 */ | ||
| 1048 | 	ETHTOOL_A_MM_STATS,			/* nest - _A_MM_STAT_* */ | ||
| 1049 | |||
| 1050 | 	/* add new constants above here */ | ||
| 1051 | 	__ETHTOOL_A_MM_CNT, | ||
| 1052 | 	ETHTOOL_A_MM_MAX = (__ETHTOOL_A_MM_CNT - 1) | ||
| 1053 | }; | ||
| 1054 | |||
| 1055 | /* MODULE_FW_FLASH */ | ||
| 1056 | |||
| 1057 | enum { | ||
| 1058 | 	ETHTOOL_A_MODULE_FW_FLASH_UNSPEC, | ||
| 1059 | 	ETHTOOL_A_MODULE_FW_FLASH_HEADER,		/* nest - _A_HEADER_* */ | ||
| 1060 | 	ETHTOOL_A_MODULE_FW_FLASH_FILE_NAME,		/* string */ | ||
| 1061 | 	ETHTOOL_A_MODULE_FW_FLASH_PASSWORD,		/* u32 */ | ||
| 1062 | 	ETHTOOL_A_MODULE_FW_FLASH_STATUS,		/* u32 */ | ||
| 1063 | 	ETHTOOL_A_MODULE_FW_FLASH_STATUS_MSG,		/* string */ | ||
| 1064 | 	ETHTOOL_A_MODULE_FW_FLASH_DONE,			/* uint */ | ||
| 1065 | 	ETHTOOL_A_MODULE_FW_FLASH_TOTAL,		/* uint */ | ||
| 1066 | |||
| 1067 | 	/* add new constants above here */ | ||
| 1068 | 	__ETHTOOL_A_MODULE_FW_FLASH_CNT, | ||
| 1069 | 	ETHTOOL_A_MODULE_FW_FLASH_MAX = (__ETHTOOL_A_MODULE_FW_FLASH_CNT - 1) | ||
| 1070 | }; | ||
| 1071 | |||
| 1072 | enum { | ||
| 1073 | 	ETHTOOL_A_PHY_UNSPEC, | ||
| 1074 | 	ETHTOOL_A_PHY_HEADER,			/* nest - _A_HEADER_* */ | ||
| 1075 | 	ETHTOOL_A_PHY_INDEX,			/* u32 */ | ||
| 1076 | 	ETHTOOL_A_PHY_DRVNAME,			/* string */ | ||
| 1077 | 	ETHTOOL_A_PHY_NAME,			/* string */ | ||
| 1078 | 	ETHTOOL_A_PHY_UPSTREAM_TYPE,		/* u32 */ | ||
| 1079 | 	ETHTOOL_A_PHY_UPSTREAM_INDEX,		/* u32 */ | ||
| 1080 | 	ETHTOOL_A_PHY_UPSTREAM_SFP_NAME,	/* string */ | ||
| 1081 | 	ETHTOOL_A_PHY_DOWNSTREAM_SFP_NAME,	/* string */ | ||
| 1082 | |||
| 1083 | 	/* add new constants above here */ | ||
| 1084 | 	__ETHTOOL_A_PHY_CNT, | ||
| 1085 | 	ETHTOOL_A_PHY_MAX = (__ETHTOOL_A_PHY_CNT - 1) | ||
| 1086 | }; | ||
| 1087 | |||
| 1088 | /* generic netlink info */ | ||
| 1089 | #define ETHTOOL_GENL_NAME "ethtool" | ||
| 1090 | #define ETHTOOL_GENL_VERSION 1 | ||
| 1091 | |||
| 1092 | #define ETHTOOL_MCGRP_MONITOR_NAME "monitor" | ||
| 1093 | |||
| 1094 | #endif /* _LINUX_ETHTOOL_NETLINK_H_ */ | 211 | #endif /* _LINUX_ETHTOOL_NETLINK_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ethtool_netlink_generated.h created+913| ... | @@ -0,0 +1,913 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /*	Documentation/netlink/specs/ethtool.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_ETHTOOL_NETLINK_GENERATED_H | ||
| 7 | #define _LINUX_ETHTOOL_NETLINK_GENERATED_H | ||
| 8 | |||
| 9 | #define ETHTOOL_GENL_NAME	"ethtool" | ||
| 10 | #define ETHTOOL_GENL_VERSION	1 | ||
| 11 | |||
| 12 | enum { | ||
| 13 | 	ETHTOOL_UDP_TUNNEL_TYPE_VXLAN, | ||
| 14 | 	ETHTOOL_UDP_TUNNEL_TYPE_GENEVE, | ||
| 15 | 	ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE, | ||
| 16 | |||
| 17 | 	/* private: */ | ||
| 18 | 	__ETHTOOL_UDP_TUNNEL_TYPE_CNT, | ||
| 19 | 	ETHTOOL_UDP_TUNNEL_TYPE_MAX = (__ETHTOOL_UDP_TUNNEL_TYPE_CNT - 1) | ||
| 20 | }; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * enum ethtool_header_flags - common ethtool header flags | ||
| 24 | * @ETHTOOL_FLAG_COMPACT_BITSETS: use compact bitsets in reply | ||
| 25 | * @ETHTOOL_FLAG_OMIT_REPLY: provide optional reply for SET or ACT requests | ||
| 26 | * @ETHTOOL_FLAG_STATS: request statistics, if supported by the driver | ||
| 27 | */ | ||
| 28 | enum ethtool_header_flags { | ||
| 29 | 	ETHTOOL_FLAG_COMPACT_BITSETS = 1, | ||
| 30 | 	ETHTOOL_FLAG_OMIT_REPLY = 2, | ||
| 31 | 	ETHTOOL_FLAG_STATS = 4, | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum ethtool_tcp_data_split { | ||
| 35 | 	ETHTOOL_TCP_DATA_SPLIT_UNKNOWN, | ||
| 36 | 	ETHTOOL_TCP_DATA_SPLIT_DISABLED, | ||
| 37 | 	ETHTOOL_TCP_DATA_SPLIT_ENABLED, | ||
| 38 | }; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * enum hwtstamp_source - Source of the hardware timestamp | ||
| 42 | * @HWTSTAMP_SOURCE_NETDEV: Hardware timestamp comes from a MAC or a device | ||
| 43 | * which has MAC and PHY integrated | ||
| 44 | * @HWTSTAMP_SOURCE_PHYLIB: Hardware timestamp comes from one PHY device of the | ||
| 45 | * network topology | ||
| 46 | */ | ||
| 47 | enum hwtstamp_source { | ||
| 48 | 	HWTSTAMP_SOURCE_NETDEV = 1, | ||
| 49 | 	HWTSTAMP_SOURCE_PHYLIB, | ||
| 50 | }; | ||
| 51 | |||
| 52 | /** | ||
| 53 | * enum ethtool_pse_event - PSE event list for the PSE controller | ||
| 54 | * @ETHTOOL_PSE_EVENT_OVER_CURRENT: PSE output current is too high | ||
| 55 | * @ETHTOOL_PSE_EVENT_OVER_TEMP: PSE in over temperature state | ||
| 56 | * @ETHTOOL_C33_PSE_EVENT_DETECTION: detection process occur on the PSE. IEEE | ||
| 57 | * 802.3-2022 33.2.5 and 145.2.6 PSE detection of PDs. IEEE 802.3-202 | ||
| 58 | * 30.9.1.1.5 aPSEPowerDetectionStatus | ||
| 59 | * @ETHTOOL_C33_PSE_EVENT_CLASSIFICATION: classification process occur on the | ||
| 60 | * PSE. IEEE 802.3-2022 33.2.6 and 145.2.8 classification of PDs mutual | ||
| 61 | * identification. IEEE 802.3-2022 30.9.1.1.8 aPSEPowerClassification. | ||
| 62 | * @ETHTOOL_C33_PSE_EVENT_DISCONNECTION: PD has been disconnected on the PSE. | ||
| 63 | * IEEE 802.3-2022 33.3.8 and 145.3.9 PD Maintain Power Signature. IEEE | ||
| 64 | * 802.3-2022 33.5.1.2.9 MPS Absent. IEEE 802.3-2022 30.9.1.1.20 | ||
| 65 | * aPSEMPSAbsentCounter. | ||
| 66 | * @ETHTOOL_PSE_EVENT_OVER_BUDGET: PSE turned off due to over budget situation | ||
| 67 | * @ETHTOOL_PSE_EVENT_SW_PW_CONTROL_ERROR: PSE faced an error managing the | ||
| 68 | * power control from software | ||
| 69 | */ | ||
| 70 | enum ethtool_pse_event { | ||
| 71 | 	ETHTOOL_PSE_EVENT_OVER_CURRENT = 1, | ||
| 72 | 	ETHTOOL_PSE_EVENT_OVER_TEMP = 2, | ||
| 73 | 	ETHTOOL_C33_PSE_EVENT_DETECTION = 4, | ||
| 74 | 	ETHTOOL_C33_PSE_EVENT_CLASSIFICATION = 8, | ||
| 75 | 	ETHTOOL_C33_PSE_EVENT_DISCONNECTION = 16, | ||
| 76 | 	ETHTOOL_PSE_EVENT_OVER_BUDGET = 32, | ||
| 77 | 	ETHTOOL_PSE_EVENT_SW_PW_CONTROL_ERROR = 64, | ||
| 78 | }; | ||
| 79 | |||
| 80 | enum { | ||
| 81 | 	ETHTOOL_A_HEADER_UNSPEC, | ||
| 82 | 	ETHTOOL_A_HEADER_DEV_INDEX, | ||
| 83 | 	ETHTOOL_A_HEADER_DEV_NAME, | ||
| 84 | 	ETHTOOL_A_HEADER_FLAGS, | ||
| 85 | 	ETHTOOL_A_HEADER_PHY_INDEX, | ||
| 86 | |||
| 87 | 	__ETHTOOL_A_HEADER_CNT, | ||
| 88 | 	ETHTOOL_A_HEADER_MAX = (__ETHTOOL_A_HEADER_CNT - 1) | ||
| 89 | }; | ||
| 90 | |||
| 91 | enum { | ||
| 92 | 	ETHTOOL_A_BITSET_BIT_UNSPEC, | ||
| 93 | 	ETHTOOL_A_BITSET_BIT_INDEX, | ||
| 94 | 	ETHTOOL_A_BITSET_BIT_NAME, | ||
| 95 | 	ETHTOOL_A_BITSET_BIT_VALUE, | ||
| 96 | |||
| 97 | 	__ETHTOOL_A_BITSET_BIT_CNT, | ||
| 98 | 	ETHTOOL_A_BITSET_BIT_MAX = (__ETHTOOL_A_BITSET_BIT_CNT - 1) | ||
| 99 | }; | ||
| 100 | |||
| 101 | enum { | ||
| 102 | 	ETHTOOL_A_BITSET_BITS_UNSPEC, | ||
| 103 | 	ETHTOOL_A_BITSET_BITS_BIT, | ||
| 104 | |||
| 105 | 	__ETHTOOL_A_BITSET_BITS_CNT, | ||
| 106 | 	ETHTOOL_A_BITSET_BITS_MAX = (__ETHTOOL_A_BITSET_BITS_CNT - 1) | ||
| 107 | }; | ||
| 108 | |||
| 109 | enum { | ||
| 110 | 	ETHTOOL_A_BITSET_UNSPEC, | ||
| 111 | 	ETHTOOL_A_BITSET_NOMASK, | ||
| 112 | 	ETHTOOL_A_BITSET_SIZE, | ||
| 113 | 	ETHTOOL_A_BITSET_BITS, | ||
| 114 | 	ETHTOOL_A_BITSET_VALUE, | ||
| 115 | 	ETHTOOL_A_BITSET_MASK, | ||
| 116 | |||
| 117 | 	__ETHTOOL_A_BITSET_CNT, | ||
| 118 | 	ETHTOOL_A_BITSET_MAX = (__ETHTOOL_A_BITSET_CNT - 1) | ||
| 119 | }; | ||
| 120 | |||
| 121 | enum { | ||
| 122 | 	ETHTOOL_A_STRING_UNSPEC, | ||
| 123 | 	ETHTOOL_A_STRING_INDEX, | ||
| 124 | 	ETHTOOL_A_STRING_VALUE, | ||
| 125 | |||
| 126 | 	__ETHTOOL_A_STRING_CNT, | ||
| 127 | 	ETHTOOL_A_STRING_MAX = (__ETHTOOL_A_STRING_CNT - 1) | ||
| 128 | }; | ||
| 129 | |||
| 130 | enum { | ||
| 131 | 	ETHTOOL_A_STRINGS_UNSPEC, | ||
| 132 | 	ETHTOOL_A_STRINGS_STRING, | ||
| 133 | |||
| 134 | 	__ETHTOOL_A_STRINGS_CNT, | ||
| 135 | 	ETHTOOL_A_STRINGS_MAX = (__ETHTOOL_A_STRINGS_CNT - 1) | ||
| 136 | }; | ||
| 137 | |||
| 138 | enum { | ||
| 139 | 	ETHTOOL_A_STRINGSET_UNSPEC, | ||
| 140 | 	ETHTOOL_A_STRINGSET_ID, | ||
| 141 | 	ETHTOOL_A_STRINGSET_COUNT, | ||
| 142 | 	ETHTOOL_A_STRINGSET_STRINGS, | ||
| 143 | |||
| 144 | 	__ETHTOOL_A_STRINGSET_CNT, | ||
| 145 | 	ETHTOOL_A_STRINGSET_MAX = (__ETHTOOL_A_STRINGSET_CNT - 1) | ||
| 146 | }; | ||
| 147 | |||
| 148 | enum { | ||
| 149 | 	ETHTOOL_A_STRINGSETS_UNSPEC, | ||
| 150 | 	ETHTOOL_A_STRINGSETS_STRINGSET, | ||
| 151 | |||
| 152 | 	__ETHTOOL_A_STRINGSETS_CNT, | ||
| 153 | 	ETHTOOL_A_STRINGSETS_MAX = (__ETHTOOL_A_STRINGSETS_CNT - 1) | ||
| 154 | }; | ||
| 155 | |||
| 156 | enum { | ||
| 157 | 	ETHTOOL_A_STRSET_UNSPEC, | ||
| 158 | 	ETHTOOL_A_STRSET_HEADER, | ||
| 159 | 	ETHTOOL_A_STRSET_STRINGSETS, | ||
| 160 | 	ETHTOOL_A_STRSET_COUNTS_ONLY, | ||
| 161 | |||
| 162 | 	__ETHTOOL_A_STRSET_CNT, | ||
| 163 | 	ETHTOOL_A_STRSET_MAX = (__ETHTOOL_A_STRSET_CNT - 1) | ||
| 164 | }; | ||
| 165 | |||
| 166 | enum { | ||
| 167 | 	ETHTOOL_A_PRIVFLAGS_UNSPEC, | ||
| 168 | 	ETHTOOL_A_PRIVFLAGS_HEADER, | ||
| 169 | 	ETHTOOL_A_PRIVFLAGS_FLAGS, | ||
| 170 | |||
| 171 | 	__ETHTOOL_A_PRIVFLAGS_CNT, | ||
| 172 | 	ETHTOOL_A_PRIVFLAGS_MAX = (__ETHTOOL_A_PRIVFLAGS_CNT - 1) | ||
| 173 | }; | ||
| 174 | |||
| 175 | enum { | ||
| 176 | 	ETHTOOL_A_RINGS_UNSPEC, | ||
| 177 | 	ETHTOOL_A_RINGS_HEADER, | ||
| 178 | 	ETHTOOL_A_RINGS_RX_MAX, | ||
| 179 | 	ETHTOOL_A_RINGS_RX_MINI_MAX, | ||
| 180 | 	ETHTOOL_A_RINGS_RX_JUMBO_MAX, | ||
| 181 | 	ETHTOOL_A_RINGS_TX_MAX, | ||
| 182 | 	ETHTOOL_A_RINGS_RX, | ||
| 183 | 	ETHTOOL_A_RINGS_RX_MINI, | ||
| 184 | 	ETHTOOL_A_RINGS_RX_JUMBO, | ||
| 185 | 	ETHTOOL_A_RINGS_TX, | ||
| 186 | 	ETHTOOL_A_RINGS_RX_BUF_LEN, | ||
| 187 | 	ETHTOOL_A_RINGS_TCP_DATA_SPLIT, | ||
| 188 | 	ETHTOOL_A_RINGS_CQE_SIZE, | ||
| 189 | 	ETHTOOL_A_RINGS_TX_PUSH, | ||
| 190 | 	ETHTOOL_A_RINGS_RX_PUSH, | ||
| 191 | 	ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN, | ||
| 192 | 	ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX, | ||
| 193 | 	ETHTOOL_A_RINGS_HDS_THRESH, | ||
| 194 | 	ETHTOOL_A_RINGS_HDS_THRESH_MAX, | ||
| 195 | |||
| 196 | 	__ETHTOOL_A_RINGS_CNT, | ||
| 197 | 	ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1) | ||
| 198 | }; | ||
| 199 | |||
| 200 | enum { | ||
| 201 | 	ETHTOOL_A_MM_STAT_UNSPEC, | ||
| 202 | 	ETHTOOL_A_MM_STAT_PAD, | ||
| 203 | 	ETHTOOL_A_MM_STAT_REASSEMBLY_ERRORS, | ||
| 204 | 	ETHTOOL_A_MM_STAT_SMD_ERRORS, | ||
| 205 | 	ETHTOOL_A_MM_STAT_REASSEMBLY_OK, | ||
| 206 | 	ETHTOOL_A_MM_STAT_RX_FRAG_COUNT, | ||
| 207 | 	ETHTOOL_A_MM_STAT_TX_FRAG_COUNT, | ||
| 208 | 	ETHTOOL_A_MM_STAT_HOLD_COUNT, | ||
| 209 | |||
| 210 | 	__ETHTOOL_A_MM_STAT_CNT, | ||
| 211 | 	ETHTOOL_A_MM_STAT_MAX = (__ETHTOOL_A_MM_STAT_CNT - 1) | ||
| 212 | }; | ||
| 213 | |||
| 214 | enum { | ||
| 215 | 	ETHTOOL_A_MM_UNSPEC, | ||
| 216 | 	ETHTOOL_A_MM_HEADER, | ||
| 217 | 	ETHTOOL_A_MM_PMAC_ENABLED, | ||
| 218 | 	ETHTOOL_A_MM_TX_ENABLED, | ||
| 219 | 	ETHTOOL_A_MM_TX_ACTIVE, | ||
| 220 | 	ETHTOOL_A_MM_TX_MIN_FRAG_SIZE, | ||
| 221 | 	ETHTOOL_A_MM_RX_MIN_FRAG_SIZE, | ||
| 222 | 	ETHTOOL_A_MM_VERIFY_ENABLED, | ||
| 223 | 	ETHTOOL_A_MM_VERIFY_STATUS, | ||
| 224 | 	ETHTOOL_A_MM_VERIFY_TIME, | ||
| 225 | 	ETHTOOL_A_MM_MAX_VERIFY_TIME, | ||
| 226 | 	ETHTOOL_A_MM_STATS, | ||
| 227 | |||
| 228 | 	__ETHTOOL_A_MM_CNT, | ||
| 229 | 	ETHTOOL_A_MM_MAX = (__ETHTOOL_A_MM_CNT - 1) | ||
| 230 | }; | ||
| 231 | |||
| 232 | enum { | ||
| 233 | 	ETHTOOL_A_LINKINFO_UNSPEC, | ||
| 234 | 	ETHTOOL_A_LINKINFO_HEADER, | ||
| 235 | 	ETHTOOL_A_LINKINFO_PORT, | ||
| 236 | 	ETHTOOL_A_LINKINFO_PHYADDR, | ||
| 237 | 	ETHTOOL_A_LINKINFO_TP_MDIX, | ||
| 238 | 	ETHTOOL_A_LINKINFO_TP_MDIX_CTRL, | ||
| 239 | 	ETHTOOL_A_LINKINFO_TRANSCEIVER, | ||
| 240 | |||
| 241 | 	__ETHTOOL_A_LINKINFO_CNT, | ||
| 242 | 	ETHTOOL_A_LINKINFO_MAX = (__ETHTOOL_A_LINKINFO_CNT - 1) | ||
| 243 | }; | ||
| 244 | |||
| 245 | enum { | ||
| 246 | 	ETHTOOL_A_LINKMODES_UNSPEC, | ||
| 247 | 	ETHTOOL_A_LINKMODES_HEADER, | ||
| 248 | 	ETHTOOL_A_LINKMODES_AUTONEG, | ||
| 249 | 	ETHTOOL_A_LINKMODES_OURS, | ||
| 250 | 	ETHTOOL_A_LINKMODES_PEER, | ||
| 251 | 	ETHTOOL_A_LINKMODES_SPEED, | ||
| 252 | 	ETHTOOL_A_LINKMODES_DUPLEX, | ||
| 253 | 	ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG, | ||
| 254 | 	ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE, | ||
| 255 | 	ETHTOOL_A_LINKMODES_LANES, | ||
| 256 | 	ETHTOOL_A_LINKMODES_RATE_MATCHING, | ||
| 257 | |||
| 258 | 	__ETHTOOL_A_LINKMODES_CNT, | ||
| 259 | 	ETHTOOL_A_LINKMODES_MAX = (__ETHTOOL_A_LINKMODES_CNT - 1) | ||
| 260 | }; | ||
| 261 | |||
| 262 | enum { | ||
| 263 | 	ETHTOOL_A_LINKSTATE_UNSPEC, | ||
| 264 | 	ETHTOOL_A_LINKSTATE_HEADER, | ||
| 265 | 	ETHTOOL_A_LINKSTATE_LINK, | ||
| 266 | 	ETHTOOL_A_LINKSTATE_SQI, | ||
| 267 | 	ETHTOOL_A_LINKSTATE_SQI_MAX, | ||
| 268 | 	ETHTOOL_A_LINKSTATE_EXT_STATE, | ||
| 269 | 	ETHTOOL_A_LINKSTATE_EXT_SUBSTATE, | ||
| 270 | 	ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT, | ||
| 271 | |||
| 272 | 	__ETHTOOL_A_LINKSTATE_CNT, | ||
| 273 | 	ETHTOOL_A_LINKSTATE_MAX = (__ETHTOOL_A_LINKSTATE_CNT - 1) | ||
| 274 | }; | ||
| 275 | |||
| 276 | enum { | ||
| 277 | 	ETHTOOL_A_DEBUG_UNSPEC, | ||
| 278 | 	ETHTOOL_A_DEBUG_HEADER, | ||
| 279 | 	ETHTOOL_A_DEBUG_MSGMASK, | ||
| 280 | |||
| 281 | 	__ETHTOOL_A_DEBUG_CNT, | ||
| 282 | 	ETHTOOL_A_DEBUG_MAX = (__ETHTOOL_A_DEBUG_CNT - 1) | ||
| 283 | }; | ||
| 284 | |||
| 285 | enum { | ||
| 286 | 	ETHTOOL_A_WOL_UNSPEC, | ||
| 287 | 	ETHTOOL_A_WOL_HEADER, | ||
| 288 | 	ETHTOOL_A_WOL_MODES, | ||
| 289 | 	ETHTOOL_A_WOL_SOPASS, | ||
| 290 | |||
| 291 | 	__ETHTOOL_A_WOL_CNT, | ||
| 292 | 	ETHTOOL_A_WOL_MAX = (__ETHTOOL_A_WOL_CNT - 1) | ||
| 293 | }; | ||
| 294 | |||
| 295 | enum { | ||
| 296 | 	ETHTOOL_A_FEATURES_UNSPEC, | ||
| 297 | 	ETHTOOL_A_FEATURES_HEADER, | ||
| 298 | 	ETHTOOL_A_FEATURES_HW, | ||
| 299 | 	ETHTOOL_A_FEATURES_WANTED, | ||
| 300 | 	ETHTOOL_A_FEATURES_ACTIVE, | ||
| 301 | 	ETHTOOL_A_FEATURES_NOCHANGE, | ||
| 302 | |||
| 303 | 	__ETHTOOL_A_FEATURES_CNT, | ||
| 304 | 	ETHTOOL_A_FEATURES_MAX = (__ETHTOOL_A_FEATURES_CNT - 1) | ||
| 305 | }; | ||
| 306 | |||
| 307 | enum { | ||
| 308 | 	ETHTOOL_A_CHANNELS_UNSPEC, | ||
| 309 | 	ETHTOOL_A_CHANNELS_HEADER, | ||
| 310 | 	ETHTOOL_A_CHANNELS_RX_MAX, | ||
| 311 | 	ETHTOOL_A_CHANNELS_TX_MAX, | ||
| 312 | 	ETHTOOL_A_CHANNELS_OTHER_MAX, | ||
| 313 | 	ETHTOOL_A_CHANNELS_COMBINED_MAX, | ||
| 314 | 	ETHTOOL_A_CHANNELS_RX_COUNT, | ||
| 315 | 	ETHTOOL_A_CHANNELS_TX_COUNT, | ||
| 316 | 	ETHTOOL_A_CHANNELS_OTHER_COUNT, | ||
| 317 | 	ETHTOOL_A_CHANNELS_COMBINED_COUNT, | ||
| 318 | |||
| 319 | 	__ETHTOOL_A_CHANNELS_CNT, | ||
| 320 | 	ETHTOOL_A_CHANNELS_MAX = (__ETHTOOL_A_CHANNELS_CNT - 1) | ||
| 321 | }; | ||
| 322 | |||
| 323 | enum { | ||
| 324 | 	ETHTOOL_A_IRQ_MODERATION_UNSPEC, | ||
| 325 | 	ETHTOOL_A_IRQ_MODERATION_USEC, | ||
| 326 | 	ETHTOOL_A_IRQ_MODERATION_PKTS, | ||
| 327 | 	ETHTOOL_A_IRQ_MODERATION_COMPS, | ||
| 328 | |||
| 329 | 	__ETHTOOL_A_IRQ_MODERATION_CNT, | ||
| 330 | 	ETHTOOL_A_IRQ_MODERATION_MAX = (__ETHTOOL_A_IRQ_MODERATION_CNT - 1) | ||
| 331 | }; | ||
| 332 | |||
| 333 | enum { | ||
| 334 | 	ETHTOOL_A_PROFILE_UNSPEC, | ||
| 335 | 	ETHTOOL_A_PROFILE_IRQ_MODERATION, | ||
| 336 | |||
| 337 | 	__ETHTOOL_A_PROFILE_CNT, | ||
| 338 | 	ETHTOOL_A_PROFILE_MAX = (__ETHTOOL_A_PROFILE_CNT - 1) | ||
| 339 | }; | ||
| 340 | |||
| 341 | enum { | ||
| 342 | 	ETHTOOL_A_COALESCE_UNSPEC, | ||
| 343 | 	ETHTOOL_A_COALESCE_HEADER, | ||
| 344 | 	ETHTOOL_A_COALESCE_RX_USECS, | ||
| 345 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES, | ||
| 346 | 	ETHTOOL_A_COALESCE_RX_USECS_IRQ, | ||
| 347 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ, | ||
| 348 | 	ETHTOOL_A_COALESCE_TX_USECS, | ||
| 349 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES, | ||
| 350 | 	ETHTOOL_A_COALESCE_TX_USECS_IRQ, | ||
| 351 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ, | ||
| 352 | 	ETHTOOL_A_COALESCE_STATS_BLOCK_USECS, | ||
| 353 | 	ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX, | ||
| 354 | 	ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX, | ||
| 355 | 	ETHTOOL_A_COALESCE_PKT_RATE_LOW, | ||
| 356 | 	ETHTOOL_A_COALESCE_RX_USECS_LOW, | ||
| 357 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW, | ||
| 358 | 	ETHTOOL_A_COALESCE_TX_USECS_LOW, | ||
| 359 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW, | ||
| 360 | 	ETHTOOL_A_COALESCE_PKT_RATE_HIGH, | ||
| 361 | 	ETHTOOL_A_COALESCE_RX_USECS_HIGH, | ||
| 362 | 	ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH, | ||
| 363 | 	ETHTOOL_A_COALESCE_TX_USECS_HIGH, | ||
| 364 | 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH, | ||
| 365 | 	ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL, | ||
| 366 | 	ETHTOOL_A_COALESCE_USE_CQE_MODE_TX, | ||
| 367 | 	ETHTOOL_A_COALESCE_USE_CQE_MODE_RX, | ||
| 368 | 	ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES, | ||
| 369 | 	ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES, | ||
| 370 | 	ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS, | ||
| 371 | 	ETHTOOL_A_COALESCE_RX_PROFILE, | ||
| 372 | 	ETHTOOL_A_COALESCE_TX_PROFILE, | ||
| 373 | |||
| 374 | 	__ETHTOOL_A_COALESCE_CNT, | ||
| 375 | 	ETHTOOL_A_COALESCE_MAX = (__ETHTOOL_A_COALESCE_CNT - 1) | ||
| 376 | }; | ||
| 377 | |||
| 378 | enum { | ||
| 379 | 	ETHTOOL_A_PAUSE_STAT_UNSPEC, | ||
| 380 | 	ETHTOOL_A_PAUSE_STAT_PAD, | ||
| 381 | 	ETHTOOL_A_PAUSE_STAT_TX_FRAMES, | ||
| 382 | 	ETHTOOL_A_PAUSE_STAT_RX_FRAMES, | ||
| 383 | |||
| 384 | 	__ETHTOOL_A_PAUSE_STAT_CNT, | ||
| 385 | 	ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1) | ||
| 386 | }; | ||
| 387 | |||
| 388 | enum { | ||
| 389 | 	ETHTOOL_A_PAUSE_UNSPEC, | ||
| 390 | 	ETHTOOL_A_PAUSE_HEADER, | ||
| 391 | 	ETHTOOL_A_PAUSE_AUTONEG, | ||
| 392 | 	ETHTOOL_A_PAUSE_RX, | ||
| 393 | 	ETHTOOL_A_PAUSE_TX, | ||
| 394 | 	ETHTOOL_A_PAUSE_STATS, | ||
| 395 | 	ETHTOOL_A_PAUSE_STATS_SRC, | ||
| 396 | |||
| 397 | 	__ETHTOOL_A_PAUSE_CNT, | ||
| 398 | 	ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1) | ||
| 399 | }; | ||
| 400 | |||
| 401 | enum { | ||
| 402 | 	ETHTOOL_A_EEE_UNSPEC, | ||
| 403 | 	ETHTOOL_A_EEE_HEADER, | ||
| 404 | 	ETHTOOL_A_EEE_MODES_OURS, | ||
| 405 | 	ETHTOOL_A_EEE_MODES_PEER, | ||
| 406 | 	ETHTOOL_A_EEE_ACTIVE, | ||
| 407 | 	ETHTOOL_A_EEE_ENABLED, | ||
| 408 | 	ETHTOOL_A_EEE_TX_LPI_ENABLED, | ||
| 409 | 	ETHTOOL_A_EEE_TX_LPI_TIMER, | ||
| 410 | |||
| 411 | 	__ETHTOOL_A_EEE_CNT, | ||
| 412 | 	ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1) | ||
| 413 | }; | ||
| 414 | |||
| 415 | enum { | ||
| 416 | 	ETHTOOL_A_TS_STAT_UNSPEC, | ||
| 417 | 	ETHTOOL_A_TS_STAT_TX_PKTS, | ||
| 418 | 	ETHTOOL_A_TS_STAT_TX_LOST, | ||
| 419 | 	ETHTOOL_A_TS_STAT_TX_ERR, | ||
| 420 | 	ETHTOOL_A_TS_STAT_TX_ONESTEP_PKTS_UNCONFIRMED, | ||
| 421 | |||
| 422 | 	__ETHTOOL_A_TS_STAT_CNT, | ||
| 423 | 	ETHTOOL_A_TS_STAT_MAX = (__ETHTOOL_A_TS_STAT_CNT - 1) | ||
| 424 | }; | ||
| 425 | |||
| 426 | enum { | ||
| 427 | 	ETHTOOL_A_TS_HWTSTAMP_PROVIDER_UNSPEC, | ||
| 428 | 	ETHTOOL_A_TS_HWTSTAMP_PROVIDER_INDEX, | ||
| 429 | 	ETHTOOL_A_TS_HWTSTAMP_PROVIDER_QUALIFIER, | ||
| 430 | |||
| 431 | 	__ETHTOOL_A_TS_HWTSTAMP_PROVIDER_CNT, | ||
| 432 | 	ETHTOOL_A_TS_HWTSTAMP_PROVIDER_MAX = (__ETHTOOL_A_TS_HWTSTAMP_PROVIDER_CNT - 1) | ||
| 433 | }; | ||
| 434 | |||
| 435 | enum { | ||
| 436 | 	ETHTOOL_A_TSINFO_UNSPEC, | ||
| 437 | 	ETHTOOL_A_TSINFO_HEADER, | ||
| 438 | 	ETHTOOL_A_TSINFO_TIMESTAMPING, | ||
| 439 | 	ETHTOOL_A_TSINFO_TX_TYPES, | ||
| 440 | 	ETHTOOL_A_TSINFO_RX_FILTERS, | ||
| 441 | 	ETHTOOL_A_TSINFO_PHC_INDEX, | ||
| 442 | 	ETHTOOL_A_TSINFO_STATS, | ||
| 443 | 	ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER, | ||
| 444 | 	ETHTOOL_A_TSINFO_HWTSTAMP_SOURCE, | ||
| 445 | 	ETHTOOL_A_TSINFO_HWTSTAMP_PHYINDEX, | ||
| 446 | |||
| 447 | 	__ETHTOOL_A_TSINFO_CNT, | ||
| 448 | 	ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) | ||
| 449 | }; | ||
| 450 | |||
| 451 | enum { | ||
| 452 | 	ETHTOOL_A_CABLE_RESULT_UNSPEC, | ||
| 453 | 	ETHTOOL_A_CABLE_RESULT_PAIR, | ||
| 454 | 	ETHTOOL_A_CABLE_RESULT_CODE, | ||
| 455 | 	ETHTOOL_A_CABLE_RESULT_SRC, | ||
| 456 | |||
| 457 | 	__ETHTOOL_A_CABLE_RESULT_CNT, | ||
| 458 | 	ETHTOOL_A_CABLE_RESULT_MAX = (__ETHTOOL_A_CABLE_RESULT_CNT - 1) | ||
| 459 | }; | ||
| 460 | |||
| 461 | enum { | ||
| 462 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC, | ||
| 463 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR, | ||
| 464 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_CM, | ||
| 465 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_SRC, | ||
| 466 | |||
| 467 | 	__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT, | ||
| 468 | 	ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1) | ||
| 469 | }; | ||
| 470 | |||
| 471 | enum { | ||
| 472 | 	ETHTOOL_A_CABLE_NEST_UNSPEC, | ||
| 473 | 	ETHTOOL_A_CABLE_NEST_RESULT, | ||
| 474 | 	ETHTOOL_A_CABLE_NEST_FAULT_LENGTH, | ||
| 475 | |||
| 476 | 	__ETHTOOL_A_CABLE_NEST_CNT, | ||
| 477 | 	ETHTOOL_A_CABLE_NEST_MAX = (__ETHTOOL_A_CABLE_NEST_CNT - 1) | ||
| 478 | }; | ||
| 479 | |||
| 480 | enum { | ||
| 481 | 	ETHTOOL_A_CABLE_TEST_UNSPEC, | ||
| 482 | 	ETHTOOL_A_CABLE_TEST_HEADER, | ||
| 483 | |||
| 484 | 	__ETHTOOL_A_CABLE_TEST_CNT, | ||
| 485 | 	ETHTOOL_A_CABLE_TEST_MAX = (__ETHTOOL_A_CABLE_TEST_CNT - 1) | ||
| 486 | }; | ||
| 487 | |||
| 488 | enum { | ||
| 489 | 	ETHTOOL_A_CABLE_TEST_NTF_UNSPEC, | ||
| 490 | 	ETHTOOL_A_CABLE_TEST_NTF_HEADER, | ||
| 491 | 	ETHTOOL_A_CABLE_TEST_NTF_STATUS, | ||
| 492 | 	ETHTOOL_A_CABLE_TEST_NTF_NEST, | ||
| 493 | |||
| 494 | 	__ETHTOOL_A_CABLE_TEST_NTF_CNT, | ||
| 495 | 	ETHTOOL_A_CABLE_TEST_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_NTF_CNT - 1) | ||
| 496 | }; | ||
| 497 | |||
| 498 | enum { | ||
| 499 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC, | ||
| 500 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST, | ||
| 501 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST, | ||
| 502 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP, | ||
| 503 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR, | ||
| 504 | |||
| 505 | 	__ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT, | ||
| 506 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = (__ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1) | ||
| 507 | }; | ||
| 508 | |||
| 509 | enum { | ||
| 510 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC, | ||
| 511 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER, | ||
| 512 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS, | ||
| 513 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST, | ||
| 514 | |||
| 515 | 	__ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT, | ||
| 516 | 	ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1) | ||
| 517 | }; | ||
| 518 | |||
| 519 | enum { | ||
| 520 | 	ETHTOOL_A_CABLE_TEST_TDR_UNSPEC, | ||
| 521 | 	ETHTOOL_A_CABLE_TEST_TDR_HEADER, | ||
| 522 | 	ETHTOOL_A_CABLE_TEST_TDR_CFG, | ||
| 523 | |||
| 524 | 	__ETHTOOL_A_CABLE_TEST_TDR_CNT, | ||
| 525 | 	ETHTOOL_A_CABLE_TEST_TDR_MAX = (__ETHTOOL_A_CABLE_TEST_TDR_CNT - 1) | ||
| 526 | }; | ||
| 527 | |||
| 528 | enum { | ||
| 529 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC, | ||
| 530 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT, | ||
| 531 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE, | ||
| 532 | |||
| 533 | 	__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT, | ||
| 534 | 	ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = (__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT - 1) | ||
| 535 | }; | ||
| 536 | |||
| 537 | enum { | ||
| 538 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC, | ||
| 539 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE, | ||
| 540 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES, | ||
| 541 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY, | ||
| 542 | |||
| 543 | 	__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT, | ||
| 544 | 	ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1) | ||
| 545 | }; | ||
| 546 | |||
| 547 | enum { | ||
| 548 | 	ETHTOOL_A_TUNNEL_UDP_UNSPEC, | ||
| 549 | 	ETHTOOL_A_TUNNEL_UDP_TABLE, | ||
| 550 | |||
| 551 | 	__ETHTOOL_A_TUNNEL_UDP_CNT, | ||
| 552 | 	ETHTOOL_A_TUNNEL_UDP_MAX = (__ETHTOOL_A_TUNNEL_UDP_CNT - 1) | ||
| 553 | }; | ||
| 554 | |||
| 555 | enum { | ||
| 556 | 	ETHTOOL_A_TUNNEL_INFO_UNSPEC, | ||
| 557 | 	ETHTOOL_A_TUNNEL_INFO_HEADER, | ||
| 558 | 	ETHTOOL_A_TUNNEL_INFO_UDP_PORTS, | ||
| 559 | |||
| 560 | 	__ETHTOOL_A_TUNNEL_INFO_CNT, | ||
| 561 | 	ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1) | ||
| 562 | }; | ||
| 563 | |||
| 564 | enum { | ||
| 565 | 	ETHTOOL_A_FEC_STAT_UNSPEC, | ||
| 566 | 	ETHTOOL_A_FEC_STAT_PAD, | ||
| 567 | 	ETHTOOL_A_FEC_STAT_CORRECTED, | ||
| 568 | 	ETHTOOL_A_FEC_STAT_UNCORR, | ||
| 569 | 	ETHTOOL_A_FEC_STAT_CORR_BITS, | ||
| 570 | |||
| 571 | 	__ETHTOOL_A_FEC_STAT_CNT, | ||
| 572 | 	ETHTOOL_A_FEC_STAT_MAX = (__ETHTOOL_A_FEC_STAT_CNT - 1) | ||
| 573 | }; | ||
| 574 | |||
| 575 | enum { | ||
| 576 | 	ETHTOOL_A_FEC_UNSPEC, | ||
| 577 | 	ETHTOOL_A_FEC_HEADER, | ||
| 578 | 	ETHTOOL_A_FEC_MODES, | ||
| 579 | 	ETHTOOL_A_FEC_AUTO, | ||
| 580 | 	ETHTOOL_A_FEC_ACTIVE, | ||
| 581 | 	ETHTOOL_A_FEC_STATS, | ||
| 582 | |||
| 583 | 	__ETHTOOL_A_FEC_CNT, | ||
| 584 | 	ETHTOOL_A_FEC_MAX = (__ETHTOOL_A_FEC_CNT - 1) | ||
| 585 | }; | ||
| 586 | |||
| 587 | enum { | ||
| 588 | 	ETHTOOL_A_MODULE_EEPROM_UNSPEC, | ||
| 589 | 	ETHTOOL_A_MODULE_EEPROM_HEADER, | ||
| 590 | 	ETHTOOL_A_MODULE_EEPROM_OFFSET, | ||
| 591 | 	ETHTOOL_A_MODULE_EEPROM_LENGTH, | ||
| 592 | 	ETHTOOL_A_MODULE_EEPROM_PAGE, | ||
| 593 | 	ETHTOOL_A_MODULE_EEPROM_BANK, | ||
| 594 | 	ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS, | ||
| 595 | 	ETHTOOL_A_MODULE_EEPROM_DATA, | ||
| 596 | |||
| 597 | 	__ETHTOOL_A_MODULE_EEPROM_CNT, | ||
| 598 | 	ETHTOOL_A_MODULE_EEPROM_MAX = (__ETHTOOL_A_MODULE_EEPROM_CNT - 1) | ||
| 599 | }; | ||
| 600 | |||
| 601 | enum { | ||
| 602 | 	ETHTOOL_A_STATS_GRP_UNSPEC, | ||
| 603 | 	ETHTOOL_A_STATS_GRP_PAD, | ||
| 604 | 	ETHTOOL_A_STATS_GRP_ID, | ||
| 605 | 	ETHTOOL_A_STATS_GRP_SS_ID, | ||
| 606 | 	ETHTOOL_A_STATS_GRP_STAT, | ||
| 607 | 	ETHTOOL_A_STATS_GRP_HIST_RX, | ||
| 608 | 	ETHTOOL_A_STATS_GRP_HIST_TX, | ||
| 609 | 	ETHTOOL_A_STATS_GRP_HIST_BKT_LOW, | ||
| 610 | 	ETHTOOL_A_STATS_GRP_HIST_BKT_HI, | ||
| 611 | 	ETHTOOL_A_STATS_GRP_HIST_VAL, | ||
| 612 | |||
| 613 | 	__ETHTOOL_A_STATS_GRP_CNT, | ||
| 614 | 	ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_GRP_CNT - 1) | ||
| 615 | }; | ||
| 616 | |||
| 617 | enum { | ||
| 618 | 	ETHTOOL_A_STATS_UNSPEC, | ||
| 619 | 	ETHTOOL_A_STATS_PAD, | ||
| 620 | 	ETHTOOL_A_STATS_HEADER, | ||
| 621 | 	ETHTOOL_A_STATS_GROUPS, | ||
| 622 | 	ETHTOOL_A_STATS_GRP, | ||
| 623 | 	ETHTOOL_A_STATS_SRC, | ||
| 624 | |||
| 625 | 	__ETHTOOL_A_STATS_CNT, | ||
| 626 | 	ETHTOOL_A_STATS_MAX = (__ETHTOOL_A_STATS_CNT - 1) | ||
| 627 | }; | ||
| 628 | |||
| 629 | enum { | ||
| 630 | 	ETHTOOL_A_PHC_VCLOCKS_UNSPEC, | ||
| 631 | 	ETHTOOL_A_PHC_VCLOCKS_HEADER, | ||
| 632 | 	ETHTOOL_A_PHC_VCLOCKS_NUM, | ||
| 633 | 	ETHTOOL_A_PHC_VCLOCKS_INDEX, | ||
| 634 | |||
| 635 | 	__ETHTOOL_A_PHC_VCLOCKS_CNT, | ||
| 636 | 	ETHTOOL_A_PHC_VCLOCKS_MAX = (__ETHTOOL_A_PHC_VCLOCKS_CNT - 1) | ||
| 637 | }; | ||
| 638 | |||
| 639 | enum { | ||
| 640 | 	ETHTOOL_A_MODULE_UNSPEC, | ||
| 641 | 	ETHTOOL_A_MODULE_HEADER, | ||
| 642 | 	ETHTOOL_A_MODULE_POWER_MODE_POLICY, | ||
| 643 | 	ETHTOOL_A_MODULE_POWER_MODE, | ||
| 644 | |||
| 645 | 	__ETHTOOL_A_MODULE_CNT, | ||
| 646 | 	ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1) | ||
| 647 | }; | ||
| 648 | |||
| 649 | enum { | ||
| 650 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_UNSPEC, | ||
| 651 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_MIN, | ||
| 652 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_MAX, | ||
| 653 | |||
| 654 | 	__ETHTOOL_A_C33_PSE_PW_LIMIT_CNT, | ||
| 655 | 	__ETHTOOL_A_C33_PSE_PW_LIMIT_MAX = (__ETHTOOL_A_C33_PSE_PW_LIMIT_CNT - 1) | ||
| 656 | }; | ||
| 657 | |||
| 658 | enum { | ||
| 659 | 	ETHTOOL_A_PSE_UNSPEC, | ||
| 660 | 	ETHTOOL_A_PSE_HEADER, | ||
| 661 | 	ETHTOOL_A_PODL_PSE_ADMIN_STATE, | ||
| 662 | 	ETHTOOL_A_PODL_PSE_ADMIN_CONTROL, | ||
| 663 | 	ETHTOOL_A_PODL_PSE_PW_D_STATUS, | ||
| 664 | 	ETHTOOL_A_C33_PSE_ADMIN_STATE, | ||
| 665 | 	ETHTOOL_A_C33_PSE_ADMIN_CONTROL, | ||
| 666 | 	ETHTOOL_A_C33_PSE_PW_D_STATUS, | ||
| 667 | 	ETHTOOL_A_C33_PSE_PW_CLASS, | ||
| 668 | 	ETHTOOL_A_C33_PSE_ACTUAL_PW, | ||
| 669 | 	ETHTOOL_A_C33_PSE_EXT_STATE, | ||
| 670 | 	ETHTOOL_A_C33_PSE_EXT_SUBSTATE, | ||
| 671 | 	ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT, | ||
| 672 | 	ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES, | ||
| 673 | 	ETHTOOL_A_PSE_PW_D_ID, | ||
| 674 | 	ETHTOOL_A_PSE_PRIO_MAX, | ||
| 675 | 	ETHTOOL_A_PSE_PRIO, | ||
| 676 | |||
| 677 | 	__ETHTOOL_A_PSE_CNT, | ||
| 678 | 	ETHTOOL_A_PSE_MAX = (__ETHTOOL_A_PSE_CNT - 1) | ||
| 679 | }; | ||
| 680 | |||
| 681 | enum { | ||
| 682 | 	ETHTOOL_A_FLOW_ETHER = 1, | ||
| 683 | 	ETHTOOL_A_FLOW_IP4, | ||
| 684 | 	ETHTOOL_A_FLOW_IP6, | ||
| 685 | 	ETHTOOL_A_FLOW_TCP4, | ||
| 686 | 	ETHTOOL_A_FLOW_TCP6, | ||
| 687 | 	ETHTOOL_A_FLOW_UDP4, | ||
| 688 | 	ETHTOOL_A_FLOW_UDP6, | ||
| 689 | 	ETHTOOL_A_FLOW_SCTP4, | ||
| 690 | 	ETHTOOL_A_FLOW_SCTP6, | ||
| 691 | 	ETHTOOL_A_FLOW_AH4, | ||
| 692 | 	ETHTOOL_A_FLOW_AH6, | ||
| 693 | 	ETHTOOL_A_FLOW_ESP4, | ||
| 694 | 	ETHTOOL_A_FLOW_ESP6, | ||
| 695 | 	ETHTOOL_A_FLOW_AH_ESP4, | ||
| 696 | 	ETHTOOL_A_FLOW_AH_ESP6, | ||
| 697 | 	ETHTOOL_A_FLOW_GTPU4, | ||
| 698 | 	ETHTOOL_A_FLOW_GTPU6, | ||
| 699 | 	ETHTOOL_A_FLOW_GTPC4, | ||
| 700 | 	ETHTOOL_A_FLOW_GTPC6, | ||
| 701 | 	ETHTOOL_A_FLOW_GTPC_TEID4, | ||
| 702 | 	ETHTOOL_A_FLOW_GTPC_TEID6, | ||
| 703 | 	ETHTOOL_A_FLOW_GTPU_EH4, | ||
| 704 | 	ETHTOOL_A_FLOW_GTPU_EH6, | ||
| 705 | 	ETHTOOL_A_FLOW_GTPU_UL4, | ||
| 706 | 	ETHTOOL_A_FLOW_GTPU_UL6, | ||
| 707 | 	ETHTOOL_A_FLOW_GTPU_DL4, | ||
| 708 | 	ETHTOOL_A_FLOW_GTPU_DL6, | ||
| 709 | |||
| 710 | 	__ETHTOOL_A_FLOW_CNT, | ||
| 711 | 	ETHTOOL_A_FLOW_MAX = (__ETHTOOL_A_FLOW_CNT - 1) | ||
| 712 | }; | ||
| 713 | |||
| 714 | enum { | ||
| 715 | 	ETHTOOL_A_RSS_UNSPEC, | ||
| 716 | 	ETHTOOL_A_RSS_HEADER, | ||
| 717 | 	ETHTOOL_A_RSS_CONTEXT, | ||
| 718 | 	ETHTOOL_A_RSS_HFUNC, | ||
| 719 | 	ETHTOOL_A_RSS_INDIR, | ||
| 720 | 	ETHTOOL_A_RSS_HKEY, | ||
| 721 | 	ETHTOOL_A_RSS_INPUT_XFRM, | ||
| 722 | 	ETHTOOL_A_RSS_START_CONTEXT, | ||
| 723 | 	ETHTOOL_A_RSS_FLOW_HASH, | ||
| 724 | |||
| 725 | 	__ETHTOOL_A_RSS_CNT, | ||
| 726 | 	ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1) | ||
| 727 | }; | ||
| 728 | |||
| 729 | enum { | ||
| 730 | 	ETHTOOL_A_PLCA_UNSPEC, | ||
| 731 | 	ETHTOOL_A_PLCA_HEADER, | ||
| 732 | 	ETHTOOL_A_PLCA_VERSION, | ||
| 733 | 	ETHTOOL_A_PLCA_ENABLED, | ||
| 734 | 	ETHTOOL_A_PLCA_STATUS, | ||
| 735 | 	ETHTOOL_A_PLCA_NODE_CNT, | ||
| 736 | 	ETHTOOL_A_PLCA_NODE_ID, | ||
| 737 | 	ETHTOOL_A_PLCA_TO_TMR, | ||
| 738 | 	ETHTOOL_A_PLCA_BURST_CNT, | ||
| 739 | 	ETHTOOL_A_PLCA_BURST_TMR, | ||
| 740 | |||
| 741 | 	__ETHTOOL_A_PLCA_CNT, | ||
| 742 | 	ETHTOOL_A_PLCA_MAX = (__ETHTOOL_A_PLCA_CNT - 1) | ||
| 743 | }; | ||
| 744 | |||
| 745 | enum { | ||
| 746 | 	ETHTOOL_A_MODULE_FW_FLASH_UNSPEC, | ||
| 747 | 	ETHTOOL_A_MODULE_FW_FLASH_HEADER, | ||
| 748 | 	ETHTOOL_A_MODULE_FW_FLASH_FILE_NAME, | ||
| 749 | 	ETHTOOL_A_MODULE_FW_FLASH_PASSWORD, | ||
| 750 | 	ETHTOOL_A_MODULE_FW_FLASH_STATUS, | ||
| 751 | 	ETHTOOL_A_MODULE_FW_FLASH_STATUS_MSG, | ||
| 752 | 	ETHTOOL_A_MODULE_FW_FLASH_DONE, | ||
| 753 | 	ETHTOOL_A_MODULE_FW_FLASH_TOTAL, | ||
| 754 | |||
| 755 | 	__ETHTOOL_A_MODULE_FW_FLASH_CNT, | ||
| 756 | 	ETHTOOL_A_MODULE_FW_FLASH_MAX = (__ETHTOOL_A_MODULE_FW_FLASH_CNT - 1) | ||
| 757 | }; | ||
| 758 | |||
| 759 | enum { | ||
| 760 | 	ETHTOOL_A_PHY_UNSPEC, | ||
| 761 | 	ETHTOOL_A_PHY_HEADER, | ||
| 762 | 	ETHTOOL_A_PHY_INDEX, | ||
| 763 | 	ETHTOOL_A_PHY_DRVNAME, | ||
| 764 | 	ETHTOOL_A_PHY_NAME, | ||
| 765 | 	ETHTOOL_A_PHY_UPSTREAM_TYPE, | ||
| 766 | 	ETHTOOL_A_PHY_UPSTREAM_INDEX, | ||
| 767 | 	ETHTOOL_A_PHY_UPSTREAM_SFP_NAME, | ||
| 768 | 	ETHTOOL_A_PHY_DOWNSTREAM_SFP_NAME, | ||
| 769 | |||
| 770 | 	__ETHTOOL_A_PHY_CNT, | ||
| 771 | 	ETHTOOL_A_PHY_MAX = (__ETHTOOL_A_PHY_CNT - 1) | ||
| 772 | }; | ||
| 773 | |||
| 774 | enum { | ||
| 775 | 	ETHTOOL_A_TSCONFIG_UNSPEC, | ||
| 776 | 	ETHTOOL_A_TSCONFIG_HEADER, | ||
| 777 | 	ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER, | ||
| 778 | 	ETHTOOL_A_TSCONFIG_TX_TYPES, | ||
| 779 | 	ETHTOOL_A_TSCONFIG_RX_FILTERS, | ||
| 780 | 	ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS, | ||
| 781 | |||
| 782 | 	__ETHTOOL_A_TSCONFIG_CNT, | ||
| 783 | 	ETHTOOL_A_TSCONFIG_MAX = (__ETHTOOL_A_TSCONFIG_CNT - 1) | ||
| 784 | }; | ||
| 785 | |||
| 786 | enum { | ||
| 787 | 	ETHTOOL_A_PSE_NTF_HEADER = 1, | ||
| 788 | 	ETHTOOL_A_PSE_NTF_EVENTS, | ||
| 789 | |||
| 790 | 	__ETHTOOL_A_PSE_NTF_CNT, | ||
| 791 | 	ETHTOOL_A_PSE_NTF_MAX = (__ETHTOOL_A_PSE_NTF_CNT - 1) | ||
| 792 | }; | ||
| 793 | |||
| 794 | enum { | ||
| 795 | 	ETHTOOL_MSG_USER_NONE = 0, | ||
| 796 | 	ETHTOOL_MSG_STRSET_GET = 1, | ||
| 797 | 	ETHTOOL_MSG_LINKINFO_GET, | ||
| 798 | 	ETHTOOL_MSG_LINKINFO_SET, | ||
| 799 | 	ETHTOOL_MSG_LINKMODES_GET, | ||
| 800 | 	ETHTOOL_MSG_LINKMODES_SET, | ||
| 801 | 	ETHTOOL_MSG_LINKSTATE_GET, | ||
| 802 | 	ETHTOOL_MSG_DEBUG_GET, | ||
| 803 | 	ETHTOOL_MSG_DEBUG_SET, | ||
| 804 | 	ETHTOOL_MSG_WOL_GET, | ||
| 805 | 	ETHTOOL_MSG_WOL_SET, | ||
| 806 | 	ETHTOOL_MSG_FEATURES_GET, | ||
| 807 | 	ETHTOOL_MSG_FEATURES_SET, | ||
| 808 | 	ETHTOOL_MSG_PRIVFLAGS_GET, | ||
| 809 | 	ETHTOOL_MSG_PRIVFLAGS_SET, | ||
| 810 | 	ETHTOOL_MSG_RINGS_GET, | ||
| 811 | 	ETHTOOL_MSG_RINGS_SET, | ||
| 812 | 	ETHTOOL_MSG_CHANNELS_GET, | ||
| 813 | 	ETHTOOL_MSG_CHANNELS_SET, | ||
| 814 | 	ETHTOOL_MSG_COALESCE_GET, | ||
| 815 | 	ETHTOOL_MSG_COALESCE_SET, | ||
| 816 | 	ETHTOOL_MSG_PAUSE_GET, | ||
| 817 | 	ETHTOOL_MSG_PAUSE_SET, | ||
| 818 | 	ETHTOOL_MSG_EEE_GET, | ||
| 819 | 	ETHTOOL_MSG_EEE_SET, | ||
| 820 | 	ETHTOOL_MSG_TSINFO_GET, | ||
| 821 | 	ETHTOOL_MSG_CABLE_TEST_ACT, | ||
| 822 | 	ETHTOOL_MSG_CABLE_TEST_TDR_ACT, | ||
| 823 | 	ETHTOOL_MSG_TUNNEL_INFO_GET, | ||
| 824 | 	ETHTOOL_MSG_FEC_GET, | ||
| 825 | 	ETHTOOL_MSG_FEC_SET, | ||
| 826 | 	ETHTOOL_MSG_MODULE_EEPROM_GET, | ||
| 827 | 	ETHTOOL_MSG_STATS_GET, | ||
| 828 | 	ETHTOOL_MSG_PHC_VCLOCKS_GET, | ||
| 829 | 	ETHTOOL_MSG_MODULE_GET, | ||
| 830 | 	ETHTOOL_MSG_MODULE_SET, | ||
| 831 | 	ETHTOOL_MSG_PSE_GET, | ||
| 832 | 	ETHTOOL_MSG_PSE_SET, | ||
| 833 | 	ETHTOOL_MSG_RSS_GET, | ||
| 834 | 	ETHTOOL_MSG_PLCA_GET_CFG, | ||
| 835 | 	ETHTOOL_MSG_PLCA_SET_CFG, | ||
| 836 | 	ETHTOOL_MSG_PLCA_GET_STATUS, | ||
| 837 | 	ETHTOOL_MSG_MM_GET, | ||
| 838 | 	ETHTOOL_MSG_MM_SET, | ||
| 839 | 	ETHTOOL_MSG_MODULE_FW_FLASH_ACT, | ||
| 840 | 	ETHTOOL_MSG_PHY_GET, | ||
| 841 | 	ETHTOOL_MSG_TSCONFIG_GET, | ||
| 842 | 	ETHTOOL_MSG_TSCONFIG_SET, | ||
| 843 | 	ETHTOOL_MSG_RSS_SET, | ||
| 844 | 	ETHTOOL_MSG_RSS_CREATE_ACT, | ||
| 845 | 	ETHTOOL_MSG_RSS_DELETE_ACT, | ||
| 846 | |||
| 847 | 	__ETHTOOL_MSG_USER_CNT, | ||
| 848 | 	ETHTOOL_MSG_USER_MAX = (__ETHTOOL_MSG_USER_CNT - 1) | ||
| 849 | }; | ||
| 850 | |||
| 851 | enum { | ||
| 852 | 	ETHTOOL_MSG_KERNEL_NONE = 0, | ||
| 853 | 	ETHTOOL_MSG_STRSET_GET_REPLY = 1, | ||
| 854 | 	ETHTOOL_MSG_LINKINFO_GET_REPLY, | ||
| 855 | 	ETHTOOL_MSG_LINKINFO_NTF, | ||
| 856 | 	ETHTOOL_MSG_LINKMODES_GET_REPLY, | ||
| 857 | 	ETHTOOL_MSG_LINKMODES_NTF, | ||
| 858 | 	ETHTOOL_MSG_LINKSTATE_GET_REPLY, | ||
| 859 | 	ETHTOOL_MSG_DEBUG_GET_REPLY, | ||
| 860 | 	ETHTOOL_MSG_DEBUG_NTF, | ||
| 861 | 	ETHTOOL_MSG_WOL_GET_REPLY, | ||
| 862 | 	ETHTOOL_MSG_WOL_NTF, | ||
| 863 | 	ETHTOOL_MSG_FEATURES_GET_REPLY, | ||
| 864 | 	ETHTOOL_MSG_FEATURES_SET_REPLY, | ||
| 865 | 	ETHTOOL_MSG_FEATURES_NTF, | ||
| 866 | 	ETHTOOL_MSG_PRIVFLAGS_GET_REPLY, | ||
| 867 | 	ETHTOOL_MSG_PRIVFLAGS_NTF, | ||
| 868 | 	ETHTOOL_MSG_RINGS_GET_REPLY, | ||
| 869 | 	ETHTOOL_MSG_RINGS_NTF, | ||
| 870 | 	ETHTOOL_MSG_CHANNELS_GET_REPLY, | ||
| 871 | 	ETHTOOL_MSG_CHANNELS_NTF, | ||
| 872 | 	ETHTOOL_MSG_COALESCE_GET_REPLY, | ||
| 873 | 	ETHTOOL_MSG_COALESCE_NTF, | ||
| 874 | 	ETHTOOL_MSG_PAUSE_GET_REPLY, | ||
| 875 | 	ETHTOOL_MSG_PAUSE_NTF, | ||
| 876 | 	ETHTOOL_MSG_EEE_GET_REPLY, | ||
| 877 | 	ETHTOOL_MSG_EEE_NTF, | ||
| 878 | 	ETHTOOL_MSG_TSINFO_GET_REPLY, | ||
| 879 | 	ETHTOOL_MSG_CABLE_TEST_NTF, | ||
| 880 | 	ETHTOOL_MSG_CABLE_TEST_TDR_NTF, | ||
| 881 | 	ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY, | ||
| 882 | 	ETHTOOL_MSG_FEC_GET_REPLY, | ||
| 883 | 	ETHTOOL_MSG_FEC_NTF, | ||
| 884 | 	ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY, | ||
| 885 | 	ETHTOOL_MSG_STATS_GET_REPLY, | ||
| 886 | 	ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY, | ||
| 887 | 	ETHTOOL_MSG_MODULE_GET_REPLY, | ||
| 888 | 	ETHTOOL_MSG_MODULE_NTF, | ||
| 889 | 	ETHTOOL_MSG_PSE_GET_REPLY, | ||
| 890 | 	ETHTOOL_MSG_RSS_GET_REPLY, | ||
| 891 | 	ETHTOOL_MSG_PLCA_GET_CFG_REPLY, | ||
| 892 | 	ETHTOOL_MSG_PLCA_GET_STATUS_REPLY, | ||
| 893 | 	ETHTOOL_MSG_PLCA_NTF, | ||
| 894 | 	ETHTOOL_MSG_MM_GET_REPLY, | ||
| 895 | 	ETHTOOL_MSG_MM_NTF, | ||
| 896 | 	ETHTOOL_MSG_MODULE_FW_FLASH_NTF, | ||
| 897 | 	ETHTOOL_MSG_PHY_GET_REPLY, | ||
| 898 | 	ETHTOOL_MSG_PHY_NTF, | ||
| 899 | 	ETHTOOL_MSG_TSCONFIG_GET_REPLY, | ||
| 900 | 	ETHTOOL_MSG_TSCONFIG_SET_REPLY, | ||
| 901 | 	ETHTOOL_MSG_PSE_NTF, | ||
| 902 | 	ETHTOOL_MSG_RSS_NTF, | ||
| 903 | 	ETHTOOL_MSG_RSS_CREATE_ACT_REPLY, | ||
| 904 | 	ETHTOOL_MSG_RSS_CREATE_NTF, | ||
| 905 | 	ETHTOOL_MSG_RSS_DELETE_NTF, | ||
| 906 | |||
| 907 | 	__ETHTOOL_MSG_KERNEL_CNT, | ||
| 908 | 	ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1) | ||
| 909 | }; | ||
| 910 | |||
| 911 | #define ETHTOOL_MCGRP_MONITOR_NAME	"monitor" | ||
| 912 | |||
| 913 | #endif /* _LINUX_ETHTOOL_NETLINK_GENERATED_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/f2fs.h+7| ... | @@ -44,6 +44,7 @@ | ... | @@ -44,6 +44,7 @@ |
| 44 | #define F2FS_IOC_COMPRESS_FILE		_IO(F2FS_IOCTL_MAGIC, 24) | 44 | #define F2FS_IOC_COMPRESS_FILE		_IO(F2FS_IOCTL_MAGIC, 24) |
| 45 | #define F2FS_IOC_START_ATOMIC_REPLACE	_IO(F2FS_IOCTL_MAGIC, 25) | 45 | #define F2FS_IOC_START_ATOMIC_REPLACE	_IO(F2FS_IOCTL_MAGIC, 25) |
| 46 | #define F2FS_IOC_GET_DEV_ALIAS_FILE	_IOR(F2FS_IOCTL_MAGIC, 26, __u32) | 46 | #define F2FS_IOC_GET_DEV_ALIAS_FILE	_IOR(F2FS_IOCTL_MAGIC, 26, __u32) |
| 47 | #define F2FS_IOC_IO_PRIO		_IOW(F2FS_IOCTL_MAGIC, 27, __u32) | ||
| 47 | 48 | ||
| 48 | /* | 49 | /* |
| 49 | * should be same as XFS_IOC_GOINGDOWN. | 50 | * should be same as XFS_IOC_GOINGDOWN. |
| ... | @@ -63,6 +64,12 @@ | ... | @@ -63,6 +64,12 @@ |
| 63 | #define F2FS_TRIM_FILE_ZEROOUT		0x2	/* zero out */ | 64 | #define F2FS_TRIM_FILE_ZEROOUT		0x2	/* zero out */ |
| 64 | #define F2FS_TRIM_FILE_MASK		0x3 | 65 | #define F2FS_TRIM_FILE_MASK		0x3 |
| 65 | 66 | ||
| 67 | /* for F2FS_IOC_IO_PRIO */ | ||
| 68 | enum { | ||
| 69 | 	F2FS_IOPRIO_WRITE = 1,	/* high write priority */ | ||
| 70 | 	F2FS_IOPRIO_MAX, | ||
| 71 | }; | ||
| 72 | |||
| 66 | struct f2fs_gc_range { | 73 | struct f2fs_gc_range { |
| 67 | 	__u32 sync; | 74 | 	__u32 sync; |
| 68 | 	__u64 start; | 75 | 	__u64 start; |
lib/libc/include/any-linux-any/linux/falloc.h+17| ... | @@ -78,4 +78,21 @@ | ... | @@ -78,4 +78,21 @@ |
| 78 | */ | 78 | */ |
| 79 | #define FALLOC_FL_UNSHARE_RANGE		0x40 | 79 | #define FALLOC_FL_UNSHARE_RANGE		0x40 |
| 80 | 80 | ||
| 81 | /* | ||
| 82 | * FALLOC_FL_WRITE_ZEROES zeroes a specified file range in such a way that | ||
| 83 | * subsequent writes to that range do not require further changes to the file | ||
| 84 | * mapping metadata. This flag is beneficial for subsequent pure overwriting | ||
| 85 | * within this range, as it can save on block allocation and, consequently, | ||
| 86 | * significant metadata changes. Therefore, filesystems that always require | ||
| 87 | * out-of-place writes should not support this flag. | ||
| 88 | * | ||
| 89 | * Different filesystems may implement different limitations on the | ||
| 90 | * granularity of the zeroing operation. Most will preferably be accelerated | ||
| 91 | * by submitting write zeroes command if the backing storage supports, which | ||
| 92 | * may not physically write zeros to the media. | ||
| 93 | * | ||
| 94 | * This flag cannot be specified in conjunction with the FALLOC_FL_KEEP_SIZE. | ||
| 95 | */ | ||
| 96 | #define FALLOC_FL_WRITE_ZEROES		0x80 | ||
| 97 | |||
| 81 | #endif /* _FALLOC_H_ */ | 98 | #endif /* _FALLOC_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/fanotify.h+28| ... | @@ -25,6 +25,11 @@ | ... | @@ -25,6 +25,11 @@ |
| 25 | #define FAN_OPEN_PERM		0x00010000	/* File open in perm check */ | 25 | #define FAN_OPEN_PERM		0x00010000	/* File open in perm check */ |
| 26 | #define FAN_ACCESS_PERM		0x00020000	/* File accessed in perm check */ | 26 | #define FAN_ACCESS_PERM		0x00020000	/* File accessed in perm check */ |
| 27 | #define FAN_OPEN_EXEC_PERM	0x00040000	/* File open/exec in perm check */ | 27 | #define FAN_OPEN_EXEC_PERM	0x00040000	/* File open/exec in perm check */ |
| 28 | /* #define FAN_DIR_MODIFY	0x00080000 */	/* Deprecated (reserved) */ | ||
| 29 | |||
| 30 | #define FAN_PRE_ACCESS		0x00100000	/* Pre-content access hook */ | ||
| 31 | #define FAN_MNT_ATTACH		0x01000000	/* Mount was attached */ | ||
| 32 | #define FAN_MNT_DETACH		0x02000000	/* Mount was detached */ | ||
| 28 | 33 | ||
| 29 | #define FAN_EVENT_ON_CHILD	0x08000000	/* Interested in child events */ | 34 | #define FAN_EVENT_ON_CHILD	0x08000000	/* Interested in child events */ |
| 30 | 35 | ||
| ... | @@ -61,6 +66,7 @@ | ... | @@ -61,6 +66,7 @@ |
| 61 | #define FAN_REPORT_NAME		0x00000800	/* Report events with name */ | 66 | #define FAN_REPORT_NAME		0x00000800	/* Report events with name */ |
| 62 | #define FAN_REPORT_TARGET_FID	0x00001000	/* Report dirent target id */ | 67 | #define FAN_REPORT_TARGET_FID	0x00001000	/* Report dirent target id */ |
| 63 | #define FAN_REPORT_FD_ERROR	0x00002000	/* event->fd can report error */ | 68 | #define FAN_REPORT_FD_ERROR	0x00002000	/* event->fd can report error */ |
| 69 | #define FAN_REPORT_MNT		0x00004000	/* Report mount events */ | ||
| 64 | 70 | ||
| 65 | /* Convenience macro - FAN_REPORT_NAME requires FAN_REPORT_DIR_FID */ | 71 | /* Convenience macro - FAN_REPORT_NAME requires FAN_REPORT_DIR_FID */ |
| 66 | #define FAN_REPORT_DFID_NAME	(FAN_REPORT_DIR_FID | FAN_REPORT_NAME) | 72 | #define FAN_REPORT_DFID_NAME	(FAN_REPORT_DIR_FID | FAN_REPORT_NAME) |
| ... | @@ -91,6 +97,7 @@ | ... | @@ -91,6 +97,7 @@ |
| 91 | #define FAN_MARK_INODE		0x00000000 | 97 | #define FAN_MARK_INODE		0x00000000 |
| 92 | #define FAN_MARK_MOUNT		0x00000010 | 98 | #define FAN_MARK_MOUNT		0x00000010 |
| 93 | #define FAN_MARK_FILESYSTEM	0x00000100 | 99 | #define FAN_MARK_FILESYSTEM	0x00000100 |
| 100 | #define FAN_MARK_MNTNS		0x00000110 | ||
| 94 | 101 | ||
| 95 | /* | 102 | /* |
| 96 | * Convenience macro - FAN_MARK_IGNORE requires FAN_MARK_IGNORED_SURV_MODIFY | 103 | * Convenience macro - FAN_MARK_IGNORE requires FAN_MARK_IGNORED_SURV_MODIFY |
| ... | @@ -143,6 +150,8 @@ struct fanotify_event_metadata { | ... | @@ -143,6 +150,8 @@ struct fanotify_event_metadata { |
| 143 | #define FAN_EVENT_INFO_TYPE_DFID	3 | 150 | #define FAN_EVENT_INFO_TYPE_DFID	3 |
| 144 | #define FAN_EVENT_INFO_TYPE_PIDFD	4 | 151 | #define FAN_EVENT_INFO_TYPE_PIDFD	4 |
| 145 | #define FAN_EVENT_INFO_TYPE_ERROR	5 | 152 | #define FAN_EVENT_INFO_TYPE_ERROR	5 |
| 153 | #define FAN_EVENT_INFO_TYPE_RANGE	6 | ||
| 154 | #define FAN_EVENT_INFO_TYPE_MNT		7 | ||
| 146 | 155 | ||
| 147 | /* Special info types for FAN_RENAME */ | 156 | /* Special info types for FAN_RENAME */ |
| 148 | #define FAN_EVENT_INFO_TYPE_OLD_DFID_NAME	10 | 157 | #define FAN_EVENT_INFO_TYPE_OLD_DFID_NAME	10 |
| ... | @@ -189,6 +198,18 @@ struct fanotify_event_info_error { | ... | @@ -189,6 +198,18 @@ struct fanotify_event_info_error { |
| 189 | 	__u32 error_count; | 198 | 	__u32 error_count; |
| 190 | }; | 199 | }; |
| 191 | 200 | ||
| 201 | struct fanotify_event_info_range { | ||
| 202 | 	struct fanotify_event_info_header hdr; | ||
| 203 | 	__u32 pad; | ||
| 204 | 	__u64 offset; | ||
| 205 | 	__u64 count; | ||
| 206 | }; | ||
| 207 | |||
| 208 | struct fanotify_event_info_mnt { | ||
| 209 | 	struct fanotify_event_info_header hdr; | ||
| 210 | 	__u64 mnt_id; | ||
| 211 | }; | ||
| 212 | |||
| 192 | /* | 213 | /* |
| 193 | * User space may need to record additional information about its decision. | 214 | * User space may need to record additional information about its decision. |
| 194 | * The extra information type records what kind of information is included. | 215 | * The extra information type records what kind of information is included. |
| ... | @@ -224,6 +245,13 @@ struct fanotify_response_info_audit_rule { | ... | @@ -224,6 +245,13 @@ struct fanotify_response_info_audit_rule { |
| 224 | /* Legit userspace responses to a _PERM event */ | 245 | /* Legit userspace responses to a _PERM event */ |
| 225 | #define FAN_ALLOW	0x01 | 246 | #define FAN_ALLOW	0x01 |
| 226 | #define FAN_DENY	0x02 | 247 | #define FAN_DENY	0x02 |
| 248 | /* errno other than EPERM can specified in upper byte of deny response */ | ||
| 249 | #define FAN_ERRNO_BITS	8 | ||
| 250 | #define FAN_ERRNO_SHIFT (32 - FAN_ERRNO_BITS) | ||
| 251 | #define FAN_ERRNO_MASK	((1 << FAN_ERRNO_BITS) - 1) | ||
| 252 | #define FAN_DENY_ERRNO(err) \ | ||
| 253 | 	(FAN_DENY | ((((__u32)(err)) & FAN_ERRNO_MASK) << FAN_ERRNO_SHIFT)) | ||
| 254 | |||
| 227 | #define FAN_AUDIT	0x10	/* Bitmask to create audit record for result */ | 255 | #define FAN_AUDIT	0x10	/* Bitmask to create audit record for result */ |
| 228 | #define FAN_INFO	0x20	/* Bitmask to indicate additional information */ | 256 | #define FAN_INFO	0x20	/* Bitmask to indicate additional information */ |
| 229 | 257 |
lib/libc/include/any-linux-any/linux/fcntl.h+22| ... | @@ -90,10 +90,28 @@ | ... | @@ -90,10 +90,28 @@ |
| 90 | #define DN_ATTRIB	0x00000020	/* File changed attibutes */ | 90 | #define DN_ATTRIB	0x00000020	/* File changed attibutes */ |
| 91 | #define DN_MULTISHOT	0x80000000	/* Don't remove notifier */ | 91 | #define DN_MULTISHOT	0x80000000	/* Don't remove notifier */ |
| 92 | 92 | ||
| 93 | /* Reserved kernel ranges [-100], [-10000, -40000]. */ | ||
| 93 | #define AT_FDCWD		-100 /* Special value for dirfd used to | 94 | #define AT_FDCWD		-100 /* Special value for dirfd used to |
| 94 | 					 indicate openat should use the | 95 | 					 indicate openat should use the |
| 95 | 					 current working directory. */ | 96 | 					 current working directory. */ |
| 96 | 97 | ||
| 98 | /* | ||
| 99 | * The concept of process and threads in userland and the kernel is a confusing | ||
| 100 | * one - within the kernel every thread is a 'task' with its own individual PID, | ||
| 101 | * however from userland's point of view threads are grouped by a single PID, | ||
| 102 | * which is that of the 'thread group leader', typically the first thread | ||
| 103 | * spawned. | ||
| 104 | * | ||
| 105 | * To cut the Gideon knot, for internal kernel usage, we refer to | ||
| 106 | * PIDFD_SELF_THREAD to refer to the current thread (or task from a kernel | ||
| 107 | * perspective), and PIDFD_SELF_THREAD_GROUP to refer to the current thread | ||
| 108 | * group leader... | ||
| 109 | */ | ||
| 110 | #define PIDFD_SELF_THREAD		-10000 /* Current thread. */ | ||
| 111 | #define PIDFD_SELF_THREAD_GROUP		-10001 /* Current thread group leader. */ | ||
| 112 | |||
| 113 | #define FD_PIDFS_ROOT			-10002 /* Root of the pidfs filesystem */ | ||
| 114 | #define FD_INVALID			-10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */ | ||
| 97 | 115 | ||
| 98 | /* Generic flags for the *at(2) family of syscalls. */ | 116 | /* Generic flags for the *at(2) family of syscalls. */ |
| 99 | 117 | ||
| ... | @@ -155,4 +173,8 @@ | ... | @@ -155,4 +173,8 @@ |
| 155 | #define AT_HANDLE_MNT_ID_UNIQUE	0x001	/* Return the u64 unique mount ID. */ | 173 | #define AT_HANDLE_MNT_ID_UNIQUE	0x001	/* Return the u64 unique mount ID. */ |
| 156 | #define AT_HANDLE_CONNECTABLE	0x002	/* Request a connectable file handle */ | 174 | #define AT_HANDLE_CONNECTABLE	0x002	/* Request a connectable file handle */ |
| 157 | 175 | ||
| 176 | /* Flags for execveat2(2). */ | ||
| 177 | #define AT_EXECVE_CHECK		0x10000	/* Only perform a check if execution | ||
| 178 | 					 would be allowed. */ | ||
| 179 | |||
| 158 | #endif /* _LINUX_FCNTL_H */ | 180 | #endif /* _LINUX_FCNTL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/fib_rules.h+5| ... | @@ -68,6 +68,11 @@ enum { | ... | @@ -68,6 +68,11 @@ enum { |
| 68 | 	FRA_SPORT_RANGE, /* sport */ | 68 | 	FRA_SPORT_RANGE, /* sport */ |
| 69 | 	FRA_DPORT_RANGE, /* dport */ | 69 | 	FRA_DPORT_RANGE, /* dport */ |
| 70 | 	FRA_DSCP,	/* dscp */ | 70 | 	FRA_DSCP,	/* dscp */ |
| 71 | 	FRA_FLOWLABEL,	/* flowlabel */ | ||
| 72 | 	FRA_FLOWLABEL_MASK,	/* flowlabel mask */ | ||
| 73 | 	FRA_SPORT_MASK,	/* sport mask */ | ||
| 74 | 	FRA_DPORT_MASK,	/* dport mask */ | ||
| 75 | 	FRA_DSCP_MASK,	/* dscp mask */ | ||
| 71 | 	__FRA_MAX | 76 | 	__FRA_MAX |
| 72 | }; | 77 | }; |
| 73 | 78 |
lib/libc/include/any-linux-any/linux/fiemap.h+33-14| ... | @@ -14,37 +14,56 @@ | ... | @@ -14,37 +14,56 @@ |
| 14 | 14 | ||
| 15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 16 | 16 | ||
| 17 | /** | ||
| 18 | * struct fiemap_extent - description of one fiemap extent | ||
| 19 | * @fe_logical: byte offset of the extent in the file | ||
| 20 | * @fe_physical: byte offset of extent on disk | ||
| 21 | * @fe_length: length in bytes for this extent | ||
| 22 | * @fe_flags: FIEMAP_EXTENT_* flags for this extent | ||
| 23 | */ | ||
| 17 | struct fiemap_extent { | 24 | struct fiemap_extent { |
| 18 | 	__u64 fe_logical; /* logical offset in bytes for the start of | 25 | 	__u64 fe_logical; |
| 19 | 			 * the extent from the beginning of the file */ | 26 | 	__u64 fe_physical; |
| 20 | 	__u64 fe_physical; /* physical offset in bytes for the start | 27 | 	__u64 fe_length; |
| 21 | 			 * of the extent from the beginning of the disk */ | 28 | 	/* private: */ |
| 22 | 	__u64 fe_length; /* length in bytes for this extent */ | ||
| 23 | 	__u64 fe_reserved64[2]; | 29 | 	__u64 fe_reserved64[2]; |
| 24 | 	__u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ | 30 | 	/* public: */ |
| 31 | 	__u32 fe_flags; | ||
| 32 | 	/* private: */ | ||
| 25 | 	__u32 fe_reserved[3]; | 33 | 	__u32 fe_reserved[3]; |
| 26 | }; | 34 | }; |
| 27 | 35 | ||
| 36 | /** | ||
| 37 | * struct fiemap - file extent mappings | ||
| 38 | * @fm_start: byte offset (inclusive) at which to start mapping (in) | ||
| 39 | * @fm_length: logical length of mapping which userspace wants (in) | ||
| 40 | * @fm_flags: FIEMAP_FLAG_* flags for request (in/out) | ||
| 41 | * @fm_mapped_extents: number of extents that were mapped (out) | ||
| 42 | * @fm_extent_count: size of fm_extents array (in) | ||
| 43 | * @fm_extents: array of mapped extents (out) | ||
| 44 | */ | ||
| 28 | struct fiemap { | 45 | struct fiemap { |
| 29 | 	__u64 fm_start;		/* logical offset (inclusive) at | 46 | 	__u64 fm_start; |
| 30 | 				 * which to start mapping (in) */ | 47 | 	__u64 fm_length; |
| 31 | 	__u64 fm_length;	/* logical length of mapping which | 48 | 	__u32 fm_flags; |
| 32 | 				 * userspace wants (in) */ | 49 | 	__u32 fm_mapped_extents; |
| 33 | 	__u32 fm_flags;		/* FIEMAP_FLAG_* flags for request (in/out) */ | 50 | 	__u32 fm_extent_count; |
| 34 | 	__u32 fm_mapped_extents;/* number of extents that were mapped (out) */ | 51 | 	/* private: */ |
| 35 | 	__u32 fm_extent_count; /* size of fm_extents array (in) */ | ||
| 36 | 	__u32 fm_reserved; | 52 | 	__u32 fm_reserved; |
| 37 | 	struct fiemap_extent fm_extents[]; /* array of mapped extents (out) */ | 53 | 	/* public: */ |
| 54 | 	struct fiemap_extent fm_extents[]; | ||
| 38 | }; | 55 | }; |
| 39 | 56 | ||
| 40 | #define FIEMAP_MAX_OFFSET	(~0ULL) | 57 | #define FIEMAP_MAX_OFFSET	(~0ULL) |
| 41 | 58 | ||
| 59 | /* flags used in fm_flags: */ | ||
| 42 | #define FIEMAP_FLAG_SYNC	0x00000001 /* sync file data before map */ | 60 | #define FIEMAP_FLAG_SYNC	0x00000001 /* sync file data before map */ |
| 43 | #define FIEMAP_FLAG_XATTR	0x00000002 /* map extended attribute tree */ | 61 | #define FIEMAP_FLAG_XATTR	0x00000002 /* map extended attribute tree */ |
| 44 | #define FIEMAP_FLAG_CACHE	0x00000004 /* request caching of the extents */ | 62 | #define FIEMAP_FLAG_CACHE	0x00000004 /* request caching of the extents */ |
| 45 | 63 | ||
| 46 | #define FIEMAP_FLAGS_COMPAT	(FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR) | 64 | #define FIEMAP_FLAGS_COMPAT	(FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR) |
| 47 | 65 | ||
| 66 | /* flags used in fe_flags: */ | ||
| 48 | #define FIEMAP_EXTENT_LAST		0x00000001 /* Last extent in file. */ | 67 | #define FIEMAP_EXTENT_LAST		0x00000001 /* Last extent in file. */ |
| 49 | #define FIEMAP_EXTENT_UNKNOWN		0x00000002 /* Data location unknown. */ | 68 | #define FIEMAP_EXTENT_UNKNOWN		0x00000002 /* Data location unknown. */ |
| 50 | #define FIEMAP_EXTENT_DELALLOC		0x00000004 /* Location still pending. | 69 | #define FIEMAP_EXTENT_DELALLOC		0x00000004 /* Location still pending. |
lib/libc/include/any-linux-any/linux/firewire-cdev.h+2-1| ... | @@ -449,7 +449,8 @@ struct fw_cdev_event_phy_packet { | ... | @@ -449,7 +449,8 @@ struct fw_cdev_event_phy_packet { |
| 449 | *		which the packet arrived. For %FW_CDEV_EVENT_PHY_PACKET_SENT2 and non-ping packet, | 449 | *		which the packet arrived. For %FW_CDEV_EVENT_PHY_PACKET_SENT2 and non-ping packet, |
| 450 | *		the time stamp of isochronous cycle at which the packet was sent. For ping packet, | 450 | *		the time stamp of isochronous cycle at which the packet was sent. For ping packet, |
| 451 | *		the tick count for round-trip time measured by 1394 OHCI controller. | 451 | *		the tick count for round-trip time measured by 1394 OHCI controller. |
| 452 | * The time stamp of isochronous cycle at which either the response was sent for | 452 | * |
| 453 | *		The time stamp of isochronous cycle at which either the response was sent for | ||
| 453 | *		%FW_CDEV_EVENT_PHY_PACKET_SENT2 or the request arrived for | 454 | *		%FW_CDEV_EVENT_PHY_PACKET_SENT2 or the request arrived for |
| 454 | *		%FW_CDEV_EVENT_PHY_PACKET_RECEIVED2. | 455 | *		%FW_CDEV_EVENT_PHY_PACKET_RECEIVED2. |
| 455 | * @data:	Incoming data | 456 | * @data:	Incoming data |
lib/libc/include/any-linux-any/linux/fs.h+105-5| ... | @@ -36,6 +36,15 @@ | ... | @@ -36,6 +36,15 @@ |
| 36 | #define BLOCK_SIZE_BITS 10 | 36 | #define BLOCK_SIZE_BITS 10 |
| 37 | #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) | 37 | #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) |
| 38 | 38 | ||
| 39 | /* flags for integrity meta */ | ||
| 40 | #define IO_INTEGRITY_CHK_GUARD		(1U << 0) /* enforce guard check */ | ||
| 41 | #define IO_INTEGRITY_CHK_REFTAG		(1U << 1) /* enforce ref check */ | ||
| 42 | #define IO_INTEGRITY_CHK_APPTAG		(1U << 2) /* enforce app check */ | ||
| 43 | |||
| 44 | #define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | \ | ||
| 45 | 				 IO_INTEGRITY_CHK_REFTAG | \ | ||
| 46 | 				 IO_INTEGRITY_CHK_APPTAG) | ||
| 47 | |||
| 39 | #define SEEK_SET	0	/* seek relative to beginning of file */ | 48 | #define SEEK_SET	0	/* seek relative to beginning of file */ |
| 40 | #define SEEK_CUR	1	/* seek relative to current file position */ | 49 | #define SEEK_CUR	1	/* seek relative to current file position */ |
| 41 | #define SEEK_END	2	/* seek relative to end of file */ | 50 | #define SEEK_END	2	/* seek relative to end of file */ |
| ... | @@ -47,6 +56,17 @@ | ... | @@ -47,6 +56,17 @@ |
| 47 | #define RENAME_EXCHANGE		(1 << 1)	/* Exchange source and dest */ | 56 | #define RENAME_EXCHANGE		(1 << 1)	/* Exchange source and dest */ |
| 48 | #define RENAME_WHITEOUT		(1 << 2)	/* Whiteout source */ | 57 | #define RENAME_WHITEOUT		(1 << 2)	/* Whiteout source */ |
| 49 | 58 | ||
| 59 | /* | ||
| 60 | * The root inode of procfs is guaranteed to always have the same inode number. | ||
| 61 | * For programs that make heavy use of procfs, verifying that the root is a | ||
| 62 | * real procfs root and using openat2(RESOLVE_{NO_{XDEV,MAGICLINKS},BENEATH}) | ||
| 63 | * will allow you to make sure you are never tricked into operating on the | ||
| 64 | * wrong procfs file. | ||
| 65 | */ | ||
| 66 | enum procfs_ino { | ||
| 67 | 	PROCFS_ROOT_INO = 1, | ||
| 68 | }; | ||
| 69 | |||
| 50 | struct file_clone_range { | 70 | struct file_clone_range { |
| 51 | 	__s64 src_fd; | 71 | 	__s64 src_fd; |
| 52 | 	__u64 src_offset; | 72 | 	__u64 src_offset; |
| ... | @@ -78,6 +98,63 @@ struct fs_sysfs_path { | ... | @@ -78,6 +98,63 @@ struct fs_sysfs_path { |
| 78 | 	__u8			name[128]; | 98 | 	__u8			name[128]; |
| 79 | }; | 99 | }; |
| 80 | 100 | ||
| 101 | /* Protection info capability flags */ | ||
| 102 | #define	LBMD_PI_CAP_INTEGRITY		(1 << 0) | ||
| 103 | #define	LBMD_PI_CAP_REFTAG		(1 << 1) | ||
| 104 | |||
| 105 | /* Checksum types for Protection Information */ | ||
| 106 | #define LBMD_PI_CSUM_NONE		0 | ||
| 107 | #define LBMD_PI_CSUM_IP			1 | ||
| 108 | #define LBMD_PI_CSUM_CRC16_T10DIF	2 | ||
| 109 | #define LBMD_PI_CSUM_CRC64_NVME		4 | ||
| 110 | |||
| 111 | /* sizeof first published struct */ | ||
| 112 | #define LBMD_SIZE_VER0			16 | ||
| 113 | |||
| 114 | /* | ||
| 115 | * Logical block metadata capability descriptor | ||
| 116 | * If the device does not support metadata, all the fields will be zero. | ||
| 117 | * Applications must check lbmd_flags to determine whether metadata is | ||
| 118 | * supported or not. | ||
| 119 | */ | ||
| 120 | struct logical_block_metadata_cap { | ||
| 121 | 	/* Bitmask of logical block metadata capability flags */ | ||
| 122 | 	__u32	lbmd_flags; | ||
| 123 | 	/* | ||
| 124 | 	 * The amount of data described by each unit of logical block | ||
| 125 | 	 * metadata | ||
| 126 | 	 */ | ||
| 127 | 	__u16	lbmd_interval; | ||
| 128 | 	/* | ||
| 129 | 	 * Size in bytes of the logical block metadata associated with each | ||
| 130 | 	 * interval | ||
| 131 | 	 */ | ||
| 132 | 	__u8	lbmd_size; | ||
| 133 | 	/* | ||
| 134 | 	 * Size in bytes of the opaque block tag associated with each | ||
| 135 | 	 * interval | ||
| 136 | 	 */ | ||
| 137 | 	__u8	lbmd_opaque_size; | ||
| 138 | 	/* | ||
| 139 | 	 * Offset in bytes of the opaque block tag within the logical block | ||
| 140 | 	 * metadata | ||
| 141 | 	 */ | ||
| 142 | 	__u8	lbmd_opaque_offset; | ||
| 143 | 	/* Size in bytes of the T10 PI tuple associated with each interval */ | ||
| 144 | 	__u8	lbmd_pi_size; | ||
| 145 | 	/* Offset in bytes of T10 PI tuple within the logical block metadata */ | ||
| 146 | 	__u8	lbmd_pi_offset; | ||
| 147 | 	/* T10 PI guard tag type */ | ||
| 148 | 	__u8	lbmd_guard_tag_type; | ||
| 149 | 	/* Size in bytes of the T10 PI application tag */ | ||
| 150 | 	__u8	lbmd_app_tag_size; | ||
| 151 | 	/* Size in bytes of the T10 PI reference tag */ | ||
| 152 | 	__u8	lbmd_ref_tag_size; | ||
| 153 | 	/* Size in bytes of the T10 PI storage tag */ | ||
| 154 | 	__u8	lbmd_storage_tag_size; | ||
| 155 | 	__u8	pad; | ||
| 156 | }; | ||
| 157 | |||
| 81 | /* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */ | 158 | /* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */ |
| 82 | #define FILE_DEDUPE_RANGE_SAME		0 | 159 | #define FILE_DEDUPE_RANGE_SAME		0 |
| 83 | #define FILE_DEDUPE_RANGE_DIFFERS	1 | 160 | #define FILE_DEDUPE_RANGE_DIFFERS	1 |
| ... | @@ -135,6 +212,24 @@ struct fsxattr { | ... | @@ -135,6 +212,24 @@ struct fsxattr { |
| 135 | 	unsigned char	fsx_pad[8]; | 212 | 	unsigned char	fsx_pad[8]; |
| 136 | }; | 213 | }; |
| 137 | 214 | ||
| 215 | /* | ||
| 216 | * Variable size structure for file_[sg]et_attr(). | ||
| 217 | * | ||
| 218 | * Note. This is alternative to the structure 'struct file_kattr'/'struct fsxattr'. | ||
| 219 | * As this structure is passed to/from userspace with its size, this can | ||
| 220 | * be versioned based on the size. | ||
| 221 | */ | ||
| 222 | struct file_attr { | ||
| 223 | 	__u64 fa_xflags;	/* xflags field value (get/set) */ | ||
| 224 | 	__u32 fa_extsize;	/* extsize field value (get/set)*/ | ||
| 225 | 	__u32 fa_nextents;	/* nextents field value (get) */ | ||
| 226 | 	__u32 fa_projid;	/* project identifier (get/set) */ | ||
| 227 | 	__u32 fa_cowextsize;	/* CoW extsize field value (get/set) */ | ||
| 228 | }; | ||
| 229 | |||
| 230 | #define FILE_ATTR_SIZE_VER0 24 | ||
| 231 | #define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER0 | ||
| 232 | |||
| 138 | /* | 233 | /* |
| 139 | * Flags for the fsx_xflags field | 234 | * Flags for the fsx_xflags field |
| 140 | */ | 235 | */ |
| ... | @@ -199,10 +294,8 @@ struct fsxattr { | ... | @@ -199,10 +294,8 @@ struct fsxattr { |
| 199 | #define BLKROTATIONAL _IO(0x12,126) | 294 | #define BLKROTATIONAL _IO(0x12,126) |
| 200 | #define BLKZEROOUT _IO(0x12,127) | 295 | #define BLKZEROOUT _IO(0x12,127) |
| 201 | #define BLKGETDISKSEQ _IOR(0x12,128,__u64) | 296 | #define BLKGETDISKSEQ _IOR(0x12,128,__u64) |
| 202 | /* | 297 | /* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */ |
| 203 | * A jump here: 130-136 are reserved for zoned block devices | 298 | /* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */ |
| 204 | * (see uapi/linux/blkzoned.h) | ||
| 205 | */ | ||
| 206 | 299 | ||
| 207 | #define BMAP_IOCTL 1		/* obsolete - kept for compatibility */ | 300 | #define BMAP_IOCTL 1		/* obsolete - kept for compatibility */ |
| 208 | #define FIBMAP	 _IO(0x00,1)	/* bmap access */ | 301 | #define FIBMAP	 _IO(0x00,1)	/* bmap access */ |
| ... | @@ -236,6 +329,8 @@ struct fsxattr { | ... | @@ -236,6 +329,8 @@ struct fsxattr { |
| 236 | * also /sys/kernel/debug/ for filesystems with debugfs exports | 329 | * also /sys/kernel/debug/ for filesystems with debugfs exports |
| 237 | */ | 330 | */ |
| 238 | #define FS_IOC_GETFSSYSFSPATH		_IOR(0x15, 1, struct fs_sysfs_path) | 331 | #define FS_IOC_GETFSSYSFSPATH		_IOR(0x15, 1, struct fs_sysfs_path) |
| 332 | /* Get logical block metadata capability details */ | ||
| 333 | #define FS_IOC_GETLBMD_CAP		_IOWR(0x15, 2, struct logical_block_metadata_cap) | ||
| 239 | 334 | ||
| 240 | /* | 335 | /* |
| 241 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) | 336 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) |
| ... | @@ -328,9 +423,13 @@ typedef int __bitwise __kernel_rwf_t; | ... | @@ -328,9 +423,13 @@ typedef int __bitwise __kernel_rwf_t; |
| 328 | /* Atomic Write */ | 423 | /* Atomic Write */ |
| 329 | #define RWF_ATOMIC	((__kernel_rwf_t)0x00000040) | 424 | #define RWF_ATOMIC	((__kernel_rwf_t)0x00000040) |
| 330 | 425 | ||
| 426 | /* buffered IO that drops the cache after reading or writing data */ | ||
| 427 | #define RWF_DONTCACHE	((__kernel_rwf_t)0x00000080) | ||
| 428 | |||
| 331 | /* mask of flags supported by the kernel */ | 429 | /* mask of flags supported by the kernel */ |
| 332 | #define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\ | 430 | #define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\ |
| 333 | 			 RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC) | 431 | 			 RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\ |
| 432 | 			 RWF_DONTCACHE) | ||
| 334 | 433 | ||
| 335 | #define PROCFS_IOCTL_MAGIC 'f' | 434 | #define PROCFS_IOCTL_MAGIC 'f' |
| 336 | 435 | ||
| ... | @@ -346,6 +445,7 @@ typedef int __bitwise __kernel_rwf_t; | ... | @@ -346,6 +445,7 @@ typedef int __bitwise __kernel_rwf_t; |
| 346 | #define PAGE_IS_PFNZERO		(1 << 5) | 445 | #define PAGE_IS_PFNZERO		(1 << 5) |
| 347 | #define PAGE_IS_HUGE		(1 << 6) | 446 | #define PAGE_IS_HUGE		(1 << 6) |
| 348 | #define PAGE_IS_SOFT_DIRTY	(1 << 7) | 447 | #define PAGE_IS_SOFT_DIRTY	(1 << 7) |
| 448 | #define PAGE_IS_GUARD		(1 << 8) | ||
| 349 | 449 | ||
| 350 | /* | 450 | /* |
| 351 | * struct page_region - Page region with flags | 451 | * struct page_region - Page region with flags |
lib/libc/include/any-linux-any/linux/fscrypt.h+4-2| ... | @@ -119,7 +119,7 @@ struct fscrypt_key_specifier { | ... | @@ -119,7 +119,7 @@ struct fscrypt_key_specifier { |
| 119 | */ | 119 | */ |
| 120 | struct fscrypt_provisioning_key_payload { | 120 | struct fscrypt_provisioning_key_payload { |
| 121 | 	__u32 type; | 121 | 	__u32 type; |
| 122 | 	__u32 __reserved; | 122 | 	__u32 flags; |
| 123 | 	__u8 raw[]; | 123 | 	__u8 raw[]; |
| 124 | }; | 124 | }; |
| 125 | 125 | ||
| ... | @@ -128,7 +128,9 @@ struct fscrypt_add_key_arg { | ... | @@ -128,7 +128,9 @@ struct fscrypt_add_key_arg { |
| 128 | 	struct fscrypt_key_specifier key_spec; | 128 | 	struct fscrypt_key_specifier key_spec; |
| 129 | 	__u32 raw_size; | 129 | 	__u32 raw_size; |
| 130 | 	__u32 key_id; | 130 | 	__u32 key_id; |
| 131 | 	__u32 __reserved[8]; | 131 | #define FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED	0x00000001 |
| 132 | 	__u32 flags; | ||
| 133 | 	__u32 __reserved[7]; | ||
| 132 | 	__u8 raw[]; | 134 | 	__u8 raw[]; |
| 133 | }; | 135 | }; |
| 134 | 136 |
lib/libc/include/any-linux-any/linux/fuse.h+87-3| ... | @@ -220,6 +220,21 @@ | ... | @@ -220,6 +220,21 @@ |
| 220 | * | 220 | * |
| 221 | * 7.41 | 221 | * 7.41 |
| 222 | * - add FUSE_ALLOW_IDMAP | 222 | * - add FUSE_ALLOW_IDMAP |
| 223 | * 7.42 | ||
| 224 | * - Add FUSE_OVER_IO_URING and all other io-uring related flags and data | ||
| 225 | * structures: | ||
| 226 | * - struct fuse_uring_ent_in_out | ||
| 227 | * - struct fuse_uring_req_header | ||
| 228 | * - struct fuse_uring_cmd_req | ||
| 229 | * - FUSE_URING_IN_OUT_HEADER_SZ | ||
| 230 | * - FUSE_URING_OP_IN_OUT_SZ | ||
| 231 | * - enum fuse_uring_cmd | ||
| 232 | * | ||
| 233 | * 7.43 | ||
| 234 | * - add FUSE_REQUEST_TIMEOUT | ||
| 235 | * | ||
| 236 | * 7.44 | ||
| 237 | * - add FUSE_NOTIFY_INC_EPOCH | ||
| 223 | */ | 238 | */ |
| 224 | 239 | ||
| 225 | #ifndef _LINUX_FUSE_H | 240 | #ifndef _LINUX_FUSE_H |
| ... | @@ -251,7 +266,7 @@ | ... | @@ -251,7 +266,7 @@ |
| 251 | #define FUSE_KERNEL_VERSION 7 | 266 | #define FUSE_KERNEL_VERSION 7 |
| 252 | 267 | ||
| 253 | /** Minor version number of this interface */ | 268 | /** Minor version number of this interface */ |
| 254 | #define FUSE_KERNEL_MINOR_VERSION 41 | 269 | #define FUSE_KERNEL_MINOR_VERSION 44 |
| 255 | 270 | ||
| 256 | /** The node ID of the root inode */ | 271 | /** The node ID of the root inode */ |
| 257 | #define FUSE_ROOT_ID 1 | 272 | #define FUSE_ROOT_ID 1 |
| ... | @@ -421,6 +436,9 @@ struct fuse_file_lock { | ... | @@ -421,6 +436,9 @@ struct fuse_file_lock { |
| 421 | * FUSE_HAS_RESEND: kernel supports resending pending requests, and the high bit | 436 | * FUSE_HAS_RESEND: kernel supports resending pending requests, and the high bit |
| 422 | *		 of the request ID indicates resend requests | 437 | *		 of the request ID indicates resend requests |
| 423 | * FUSE_ALLOW_IDMAP: allow creation of idmapped mounts | 438 | * FUSE_ALLOW_IDMAP: allow creation of idmapped mounts |
| 439 | * FUSE_OVER_IO_URING: Indicate that client supports io-uring | ||
| 440 | * FUSE_REQUEST_TIMEOUT: kernel supports timing out requests. | ||
| 441 | *			 init_out.request_timeout contains the timeout (in secs) | ||
| 424 | */ | 442 | */ |
| 425 | #define FUSE_ASYNC_READ		(1 << 0) | 443 | #define FUSE_ASYNC_READ		(1 << 0) |
| 426 | #define FUSE_POSIX_LOCKS	(1 << 1) | 444 | #define FUSE_POSIX_LOCKS	(1 << 1) |
| ... | @@ -463,10 +481,11 @@ struct fuse_file_lock { | ... | @@ -463,10 +481,11 @@ struct fuse_file_lock { |
| 463 | #define FUSE_PASSTHROUGH	(1ULL << 37) | 481 | #define FUSE_PASSTHROUGH	(1ULL << 37) |
| 464 | #define FUSE_NO_EXPORT_SUPPORT	(1ULL << 38) | 482 | #define FUSE_NO_EXPORT_SUPPORT	(1ULL << 38) |
| 465 | #define FUSE_HAS_RESEND		(1ULL << 39) | 483 | #define FUSE_HAS_RESEND		(1ULL << 39) |
| 466 | |||
| 467 | /* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */ | 484 | /* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */ |
| 468 | #define FUSE_DIRECT_IO_RELAX	FUSE_DIRECT_IO_ALLOW_MMAP | 485 | #define FUSE_DIRECT_IO_RELAX	FUSE_DIRECT_IO_ALLOW_MMAP |
| 469 | #define FUSE_ALLOW_IDMAP	(1ULL << 40) | 486 | #define FUSE_ALLOW_IDMAP	(1ULL << 40) |
| 487 | #define FUSE_OVER_IO_URING	(1ULL << 41) | ||
| 488 | #define FUSE_REQUEST_TIMEOUT	(1ULL << 42) | ||
| 470 | 489 | ||
| 471 | /** | 490 | /** |
| 472 | * CUSE INIT request/reply flags | 491 | * CUSE INIT request/reply flags |
| ... | @@ -651,6 +670,7 @@ enum fuse_notify_code { | ... | @@ -651,6 +670,7 @@ enum fuse_notify_code { |
| 651 | 	FUSE_NOTIFY_RETRIEVE = 5, | 670 | 	FUSE_NOTIFY_RETRIEVE = 5, |
| 652 | 	FUSE_NOTIFY_DELETE = 6, | 671 | 	FUSE_NOTIFY_DELETE = 6, |
| 653 | 	FUSE_NOTIFY_RESEND = 7, | 672 | 	FUSE_NOTIFY_RESEND = 7, |
| 673 | 	FUSE_NOTIFY_INC_EPOCH = 8, | ||
| 654 | 	FUSE_NOTIFY_CODE_MAX, | 674 | 	FUSE_NOTIFY_CODE_MAX, |
| 655 | }; | 675 | }; |
| 656 | 676 | ||
| ... | @@ -894,7 +914,8 @@ struct fuse_init_out { | ... | @@ -894,7 +914,8 @@ struct fuse_init_out { |
| 894 | 	uint16_t	map_alignment; | 914 | 	uint16_t	map_alignment; |
| 895 | 	uint32_t	flags2; | 915 | 	uint32_t	flags2; |
| 896 | 	uint32_t	max_stack_depth; | 916 | 	uint32_t	max_stack_depth; |
| 897 | 	uint32_t	unused[6]; | 917 | 	uint16_t	request_timeout; |
| 918 | 	uint16_t	unused[11]; | ||
| 898 | }; | 919 | }; |
| 899 | 920 | ||
| 900 | #define CUSE_INIT_INFO_MAX 4096 | 921 | #define CUSE_INIT_INFO_MAX 4096 |
| ... | @@ -1202,4 +1223,67 @@ struct fuse_supp_groups { | ... | @@ -1202,4 +1223,67 @@ struct fuse_supp_groups { |
| 1202 | 	uint32_t	groups[]; | 1223 | 	uint32_t	groups[]; |
| 1203 | }; | 1224 | }; |
| 1204 | 1225 | ||
| 1226 | /** | ||
| 1227 | * Size of the ring buffer header | ||
| 1228 | */ | ||
| 1229 | #define FUSE_URING_IN_OUT_HEADER_SZ 128 | ||
| 1230 | #define FUSE_URING_OP_IN_OUT_SZ 128 | ||
| 1231 | |||
| 1232 | /* Used as part of the fuse_uring_req_header */ | ||
| 1233 | struct fuse_uring_ent_in_out { | ||
| 1234 | 	uint64_t flags; | ||
| 1235 | |||
| 1236 | 	/* | ||
| 1237 | 	 * commit ID to be used in a reply to a ring request (see also | ||
| 1238 | 	 * struct fuse_uring_cmd_req) | ||
| 1239 | 	 */ | ||
| 1240 | 	uint64_t commit_id; | ||
| 1241 | |||
| 1242 | 	/* size of user payload buffer */ | ||
| 1243 | 	uint32_t payload_sz; | ||
| 1244 | 	uint32_t padding; | ||
| 1245 | |||
| 1246 | 	uint64_t reserved; | ||
| 1247 | }; | ||
| 1248 | |||
| 1249 | /** | ||
| 1250 | * Header for all fuse-io-uring requests | ||
| 1251 | */ | ||
| 1252 | struct fuse_uring_req_header { | ||
| 1253 | 	/* struct fuse_in_header / struct fuse_out_header */ | ||
| 1254 | 	char in_out[FUSE_URING_IN_OUT_HEADER_SZ]; | ||
| 1255 | |||
| 1256 | 	/* per op code header */ | ||
| 1257 | 	char op_in[FUSE_URING_OP_IN_OUT_SZ]; | ||
| 1258 | |||
| 1259 | 	struct fuse_uring_ent_in_out ring_ent_in_out; | ||
| 1260 | }; | ||
| 1261 | |||
| 1262 | /** | ||
| 1263 | * sqe commands to the kernel | ||
| 1264 | */ | ||
| 1265 | enum fuse_uring_cmd { | ||
| 1266 | 	FUSE_IO_URING_CMD_INVALID = 0, | ||
| 1267 | |||
| 1268 | 	/* register the request buffer and fetch a fuse request */ | ||
| 1269 | 	FUSE_IO_URING_CMD_REGISTER = 1, | ||
| 1270 | |||
| 1271 | 	/* commit fuse request result and fetch next request */ | ||
| 1272 | 	FUSE_IO_URING_CMD_COMMIT_AND_FETCH = 2, | ||
| 1273 | }; | ||
| 1274 | |||
| 1275 | /** | ||
| 1276 | * In the 80B command area of the SQE. | ||
| 1277 | */ | ||
| 1278 | struct fuse_uring_cmd_req { | ||
| 1279 | 	uint64_t flags; | ||
| 1280 | |||
| 1281 | 	/* entry identifier for commits */ | ||
| 1282 | 	uint64_t commit_id; | ||
| 1283 | |||
| 1284 | 	/* queue the command is for (queue index) */ | ||
| 1285 | 	uint16_t qid; | ||
| 1286 | 	uint8_t padding[6]; | ||
| 1287 | }; | ||
| 1288 | |||
| 1205 | #endif /* _LINUX_FUSE_H */ | 1289 | #endif /* _LINUX_FUSE_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/futex.h+8-1| ... | @@ -63,7 +63,7 @@ | ... | @@ -63,7 +63,7 @@ |
| 63 | #define FUTEX2_SIZE_U32		0x02 | 63 | #define FUTEX2_SIZE_U32		0x02 |
| 64 | #define FUTEX2_SIZE_U64		0x03 | 64 | #define FUTEX2_SIZE_U64		0x03 |
| 65 | #define FUTEX2_NUMA		0x04 | 65 | #define FUTEX2_NUMA		0x04 |
| 66 | 			/*	0x08 */ | 66 | #define FUTEX2_MPOL		0x08 |
| 67 | 			/*	0x10 */ | 67 | 			/*	0x10 */ |
| 68 | 			/*	0x20 */ | 68 | 			/*	0x20 */ |
| 69 | 			/*	0x40 */ | 69 | 			/*	0x40 */ |
| ... | @@ -74,6 +74,13 @@ | ... | @@ -74,6 +74,13 @@ |
| 74 | /* do not use */ | 74 | /* do not use */ |
| 75 | #define FUTEX_32		FUTEX2_SIZE_U32 /* historical accident :-( */ | 75 | #define FUTEX_32		FUTEX2_SIZE_U32 /* historical accident :-( */ |
| 76 | 76 | ||
| 77 | /* | ||
| 78 | * When FUTEX2_NUMA doubles the futex word, the second word is a node value. | ||
| 79 | * The special value -1 indicates no-node. This is the same value as | ||
| 80 | * NUMA_NO_NODE, except that value is not ABI, this is. | ||
| 81 | */ | ||
| 82 | #define FUTEX_NO_NODE		(-1) | ||
| 83 | |||
| 77 | /* | 84 | /* |
| 78 | * Max numbers of elements in a futex_waitv array | 85 | * Max numbers of elements in a futex_waitv array |
| 79 | */ | 86 | */ |
lib/libc/include/any-linux-any/linux/handshake.h+1| ... | @@ -45,6 +45,7 @@ enum { | ... | @@ -45,6 +45,7 @@ enum { |
| 45 | 	HANDSHAKE_A_ACCEPT_PEER_IDENTITY, | 45 | 	HANDSHAKE_A_ACCEPT_PEER_IDENTITY, |
| 46 | 	HANDSHAKE_A_ACCEPT_CERTIFICATE, | 46 | 	HANDSHAKE_A_ACCEPT_CERTIFICATE, |
| 47 | 	HANDSHAKE_A_ACCEPT_PEERNAME, | 47 | 	HANDSHAKE_A_ACCEPT_PEERNAME, |
| 48 | 	HANDSHAKE_A_ACCEPT_KEYRING, | ||
| 48 | 49 | ||
| 49 | 	__HANDSHAKE_A_ACCEPT_MAX, | 50 | 	__HANDSHAKE_A_ACCEPT_MAX, |
| 50 | 	HANDSHAKE_A_ACCEPT_MAX = (__HANDSHAKE_A_ACCEPT_MAX - 1) | 51 | 	HANDSHAKE_A_ACCEPT_MAX = (__HANDSHAKE_A_ACCEPT_MAX - 1) |
lib/libc/include/any-linux-any/linux/i2c.h+2-1| ... | @@ -21,7 +21,8 @@ | ... | @@ -21,7 +21,8 @@ |
| 21 | * | 21 | * |
| 22 | * @flags: | 22 | * @flags: |
| 23 | * Supported by all adapters: | 23 | * Supported by all adapters: |
| 24 | * %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001! | 24 | * %I2C_M_RD: read data (from slave to master). Guaranteed to be 0x0001! If |
| 25 | * not set, the transaction is interpreted as write. | ||
| 25 | * | 26 | * |
| 26 | * Optional: | 27 | * Optional: |
| 27 | * %I2C_M_DMA_SAFE: the buffer of this message is DMA safe. Makes only sense | 28 | * %I2C_M_DMA_SAFE: the buffer of this message is DMA safe. Makes only sense |
lib/libc/include/any-linux-any/linux/if_bridge.h+6-4| ... | @@ -699,10 +699,11 @@ struct br_mdb_entry { | ... | @@ -699,10 +699,11 @@ struct br_mdb_entry { |
| 699 | #define MDB_TEMPORARY 0 | 699 | #define MDB_TEMPORARY 0 |
| 700 | #define MDB_PERMANENT 1 | 700 | #define MDB_PERMANENT 1 |
| 701 | 	__u8 state; | 701 | 	__u8 state; |
| 702 | #define MDB_FLAGS_OFFLOAD	(1 << 0) | 702 | #define MDB_FLAGS_OFFLOAD		(1 << 0) |
| 703 | #define MDB_FLAGS_FAST_LEAVE	(1 << 1) | 703 | #define MDB_FLAGS_FAST_LEAVE		(1 << 1) |
| 704 | #define MDB_FLAGS_STAR_EXCL	(1 << 2) | 704 | #define MDB_FLAGS_STAR_EXCL		(1 << 2) |
| 705 | #define MDB_FLAGS_BLOCKED	(1 << 3) | 705 | #define MDB_FLAGS_BLOCKED		(1 << 3) |
| 706 | #define MDB_FLAGS_OFFLOAD_FAILED	(1 << 4) | ||
| 706 | 	__u8 flags; | 707 | 	__u8 flags; |
| 707 | 	__u16 vid; | 708 | 	__u16 vid; |
| 708 | 	struct { | 709 | 	struct { |
| ... | @@ -830,6 +831,7 @@ enum br_boolopt_id { | ... | @@ -830,6 +831,7 @@ enum br_boolopt_id { |
| 830 | 	BR_BOOLOPT_NO_LL_LEARN, | 831 | 	BR_BOOLOPT_NO_LL_LEARN, |
| 831 | 	BR_BOOLOPT_MCAST_VLAN_SNOOPING, | 832 | 	BR_BOOLOPT_MCAST_VLAN_SNOOPING, |
| 832 | 	BR_BOOLOPT_MST_ENABLE, | 833 | 	BR_BOOLOPT_MST_ENABLE, |
| 834 | 	BR_BOOLOPT_MDB_OFFLOAD_FAIL_NOTIFICATION, | ||
| 833 | 	BR_BOOLOPT_MAX | 835 | 	BR_BOOLOPT_MAX |
| 834 | }; | 836 | }; |
| 835 | 837 |
lib/libc/include/any-linux-any/linux/if_cablemodem.h deleted-23| ... | @@ -1,23 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _LINUX_CABLEMODEM_H_ | ||
| 3 | #define _LINUX_CABLEMODEM_H_ | ||
| 4 | /* | ||
| 5 | *		Author: Franco Venturi <fventuri@mediaone.net> | ||
| 6 | *		Copyright 1998 Franco Venturi | ||
| 7 | * | ||
| 8 | *		This program is free software; you can redistribute it | ||
| 9 | *		and/or modify it under the terms of the GNU General | ||
| 10 | *		Public License as published by the Free Software | ||
| 11 | *		Foundation; either version 2 of the License, or (at | ||
| 12 | *		your option) any later version. | ||
| 13 | */ | ||
| 14 | |||
| 15 | /* some useful defines for sb1000.c e cmconfig.c - fv */ | ||
| 16 | #define SIOCGCMSTATS		(SIOCDEVPRIVATE+0)	/* get cable modem stats */ | ||
| 17 | #define SIOCGCMFIRMWARE		(SIOCDEVPRIVATE+1)	/* get cm firmware version */ | ||
| 18 | #define SIOCGCMFREQUENCY	(SIOCDEVPRIVATE+2)	/* get cable modem frequency */ | ||
| 19 | #define SIOCSCMFREQUENCY	(SIOCDEVPRIVATE+3)	/* set cable modem frequency */ | ||
| 20 | #define SIOCGCMPIDS			(SIOCDEVPRIVATE+4)	/* get cable modem PIDs */ | ||
| 21 | #define SIOCSCMPIDS			(SIOCDEVPRIVATE+5)	/* set cable modem PIDs */ | ||
| 22 | |||
| 23 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/if_link.h+27| ... | @@ -378,6 +378,7 @@ enum { | ... | @@ -378,6 +378,7 @@ enum { |
| 378 | 	IFLA_GRO_IPV4_MAX_SIZE, | 378 | 	IFLA_GRO_IPV4_MAX_SIZE, |
| 379 | 	IFLA_DPLL_PIN, | 379 | 	IFLA_DPLL_PIN, |
| 380 | 	IFLA_MAX_PACING_OFFLOAD_HORIZON, | 380 | 	IFLA_MAX_PACING_OFFLOAD_HORIZON, |
| 381 | 	IFLA_NETNS_IMMUTABLE, | ||
| 381 | 	__IFLA_MAX | 382 | 	__IFLA_MAX |
| 382 | }; | 383 | }; |
| 383 | 384 | ||
| ... | @@ -1313,6 +1314,8 @@ enum { | ... | @@ -1313,6 +1314,8 @@ enum { |
| 1313 | 	IFLA_NETKIT_MODE, | 1314 | 	IFLA_NETKIT_MODE, |
| 1314 | 	IFLA_NETKIT_SCRUB, | 1315 | 	IFLA_NETKIT_SCRUB, |
| 1315 | 	IFLA_NETKIT_PEER_SCRUB, | 1316 | 	IFLA_NETKIT_PEER_SCRUB, |
| 1317 | 	IFLA_NETKIT_HEADROOM, | ||
| 1318 | 	IFLA_NETKIT_TAILROOM, | ||
| 1316 | 	__IFLA_NETKIT_MAX, | 1319 | 	__IFLA_NETKIT_MAX, |
| 1317 | }; | 1320 | }; |
| 1318 | #define IFLA_NETKIT_MAX	(__IFLA_NETKIT_MAX - 1) | 1321 | #define IFLA_NETKIT_MAX	(__IFLA_NETKIT_MAX - 1) |
| ... | @@ -1392,6 +1395,8 @@ enum { | ... | @@ -1392,6 +1395,8 @@ enum { |
| 1392 | 	IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ | 1395 | 	IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ |
| 1393 | 	IFLA_VXLAN_LOCALBYPASS, | 1396 | 	IFLA_VXLAN_LOCALBYPASS, |
| 1394 | 	IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */ | 1397 | 	IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */ |
| 1398 | 	IFLA_VXLAN_RESERVED_BITS, | ||
| 1399 | 	IFLA_VXLAN_MC_ROUTE, | ||
| 1395 | 	__IFLA_VXLAN_MAX | 1400 | 	__IFLA_VXLAN_MAX |
| 1396 | }; | 1401 | }; |
| 1397 | #define IFLA_VXLAN_MAX	(__IFLA_VXLAN_MAX - 1) | 1402 | #define IFLA_VXLAN_MAX	(__IFLA_VXLAN_MAX - 1) |
| ... | @@ -1433,6 +1438,7 @@ enum { | ... | @@ -1433,6 +1438,7 @@ enum { |
| 1433 | 	IFLA_GENEVE_TTL_INHERIT, | 1438 | 	IFLA_GENEVE_TTL_INHERIT, |
| 1434 | 	IFLA_GENEVE_DF, | 1439 | 	IFLA_GENEVE_DF, |
| 1435 | 	IFLA_GENEVE_INNER_PROTO_INHERIT, | 1440 | 	IFLA_GENEVE_INNER_PROTO_INHERIT, |
| 1441 | 	IFLA_GENEVE_PORT_RANGE, | ||
| 1436 | 	__IFLA_GENEVE_MAX | 1442 | 	__IFLA_GENEVE_MAX |
| 1437 | }; | 1443 | }; |
| 1438 | #define IFLA_GENEVE_MAX	(__IFLA_GENEVE_MAX - 1) | 1444 | #define IFLA_GENEVE_MAX	(__IFLA_GENEVE_MAX - 1) |
| ... | @@ -1445,6 +1451,11 @@ enum ifla_geneve_df { | ... | @@ -1445,6 +1451,11 @@ enum ifla_geneve_df { |
| 1445 | 	GENEVE_DF_MAX = __GENEVE_DF_END - 1, | 1451 | 	GENEVE_DF_MAX = __GENEVE_DF_END - 1, |
| 1446 | }; | 1452 | }; |
| 1447 | 1453 | ||
| 1454 | struct ifla_geneve_port_range { | ||
| 1455 | 	__be16 low; | ||
| 1456 | 	__be16 high; | ||
| 1457 | }; | ||
| 1458 | |||
| 1448 | /* Bareudp section */ | 1459 | /* Bareudp section */ |
| 1449 | enum { | 1460 | enum { |
| 1450 | 	IFLA_BAREUDP_UNSPEC, | 1461 | 	IFLA_BAREUDP_UNSPEC, |
| ... | @@ -1522,6 +1533,7 @@ enum { | ... | @@ -1522,6 +1533,7 @@ enum { |
| 1522 | 	IFLA_BOND_MISSED_MAX, | 1533 | 	IFLA_BOND_MISSED_MAX, |
| 1523 | 	IFLA_BOND_NS_IP6_TARGET, | 1534 | 	IFLA_BOND_NS_IP6_TARGET, |
| 1524 | 	IFLA_BOND_COUPLED_CONTROL, | 1535 | 	IFLA_BOND_COUPLED_CONTROL, |
| 1536 | 	IFLA_BOND_BROADCAST_NEIGH, | ||
| 1525 | 	__IFLA_BOND_MAX, | 1537 | 	__IFLA_BOND_MAX, |
| 1526 | }; | 1538 | }; |
| 1527 | 1539 | ||
| ... | @@ -1974,4 +1986,19 @@ enum { | ... | @@ -1974,4 +1986,19 @@ enum { |
| 1974 | 1986 | ||
| 1975 | #define IFLA_DSA_MAX	(__IFLA_DSA_MAX - 1) | 1987 | #define IFLA_DSA_MAX	(__IFLA_DSA_MAX - 1) |
| 1976 | 1988 | ||
| 1989 | /* OVPN section */ | ||
| 1990 | |||
| 1991 | enum ovpn_mode { | ||
| 1992 | 	OVPN_MODE_P2P, | ||
| 1993 | 	OVPN_MODE_MP, | ||
| 1994 | }; | ||
| 1995 | |||
| 1996 | enum { | ||
| 1997 | 	IFLA_OVPN_UNSPEC, | ||
| 1998 | 	IFLA_OVPN_MODE, | ||
| 1999 | 	__IFLA_OVPN_MAX, | ||
| 2000 | }; | ||
| 2001 | |||
| 2002 | #define IFLA_OVPN_MAX	(__IFLA_OVPN_MAX - 1) | ||
| 2003 | |||
| 1977 | #endif /* _LINUX_IF_LINK_H */ | 2004 | #endif /* _LINUX_IF_LINK_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/if_tun.h+9| ... | @@ -93,6 +93,15 @@ | ... | @@ -93,6 +93,15 @@ |
| 93 | #define TUN_F_USO4	0x20	/* I can handle USO for IPv4 packets */ | 93 | #define TUN_F_USO4	0x20	/* I can handle USO for IPv4 packets */ |
| 94 | #define TUN_F_USO6	0x40	/* I can handle USO for IPv6 packets */ | 94 | #define TUN_F_USO6	0x40	/* I can handle USO for IPv6 packets */ |
| 95 | 95 | ||
| 96 | /* I can handle TSO/USO for UDP tunneled packets */ | ||
| 97 | #define TUN_F_UDP_TUNNEL_GSO		0x080 | ||
| 98 | |||
| 99 | /* | ||
| 100 | * I can handle TSO/USO for UDP tunneled packets requiring csum offload for | ||
| 101 | * the outer header | ||
| 102 | */ | ||
| 103 | #define TUN_F_UDP_TUNNEL_GSO_CSUM	0x100 | ||
| 104 | |||
| 96 | /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */ | 105 | /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */ |
| 97 | #define TUN_PKT_STRIP	0x0001 | 106 | #define TUN_PKT_STRIP	0x0001 |
| 98 | struct tun_pi { | 107 | struct tun_pi { |
lib/libc/include/any-linux-any/linux/if_xdp.h+11| ... | @@ -79,6 +79,7 @@ struct xdp_mmap_offsets { | ... | @@ -79,6 +79,7 @@ struct xdp_mmap_offsets { |
| 79 | #define XDP_UMEM_COMPLETION_RING	6 | 79 | #define XDP_UMEM_COMPLETION_RING	6 |
| 80 | #define XDP_STATISTICS			7 | 80 | #define XDP_STATISTICS			7 |
| 81 | #define XDP_OPTIONS			8 | 81 | #define XDP_OPTIONS			8 |
| 82 | #define XDP_MAX_TX_SKB_BUDGET		9 | ||
| 82 | 83 | ||
| 83 | struct xdp_umem_reg { | 84 | struct xdp_umem_reg { |
| 84 | 	__u64 addr; /* Start of packet data area */ | 85 | 	__u64 addr; /* Start of packet data area */ |
| ... | @@ -127,6 +128,12 @@ struct xdp_options { | ... | @@ -127,6 +128,12 @@ struct xdp_options { |
| 127 | */ | 128 | */ |
| 128 | #define XDP_TXMD_FLAGS_CHECKSUM			(1 << 1) | 129 | #define XDP_TXMD_FLAGS_CHECKSUM			(1 << 1) |
| 129 | 130 | ||
| 131 | /* Request launch time hardware offload. The device will schedule the packet for | ||
| 132 | * transmission at a pre-determined time called launch time. The value of | ||
| 133 | * launch time is communicated via launch_time field of struct xsk_tx_metadata. | ||
| 134 | */ | ||
| 135 | #define XDP_TXMD_FLAGS_LAUNCH_TIME		(1 << 2) | ||
| 136 | |||
| 130 | /* AF_XDP offloads request. 'request' union member is consumed by the driver | 137 | /* AF_XDP offloads request. 'request' union member is consumed by the driver |
| 131 | * when the packet is being transmitted. 'completion' union member is | 138 | * when the packet is being transmitted. 'completion' union member is |
| 132 | * filled by the driver when the transmit completion arrives. | 139 | * filled by the driver when the transmit completion arrives. |
| ... | @@ -142,6 +149,10 @@ struct xsk_tx_metadata { | ... | @@ -142,6 +149,10 @@ struct xsk_tx_metadata { |
| 142 | 			__u16 csum_start; | 149 | 			__u16 csum_start; |
| 143 | 			/* Offset from csum_start where checksum should be stored. */ | 150 | 			/* Offset from csum_start where checksum should be stored. */ |
| 144 | 			__u16 csum_offset; | 151 | 			__u16 csum_offset; |
| 152 | |||
| 153 | 			/* XDP_TXMD_FLAGS_LAUNCH_TIME */ | ||
| 154 | 			/* Launch time in nanosecond against the PTP HW Clock */ | ||
| 155 | 			__u64 launch_time; | ||
| 145 | 		} request; | 156 | 		} request; |
| 146 | 157 | ||
| 147 | 		struct { | 158 | 		struct { |
lib/libc/include/any-linux-any/linux/iio/types.h+2| ... | @@ -119,6 +119,7 @@ enum iio_event_type { | ... | @@ -119,6 +119,7 @@ enum iio_event_type { |
| 119 | 	IIO_EV_TYPE_CHANGE, | 119 | 	IIO_EV_TYPE_CHANGE, |
| 120 | 	IIO_EV_TYPE_MAG_REFERENCED, | 120 | 	IIO_EV_TYPE_MAG_REFERENCED, |
| 121 | 	IIO_EV_TYPE_GESTURE, | 121 | 	IIO_EV_TYPE_GESTURE, |
| 122 | 	IIO_EV_TYPE_FAULT, | ||
| 122 | }; | 123 | }; |
| 123 | 124 | ||
| 124 | enum iio_event_direction { | 125 | enum iio_event_direction { |
| ... | @@ -128,6 +129,7 @@ enum iio_event_direction { | ... | @@ -128,6 +129,7 @@ enum iio_event_direction { |
| 128 | 	IIO_EV_DIR_NONE, | 129 | 	IIO_EV_DIR_NONE, |
| 129 | 	IIO_EV_DIR_SINGLETAP, | 130 | 	IIO_EV_DIR_SINGLETAP, |
| 130 | 	IIO_EV_DIR_DOUBLETAP, | 131 | 	IIO_EV_DIR_DOUBLETAP, |
| 132 | 	IIO_EV_DIR_FAULT_OPENWIRE, | ||
| 131 | }; | 133 | }; |
| 132 | 134 | ||
| 133 | #endif /* _IIO_TYPES_H_ */ | 135 | #endif /* _IIO_TYPES_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/in.h+2| ... | @@ -79,6 +79,8 @@ enum { | ... | @@ -79,6 +79,8 @@ enum { |
| 79 | #define IPPROTO_MPLS		IPPROTO_MPLS | 79 | #define IPPROTO_MPLS		IPPROTO_MPLS |
| 80 | IPPROTO_ETHERNET = 143,	/* Ethernet-within-IPv6 Encapsulation	*/ | 80 | IPPROTO_ETHERNET = 143,	/* Ethernet-within-IPv6 Encapsulation	*/ |
| 81 | #define IPPROTO_ETHERNET	IPPROTO_ETHERNET | 81 | #define IPPROTO_ETHERNET	IPPROTO_ETHERNET |
| 82 | IPPROTO_AGGFRAG = 144,	/* AGGFRAG in ESP (RFC 9347)		*/ | ||
| 83 | #define IPPROTO_AGGFRAG		IPPROTO_AGGFRAG | ||
| 82 | IPPROTO_RAW = 255,		/* Raw IP packets			*/ | 84 | IPPROTO_RAW = 255,		/* Raw IP packets			*/ |
| 83 | #define IPPROTO_RAW		IPPROTO_RAW | 85 | #define IPPROTO_RAW		IPPROTO_RAW |
| 84 | IPPROTO_SMC = 256,		/* Shared Memory Communications		*/ | 86 | IPPROTO_SMC = 256,		/* Shared Memory Communications		*/ |
lib/libc/include/any-linux-any/linux/in6.h+2-2| ... | @@ -152,7 +152,6 @@ struct in6_flowlabel_req { | ... | @@ -152,7 +152,6 @@ struct in6_flowlabel_req { |
| 152 | /* | 152 | /* |
| 153 | *	IPV6 socket options | 153 | *	IPV6 socket options |
| 154 | */ | 154 | */ |
| 155 | #if __UAPI_DEF_IPV6_OPTIONS | ||
| 156 | #define IPV6_ADDRFORM		1 | 155 | #define IPV6_ADDRFORM		1 |
| 157 | #define IPV6_2292PKTINFO	2 | 156 | #define IPV6_2292PKTINFO	2 |
| 158 | #define IPV6_2292HOPOPTS	3 | 157 | #define IPV6_2292HOPOPTS	3 |
| ... | @@ -169,8 +168,10 @@ struct in6_flowlabel_req { | ... | @@ -169,8 +168,10 @@ struct in6_flowlabel_req { |
| 169 | #define IPV6_MULTICAST_IF	17 | 168 | #define IPV6_MULTICAST_IF	17 |
| 170 | #define IPV6_MULTICAST_HOPS	18 | 169 | #define IPV6_MULTICAST_HOPS	18 |
| 171 | #define IPV6_MULTICAST_LOOP	19 | 170 | #define IPV6_MULTICAST_LOOP	19 |
| 171 | #if __UAPI_DEF_IPV6_OPTIONS | ||
| 172 | #define IPV6_ADD_MEMBERSHIP	20 | 172 | #define IPV6_ADD_MEMBERSHIP	20 |
| 173 | #define IPV6_DROP_MEMBERSHIP	21 | 173 | #define IPV6_DROP_MEMBERSHIP	21 |
| 174 | #endif | ||
| 174 | #define IPV6_ROUTER_ALERT	22 | 175 | #define IPV6_ROUTER_ALERT	22 |
| 175 | #define IPV6_MTU_DISCOVER	23 | 176 | #define IPV6_MTU_DISCOVER	23 |
| 176 | #define IPV6_MTU		24 | 177 | #define IPV6_MTU		24 |
| ... | @@ -203,7 +204,6 @@ struct in6_flowlabel_req { | ... | @@ -203,7 +204,6 @@ struct in6_flowlabel_req { |
| 203 | #define IPV6_IPSEC_POLICY	34 | 204 | #define IPV6_IPSEC_POLICY	34 |
| 204 | #define IPV6_XFRM_POLICY	35 | 205 | #define IPV6_XFRM_POLICY	35 |
| 205 | #define IPV6_HDRINCL		36 | 206 | #define IPV6_HDRINCL		36 |
| 206 | #endif | ||
| 207 | 207 | ||
| 208 | /* | 208 | /* |
| 209 | * Multicast: | 209 | * Multicast: |
lib/libc/include/any-linux-any/linux/input-event-codes.h+10-1| ... | @@ -601,6 +601,11 @@ | ... | @@ -601,6 +601,11 @@ |
| 601 | #define BTN_DPAD_LEFT		0x222 | 601 | #define BTN_DPAD_LEFT		0x222 |
| 602 | #define BTN_DPAD_RIGHT		0x223 | 602 | #define BTN_DPAD_RIGHT		0x223 |
| 603 | 603 | ||
| 604 | #define BTN_GRIPL		0x224 | ||
| 605 | #define BTN_GRIPR		0x225 | ||
| 606 | #define BTN_GRIPL2		0x226 | ||
| 607 | #define BTN_GRIPR2		0x227 | ||
| 608 | |||
| 604 | #define KEY_ALS_TOGGLE		0x230	/* Ambient light sensor */ | 609 | #define KEY_ALS_TOGGLE		0x230	/* Ambient light sensor */ |
| 605 | #define KEY_ROTATE_LOCK_TOGGLE	0x231	/* Display rotation lock */ | 610 | #define KEY_ROTATE_LOCK_TOGGLE	0x231	/* Display rotation lock */ |
| 606 | #define KEY_REFRESH_RATE_TOGGLE	0x232	/* Display refresh rate toggle */ | 611 | #define KEY_REFRESH_RATE_TOGGLE	0x232	/* Display refresh rate toggle */ |
| ... | @@ -765,6 +770,9 @@ | ... | @@ -765,6 +770,9 @@ |
| 765 | #define KEY_KBD_LCD_MENU4		0x2bb | 770 | #define KEY_KBD_LCD_MENU4		0x2bb |
| 766 | #define KEY_KBD_LCD_MENU5		0x2bc | 771 | #define KEY_KBD_LCD_MENU5		0x2bc |
| 767 | 772 | ||
| 773 | /* Performance Boost key (Alienware)/G-Mode key (Dell) */ | ||
| 774 | #define KEY_PERFORMANCE			0x2bd | ||
| 775 | |||
| 768 | #define BTN_TRIGGER_HAPPY		0x2c0 | 776 | #define BTN_TRIGGER_HAPPY		0x2c0 |
| 769 | #define BTN_TRIGGER_HAPPY1		0x2c0 | 777 | #define BTN_TRIGGER_HAPPY1		0x2c0 |
| 770 | #define BTN_TRIGGER_HAPPY2		0x2c1 | 778 | #define BTN_TRIGGER_HAPPY2		0x2c1 |
| ... | @@ -925,7 +933,8 @@ | ... | @@ -925,7 +933,8 @@ |
| 925 | #define SW_MUTE_DEVICE		0x0e /* set = device disabled */ | 933 | #define SW_MUTE_DEVICE		0x0e /* set = device disabled */ |
| 926 | #define SW_PEN_INSERTED		0x0f /* set = pen inserted */ | 934 | #define SW_PEN_INSERTED		0x0f /* set = pen inserted */ |
| 927 | #define SW_MACHINE_COVER	0x10 /* set = cover closed */ | 935 | #define SW_MACHINE_COVER	0x10 /* set = cover closed */ |
| 928 | #define SW_MAX			0x10 | 936 | #define SW_USB_INSERT		0x11 /* set = USB audio device connected */ |
| 937 | #define SW_MAX			0x11 | ||
| 929 | #define SW_CNT			(SW_MAX+1) | 938 | #define SW_CNT			(SW_MAX+1) |
| 930 | 939 | ||
| 931 | /* | 940 | /* |
lib/libc/include/any-linux-any/linux/input.h+1| ... | @@ -273,6 +273,7 @@ struct input_mask { | ... | @@ -273,6 +273,7 @@ struct input_mask { |
| 273 | #define BUS_CEC			0x1E | 273 | #define BUS_CEC			0x1E |
| 274 | #define BUS_INTEL_ISHTP		0x1F | 274 | #define BUS_INTEL_ISHTP		0x1F |
| 275 | #define BUS_AMD_SFH		0x20 | 275 | #define BUS_AMD_SFH		0x20 |
| 276 | #define BUS_SDW			0x21 | ||
| 276 | 277 | ||
| 277 | /* | 278 | /* |
| 278 | * MT_TOOL types | 279 | * MT_TOOL types |
lib/libc/include/any-linux-any/linux/io_uring.h+110-3| ... | @@ -50,7 +50,7 @@ struct io_uring_sqe { | ... | @@ -50,7 +50,7 @@ struct io_uring_sqe { |
| 50 | 	}; | 50 | 	}; |
| 51 | 	__u32	len;		/* buffer size or number of iovecs */ | 51 | 	__u32	len;		/* buffer size or number of iovecs */ |
| 52 | 	union { | 52 | 	union { |
| 53 | 		__kernel_rwf_t	rw_flags; | 53 | 		__u32		rw_flags; |
| 54 | 		__u32		fsync_flags; | 54 | 		__u32		fsync_flags; |
| 55 | 		__u16		poll_events;	/* compatibility */ | 55 | 		__u16		poll_events;	/* compatibility */ |
| 56 | 		__u32		poll32_events;	/* word-reversed for BE */ | 56 | 		__u32		poll32_events;	/* word-reversed for BE */ |
| ... | @@ -73,6 +73,7 @@ struct io_uring_sqe { | ... | @@ -73,6 +73,7 @@ struct io_uring_sqe { |
| 73 | 		__u32		futex_flags; | 73 | 		__u32		futex_flags; |
| 74 | 		__u32		install_fd_flags; | 74 | 		__u32		install_fd_flags; |
| 75 | 		__u32		nop_flags; | 75 | 		__u32		nop_flags; |
| 76 | 		__u32		pipe_flags; | ||
| 76 | 	}; | 77 | 	}; |
| 77 | 	__u64	user_data;	/* data to be passed back at completion time */ | 78 | 	__u64	user_data;	/* data to be passed back at completion time */ |
| 78 | 	/* pack this to avoid bogus arm OABI complaints */ | 79 | 	/* pack this to avoid bogus arm OABI complaints */ |
| ... | @@ -87,17 +88,26 @@ struct io_uring_sqe { | ... | @@ -87,17 +88,26 @@ struct io_uring_sqe { |
| 87 | 	union { | 88 | 	union { |
| 88 | 		__s32	splice_fd_in; | 89 | 		__s32	splice_fd_in; |
| 89 | 		__u32	file_index; | 90 | 		__u32	file_index; |
| 91 | 		__u32	zcrx_ifq_idx; | ||
| 90 | 		__u32	optlen; | 92 | 		__u32	optlen; |
| 91 | 		struct { | 93 | 		struct { |
| 92 | 			__u16	addr_len; | 94 | 			__u16	addr_len; |
| 93 | 			__u16	__pad3[1]; | 95 | 			__u16	__pad3[1]; |
| 94 | 		}; | 96 | 		}; |
| 97 | 		struct { | ||
| 98 | 			__u8	write_stream; | ||
| 99 | 			__u8	__pad4[3]; | ||
| 100 | 		}; | ||
| 95 | 	}; | 101 | 	}; |
| 96 | 	union { | 102 | 	union { |
| 97 | 		struct { | 103 | 		struct { |
| 98 | 			__u64	addr3; | 104 | 			__u64	addr3; |
| 99 | 			__u64	__pad2[1]; | 105 | 			__u64	__pad2[1]; |
| 100 | 		}; | 106 | 		}; |
| 107 | 		struct { | ||
| 108 | 			__u64	attr_ptr; /* pointer to attribute information */ | ||
| 109 | 			__u64	attr_type_mask; /* bit mask of attributes */ | ||
| 110 | 		}; | ||
| 101 | 		__u64	optval; | 111 | 		__u64	optval; |
| 102 | 		/* | 112 | 		/* |
| 103 | 		 * If the ring is initialized with IORING_SETUP_SQE128, then | 113 | 		 * If the ring is initialized with IORING_SETUP_SQE128, then |
| ... | @@ -107,6 +117,18 @@ struct io_uring_sqe { | ... | @@ -107,6 +117,18 @@ struct io_uring_sqe { |
| 107 | 	}; | 117 | 	}; |
| 108 | }; | 118 | }; |
| 109 | 119 | ||
| 120 | /* sqe->attr_type_mask flags */ | ||
| 121 | #define IORING_RW_ATTR_FLAG_PI	(1U << 0) | ||
| 122 | /* PI attribute information */ | ||
| 123 | struct io_uring_attr_pi { | ||
| 124 | 		__u16	flags; | ||
| 125 | 		__u16	app_tag; | ||
| 126 | 		__u32	len; | ||
| 127 | 		__u64	addr; | ||
| 128 | 		__u64	seed; | ||
| 129 | 		__u64	rsvd; | ||
| 130 | }; | ||
| 131 | |||
| 110 | /* | 132 | /* |
| 111 | * If sqe->file_index is set to this for opcodes that instantiate a new | 133 | * If sqe->file_index is set to this for opcodes that instantiate a new |
| 112 | * direct descriptor (like openat/openat2/accept), then io_uring will allocate | 134 | * direct descriptor (like openat/openat2/accept), then io_uring will allocate |
| ... | @@ -262,6 +284,11 @@ enum io_uring_op { | ... | @@ -262,6 +284,11 @@ enum io_uring_op { |
| 262 | 	IORING_OP_FTRUNCATE, | 284 | 	IORING_OP_FTRUNCATE, |
| 263 | 	IORING_OP_BIND, | 285 | 	IORING_OP_BIND, |
| 264 | 	IORING_OP_LISTEN, | 286 | 	IORING_OP_LISTEN, |
| 287 | 	IORING_OP_RECV_ZC, | ||
| 288 | 	IORING_OP_EPOLL_WAIT, | ||
| 289 | 	IORING_OP_READV_FIXED, | ||
| 290 | 	IORING_OP_WRITEV_FIXED, | ||
| 291 | 	IORING_OP_PIPE, | ||
| 265 | 292 | ||
| 266 | 	/* this goes last, obviously */ | 293 | 	/* this goes last, obviously */ |
| 267 | 	IORING_OP_LAST, | 294 | 	IORING_OP_LAST, |
| ... | @@ -364,13 +391,17 @@ enum io_uring_op { | ... | @@ -364,13 +391,17 @@ enum io_uring_op { |
| 364 | *				result 	will be the number of buffers send, with | 391 | *				result 	will be the number of buffers send, with |
| 365 | *				the starting buffer ID in cqe->flags as per | 392 | *				the starting buffer ID in cqe->flags as per |
| 366 | *				usual for provided buffer usage. The buffers | 393 | *				usual for provided buffer usage. The buffers |
| 367 | *				will be	contigious from the starting buffer ID. | 394 | *				will be	contiguous from the starting buffer ID. |
| 395 | * | ||
| 396 | * IORING_SEND_VECTORIZED	If set, SEND[_ZC] will take a pointer to a io_vec | ||
| 397 | * 				to allow vectorized send operations. | ||
| 368 | */ | 398 | */ |
| 369 | #define IORING_RECVSEND_POLL_FIRST	(1U << 0) | 399 | #define IORING_RECVSEND_POLL_FIRST	(1U << 0) |
| 370 | #define IORING_RECV_MULTISHOT		(1U << 1) | 400 | #define IORING_RECV_MULTISHOT		(1U << 1) |
| 371 | #define IORING_RECVSEND_FIXED_BUF	(1U << 2) | 401 | #define IORING_RECVSEND_FIXED_BUF	(1U << 2) |
| 372 | #define IORING_SEND_ZC_REPORT_USAGE	(1U << 3) | 402 | #define IORING_SEND_ZC_REPORT_USAGE	(1U << 3) |
| 373 | #define IORING_RECVSEND_BUNDLE		(1U << 4) | 403 | #define IORING_RECVSEND_BUNDLE		(1U << 4) |
| 404 | #define IORING_SEND_VECTORIZED		(1U << 5) | ||
| 374 | 405 | ||
| 375 | /* | 406 | /* |
| 376 | * cqe.res for IORING_CQE_F_NOTIF if | 407 | * cqe.res for IORING_CQE_F_NOTIF if |
| ... | @@ -422,6 +453,7 @@ enum io_uring_msg_ring_flags { | ... | @@ -422,6 +453,7 @@ enum io_uring_msg_ring_flags { |
| 422 | #define IORING_NOP_FILE			(1U << 1) | 453 | #define IORING_NOP_FILE			(1U << 1) |
| 423 | #define IORING_NOP_FIXED_FILE		(1U << 2) | 454 | #define IORING_NOP_FIXED_FILE		(1U << 2) |
| 424 | #define IORING_NOP_FIXED_BUFFER		(1U << 3) | 455 | #define IORING_NOP_FIXED_BUFFER		(1U << 3) |
| 456 | #define IORING_NOP_TW			(1U << 4) | ||
| 425 | 457 | ||
| 426 | /* | 458 | /* |
| 427 | * IO completion data structure (Completion Queue Entry) | 459 | * IO completion data structure (Completion Queue Entry) |
| ... | @@ -525,6 +557,7 @@ struct io_cqring_offsets { | ... | @@ -525,6 +557,7 @@ struct io_cqring_offsets { |
| 525 | #define IORING_ENTER_REGISTERED_RING	(1U << 4) | 557 | #define IORING_ENTER_REGISTERED_RING	(1U << 4) |
| 526 | #define IORING_ENTER_ABS_TIMER		(1U << 5) | 558 | #define IORING_ENTER_ABS_TIMER		(1U << 5) |
| 527 | #define IORING_ENTER_EXT_ARG_REG	(1U << 6) | 559 | #define IORING_ENTER_EXT_ARG_REG	(1U << 6) |
| 560 | #define IORING_ENTER_NO_IOWAIT		(1U << 7) | ||
| 528 | 561 | ||
| 529 | /* | 562 | /* |
| 530 | * Passed in for io_uring_setup(2). Copied back with updated info on success | 563 | * Passed in for io_uring_setup(2). Copied back with updated info on success |
| ... | @@ -561,6 +594,8 @@ struct io_uring_params { | ... | @@ -561,6 +594,8 @@ struct io_uring_params { |
| 561 | #define IORING_FEAT_REG_REG_RING	(1U << 13) | 594 | #define IORING_FEAT_REG_REG_RING	(1U << 13) |
| 562 | #define IORING_FEAT_RECVSEND_BUNDLE	(1U << 14) | 595 | #define IORING_FEAT_RECVSEND_BUNDLE	(1U << 14) |
| 563 | #define IORING_FEAT_MIN_TIMEOUT		(1U << 15) | 596 | #define IORING_FEAT_MIN_TIMEOUT		(1U << 15) |
| 597 | #define IORING_FEAT_RW_ATTR		(1U << 16) | ||
| 598 | #define IORING_FEAT_NO_IOWAIT		(1U << 17) | ||
| 564 | 599 | ||
| 565 | /* | 600 | /* |
| 566 | * io_uring_register(2) opcodes and arguments | 601 | * io_uring_register(2) opcodes and arguments |
| ... | @@ -622,7 +657,8 @@ enum io_uring_register_op { | ... | @@ -622,7 +657,8 @@ enum io_uring_register_op { |
| 622 | 	/* send MSG_RING without having a ring */ | 657 | 	/* send MSG_RING without having a ring */ |
| 623 | 	IORING_REGISTER_SEND_MSG_RING		= 31, | 658 | 	IORING_REGISTER_SEND_MSG_RING		= 31, |
| 624 | 659 | ||
| 625 | 	/* 32 reserved for zc rx */ | 660 | 	/* register a netdev hw rx queue for zerocopy */ |
| 661 | 	IORING_REGISTER_ZCRX_IFQ		= 32, | ||
| 626 | 662 | ||
| 627 | 	/* resize CQ ring */ | 663 | 	/* resize CQ ring */ |
| 628 | 	IORING_REGISTER_RESIZE_RINGS		= 33, | 664 | 	IORING_REGISTER_RESIZE_RINGS		= 33, |
| ... | @@ -937,6 +973,77 @@ enum io_uring_socket_op { | ... | @@ -937,6 +973,77 @@ enum io_uring_socket_op { |
| 937 | 	SOCKET_URING_OP_SIOCOUTQ, | 973 | 	SOCKET_URING_OP_SIOCOUTQ, |
| 938 | 	SOCKET_URING_OP_GETSOCKOPT, | 974 | 	SOCKET_URING_OP_GETSOCKOPT, |
| 939 | 	SOCKET_URING_OP_SETSOCKOPT, | 975 | 	SOCKET_URING_OP_SETSOCKOPT, |
| 976 | 	SOCKET_URING_OP_TX_TIMESTAMP, | ||
| 977 | }; | ||
| 978 | |||
| 979 | /* | ||
| 980 | * SOCKET_URING_OP_TX_TIMESTAMP definitions | ||
| 981 | */ | ||
| 982 | |||
| 983 | #define IORING_TIMESTAMP_HW_SHIFT	16 | ||
| 984 | /* The cqe->flags bit from which the timestamp type is stored */ | ||
| 985 | #define IORING_TIMESTAMP_TYPE_SHIFT	(IORING_TIMESTAMP_HW_SHIFT + 1) | ||
| 986 | /* The cqe->flags flag signifying whether it's a hardware timestamp */ | ||
| 987 | #define IORING_CQE_F_TSTAMP_HW		((__u32)1 << IORING_TIMESTAMP_HW_SHIFT) | ||
| 988 | |||
| 989 | struct io_timespec { | ||
| 990 | 	__u64		tv_sec; | ||
| 991 | 	__u64		tv_nsec; | ||
| 992 | }; | ||
| 993 | |||
| 994 | /* Zero copy receive refill queue entry */ | ||
| 995 | struct io_uring_zcrx_rqe { | ||
| 996 | 	__u64	off; | ||
| 997 | 	__u32	len; | ||
| 998 | 	__u32	__pad; | ||
| 999 | }; | ||
| 1000 | |||
| 1001 | struct io_uring_zcrx_cqe { | ||
| 1002 | 	__u64	off; | ||
| 1003 | 	__u64	__pad; | ||
| 1004 | }; | ||
| 1005 | |||
| 1006 | /* The bit from which area id is encoded into offsets */ | ||
| 1007 | #define IORING_ZCRX_AREA_SHIFT	48 | ||
| 1008 | #define IORING_ZCRX_AREA_MASK	(~(((__u64)1 << IORING_ZCRX_AREA_SHIFT) - 1)) | ||
| 1009 | |||
| 1010 | struct io_uring_zcrx_offsets { | ||
| 1011 | 	__u32	head; | ||
| 1012 | 	__u32	tail; | ||
| 1013 | 	__u32	rqes; | ||
| 1014 | 	__u32	__resv2; | ||
| 1015 | 	__u64	__resv[2]; | ||
| 1016 | }; | ||
| 1017 | |||
| 1018 | enum io_uring_zcrx_area_flags { | ||
| 1019 | 	IORING_ZCRX_AREA_DMABUF		= 1, | ||
| 1020 | }; | ||
| 1021 | |||
| 1022 | struct io_uring_zcrx_area_reg { | ||
| 1023 | 	__u64	addr; | ||
| 1024 | 	__u64	len; | ||
| 1025 | 	__u64	rq_area_token; | ||
| 1026 | 	__u32	flags; | ||
| 1027 | 	__u32	dmabuf_fd; | ||
| 1028 | 	__u64	__resv2[2]; | ||
| 1029 | }; | ||
| 1030 | |||
| 1031 | /* | ||
| 1032 | * Argument for IORING_REGISTER_ZCRX_IFQ | ||
| 1033 | */ | ||
| 1034 | struct io_uring_zcrx_ifq_reg { | ||
| 1035 | 	__u32	if_idx; | ||
| 1036 | 	__u32	if_rxq; | ||
| 1037 | 	__u32	rq_entries; | ||
| 1038 | 	__u32	flags; | ||
| 1039 | |||
| 1040 | 	__u64	area_ptr; /* pointer to struct io_uring_zcrx_area_reg */ | ||
| 1041 | 	__u64	region_ptr; /* struct io_uring_region_desc * */ | ||
| 1042 | |||
| 1043 | 	struct io_uring_zcrx_offsets offsets; | ||
| 1044 | 	__u32	zcrx_id; | ||
| 1045 | 	__u32	__resv2; | ||
| 1046 | 	__u64	__resv[3]; | ||
| 940 | }; | 1047 | }; |
| 941 | 1048 | ||
| 942 | #ifdef __cplusplus | 1049 | #ifdef __cplusplus |
lib/libc/include/any-linux-any/linux/io_uring/mock_file.h created+47| ... | @@ -0,0 +1,47 @@ | ||
| 1 | #ifndef LINUX_IO_URING_MOCK_FILE_H | ||
| 2 | #define LINUX_IO_URING_MOCK_FILE_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | enum { | ||
| 7 | 	IORING_MOCK_FEAT_CMD_COPY, | ||
| 8 | 	IORING_MOCK_FEAT_RW_ZERO, | ||
| 9 | 	IORING_MOCK_FEAT_RW_NOWAIT, | ||
| 10 | 	IORING_MOCK_FEAT_RW_ASYNC, | ||
| 11 | 	IORING_MOCK_FEAT_POLL, | ||
| 12 | |||
| 13 | 	IORING_MOCK_FEAT_END, | ||
| 14 | }; | ||
| 15 | |||
| 16 | struct io_uring_mock_probe { | ||
| 17 | 	__u64		features; | ||
| 18 | 	__u64		__resv[9]; | ||
| 19 | }; | ||
| 20 | |||
| 21 | enum { | ||
| 22 | 	IORING_MOCK_CREATE_F_SUPPORT_NOWAIT			= 1, | ||
| 23 | 	IORING_MOCK_CREATE_F_POLL				= 2, | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct io_uring_mock_create { | ||
| 27 | 	__u32		out_fd; | ||
| 28 | 	__u32		flags; | ||
| 29 | 	__u64		file_size; | ||
| 30 | 	__u64		rw_delay_ns; | ||
| 31 | 	__u64		__resv[13]; | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum { | ||
| 35 | 	IORING_MOCK_MGR_CMD_PROBE, | ||
| 36 | 	IORING_MOCK_MGR_CMD_CREATE, | ||
| 37 | }; | ||
| 38 | |||
| 39 | enum { | ||
| 40 | 	IORING_MOCK_CMD_COPY_REGBUF, | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum { | ||
| 44 | 	IORING_MOCK_COPY_FROM			= 1, | ||
| 45 | }; | ||
| 46 | |||
| 47 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/iommufd.h+279-4| ... | @@ -55,6 +55,8 @@ enum { | ... | @@ -55,6 +55,8 @@ enum { |
| 55 | 	IOMMUFD_CMD_VIOMMU_ALLOC = 0x90, | 55 | 	IOMMUFD_CMD_VIOMMU_ALLOC = 0x90, |
| 56 | 	IOMMUFD_CMD_VDEVICE_ALLOC = 0x91, | 56 | 	IOMMUFD_CMD_VDEVICE_ALLOC = 0x91, |
| 57 | 	IOMMUFD_CMD_IOAS_CHANGE_PROCESS = 0x92, | 57 | 	IOMMUFD_CMD_IOAS_CHANGE_PROCESS = 0x92, |
| 58 | 	IOMMUFD_CMD_VEVENTQ_ALLOC = 0x93, | ||
| 59 | 	IOMMUFD_CMD_HW_QUEUE_ALLOC = 0x94, | ||
| 58 | }; | 60 | }; |
| 59 | 61 | ||
| 60 | /** | 62 | /** |
| ... | @@ -392,6 +394,9 @@ struct iommu_vfio_ioas { | ... | @@ -392,6 +394,9 @@ struct iommu_vfio_ioas { |
| 392 | * Any domain attached to the non-PASID part of the | 394 | * Any domain attached to the non-PASID part of the |
| 393 | * device must also be flagged, otherwise attaching a | 395 | * device must also be flagged, otherwise attaching a |
| 394 | * PASID will blocked. | 396 | * PASID will blocked. |
| 397 | * For the user that wants to attach PASID, ioas is | ||
| 398 | * not recommended for both the non-PASID part | ||
| 399 | * and PASID part of the device. | ||
| 395 | * If IOMMU does not support PASID it will return | 400 | * If IOMMU does not support PASID it will return |
| 396 | * error (-EOPNOTSUPP). | 401 | * error (-EOPNOTSUPP). |
| 397 | */ | 402 | */ |
| ... | @@ -586,17 +591,44 @@ struct iommu_hw_info_arm_smmuv3 { | ... | @@ -586,17 +591,44 @@ struct iommu_hw_info_arm_smmuv3 { |
| 586 | 	__u32 aidr; | 591 | 	__u32 aidr; |
| 587 | }; | 592 | }; |
| 588 | 593 | ||
| 594 | /** | ||
| 595 | * struct iommu_hw_info_tegra241_cmdqv - NVIDIA Tegra241 CMDQV Hardware | ||
| 596 | * Information (IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV) | ||
| 597 | * | ||
| 598 | * @flags: Must be 0 | ||
| 599 | * @version: Version number for the CMDQ-V HW for PARAM bits[03:00] | ||
| 600 | * @log2vcmdqs: Log2 of the total number of VCMDQs for PARAM bits[07:04] | ||
| 601 | * @log2vsids: Log2 of the total number of SID replacements for PARAM bits[15:12] | ||
| 602 | * @__reserved: Must be 0 | ||
| 603 | * | ||
| 604 | * VMM can use these fields directly in its emulated global PARAM register. Note | ||
| 605 | * that only one Virtual Interface (VINTF) should be exposed to a VM, i.e. PARAM | ||
| 606 | * bits[11:08] should be set to 0 for log2 of the total number of VINTFs. | ||
| 607 | */ | ||
| 608 | struct iommu_hw_info_tegra241_cmdqv { | ||
| 609 | 	__u32 flags; | ||
| 610 | 	__u8 version; | ||
| 611 | 	__u8 log2vcmdqs; | ||
| 612 | 	__u8 log2vsids; | ||
| 613 | 	__u8 __reserved; | ||
| 614 | }; | ||
| 615 | |||
| 589 | /** | 616 | /** |
| 590 | * enum iommu_hw_info_type - IOMMU Hardware Info Types | 617 | * enum iommu_hw_info_type - IOMMU Hardware Info Types |
| 591 | * @IOMMU_HW_INFO_TYPE_NONE: Used by the drivers that do not report hardware | 618 | * @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not report hardware |
| 592 | * info | 619 | * info |
| 620 | * @IOMMU_HW_INFO_TYPE_DEFAULT: Input to request for a default type | ||
| 593 | * @IOMMU_HW_INFO_TYPE_INTEL_VTD: Intel VT-d iommu info type | 621 | * @IOMMU_HW_INFO_TYPE_INTEL_VTD: Intel VT-d iommu info type |
| 594 | * @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type | 622 | * @IOMMU_HW_INFO_TYPE_ARM_SMMUV3: ARM SMMUv3 iommu info type |
| 623 | * @IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM | ||
| 624 | * SMMUv3) info type | ||
| 595 | */ | 625 | */ |
| 596 | enum iommu_hw_info_type { | 626 | enum iommu_hw_info_type { |
| 597 | 	IOMMU_HW_INFO_TYPE_NONE = 0, | 627 | 	IOMMU_HW_INFO_TYPE_NONE = 0, |
| 628 | 	IOMMU_HW_INFO_TYPE_DEFAULT = 0, | ||
| 598 | 	IOMMU_HW_INFO_TYPE_INTEL_VTD = 1, | 629 | 	IOMMU_HW_INFO_TYPE_INTEL_VTD = 1, |
| 599 | 	IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2, | 630 | 	IOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2, |
| 631 | 	IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV = 3, | ||
| 600 | }; | 632 | }; |
| 601 | 633 | ||
| 602 | /** | 634 | /** |
| ... | @@ -608,9 +640,26 @@ enum iommu_hw_info_type { | ... | @@ -608,9 +640,26 @@ enum iommu_hw_info_type { |
| 608 | * IOMMU_HWPT_GET_DIRTY_BITMAP | 640 | * IOMMU_HWPT_GET_DIRTY_BITMAP |
| 609 | * IOMMU_HWPT_SET_DIRTY_TRACKING | 641 | * IOMMU_HWPT_SET_DIRTY_TRACKING |
| 610 | * | 642 | * |
| 643 | * @IOMMU_HW_CAP_PCI_PASID_EXEC: Execute Permission Supported, user ignores it | ||
| 644 | * when the struct | ||
| 645 | * iommu_hw_info::out_max_pasid_log2 is zero. | ||
| 646 | * @IOMMU_HW_CAP_PCI_PASID_PRIV: Privileged Mode Supported, user ignores it | ||
| 647 | * when the struct | ||
| 648 | * iommu_hw_info::out_max_pasid_log2 is zero. | ||
| 611 | */ | 649 | */ |
| 612 | enum iommufd_hw_capabilities { | 650 | enum iommufd_hw_capabilities { |
| 613 | 	IOMMU_HW_CAP_DIRTY_TRACKING = 1 << 0, | 651 | 	IOMMU_HW_CAP_DIRTY_TRACKING = 1 << 0, |
| 652 | 	IOMMU_HW_CAP_PCI_PASID_EXEC = 1 << 1, | ||
| 653 | 	IOMMU_HW_CAP_PCI_PASID_PRIV = 1 << 2, | ||
| 654 | }; | ||
| 655 | |||
| 656 | /** | ||
| 657 | * enum iommufd_hw_info_flags - Flags for iommu_hw_info | ||
| 658 | * @IOMMU_HW_INFO_FLAG_INPUT_TYPE: If set, @in_data_type carries an input type | ||
| 659 | * for user space to request for a specific info | ||
| 660 | */ | ||
| 661 | enum iommufd_hw_info_flags { | ||
| 662 | 	IOMMU_HW_INFO_FLAG_INPUT_TYPE = 1 << 0, | ||
| 614 | }; | 663 | }; |
| 615 | 664 | ||
| 616 | /** | 665 | /** |
| ... | @@ -622,10 +671,19 @@ enum iommufd_hw_capabilities { | ... | @@ -622,10 +671,19 @@ enum iommufd_hw_capabilities { |
| 622 | * data that kernel supports | 671 | * data that kernel supports |
| 623 | * @data_uptr: User pointer to a user-space buffer used by the kernel to fill | 672 | * @data_uptr: User pointer to a user-space buffer used by the kernel to fill |
| 624 | * the iommu type specific hardware information data | 673 | * the iommu type specific hardware information data |
| 674 | * @in_data_type: This shares the same field with @out_data_type, making it be | ||
| 675 | * a bidirectional field. When IOMMU_HW_INFO_FLAG_INPUT_TYPE is | ||
| 676 | * set, an input type carried via this @in_data_type field will | ||
| 677 | * be valid, requesting for the info data to the given type. If | ||
| 678 | * IOMMU_HW_INFO_FLAG_INPUT_TYPE is unset, any input value will | ||
| 679 | * be seen as IOMMU_HW_INFO_TYPE_DEFAULT | ||
| 625 | * @out_data_type: Output the iommu hardware info type as defined in the enum | 680 | * @out_data_type: Output the iommu hardware info type as defined in the enum |
| 626 | * iommu_hw_info_type. | 681 | * iommu_hw_info_type. |
| 627 | * @out_capabilities: Output the generic iommu capability info type as defined | 682 | * @out_capabilities: Output the generic iommu capability info type as defined |
| 628 | * in the enum iommu_hw_capabilities. | 683 | * in the enum iommu_hw_capabilities. |
| 684 | * @out_max_pasid_log2: Output the width of PASIDs. 0 means no PASID support. | ||
| 685 | * PCI devices turn to out_capabilities to check if the | ||
| 686 | * specific capabilities is supported or not. | ||
| 629 | * @__reserved: Must be 0 | 687 | * @__reserved: Must be 0 |
| 630 | * | 688 | * |
| 631 | * Query an iommu type specific hardware information data from an iommu behind | 689 | * Query an iommu type specific hardware information data from an iommu behind |
| ... | @@ -648,8 +706,12 @@ struct iommu_hw_info { | ... | @@ -648,8 +706,12 @@ struct iommu_hw_info { |
| 648 | 	__u32 dev_id; | 706 | 	__u32 dev_id; |
| 649 | 	__u32 data_len; | 707 | 	__u32 data_len; |
| 650 | 	__aligned_u64 data_uptr; | 708 | 	__aligned_u64 data_uptr; |
| 651 | 	__u32 out_data_type; | 709 | 	union { |
| 652 | 	__u32 __reserved; | 710 | 		__u32 in_data_type; |
| 711 | 		__u32 out_data_type; | ||
| 712 | 	}; | ||
| 713 | 	__u8 out_max_pasid_log2; | ||
| 714 | 	__u8 __reserved[3]; | ||
| 653 | 	__aligned_u64 out_capabilities; | 715 | 	__aligned_u64 out_capabilities; |
| 654 | }; | 716 | }; |
| 655 | #define IOMMU_GET_HW_INFO _IO(IOMMUFD_TYPE, IOMMUFD_CMD_GET_HW_INFO) | 717 | #define IOMMU_GET_HW_INFO _IO(IOMMUFD_TYPE, IOMMUFD_CMD_GET_HW_INFO) |
| ... | @@ -935,10 +997,29 @@ struct iommu_fault_alloc { | ... | @@ -935,10 +997,29 @@ struct iommu_fault_alloc { |
| 935 | * enum iommu_viommu_type - Virtual IOMMU Type | 997 | * enum iommu_viommu_type - Virtual IOMMU Type |
| 936 | * @IOMMU_VIOMMU_TYPE_DEFAULT: Reserved for future use | 998 | * @IOMMU_VIOMMU_TYPE_DEFAULT: Reserved for future use |
| 937 | * @IOMMU_VIOMMU_TYPE_ARM_SMMUV3: ARM SMMUv3 driver specific type | 999 | * @IOMMU_VIOMMU_TYPE_ARM_SMMUV3: ARM SMMUv3 driver specific type |
| 1000 | * @IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM | ||
| 1001 | * SMMUv3) enabled ARM SMMUv3 type | ||
| 938 | */ | 1002 | */ |
| 939 | enum iommu_viommu_type { | 1003 | enum iommu_viommu_type { |
| 940 | 	IOMMU_VIOMMU_TYPE_DEFAULT = 0, | 1004 | 	IOMMU_VIOMMU_TYPE_DEFAULT = 0, |
| 941 | 	IOMMU_VIOMMU_TYPE_ARM_SMMUV3 = 1, | 1005 | 	IOMMU_VIOMMU_TYPE_ARM_SMMUV3 = 1, |
| 1006 | 	IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV = 2, | ||
| 1007 | }; | ||
| 1008 | |||
| 1009 | /** | ||
| 1010 | * struct iommu_viommu_tegra241_cmdqv - NVIDIA Tegra241 CMDQV Virtual Interface | ||
| 1011 | * (IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV) | ||
| 1012 | * @out_vintf_mmap_offset: mmap offset argument for VINTF's page0 | ||
| 1013 | * @out_vintf_mmap_length: mmap length argument for VINTF's page0 | ||
| 1014 | * | ||
| 1015 | * Both @out_vintf_mmap_offset and @out_vintf_mmap_length are reported by kernel | ||
| 1016 | * for user space to mmap the VINTF page0 from the host physical address space | ||
| 1017 | * to the guest physical address space so that a guest kernel can directly R/W | ||
| 1018 | * access to the VINTF page0 in order to control its virtual command queues. | ||
| 1019 | */ | ||
| 1020 | struct iommu_viommu_tegra241_cmdqv { | ||
| 1021 | 	__aligned_u64 out_vintf_mmap_offset; | ||
| 1022 | 	__aligned_u64 out_vintf_mmap_length; | ||
| 942 | }; | 1023 | }; |
| 943 | 1024 | ||
| 944 | /** | 1025 | /** |
| ... | @@ -949,6 +1030,9 @@ enum iommu_viommu_type { | ... | @@ -949,6 +1030,9 @@ enum iommu_viommu_type { |
| 949 | * @dev_id: The device's physical IOMMU will be used to back the virtual IOMMU | 1030 | * @dev_id: The device's physical IOMMU will be used to back the virtual IOMMU |
| 950 | * @hwpt_id: ID of a nesting parent HWPT to associate to | 1031 | * @hwpt_id: ID of a nesting parent HWPT to associate to |
| 951 | * @out_viommu_id: Output virtual IOMMU ID for the allocated object | 1032 | * @out_viommu_id: Output virtual IOMMU ID for the allocated object |
| 1033 | * @data_len: Length of the type specific data | ||
| 1034 | * @__reserved: Must be 0 | ||
| 1035 | * @data_uptr: User pointer to a driver-specific virtual IOMMU data | ||
| 952 | * | 1036 | * |
| 953 | * Allocate a virtual IOMMU object, representing the underlying physical IOMMU's | 1037 | * Allocate a virtual IOMMU object, representing the underlying physical IOMMU's |
| 954 | * virtualization support that is a security-isolated slice of the real IOMMU HW | 1038 | * virtualization support that is a security-isolated slice of the real IOMMU HW |
| ... | @@ -969,6 +1053,9 @@ struct iommu_viommu_alloc { | ... | @@ -969,6 +1053,9 @@ struct iommu_viommu_alloc { |
| 969 | 	__u32 dev_id; | 1053 | 	__u32 dev_id; |
| 970 | 	__u32 hwpt_id; | 1054 | 	__u32 hwpt_id; |
| 971 | 	__u32 out_viommu_id; | 1055 | 	__u32 out_viommu_id; |
| 1056 | 	__u32 data_len; | ||
| 1057 | 	__u32 __reserved; | ||
| 1058 | 	__aligned_u64 data_uptr; | ||
| 972 | }; | 1059 | }; |
| 973 | #define IOMMU_VIOMMU_ALLOC _IO(IOMMUFD_TYPE, IOMMUFD_CMD_VIOMMU_ALLOC) | 1060 | #define IOMMU_VIOMMU_ALLOC _IO(IOMMUFD_TYPE, IOMMUFD_CMD_VIOMMU_ALLOC) |
| 974 | 1061 | ||
| ... | @@ -979,10 +1066,15 @@ struct iommu_viommu_alloc { | ... | @@ -979,10 +1066,15 @@ struct iommu_viommu_alloc { |
| 979 | * @dev_id: The physical device to allocate a virtual instance on the vIOMMU | 1066 | * @dev_id: The physical device to allocate a virtual instance on the vIOMMU |
| 980 | * @out_vdevice_id: Object handle for the vDevice. Pass to IOMMU_DESTORY | 1067 | * @out_vdevice_id: Object handle for the vDevice. Pass to IOMMU_DESTORY |
| 981 | * @virt_id: Virtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID | 1068 | * @virt_id: Virtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID |
| 982 | * of AMD IOMMU, and vRID of a nested Intel VT-d to a Context Table | 1069 | * of AMD IOMMU, and vRID of Intel VT-d |
| 983 | * | 1070 | * |
| 984 | * Allocate a virtual device instance (for a physical device) against a vIOMMU. | 1071 | * Allocate a virtual device instance (for a physical device) against a vIOMMU. |
| 985 | * This instance holds the device's information (related to its vIOMMU) in a VM. | 1072 | * This instance holds the device's information (related to its vIOMMU) in a VM. |
| 1073 | * User should use IOMMU_DESTROY to destroy the virtual device before | ||
| 1074 | * destroying the physical device (by closing vfio_cdev fd). Otherwise the | ||
| 1075 | * virtual device would be forcibly destroyed on physical device destruction, | ||
| 1076 | * its vdevice_id would be permanently leaked (unremovable & unreusable) until | ||
| 1077 | * iommu fd closed. | ||
| 986 | */ | 1078 | */ |
| 987 | struct iommu_vdevice_alloc { | 1079 | struct iommu_vdevice_alloc { |
| 988 | 	__u32 size; | 1080 | 	__u32 size; |
| ... | @@ -1014,4 +1106,187 @@ struct iommu_ioas_change_process { | ... | @@ -1014,4 +1106,187 @@ struct iommu_ioas_change_process { |
| 1014 | #define IOMMU_IOAS_CHANGE_PROCESS \ | 1106 | #define IOMMU_IOAS_CHANGE_PROCESS \ |
| 1015 | 	_IO(IOMMUFD_TYPE, IOMMUFD_CMD_IOAS_CHANGE_PROCESS) | 1107 | 	_IO(IOMMUFD_TYPE, IOMMUFD_CMD_IOAS_CHANGE_PROCESS) |
| 1016 | 1108 | ||
| 1109 | /** | ||
| 1110 | * enum iommu_veventq_flag - flag for struct iommufd_vevent_header | ||
| 1111 | * @IOMMU_VEVENTQ_FLAG_LOST_EVENTS: vEVENTQ has lost vEVENTs | ||
| 1112 | */ | ||
| 1113 | enum iommu_veventq_flag { | ||
| 1114 | 	IOMMU_VEVENTQ_FLAG_LOST_EVENTS = (1U << 0), | ||
| 1115 | }; | ||
| 1116 | |||
| 1117 | /** | ||
| 1118 | * struct iommufd_vevent_header - Virtual Event Header for a vEVENTQ Status | ||
| 1119 | * @flags: Combination of enum iommu_veventq_flag | ||
| 1120 | * @sequence: The sequence index of a vEVENT in the vEVENTQ, with a range of | ||
| 1121 | * [0, INT_MAX] where the following index of INT_MAX is 0 | ||
| 1122 | * | ||
| 1123 | * Each iommufd_vevent_header reports a sequence index of the following vEVENT: | ||
| 1124 | * | ||
| 1125 | * +----------------------+-------+----------------------+-------+---+-------+ | ||
| 1126 | * | header0 {sequence=0} | data0 | header1 {sequence=1} | data1 |...| dataN | | ||
| 1127 | * +----------------------+-------+----------------------+-------+---+-------+ | ||
| 1128 | * | ||
| 1129 | * And this sequence index is expected to be monotonic to the sequence index of | ||
| 1130 | * the previous vEVENT. If two adjacent sequence indexes has a delta larger than | ||
| 1131 | * 1, it means that delta - 1 number of vEVENTs has lost, e.g. two lost vEVENTs: | ||
| 1132 | * | ||
| 1133 | * +-----+----------------------+-------+----------------------+-------+-----+ | ||
| 1134 | * | ... | header3 {sequence=3} | data3 | header6 {sequence=6} | data6 | ... | | ||
| 1135 | * +-----+----------------------+-------+----------------------+-------+-----+ | ||
| 1136 | * | ||
| 1137 | * If a vEVENT lost at the tail of the vEVENTQ and there is no following vEVENT | ||
| 1138 | * providing the next sequence index, an IOMMU_VEVENTQ_FLAG_LOST_EVENTS header | ||
| 1139 | * would be added to the tail, and no data would follow this header: | ||
| 1140 | * | ||
| 1141 | * +--+----------------------+-------+-----------------------------------------+ | ||
| 1142 | * |..| header3 {sequence=3} | data3 | header4 {flags=LOST_EVENTS, sequence=4} | | ||
| 1143 | * +--+----------------------+-------+-----------------------------------------+ | ||
| 1144 | */ | ||
| 1145 | struct iommufd_vevent_header { | ||
| 1146 | 	__u32 flags; | ||
| 1147 | 	__u32 sequence; | ||
| 1148 | }; | ||
| 1149 | |||
| 1150 | /** | ||
| 1151 | * enum iommu_veventq_type - Virtual Event Queue Type | ||
| 1152 | * @IOMMU_VEVENTQ_TYPE_DEFAULT: Reserved for future use | ||
| 1153 | * @IOMMU_VEVENTQ_TYPE_ARM_SMMUV3: ARM SMMUv3 Virtual Event Queue | ||
| 1154 | * @IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV Extension IRQ | ||
| 1155 | */ | ||
| 1156 | enum iommu_veventq_type { | ||
| 1157 | 	IOMMU_VEVENTQ_TYPE_DEFAULT = 0, | ||
| 1158 | 	IOMMU_VEVENTQ_TYPE_ARM_SMMUV3 = 1, | ||
| 1159 | 	IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV = 2, | ||
| 1160 | }; | ||
| 1161 | |||
| 1162 | /** | ||
| 1163 | * struct iommu_vevent_arm_smmuv3 - ARM SMMUv3 Virtual Event | ||
| 1164 | * (IOMMU_VEVENTQ_TYPE_ARM_SMMUV3) | ||
| 1165 | * @evt: 256-bit ARM SMMUv3 Event record, little-endian. | ||
| 1166 | * Reported event records: (Refer to "7.3 Event records" in SMMUv3 HW Spec) | ||
| 1167 | * - 0x04 C_BAD_STE | ||
| 1168 | * - 0x06 F_STREAM_DISABLED | ||
| 1169 | * - 0x08 C_BAD_SUBSTREAMID | ||
| 1170 | * - 0x0a C_BAD_CD | ||
| 1171 | * - 0x10 F_TRANSLATION | ||
| 1172 | * - 0x11 F_ADDR_SIZE | ||
| 1173 | * - 0x12 F_ACCESS | ||
| 1174 | * - 0x13 F_PERMISSION | ||
| 1175 | * | ||
| 1176 | * StreamID field reports a virtual device ID. To receive a virtual event for a | ||
| 1177 | * device, a vDEVICE must be allocated via IOMMU_VDEVICE_ALLOC. | ||
| 1178 | */ | ||
| 1179 | struct iommu_vevent_arm_smmuv3 { | ||
| 1180 | 	__aligned_le64 evt[4]; | ||
| 1181 | }; | ||
| 1182 | |||
| 1183 | /** | ||
| 1184 | * struct iommu_vevent_tegra241_cmdqv - Tegra241 CMDQV IRQ | ||
| 1185 | * (IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV) | ||
| 1186 | * @lvcmdq_err_map: 128-bit logical vcmdq error map, little-endian. | ||
| 1187 | * (Refer to register LVCMDQ_ERR_MAPs per VINTF ) | ||
| 1188 | * | ||
| 1189 | * The 128-bit register value from HW exclusively reflect the error bits for a | ||
| 1190 | * Virtual Interface represented by a vIOMMU object. Read and report directly. | ||
| 1191 | */ | ||
| 1192 | struct iommu_vevent_tegra241_cmdqv { | ||
| 1193 | 	__aligned_le64 lvcmdq_err_map[2]; | ||
| 1194 | }; | ||
| 1195 | |||
| 1196 | /** | ||
| 1197 | * struct iommu_veventq_alloc - ioctl(IOMMU_VEVENTQ_ALLOC) | ||
| 1198 | * @size: sizeof(struct iommu_veventq_alloc) | ||
| 1199 | * @flags: Must be 0 | ||
| 1200 | * @viommu_id: virtual IOMMU ID to associate the vEVENTQ with | ||
| 1201 | * @type: Type of the vEVENTQ. Must be defined in enum iommu_veventq_type | ||
| 1202 | * @veventq_depth: Maximum number of events in the vEVENTQ | ||
| 1203 | * @out_veventq_id: The ID of the new vEVENTQ | ||
| 1204 | * @out_veventq_fd: The fd of the new vEVENTQ. User space must close the | ||
| 1205 | * successfully returned fd after using it | ||
| 1206 | * @__reserved: Must be 0 | ||
| 1207 | * | ||
| 1208 | * Explicitly allocate a virtual event queue interface for a vIOMMU. A vIOMMU | ||
| 1209 | * can have multiple FDs for different types, but is confined to one per @type. | ||
| 1210 | * User space should open the @out_veventq_fd to read vEVENTs out of a vEVENTQ, | ||
| 1211 | * if there are vEVENTs available. A vEVENTQ will lose events due to overflow, | ||
| 1212 | * if the number of the vEVENTs hits @veventq_depth. | ||
| 1213 | * | ||
| 1214 | * Each vEVENT in a vEVENTQ encloses a struct iommufd_vevent_header followed by | ||
| 1215 | * a type-specific data structure, in a normal case: | ||
| 1216 | * | ||
| 1217 | * +-+---------+-------+---------+-------+-----+---------+-------+-+ | ||
| 1218 | * | | header0 | data0 | header1 | data1 | ... | headerN | dataN | | | ||
| 1219 | * +-+---------+-------+---------+-------+-----+---------+-------+-+ | ||
| 1220 | * | ||
| 1221 | * unless a tailing IOMMU_VEVENTQ_FLAG_LOST_EVENTS header is logged (refer to | ||
| 1222 | * struct iommufd_vevent_header). | ||
| 1223 | */ | ||
| 1224 | struct iommu_veventq_alloc { | ||
| 1225 | 	__u32 size; | ||
| 1226 | 	__u32 flags; | ||
| 1227 | 	__u32 viommu_id; | ||
| 1228 | 	__u32 type; | ||
| 1229 | 	__u32 veventq_depth; | ||
| 1230 | 	__u32 out_veventq_id; | ||
| 1231 | 	__u32 out_veventq_fd; | ||
| 1232 | 	__u32 __reserved; | ||
| 1233 | }; | ||
| 1234 | #define IOMMU_VEVENTQ_ALLOC _IO(IOMMUFD_TYPE, IOMMUFD_CMD_VEVENTQ_ALLOC) | ||
| 1235 | |||
| 1236 | /** | ||
| 1237 | * enum iommu_hw_queue_type - HW Queue Type | ||
| 1238 | * @IOMMU_HW_QUEUE_TYPE_DEFAULT: Reserved for future use | ||
| 1239 | * @IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM | ||
| 1240 | * SMMUv3) Virtual Command Queue (VCMDQ) | ||
| 1241 | */ | ||
| 1242 | enum iommu_hw_queue_type { | ||
| 1243 | 	IOMMU_HW_QUEUE_TYPE_DEFAULT = 0, | ||
| 1244 | 	/* | ||
| 1245 | 	 * TEGRA241_CMDQV requirements (otherwise, allocation will fail) | ||
| 1246 | 	 * - alloc starts from the lowest @index=0 in ascending order | ||
| 1247 | 	 * - destroy starts from the last allocated @index in descending order | ||
| 1248 | 	 * - @base_addr must be aligned to @length in bytes and mapped in IOAS | ||
| 1249 | 	 * - @length must be a power of 2, with a minimum 32 bytes and a maximum | ||
| 1250 | 	 * 2 ^ idr[1].CMDQS * 16 bytes (use GET_HW_INFO call to read idr[1] | ||
| 1251 | 	 * from struct iommu_hw_info_arm_smmuv3) | ||
| 1252 | 	 * - suggest to back the queue memory with contiguous physical pages or | ||
| 1253 | 	 * a single huge page with alignment of the queue size, and limit the | ||
| 1254 | 	 * emulated vSMMU's IDR1.CMDQS to log2(huge page size / 16 bytes) | ||
| 1255 | 	 */ | ||
| 1256 | 	IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV = 1, | ||
| 1257 | }; | ||
| 1258 | |||
| 1259 | /** | ||
| 1260 | * struct iommu_hw_queue_alloc - ioctl(IOMMU_HW_QUEUE_ALLOC) | ||
| 1261 | * @size: sizeof(struct iommu_hw_queue_alloc) | ||
| 1262 | * @flags: Must be 0 | ||
| 1263 | * @viommu_id: Virtual IOMMU ID to associate the HW queue with | ||
| 1264 | * @type: One of enum iommu_hw_queue_type | ||
| 1265 | * @index: The logical index to the HW queue per virtual IOMMU for a multi-queue | ||
| 1266 | * model | ||
| 1267 | * @out_hw_queue_id: The ID of the new HW queue | ||
| 1268 | * @nesting_parent_iova: Base address of the queue memory in the guest physical | ||
| 1269 | * address space | ||
| 1270 | * @length: Length of the queue memory | ||
| 1271 | * | ||
| 1272 | * Allocate a HW queue object for a vIOMMU-specific HW-accelerated queue, which | ||
| 1273 | * allows HW to access a guest queue memory described using @nesting_parent_iova | ||
| 1274 | * and @length. | ||
| 1275 | * | ||
| 1276 | * A vIOMMU can allocate multiple queues, but it must use a different @index per | ||
| 1277 | * type to separate each allocation, e.g:: | ||
| 1278 | * | ||
| 1279 | * Type1 HW queue0, Type1 HW queue1, Type2 HW queue0, ... | ||
| 1280 | */ | ||
| 1281 | struct iommu_hw_queue_alloc { | ||
| 1282 | 	__u32 size; | ||
| 1283 | 	__u32 flags; | ||
| 1284 | 	__u32 viommu_id; | ||
| 1285 | 	__u32 type; | ||
| 1286 | 	__u32 index; | ||
| 1287 | 	__u32 out_hw_queue_id; | ||
| 1288 | 	__aligned_u64 nesting_parent_iova; | ||
| 1289 | 	__aligned_u64 length; | ||
| 1290 | }; | ||
| 1291 | #define IOMMU_HW_QUEUE_ALLOC _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HW_QUEUE_ALLOC) | ||
| 1017 | #endif | 1292 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ip.h+16| ... | @@ -137,6 +137,22 @@ struct ip_beet_phdr { | ... | @@ -137,6 +137,22 @@ struct ip_beet_phdr { |
| 137 | 	__u8 reserved; | 137 | 	__u8 reserved; |
| 138 | }; | 138 | }; |
| 139 | 139 | ||
| 140 | struct ip_iptfs_hdr { | ||
| 141 | 	__u8 subtype;		/* 0*: basic, 1: CC */ | ||
| 142 | 	__u8 flags; | ||
| 143 | 	__be16 block_offset; | ||
| 144 | }; | ||
| 145 | |||
| 146 | struct ip_iptfs_cc_hdr { | ||
| 147 | 	__u8 subtype;		/* 0: basic, 1*: CC */ | ||
| 148 | 	__u8 flags; | ||
| 149 | 	__be16 block_offset; | ||
| 150 | 	__be32 loss_rate; | ||
| 151 | 	__be64 rtt_adelay_xdelay; | ||
| 152 | 	__be32 tval; | ||
| 153 | 	__be32 techo; | ||
| 154 | }; | ||
| 155 | |||
| 140 | /* index values for the variables in ipv4_devconf */ | 156 | /* index values for the variables in ipv4_devconf */ |
| 141 | enum | 157 | enum |
| 142 | { | 158 | { |
lib/libc/include/any-linux-any/linux/ipsec.h+2-1| ... | @@ -14,7 +14,8 @@ enum { | ... | @@ -14,7 +14,8 @@ enum { |
| 14 | 	IPSEC_MODE_ANY		= 0,	/* We do not support this for SA */ | 14 | 	IPSEC_MODE_ANY		= 0,	/* We do not support this for SA */ |
| 15 | 	IPSEC_MODE_TRANSPORT	= 1, | 15 | 	IPSEC_MODE_TRANSPORT	= 1, |
| 16 | 	IPSEC_MODE_TUNNEL	= 2, | 16 | 	IPSEC_MODE_TUNNEL	= 2, |
| 17 | 	IPSEC_MODE_BEET = 3 | 17 | 	IPSEC_MODE_BEET = 3, |
| 18 | 	IPSEC_MODE_IPTFS = 4 | ||
| 18 | }; | 19 | }; |
| 19 | 20 | ||
| 20 | enum { | 21 | enum { |
lib/libc/include/any-linux-any/linux/ipv6.h+1| ... | @@ -199,6 +199,7 @@ enum { | ... | @@ -199,6 +199,7 @@ enum { |
| 199 | 	DEVCONF_NDISC_EVICT_NOCARRIER, | 199 | 	DEVCONF_NDISC_EVICT_NOCARRIER, |
| 200 | 	DEVCONF_ACCEPT_UNTRACKED_NA, | 200 | 	DEVCONF_ACCEPT_UNTRACKED_NA, |
| 201 | 	DEVCONF_ACCEPT_RA_MIN_LFT, | 201 | 	DEVCONF_ACCEPT_RA_MIN_LFT, |
| 202 | 	DEVCONF_FORCE_FORWARDING, | ||
| 202 | 	DEVCONF_MAX | 203 | 	DEVCONF_MAX |
| 203 | }; | 204 | }; |
| 204 | 205 |
lib/libc/include/any-linux-any/linux/isst_if.h+26| ... | @@ -375,6 +375,30 @@ struct isst_perf_level_data_info { | ... | @@ -375,6 +375,30 @@ struct isst_perf_level_data_info { |
| 375 | 	__u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]; | 375 | 	__u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]; |
| 376 | }; | 376 | }; |
| 377 | 377 | ||
| 378 | #define MAX_FABRIC_COUNT	8 | ||
| 379 | |||
| 380 | /** | ||
| 381 | * struct isst_perf_level_fabric_info - Structure to get SST-PP fabric details | ||
| 382 | * @socket_id:		Socket/package id | ||
| 383 | * @power_domain_id:	Power Domain id | ||
| 384 | * @level:		SST-PP level for which caller wants to get information | ||
| 385 | * @max_fabrics:	Count of fabrics in resonse | ||
| 386 | * @p0_fabric_freq_mhz: Fabric (Uncore) maximum frequency | ||
| 387 | * @p1_fabric_freq_mhz: Fabric (Uncore) TDP frequency | ||
| 388 | * @pm_fabric_freq_mhz: Fabric (Uncore) minimum frequency | ||
| 389 | * | ||
| 390 | * Structure used to get information on frequencies for fabrics. | ||
| 391 | */ | ||
| 392 | struct isst_perf_level_fabric_info { | ||
| 393 | 	__u8 socket_id; | ||
| 394 | 	__u8 power_domain_id; | ||
| 395 | 	__u16 level; | ||
| 396 | 	__u16 max_fabrics; | ||
| 397 | 	__u16 p0_fabric_freq_mhz[MAX_FABRIC_COUNT]; | ||
| 398 | 	__u16 p1_fabric_freq_mhz[MAX_FABRIC_COUNT]; | ||
| 399 | 	__u16 pm_fabric_freq_mhz[MAX_FABRIC_COUNT]; | ||
| 400 | }; | ||
| 401 | |||
| 378 | /** | 402 | /** |
| 379 | * struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask | 403 | * struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask |
| 380 | * @socket_id:	Socket/package id | 404 | * @socket_id:	Socket/package id |
| ... | @@ -471,5 +495,7 @@ struct isst_turbo_freq_info { | ... | @@ -471,5 +495,7 @@ struct isst_turbo_freq_info { |
| 471 | #define ISST_IF_GET_BASE_FREQ_INFO	_IOR(ISST_IF_MAGIC, 14, struct isst_base_freq_info *) | 495 | #define ISST_IF_GET_BASE_FREQ_INFO	_IOR(ISST_IF_MAGIC, 14, struct isst_base_freq_info *) |
| 472 | #define ISST_IF_GET_BASE_FREQ_CPU_MASK	_IOR(ISST_IF_MAGIC, 15, struct isst_perf_level_cpu_mask *) | 496 | #define ISST_IF_GET_BASE_FREQ_CPU_MASK	_IOR(ISST_IF_MAGIC, 15, struct isst_perf_level_cpu_mask *) |
| 473 | #define ISST_IF_GET_TURBO_FREQ_INFO	_IOR(ISST_IF_MAGIC, 16, struct isst_turbo_freq_info *) | 497 | #define ISST_IF_GET_TURBO_FREQ_INFO	_IOR(ISST_IF_MAGIC, 16, struct isst_turbo_freq_info *) |
| 498 | #define ISST_IF_GET_PERF_LEVEL_FABRIC_INFO _IOR(ISST_IF_MAGIC, 17,\ | ||
| 499 | 						struct isst_perf_level_fabric_info *) | ||
| 474 | 500 | ||
| 475 | #endif | 501 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/kexec.h+1| ... | @@ -27,6 +27,7 @@ | ... | @@ -27,6 +27,7 @@ |
| 27 | #define KEXEC_FILE_ON_CRASH	0x00000002 | 27 | #define KEXEC_FILE_ON_CRASH	0x00000002 |
| 28 | #define KEXEC_FILE_NO_INITRAMFS	0x00000004 | 28 | #define KEXEC_FILE_NO_INITRAMFS	0x00000004 |
| 29 | #define KEXEC_FILE_DEBUG	0x00000008 | 29 | #define KEXEC_FILE_DEBUG	0x00000008 |
| 30 | #define KEXEC_FILE_NO_CMA	0x00000010 | ||
| 30 | 31 | ||
| 31 | /* These values match the ELF architecture values. | 32 | /* These values match the ELF architecture values. |
| 32 | * Unless there is a good reason that should continue to be the case. | 33 | * Unless there is a good reason that should continue to be the case. |
lib/libc/include/any-linux-any/linux/kfd_ioctl.h+13-2| ... | @@ -43,9 +43,10 @@ | ... | @@ -43,9 +43,10 @@ |
| 43 | * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl | 43 | * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl |
| 44 | * - 1.16 - Add contiguous VRAM allocation flag | 44 | * - 1.16 - Add contiguous VRAM allocation flag |
| 45 | * - 1.17 - Add SDMA queue creation with target SDMA engine ID | 45 | * - 1.17 - Add SDMA queue creation with target SDMA engine ID |
| 46 | * - 1.18 - Rename pad in set_memory_policy_args to misc_process_flag | ||
| 46 | */ | 47 | */ |
| 47 | #define KFD_IOCTL_MAJOR_VERSION 1 | 48 | #define KFD_IOCTL_MAJOR_VERSION 1 |
| 48 | #define KFD_IOCTL_MINOR_VERSION 17 | 49 | #define KFD_IOCTL_MINOR_VERSION 18 |
| 49 | 50 | ||
| 50 | struct kfd_ioctl_get_version_args { | 51 | struct kfd_ioctl_get_version_args { |
| 51 | 	__u32 major_version;	/* from KFD */ | 52 | 	__u32 major_version;	/* from KFD */ |
| ... | @@ -62,6 +63,8 @@ struct kfd_ioctl_get_version_args { | ... | @@ -62,6 +63,8 @@ struct kfd_ioctl_get_version_args { |
| 62 | #define KFD_MAX_QUEUE_PERCENTAGE	100 | 63 | #define KFD_MAX_QUEUE_PERCENTAGE	100 |
| 63 | #define KFD_MAX_QUEUE_PRIORITY		15 | 64 | #define KFD_MAX_QUEUE_PRIORITY		15 |
| 64 | 65 | ||
| 66 | #define KFD_MIN_QUEUE_RING_SIZE		1024 | ||
| 67 | |||
| 65 | struct kfd_ioctl_create_queue_args { | 68 | struct kfd_ioctl_create_queue_args { |
| 66 | 	__u64 ring_base_address;	/* to KFD */ | 69 | 	__u64 ring_base_address;	/* to KFD */ |
| 67 | 	__u64 write_pointer_address;	/* from KFD */ | 70 | 	__u64 write_pointer_address;	/* from KFD */ |
| ... | @@ -148,6 +151,9 @@ struct kfd_dbg_device_info_entry { | ... | @@ -148,6 +151,9 @@ struct kfd_dbg_device_info_entry { |
| 148 | #define KFD_IOC_CACHE_POLICY_COHERENT 0 | 151 | #define KFD_IOC_CACHE_POLICY_COHERENT 0 |
| 149 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 | 152 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 |
| 150 | 153 | ||
| 154 | /* Misc. per process flags */ | ||
| 155 | #define KFD_PROC_FLAG_MFMA_HIGH_PRECISION (1 << 0) | ||
| 156 | |||
| 151 | struct kfd_ioctl_set_memory_policy_args { | 157 | struct kfd_ioctl_set_memory_policy_args { |
| 152 | 	__u64 alternate_aperture_base;	/* to KFD */ | 158 | 	__u64 alternate_aperture_base;	/* to KFD */ |
| 153 | 	__u64 alternate_aperture_size;	/* to KFD */ | 159 | 	__u64 alternate_aperture_size;	/* to KFD */ |
| ... | @@ -155,7 +161,7 @@ struct kfd_ioctl_set_memory_policy_args { | ... | @@ -155,7 +161,7 @@ struct kfd_ioctl_set_memory_policy_args { |
| 155 | 	__u32 gpu_id;			/* to KFD */ | 161 | 	__u32 gpu_id;			/* to KFD */ |
| 156 | 	__u32 default_policy;		/* to KFD */ | 162 | 	__u32 default_policy;		/* to KFD */ |
| 157 | 	__u32 alternate_policy;		/* to KFD */ | 163 | 	__u32 alternate_policy;		/* to KFD */ |
| 158 | 	__u32 pad; | 164 | 	__u32 misc_process_flag; /* to KFD */ |
| 159 | }; | 165 | }; |
| 160 | 166 | ||
| 161 | /* | 167 | /* |
| ... | @@ -530,6 +536,8 @@ enum kfd_smi_event { | ... | @@ -530,6 +536,8 @@ enum kfd_smi_event { |
| 530 | 	KFD_SMI_EVENT_QUEUE_EVICTION = 9, | 536 | 	KFD_SMI_EVENT_QUEUE_EVICTION = 9, |
| 531 | 	KFD_SMI_EVENT_QUEUE_RESTORE = 10, | 537 | 	KFD_SMI_EVENT_QUEUE_RESTORE = 10, |
| 532 | 	KFD_SMI_EVENT_UNMAP_FROM_GPU = 11, | 538 | 	KFD_SMI_EVENT_UNMAP_FROM_GPU = 11, |
| 539 | 	KFD_SMI_EVENT_PROCESS_START = 12, | ||
| 540 | 	KFD_SMI_EVENT_PROCESS_END = 13, | ||
| 533 | 541 | ||
| 534 | 	/* | 542 | 	/* |
| 535 | 	 * max event number, as a flag bit to get events from all processes, | 543 | 	 * max event number, as a flag bit to get events from all processes, |
| ... | @@ -645,6 +653,9 @@ struct kfd_ioctl_smi_events_args { | ... | @@ -645,6 +653,9 @@ struct kfd_ioctl_smi_events_args { |
| 645 | 		"%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\ | 653 | 		"%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\ |
| 646 | 		(node), (unmap_trigger) | 654 | 		(node), (unmap_trigger) |
| 647 | 655 | ||
| 656 | #define KFD_EVENT_FMT_PROCESS(pid, task_name)\ | ||
| 657 | 		"%x %s\n", (pid), (task_name) | ||
| 658 | |||
| 648 | /************************************************************************************************** | 659 | /************************************************************************************************** |
| 649 | * CRIU IOCTLs (Checkpoint Restore In Userspace) | 660 | * CRIU IOCTLs (Checkpoint Restore In Userspace) |
| 650 | * | 661 | * |
lib/libc/include/any-linux-any/linux/kfd_sysfs.h+3| ... | @@ -63,6 +63,9 @@ | ... | @@ -63,6 +63,9 @@ |
| 63 | #define HSA_CAP_PER_QUEUE_RESET_SUPPORTED			0x80000000 | 63 | #define HSA_CAP_PER_QUEUE_RESET_SUPPORTED			0x80000000 |
| 64 | #define HSA_CAP_RESERVED					0x000f8000 | 64 | #define HSA_CAP_RESERVED					0x000f8000 |
| 65 | 65 | ||
| 66 | #define HSA_CAP2_PER_SDMA_QUEUE_RESET_SUPPORTED			0x00000001 | ||
| 67 | #define HSA_CAP2_RESERVED					0xfffffffe | ||
| 68 | |||
| 66 | /* debug_prop bits in node properties */ | 69 | /* debug_prop bits in node properties */ |
| 67 | #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f | 70 | #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f |
| 68 | #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_SHIFT 0 | 71 | #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_SHIFT 0 |
lib/libc/include/any-linux-any/linux/kvm.h+37-4| ... | @@ -178,6 +178,7 @@ struct kvm_xen_exit { | ... | @@ -178,6 +178,7 @@ struct kvm_xen_exit { |
| 178 | #define KVM_EXIT_NOTIFY 37 | 178 | #define KVM_EXIT_NOTIFY 37 |
| 179 | #define KVM_EXIT_LOONGARCH_IOCSR 38 | 179 | #define KVM_EXIT_LOONGARCH_IOCSR 38 |
| 180 | #define KVM_EXIT_MEMORY_FAULT 39 | 180 | #define KVM_EXIT_MEMORY_FAULT 39 |
| 181 | #define KVM_EXIT_TDX 40 | ||
| 181 | 182 | ||
| 182 | /* For KVM_EXIT_INTERNAL_ERROR */ | 183 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 183 | /* Emulate instruction failed. */ | 184 | /* Emulate instruction failed. */ |
| ... | @@ -369,6 +370,7 @@ struct kvm_run { | ... | @@ -369,6 +370,7 @@ struct kvm_run { |
| 369 | #define KVM_SYSTEM_EVENT_WAKEUP 4 | 370 | #define KVM_SYSTEM_EVENT_WAKEUP 4 |
| 370 | #define KVM_SYSTEM_EVENT_SUSPEND 5 | 371 | #define KVM_SYSTEM_EVENT_SUSPEND 5 |
| 371 | #define KVM_SYSTEM_EVENT_SEV_TERM 6 | 372 | #define KVM_SYSTEM_EVENT_SEV_TERM 6 |
| 373 | #define KVM_SYSTEM_EVENT_TDX_FATAL 7 | ||
| 372 | 			__u32 type; | 374 | 			__u32 type; |
| 373 | 			__u32 ndata; | 375 | 			__u32 ndata; |
| 374 | 			union { | 376 | 			union { |
| ... | @@ -438,6 +440,31 @@ struct kvm_run { | ... | @@ -438,6 +440,31 @@ struct kvm_run { |
| 438 | 			__u64 gpa; | 440 | 			__u64 gpa; |
| 439 | 			__u64 size; | 441 | 			__u64 size; |
| 440 | 		} memory_fault; | 442 | 		} memory_fault; |
| 443 | 		/* KVM_EXIT_TDX */ | ||
| 444 | 		struct { | ||
| 445 | 			__u64 flags; | ||
| 446 | 			__u64 nr; | ||
| 447 | 			union { | ||
| 448 | 				struct { | ||
| 449 | 					__u64 ret; | ||
| 450 | 					__u64 data[5]; | ||
| 451 | 				} unknown; | ||
| 452 | 				struct { | ||
| 453 | 					__u64 ret; | ||
| 454 | 					__u64 gpa; | ||
| 455 | 					__u64 size; | ||
| 456 | 				} get_quote; | ||
| 457 | 				struct { | ||
| 458 | 					__u64 ret; | ||
| 459 | 					__u64 leaf; | ||
| 460 | 					__u64 r11, r12, r13, r14; | ||
| 461 | 				} get_tdvmcall_info; | ||
| 462 | 				struct { | ||
| 463 | 					__u64 ret; | ||
| 464 | 					__u64 vector; | ||
| 465 | 				} setup_event_notify; | ||
| 466 | 			}; | ||
| 467 | 		} tdx; | ||
| 441 | 		/* Fix the size of the union. */ | 468 | 		/* Fix the size of the union. */ |
| 442 | 		char padding[256]; | 469 | 		char padding[256]; |
| 443 | 	}; | 470 | 	}; |
| ... | @@ -609,10 +636,7 @@ struct kvm_ioeventfd { | ... | @@ -609,10 +636,7 @@ struct kvm_ioeventfd { |
| 609 | #define KVM_X86_DISABLE_EXITS_HLT (1 << 1) | 636 | #define KVM_X86_DISABLE_EXITS_HLT (1 << 1) |
| 610 | #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) | 637 | #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) |
| 611 | #define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3) | 638 | #define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3) |
| 612 | #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ | 639 | #define KVM_X86_DISABLE_EXITS_APERFMPERF (1 << 4) |
| 613 | KVM_X86_DISABLE_EXITS_HLT | \ | ||
| 614 | KVM_X86_DISABLE_EXITS_PAUSE | \ | ||
| 615 | KVM_X86_DISABLE_EXITS_CSTATE) | ||
| 616 | 640 | ||
| 617 | /* for KVM_ENABLE_CAP */ | 641 | /* for KVM_ENABLE_CAP */ |
| 618 | struct kvm_enable_cap { | 642 | struct kvm_enable_cap { |
| ... | @@ -925,6 +949,11 @@ struct kvm_enable_cap { | ... | @@ -925,6 +949,11 @@ struct kvm_enable_cap { |
| 925 | #define KVM_CAP_PRE_FAULT_MEMORY 236 | 949 | #define KVM_CAP_PRE_FAULT_MEMORY 236 |
| 926 | #define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237 | 950 | #define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237 |
| 927 | #define KVM_CAP_X86_GUEST_MODE 238 | 951 | #define KVM_CAP_X86_GUEST_MODE 238 |
| 952 | #define KVM_CAP_ARM_WRITABLE_IMP_ID_REGS 239 | ||
| 953 | #define KVM_CAP_ARM_EL2 240 | ||
| 954 | #define KVM_CAP_ARM_EL2_E2H0 241 | ||
| 955 | #define KVM_CAP_RISCV_MP_STATE_RESET 242 | ||
| 956 | #define KVM_CAP_ARM_CACHEABLE_PFNMAP_SUPPORTED 243 | ||
| 928 | 957 | ||
| 929 | struct kvm_irq_routing_irqchip { | 958 | struct kvm_irq_routing_irqchip { |
| 930 | 	__u32 irqchip; | 959 | 	__u32 irqchip; |
| ... | @@ -1062,6 +1091,10 @@ struct kvm_dirty_tlb { | ... | @@ -1062,6 +1091,10 @@ struct kvm_dirty_tlb { |
| 1062 | 1091 | ||
| 1063 | #define KVM_REG_SIZE_SHIFT	52 | 1092 | #define KVM_REG_SIZE_SHIFT	52 |
| 1064 | #define KVM_REG_SIZE_MASK	0x00f0000000000000ULL | 1093 | #define KVM_REG_SIZE_MASK	0x00f0000000000000ULL |
| 1094 | |||
| 1095 | #define KVM_REG_SIZE(id)		\ | ||
| 1096 | 	(1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) | ||
| 1097 | |||
| 1065 | #define KVM_REG_SIZE_U8		0x0000000000000000ULL | 1098 | #define KVM_REG_SIZE_U8		0x0000000000000000ULL |
| 1066 | #define KVM_REG_SIZE_U16	0x0010000000000000ULL | 1099 | #define KVM_REG_SIZE_U16	0x0010000000000000ULL |
| 1067 | #define KVM_REG_SIZE_U32	0x0020000000000000ULL | 1100 | #define KVM_REG_SIZE_U32	0x0020000000000000ULL |
lib/libc/include/any-linux-any/linux/landlock.h+72-6| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | * | 4 | * |
| 5 | * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net> | 5 | * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net> |
| 6 | * Copyright © 2018-2020 ANSSI | 6 | * Copyright © 2018-2020 ANSSI |
| 7 | * Copyright © 2021-2025 Microsoft Corporation | ||
| 7 | */ | 8 | */ |
| 8 | 9 | ||
| 9 | #ifndef _LINUX_LANDLOCK_H | 10 | #ifndef _LINUX_LANDLOCK_H |
| ... | @@ -52,14 +53,75 @@ struct landlock_ruleset_attr { | ... | @@ -52,14 +53,75 @@ struct landlock_ruleset_attr { |
| 52 | 	__u64 scoped; | 53 | 	__u64 scoped; |
| 53 | }; | 54 | }; |
| 54 | 55 | ||
| 55 | /* | 56 | /** |
| 56 | * sys_landlock_create_ruleset() flags: | 57 | * DOC: landlock_create_ruleset_flags |
| 58 | * | ||
| 59 | * **Flags** | ||
| 57 | * | 60 | * |
| 58 | * - %LANDLOCK_CREATE_RULESET_VERSION: Get the highest supported Landlock ABI | 61 | * %LANDLOCK_CREATE_RULESET_VERSION |
| 59 | * version. | 62 | * Get the highest supported Landlock ABI version (starting at 1). |
| 63 | * | ||
| 64 | * %LANDLOCK_CREATE_RULESET_ERRATA | ||
| 65 | * Get a bitmask of fixed issues for the current Landlock ABI version. | ||
| 60 | */ | 66 | */ |
| 61 | /* clang-format off */ | 67 | /* clang-format off */ |
| 62 | #define LANDLOCK_CREATE_RULESET_VERSION			(1U << 0) | 68 | #define LANDLOCK_CREATE_RULESET_VERSION			(1U << 0) |
| 69 | #define LANDLOCK_CREATE_RULESET_ERRATA			(1U << 1) | ||
| 70 | /* clang-format on */ | ||
| 71 | |||
| 72 | /** | ||
| 73 | * DOC: landlock_restrict_self_flags | ||
| 74 | * | ||
| 75 | * **Flags** | ||
| 76 | * | ||
| 77 | * By default, denied accesses originating from programs that sandbox themselves | ||
| 78 | * are logged via the audit subsystem. Such events typically indicate unexpected | ||
| 79 | * behavior, such as bugs or exploitation attempts. However, to avoid excessive | ||
| 80 | * logging, access requests denied by a domain not created by the originating | ||
| 81 | * program are not logged by default. The rationale is that programs should know | ||
| 82 | * their own behavior, but not necessarily the behavior of other programs. This | ||
| 83 | * default configuration is suitable for most programs that sandbox themselves. | ||
| 84 | * For specific use cases, the following flags allow programs to modify this | ||
| 85 | * default logging behavior. | ||
| 86 | * | ||
| 87 | * The %LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF and | ||
| 88 | * %LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON flags apply to the newly created | ||
| 89 | * Landlock domain. | ||
| 90 | * | ||
| 91 | * %LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF | ||
| 92 | * Disables logging of denied accesses originating from the thread creating | ||
| 93 | * the Landlock domain, as well as its children, as long as they continue | ||
| 94 | * running the same executable code (i.e., without an intervening | ||
| 95 | * :manpage:`execve(2)` call). This is intended for programs that execute | ||
| 96 | * unknown code without invoking :manpage:`execve(2)`, such as script | ||
| 97 | * interpreters. Programs that only sandbox themselves should not set this | ||
| 98 | * flag, so users can be notified of unauthorized access attempts via system | ||
| 99 | * logs. | ||
| 100 | * | ||
| 101 | * %LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON | ||
| 102 | * Enables logging of denied accesses after an :manpage:`execve(2)` call, | ||
| 103 | * providing visibility into unauthorized access attempts by newly executed | ||
| 104 | * programs within the created Landlock domain. This flag is recommended | ||
| 105 | * only when all potential executables in the domain are expected to comply | ||
| 106 | * with the access restrictions, as excessive audit log entries could make | ||
| 107 | * it more difficult to identify critical events. | ||
| 108 | * | ||
| 109 | * %LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF | ||
| 110 | * Disables logging of denied accesses originating from nested Landlock | ||
| 111 | * domains created by the caller or its descendants. This flag should be set | ||
| 112 | * according to runtime configuration, not hardcoded, to avoid suppressing | ||
| 113 | * important security events. It is useful for container runtimes or | ||
| 114 | * sandboxing tools that may launch programs which themselves create | ||
| 115 | * Landlock domains and could otherwise generate excessive logs. Unlike | ||
| 116 | * ``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``, this flag only affects | ||
| 117 | * future nested domains, not the one being created. It can also be used | ||
| 118 | * with a @ruleset_fd value of -1 to mute subdomain logs without creating a | ||
| 119 | * domain. | ||
| 120 | */ | ||
| 121 | /* clang-format off */ | ||
| 122 | #define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF		(1U << 0) | ||
| 123 | #define LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON			(1U << 1) | ||
| 124 | #define LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF		(1U << 2) | ||
| 63 | /* clang-format on */ | 125 | /* clang-format on */ |
| 64 | 126 | ||
| 65 | /** | 127 | /** |
| ... | @@ -268,7 +330,9 @@ struct landlock_net_port_attr { | ... | @@ -268,7 +330,9 @@ struct landlock_net_port_attr { |
| 268 | * ~~~~~~~~~~~~~~~~ | 330 | * ~~~~~~~~~~~~~~~~ |
| 269 | * | 331 | * |
| 270 | * These flags enable to restrict a sandboxed process to a set of network | 332 | * These flags enable to restrict a sandboxed process to a set of network |
| 271 | * actions. This is supported since the Landlock ABI version 4. | 333 | * actions. |
| 334 | * | ||
| 335 | * This is supported since Landlock ABI version 4. | ||
| 272 | * | 336 | * |
| 273 | * The following access rights apply to TCP port numbers: | 337 | * The following access rights apply to TCP port numbers: |
| 274 | * | 338 | * |
| ... | @@ -291,11 +355,13 @@ struct landlock_net_port_attr { | ... | @@ -291,11 +355,13 @@ struct landlock_net_port_attr { |
| 291 | * Setting a flag for a ruleset will isolate the Landlock domain to forbid | 355 | * Setting a flag for a ruleset will isolate the Landlock domain to forbid |
| 292 | * connections to resources outside the domain. | 356 | * connections to resources outside the domain. |
| 293 | * | 357 | * |
| 358 | * This is supported since Landlock ABI version 6. | ||
| 359 | * | ||
| 294 | * Scopes: | 360 | * Scopes: |
| 295 | * | 361 | * |
| 296 | * - %LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET: Restrict a sandboxed process from | 362 | * - %LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET: Restrict a sandboxed process from |
| 297 | * connecting to an abstract UNIX socket created by a process outside the | 363 | * connecting to an abstract UNIX socket created by a process outside the |
| 298 | * related Landlock domain (e.g. a parent domain or a non-sandboxed process). | 364 | * related Landlock domain (e.g., a parent domain or a non-sandboxed process). |
| 299 | * - %LANDLOCK_SCOPE_SIGNAL: Restrict a sandboxed process from sending a signal | 365 | * - %LANDLOCK_SCOPE_SIGNAL: Restrict a sandboxed process from sending a signal |
| 300 | * to another process outside the domain. | 366 | * to another process outside the domain. |
| 301 | */ | 367 | */ |
lib/libc/include/any-linux-any/linux/lockd_netlink.h created+29| ... | @@ -0,0 +1,29 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /*	Documentation/netlink/specs/lockd.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_LOCKD_NETLINK_H | ||
| 7 | #define _LINUX_LOCKD_NETLINK_H | ||
| 8 | |||
| 9 | #define LOCKD_FAMILY_NAME	"lockd" | ||
| 10 | #define LOCKD_FAMILY_VERSION	1 | ||
| 11 | |||
| 12 | enum { | ||
| 13 | 	LOCKD_A_SERVER_GRACETIME = 1, | ||
| 14 | 	LOCKD_A_SERVER_TCP_PORT, | ||
| 15 | 	LOCKD_A_SERVER_UDP_PORT, | ||
| 16 | |||
| 17 | 	__LOCKD_A_SERVER_MAX, | ||
| 18 | 	LOCKD_A_SERVER_MAX = (__LOCKD_A_SERVER_MAX - 1) | ||
| 19 | }; | ||
| 20 | |||
| 21 | enum { | ||
| 22 | 	LOCKD_CMD_SERVER_SET = 1, | ||
| 23 | 	LOCKD_CMD_SERVER_GET, | ||
| 24 | |||
| 25 | 	__LOCKD_CMD_MAX, | ||
| 26 | 	LOCKD_CMD_MAX = (__LOCKD_CMD_MAX - 1) | ||
| 27 | }; | ||
| 28 | |||
| 29 | #endif /* _LINUX_LOCKD_NETLINK_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/mctp.h+8| ... | @@ -37,6 +37,14 @@ struct sockaddr_mctp_ext { | ... | @@ -37,6 +37,14 @@ struct sockaddr_mctp_ext { |
| 37 | 	__u8			smctp_haddr[MAX_ADDR_LEN]; | 37 | 	__u8			smctp_haddr[MAX_ADDR_LEN]; |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | /* A "fully qualified" MCTP address, which includes the system-local network ID, | ||
| 41 | * required to uniquely resolve a routable EID. | ||
| 42 | */ | ||
| 43 | struct mctp_fq_addr { | ||
| 44 | 	unsigned int	net; | ||
| 45 | 	mctp_eid_t	eid; | ||
| 46 | }; | ||
| 47 | |||
| 40 | #define MCTP_NET_ANY		0x0 | 48 | #define MCTP_NET_ANY		0x0 |
| 41 | 49 | ||
| 42 | #define MCTP_ADDR_NULL		0x00 | 50 | #define MCTP_ADDR_NULL		0x00 |
lib/libc/include/any-linux-any/linux/mdio.h+1| ... | @@ -125,6 +125,7 @@ | ... | @@ -125,6 +125,7 @@ |
| 125 | #define MDIO_STAT1_LPOWERABLE		0x0002	/* Low-power ability */ | 125 | #define MDIO_STAT1_LPOWERABLE		0x0002	/* Low-power ability */ |
| 126 | #define MDIO_STAT1_LSTATUS		BMSR_LSTATUS | 126 | #define MDIO_STAT1_LSTATUS		BMSR_LSTATUS |
| 127 | #define MDIO_STAT1_FAULT		0x0080	/* Fault */ | 127 | #define MDIO_STAT1_FAULT		0x0080	/* Fault */ |
| 128 | #define MDIO_PCS_STAT1_CLKSTOP_CAP	0x0040 | ||
| 128 | #define MDIO_AN_STAT1_LPABLE		0x0001	/* Link partner AN ability */ | 129 | #define MDIO_AN_STAT1_LPABLE		0x0001	/* Link partner AN ability */ |
| 129 | #define MDIO_AN_STAT1_ABLE		BMSR_ANEGCAPABLE | 130 | #define MDIO_AN_STAT1_ABLE		BMSR_ANEGCAPABLE |
| 130 | #define MDIO_AN_STAT1_RFAULT		BMSR_RFAULT | 131 | #define MDIO_AN_STAT1_RFAULT		BMSR_RFAULT |
lib/libc/include/any-linux-any/linux/media/amlogic/c3-isp-config.h created+564| ... | @@ -0,0 +1,564 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2024 Amlogic, Inc. All rights reserved | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _C3_ISP_CONFIG_H_ | ||
| 7 | #define _C3_ISP_CONFIG_H_ | ||
| 8 | |||
| 9 | #include <linux/types.h> | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Frames are split into zones of almost equal width and height - a zone is a | ||
| 13 | * rectangular tile of a frame. The metering blocks within the ISP collect | ||
| 14 | * aggregated statistics per zone. | ||
| 15 | */ | ||
| 16 | #define C3_ISP_AE_MAX_ZONES (17 * 15) | ||
| 17 | #define C3_ISP_AF_MAX_ZONES (17 * 15) | ||
| 18 | #define C3_ISP_AWB_MAX_ZONES (32 * 24) | ||
| 19 | |||
| 20 | /* The maximum number of point on the diagonal of the frame for statistics */ | ||
| 21 | #define C3_ISP_AE_MAX_PT_NUM 18 | ||
| 22 | #define C3_ISP_AF_MAX_PT_NUM 18 | ||
| 23 | #define C3_ISP_AWB_MAX_PT_NUM 33 | ||
| 24 | |||
| 25 | /** | ||
| 26 | * struct c3_isp_awb_zone_stats - AWB statistics of a zone | ||
| 27 | * | ||
| 28 | * AWB zone stats is aligned with 8 bytes | ||
| 29 | * | ||
| 30 | * @rg: the ratio of R / G in a zone | ||
| 31 | * @bg: the ratio of B / G in a zone | ||
| 32 | * @pixel_sum: the total number of pixels used in a zone | ||
| 33 | */ | ||
| 34 | struct c3_isp_awb_zone_stats { | ||
| 35 | 	__u16 rg; | ||
| 36 | 	__u16 bg; | ||
| 37 | 	__u32 pixel_sum; | ||
| 38 | }; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * struct c3_isp_awb_stats - Auto white balance statistics information. | ||
| 42 | * | ||
| 43 | * AWB statistical information of all zones. | ||
| 44 | * | ||
| 45 | * @stats: array of auto white balance statistics | ||
| 46 | */ | ||
| 47 | struct c3_isp_awb_stats { | ||
| 48 | 	struct c3_isp_awb_zone_stats stats[C3_ISP_AWB_MAX_ZONES]; | ||
| 49 | } __attribute__((aligned(16))); | ||
| 50 | |||
| 51 | /** | ||
| 52 | * struct c3_isp_ae_zone_stats - AE statistics of a zone | ||
| 53 | * | ||
| 54 | * AE zone stats is aligned with 8 bytes. | ||
| 55 | * This is a 5-bin histogram and the total sum is normalized to 0xffff. | ||
| 56 | * So hist2 = 0xffff - (hist0 + hist1 + hist3 + hist4) | ||
| 57 | * | ||
| 58 | * @hist0: the global normalized pixel count for bin 0 | ||
| 59 | * @hist1: the global normalized pixel count for bin 1 | ||
| 60 | * @hist3: the global normalized pixel count for bin 3 | ||
| 61 | * @hist4: the global normalized pixel count for bin 4 | ||
| 62 | */ | ||
| 63 | struct c3_isp_ae_zone_stats { | ||
| 64 | 	__u16 hist0; | ||
| 65 | 	__u16 hist1; | ||
| 66 | 	__u16 hist3; | ||
| 67 | 	__u16 hist4; | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * struct c3_isp_ae_stats - Exposure statistics information | ||
| 72 | * | ||
| 73 | * AE statistical information consists of all blocks information and a 1024-bin | ||
| 74 | * histogram. | ||
| 75 | * | ||
| 76 | * @stats: array of auto exposure block statistics | ||
| 77 | * @reserved: undefined buffer space | ||
| 78 | * @hist: a 1024-bin histogram for the entire image | ||
| 79 | */ | ||
| 80 | struct c3_isp_ae_stats { | ||
| 81 | 	struct c3_isp_ae_zone_stats stats[C3_ISP_AE_MAX_ZONES]; | ||
| 82 | 	__u32 reserved[2]; | ||
| 83 | 	__u32 hist[1024]; | ||
| 84 | } __attribute__((aligned(16))); | ||
| 85 | |||
| 86 | /** | ||
| 87 | * struct c3_isp_af_zone_stats - AF statistics of a zone | ||
| 88 | * | ||
| 89 | * AF zone stats is aligned with 8 bytes. | ||
| 90 | * The zonal accumulated contrast metrics are stored in floating point format | ||
| 91 | * with 16 bits mantissa and 5 or 6 bits exponent. Apart from contrast metrics | ||
| 92 | * we accumulate squared image and quartic image data over the zone. | ||
| 93 | * | ||
| 94 | * @i2_mat: the mantissa of zonal squared image pixel sum | ||
| 95 | * @i4_mat: the mantissa of zonal quartic image pixel sum | ||
| 96 | * @e4_mat: the mantissa of zonal multi-directional quartic edge sum | ||
| 97 | * @e4_exp: the exponent of zonal multi-directional quartic edge sum | ||
| 98 | * @i2_exp: the exponent of zonal squared image pixel sum | ||
| 99 | * @i4_exp: the exponent of zonal quartic image pixel sum | ||
| 100 | */ | ||
| 101 | struct c3_isp_af_zone_stats { | ||
| 102 | 	__u16 i2_mat; | ||
| 103 | 	__u16 i4_mat; | ||
| 104 | 	__u16 e4_mat; | ||
| 105 | 	__u16 e4_exp : 5; | ||
| 106 | 	__u16 i2_exp : 5; | ||
| 107 | 	__u16 i4_exp : 6; | ||
| 108 | }; | ||
| 109 | |||
| 110 | /** | ||
| 111 | * struct c3_isp_af_stats - Auto Focus statistics information | ||
| 112 | * | ||
| 113 | * AF statistical information of each zone | ||
| 114 | * | ||
| 115 | * @stats: array of auto focus block statistics | ||
| 116 | * @reserved: undefined buffer space | ||
| 117 | */ | ||
| 118 | struct c3_isp_af_stats { | ||
| 119 | 	struct c3_isp_af_zone_stats stats[C3_ISP_AF_MAX_ZONES]; | ||
| 120 | 	__u32 reserved[2]; | ||
| 121 | } __attribute__((aligned(16))); | ||
| 122 | |||
| 123 | /** | ||
| 124 | * struct c3_isp_stats_info - V4L2_META_FMT_C3ISP_STATS | ||
| 125 | * | ||
| 126 | * Contains ISP statistics | ||
| 127 | * | ||
| 128 | * @awb: auto white balance stats | ||
| 129 | * @ae: auto exposure stats | ||
| 130 | * @af: auto focus stats | ||
| 131 | */ | ||
| 132 | struct c3_isp_stats_info { | ||
| 133 | 	struct c3_isp_awb_stats awb; | ||
| 134 | 	struct c3_isp_ae_stats ae; | ||
| 135 | 	struct c3_isp_af_stats af; | ||
| 136 | }; | ||
| 137 | |||
| 138 | /** | ||
| 139 | * enum c3_isp_params_buffer_version - C3 ISP parameters block versioning | ||
| 140 | * | ||
| 141 | * @C3_ISP_PARAMS_BUFFER_V0: First version of C3 ISP parameters block | ||
| 142 | */ | ||
| 143 | enum c3_isp_params_buffer_version { | ||
| 144 | 	C3_ISP_PARAMS_BUFFER_V0, | ||
| 145 | }; | ||
| 146 | |||
| 147 | /** | ||
| 148 | * enum c3_isp_params_block_type - Enumeration of C3 ISP parameter blocks | ||
| 149 | * | ||
| 150 | * Each block configures a specific processing block of the C3 ISP. | ||
| 151 | * The block type allows the driver to correctly interpret the parameters block | ||
| 152 | * data. | ||
| 153 | * | ||
| 154 | * @C3_ISP_PARAMS_BLOCK_AWB_GAINS: White balance gains | ||
| 155 | * @C3_ISP_PARAMS_BLOCK_AWB_CONFIG: AWB statistic format configuration for all | ||
| 156 | * blocks that control how stats are generated | ||
| 157 | * @C3_ISP_PARAMS_BLOCK_AE_CONFIG: AE statistic format configuration for all | ||
| 158 | * blocks that control how stats are generated | ||
| 159 | * @C3_ISP_PARAMS_BLOCK_AF_CONFIG: AF statistic format configuration for all | ||
| 160 | * blocks that control how stats are generated | ||
| 161 | * @C3_ISP_PARAMS_BLOCK_PST_GAMMA: post gamma parameters | ||
| 162 | * @C3_ISP_PARAMS_BLOCK_CCM: Color correction matrix parameters | ||
| 163 | * @C3_ISP_PARAMS_BLOCK_CSC: Color space conversion parameters | ||
| 164 | * @C3_ISP_PARAMS_BLOCK_BLC: Black level correction parameters | ||
| 165 | * @C3_ISP_PARAMS_BLOCK_SENTINEL: First non-valid block index | ||
| 166 | */ | ||
| 167 | enum c3_isp_params_block_type { | ||
| 168 | 	C3_ISP_PARAMS_BLOCK_AWB_GAINS, | ||
| 169 | 	C3_ISP_PARAMS_BLOCK_AWB_CONFIG, | ||
| 170 | 	C3_ISP_PARAMS_BLOCK_AE_CONFIG, | ||
| 171 | 	C3_ISP_PARAMS_BLOCK_AF_CONFIG, | ||
| 172 | 	C3_ISP_PARAMS_BLOCK_PST_GAMMA, | ||
| 173 | 	C3_ISP_PARAMS_BLOCK_CCM, | ||
| 174 | 	C3_ISP_PARAMS_BLOCK_CSC, | ||
| 175 | 	C3_ISP_PARAMS_BLOCK_BLC, | ||
| 176 | 	C3_ISP_PARAMS_BLOCK_SENTINEL | ||
| 177 | }; | ||
| 178 | |||
| 179 | #define C3_ISP_PARAMS_BLOCK_FL_DISABLE (1U << 0) | ||
| 180 | #define C3_ISP_PARAMS_BLOCK_FL_ENABLE (1U << 1) | ||
| 181 | |||
| 182 | /** | ||
| 183 | * struct c3_isp_params_block_header - C3 ISP parameter block header | ||
| 184 | * | ||
| 185 | * This structure represents the common part of all the ISP configuration | ||
| 186 | * blocks. Each parameters block shall embed an instance of this structure type | ||
| 187 | * as its first member, followed by the block-specific configuration data. The | ||
| 188 | * driver inspects this common header to discern the block type and its size and | ||
| 189 | * properly handle the block content by casting it to the correct block-specific | ||
| 190 | * type. | ||
| 191 | * | ||
| 192 | * The @type field is one of the values enumerated by | ||
| 193 | * :c:type:`c3_isp_params_block_type` and specifies how the data should be | ||
| 194 | * interpreted by the driver. The @size field specifies the size of the | ||
| 195 | * parameters block and is used by the driver for validation purposes. The | ||
| 196 | * @flags field is a bitmask of per-block flags C3_ISP_PARAMS_FL*. | ||
| 197 | * | ||
| 198 | * When userspace wants to disable an ISP block the | ||
| 199 | * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit should be set in the @flags field. In | ||
| 200 | * this case userspace may optionally omit the remainder of the configuration | ||
| 201 | * block, which will be ignored by the driver. | ||
| 202 | * | ||
| 203 | * When a new configuration of an ISP block needs to be applied userspace | ||
| 204 | * shall fully populate the ISP block and omit setting the | ||
| 205 | * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit in the @flags field. | ||
| 206 | * | ||
| 207 | * Userspace is responsible for correctly populating the parameters block header | ||
| 208 | * fields (@type, @flags and @size) and the block-specific parameters. | ||
| 209 | * | ||
| 210 | * For example: | ||
| 211 | * | ||
| 212 | * .. code-block:: c | ||
| 213 | * | ||
| 214 | *	void populate_pst_gamma(struct c3_isp_params_block_header *block) { | ||
| 215 | *		struct c3_isp_params_pst_gamma *gamma = | ||
| 216 | *			(struct c3_isp_params_pst_gamma *)block; | ||
| 217 | * | ||
| 218 | *		gamma->header.type = C3_ISP_PARAMS_BLOCK_PST_GAMMA; | ||
| 219 | *		gamma->header.flags = C3_ISP_PARAMS_BLOCK_FL_ENABLE; | ||
| 220 | *		gamma->header.size = sizeof(*gamma); | ||
| 221 | * | ||
| 222 | *		for (unsigned int i = 0; i < 129; i++) | ||
| 223 | *			gamma->pst_gamma_lut[i] = i; | ||
| 224 | *	} | ||
| 225 | * | ||
| 226 | * @type: The parameters block type from :c:type:`c3_isp_params_block_type` | ||
| 227 | * @flags: A bitmask of block flags | ||
| 228 | * @size: Size (in bytes) of the parameters block, including this header | ||
| 229 | */ | ||
| 230 | struct c3_isp_params_block_header { | ||
| 231 | 	__u16 type; | ||
| 232 | 	__u16 flags; | ||
| 233 | 	__u32 size; | ||
| 234 | }; | ||
| 235 | |||
| 236 | /** | ||
| 237 | * struct c3_isp_params_awb_gains - Gains for auto-white balance | ||
| 238 | * | ||
| 239 | * This struct allows users to configure the gains for white balance. | ||
| 240 | * There are four gain settings corresponding to each colour channel in | ||
| 241 | * the bayer domain. All of the gains are stored in Q4.8 format. | ||
| 242 | * | ||
| 243 | * header.type should be set to C3_ISP_PARAMS_BLOCK_AWB_GAINS | ||
| 244 | * from :c:type:`c3_isp_params_block_type` | ||
| 245 | * | ||
| 246 | * @header: The C3 ISP parameters block header | ||
| 247 | * @gr_gain: Multiplier for Gr channel (Q4.8 format) | ||
| 248 | * @r_gain: Multiplier for R channel (Q4.8 format) | ||
| 249 | * @b_gain: Multiplier for B channel (Q4.8 format) | ||
| 250 | * @gb_gain: Multiplier for Gb channel (Q4.8 format) | ||
| 251 | */ | ||
| 252 | struct c3_isp_params_awb_gains { | ||
| 253 | 	struct c3_isp_params_block_header header; | ||
| 254 | 	__u16 gr_gain; | ||
| 255 | 	__u16 r_gain; | ||
| 256 | 	__u16 b_gain; | ||
| 257 | 	__u16 gb_gain; | ||
| 258 | } __attribute__((aligned(8))); | ||
| 259 | |||
| 260 | /** | ||
| 261 | * enum c3_isp_params_awb_tap_points - Tap points for the AWB statistics | ||
| 262 | * @C3_ISP_AWB_STATS_TAP_OFE: immediately after the optical frontend block | ||
| 263 | * @C3_ISP_AWB_STATS_TAP_GE: immediately after the green equal block | ||
| 264 | * @C3_ISP_AWB_STATS_TAP_BEFORE_WB: immediately before the white balance block | ||
| 265 | * @C3_ISP_AWB_STATS_TAP_AFTER_WB: immediately after the white balance block | ||
| 266 | */ | ||
| 267 | enum c3_isp_params_awb_tap_points { | ||
| 268 | 	C3_ISP_AWB_STATS_TAP_OFE = 0, | ||
| 269 | 	C3_ISP_AWB_STATS_TAP_GE, | ||
| 270 | 	C3_ISP_AWB_STATS_TAP_BEFORE_WB, | ||
| 271 | 	C3_ISP_AWB_STATS_TAP_AFTER_WB, | ||
| 272 | }; | ||
| 273 | |||
| 274 | /** | ||
| 275 | * struct c3_isp_params_awb_config - Stats settings for auto-white balance | ||
| 276 | * | ||
| 277 | * This struct allows the configuration of the statistics generated for auto | ||
| 278 | * white balance. | ||
| 279 | * | ||
| 280 | * header.type should be set to C3_ISP_PARAMS_BLOCK_AWB_CONFIG | ||
| 281 | * from :c:type:`c3_isp_params_block_type` | ||
| 282 | * | ||
| 283 | * @header: the C3 ISP parameters block header | ||
| 284 | * @tap_point: the tap point from enum c3_isp_params_awb_tap_point | ||
| 285 | * @satur_vald: AWB statistic over saturation control | ||
| 286 | *		value: 0: disable, 1: enable | ||
| 287 | * @horiz_zones_num: active number of hotizontal zones [0..32] | ||
| 288 | * @vert_zones_num: active number of vertical zones [0..24] | ||
| 289 | * @rg_min: minimum R/G ratio (Q4.8 format) | ||
| 290 | * @rg_max: maximum R/G ratio (Q4.8 format) | ||
| 291 | * @bg_min: minimum B/G ratio (Q4.8 format) | ||
| 292 | * @bg_max: maximum B/G ratio (Q4.8 format) | ||
| 293 | * @rg_low: R/G ratio trim low (Q4.8 format) | ||
| 294 | * @rg_high: R/G ratio trim hight (Q4.8 format) | ||
| 295 | * @bg_low: B/G ratio trim low (Q4.8 format) | ||
| 296 | * @bg_high: B/G ratio trim high (Q4.8 format) | ||
| 297 | * @zone_weight: array of weights for AWB statistics zones [0..15] | ||
| 298 | * @horiz_coord: the horizontal coordinate of points on the diagonal [0..2888] | ||
| 299 | * @vert_coord: the vertical coordinate of points on the diagonal [0..2240] | ||
| 300 | */ | ||
| 301 | struct c3_isp_params_awb_config { | ||
| 302 | 	struct c3_isp_params_block_header header; | ||
| 303 | 	__u8 tap_point; | ||
| 304 | 	__u8 satur_vald; | ||
| 305 | 	__u8 horiz_zones_num; | ||
| 306 | 	__u8 vert_zones_num; | ||
| 307 | 	__u16 rg_min; | ||
| 308 | 	__u16 rg_max; | ||
| 309 | 	__u16 bg_min; | ||
| 310 | 	__u16 bg_max; | ||
| 311 | 	__u16 rg_low; | ||
| 312 | 	__u16 rg_high; | ||
| 313 | 	__u16 bg_low; | ||
| 314 | 	__u16 bg_high; | ||
| 315 | 	__u8 zone_weight[C3_ISP_AWB_MAX_ZONES]; | ||
| 316 | 	__u16 horiz_coord[C3_ISP_AWB_MAX_PT_NUM]; | ||
| 317 | 	__u16 vert_coord[C3_ISP_AWB_MAX_PT_NUM]; | ||
| 318 | } __attribute__((aligned(8))); | ||
| 319 | |||
| 320 | /** | ||
| 321 | * enum c3_isp_params_ae_tap_points - Tap points for the AE statistics | ||
| 322 | * @C3_ISP_AE_STATS_TAP_GE: immediately after the green equal block | ||
| 323 | * @C3_ISP_AE_STATS_TAP_MLS: immediately after the mesh lens shading block | ||
| 324 | */ | ||
| 325 | enum c3_isp_params_ae_tap_points { | ||
| 326 | 	C3_ISP_AE_STATS_TAP_GE = 0, | ||
| 327 | 	C3_ISP_AE_STATS_TAP_MLS, | ||
| 328 | }; | ||
| 329 | |||
| 330 | /** | ||
| 331 | * struct c3_isp_params_ae_config - Stats settings for auto-exposure | ||
| 332 | * | ||
| 333 | * This struct allows the configuration of the statistics generated for | ||
| 334 | * auto exposure. | ||
| 335 | * | ||
| 336 | * header.type should be set to C3_ISP_PARAMS_BLOCK_AE_CONFIG | ||
| 337 | * from :c:type:`c3_isp_params_block_type` | ||
| 338 | * | ||
| 339 | * @header: the C3 ISP parameters block header | ||
| 340 | * @horiz_zones_num: active number of horizontal zones [0..17] | ||
| 341 | * @vert_zones_num: active number of vertical zones [0..15] | ||
| 342 | * @tap_point: the tap point from enum c3_isp_params_ae_tap_point | ||
| 343 | * @zone_weight: array of weights for AE statistics zones [0..15] | ||
| 344 | * @horiz_coord: the horizontal coordinate of points on the diagonal [0..2888] | ||
| 345 | * @vert_coord: the vertical coordinate of points on the diagonal [0..2240] | ||
| 346 | * @reserved: applications must zero this array | ||
| 347 | */ | ||
| 348 | struct c3_isp_params_ae_config { | ||
| 349 | 	struct c3_isp_params_block_header header; | ||
| 350 | 	__u8 tap_point; | ||
| 351 | 	__u8 horiz_zones_num; | ||
| 352 | 	__u8 vert_zones_num; | ||
| 353 | 	__u8 zone_weight[C3_ISP_AE_MAX_ZONES]; | ||
| 354 | 	__u16 horiz_coord[C3_ISP_AE_MAX_PT_NUM]; | ||
| 355 | 	__u16 vert_coord[C3_ISP_AE_MAX_PT_NUM]; | ||
| 356 | 	__u16 reserved[3]; | ||
| 357 | } __attribute__((aligned(8))); | ||
| 358 | |||
| 359 | /** | ||
| 360 | * enum c3_isp_params_af_tap_points - Tap points for the AF statistics | ||
| 361 | * @C3_ISP_AF_STATS_TAP_SNR: immediately after the spatial noise reduce block | ||
| 362 | * @C3_ISP_AF_STATS_TAP_DMS: immediately after the demosaic block | ||
| 363 | */ | ||
| 364 | enum c3_isp_params_af_tap_points { | ||
| 365 | 	C3_ISP_AF_STATS_TAP_SNR = 0, | ||
| 366 | 	C3_ISP_AF_STATS_TAP_DMS, | ||
| 367 | }; | ||
| 368 | |||
| 369 | /** | ||
| 370 | * struct c3_isp_params_af_config - Stats settings for auto-focus | ||
| 371 | * | ||
| 372 | * This struct allows the configuration of the statistics generated for | ||
| 373 | * auto focus. | ||
| 374 | * | ||
| 375 | * header.type should be set to C3_ISP_PARAMS_BLOCK_AF_CONFIG | ||
| 376 | * from :c:type:`c3_isp_params_block_type` | ||
| 377 | * | ||
| 378 | * @header: the C3 ISP parameters block header | ||
| 379 | * @tap_point: the tap point from enum c3_isp_params_af_tap_point | ||
| 380 | * @horiz_zones_num: active number of hotizontal zones [0..17] | ||
| 381 | * @vert_zones_num: active number of vertical zones [0..15] | ||
| 382 | * @reserved: applications must zero this array | ||
| 383 | * @horiz_coord: the horizontal coordinate of points on the diagonal [0..2888] | ||
| 384 | * @vert_coord: the vertical coordinate of points on the diagonal [0..2240] | ||
| 385 | */ | ||
| 386 | struct c3_isp_params_af_config { | ||
| 387 | 	struct c3_isp_params_block_header header; | ||
| 388 | 	__u8 tap_point; | ||
| 389 | 	__u8 horiz_zones_num; | ||
| 390 | 	__u8 vert_zones_num; | ||
| 391 | 	__u8 reserved[5]; | ||
| 392 | 	__u16 horiz_coord[C3_ISP_AF_MAX_PT_NUM]; | ||
| 393 | 	__u16 vert_coord[C3_ISP_AF_MAX_PT_NUM]; | ||
| 394 | } __attribute__((aligned(8))); | ||
| 395 | |||
| 396 | /** | ||
| 397 | * struct c3_isp_params_pst_gamma - Post gamma configuration | ||
| 398 | * | ||
| 399 | * This struct allows the configuration of the look up table for | ||
| 400 | * post gamma. The gamma curve consists of 129 points, so need to | ||
| 401 | * set lut[129]. | ||
| 402 | * | ||
| 403 | * header.type should be set to C3_ISP_PARAMS_BLOCK_PST_GAMMA | ||
| 404 | * from :c:type:`c3_isp_params_block_type` | ||
| 405 | * | ||
| 406 | * @header: the C3 ISP parameters block header | ||
| 407 | * @lut: lookup table for P-Stitch gamma [0..1023] | ||
| 408 | * @reserved: applications must zero this array | ||
| 409 | */ | ||
| 410 | struct c3_isp_params_pst_gamma { | ||
| 411 | 	struct c3_isp_params_block_header header; | ||
| 412 | 	__u16 lut[129]; | ||
| 413 | 	__u16 reserved[3]; | ||
| 414 | } __attribute__((aligned(8))); | ||
| 415 | |||
| 416 | /** | ||
| 417 | * struct c3_isp_params_ccm - ISP CCM configuration | ||
| 418 | * | ||
| 419 | * This struct allows the configuration of the matrix for | ||
| 420 | * color correction. The matrix consists of 3 x 3 points, | ||
| 421 | * so need to set matrix[3][3]. | ||
| 422 | * | ||
| 423 | * header.type should be set to C3_ISP_PARAMS_BLOCK_CCM | ||
| 424 | * from :c:type:`c3_isp_params_block_type` | ||
| 425 | * | ||
| 426 | * @header: the C3 ISP parameters block header | ||
| 427 | * @matrix: a 3 x 3 matrix used for color correction, | ||
| 428 | * the value of matrix[x][y] is orig_value x 256. [-4096..4095] | ||
| 429 | * @reserved: applications must zero this array | ||
| 430 | */ | ||
| 431 | struct c3_isp_params_ccm { | ||
| 432 | 	struct c3_isp_params_block_header header; | ||
| 433 | 	__s16 matrix[3][3]; | ||
| 434 | 	__u16 reserved[3]; | ||
| 435 | } __attribute__((aligned(8))); | ||
| 436 | |||
| 437 | /** | ||
| 438 | * struct c3_isp_params_csc - ISP Color Space Conversion configuration | ||
| 439 | * | ||
| 440 | * This struct allows the configuration of the matrix for color space | ||
| 441 | * conversion. The matrix consists of 3 x 3 points, so need to set matrix[3][3]. | ||
| 442 | * | ||
| 443 | * header.type should be set to C3_ISP_PARAMS_BLOCK_CSC | ||
| 444 | * from :c:type:`c3_isp_params_block_type` | ||
| 445 | * | ||
| 446 | * @header: the C3 ISP parameters block header | ||
| 447 | * @matrix: a 3x3 matrix used for the color space conversion, | ||
| 448 | * the value of matrix[x][y] is orig_value x 256. [-4096..4095] | ||
| 449 | * @reserved: applications must zero this array | ||
| 450 | */ | ||
| 451 | struct c3_isp_params_csc { | ||
| 452 | 	struct c3_isp_params_block_header header; | ||
| 453 | 	__s16 matrix[3][3]; | ||
| 454 | 	__u16 reserved[3]; | ||
| 455 | } __attribute__((aligned(8))); | ||
| 456 | |||
| 457 | /** | ||
| 458 | * struct c3_isp_params_blc - ISP Black Level Correction configuration | ||
| 459 | * | ||
| 460 | * This struct allows the configuration of the block level offset for each | ||
| 461 | * color channel. | ||
| 462 | * | ||
| 463 | * header.type should be set to C3_ISP_PARAMS_BLOCK_BLC | ||
| 464 | * from :c:type:`c3_isp_params_block_type` | ||
| 465 | * | ||
| 466 | * @header: the C3 ISP parameters block header | ||
| 467 | * @gr_ofst: Gr blc offset (Q4.12 format) | ||
| 468 | * @r_ofst: R blc offset (Q4.12 format) | ||
| 469 | * @b_ofst: B blc offset (Q4.12 format) | ||
| 470 | * @gb_ofst: Gb blc offset(Q4.12 format) | ||
| 471 | */ | ||
| 472 | struct c3_isp_params_blc { | ||
| 473 | 	struct c3_isp_params_block_header header; | ||
| 474 | 	__u16 gr_ofst; | ||
| 475 | 	__u16 r_ofst; | ||
| 476 | 	__u16 b_ofst; | ||
| 477 | 	__u16 gb_ofst; | ||
| 478 | }; | ||
| 479 | |||
| 480 | /** | ||
| 481 | * define C3_ISP_PARAMS_MAX_SIZE - Maximum size of all C3 ISP Parameters | ||
| 482 | * | ||
| 483 | * Though the parameters for the C3 ISP are passed as optional blocks, the | ||
| 484 | * driver still needs to know the absolute maximum size so that it can allocate | ||
| 485 | * a buffer sized appropriately to accommodate userspace attempting to set all | ||
| 486 | * possible parameters in a single frame. | ||
| 487 | */ | ||
| 488 | #define C3_ISP_PARAMS_MAX_SIZE \ | ||
| 489 | 	(sizeof(struct c3_isp_params_awb_gains) + \ | ||
| 490 | 	 sizeof(struct c3_isp_params_awb_config) + \ | ||
| 491 | 	 sizeof(struct c3_isp_params_ae_config) + \ | ||
| 492 | 	 sizeof(struct c3_isp_params_af_config) + \ | ||
| 493 | 	 sizeof(struct c3_isp_params_pst_gamma) + \ | ||
| 494 | 	 sizeof(struct c3_isp_params_ccm) + \ | ||
| 495 | 	 sizeof(struct c3_isp_params_csc) + \ | ||
| 496 | 	 sizeof(struct c3_isp_params_blc)) | ||
| 497 | |||
| 498 | /** | ||
| 499 | * struct c3_isp_params_cfg - C3 ISP configuration parameters | ||
| 500 | * | ||
| 501 | * This struct contains the configuration parameters of the C3 ISP | ||
| 502 | * algorithms, serialized by userspace into an opaque data buffer. Each | ||
| 503 | * configuration parameter block is represented by a block-specific structure | ||
| 504 | * which contains a :c:type:`c3_isp_param_block_header` entry as first | ||
| 505 | * member. Userspace populates the @data buffer with configuration parameters | ||
| 506 | * for the blocks that it intends to configure. As a consequence, the data | ||
| 507 | * buffer effective size changes according to the number of ISP blocks that | ||
| 508 | * userspace intends to configure. | ||
| 509 | * | ||
| 510 | * The parameters buffer is versioned by the @version field to allow modifying | ||
| 511 | * and extending its definition. Userspace should populate the @version field to | ||
| 512 | * inform the driver about the version it intends to use. The driver will parse | ||
| 513 | * and handle the @data buffer according to the data layout specific to the | ||
| 514 | * indicated revision and return an error if the desired revision is not | ||
| 515 | * supported. | ||
| 516 | * | ||
| 517 | * For each ISP block that userspace wants to configure, a block-specific | ||
| 518 | * structure is appended to the @data buffer, one after the other without gaps | ||
| 519 | * in between nor overlaps. Userspace shall populate the @total_size field with | ||
| 520 | * the effective size, in bytes, of the @data buffer. | ||
| 521 | * | ||
| 522 | * The expected memory layout of the parameters buffer is:: | ||
| 523 | * | ||
| 524 | *	+-------------------- struct c3_isp_params_cfg ---- ------------------+ | ||
| 525 | *	| version = C3_ISP_PARAM_BUFFER_V0; | | ||
| 526 | *	| data_size = sizeof(struct c3_isp_params_awb_gains) + | | ||
| 527 | *	| sizeof(struct c3_isp_params_awb_config); | | ||
| 528 | *	| +------------------------- data ---------------------------------+ | | ||
| 529 | *	| | +------------ struct c3_isp_params_awb_gains) ------------------+ | | ||
| 530 | *	| | | +--------- struct c3_isp_params_block_header header -----+ | | | | ||
| 531 | *	| | | | type = C3_ISP_PARAMS_BLOCK_AWB_GAINS; | | | | | ||
| 532 | *	| | | | flags = C3_ISP_PARAMS_BLOCK_FL_NONE; | | | | | ||
| 533 | *	| | | | size = sizeof(struct c3_isp_params_awb_gains); | | | | | ||
| 534 | *	| | | +---------------------------------------------------------+ | | | | ||
| 535 | *	| | | gr_gain = ...; | | | | ||
| 536 | *	| | | r_gain = ...; | | | | ||
| 537 | *	| | | b_gain = ...; | | | | ||
| 538 | *	| | | gb_gain = ...; | | | | ||
| 539 | *	| | +------------------ struct c3_isp_params_awb_config ----------+ | | | ||
| 540 | *	| | | +---------- struct c3_isp_param_block_header header ------+ | | | | ||
| 541 | *	| | | | type = C3_ISP_PARAMS_BLOCK_AWB_CONFIG; | | | | | ||
| 542 | *	| | | | flags = C3_ISP_PARAMS_BLOCK_FL_NONE; | | | | | ||
| 543 | *	| | | | size = sizeof(struct c3_isp_params_awb_config) | | | | | ||
| 544 | *	| | | +---------------------------------------------------------+ | | | | ||
| 545 | *	| | | tap_point = ...; | | | | ||
| 546 | *	| | | satur_vald = ...; | | | | ||
| 547 | *	| | | horiz_zones_num = ...; | | | | ||
| 548 | *	| | | vert_zones_num = ...; | | | | ||
| 549 | *	| | +-------------------------------------------------------------+ | | | ||
| 550 | *	| +-----------------------------------------------------------------+ | | ||
| 551 | *	+---------------------------------------------------------------------+ | ||
| 552 | * | ||
| 553 | * @version: The C3 ISP parameters buffer version | ||
| 554 | * @data_size: The C3 ISP configuration data effective size, excluding this | ||
| 555 | * header | ||
| 556 | * @data: The C3 ISP configuration blocks data | ||
| 557 | */ | ||
| 558 | struct c3_isp_params_cfg { | ||
| 559 | 	__u32 version; | ||
| 560 | 	__u32 data_size; | ||
| 561 | 	__u8 data[C3_ISP_PARAMS_MAX_SIZE]; | ||
| 562 | }; | ||
| 563 | |||
| 564 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/media/raspberrypi/pisp_be_config.h+5-4| ... | @@ -21,10 +21,11 @@ | ... | @@ -21,10 +21,11 @@ |
| 21 | /* preferred byte alignment for outputs */ | 21 | /* preferred byte alignment for outputs */ |
| 22 | #define PISP_BACK_END_OUTPUT_MAX_ALIGN 64u | 22 | #define PISP_BACK_END_OUTPUT_MAX_ALIGN 64u |
| 23 | 23 | ||
| 24 | /* minimum allowed tile width anywhere in the pipeline */ | 24 | /* minimum allowed tile sizes anywhere in the pipeline */ |
| 25 | #define PISP_BACK_END_MIN_TILE_WIDTH 16u | 25 | #define PISP_BACK_END_MIN_TILE_WIDTH	16u |
| 26 | /* minimum allowed tile width anywhere in the pipeline */ | 26 | #define PISP_BACK_END_MIN_TILE_HEIGHT	16u |
| 27 | #define PISP_BACK_END_MIN_TILE_HEIGHT 16u | 27 | #define PISP_BACK_END_MAX_TILE_WIDTH	65536u |
| 28 | #define PISP_BACK_END_MAX_TILE_HEIGHT	65536u | ||
| 28 | 29 | ||
| 29 | #define PISP_BACK_END_NUM_OUTPUTS 2 | 30 | #define PISP_BACK_END_NUM_OUTPUTS 2 |
| 30 | #define PISP_BACK_END_HOG_OUTPUT 1 | 31 | #define PISP_BACK_END_HOG_OUTPUT 1 |
lib/libc/include/any-linux-any/linux/mount.h+9-1| ... | @@ -179,7 +179,12 @@ struct statmount { | ... | @@ -179,7 +179,12 @@ struct statmount { |
| 179 | 	__u32 opt_array;	/* [str] Array of nul terminated fs options */ | 179 | 	__u32 opt_array;	/* [str] Array of nul terminated fs options */ |
| 180 | 	__u32 opt_sec_num;	/* Number of security options */ | 180 | 	__u32 opt_sec_num;	/* Number of security options */ |
| 181 | 	__u32 opt_sec_array;	/* [str] Array of nul terminated security options */ | 181 | 	__u32 opt_sec_array;	/* [str] Array of nul terminated security options */ |
| 182 | 	__u64 __spare2[46]; | 182 | 	__u64 supported_mask;	/* Mask flags that this kernel supports */ |
| 183 | 	__u32 mnt_uidmap_num;	/* Number of uid mappings */ | ||
| 184 | 	__u32 mnt_uidmap;	/* [str] Array of uid mappings (as seen from callers namespace) */ | ||
| 185 | 	__u32 mnt_gidmap_num;	/* Number of gid mappings */ | ||
| 186 | 	__u32 mnt_gidmap;	/* [str] Array of gid mappings (as seen from callers namespace) */ | ||
| 187 | 	__u64 __spare2[43]; | ||
| 183 | 	char str[];		/* Variable size part containing strings */ | 188 | 	char str[];		/* Variable size part containing strings */ |
| 184 | }; | 189 | }; |
| 185 | 190 | ||
| ... | @@ -217,6 +222,9 @@ struct mnt_id_req { | ... | @@ -217,6 +222,9 @@ struct mnt_id_req { |
| 217 | #define STATMOUNT_SB_SOURCE		0x00000200U	/* Want/got sb_source */ | 222 | #define STATMOUNT_SB_SOURCE		0x00000200U	/* Want/got sb_source */ |
| 218 | #define STATMOUNT_OPT_ARRAY		0x00000400U	/* Want/got opt_... */ | 223 | #define STATMOUNT_OPT_ARRAY		0x00000400U	/* Want/got opt_... */ |
| 219 | #define STATMOUNT_OPT_SEC_ARRAY		0x00000800U	/* Want/got opt_sec... */ | 224 | #define STATMOUNT_OPT_SEC_ARRAY		0x00000800U	/* Want/got opt_sec... */ |
| 225 | #define STATMOUNT_SUPPORTED_MASK	0x00001000U	/* Want/got supported mask flags */ | ||
| 226 | #define STATMOUNT_MNT_UIDMAP		0x00002000U	/* Want/got uidmap... */ | ||
| 227 | #define STATMOUNT_MNT_GIDMAP		0x00004000U	/* Want/got gidmap... */ | ||
| 220 | 228 | ||
| 221 | /* | 229 | /* |
| 222 | * Special @mnt_id values that can be passed to listmount | 230 | * Special @mnt_id values that can be passed to listmount |
lib/libc/include/any-linux-any/linux/mptcp.h+2| ... | @@ -29,6 +29,8 @@ | ... | @@ -29,6 +29,8 @@ |
| 29 | #define MPTCP_INFO_FLAG_FALLBACK		_BITUL(0) | 29 | #define MPTCP_INFO_FLAG_FALLBACK		_BITUL(0) |
| 30 | #define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED	_BITUL(1) | 30 | #define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED	_BITUL(1) |
| 31 | 31 | ||
| 32 | #define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0		_BITUL(0) | ||
| 33 | |||
| 32 | #define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0) | 34 | #define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0) |
| 33 | #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) | 35 | #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) |
| 34 | #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) | 36 | #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) |
lib/libc/include/any-linux-any/linux/mptcp_pm.h+5-5| ... | @@ -16,10 +16,10 @@ | ... | @@ -16,10 +16,10 @@ |
| 16 | * good time to allocate memory and send ADD_ADDR if needed. Depending on the | 16 | * good time to allocate memory and send ADD_ADDR if needed. Depending on the |
| 17 | * traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED | 17 | * traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED |
| 18 | * is sent. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, | 18 | * is sent. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, |
| 19 | * sport, dport, server-side. | 19 | * sport, dport, server-side, [flags]. |
| 20 | * @MPTCP_EVENT_ESTABLISHED: A MPTCP connection is established (can start new | 20 | * @MPTCP_EVENT_ESTABLISHED: A MPTCP connection is established (can start new |
| 21 | * subflows). Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, | 21 | * subflows). Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, |
| 22 | * sport, dport, server-side. | 22 | * sport, dport, server-side, [flags]. |
| 23 | * @MPTCP_EVENT_CLOSED: A MPTCP connection has stopped. Attribute: token. | 23 | * @MPTCP_EVENT_CLOSED: A MPTCP connection has stopped. Attribute: token. |
| 24 | * @MPTCP_EVENT_ANNOUNCED: A new address has been announced by the peer. | 24 | * @MPTCP_EVENT_ANNOUNCED: A new address has been announced by the peer. |
| 25 | * Attributes: token, rem_id, family, daddr4 | daddr6 [, dport]. | 25 | * Attributes: token, rem_id, family, daddr4 | daddr6 [, dport]. |
| ... | @@ -27,14 +27,14 @@ | ... | @@ -27,14 +27,14 @@ |
| 27 | * token, rem_id. | 27 | * token, rem_id. |
| 28 | * @MPTCP_EVENT_SUB_ESTABLISHED: A new subflow has been established. 'error' | 28 | * @MPTCP_EVENT_SUB_ESTABLISHED: A new subflow has been established. 'error' |
| 29 | * should not be set. Attributes: token, family, loc_id, rem_id, saddr4 | | 29 | * should not be set. Attributes: token, family, loc_id, rem_id, saddr4 | |
| 30 | * saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error]. | 30 | * saddr6, daddr4 | daddr6, sport, dport, backup, if-idx [, error]. |
| 31 | * @MPTCP_EVENT_SUB_CLOSED: A subflow has been closed. An error (copy of | 31 | * @MPTCP_EVENT_SUB_CLOSED: A subflow has been closed. An error (copy of |
| 32 | * sk_err) could be set if an error has been detected for this subflow. | 32 | * sk_err) could be set if an error has been detected for this subflow. |
| 33 | * Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 | | 33 | * Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 | |
| 34 | * daddr6, sport, dport, backup, if_idx [, error]. | 34 | * daddr6, sport, dport, backup, if-idx [, error]. |
| 35 | * @MPTCP_EVENT_SUB_PRIORITY: The priority of a subflow has changed. 'error' | 35 | * @MPTCP_EVENT_SUB_PRIORITY: The priority of a subflow has changed. 'error' |
| 36 | * should not be set. Attributes: token, family, loc_id, rem_id, saddr4 | | 36 | * should not be set. Attributes: token, family, loc_id, rem_id, saddr4 | |
| 37 | * saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error]. | 37 | * saddr6, daddr4 | daddr6, sport, dport, backup, if-idx [, error]. |
| 38 | * @MPTCP_EVENT_LISTENER_CREATED: A new PM listener is created. Attributes: | 38 | * @MPTCP_EVENT_LISTENER_CREATED: A new PM listener is created. Attributes: |
| 39 | * family, sport, saddr4 | saddr6. | 39 | * family, sport, saddr4 | saddr6. |
| 40 | * @MPTCP_EVENT_LISTENER_CLOSED: A PM listener is closed. Attributes: family, | 40 | * @MPTCP_EVENT_LISTENER_CLOSED: A PM listener is closed. Attributes: family, |
lib/libc/include/any-linux-any/linux/mshv.h created+291| ... | @@ -0,0 +1,291 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Userspace interfaces for /dev/mshv* devices and derived fds | ||
| 4 | * | ||
| 5 | * This file is divided into sections containing data structures and IOCTLs for | ||
| 6 | * a particular set of related devices or derived file descriptors. | ||
| 7 | * | ||
| 8 | * The IOCTL definitions are at the end of each section. They are grouped by | ||
| 9 | * device/fd, so that new IOCTLs can easily be added with a monotonically | ||
| 10 | * increasing number. | ||
| 11 | */ | ||
| 12 | #ifndef _LINUX_MSHV_H | ||
| 13 | #define _LINUX_MSHV_H | ||
| 14 | |||
| 15 | #include <linux/types.h> | ||
| 16 | |||
| 17 | #define MSHV_IOCTL	0xB8 | ||
| 18 | |||
| 19 | /* | ||
| 20 | ******************************************* | ||
| 21 | * Entry point to main VMM APIs: /dev/mshv * | ||
| 22 | ******************************************* | ||
| 23 | */ | ||
| 24 | |||
| 25 | enum { | ||
| 26 | 	MSHV_PT_BIT_LAPIC, | ||
| 27 | 	MSHV_PT_BIT_X2APIC, | ||
| 28 | 	MSHV_PT_BIT_GPA_SUPER_PAGES, | ||
| 29 | 	MSHV_PT_BIT_COUNT, | ||
| 30 | }; | ||
| 31 | |||
| 32 | #define MSHV_PT_FLAGS_MASK ((1 << MSHV_PT_BIT_COUNT) - 1) | ||
| 33 | |||
| 34 | enum { | ||
| 35 | 	MSHV_PT_ISOLATION_NONE, | ||
| 36 | 	MSHV_PT_ISOLATION_COUNT, | ||
| 37 | }; | ||
| 38 | |||
| 39 | /** | ||
| 40 | * struct mshv_create_partition - arguments for MSHV_CREATE_PARTITION | ||
| 41 | * @pt_flags: Bitmask of 1 << MSHV_PT_BIT_* | ||
| 42 | * @pt_isolation: MSHV_PT_ISOLATION_* | ||
| 43 | * | ||
| 44 | * Returns a file descriptor to act as a handle to a guest partition. | ||
| 45 | * At this point the partition is not yet initialized in the hypervisor. | ||
| 46 | * Some operations must be done with the partition in this state, e.g. setting | ||
| 47 | * so-called "early" partition properties. The partition can then be | ||
| 48 | * initialized with MSHV_INITIALIZE_PARTITION. | ||
| 49 | */ | ||
| 50 | struct mshv_create_partition { | ||
| 51 | 	__u64 pt_flags; | ||
| 52 | 	__u64 pt_isolation; | ||
| 53 | }; | ||
| 54 | |||
| 55 | /* /dev/mshv */ | ||
| 56 | #define MSHV_CREATE_PARTITION	_IOW(MSHV_IOCTL, 0x00, struct mshv_create_partition) | ||
| 57 | |||
| 58 | /* | ||
| 59 | ************************ | ||
| 60 | * Child partition APIs * | ||
| 61 | ************************ | ||
| 62 | */ | ||
| 63 | |||
| 64 | struct mshv_create_vp { | ||
| 65 | 	__u32 vp_index; | ||
| 66 | }; | ||
| 67 | |||
| 68 | enum { | ||
| 69 | 	MSHV_SET_MEM_BIT_WRITABLE, | ||
| 70 | 	MSHV_SET_MEM_BIT_EXECUTABLE, | ||
| 71 | 	MSHV_SET_MEM_BIT_UNMAP, | ||
| 72 | 	MSHV_SET_MEM_BIT_COUNT | ||
| 73 | }; | ||
| 74 | |||
| 75 | #define MSHV_SET_MEM_FLAGS_MASK ((1 << MSHV_SET_MEM_BIT_COUNT) - 1) | ||
| 76 | |||
| 77 | /* The hypervisor's "native" page size */ | ||
| 78 | #define MSHV_HV_PAGE_SIZE	0x1000 | ||
| 79 | |||
| 80 | /** | ||
| 81 | * struct mshv_user_mem_region - arguments for MSHV_SET_GUEST_MEMORY | ||
| 82 | * @size: Size of the memory region (bytes). Must be aligned to | ||
| 83 | * MSHV_HV_PAGE_SIZE | ||
| 84 | * @guest_pfn: Base guest page number to map | ||
| 85 | * @userspace_addr: Base address of userspace memory. Must be aligned to | ||
| 86 | * MSHV_HV_PAGE_SIZE | ||
| 87 | * @flags: Bitmask of 1 << MSHV_SET_MEM_BIT_*. If (1 << MSHV_SET_MEM_BIT_UNMAP) | ||
| 88 | * is set, ignore other bits. | ||
| 89 | * @rsvd: MBZ | ||
| 90 | * | ||
| 91 | * Map or unmap a region of userspace memory to Guest Physical Addresses (GPA). | ||
| 92 | * Mappings can't overlap in GPA space or userspace. | ||
| 93 | * To unmap, these fields must match an existing mapping. | ||
| 94 | */ | ||
| 95 | struct mshv_user_mem_region { | ||
| 96 | 	__u64 size; | ||
| 97 | 	__u64 guest_pfn; | ||
| 98 | 	__u64 userspace_addr; | ||
| 99 | 	__u8 flags; | ||
| 100 | 	__u8 rsvd[7]; | ||
| 101 | }; | ||
| 102 | |||
| 103 | enum { | ||
| 104 | 	MSHV_IRQFD_BIT_DEASSIGN, | ||
| 105 | 	MSHV_IRQFD_BIT_RESAMPLE, | ||
| 106 | 	MSHV_IRQFD_BIT_COUNT, | ||
| 107 | }; | ||
| 108 | |||
| 109 | #define MSHV_IRQFD_FLAGS_MASK	((1 << MSHV_IRQFD_BIT_COUNT) - 1) | ||
| 110 | |||
| 111 | struct mshv_user_irqfd { | ||
| 112 | 	__s32 fd; | ||
| 113 | 	__s32 resamplefd; | ||
| 114 | 	__u32 gsi; | ||
| 115 | 	__u32 flags; | ||
| 116 | }; | ||
| 117 | |||
| 118 | enum { | ||
| 119 | 	MSHV_IOEVENTFD_BIT_DATAMATCH, | ||
| 120 | 	MSHV_IOEVENTFD_BIT_PIO, | ||
| 121 | 	MSHV_IOEVENTFD_BIT_DEASSIGN, | ||
| 122 | 	MSHV_IOEVENTFD_BIT_COUNT, | ||
| 123 | }; | ||
| 124 | |||
| 125 | #define MSHV_IOEVENTFD_FLAGS_MASK	((1 << MSHV_IOEVENTFD_BIT_COUNT) - 1) | ||
| 126 | |||
| 127 | struct mshv_user_ioeventfd { | ||
| 128 | 	__u64 datamatch; | ||
| 129 | 	__u64 addr;	 /* legal pio/mmio address */ | ||
| 130 | 	__u32 len;	 /* 1, 2, 4, or 8 bytes */ | ||
| 131 | 	__s32 fd; | ||
| 132 | 	__u32 flags; | ||
| 133 | 	__u8 rsvd[4]; | ||
| 134 | }; | ||
| 135 | |||
| 136 | struct mshv_user_irq_entry { | ||
| 137 | 	__u32 gsi; | ||
| 138 | 	__u32 address_lo; | ||
| 139 | 	__u32 address_hi; | ||
| 140 | 	__u32 data; | ||
| 141 | }; | ||
| 142 | |||
| 143 | struct mshv_user_irq_table { | ||
| 144 | 	__u32 nr; | ||
| 145 | 	__u32 rsvd; /* MBZ */ | ||
| 146 | 	struct mshv_user_irq_entry entries[]; | ||
| 147 | }; | ||
| 148 | |||
| 149 | enum { | ||
| 150 | 	MSHV_GPAP_ACCESS_TYPE_ACCESSED, | ||
| 151 | 	MSHV_GPAP_ACCESS_TYPE_DIRTY, | ||
| 152 | 	MSHV_GPAP_ACCESS_TYPE_COUNT		/* Count of enum members */ | ||
| 153 | }; | ||
| 154 | |||
| 155 | enum { | ||
| 156 | 	MSHV_GPAP_ACCESS_OP_NOOP, | ||
| 157 | 	MSHV_GPAP_ACCESS_OP_CLEAR, | ||
| 158 | 	MSHV_GPAP_ACCESS_OP_SET, | ||
| 159 | 	MSHV_GPAP_ACCESS_OP_COUNT		/* Count of enum members */ | ||
| 160 | }; | ||
| 161 | |||
| 162 | /** | ||
| 163 | * struct mshv_gpap_access_bitmap - arguments for MSHV_GET_GPAP_ACCESS_BITMAP | ||
| 164 | * @access_type: MSHV_GPAP_ACCESS_TYPE_* - The type of access to record in the | ||
| 165 | * bitmap | ||
| 166 | * @access_op: MSHV_GPAP_ACCESS_OP_* - Allows an optional clear or set of all | ||
| 167 | * the access states in the range, after retrieving the current | ||
| 168 | * states. | ||
| 169 | * @rsvd: MBZ | ||
| 170 | * @page_count: Number of pages | ||
| 171 | * @gpap_base: Base gpa page number | ||
| 172 | * @bitmap_ptr: Output buffer for bitmap, at least (page_count + 7) / 8 bytes | ||
| 173 | * | ||
| 174 | * Retrieve a bitmap of either ACCESSED or DIRTY bits for a given range of guest | ||
| 175 | * memory, and optionally clear or set the bits. | ||
| 176 | */ | ||
| 177 | struct mshv_gpap_access_bitmap { | ||
| 178 | 	__u8 access_type; | ||
| 179 | 	__u8 access_op; | ||
| 180 | 	__u8 rsvd[6]; | ||
| 181 | 	__u64 page_count; | ||
| 182 | 	__u64 gpap_base; | ||
| 183 | 	__u64 bitmap_ptr; | ||
| 184 | }; | ||
| 185 | |||
| 186 | /** | ||
| 187 | * struct mshv_root_hvcall - arguments for MSHV_ROOT_HVCALL | ||
| 188 | * @code: Hypercall code (HVCALL_*) | ||
| 189 | * @reps: in: Rep count ('repcount') | ||
| 190 | *	 out: Reps completed ('repcomp'). MBZ unless rep hvcall | ||
| 191 | * @in_sz: Size of input incl rep data. <= MSHV_HV_PAGE_SIZE | ||
| 192 | * @out_sz: Size of output buffer. <= MSHV_HV_PAGE_SIZE. MBZ if out_ptr is 0 | ||
| 193 | * @status: in: MBZ | ||
| 194 | *	 out: HV_STATUS_* from hypercall | ||
| 195 | * @rsvd: MBZ | ||
| 196 | * @in_ptr: Input data buffer (struct hv_input_*). If used with partition or | ||
| 197 | *	 vp fd, partition id field is populated by kernel. | ||
| 198 | * @out_ptr: Output data buffer (optional) | ||
| 199 | */ | ||
| 200 | struct mshv_root_hvcall { | ||
| 201 | 	__u16 code; | ||
| 202 | 	__u16 reps; | ||
| 203 | 	__u16 in_sz; | ||
| 204 | 	__u16 out_sz; | ||
| 205 | 	__u16 status; | ||
| 206 | 	__u8 rsvd[6]; | ||
| 207 | 	__u64 in_ptr; | ||
| 208 | 	__u64 out_ptr; | ||
| 209 | }; | ||
| 210 | |||
| 211 | /* Partition fds created with MSHV_CREATE_PARTITION */ | ||
| 212 | #define MSHV_INITIALIZE_PARTITION	_IO(MSHV_IOCTL, 0x00) | ||
| 213 | #define MSHV_CREATE_VP			_IOW(MSHV_IOCTL, 0x01, struct mshv_create_vp) | ||
| 214 | #define MSHV_SET_GUEST_MEMORY		_IOW(MSHV_IOCTL, 0x02, struct mshv_user_mem_region) | ||
| 215 | #define MSHV_IRQFD			_IOW(MSHV_IOCTL, 0x03, struct mshv_user_irqfd) | ||
| 216 | #define MSHV_IOEVENTFD			_IOW(MSHV_IOCTL, 0x04, struct mshv_user_ioeventfd) | ||
| 217 | #define MSHV_SET_MSI_ROUTING		_IOW(MSHV_IOCTL, 0x05, struct mshv_user_irq_table) | ||
| 218 | #define MSHV_GET_GPAP_ACCESS_BITMAP	_IOWR(MSHV_IOCTL, 0x06, struct mshv_gpap_access_bitmap) | ||
| 219 | /* Generic hypercall */ | ||
| 220 | #define MSHV_ROOT_HVCALL		_IOWR(MSHV_IOCTL, 0x07, struct mshv_root_hvcall) | ||
| 221 | |||
| 222 | /* | ||
| 223 | ******************************** | ||
| 224 | * VP APIs for child partitions * | ||
| 225 | ******************************** | ||
| 226 | */ | ||
| 227 | |||
| 228 | #define MSHV_RUN_VP_BUF_SZ 256 | ||
| 229 | |||
| 230 | /* | ||
| 231 | * VP state pages may be mapped to userspace via mmap(). | ||
| 232 | * To specify which state page, use MSHV_VP_MMAP_OFFSET_ values multiplied by | ||
| 233 | * the system page size. | ||
| 234 | * e.g. | ||
| 235 | * long page_size = sysconf(_SC_PAGE_SIZE); | ||
| 236 | * void *reg_page = mmap(NULL, MSHV_HV_PAGE_SIZE, PROT_READ|PROT_WRITE, | ||
| 237 | * MAP_SHARED, vp_fd, | ||
| 238 | * MSHV_VP_MMAP_OFFSET_REGISTERS * page_size); | ||
| 239 | */ | ||
| 240 | enum { | ||
| 241 | 	MSHV_VP_MMAP_OFFSET_REGISTERS, | ||
| 242 | 	MSHV_VP_MMAP_OFFSET_INTERCEPT_MESSAGE, | ||
| 243 | 	MSHV_VP_MMAP_OFFSET_GHCB, | ||
| 244 | 	MSHV_VP_MMAP_OFFSET_COUNT | ||
| 245 | }; | ||
| 246 | |||
| 247 | /** | ||
| 248 | * struct mshv_run_vp - argument for MSHV_RUN_VP | ||
| 249 | * @msg_buf: On success, the intercept message is copied here. It can be | ||
| 250 | * interpreted using the relevant hypervisor definitions. | ||
| 251 | */ | ||
| 252 | struct mshv_run_vp { | ||
| 253 | 	__u8 msg_buf[MSHV_RUN_VP_BUF_SZ]; | ||
| 254 | }; | ||
| 255 | |||
| 256 | enum { | ||
| 257 | 	MSHV_VP_STATE_LAPIC,		/* Local interrupt controller state (either arch) */ | ||
| 258 | 	MSHV_VP_STATE_XSAVE,		/* XSAVE data in compacted form (x86_64) */ | ||
| 259 | 	MSHV_VP_STATE_SIMP, | ||
| 260 | 	MSHV_VP_STATE_SIEFP, | ||
| 261 | 	MSHV_VP_STATE_SYNTHETIC_TIMERS, | ||
| 262 | 	MSHV_VP_STATE_COUNT, | ||
| 263 | }; | ||
| 264 | |||
| 265 | /** | ||
| 266 | * struct mshv_get_set_vp_state - arguments for MSHV_[GET,SET]_VP_STATE | ||
| 267 | * @type: MSHV_VP_STATE_* | ||
| 268 | * @rsvd: MBZ | ||
| 269 | * @buf_sz: in: 4k page-aligned size of buffer | ||
| 270 | * out: Actual size of data (on EINVAL, check this to see if buffer | ||
| 271 | * was too small) | ||
| 272 | * @buf_ptr: 4k page-aligned data buffer | ||
| 273 | */ | ||
| 274 | struct mshv_get_set_vp_state { | ||
| 275 | 	__u8 type; | ||
| 276 | 	__u8 rsvd[3]; | ||
| 277 | 	__u32 buf_sz; | ||
| 278 | 	__u64 buf_ptr; | ||
| 279 | }; | ||
| 280 | |||
| 281 | /* VP fds created with MSHV_CREATE_VP */ | ||
| 282 | #define MSHV_RUN_VP			_IOR(MSHV_IOCTL, 0x00, struct mshv_run_vp) | ||
| 283 | #define MSHV_GET_VP_STATE		_IOWR(MSHV_IOCTL, 0x01, struct mshv_get_set_vp_state) | ||
| 284 | #define MSHV_SET_VP_STATE		_IOWR(MSHV_IOCTL, 0x02, struct mshv_get_set_vp_state) | ||
| 285 | /* | ||
| 286 | * Generic hypercall | ||
| 287 | * Defined above in partition IOCTLs, avoid redefining it here | ||
| 288 | * #define MSHV_ROOT_HVCALL			_IOWR(MSHV_IOCTL, 0x07, struct mshv_root_hvcall) | ||
| 289 | */ | ||
| 290 | |||
| 291 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/neighbour.h+5| ... | @@ -54,6 +54,7 @@ enum { | ... | @@ -54,6 +54,7 @@ enum { |
| 54 | /* Extended flags under NDA_FLAGS_EXT: */ | 54 | /* Extended flags under NDA_FLAGS_EXT: */ |
| 55 | #define NTF_EXT_MANAGED		(1 << 0) | 55 | #define NTF_EXT_MANAGED		(1 << 0) |
| 56 | #define NTF_EXT_LOCKED		(1 << 1) | 56 | #define NTF_EXT_LOCKED		(1 << 1) |
| 57 | #define NTF_EXT_EXT_VALIDATED	(1 << 2) | ||
| 57 | 58 | ||
| 58 | /* | 59 | /* |
| 59 | *	Neighbor Cache Entry States. | 60 | *	Neighbor Cache Entry States. |
| ... | @@ -92,6 +93,10 @@ enum { | ... | @@ -92,6 +93,10 @@ enum { |
| 92 | * bridge in response to a host trying to communicate via a locked bridge port | 93 | * bridge in response to a host trying to communicate via a locked bridge port |
| 93 | * with MAB enabled. Their purpose is to notify user space that a host requires | 94 | * with MAB enabled. Their purpose is to notify user space that a host requires |
| 94 | * authentication. | 95 | * authentication. |
| 96 | * | ||
| 97 | * NTF_EXT_EXT_VALIDATED flagged neighbor entries were externally validated by | ||
| 98 | * a user space control plane. The kernel will not remove or invalidate them, | ||
| 99 | * but it can probe them and notify user space when they become reachable. | ||
| 95 | */ | 100 | */ |
| 96 | 101 | ||
| 97 | struct nda_cacheinfo { | 102 | struct nda_cacheinfo { |
lib/libc/include/any-linux-any/linux/net_dropmon.h-7| ... | @@ -10,13 +10,6 @@ struct net_dm_drop_point { | ... | @@ -10,13 +10,6 @@ struct net_dm_drop_point { |
| 10 | 	__u32 count; | 10 | 	__u32 count; |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | #define is_drop_point_hw(x) do {\ | ||
| 14 | 	int ____i, ____j;\ | ||
| 15 | 	for (____i = 0; ____i < 8; i ____i++)\ | ||
| 16 | 		____j |= x[____i];\ | ||
| 17 | 	____j;\ | ||
| 18 | } while (0) | ||
| 19 | |||
| 20 | #define NET_DM_CFG_VERSION 0 | 13 | #define NET_DM_CFG_VERSION 0 |
| 21 | #define NET_DM_CFG_ALERT_COUNT 1 | 14 | #define NET_DM_CFG_ALERT_COUNT 1 |
| 22 | #define NET_DM_CFG_ALERT_DELAY 2 | 15 | #define NET_DM_CFG_ALERT_DELAY 2 |
lib/libc/include/any-linux-any/linux/net_tstamp.h+15-2| ... | @@ -13,6 +13,17 @@ | ... | @@ -13,6 +13,17 @@ |
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | #include <linux/socket.h> /* for SO_TIMESTAMPING */ | 14 | #include <linux/socket.h> /* for SO_TIMESTAMPING */ |
| 15 | 15 | ||
| 16 | /* | ||
| 17 | * Possible type of hwtstamp provider. Mainly "precise" the default one | ||
| 18 | * is for IEEE 1588 quality and "approx" is for NICs DMA point. | ||
| 19 | */ | ||
| 20 | enum hwtstamp_provider_qualifier { | ||
| 21 | 	HWTSTAMP_PROVIDER_QUALIFIER_PRECISE, | ||
| 22 | 	HWTSTAMP_PROVIDER_QUALIFIER_APPROX, | ||
| 23 | |||
| 24 | 	HWTSTAMP_PROVIDER_QUALIFIER_CNT, | ||
| 25 | }; | ||
| 26 | |||
| 16 | /* SO_TIMESTAMPING flags */ | 27 | /* SO_TIMESTAMPING flags */ |
| 17 | enum { | 28 | enum { |
| 18 | 	SOF_TIMESTAMPING_TX_HARDWARE = (1<<0), | 29 | 	SOF_TIMESTAMPING_TX_HARDWARE = (1<<0), |
| ... | @@ -33,8 +44,9 @@ enum { | ... | @@ -33,8 +44,9 @@ enum { |
| 33 | 	SOF_TIMESTAMPING_BIND_PHC = (1 << 15), | 44 | 	SOF_TIMESTAMPING_BIND_PHC = (1 << 15), |
| 34 | 	SOF_TIMESTAMPING_OPT_ID_TCP = (1 << 16), | 45 | 	SOF_TIMESTAMPING_OPT_ID_TCP = (1 << 16), |
| 35 | 	SOF_TIMESTAMPING_OPT_RX_FILTER = (1 << 17), | 46 | 	SOF_TIMESTAMPING_OPT_RX_FILTER = (1 << 17), |
| 47 | 	SOF_TIMESTAMPING_TX_COMPLETION = (1 << 18), | ||
| 36 | 48 | ||
| 37 | 	SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_RX_FILTER, | 49 | 	SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_TX_COMPLETION, |
| 38 | 	SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | | 50 | 	SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | |
| 39 | 				 SOF_TIMESTAMPING_LAST | 51 | 				 SOF_TIMESTAMPING_LAST |
| 40 | }; | 52 | }; |
| ... | @@ -47,7 +59,8 @@ enum { | ... | @@ -47,7 +59,8 @@ enum { |
| 47 | #define SOF_TIMESTAMPING_TX_RECORD_MASK	(SOF_TIMESTAMPING_TX_HARDWARE | \ | 59 | #define SOF_TIMESTAMPING_TX_RECORD_MASK	(SOF_TIMESTAMPING_TX_HARDWARE | \ |
| 48 | 					 SOF_TIMESTAMPING_TX_SOFTWARE | \ | 60 | 					 SOF_TIMESTAMPING_TX_SOFTWARE | \ |
| 49 | 					 SOF_TIMESTAMPING_TX_SCHED | \ | 61 | 					 SOF_TIMESTAMPING_TX_SCHED | \ |
| 50 | 					 SOF_TIMESTAMPING_TX_ACK) | 62 | 					 SOF_TIMESTAMPING_TX_ACK | \ |
| 63 | 					 SOF_TIMESTAMPING_TX_COMPLETION) | ||
| 51 | 64 | ||
| 52 | /** | 65 | /** |
| 53 | * struct so_timestamping - SO_TIMESTAMPING parameter | 66 | * struct so_timestamping - SO_TIMESTAMPING parameter |
lib/libc/include/any-linux-any/linux/netconf.h+1| ... | @@ -19,6 +19,7 @@ enum { | ... | @@ -19,6 +19,7 @@ enum { |
| 19 | 	NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN, | 19 | 	NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN, |
| 20 | 	NETCONFA_INPUT, | 20 | 	NETCONFA_INPUT, |
| 21 | 	NETCONFA_BC_FORWARDING, | 21 | 	NETCONFA_BC_FORWARDING, |
| 22 | 	NETCONFA_FORCE_FORWARDING, | ||
| 22 | 	__NETCONFA_MAX | 23 | 	__NETCONFA_MAX |
| 23 | }; | 24 | }; |
| 24 | #define NETCONFA_MAX	(__NETCONFA_MAX - 1) | 25 | #define NETCONFA_MAX	(__NETCONFA_MAX - 1) |
lib/libc/include/any-linux-any/linux/netdev.h+23| ... | @@ -59,10 +59,13 @@ enum netdev_xdp_rx_metadata { | ... | @@ -59,10 +59,13 @@ enum netdev_xdp_rx_metadata { |
| 59 | * by the driver. | 59 | * by the driver. |
| 60 | * @NETDEV_XSK_FLAGS_TX_CHECKSUM: L3 checksum HW offload is supported by the | 60 | * @NETDEV_XSK_FLAGS_TX_CHECKSUM: L3 checksum HW offload is supported by the |
| 61 | * driver. | 61 | * driver. |
| 62 | * @NETDEV_XSK_FLAGS_TX_LAUNCH_TIME_FIFO: Launch time HW offload is supported | ||
| 63 | * by the driver. | ||
| 62 | */ | 64 | */ |
| 63 | enum netdev_xsk_flags { | 65 | enum netdev_xsk_flags { |
| 64 | 	NETDEV_XSK_FLAGS_TX_TIMESTAMP = 1, | 66 | 	NETDEV_XSK_FLAGS_TX_TIMESTAMP = 1, |
| 65 | 	NETDEV_XSK_FLAGS_TX_CHECKSUM = 2, | 67 | 	NETDEV_XSK_FLAGS_TX_CHECKSUM = 2, |
| 68 | 	NETDEV_XSK_FLAGS_TX_LAUNCH_TIME_FIFO = 4, | ||
| 66 | }; | 69 | }; |
| 67 | 70 | ||
| 68 | enum netdev_queue_type { | 71 | enum netdev_queue_type { |
| ... | @@ -74,6 +77,11 @@ enum netdev_qstats_scope { | ... | @@ -74,6 +77,11 @@ enum netdev_qstats_scope { |
| 74 | 	NETDEV_QSTATS_SCOPE_QUEUE = 1, | 77 | 	NETDEV_QSTATS_SCOPE_QUEUE = 1, |
| 75 | }; | 78 | }; |
| 76 | 79 | ||
| 80 | enum netdev_napi_threaded { | ||
| 81 | 	NETDEV_NAPI_THREADED_DISABLED, | ||
| 82 | 	NETDEV_NAPI_THREADED_ENABLED, | ||
| 83 | }; | ||
| 84 | |||
| 77 | enum { | 85 | enum { |
| 78 | 	NETDEV_A_DEV_IFINDEX = 1, | 86 | 	NETDEV_A_DEV_IFINDEX = 1, |
| 79 | 	NETDEV_A_DEV_PAD, | 87 | 	NETDEV_A_DEV_PAD, |
| ... | @@ -86,6 +94,11 @@ enum { | ... | @@ -86,6 +94,11 @@ enum { |
| 86 | 	NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) | 94 | 	NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) |
| 87 | }; | 95 | }; |
| 88 | 96 | ||
| 97 | enum { | ||
| 98 | 	__NETDEV_A_IO_URING_PROVIDER_INFO_MAX, | ||
| 99 | 	NETDEV_A_IO_URING_PROVIDER_INFO_MAX = (__NETDEV_A_IO_URING_PROVIDER_INFO_MAX - 1) | ||
| 100 | }; | ||
| 101 | |||
| 89 | enum { | 102 | enum { |
| 90 | 	NETDEV_A_PAGE_POOL_ID = 1, | 103 | 	NETDEV_A_PAGE_POOL_ID = 1, |
| 91 | 	NETDEV_A_PAGE_POOL_IFINDEX, | 104 | 	NETDEV_A_PAGE_POOL_IFINDEX, |
| ... | @@ -94,6 +107,7 @@ enum { | ... | @@ -94,6 +107,7 @@ enum { |
| 94 | 	NETDEV_A_PAGE_POOL_INFLIGHT_MEM, | 107 | 	NETDEV_A_PAGE_POOL_INFLIGHT_MEM, |
| 95 | 	NETDEV_A_PAGE_POOL_DETACH_TIME, | 108 | 	NETDEV_A_PAGE_POOL_DETACH_TIME, |
| 96 | 	NETDEV_A_PAGE_POOL_DMABUF, | 109 | 	NETDEV_A_PAGE_POOL_DMABUF, |
| 110 | 	NETDEV_A_PAGE_POOL_IO_URING, | ||
| 97 | 111 | ||
| 98 | 	__NETDEV_A_PAGE_POOL_MAX, | 112 | 	__NETDEV_A_PAGE_POOL_MAX, |
| 99 | 	NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1) | 113 | 	NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1) |
| ... | @@ -125,17 +139,25 @@ enum { | ... | @@ -125,17 +139,25 @@ enum { |
| 125 | 	NETDEV_A_NAPI_DEFER_HARD_IRQS, | 139 | 	NETDEV_A_NAPI_DEFER_HARD_IRQS, |
| 126 | 	NETDEV_A_NAPI_GRO_FLUSH_TIMEOUT, | 140 | 	NETDEV_A_NAPI_GRO_FLUSH_TIMEOUT, |
| 127 | 	NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT, | 141 | 	NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT, |
| 142 | 	NETDEV_A_NAPI_THREADED, | ||
| 128 | 143 | ||
| 129 | 	__NETDEV_A_NAPI_MAX, | 144 | 	__NETDEV_A_NAPI_MAX, |
| 130 | 	NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1) | 145 | 	NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1) |
| 131 | }; | 146 | }; |
| 132 | 147 | ||
| 148 | enum { | ||
| 149 | 	__NETDEV_A_XSK_INFO_MAX, | ||
| 150 | 	NETDEV_A_XSK_INFO_MAX = (__NETDEV_A_XSK_INFO_MAX - 1) | ||
| 151 | }; | ||
| 152 | |||
| 133 | enum { | 153 | enum { |
| 134 | 	NETDEV_A_QUEUE_ID = 1, | 154 | 	NETDEV_A_QUEUE_ID = 1, |
| 135 | 	NETDEV_A_QUEUE_IFINDEX, | 155 | 	NETDEV_A_QUEUE_IFINDEX, |
| 136 | 	NETDEV_A_QUEUE_TYPE, | 156 | 	NETDEV_A_QUEUE_TYPE, |
| 137 | 	NETDEV_A_QUEUE_NAPI_ID, | 157 | 	NETDEV_A_QUEUE_NAPI_ID, |
| 138 | 	NETDEV_A_QUEUE_DMABUF, | 158 | 	NETDEV_A_QUEUE_DMABUF, |
| 159 | 	NETDEV_A_QUEUE_IO_URING, | ||
| 160 | 	NETDEV_A_QUEUE_XSK, | ||
| 139 | 161 | ||
| 140 | 	__NETDEV_A_QUEUE_MAX, | 162 | 	__NETDEV_A_QUEUE_MAX, |
| 141 | 	NETDEV_A_QUEUE_MAX = (__NETDEV_A_QUEUE_MAX - 1) | 163 | 	NETDEV_A_QUEUE_MAX = (__NETDEV_A_QUEUE_MAX - 1) |
| ... | @@ -203,6 +225,7 @@ enum { | ... | @@ -203,6 +225,7 @@ enum { |
| 203 | 	NETDEV_CMD_QSTATS_GET, | 225 | 	NETDEV_CMD_QSTATS_GET, |
| 204 | 	NETDEV_CMD_BIND_RX, | 226 | 	NETDEV_CMD_BIND_RX, |
| 205 | 	NETDEV_CMD_NAPI_SET, | 227 | 	NETDEV_CMD_NAPI_SET, |
| 228 | 	NETDEV_CMD_BIND_TX, | ||
| 206 | 229 | ||
| 207 | 	__NETDEV_CMD_MAX, | 230 | 	__NETDEV_CMD_MAX, |
| 208 | 	NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) | 231 | 	NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) |
lib/libc/include/any-linux-any/linux/netfilter/nf_tables.h+14| ... | @@ -394,6 +394,8 @@ enum nft_set_field_attributes { | ... | @@ -394,6 +394,8 @@ enum nft_set_field_attributes { |
| 394 | * @NFTA_SET_HANDLE: set handle (NLA_U64) | 394 | * @NFTA_SET_HANDLE: set handle (NLA_U64) |
| 395 | * @NFTA_SET_EXPR: set expression (NLA_NESTED: nft_expr_attributes) | 395 | * @NFTA_SET_EXPR: set expression (NLA_NESTED: nft_expr_attributes) |
| 396 | * @NFTA_SET_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes) | 396 | * @NFTA_SET_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes) |
| 397 | * @NFTA_SET_TYPE: set backend type (NLA_STRING) | ||
| 398 | * @NFTA_SET_COUNT: number of set elements (NLA_U32) | ||
| 397 | */ | 399 | */ |
| 398 | enum nft_set_attributes { | 400 | enum nft_set_attributes { |
| 399 | 	NFTA_SET_UNSPEC, | 401 | 	NFTA_SET_UNSPEC, |
| ... | @@ -415,6 +417,8 @@ enum nft_set_attributes { | ... | @@ -415,6 +417,8 @@ enum nft_set_attributes { |
| 415 | 	NFTA_SET_HANDLE, | 417 | 	NFTA_SET_HANDLE, |
| 416 | 	NFTA_SET_EXPR, | 418 | 	NFTA_SET_EXPR, |
| 417 | 	NFTA_SET_EXPRESSIONS, | 419 | 	NFTA_SET_EXPRESSIONS, |
| 420 | 	NFTA_SET_TYPE, | ||
| 421 | 	NFTA_SET_COUNT, | ||
| 418 | 	__NFTA_SET_MAX | 422 | 	__NFTA_SET_MAX |
| 419 | }; | 423 | }; |
| 420 | #define NFTA_SET_MAX		(__NFTA_SET_MAX - 1) | 424 | #define NFTA_SET_MAX		(__NFTA_SET_MAX - 1) |
| ... | @@ -1780,10 +1784,12 @@ enum nft_synproxy_attributes { | ... | @@ -1780,10 +1784,12 @@ enum nft_synproxy_attributes { |
| 1780 | * enum nft_device_attributes - nf_tables device netlink attributes | 1784 | * enum nft_device_attributes - nf_tables device netlink attributes |
| 1781 | * | 1785 | * |
| 1782 | * @NFTA_DEVICE_NAME: name of this device (NLA_STRING) | 1786 | * @NFTA_DEVICE_NAME: name of this device (NLA_STRING) |
| 1787 | * @NFTA_DEVICE_PREFIX: device name prefix, a simple wildcard (NLA_STRING) | ||
| 1783 | */ | 1788 | */ |
| 1784 | enum nft_devices_attributes { | 1789 | enum nft_devices_attributes { |
| 1785 | 	NFTA_DEVICE_UNSPEC, | 1790 | 	NFTA_DEVICE_UNSPEC, |
| 1786 | 	NFTA_DEVICE_NAME, | 1791 | 	NFTA_DEVICE_NAME, |
| 1792 | 	NFTA_DEVICE_PREFIX, | ||
| 1787 | 	__NFTA_DEVICE_MAX | 1793 | 	__NFTA_DEVICE_MAX |
| 1788 | }; | 1794 | }; |
| 1789 | #define NFTA_DEVICE_MAX		(__NFTA_DEVICE_MAX - 1) | 1795 | #define NFTA_DEVICE_MAX		(__NFTA_DEVICE_MAX - 1) |
| ... | @@ -1837,6 +1843,10 @@ enum nft_xfrm_keys { | ... | @@ -1837,6 +1843,10 @@ enum nft_xfrm_keys { |
| 1837 | * @NFTA_TRACE_MARK: nfmark (NLA_U32) | 1843 | * @NFTA_TRACE_MARK: nfmark (NLA_U32) |
| 1838 | * @NFTA_TRACE_NFPROTO: nf protocol processed (NLA_U32) | 1844 | * @NFTA_TRACE_NFPROTO: nf protocol processed (NLA_U32) |
| 1839 | * @NFTA_TRACE_POLICY: policy that decided fate of packet (NLA_U32) | 1845 | * @NFTA_TRACE_POLICY: policy that decided fate of packet (NLA_U32) |
| 1846 | * @NFTA_TRACE_CT_ID: conntrack id (NLA_U32) | ||
| 1847 | * @NFTA_TRACE_CT_DIRECTION: packets direction (NLA_U8) | ||
| 1848 | * @NFTA_TRACE_CT_STATUS: conntrack status (NLA_U32) | ||
| 1849 | * @NFTA_TRACE_CT_STATE: packet state (new, established, ...) (NLA_U32) | ||
| 1840 | */ | 1850 | */ |
| 1841 | enum nft_trace_attributes { | 1851 | enum nft_trace_attributes { |
| 1842 | 	NFTA_TRACE_UNSPEC, | 1852 | 	NFTA_TRACE_UNSPEC, |
| ... | @@ -1857,6 +1867,10 @@ enum nft_trace_attributes { | ... | @@ -1857,6 +1867,10 @@ enum nft_trace_attributes { |
| 1857 | 	NFTA_TRACE_NFPROTO, | 1867 | 	NFTA_TRACE_NFPROTO, |
| 1858 | 	NFTA_TRACE_POLICY, | 1868 | 	NFTA_TRACE_POLICY, |
| 1859 | 	NFTA_TRACE_PAD, | 1869 | 	NFTA_TRACE_PAD, |
| 1870 | 	NFTA_TRACE_CT_ID, | ||
| 1871 | 	NFTA_TRACE_CT_DIRECTION, | ||
| 1872 | 	NFTA_TRACE_CT_STATUS, | ||
| 1873 | 	NFTA_TRACE_CT_STATE, | ||
| 1860 | 	__NFTA_TRACE_MAX | 1874 | 	__NFTA_TRACE_MAX |
| 1861 | }; | 1875 | }; |
| 1862 | #define NFTA_TRACE_MAX (__NFTA_TRACE_MAX - 1) | 1876 | #define NFTA_TRACE_MAX (__NFTA_TRACE_MAX - 1) |
lib/libc/include/any-linux-any/linux/netfilter/nfnetlink_conntrack.h+1| ... | @@ -57,6 +57,7 @@ enum ctattr_type { | ... | @@ -57,6 +57,7 @@ enum ctattr_type { |
| 57 | 	CTA_SYNPROXY, | 57 | 	CTA_SYNPROXY, |
| 58 | 	CTA_FILTER, | 58 | 	CTA_FILTER, |
| 59 | 	CTA_STATUS_MASK, | 59 | 	CTA_STATUS_MASK, |
| 60 | 	CTA_TIMESTAMP_EVENT, | ||
| 60 | 	__CTA_MAX | 61 | 	__CTA_MAX |
| 61 | }; | 62 | }; |
| 62 | #define CTA_MAX (__CTA_MAX - 1) | 63 | #define CTA_MAX (__CTA_MAX - 1) |
lib/libc/include/any-linux-any/linux/netfilter/nfnetlink_hook.h+2| ... | @@ -61,10 +61,12 @@ enum nfnl_hook_chain_desc_attributes { | ... | @@ -61,10 +61,12 @@ enum nfnl_hook_chain_desc_attributes { |
| 61 | * | 61 | * |
| 62 | * @NFNL_HOOK_TYPE_NFTABLES: nf_tables base chain | 62 | * @NFNL_HOOK_TYPE_NFTABLES: nf_tables base chain |
| 63 | * @NFNL_HOOK_TYPE_BPF: bpf program | 63 | * @NFNL_HOOK_TYPE_BPF: bpf program |
| 64 | * @NFNL_HOOK_TYPE_NFT_FLOWTABLE: nf_tables flowtable | ||
| 64 | */ | 65 | */ |
| 65 | enum nfnl_hook_chaintype { | 66 | enum nfnl_hook_chaintype { |
| 66 | 	NFNL_HOOK_TYPE_NFTABLES = 0x1, | 67 | 	NFNL_HOOK_TYPE_NFTABLES = 0x1, |
| 67 | 	NFNL_HOOK_TYPE_BPF, | 68 | 	NFNL_HOOK_TYPE_BPF, |
| 69 | 	NFNL_HOOK_TYPE_NFT_FLOWTABLE, | ||
| 68 | }; | 70 | }; |
| 69 | 71 | ||
| 70 | /** | 72 | /** |
lib/libc/include/any-linux-any/linux/nfs4.h+5-2| ... | @@ -58,7 +58,7 @@ | ... | @@ -58,7 +58,7 @@ |
| 58 | #define NFS4_SHARE_DENY_BOTH	0x0003 | 58 | #define NFS4_SHARE_DENY_BOTH	0x0003 |
| 59 | 59 | ||
| 60 | /* nfs41 */ | 60 | /* nfs41 */ |
| 61 | #define NFS4_SHARE_WANT_MASK		0xFF00 | 61 | #define NFS4_SHARE_WANT_TYPE_MASK	0xFF00 |
| 62 | #define NFS4_SHARE_WANT_NO_PREFERENCE	0x0000 | 62 | #define NFS4_SHARE_WANT_NO_PREFERENCE	0x0000 |
| 63 | #define NFS4_SHARE_WANT_READ_DELEG	0x0100 | 63 | #define NFS4_SHARE_WANT_READ_DELEG	0x0100 |
| 64 | #define NFS4_SHARE_WANT_WRITE_DELEG	0x0200 | 64 | #define NFS4_SHARE_WANT_WRITE_DELEG	0x0200 |
| ... | @@ -66,13 +66,16 @@ | ... | @@ -66,13 +66,16 @@ |
| 66 | #define NFS4_SHARE_WANT_NO_DELEG	0x0400 | 66 | #define NFS4_SHARE_WANT_NO_DELEG	0x0400 |
| 67 | #define NFS4_SHARE_WANT_CANCEL		0x0500 | 67 | #define NFS4_SHARE_WANT_CANCEL		0x0500 |
| 68 | 68 | ||
| 69 | #define NFS4_SHARE_WHEN_MASK		0xF0000 | 69 | #define NFS4_SHARE_WHEN_MASK				0xF0000 |
| 70 | #define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL	0x10000 | 70 | #define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL	0x10000 |
| 71 | #define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED		0x20000 | 71 | #define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED		0x20000 |
| 72 | 72 | ||
| 73 | #define NFS4_SHARE_WANT_MOD_MASK			0xF00000 | ||
| 73 | #define NFS4_SHARE_WANT_DELEG_TIMESTAMPS		0x100000 | 74 | #define NFS4_SHARE_WANT_DELEG_TIMESTAMPS		0x100000 |
| 74 | #define NFS4_SHARE_WANT_OPEN_XOR_DELEGATION		0x200000 | 75 | #define NFS4_SHARE_WANT_OPEN_XOR_DELEGATION		0x200000 |
| 75 | 76 | ||
| 77 | #define NFS4_SHARE_WANT_MASK	(NFS4_SHARE_WANT_TYPE_MASK | NFS4_SHARE_WANT_MOD_MASK) | ||
| 78 | |||
| 76 | #define NFS4_CDFC4_FORE	0x1 | 79 | #define NFS4_CDFC4_FORE	0x1 |
| 77 | #define NFS4_CDFC4_BACK 0x2 | 80 | #define NFS4_CDFC4_BACK 0x2 |
| 78 | #define NFS4_CDFC4_BOTH 0x3 | 81 | #define NFS4_CDFC4_BOTH 0x3 |
lib/libc/include/any-linux-any/linux/nilfs2_ondisk.h+2-1| ... | @@ -188,7 +188,8 @@ struct nilfs_super_block { | ... | @@ -188,7 +188,8 @@ struct nilfs_super_block { |
| 188 | 	__le16	s_segment_usage_size;	/* Size of a segment usage */ | 188 | 	__le16	s_segment_usage_size;	/* Size of a segment usage */ |
| 189 | 189 | ||
| 190 | /*98*/	__u8	s_uuid[16];		/* 128-bit uuid for volume */ | 190 | /*98*/	__u8	s_uuid[16];		/* 128-bit uuid for volume */ |
| 191 | /*A8*/	char	s_volume_name[80];	/* volume name */ | 191 | /*A8*/	char	s_volume_name[80]	/* volume name */ |
| 192 | 			__kernel_nonstring; | ||
| 192 | 193 | ||
| 193 | /*F8*/	__le32 s_c_interval; /* Commit interval of segment */ | 194 | /*F8*/	__le32 s_c_interval; /* Commit interval of segment */ |
| 194 | 	__le32 s_c_block_max; /* | 195 | 	__le32 s_c_block_max; /* |
lib/libc/include/any-linux-any/linux/nl80211.h+133-26| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 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-2024 Intel Corporation | 14 | * Copyright (C) 2018-2025 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 |
| ... | @@ -1329,6 +1329,21 @@ | ... | @@ -1329,6 +1329,21 @@ |
| 1329 | * %NL80211_ATTR_MLO_TTLM_ULINK attributes are used to specify the | 1329 | * %NL80211_ATTR_MLO_TTLM_ULINK attributes are used to specify the |
| 1330 | * TID to Link mapping for downlink/uplink traffic. | 1330 | * TID to Link mapping for downlink/uplink traffic. |
| 1331 | * | 1331 | * |
| 1332 | * @NL80211_CMD_ASSOC_MLO_RECONF: For a non-AP MLD station, request to | ||
| 1333 | * add/remove links to/from the association. To indicate link | ||
| 1334 | * reconfiguration request results from the driver, this command is also | ||
| 1335 | * used as an event to notify userspace about the added links information. | ||
| 1336 | * For notifying the removed links information, the existing | ||
| 1337 | * %NL80211_CMD_LINKS_REMOVED command is used. This command is also used to | ||
| 1338 | * notify userspace about newly added links for the current connection in | ||
| 1339 | * case of AP-initiated link recommendation requests, received via | ||
| 1340 | * a BTM (BSS Transition Management) request or a link reconfig notify | ||
| 1341 | * frame, where the driver handles the link recommendation offload. | ||
| 1342 | * | ||
| 1343 | * @NL80211_CMD_EPCS_CFG: EPCS configuration for a station. Used by userland to | ||
| 1344 | *	control EPCS configuration. Used to notify userland on the current state | ||
| 1345 | *	of EPCS. | ||
| 1346 | * | ||
| 1332 | * @NL80211_CMD_MAX: highest used command number | 1347 | * @NL80211_CMD_MAX: highest used command number |
| 1333 | * @__NL80211_CMD_AFTER_LAST: internal use | 1348 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 1334 | */ | 1349 | */ |
| ... | @@ -1586,6 +1601,9 @@ enum nl80211_commands { | ... | @@ -1586,6 +1601,9 @@ enum nl80211_commands { |
| 1586 | 1601 | ||
| 1587 | 	NL80211_CMD_SET_TID_TO_LINK_MAPPING, | 1602 | 	NL80211_CMD_SET_TID_TO_LINK_MAPPING, |
| 1588 | 1603 | ||
| 1604 | 	NL80211_CMD_ASSOC_MLO_RECONF, | ||
| 1605 | 	NL80211_CMD_EPCS_CFG, | ||
| 1606 | |||
| 1589 | 	/* add new commands above here */ | 1607 | 	/* add new commands above here */ |
| 1590 | 1608 | ||
| 1591 | 	/* used to define NL80211_CMD_MAX below */ | 1609 | 	/* used to define NL80211_CMD_MAX below */ |
| ... | @@ -2871,6 +2889,45 @@ enum nl80211_commands { | ... | @@ -2871,6 +2889,45 @@ enum nl80211_commands { |
| 2871 | * @NL80211_ATTR_VIF_RADIO_MASK: Bitmask of allowed radios (u32). | 2889 | * @NL80211_ATTR_VIF_RADIO_MASK: Bitmask of allowed radios (u32). |
| 2872 | *	A value of 0 means all radios. | 2890 | *	A value of 0 means all radios. |
| 2873 | * | 2891 | * |
| 2892 | * @NL80211_ATTR_SUPPORTED_SELECTORS: supported BSS Membership Selectors, array | ||
| 2893 | *	of supported selectors as defined by IEEE Std 802.11-2020 9.4.2.3 but | ||
| 2894 | *	without the length restriction (at most %NL80211_MAX_SUPP_SELECTORS). | ||
| 2895 | *	This can be used to provide a list of selectors that are implemented | ||
| 2896 | *	by the supplicant. If not given, support for SAE_H2E is assumed. | ||
| 2897 | * | ||
| 2898 | * @NL80211_ATTR_MLO_RECONF_REM_LINKS: (u16) A bitmask of the links requested | ||
| 2899 | * to be removed from the MLO association. | ||
| 2900 | * | ||
| 2901 | * @NL80211_ATTR_EPCS: Flag attribute indicating that EPCS is enabled for a | ||
| 2902 | *	station interface. | ||
| 2903 | * | ||
| 2904 | * @NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS: Extended MLD capabilities and | ||
| 2905 | *	operations that userspace implements to use during association/ML | ||
| 2906 | *	link reconfig, currently only "BTM MLD Recommendation For Multiple | ||
| 2907 | *	APs Support". Drivers may set additional flags that they support | ||
| 2908 | *	in the kernel or device. | ||
| 2909 | * | ||
| 2910 | * @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index | ||
| 2911 | *	of the radio in interest. Internally a value of -1 is used to | ||
| 2912 | *	indicate that the radio id is not given in user-space. This means | ||
| 2913 | *	that all the attributes are applicable to all the radios. If there is | ||
| 2914 | *	a radio index provided in user-space, the attributes will be | ||
| 2915 | *	applicable to that specific radio only. If the radio id is greater | ||
| 2916 | *	thank the number of radios, error denoting invalid value is returned. | ||
| 2917 | * | ||
| 2918 | * @NL80211_ATTR_S1G_LONG_BEACON_PERIOD: (u8) Integer attribute that represents | ||
| 2919 | *	the number of beacon intervals between each long beacon transmission | ||
| 2920 | *	for an S1G BSS with short beaconing enabled. This is a required | ||
| 2921 | *	attribute for initialising an S1G short beaconing BSS. When updating | ||
| 2922 | *	the short beacon data, this is not required. It has a minimum value of | ||
| 2923 | *	2 (i.e 2 beacon intervals). | ||
| 2924 | * | ||
| 2925 | * @NL80211_ATTR_S1G_SHORT_BEACON: Nested attribute containing the short beacon | ||
| 2926 | *	head and tail used to set or update the short beacon templates. When | ||
| 2927 | *	bringing up a new interface, %NL80211_ATTR_S1G_LONG_BEACON_PERIOD is | ||
| 2928 | *	required alongside this attribute. Refer to | ||
| 2929 | *	@enum nl80211_s1g_short_beacon_attrs for the attribute definitions. | ||
| 2930 | * | ||
| 2874 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2931 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2875 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2932 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2876 | * @__NL80211_ATTR_AFTER_LAST: internal use | 2933 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| ... | @@ -3421,6 +3478,18 @@ enum nl80211_attrs { | ... | @@ -3421,6 +3478,18 @@ enum nl80211_attrs { |
| 3421 | 3478 | ||
| 3422 | 	NL80211_ATTR_VIF_RADIO_MASK, | 3479 | 	NL80211_ATTR_VIF_RADIO_MASK, |
| 3423 | 3480 | ||
| 3481 | 	NL80211_ATTR_SUPPORTED_SELECTORS, | ||
| 3482 | |||
| 3483 | 	NL80211_ATTR_MLO_RECONF_REM_LINKS, | ||
| 3484 | 	NL80211_ATTR_EPCS, | ||
| 3485 | |||
| 3486 | 	NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS, | ||
| 3487 | |||
| 3488 | 	NL80211_ATTR_WIPHY_RADIO_INDEX, | ||
| 3489 | |||
| 3490 | 	NL80211_ATTR_S1G_LONG_BEACON_PERIOD, | ||
| 3491 | 	NL80211_ATTR_S1G_SHORT_BEACON, | ||
| 3492 | |||
| 3424 | 	/* add attributes here, update the policy in nl80211.c */ | 3493 | 	/* add attributes here, update the policy in nl80211.c */ |
| 3425 | 3494 | ||
| 3426 | 	__NL80211_ATTR_AFTER_LAST, | 3495 | 	__NL80211_ATTR_AFTER_LAST, |
| ... | @@ -3465,6 +3534,7 @@ enum nl80211_attrs { | ... | @@ -3465,6 +3534,7 @@ enum nl80211_attrs { |
| 3465 | #define NL80211_WIPHY_NAME_MAXLEN		64 | 3534 | #define NL80211_WIPHY_NAME_MAXLEN		64 |
| 3466 | 3535 | ||
| 3467 | #define NL80211_MAX_SUPP_RATES			32 | 3536 | #define NL80211_MAX_SUPP_RATES			32 |
| 3537 | #define NL80211_MAX_SUPP_SELECTORS		128 | ||
| 3468 | #define NL80211_MAX_SUPP_HT_RATES		77 | 3538 | #define NL80211_MAX_SUPP_HT_RATES		77 |
| 3469 | #define NL80211_MAX_SUPP_REG_RULES		128 | 3539 | #define NL80211_MAX_SUPP_REG_RULES		128 |
| 3470 | #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY	0 | 3540 | #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY	0 |
| ... | @@ -4299,6 +4369,8 @@ enum nl80211_wmm_rule { | ... | @@ -4299,6 +4369,8 @@ enum nl80211_wmm_rule { |
| 4299 | *	otherwise completely disabled. | 4369 | *	otherwise completely disabled. |
| 4300 | * @NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP: This channel can be used for a | 4370 | * @NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP: This channel can be used for a |
| 4301 | *	very low power (VLP) AP, despite being NO_IR. | 4371 | *	very low power (VLP) AP, despite being NO_IR. |
| 4372 | * @NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY: This channel can be active in | ||
| 4373 | *	20 MHz bandwidth, despite being NO_IR. | ||
| 4302 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number | 4374 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number |
| 4303 | *	currently defined | 4375 | *	currently defined |
| 4304 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use | 4376 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use |
| ... | @@ -4343,6 +4415,7 @@ enum nl80211_frequency_attr { | ... | @@ -4343,6 +4415,7 @@ enum nl80211_frequency_attr { |
| 4343 | 	NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT, | 4415 | 	NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT, |
| 4344 | 	NL80211_FREQUENCY_ATTR_CAN_MONITOR, | 4416 | 	NL80211_FREQUENCY_ATTR_CAN_MONITOR, |
| 4345 | 	NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP, | 4417 | 	NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP, |
| 4418 | 	NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY, | ||
| 4346 | 4419 | ||
| 4347 | 	/* keep last */ | 4420 | 	/* keep last */ |
| 4348 | 	__NL80211_FREQUENCY_ATTR_AFTER_LAST, | 4421 | 	__NL80211_FREQUENCY_ATTR_AFTER_LAST, |
| ... | @@ -4554,31 +4627,34 @@ enum nl80211_sched_scan_match_attr { | ... | @@ -4554,31 +4627,34 @@ enum nl80211_sched_scan_match_attr { |
| 4554 | * @NL80211_RRF_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP not allowed | 4627 | * @NL80211_RRF_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP not allowed |
| 4555 | * @NL80211_RRF_ALLOW_6GHZ_VLP_AP: Very low power (VLP) AP can be permitted | 4628 | * @NL80211_RRF_ALLOW_6GHZ_VLP_AP: Very low power (VLP) AP can be permitted |
| 4556 | *	despite NO_IR configuration. | 4629 | *	despite NO_IR configuration. |
| 4630 | * @NL80211_RRF_ALLOW_20MHZ_ACTIVITY: Allow activity in 20 MHz bandwidth, | ||
| 4631 | *	despite NO_IR configuration. | ||
| 4557 | */ | 4632 | */ |
| 4558 | enum nl80211_reg_rule_flags { | 4633 | enum nl80211_reg_rule_flags { |
| 4559 | 	NL80211_RRF_NO_OFDM		= 1<<0, | 4634 | 	NL80211_RRF_NO_OFDM = 1 << 0, |
| 4560 | 	NL80211_RRF_NO_CCK		= 1<<1, | 4635 | 	NL80211_RRF_NO_CCK = 1 << 1, |
| 4561 | 	NL80211_RRF_NO_INDOOR		= 1<<2, | 4636 | 	NL80211_RRF_NO_INDOOR = 1 << 2, |
| 4562 | 	NL80211_RRF_NO_OUTDOOR		= 1<<3, | 4637 | 	NL80211_RRF_NO_OUTDOOR = 1 << 3, |
| 4563 | 	NL80211_RRF_DFS			= 1<<4, | 4638 | 	NL80211_RRF_DFS = 1 << 4, |
| 4564 | 	NL80211_RRF_PTP_ONLY		= 1<<5, | 4639 | 	NL80211_RRF_PTP_ONLY = 1 << 5, |
| 4565 | 	NL80211_RRF_PTMP_ONLY		= 1<<6, | 4640 | 	NL80211_RRF_PTMP_ONLY = 1 << 6, |
| 4566 | 	NL80211_RRF_NO_IR		= 1<<7, | 4641 | 	NL80211_RRF_NO_IR = 1 << 7, |
| 4567 | 	__NL80211_RRF_NO_IBSS		= 1<<8, | 4642 | 	__NL80211_RRF_NO_IBSS = 1 << 8, |
| 4568 | 	NL80211_RRF_AUTO_BW		= 1<<11, | 4643 | 	NL80211_RRF_AUTO_BW = 1 << 11, |
| 4569 | 	NL80211_RRF_IR_CONCURRENT	= 1<<12, | 4644 | 	NL80211_RRF_IR_CONCURRENT = 1 << 12, |
| 4570 | 	NL80211_RRF_NO_HT40MINUS	= 1<<13, | 4645 | 	NL80211_RRF_NO_HT40MINUS = 1 << 13, |
| 4571 | 	NL80211_RRF_NO_HT40PLUS		= 1<<14, | 4646 | 	NL80211_RRF_NO_HT40PLUS = 1 << 14, |
| 4572 | 	NL80211_RRF_NO_80MHZ		= 1<<15, | 4647 | 	NL80211_RRF_NO_80MHZ = 1 << 15, |
| 4573 | 	NL80211_RRF_NO_160MHZ		= 1<<16, | 4648 | 	NL80211_RRF_NO_160MHZ = 1 << 16, |
| 4574 | 	NL80211_RRF_NO_HE		= 1<<17, | 4649 | 	NL80211_RRF_NO_HE = 1 << 17, |
| 4575 | 	NL80211_RRF_NO_320MHZ		= 1<<18, | 4650 | 	NL80211_RRF_NO_320MHZ = 1 << 18, |
| 4576 | 	NL80211_RRF_NO_EHT		= 1<<19, | 4651 | 	NL80211_RRF_NO_EHT = 1 << 19, |
| 4577 | 	NL80211_RRF_PSD			= 1<<20, | 4652 | 	NL80211_RRF_PSD = 1 << 20, |
| 4578 | 	NL80211_RRF_DFS_CONCURRENT	= 1<<21, | 4653 | 	NL80211_RRF_DFS_CONCURRENT = 1 << 21, |
| 4579 | 	NL80211_RRF_NO_6GHZ_VLP_CLIENT	= 1<<22, | 4654 | 	NL80211_RRF_NO_6GHZ_VLP_CLIENT = 1 << 22, |
| 4580 | 	NL80211_RRF_NO_6GHZ_AFC_CLIENT	= 1<<23, | 4655 | 	NL80211_RRF_NO_6GHZ_AFC_CLIENT = 1 << 23, |
| 4581 | 	NL80211_RRF_ALLOW_6GHZ_VLP_AP	= 1<<24, | 4656 | 	NL80211_RRF_ALLOW_6GHZ_VLP_AP = 1 << 24, |
| 4657 | 	NL80211_RRF_ALLOW_20MHZ_ACTIVITY = 1 << 25, | ||
| 4582 | }; | 4658 | }; |
| 4583 | 4659 | ||
| 4584 | #define NL80211_RRF_PASSIVE_SCAN	NL80211_RRF_NO_IR | 4660 | #define NL80211_RRF_PASSIVE_SCAN	NL80211_RRF_NO_IR |
| ... | @@ -4699,8 +4775,8 @@ enum nl80211_survey_info { | ... | @@ -4699,8 +4775,8 @@ enum nl80211_survey_info { |
| 4699 | * @NL80211_MNTR_FLAG_PLCPFAIL: pass frames with bad PLCP | 4775 | * @NL80211_MNTR_FLAG_PLCPFAIL: pass frames with bad PLCP |
| 4700 | * @NL80211_MNTR_FLAG_CONTROL: pass control frames | 4776 | * @NL80211_MNTR_FLAG_CONTROL: pass control frames |
| 4701 | * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering | 4777 | * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering |
| 4702 | * @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing. | 4778 | * @NL80211_MNTR_FLAG_COOK_FRAMES: deprecated |
| 4703 | *	overrides all other flags. | 4779 | *	will unconditionally be refused |
| 4704 | * @NL80211_MNTR_FLAG_ACTIVE: use the configured MAC address | 4780 | * @NL80211_MNTR_FLAG_ACTIVE: use the configured MAC address |
| 4705 | *	and ACK incoming unicast packets. | 4781 | *	and ACK incoming unicast packets. |
| 4706 | * @NL80211_MNTR_FLAG_SKIP_TX: do not pass local tx packets | 4782 | * @NL80211_MNTR_FLAG_SKIP_TX: do not pass local tx packets |
| ... | @@ -7994,6 +8070,11 @@ enum nl80211_sar_specs_attrs { | ... | @@ -7994,6 +8070,11 @@ enum nl80211_sar_specs_attrs { |
| 7994 | *	Setting this flag is permitted only if the driver advertises EMA support | 8070 | *	Setting this flag is permitted only if the driver advertises EMA support |
| 7995 | *	by setting wiphy->ema_max_profile_periodicity to non-zero. | 8071 | *	by setting wiphy->ema_max_profile_periodicity to non-zero. |
| 7996 | * | 8072 | * |
| 8073 | * @NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID: Link ID of the transmitted profile. | ||
| 8074 | *	This parameter is mandatory when NL80211_ATTR_MBSSID_CONFIG attributes | ||
| 8075 | *	are sent for a non-transmitted profile and if the transmitted profile | ||
| 8076 | *	is part of an MLD. For all other cases this parameter is unnecessary. | ||
| 8077 | * | ||
| 7997 | * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal | 8078 | * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal |
| 7998 | * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute | 8079 | * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute |
| 7999 | */ | 8080 | */ |
| ... | @@ -8005,6 +8086,7 @@ enum nl80211_mbssid_config_attributes { | ... | @@ -8005,6 +8086,7 @@ enum nl80211_mbssid_config_attributes { |
| 8005 | 	NL80211_MBSSID_CONFIG_ATTR_INDEX, | 8086 | 	NL80211_MBSSID_CONFIG_ATTR_INDEX, |
| 8006 | 	NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX, | 8087 | 	NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX, |
| 8007 | 	NL80211_MBSSID_CONFIG_ATTR_EMA, | 8088 | 	NL80211_MBSSID_CONFIG_ATTR_EMA, |
| 8089 | 	NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID, | ||
| 8008 | 8090 | ||
| 8009 | 	/* keep last */ | 8091 | 	/* keep last */ |
| 8010 | 	__NL80211_MBSSID_CONFIG_ATTR_LAST, | 8092 | 	__NL80211_MBSSID_CONFIG_ATTR_LAST, |
| ... | @@ -8040,6 +8122,7 @@ enum nl80211_ap_settings_flags { | ... | @@ -8040,6 +8122,7 @@ enum nl80211_ap_settings_flags { |
| 8040 | *	and contains attributes defined in &enum nl80211_if_combination_attrs. | 8122 | *	and contains attributes defined in &enum nl80211_if_combination_attrs. |
| 8041 | * @NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK: bitmask (u32) of antennas | 8123 | * @NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK: bitmask (u32) of antennas |
| 8042 | *	connected to this radio. | 8124 | *	connected to this radio. |
| 8125 | * @NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD: RTS threshold (u32) of this radio. | ||
| 8043 | * | 8126 | * |
| 8044 | * @__NL80211_WIPHY_RADIO_ATTR_LAST: Internal | 8127 | * @__NL80211_WIPHY_RADIO_ATTR_LAST: Internal |
| 8045 | * @NL80211_WIPHY_RADIO_ATTR_MAX: Highest attribute | 8128 | * @NL80211_WIPHY_RADIO_ATTR_MAX: Highest attribute |
| ... | @@ -8051,6 +8134,7 @@ enum nl80211_wiphy_radio_attrs { | ... | @@ -8051,6 +8134,7 @@ enum nl80211_wiphy_radio_attrs { |
| 8051 | 	NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE, | 8134 | 	NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE, |
| 8052 | 	NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION, | 8135 | 	NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION, |
| 8053 | 	NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK, | 8136 | 	NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK, |
| 8137 | 	NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD, | ||
| 8054 | 8138 | ||
| 8055 | 	/* keep last */ | 8139 | 	/* keep last */ |
| 8056 | 	__NL80211_WIPHY_RADIO_ATTR_LAST, | 8140 | 	__NL80211_WIPHY_RADIO_ATTR_LAST, |
| ... | @@ -8080,4 +8164,27 @@ enum nl80211_wiphy_radio_freq_range { | ... | @@ -8080,4 +8164,27 @@ enum nl80211_wiphy_radio_freq_range { |
| 8080 | 	NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST - 1, | 8164 | 	NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST - 1, |
| 8081 | }; | 8165 | }; |
| 8082 | 8166 | ||
| 8167 | /** | ||
| 8168 | * enum nl80211_s1g_short_beacon_attrs - S1G short beacon data | ||
| 8169 | * | ||
| 8170 | * @__NL80211_S1G_SHORT_BEACON_ATTR_INVALID: Invalid | ||
| 8171 | * | ||
| 8172 | * @NL80211_S1G_SHORT_BEACON_ATTR_HEAD: Short beacon head (binary). | ||
| 8173 | * @NL80211_S1G_SHORT_BEACON_ATTR_TAIL: Short beacon tail (binary). | ||
| 8174 | * | ||
| 8175 | * @__NL80211_S1G_SHORT_BEACON_ATTR_LAST: Internal | ||
| 8176 | * @NL80211_S1G_SHORT_BEACON_ATTR_MAX: Highest attribute | ||
| 8177 | */ | ||
| 8178 | enum nl80211_s1g_short_beacon_attrs { | ||
| 8179 | 	__NL80211_S1G_SHORT_BEACON_ATTR_INVALID, | ||
| 8180 | |||
| 8181 | 	NL80211_S1G_SHORT_BEACON_ATTR_HEAD, | ||
| 8182 | 	NL80211_S1G_SHORT_BEACON_ATTR_TAIL, | ||
| 8183 | |||
| 8184 | 	/* keep last */ | ||
| 8185 | 	__NL80211_S1G_SHORT_BEACON_ATTR_LAST, | ||
| 8186 | 	NL80211_S1G_SHORT_BEACON_ATTR_MAX = | ||
| 8187 | 		__NL80211_S1G_SHORT_BEACON_ATTR_LAST - 1 | ||
| 8188 | }; | ||
| 8189 | |||
| 8083 | #endif /* __LINUX_NL80211_H */ | 8190 | #endif /* __LINUX_NL80211_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/nsfs.h+11| ... | @@ -42,4 +42,15 @@ struct mnt_ns_info { | ... | @@ -42,4 +42,15 @@ struct mnt_ns_info { |
| 42 | /* Get previous namespace. */ | 42 | /* Get previous namespace. */ |
| 43 | #define NS_MNT_GET_PREV		_IOR(NSIO, 12, struct mnt_ns_info) | 43 | #define NS_MNT_GET_PREV		_IOR(NSIO, 12, struct mnt_ns_info) |
| 44 | 44 | ||
| 45 | enum init_ns_ino { | ||
| 46 | 	IPC_NS_INIT_INO		= 0xEFFFFFFFU, | ||
| 47 | 	UTS_NS_INIT_INO		= 0xEFFFFFFEU, | ||
| 48 | 	USER_NS_INIT_INO	= 0xEFFFFFFDU, | ||
| 49 | 	PID_NS_INIT_INO		= 0xEFFFFFFCU, | ||
| 50 | 	CGROUP_NS_INIT_INO	= 0xEFFFFFFBU, | ||
| 51 | 	TIME_NS_INIT_INO	= 0xEFFFFFFAU, | ||
| 52 | 	NET_NS_INIT_INO		= 0xEFFFFFF9U, | ||
| 53 | 	MNT_NS_INIT_INO		= 0xEFFFFFF8U, | ||
| 54 | }; | ||
| 55 | |||
| 45 | #endif /* __LINUX_NSFS_H */ | 56 | #endif /* __LINUX_NSFS_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ntsync.h+39-3| ... | @@ -11,13 +11,49 @@ | ... | @@ -11,13 +11,49 @@ |
| 11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 12 | 12 | ||
| 13 | struct ntsync_sem_args { | 13 | struct ntsync_sem_args { |
| 14 | 	__u32 sem; | ||
| 15 | 	__u32 count; | 14 | 	__u32 count; |
| 16 | 	__u32 max; | 15 | 	__u32 max; |
| 17 | }; | 16 | }; |
| 18 | 17 | ||
| 19 | #define NTSYNC_IOC_CREATE_SEM		_IOWR('N', 0x80, struct ntsync_sem_args) | 18 | struct ntsync_mutex_args { |
| 19 | 	__u32 owner; | ||
| 20 | 	__u32 count; | ||
| 21 | }; | ||
| 22 | |||
| 23 | struct ntsync_event_args { | ||
| 24 | 	__u32 manual; | ||
| 25 | 	__u32 signaled; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #define NTSYNC_WAIT_REALTIME	0x1 | ||
| 29 | |||
| 30 | struct ntsync_wait_args { | ||
| 31 | 	__u64 timeout; | ||
| 32 | 	__u64 objs; | ||
| 33 | 	__u32 count; | ||
| 34 | 	__u32 index; | ||
| 35 | 	__u32 flags; | ||
| 36 | 	__u32 owner; | ||
| 37 | 	__u32 alert; | ||
| 38 | 	__u32 pad; | ||
| 39 | }; | ||
| 40 | |||
| 41 | #define NTSYNC_MAX_WAIT_COUNT 64 | ||
| 42 | |||
| 43 | #define NTSYNC_IOC_CREATE_SEM		_IOW ('N', 0x80, struct ntsync_sem_args) | ||
| 44 | #define NTSYNC_IOC_WAIT_ANY		_IOWR('N', 0x82, struct ntsync_wait_args) | ||
| 45 | #define NTSYNC_IOC_WAIT_ALL		_IOWR('N', 0x83, struct ntsync_wait_args) | ||
| 46 | #define NTSYNC_IOC_CREATE_MUTEX		_IOW ('N', 0x84, struct ntsync_mutex_args) | ||
| 47 | #define NTSYNC_IOC_CREATE_EVENT		_IOW ('N', 0x87, struct ntsync_event_args) | ||
| 20 | 48 | ||
| 21 | #define NTSYNC_IOC_SEM_POST		_IOWR('N', 0x81, __u32) | 49 | #define NTSYNC_IOC_SEM_RELEASE		_IOWR('N', 0x81, __u32) |
| 50 | #define NTSYNC_IOC_MUTEX_UNLOCK		_IOWR('N', 0x85, struct ntsync_mutex_args) | ||
| 51 | #define NTSYNC_IOC_MUTEX_KILL		_IOW ('N', 0x86, __u32) | ||
| 52 | #define NTSYNC_IOC_EVENT_SET		_IOR ('N', 0x88, __u32) | ||
| 53 | #define NTSYNC_IOC_EVENT_RESET		_IOR ('N', 0x89, __u32) | ||
| 54 | #define NTSYNC_IOC_EVENT_PULSE		_IOR ('N', 0x8a, __u32) | ||
| 55 | #define NTSYNC_IOC_SEM_READ		_IOR ('N', 0x8b, struct ntsync_sem_args) | ||
| 56 | #define NTSYNC_IOC_MUTEX_READ		_IOR ('N', 0x8c, struct ntsync_mutex_args) | ||
| 57 | #define NTSYNC_IOC_EVENT_READ		_IOR ('N', 0x8d, struct ntsync_event_args) | ||
| 22 | 58 | ||
| 23 | #endif | 59 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/openvswitch.h+6| ... | @@ -186,6 +186,11 @@ enum ovs_packet_cmd { | ... | @@ -186,6 +186,11 @@ enum ovs_packet_cmd { |
| 186 | * %OVS_PACKET_ATTR_USERSPACE action specify the Maximum received fragment | 186 | * %OVS_PACKET_ATTR_USERSPACE action specify the Maximum received fragment |
| 187 | * size. | 187 | * size. |
| 188 | * @OVS_PACKET_ATTR_HASH: Packet hash info (e.g. hash, sw_hash and l4_hash in skb). | 188 | * @OVS_PACKET_ATTR_HASH: Packet hash info (e.g. hash, sw_hash and l4_hash in skb). |
| 189 | * @OVS_PACKET_ATTR_UPCALL_PID: Netlink PID to use for upcalls while | ||
| 190 | * processing %OVS_PACKET_CMD_EXECUTE. Takes precedence over all other ways | ||
| 191 | * to determine the Netlink PID including %OVS_USERSPACE_ATTR_PID, | ||
| 192 | * %OVS_DP_ATTR_UPCALL_PID, %OVS_DP_ATTR_PER_CPU_PIDS and the | ||
| 193 | * %OVS_VPORT_ATTR_UPCALL_PID. | ||
| 189 | * | 194 | * |
| 190 | * These attributes follow the &struct ovs_header within the Generic Netlink | 195 | * These attributes follow the &struct ovs_header within the Generic Netlink |
| 191 | * payload for %OVS_PACKET_* commands. | 196 | * payload for %OVS_PACKET_* commands. |
| ... | @@ -205,6 +210,7 @@ enum ovs_packet_attr { | ... | @@ -205,6 +210,7 @@ enum ovs_packet_attr { |
| 205 | 	OVS_PACKET_ATTR_MRU,	 /* Maximum received IP fragment size. */ | 210 | 	OVS_PACKET_ATTR_MRU,	 /* Maximum received IP fragment size. */ |
| 206 | 	OVS_PACKET_ATTR_LEN,	 /* Packet size before truncation. */ | 211 | 	OVS_PACKET_ATTR_LEN,	 /* Packet size before truncation. */ |
| 207 | 	OVS_PACKET_ATTR_HASH,	 /* Packet hash. */ | 212 | 	OVS_PACKET_ATTR_HASH,	 /* Packet hash. */ |
| 213 | 	OVS_PACKET_ATTR_UPCALL_PID, /* u32 Netlink PID. */ | ||
| 208 | 	__OVS_PACKET_ATTR_MAX | 214 | 	__OVS_PACKET_ATTR_MAX |
| 209 | }; | 215 | }; |
| 210 | 216 |
lib/libc/include/any-linux-any/linux/ovpn.h created+109| ... | @@ -0,0 +1,109 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /*	Documentation/netlink/specs/ovpn.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_OVPN_H | ||
| 7 | #define _LINUX_OVPN_H | ||
| 8 | |||
| 9 | #define OVPN_FAMILY_NAME	"ovpn" | ||
| 10 | #define OVPN_FAMILY_VERSION	1 | ||
| 11 | |||
| 12 | #define OVPN_NONCE_TAIL_SIZE	8 | ||
| 13 | |||
| 14 | enum ovpn_cipher_alg { | ||
| 15 | 	OVPN_CIPHER_ALG_NONE, | ||
| 16 | 	OVPN_CIPHER_ALG_AES_GCM, | ||
| 17 | 	OVPN_CIPHER_ALG_CHACHA20_POLY1305, | ||
| 18 | }; | ||
| 19 | |||
| 20 | enum ovpn_del_peer_reason { | ||
| 21 | 	OVPN_DEL_PEER_REASON_TEARDOWN, | ||
| 22 | 	OVPN_DEL_PEER_REASON_USERSPACE, | ||
| 23 | 	OVPN_DEL_PEER_REASON_EXPIRED, | ||
| 24 | 	OVPN_DEL_PEER_REASON_TRANSPORT_ERROR, | ||
| 25 | 	OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT, | ||
| 26 | }; | ||
| 27 | |||
| 28 | enum ovpn_key_slot { | ||
| 29 | 	OVPN_KEY_SLOT_PRIMARY, | ||
| 30 | 	OVPN_KEY_SLOT_SECONDARY, | ||
| 31 | }; | ||
| 32 | |||
| 33 | enum { | ||
| 34 | 	OVPN_A_PEER_ID = 1, | ||
| 35 | 	OVPN_A_PEER_REMOTE_IPV4, | ||
| 36 | 	OVPN_A_PEER_REMOTE_IPV6, | ||
| 37 | 	OVPN_A_PEER_REMOTE_IPV6_SCOPE_ID, | ||
| 38 | 	OVPN_A_PEER_REMOTE_PORT, | ||
| 39 | 	OVPN_A_PEER_SOCKET, | ||
| 40 | 	OVPN_A_PEER_SOCKET_NETNSID, | ||
| 41 | 	OVPN_A_PEER_VPN_IPV4, | ||
| 42 | 	OVPN_A_PEER_VPN_IPV6, | ||
| 43 | 	OVPN_A_PEER_LOCAL_IPV4, | ||
| 44 | 	OVPN_A_PEER_LOCAL_IPV6, | ||
| 45 | 	OVPN_A_PEER_LOCAL_PORT, | ||
| 46 | 	OVPN_A_PEER_KEEPALIVE_INTERVAL, | ||
| 47 | 	OVPN_A_PEER_KEEPALIVE_TIMEOUT, | ||
| 48 | 	OVPN_A_PEER_DEL_REASON, | ||
| 49 | 	OVPN_A_PEER_VPN_RX_BYTES, | ||
| 50 | 	OVPN_A_PEER_VPN_TX_BYTES, | ||
| 51 | 	OVPN_A_PEER_VPN_RX_PACKETS, | ||
| 52 | 	OVPN_A_PEER_VPN_TX_PACKETS, | ||
| 53 | 	OVPN_A_PEER_LINK_RX_BYTES, | ||
| 54 | 	OVPN_A_PEER_LINK_TX_BYTES, | ||
| 55 | 	OVPN_A_PEER_LINK_RX_PACKETS, | ||
| 56 | 	OVPN_A_PEER_LINK_TX_PACKETS, | ||
| 57 | |||
| 58 | 	__OVPN_A_PEER_MAX, | ||
| 59 | 	OVPN_A_PEER_MAX = (__OVPN_A_PEER_MAX - 1) | ||
| 60 | }; | ||
| 61 | |||
| 62 | enum { | ||
| 63 | 	OVPN_A_KEYCONF_PEER_ID = 1, | ||
| 64 | 	OVPN_A_KEYCONF_SLOT, | ||
| 65 | 	OVPN_A_KEYCONF_KEY_ID, | ||
| 66 | 	OVPN_A_KEYCONF_CIPHER_ALG, | ||
| 67 | 	OVPN_A_KEYCONF_ENCRYPT_DIR, | ||
| 68 | 	OVPN_A_KEYCONF_DECRYPT_DIR, | ||
| 69 | |||
| 70 | 	__OVPN_A_KEYCONF_MAX, | ||
| 71 | 	OVPN_A_KEYCONF_MAX = (__OVPN_A_KEYCONF_MAX - 1) | ||
| 72 | }; | ||
| 73 | |||
| 74 | enum { | ||
| 75 | 	OVPN_A_KEYDIR_CIPHER_KEY = 1, | ||
| 76 | 	OVPN_A_KEYDIR_NONCE_TAIL, | ||
| 77 | |||
| 78 | 	__OVPN_A_KEYDIR_MAX, | ||
| 79 | 	OVPN_A_KEYDIR_MAX = (__OVPN_A_KEYDIR_MAX - 1) | ||
| 80 | }; | ||
| 81 | |||
| 82 | enum { | ||
| 83 | 	OVPN_A_IFINDEX = 1, | ||
| 84 | 	OVPN_A_PEER, | ||
| 85 | 	OVPN_A_KEYCONF, | ||
| 86 | |||
| 87 | 	__OVPN_A_MAX, | ||
| 88 | 	OVPN_A_MAX = (__OVPN_A_MAX - 1) | ||
| 89 | }; | ||
| 90 | |||
| 91 | enum { | ||
| 92 | 	OVPN_CMD_PEER_NEW = 1, | ||
| 93 | 	OVPN_CMD_PEER_SET, | ||
| 94 | 	OVPN_CMD_PEER_GET, | ||
| 95 | 	OVPN_CMD_PEER_DEL, | ||
| 96 | 	OVPN_CMD_PEER_DEL_NTF, | ||
| 97 | 	OVPN_CMD_KEY_NEW, | ||
| 98 | 	OVPN_CMD_KEY_GET, | ||
| 99 | 	OVPN_CMD_KEY_SWAP, | ||
| 100 | 	OVPN_CMD_KEY_SWAP_NTF, | ||
| 101 | 	OVPN_CMD_KEY_DEL, | ||
| 102 | |||
| 103 | 	__OVPN_CMD_MAX, | ||
| 104 | 	OVPN_CMD_MAX = (__OVPN_CMD_MAX - 1) | ||
| 105 | }; | ||
| 106 | |||
| 107 | #define OVPN_MCGRP_PEERS	"peers" | ||
| 108 | |||
| 109 | #endif /* _LINUX_OVPN_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/pci_regs.h+38-12| ... | @@ -486,6 +486,7 @@ | ... | @@ -486,6 +486,7 @@ |
| 486 | #define PCI_EXP_TYPE_RC_EC	 0xa	/* Root Complex Event Collector */ | 486 | #define PCI_EXP_TYPE_RC_EC	 0xa	/* Root Complex Event Collector */ |
| 487 | #define PCI_EXP_FLAGS_SLOT	0x0100	/* Slot implemented */ | 487 | #define PCI_EXP_FLAGS_SLOT	0x0100	/* Slot implemented */ |
| 488 | #define PCI_EXP_FLAGS_IRQ	0x3e00	/* Interrupt message number */ | 488 | #define PCI_EXP_FLAGS_IRQ	0x3e00	/* Interrupt message number */ |
| 489 | #define PCI_EXP_FLAGS_FLIT	0x8000	/* Flit Mode Supported */ | ||
| 489 | #define PCI_EXP_DEVCAP		0x04	/* Device capabilities */ | 490 | #define PCI_EXP_DEVCAP		0x04	/* Device capabilities */ |
| 490 | #define PCI_EXP_DEVCAP_PAYLOAD	0x00000007 /* Max_Payload_Size */ | 491 | #define PCI_EXP_DEVCAP_PAYLOAD	0x00000007 /* Max_Payload_Size */ |
| 491 | #define PCI_EXP_DEVCAP_PHANTOM	0x00000018 /* Phantom functions */ | 492 | #define PCI_EXP_DEVCAP_PHANTOM	0x00000018 /* Phantom functions */ |
| ... | @@ -533,7 +534,7 @@ | ... | @@ -533,7 +534,7 @@ |
| 533 | #define PCI_EXP_DEVSTA_TRPND	0x0020	/* Transactions Pending */ | 534 | #define PCI_EXP_DEVSTA_TRPND	0x0020	/* Transactions Pending */ |
| 534 | #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1	12	/* v1 endpoints without link end here */ | 535 | #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1	12	/* v1 endpoints without link end here */ |
| 535 | #define PCI_EXP_LNKCAP		0x0c	/* Link Capabilities */ | 536 | #define PCI_EXP_LNKCAP		0x0c	/* Link Capabilities */ |
| 536 | #define PCI_EXP_LNKCAP_SLS	0x0000000f /* Supported Link Speeds */ | 537 | #define PCI_EXP_LNKCAP_SLS	0x0000000f /* Max Link Speed (prior to PCIe r3.0: Supported Link Speeds) */ |
| 537 | #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ | 538 | #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ |
| 538 | #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ | 539 | #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ |
| 539 | #define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */ | 540 | #define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */ |
| ... | @@ -665,6 +666,7 @@ | ... | @@ -665,6 +666,7 @@ |
| 665 | #define PCI_EXP_DEVCAP2_OBFF_MSG	0x00040000 /* New message signaling */ | 666 | #define PCI_EXP_DEVCAP2_OBFF_MSG	0x00040000 /* New message signaling */ |
| 666 | #define PCI_EXP_DEVCAP2_OBFF_WAKE	0x00080000 /* Re-use WAKE# for OBFF */ | 667 | #define PCI_EXP_DEVCAP2_OBFF_WAKE	0x00080000 /* Re-use WAKE# for OBFF */ |
| 667 | #define PCI_EXP_DEVCAP2_EE_PREFIX	0x00200000 /* End-End TLP Prefix */ | 668 | #define PCI_EXP_DEVCAP2_EE_PREFIX	0x00200000 /* End-End TLP Prefix */ |
| 669 | #define PCI_EXP_DEVCAP2_EE_PREFIX_MAX	0x00c00000 /* Max End-End TLP Prefixes */ | ||
| 668 | #define PCI_EXP_DEVCTL2		0x28	/* Device Control 2 */ | 670 | #define PCI_EXP_DEVCTL2		0x28	/* Device Control 2 */ |
| 669 | #define PCI_EXP_DEVCTL2_COMP_TIMEOUT	0x000f	/* Completion Timeout Value */ | 671 | #define PCI_EXP_DEVCTL2_COMP_TIMEOUT	0x000f	/* Completion Timeout Value */ |
| 670 | #define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS	0x0010	/* Completion Timeout Disable */ | 672 | #define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS	0x0010	/* Completion Timeout Disable */ |
| ... | @@ -743,12 +745,14 @@ | ... | @@ -743,12 +745,14 @@ |
| 743 | #define PCI_EXT_CAP_ID_L1SS	0x1E	/* L1 PM Substates */ | 745 | #define PCI_EXT_CAP_ID_L1SS	0x1E	/* L1 PM Substates */ |
| 744 | #define PCI_EXT_CAP_ID_PTM	0x1F	/* Precision Time Measurement */ | 746 | #define PCI_EXT_CAP_ID_PTM	0x1F	/* Precision Time Measurement */ |
| 745 | #define PCI_EXT_CAP_ID_DVSEC	0x23	/* Designated Vendor-Specific */ | 747 | #define PCI_EXT_CAP_ID_DVSEC	0x23	/* Designated Vendor-Specific */ |
| 748 | #define PCI_EXT_CAP_ID_VF_REBAR 0x24	/* VF Resizable BAR */ | ||
| 746 | #define PCI_EXT_CAP_ID_DLF	0x25	/* Data Link Feature */ | 749 | #define PCI_EXT_CAP_ID_DLF	0x25	/* Data Link Feature */ |
| 747 | #define PCI_EXT_CAP_ID_PL_16GT	0x26	/* Physical Layer 16.0 GT/s */ | 750 | #define PCI_EXT_CAP_ID_PL_16GT	0x26	/* Physical Layer 16.0 GT/s */ |
| 748 | #define PCI_EXT_CAP_ID_NPEM	0x29	/* Native PCIe Enclosure Management */ | 751 | #define PCI_EXT_CAP_ID_NPEM	0x29	/* Native PCIe Enclosure Management */ |
| 749 | #define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */ | 752 | #define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */ |
| 750 | #define PCI_EXT_CAP_ID_DOE	0x2E	/* Data Object Exchange */ | 753 | #define PCI_EXT_CAP_ID_DOE	0x2E	/* Data Object Exchange */ |
| 751 | #define PCI_EXT_CAP_ID_MAX	PCI_EXT_CAP_ID_DOE | 754 | #define PCI_EXT_CAP_ID_PL_64GT	0x31	/* Physical Layer 64.0 GT/s */ |
| 755 | #define PCI_EXT_CAP_ID_MAX	PCI_EXT_CAP_ID_PL_64GT | ||
| 752 | 756 | ||
| 753 | #define PCI_EXT_CAP_DSN_SIZEOF	12 | 757 | #define PCI_EXT_CAP_DSN_SIZEOF	12 |
| 754 | #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40 | 758 | #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40 |
| ... | @@ -789,10 +793,13 @@ | ... | @@ -789,10 +793,13 @@ |
| 789 | 	/* Same bits as above */ | 793 | 	/* Same bits as above */ |
| 790 | #define PCI_ERR_CAP		0x18	/* Advanced Error Capabilities & Ctrl*/ | 794 | #define PCI_ERR_CAP		0x18	/* Advanced Error Capabilities & Ctrl*/ |
| 791 | #define PCI_ERR_CAP_FEP(x)	((x) & 0x1f)	/* First Error Pointer */ | 795 | #define PCI_ERR_CAP_FEP(x)	((x) & 0x1f)	/* First Error Pointer */ |
| 792 | #define PCI_ERR_CAP_ECRC_GENC	0x00000020	/* ECRC Generation Capable */ | 796 | #define PCI_ERR_CAP_ECRC_GENC		0x00000020 /* ECRC Generation Capable */ |
| 793 | #define PCI_ERR_CAP_ECRC_GENE	0x00000040	/* ECRC Generation Enable */ | 797 | #define PCI_ERR_CAP_ECRC_GENE		0x00000040 /* ECRC Generation Enable */ |
| 794 | #define PCI_ERR_CAP_ECRC_CHKC	0x00000080	/* ECRC Check Capable */ | 798 | #define PCI_ERR_CAP_ECRC_CHKC		0x00000080 /* ECRC Check Capable */ |
| 795 | #define PCI_ERR_CAP_ECRC_CHKE	0x00000100	/* ECRC Check Enable */ | 799 | #define PCI_ERR_CAP_ECRC_CHKE		0x00000100 /* ECRC Check Enable */ |
| 800 | #define PCI_ERR_CAP_PREFIX_LOG_PRESENT	0x00000800 /* TLP Prefix Log Present */ | ||
| 801 | #define PCI_ERR_CAP_TLP_LOG_FLIT	0x00040000 /* TLP was logged in Flit Mode */ | ||
| 802 | #define PCI_ERR_CAP_TLP_LOG_SIZE	0x00f80000 /* Logged TLP Size (only in Flit mode) */ | ||
| 796 | #define PCI_ERR_HEADER_LOG	0x1c	/* Header Log Register (16 bytes) */ | 803 | #define PCI_ERR_HEADER_LOG	0x1c	/* Header Log Register (16 bytes) */ |
| 797 | #define PCI_ERR_ROOT_COMMAND	0x2c	/* Root Error Command */ | 804 | #define PCI_ERR_ROOT_COMMAND	0x2c	/* Root Error Command */ |
| 798 | #define PCI_ERR_ROOT_CMD_COR_EN	0x00000001 /* Correctable Err Reporting Enable */ | 805 | #define PCI_ERR_ROOT_CMD_COR_EN	0x00000001 /* Correctable Err Reporting Enable */ |
| ... | @@ -808,6 +815,7 @@ | ... | @@ -808,6 +815,7 @@ |
| 808 | #define PCI_ERR_ROOT_FATAL_RCV		0x00000040 /* Fatal Received */ | 815 | #define PCI_ERR_ROOT_FATAL_RCV		0x00000040 /* Fatal Received */ |
| 809 | #define PCI_ERR_ROOT_AER_IRQ		0xf8000000 /* Advanced Error Interrupt Message Number */ | 816 | #define PCI_ERR_ROOT_AER_IRQ		0xf8000000 /* Advanced Error Interrupt Message Number */ |
| 810 | #define PCI_ERR_ROOT_ERR_SRC	0x34	/* Error Source Identification */ | 817 | #define PCI_ERR_ROOT_ERR_SRC	0x34	/* Error Source Identification */ |
| 818 | #define PCI_ERR_PREFIX_LOG	0x38	/* TLP Prefix LOG Register (up to 16 bytes) */ | ||
| 811 | 819 | ||
| 812 | /* Virtual Channel */ | 820 | /* Virtual Channel */ |
| 813 | #define PCI_VC_PORT_CAP1	0x04 | 821 | #define PCI_VC_PORT_CAP1	0x04 |
| ... | @@ -1001,9 +1009,6 @@ | ... | @@ -1001,9 +1009,6 @@ |
| 1001 | #define PCI_ACS_CTRL		0x06	/* ACS Control Register */ | 1009 | #define PCI_ACS_CTRL		0x06	/* ACS Control Register */ |
| 1002 | #define PCI_ACS_EGRESS_CTL_V	0x08	/* ACS Egress Control Vector */ | 1010 | #define PCI_ACS_EGRESS_CTL_V	0x08	/* ACS Egress Control Vector */ |
| 1003 | 1011 | ||
| 1004 | #define PCI_VSEC_HDR		4	/* extended cap - vendor-specific */ | ||
| 1005 | #define PCI_VSEC_HDR_LEN_SHIFT	20	/* shift for length field */ | ||
| 1006 | |||
| 1007 | /* SATA capability */ | 1012 | /* SATA capability */ |
| 1008 | #define PCI_SATA_REGS		4	/* SATA REGs specifier */ | 1013 | #define PCI_SATA_REGS		4	/* SATA REGs specifier */ |
| 1009 | #define PCI_SATA_REGS_MASK	0xF	/* location - BAR#/inline */ | 1014 | #define PCI_SATA_REGS_MASK	0xF	/* location - BAR#/inline */ |
| ... | @@ -1013,7 +1018,7 @@ | ... | @@ -1013,7 +1018,7 @@ |
| 1013 | 1018 | ||
| 1014 | /* Resizable BARs */ | 1019 | /* Resizable BARs */ |
| 1015 | #define PCI_REBAR_CAP		4	/* capability register */ | 1020 | #define PCI_REBAR_CAP		4	/* capability register */ |
| 1016 | #define PCI_REBAR_CAP_SIZES		0x00FFFFF0 /* supported BAR sizes */ | 1021 | #define PCI_REBAR_CAP_SIZES		0xFFFFFFF0 /* supported BAR sizes */ |
| 1017 | #define PCI_REBAR_CTRL		8	/* control register */ | 1022 | #define PCI_REBAR_CTRL		8	/* control register */ |
| 1018 | #define PCI_REBAR_CTRL_BAR_IDX		0x00000007 /* BAR index */ | 1023 | #define PCI_REBAR_CTRL_BAR_IDX		0x00000007 /* BAR index */ |
| 1019 | #define PCI_REBAR_CTRL_NBAR_MASK	0x000000E0 /* # of resizable BARs */ | 1024 | #define PCI_REBAR_CTRL_NBAR_MASK	0x000000E0 /* # of resizable BARs */ |
| ... | @@ -1061,8 +1066,9 @@ | ... | @@ -1061,8 +1066,9 @@ |
| 1061 | #define PCI_EXP_DPC_CAP_RP_EXT		0x0020	/* Root Port Extensions */ | 1066 | #define PCI_EXP_DPC_CAP_RP_EXT		0x0020	/* Root Port Extensions */ |
| 1062 | #define PCI_EXP_DPC_CAP_POISONED_TLP	0x0040	/* Poisoned TLP Egress Blocking Supported */ | 1067 | #define PCI_EXP_DPC_CAP_POISONED_TLP	0x0040	/* Poisoned TLP Egress Blocking Supported */ |
| 1063 | #define PCI_EXP_DPC_CAP_SW_TRIGGER	0x0080	/* Software Triggering Supported */ | 1068 | #define PCI_EXP_DPC_CAP_SW_TRIGGER	0x0080	/* Software Triggering Supported */ |
| 1064 | #define PCI_EXP_DPC_RP_PIO_LOG_SIZE	0x0F00	/* RP PIO Log Size */ | 1069 | #define PCI_EXP_DPC_RP_PIO_LOG_SIZE	0x0F00	/* RP PIO Log Size [3:0] */ |
| 1065 | #define PCI_EXP_DPC_CAP_DL_ACTIVE	0x1000	/* ERR_COR signal on DL_Active supported */ | 1070 | #define PCI_EXP_DPC_CAP_DL_ACTIVE	0x1000	/* ERR_COR signal on DL_Active supported */ |
| 1071 | #define PCI_EXP_DPC_RP_PIO_LOG_SIZE4	0x2000	/* RP PIO Log Size [4] */ | ||
| 1066 | 1072 | ||
| 1067 | #define PCI_EXP_DPC_CTL			0x06	/* DPC control */ | 1073 | #define PCI_EXP_DPC_CTL			0x06	/* DPC control */ |
| 1068 | #define PCI_EXP_DPC_CTL_EN_FATAL	0x0001	/* Enable trigger on ERR_FATAL message */ | 1074 | #define PCI_EXP_DPC_CTL_EN_FATAL	0x0001	/* Enable trigger on ERR_FATAL message */ |
| ... | @@ -1136,16 +1142,33 @@ | ... | @@ -1136,16 +1142,33 @@ |
| 1136 | #define PCI_DVSEC_HEADER2		0x8 /* Designated Vendor-Specific Header2 */ | 1142 | #define PCI_DVSEC_HEADER2		0x8 /* Designated Vendor-Specific Header2 */ |
| 1137 | #define PCI_DVSEC_HEADER2_ID(x)		((x) & 0xffff) | 1143 | #define PCI_DVSEC_HEADER2_ID(x)		((x) & 0xffff) |
| 1138 | 1144 | ||
| 1145 | /* VF Resizable BARs, same layout as PCI_REBAR */ | ||
| 1146 | #define PCI_VF_REBAR_CAP	PCI_REBAR_CAP | ||
| 1147 | #define PCI_VF_REBAR_CAP_SIZES		PCI_REBAR_CAP_SIZES | ||
| 1148 | #define PCI_VF_REBAR_CTRL	PCI_REBAR_CTRL | ||
| 1149 | #define PCI_VF_REBAR_CTRL_BAR_IDX	PCI_REBAR_CTRL_BAR_IDX | ||
| 1150 | #define PCI_VF_REBAR_CTRL_NBAR_MASK	PCI_REBAR_CTRL_NBAR_MASK | ||
| 1151 | #define PCI_VF_REBAR_CTRL_BAR_SIZE	PCI_REBAR_CTRL_BAR_SIZE | ||
| 1152 | |||
| 1139 | /* Data Link Feature */ | 1153 | /* Data Link Feature */ |
| 1140 | #define PCI_DLF_CAP		0x04	/* Capabilities Register */ | 1154 | #define PCI_DLF_CAP		0x04	/* Capabilities Register */ |
| 1141 | #define PCI_DLF_EXCHANGE_ENABLE	0x80000000 /* Data Link Feature Exchange Enable */ | 1155 | #define PCI_DLF_EXCHANGE_ENABLE	0x80000000 /* Data Link Feature Exchange Enable */ |
| 1142 | 1156 | ||
| 1157 | /* Secondary PCIe Capability 8.0 GT/s */ | ||
| 1158 | #define PCI_SECPCI_LE_CTRL	0x0c /* Lane Equalization Control Register */ | ||
| 1159 | |||
| 1143 | /* Physical Layer 16.0 GT/s */ | 1160 | /* Physical Layer 16.0 GT/s */ |
| 1144 | #define PCI_PL_16GT_LE_CTRL	0x20	/* Lane Equalization Control Register */ | 1161 | #define PCI_PL_16GT_LE_CTRL	0x20	/* Lane Equalization Control Register */ |
| 1145 | #define PCI_PL_16GT_LE_CTRL_DSP_TX_PRESET_MASK		0x0000000F | 1162 | #define PCI_PL_16GT_LE_CTRL_DSP_TX_PRESET_MASK		0x0000000F |
| 1146 | #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK		0x000000F0 | 1163 | #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK		0x000000F0 |
| 1147 | #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT	4 | 1164 | #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT	4 |
| 1148 | 1165 | ||
| 1166 | /* Physical Layer 32.0 GT/s */ | ||
| 1167 | #define PCI_PL_32GT_LE_CTRL	0x20	/* Lane Equalization Control Register */ | ||
| 1168 | |||
| 1169 | /* Physical Layer 64.0 GT/s */ | ||
| 1170 | #define PCI_PL_64GT_LE_CTRL	0x20	/* Lane Equalization Control Register */ | ||
| 1171 | |||
| 1149 | /* Native PCIe Enclosure Management */ | 1172 | /* Native PCIe Enclosure Management */ |
| 1150 | #define PCI_NPEM_CAP 0x04 /* NPEM capability register */ | 1173 | #define PCI_NPEM_CAP 0x04 /* NPEM capability register */ |
| 1151 | #define PCI_NPEM_CAP_CAPABLE 0x00000001 /* NPEM Capable */ | 1174 | #define PCI_NPEM_CAP_CAPABLE 0x00000001 /* NPEM Capable */ |
| ... | @@ -1205,9 +1228,12 @@ | ... | @@ -1205,9 +1228,12 @@ |
| 1205 | #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX		0x000000ff | 1228 | #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX		0x000000ff |
| 1206 | #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_VER		0x0000ff00 | 1229 | #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_VER		0x0000ff00 |
| 1207 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID		0x0000ffff | 1230 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID		0x0000ffff |
| 1208 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL		0x00ff0000 | 1231 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE		0x00ff0000 |
| 1209 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX	0xff000000 | 1232 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX	0xff000000 |
| 1210 | 1233 | ||
| 1234 | /* Deprecated old name, replaced with PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE */ | ||
| 1235 | #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL		PCI_DOE_DATA_OBJECT_DISC_RSP_3_TYPE | ||
| 1236 | |||
| 1211 | /* Compute Express Link (CXL r3.1, sec 8.1.5) */ | 1237 | /* Compute Express Link (CXL r3.1, sec 8.1.5) */ |
| 1212 | #define PCI_DVSEC_CXL_PORT				3 | 1238 | #define PCI_DVSEC_CXL_PORT				3 |
| 1213 | #define PCI_DVSEC_CXL_PORT_CTL				0x0c | 1239 | #define PCI_DVSEC_CXL_PORT_CTL				0x0c |
lib/libc/include/any-linux-any/linux/pcitest.h+8| ... | @@ -20,8 +20,16 @@ | ... | @@ -20,8 +20,16 @@ |
| 20 | #define PCITEST_MSIX		_IOW('P', 0x7, int) | 20 | #define PCITEST_MSIX		_IOW('P', 0x7, int) |
| 21 | #define PCITEST_SET_IRQTYPE	_IOW('P', 0x8, int) | 21 | #define PCITEST_SET_IRQTYPE	_IOW('P', 0x8, int) |
| 22 | #define PCITEST_GET_IRQTYPE	_IO('P', 0x9) | 22 | #define PCITEST_GET_IRQTYPE	_IO('P', 0x9) |
| 23 | #define PCITEST_BARS		_IO('P', 0xa) | ||
| 24 | #define PCITEST_DOORBELL	_IO('P', 0xb) | ||
| 23 | #define PCITEST_CLEAR_IRQ	_IO('P', 0x10) | 25 | #define PCITEST_CLEAR_IRQ	_IO('P', 0x10) |
| 24 | 26 | ||
| 27 | #define PCITEST_IRQ_TYPE_UNDEFINED	-1 | ||
| 28 | #define PCITEST_IRQ_TYPE_INTX		0 | ||
| 29 | #define PCITEST_IRQ_TYPE_MSI		1 | ||
| 30 | #define PCITEST_IRQ_TYPE_MSIX		2 | ||
| 31 | #define PCITEST_IRQ_TYPE_AUTO		3 | ||
| 32 | |||
| 25 | #define PCITEST_FLAGS_USE_DMA	0x00000001 | 33 | #define PCITEST_FLAGS_USE_DMA	0x00000001 |
| 26 | 34 | ||
| 27 | struct pci_endpoint_test_xfer_param { | 35 | struct pci_endpoint_test_xfer_param { |
lib/libc/include/any-linux-any/linux/perf_event.h+334-321| ... | @@ -39,18 +39,21 @@ enum perf_type_id { | ... | @@ -39,18 +39,21 @@ enum perf_type_id { |
| 39 | 39 | ||
| 40 | /* | 40 | /* |
| 41 | * attr.config layout for type PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE | 41 | * attr.config layout for type PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE |
| 42 | * | ||
| 42 | * PERF_TYPE_HARDWARE:			0xEEEEEEEE000000AA | 43 | * PERF_TYPE_HARDWARE:			0xEEEEEEEE000000AA |
| 43 | *					AA: hardware event ID | 44 | *					AA: hardware event ID |
| 44 | *					EEEEEEEE: PMU type ID | 45 | *					EEEEEEEE: PMU type ID |
| 46 | * | ||
| 45 | * PERF_TYPE_HW_CACHE:			0xEEEEEEEE00DDCCBB | 47 | * PERF_TYPE_HW_CACHE:			0xEEEEEEEE00DDCCBB |
| 46 | *					BB: hardware cache ID | 48 | *					BB: hardware cache ID |
| 47 | *					CC: hardware cache op ID | 49 | *					CC: hardware cache op ID |
| 48 | *					DD: hardware cache op result ID | 50 | *					DD: hardware cache op result ID |
| 49 | *					EEEEEEEE: PMU type ID | 51 | *					EEEEEEEE: PMU type ID |
| 50 | * If the PMU type ID is 0, the PERF_TYPE_RAW will be applied. | 52 | * |
| 53 | * If the PMU type ID is 0, PERF_TYPE_RAW will be applied. | ||
| 51 | */ | 54 | */ |
| 52 | #define PERF_PMU_TYPE_SHIFT		32 | 55 | #define PERF_PMU_TYPE_SHIFT			32 |
| 53 | #define PERF_HW_EVENT_MASK		0xffffffff | 56 | #define PERF_HW_EVENT_MASK			0xffffffff |
| 54 | 57 | ||
| 55 | /* | 58 | /* |
| 56 | * Generalized performance event event_id types, used by the | 59 | * Generalized performance event event_id types, used by the |
| ... | @@ -112,7 +115,7 @@ enum perf_hw_cache_op_result_id { | ... | @@ -112,7 +115,7 @@ enum perf_hw_cache_op_result_id { |
| 112 | /* | 115 | /* |
| 113 | * Special "software" events provided by the kernel, even if the hardware | 116 | * Special "software" events provided by the kernel, even if the hardware |
| 114 | * does not support performance events. These events measure various | 117 | * does not support performance events. These events measure various |
| 115 | * physical and sw events of the kernel (and allow the profiling of them as | 118 | * physical and SW events of the kernel (and allow the profiling of them as |
| 116 | * well): | 119 | * well): |
| 117 | */ | 120 | */ |
| 118 | enum perf_sw_ids { | 121 | enum perf_sw_ids { |
| ... | @@ -167,8 +170,9 @@ enum perf_event_sample_format { | ... | @@ -167,8 +170,9 @@ enum perf_event_sample_format { |
| 167 | }; | 170 | }; |
| 168 | 171 | ||
| 169 | #define PERF_SAMPLE_WEIGHT_TYPE	(PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT) | 172 | #define PERF_SAMPLE_WEIGHT_TYPE	(PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT) |
| 173 | |||
| 170 | /* | 174 | /* |
| 171 | * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set | 175 | * Values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set. |
| 172 | * | 176 | * |
| 173 | * If the user does not pass priv level information via branch_sample_type, | 177 | * If the user does not pass priv level information via branch_sample_type, |
| 174 | * the kernel uses the event's priv level. Branch and event priv levels do | 178 | * the kernel uses the event's priv level. Branch and event priv levels do |
| ... | @@ -178,20 +182,20 @@ enum perf_event_sample_format { | ... | @@ -178,20 +182,20 @@ enum perf_event_sample_format { |
| 178 | * of branches and therefore it supersedes all the other types. | 182 | * of branches and therefore it supersedes all the other types. |
| 179 | */ | 183 | */ |
| 180 | enum perf_branch_sample_type_shift { | 184 | enum perf_branch_sample_type_shift { |
| 181 | 	PERF_SAMPLE_BRANCH_USER_SHIFT		= 0, /* user branches */ | 185 | 	PERF_SAMPLE_BRANCH_USER_SHIFT		= 0, /* user branches */ |
| 182 | 	PERF_SAMPLE_BRANCH_KERNEL_SHIFT		= 1, /* kernel branches */ | 186 | 	PERF_SAMPLE_BRANCH_KERNEL_SHIFT		= 1, /* kernel branches */ |
| 183 | 	PERF_SAMPLE_BRANCH_HV_SHIFT		= 2, /* hypervisor branches */ | 187 | 	PERF_SAMPLE_BRANCH_HV_SHIFT		= 2, /* hypervisor branches */ |
| 184 | 188 | ||
| 185 | 	PERF_SAMPLE_BRANCH_ANY_SHIFT		= 3, /* any branch types */ | 189 | 	PERF_SAMPLE_BRANCH_ANY_SHIFT		= 3, /* any branch types */ |
| 186 | 	PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT	= 4, /* any call branch */ | 190 | 	PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT	= 4, /* any call branch */ |
| 187 | 	PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT	= 5, /* any return branch */ | 191 | 	PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT	= 5, /* any return branch */ |
| 188 | 	PERF_SAMPLE_BRANCH_IND_CALL_SHIFT	= 6, /* indirect calls */ | 192 | 	PERF_SAMPLE_BRANCH_IND_CALL_SHIFT	= 6, /* indirect calls */ |
| 189 | 	PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT	= 7, /* transaction aborts */ | 193 | 	PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT	= 7, /* transaction aborts */ |
| 190 | 	PERF_SAMPLE_BRANCH_IN_TX_SHIFT		= 8, /* in transaction */ | 194 | 	PERF_SAMPLE_BRANCH_IN_TX_SHIFT		= 8, /* in transaction */ |
| 191 | 	PERF_SAMPLE_BRANCH_NO_TX_SHIFT		= 9, /* not in transaction */ | 195 | 	PERF_SAMPLE_BRANCH_NO_TX_SHIFT		= 9, /* not in transaction */ |
| 192 | 	PERF_SAMPLE_BRANCH_COND_SHIFT		= 10, /* conditional branches */ | 196 | 	PERF_SAMPLE_BRANCH_COND_SHIFT		= 10, /* conditional branches */ |
| 193 | 197 | ||
| 194 | 	PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT	= 11, /* call/ret stack */ | 198 | 	PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT	= 11, /* CALL/RET stack */ |
| 195 | 	PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT	= 12, /* indirect jumps */ | 199 | 	PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT	= 12, /* indirect jumps */ |
| 196 | 	PERF_SAMPLE_BRANCH_CALL_SHIFT		= 13, /* direct call */ | 200 | 	PERF_SAMPLE_BRANCH_CALL_SHIFT		= 13, /* direct call */ |
| 197 | 201 | ||
| ... | @@ -210,96 +214,95 @@ enum perf_branch_sample_type_shift { | ... | @@ -210,96 +214,95 @@ enum perf_branch_sample_type_shift { |
| 210 | }; | 214 | }; |
| 211 | 215 | ||
| 212 | enum perf_branch_sample_type { | 216 | enum perf_branch_sample_type { |
| 213 | 	PERF_SAMPLE_BRANCH_USER		= 1U << PERF_SAMPLE_BRANCH_USER_SHIFT, | 217 | 	PERF_SAMPLE_BRANCH_USER			= 1U << PERF_SAMPLE_BRANCH_USER_SHIFT, |
| 214 | 	PERF_SAMPLE_BRANCH_KERNEL	= 1U << PERF_SAMPLE_BRANCH_KERNEL_SHIFT, | 218 | 	PERF_SAMPLE_BRANCH_KERNEL		= 1U << PERF_SAMPLE_BRANCH_KERNEL_SHIFT, |
| 215 | 	PERF_SAMPLE_BRANCH_HV		= 1U << PERF_SAMPLE_BRANCH_HV_SHIFT, | 219 | 	PERF_SAMPLE_BRANCH_HV			= 1U << PERF_SAMPLE_BRANCH_HV_SHIFT, |
| 216 | 220 | ||
| 217 | 	PERF_SAMPLE_BRANCH_ANY		= 1U << PERF_SAMPLE_BRANCH_ANY_SHIFT, | 221 | 	PERF_SAMPLE_BRANCH_ANY			= 1U << PERF_SAMPLE_BRANCH_ANY_SHIFT, |
| 218 | 	PERF_SAMPLE_BRANCH_ANY_CALL	= 1U << PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT, | 222 | 	PERF_SAMPLE_BRANCH_ANY_CALL		= 1U << PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT, |
| 219 | 	PERF_SAMPLE_BRANCH_ANY_RETURN	= 1U << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT, | 223 | 	PERF_SAMPLE_BRANCH_ANY_RETURN		= 1U << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT, |
| 220 | 	PERF_SAMPLE_BRANCH_IND_CALL	= 1U << PERF_SAMPLE_BRANCH_IND_CALL_SHIFT, | 224 | 	PERF_SAMPLE_BRANCH_IND_CALL		= 1U << PERF_SAMPLE_BRANCH_IND_CALL_SHIFT, |
| 221 | 	PERF_SAMPLE_BRANCH_ABORT_TX	= 1U << PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT, | 225 | 	PERF_SAMPLE_BRANCH_ABORT_TX		= 1U << PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT, |
| 222 | 	PERF_SAMPLE_BRANCH_IN_TX	= 1U << PERF_SAMPLE_BRANCH_IN_TX_SHIFT, | 226 | 	PERF_SAMPLE_BRANCH_IN_TX		= 1U << PERF_SAMPLE_BRANCH_IN_TX_SHIFT, |
| 223 | 	PERF_SAMPLE_BRANCH_NO_TX	= 1U << PERF_SAMPLE_BRANCH_NO_TX_SHIFT, | 227 | 	PERF_SAMPLE_BRANCH_NO_TX		= 1U << PERF_SAMPLE_BRANCH_NO_TX_SHIFT, |
| 224 | 	PERF_SAMPLE_BRANCH_COND		= 1U << PERF_SAMPLE_BRANCH_COND_SHIFT, | 228 | 	PERF_SAMPLE_BRANCH_COND			= 1U << PERF_SAMPLE_BRANCH_COND_SHIFT, |
| 225 | 229 | ||
| 226 | 	PERF_SAMPLE_BRANCH_CALL_STACK	= 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, | 230 | 	PERF_SAMPLE_BRANCH_CALL_STACK		= 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, |
| 227 | 	PERF_SAMPLE_BRANCH_IND_JUMP	= 1U << PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT, | 231 | 	PERF_SAMPLE_BRANCH_IND_JUMP		= 1U << PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT, |
| 228 | 	PERF_SAMPLE_BRANCH_CALL		= 1U << PERF_SAMPLE_BRANCH_CALL_SHIFT, | 232 | 	PERF_SAMPLE_BRANCH_CALL			= 1U << PERF_SAMPLE_BRANCH_CALL_SHIFT, |
| 229 | 233 | ||
| 230 | 	PERF_SAMPLE_BRANCH_NO_FLAGS	= 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT, | 234 | 	PERF_SAMPLE_BRANCH_NO_FLAGS		= 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT, |
| 231 | 	PERF_SAMPLE_BRANCH_NO_CYCLES	= 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT, | 235 | 	PERF_SAMPLE_BRANCH_NO_CYCLES		= 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT, |
| 232 | 236 | ||
| 233 | 	PERF_SAMPLE_BRANCH_TYPE_SAVE	= | 237 | 	PERF_SAMPLE_BRANCH_TYPE_SAVE		= 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, |
| 234 | 		1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, | ||
| 235 | 238 | ||
| 236 | 	PERF_SAMPLE_BRANCH_HW_INDEX	= 1U << PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT, | 239 | 	PERF_SAMPLE_BRANCH_HW_INDEX		= 1U << PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT, |
| 237 | 240 | ||
| 238 | 	PERF_SAMPLE_BRANCH_PRIV_SAVE	= 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, | 241 | 	PERF_SAMPLE_BRANCH_PRIV_SAVE		= 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, |
| 239 | 242 | ||
| 240 | 	PERF_SAMPLE_BRANCH_COUNTERS	= 1U << PERF_SAMPLE_BRANCH_COUNTERS_SHIFT, | 243 | 	PERF_SAMPLE_BRANCH_COUNTERS		= 1U << PERF_SAMPLE_BRANCH_COUNTERS_SHIFT, |
| 241 | 244 | ||
| 242 | 	PERF_SAMPLE_BRANCH_MAX		= 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | 245 | 	PERF_SAMPLE_BRANCH_MAX			= 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, |
| 243 | }; | 246 | }; |
| 244 | 247 | ||
| 245 | /* | 248 | /* |
| 246 | * Common flow change classification | 249 | * Common control flow change classifications: |
| 247 | */ | 250 | */ |
| 248 | enum { | 251 | enum { |
| 249 | 	PERF_BR_UNKNOWN		= 0,	/* unknown */ | 252 | 	PERF_BR_UNKNOWN				= 0,	/* Unknown */ |
| 250 | 	PERF_BR_COND		= 1,	/* conditional */ | 253 | 	PERF_BR_COND				= 1,	/* Conditional */ |
| 251 | 	PERF_BR_UNCOND		= 2,	/* unconditional */ | 254 | 	PERF_BR_UNCOND				= 2,	/* Unconditional */ |
| 252 | 	PERF_BR_IND		= 3,	/* indirect */ | 255 | 	PERF_BR_IND				= 3,	/* Indirect */ |
| 253 | 	PERF_BR_CALL		= 4,	/* function call */ | 256 | 	PERF_BR_CALL				= 4,	/* Function call */ |
| 254 | 	PERF_BR_IND_CALL	= 5,	/* indirect function call */ | 257 | 	PERF_BR_IND_CALL			= 5,	/* Indirect function call */ |
| 255 | 	PERF_BR_RET		= 6,	/* function return */ | 258 | 	PERF_BR_RET				= 6,	/* Function return */ |
| 256 | 	PERF_BR_SYSCALL		= 7,	/* syscall */ | 259 | 	PERF_BR_SYSCALL				= 7,	/* Syscall */ |
| 257 | 	PERF_BR_SYSRET		= 8,	/* syscall return */ | 260 | 	PERF_BR_SYSRET				= 8,	/* Syscall return */ |
| 258 | 	PERF_BR_COND_CALL	= 9,	/* conditional function call */ | 261 | 	PERF_BR_COND_CALL			= 9,	/* Conditional function call */ |
| 259 | 	PERF_BR_COND_RET	= 10,	/* conditional function return */ | 262 | 	PERF_BR_COND_RET			= 10,	/* Conditional function return */ |
| 260 | 	PERF_BR_ERET		= 11,	/* exception return */ | 263 | 	PERF_BR_ERET				= 11,	/* Exception return */ |
| 261 | 	PERF_BR_IRQ		= 12,	/* irq */ | 264 | 	PERF_BR_IRQ				= 12,	/* IRQ */ |
| 262 | 	PERF_BR_SERROR		= 13,	/* system error */ | 265 | 	PERF_BR_SERROR				= 13,	/* System error */ |
| 263 | 	PERF_BR_NO_TX		= 14,	/* not in transaction */ | 266 | 	PERF_BR_NO_TX				= 14,	/* Not in transaction */ |
| 264 | 	PERF_BR_EXTEND_ABI	= 15,	/* extend ABI */ | 267 | 	PERF_BR_EXTEND_ABI			= 15,	/* Extend ABI */ |
| 265 | 	PERF_BR_MAX, | 268 | 	PERF_BR_MAX, |
| 266 | }; | 269 | }; |
| 267 | 270 | ||
| 268 | /* | 271 | /* |
| 269 | * Common branch speculation outcome classification | 272 | * Common branch speculation outcome classifications: |
| 270 | */ | 273 | */ |
| 271 | enum { | 274 | enum { |
| 272 | 	PERF_BR_SPEC_NA			= 0,	/* Not available */ | 275 | 	PERF_BR_SPEC_NA				= 0,	/* Not available */ |
| 273 | 	PERF_BR_SPEC_WRONG_PATH		= 1,	/* Speculative but on wrong path */ | 276 | 	PERF_BR_SPEC_WRONG_PATH			= 1,	/* Speculative but on wrong path */ |
| 274 | 	PERF_BR_NON_SPEC_CORRECT_PATH	= 2,	/* Non-speculative but on correct path */ | 277 | 	PERF_BR_NON_SPEC_CORRECT_PATH		= 2,	/* Non-speculative but on correct path */ |
| 275 | 	PERF_BR_SPEC_CORRECT_PATH	= 3,	/* Speculative and on correct path */ | 278 | 	PERF_BR_SPEC_CORRECT_PATH		= 3,	/* Speculative and on correct path */ |
| 276 | 	PERF_BR_SPEC_MAX, | 279 | 	PERF_BR_SPEC_MAX, |
| 277 | }; | 280 | }; |
| 278 | 281 | ||
| 279 | enum { | 282 | enum { |
| 280 | 	PERF_BR_NEW_FAULT_ALGN		= 0, /* Alignment fault */ | 283 | 	PERF_BR_NEW_FAULT_ALGN			= 0, /* Alignment fault */ |
| 281 | 	PERF_BR_NEW_FAULT_DATA		= 1, /* Data fault */ | 284 | 	PERF_BR_NEW_FAULT_DATA			= 1, /* Data fault */ |
| 282 | 	PERF_BR_NEW_FAULT_INST		= 2, /* Inst fault */ | 285 | 	PERF_BR_NEW_FAULT_INST			= 2, /* Inst fault */ |
| 283 | 	PERF_BR_NEW_ARCH_1		= 3, /* Architecture specific */ | 286 | 	PERF_BR_NEW_ARCH_1			= 3, /* Architecture specific */ |
| 284 | 	PERF_BR_NEW_ARCH_2		= 4, /* Architecture specific */ | 287 | 	PERF_BR_NEW_ARCH_2			= 4, /* Architecture specific */ |
| 285 | 	PERF_BR_NEW_ARCH_3		= 5, /* Architecture specific */ | 288 | 	PERF_BR_NEW_ARCH_3			= 5, /* Architecture specific */ |
| 286 | 	PERF_BR_NEW_ARCH_4		= 6, /* Architecture specific */ | 289 | 	PERF_BR_NEW_ARCH_4			= 6, /* Architecture specific */ |
| 287 | 	PERF_BR_NEW_ARCH_5		= 7, /* Architecture specific */ | 290 | 	PERF_BR_NEW_ARCH_5			= 7, /* Architecture specific */ |
| 288 | 	PERF_BR_NEW_MAX, | 291 | 	PERF_BR_NEW_MAX, |
| 289 | }; | 292 | }; |
| 290 | 293 | ||
| 291 | enum { | 294 | enum { |
| 292 | 	PERF_BR_PRIV_UNKNOWN	= 0, | 295 | 	PERF_BR_PRIV_UNKNOWN			= 0, |
| 293 | 	PERF_BR_PRIV_USER	= 1, | 296 | 	PERF_BR_PRIV_USER			= 1, |
| 294 | 	PERF_BR_PRIV_KERNEL	= 2, | 297 | 	PERF_BR_PRIV_KERNEL			= 2, |
| 295 | 	PERF_BR_PRIV_HV		= 3, | 298 | 	PERF_BR_PRIV_HV				= 3, |
| 296 | }; | 299 | }; |
| 297 | 300 | ||
| 298 | #define PERF_BR_ARM64_FIQ		PERF_BR_NEW_ARCH_1 | 301 | #define PERF_BR_ARM64_FIQ			PERF_BR_NEW_ARCH_1 |
| 299 | #define PERF_BR_ARM64_DEBUG_HALT	PERF_BR_NEW_ARCH_2 | 302 | #define PERF_BR_ARM64_DEBUG_HALT		PERF_BR_NEW_ARCH_2 |
| 300 | #define PERF_BR_ARM64_DEBUG_EXIT	PERF_BR_NEW_ARCH_3 | 303 | #define PERF_BR_ARM64_DEBUG_EXIT		PERF_BR_NEW_ARCH_3 |
| 301 | #define PERF_BR_ARM64_DEBUG_INST	PERF_BR_NEW_ARCH_4 | 304 | #define PERF_BR_ARM64_DEBUG_INST		PERF_BR_NEW_ARCH_4 |
| 302 | #define PERF_BR_ARM64_DEBUG_DATA	PERF_BR_NEW_ARCH_5 | 305 | #define PERF_BR_ARM64_DEBUG_DATA		PERF_BR_NEW_ARCH_5 |
| 303 | 306 | ||
| 304 | #define PERF_SAMPLE_BRANCH_PLM_ALL \ | 307 | #define PERF_SAMPLE_BRANCH_PLM_ALL \ |
| 305 | 	(PERF_SAMPLE_BRANCH_USER|\ | 308 | 	(PERF_SAMPLE_BRANCH_USER|\ |
| ... | @@ -310,9 +313,9 @@ enum { | ... | @@ -310,9 +313,9 @@ enum { |
| 310 | * Values to determine ABI of the registers dump. | 313 | * Values to determine ABI of the registers dump. |
| 311 | */ | 314 | */ |
| 312 | enum perf_sample_regs_abi { | 315 | enum perf_sample_regs_abi { |
| 313 | 	PERF_SAMPLE_REGS_ABI_NONE	= 0, | 316 | 	PERF_SAMPLE_REGS_ABI_NONE		= 0, |
| 314 | 	PERF_SAMPLE_REGS_ABI_32		= 1, | 317 | 	PERF_SAMPLE_REGS_ABI_32			= 1, |
| 315 | 	PERF_SAMPLE_REGS_ABI_64		= 2, | 318 | 	PERF_SAMPLE_REGS_ABI_64			= 2, |
| 316 | }; | 319 | }; |
| 317 | 320 | ||
| 318 | /* | 321 | /* |
| ... | @@ -320,21 +323,21 @@ enum perf_sample_regs_abi { | ... | @@ -320,21 +323,21 @@ enum perf_sample_regs_abi { |
| 320 | * abort events. Multiple bits can be set. | 323 | * abort events. Multiple bits can be set. |
| 321 | */ | 324 | */ |
| 322 | enum { | 325 | enum { |
| 323 | 	PERF_TXN_ELISION = (1 << 0), /* From elision */ | 326 | 	PERF_TXN_ELISION			= (1 << 0), /* From elision */ |
| 324 | 	PERF_TXN_TRANSACTION = (1 << 1), /* From transaction */ | 327 | 	PERF_TXN_TRANSACTION			= (1 << 1), /* From transaction */ |
| 325 | 	PERF_TXN_SYNC = (1 << 2), /* Instruction is related */ | 328 | 	PERF_TXN_SYNC				= (1 << 2), /* Instruction is related */ |
| 326 | 	PERF_TXN_ASYNC = (1 << 3), /* Instruction not related */ | 329 | 	PERF_TXN_ASYNC				= (1 << 3), /* Instruction is not related */ |
| 327 | 	PERF_TXN_RETRY = (1 << 4), /* Retry possible */ | 330 | 	PERF_TXN_RETRY				= (1 << 4), /* Retry possible */ |
| 328 | 	PERF_TXN_CONFLICT = (1 << 5), /* Conflict abort */ | 331 | 	PERF_TXN_CONFLICT			= (1 << 5), /* Conflict abort */ |
| 329 | 	PERF_TXN_CAPACITY_WRITE = (1 << 6), /* Capacity write abort */ | 332 | 	PERF_TXN_CAPACITY_WRITE			= (1 << 6), /* Capacity write abort */ |
| 330 | 	PERF_TXN_CAPACITY_READ = (1 << 7), /* Capacity read abort */ | 333 | 	PERF_TXN_CAPACITY_READ			= (1 << 7), /* Capacity read abort */ |
| 331 | 334 | ||
| 332 | 	PERF_TXN_MAX	 = (1 << 8), /* non-ABI */ | 335 | 	PERF_TXN_MAX				= (1 << 8), /* non-ABI */ |
| 333 | 336 | ||
| 334 | 	/* bits 32..63 are reserved for the abort code */ | 337 | 	/* Bits 32..63 are reserved for the abort code */ |
| 335 | 338 | ||
| 336 | 	PERF_TXN_ABORT_MASK = (0xffffffffULL << 32), | 339 | 	PERF_TXN_ABORT_MASK			= (0xffffffffULL << 32), |
| 337 | 	PERF_TXN_ABORT_SHIFT = 32, | 340 | 	PERF_TXN_ABORT_SHIFT			= 32, |
| 338 | }; | 341 | }; |
| 339 | 342 | ||
| 340 | /* | 343 | /* |
| ... | @@ -369,22 +372,22 @@ enum perf_event_read_format { | ... | @@ -369,22 +372,22 @@ enum perf_event_read_format { |
| 369 | 	PERF_FORMAT_MAX = 1U << 5,		/* non-ABI */ | 372 | 	PERF_FORMAT_MAX = 1U << 5,		/* non-ABI */ |
| 370 | }; | 373 | }; |
| 371 | 374 | ||
| 372 | #define PERF_ATTR_SIZE_VER0	64	/* sizeof first published struct */ | 375 | #define PERF_ATTR_SIZE_VER0			 64	/* Size of first published 'struct perf_event_attr' */ |
| 373 | #define PERF_ATTR_SIZE_VER1	72	/* add: config2 */ | 376 | #define PERF_ATTR_SIZE_VER1			 72	/* Add: config2 */ |
| 374 | #define PERF_ATTR_SIZE_VER2	80	/* add: branch_sample_type */ | 377 | #define PERF_ATTR_SIZE_VER2			 80	/* Add: branch_sample_type */ |
| 375 | #define PERF_ATTR_SIZE_VER3	96	/* add: sample_regs_user */ | 378 | #define PERF_ATTR_SIZE_VER3			 96	/* Add: sample_regs_user */ |
| 376 | 					/* add: sample_stack_user */ | 379 | 							/* Add: sample_stack_user */ |
| 377 | #define PERF_ATTR_SIZE_VER4	104	/* add: sample_regs_intr */ | 380 | #define PERF_ATTR_SIZE_VER4			104	/* Add: sample_regs_intr */ |
| 378 | #define PERF_ATTR_SIZE_VER5	112	/* add: aux_watermark */ | 381 | #define PERF_ATTR_SIZE_VER5			112	/* Add: aux_watermark */ |
| 379 | #define PERF_ATTR_SIZE_VER6	120	/* add: aux_sample_size */ | 382 | #define PERF_ATTR_SIZE_VER6			120	/* Add: aux_sample_size */ |
| 380 | #define PERF_ATTR_SIZE_VER7	128	/* add: sig_data */ | 383 | #define PERF_ATTR_SIZE_VER7			128	/* Add: sig_data */ |
| 381 | #define PERF_ATTR_SIZE_VER8	136	/* add: config3 */ | 384 | #define PERF_ATTR_SIZE_VER8			136	/* Add: config3 */ |
| 382 | 385 | ||
| 383 | /* | 386 | /* |
| 384 | * Hardware event_id to monitor via a performance monitoring event: | 387 | * 'struct perf_event_attr' contains various attributes that define |
| 385 | * | 388 | * a performance event - most of them hardware related configuration |
| 386 | * @sample_max_stack: Max number of frame pointers in a callchain, | 389 | * details, but also a lot of behavioral switches and values implemented |
| 387 | *		 should be < /proc/sys/kernel/perf_event_max_stack | 390 | * by the kernel. |
| 388 | */ | 391 | */ |
| 389 | struct perf_event_attr { | 392 | struct perf_event_attr { |
| 390 | 393 | ||
| ... | @@ -394,7 +397,7 @@ struct perf_event_attr { | ... | @@ -394,7 +397,7 @@ struct perf_event_attr { |
| 394 | 	__u32			type; | 397 | 	__u32			type; |
| 395 | 398 | ||
| 396 | 	/* | 399 | 	/* |
| 397 | 	 * Size of the attr structure, for fwd/bwd compat. | 400 | 	 * Size of the attr structure, for forward/backwards compatibility. |
| 398 | 	 */ | 401 | 	 */ |
| 399 | 	__u32			size; | 402 | 	__u32			size; |
| 400 | 403 | ||
| ... | @@ -449,21 +452,21 @@ struct perf_event_attr { | ... | @@ -449,21 +452,21 @@ struct perf_event_attr { |
| 449 | 				comm_exec : 1, /* flag comm events that are due to an exec */ | 452 | 				comm_exec : 1, /* flag comm events that are due to an exec */ |
| 450 | 				use_clockid : 1, /* use @clockid for time fields */ | 453 | 				use_clockid : 1, /* use @clockid for time fields */ |
| 451 | 				context_switch : 1, /* context switch data */ | 454 | 				context_switch : 1, /* context switch data */ |
| 452 | 				write_backward : 1, /* Write ring buffer from end to beginning */ | 455 | 				write_backward : 1, /* write ring buffer from end to beginning */ |
| 453 | 				namespaces : 1, /* include namespaces data */ | 456 | 				namespaces : 1, /* include namespaces data */ |
| 454 | 				ksymbol : 1, /* include ksymbol events */ | 457 | 				ksymbol : 1, /* include ksymbol events */ |
| 455 | 				bpf_event : 1, /* include bpf events */ | 458 | 				bpf_event : 1, /* include BPF events */ |
| 456 | 				aux_output : 1, /* generate AUX records instead of events */ | 459 | 				aux_output : 1, /* generate AUX records instead of events */ |
| 457 | 				cgroup : 1, /* include cgroup events */ | 460 | 				cgroup : 1, /* include cgroup events */ |
| 458 | 				text_poke : 1, /* include text poke events */ | 461 | 				text_poke : 1, /* include text poke events */ |
| 459 | 				build_id : 1, /* use build id in mmap2 events */ | 462 | 				build_id : 1, /* use build ID in mmap2 events */ |
| 460 | 				inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */ | 463 | 				inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */ |
| 461 | 				remove_on_exec : 1, /* event is removed from task on exec */ | 464 | 				remove_on_exec : 1, /* event is removed from task on exec */ |
| 462 | 				sigtrap : 1, /* send synchronous SIGTRAP on event */ | 465 | 				sigtrap : 1, /* send synchronous SIGTRAP on event */ |
| 463 | 				__reserved_1 : 26; | 466 | 				__reserved_1 : 26; |
| 464 | 467 | ||
| 465 | 	union { | 468 | 	union { |
| 466 | 		__u32		wakeup_events;	 /* wakeup every n events */ | 469 | 		__u32		wakeup_events;	 /* wake up every n events */ |
| 467 | 		__u32		wakeup_watermark; /* bytes before wakeup */ | 470 | 		__u32		wakeup_watermark; /* bytes before wakeup */ |
| 468 | 	}; | 471 | 	}; |
| 469 | 472 | ||
| ... | @@ -472,13 +475,13 @@ struct perf_event_attr { | ... | @@ -472,13 +475,13 @@ struct perf_event_attr { |
| 472 | 		__u64		bp_addr; | 475 | 		__u64		bp_addr; |
| 473 | 		__u64		kprobe_func; /* for perf_kprobe */ | 476 | 		__u64		kprobe_func; /* for perf_kprobe */ |
| 474 | 		__u64		uprobe_path; /* for perf_uprobe */ | 477 | 		__u64		uprobe_path; /* for perf_uprobe */ |
| 475 | 		__u64		config1; /* extension of config */ | 478 | 		__u64		config1; /* extension of config */ |
| 476 | 	}; | 479 | 	}; |
| 477 | 	union { | 480 | 	union { |
| 478 | 		__u64		bp_len; | 481 | 		__u64		bp_len; |
| 479 | 		__u64		kprobe_addr; /* when kprobe_func == NULL */ | 482 | 		__u64		kprobe_addr; /* when kprobe_func == NULL */ |
| 480 | 		__u64		probe_offset; /* for perf_[k,u]probe */ | 483 | 		__u64		probe_offset; /* for perf_[k,u]probe */ |
| 481 | 		__u64		config2; /* extension of config1 */ | 484 | 		__u64		config2; /* extension of config1 */ |
| 482 | 	}; | 485 | 	}; |
| 483 | 	__u64	branch_sample_type; /* enum perf_branch_sample_type */ | 486 | 	__u64	branch_sample_type; /* enum perf_branch_sample_type */ |
| 484 | 487 | ||
| ... | @@ -508,7 +511,16 @@ struct perf_event_attr { | ... | @@ -508,7 +511,16 @@ struct perf_event_attr { |
| 508 | 	 * Wakeup watermark for AUX area | 511 | 	 * Wakeup watermark for AUX area |
| 509 | 	 */ | 512 | 	 */ |
| 510 | 	__u32	aux_watermark; | 513 | 	__u32	aux_watermark; |
| 514 | |||
| 515 | 	/* | ||
| 516 | 	 * Max number of frame pointers in a callchain, should be | ||
| 517 | 	 * lower than /proc/sys/kernel/perf_event_max_stack. | ||
| 518 | 	 * | ||
| 519 | 	 * Max number of entries of branch stack should be lower | ||
| 520 | 	 * than the hardware limit. | ||
| 521 | 	 */ | ||
| 511 | 	__u16	sample_max_stack; | 522 | 	__u16	sample_max_stack; |
| 523 | |||
| 512 | 	__u16	__reserved_2; | 524 | 	__u16	__reserved_2; |
| 513 | 	__u32	aux_sample_size; | 525 | 	__u32	aux_sample_size; |
| 514 | 526 | ||
| ... | @@ -535,7 +547,7 @@ struct perf_event_attr { | ... | @@ -535,7 +547,7 @@ struct perf_event_attr { |
| 535 | 547 | ||
| 536 | /* | 548 | /* |
| 537 | * Structure used by below PERF_EVENT_IOC_QUERY_BPF command | 549 | * Structure used by below PERF_EVENT_IOC_QUERY_BPF command |
| 538 | * to query bpf programs attached to the same perf tracepoint | 550 | * to query BPF programs attached to the same perf tracepoint |
| 539 | * as the given perf event. | 551 | * as the given perf event. |
| 540 | */ | 552 | */ |
| 541 | struct perf_event_query_bpf { | 553 | struct perf_event_query_bpf { |
| ... | @@ -557,21 +569,21 @@ struct perf_event_query_bpf { | ... | @@ -557,21 +569,21 @@ struct perf_event_query_bpf { |
| 557 | /* | 569 | /* |
| 558 | * Ioctls that can be done on a perf event fd: | 570 | * Ioctls that can be done on a perf event fd: |
| 559 | */ | 571 | */ |
| 560 | #define PERF_EVENT_IOC_ENABLE			_IO ('$', 0) | 572 | #define PERF_EVENT_IOC_ENABLE			_IO ('$', 0) |
| 561 | #define PERF_EVENT_IOC_DISABLE			_IO ('$', 1) | 573 | #define PERF_EVENT_IOC_DISABLE			_IO ('$', 1) |
| 562 | #define PERF_EVENT_IOC_REFRESH			_IO ('$', 2) | 574 | #define PERF_EVENT_IOC_REFRESH			_IO ('$', 2) |
| 563 | #define PERF_EVENT_IOC_RESET			_IO ('$', 3) | 575 | #define PERF_EVENT_IOC_RESET			_IO ('$', 3) |
| 564 | #define PERF_EVENT_IOC_PERIOD			_IOW('$', 4, __u64) | 576 | #define PERF_EVENT_IOC_PERIOD			_IOW ('$', 4, __u64) |
| 565 | #define PERF_EVENT_IOC_SET_OUTPUT		_IO ('$', 5) | 577 | #define PERF_EVENT_IOC_SET_OUTPUT		_IO ('$', 5) |
| 566 | #define PERF_EVENT_IOC_SET_FILTER		_IOW('$', 6, char *) | 578 | #define PERF_EVENT_IOC_SET_FILTER		_IOW ('$', 6, char *) |
| 567 | #define PERF_EVENT_IOC_ID			_IOR('$', 7, __u64 *) | 579 | #define PERF_EVENT_IOC_ID			_IOR ('$', 7, __u64 *) |
| 568 | #define PERF_EVENT_IOC_SET_BPF			_IOW('$', 8, __u32) | 580 | #define PERF_EVENT_IOC_SET_BPF			_IOW ('$', 8, __u32) |
| 569 | #define PERF_EVENT_IOC_PAUSE_OUTPUT		_IOW('$', 9, __u32) | 581 | #define PERF_EVENT_IOC_PAUSE_OUTPUT		_IOW ('$', 9, __u32) |
| 570 | #define PERF_EVENT_IOC_QUERY_BPF		_IOWR('$', 10, struct perf_event_query_bpf *) | 582 | #define PERF_EVENT_IOC_QUERY_BPF		_IOWR('$', 10, struct perf_event_query_bpf *) |
| 571 | #define PERF_EVENT_IOC_MODIFY_ATTRIBUTES	_IOW('$', 11, struct perf_event_attr *) | 583 | #define PERF_EVENT_IOC_MODIFY_ATTRIBUTES	_IOW ('$', 11, struct perf_event_attr *) |
| 572 | 584 | ||
| 573 | enum perf_event_ioc_flags { | 585 | enum perf_event_ioc_flags { |
| 574 | 	PERF_IOC_FLAG_GROUP		= 1U << 0, | 586 | 	PERF_IOC_FLAG_GROUP			= 1U << 0, |
| 575 | }; | 587 | }; |
| 576 | 588 | ||
| 577 | /* | 589 | /* |
| ... | @@ -582,7 +594,7 @@ struct perf_event_mmap_page { | ... | @@ -582,7 +594,7 @@ struct perf_event_mmap_page { |
| 582 | 	__u32	compat_version;		/* lowest version this is compat with */ | 594 | 	__u32	compat_version;		/* lowest version this is compat with */ |
| 583 | 595 | ||
| 584 | 	/* | 596 | 	/* |
| 585 | 	 * Bits needed to read the hw events in user-space. | 597 | 	 * Bits needed to read the HW events in user-space. |
| 586 | 	 * | 598 | 	 * |
| 587 | 	 * u32 seq, time_mult, time_shift, index, width; | 599 | 	 * u32 seq, time_mult, time_shift, index, width; |
| 588 | 	 * u64 count, enabled, running; | 600 | 	 * u64 count, enabled, running; |
| ... | @@ -620,7 +632,7 @@ struct perf_event_mmap_page { | ... | @@ -620,7 +632,7 @@ struct perf_event_mmap_page { |
| 620 | 	__u32	index;			/* hardware event identifier */ | 632 | 	__u32	index;			/* hardware event identifier */ |
| 621 | 	__s64	offset;			/* add to hardware event value */ | 633 | 	__s64	offset;			/* add to hardware event value */ |
| 622 | 	__u64	time_enabled;		/* time event active */ | 634 | 	__u64	time_enabled;		/* time event active */ |
| 623 | 	__u64	time_running;		/* time event on cpu */ | 635 | 	__u64	time_running;		/* time event on CPU */ |
| 624 | 	union { | 636 | 	union { |
| 625 | 		__u64	capabilities; | 637 | 		__u64	capabilities; |
| 626 | 		struct { | 638 | 		struct { |
| ... | @@ -648,7 +660,7 @@ struct perf_event_mmap_page { | ... | @@ -648,7 +660,7 @@ struct perf_event_mmap_page { |
| 648 | 660 | ||
| 649 | 	/* | 661 | 	/* |
| 650 | 	 * If cap_usr_time the below fields can be used to compute the time | 662 | 	 * If cap_usr_time the below fields can be used to compute the time |
| 651 | 	 * delta since time_enabled (in ns) using rdtsc or similar. | 663 | 	 * delta since time_enabled (in ns) using RDTSC or similar. |
| 652 | 	 * | 664 | 	 * |
| 653 | 	 * u64 quot, rem; | 665 | 	 * u64 quot, rem; |
| 654 | 	 * u64 delta; | 666 | 	 * u64 delta; |
| ... | @@ -721,7 +733,7 @@ struct perf_event_mmap_page { | ... | @@ -721,7 +733,7 @@ struct perf_event_mmap_page { |
| 721 | 	 * after reading this value. | 733 | 	 * after reading this value. |
| 722 | 	 * | 734 | 	 * |
| 723 | 	 * When the mapping is PROT_WRITE the @data_tail value should be | 735 | 	 * When the mapping is PROT_WRITE the @data_tail value should be |
| 724 | 	 * written by userspace to reflect the last read data, after issueing | 736 | 	 * written by user-space to reflect the last read data, after issuing |
| 725 | 	 * an smp_mb() to separate the data read from the ->data_tail store. | 737 | 	 * an smp_mb() to separate the data read from the ->data_tail store. |
| 726 | 	 * In this case the kernel will not over-write unread data. | 738 | 	 * In this case the kernel will not over-write unread data. |
| 727 | 	 * | 739 | 	 * |
| ... | @@ -737,7 +749,7 @@ struct perf_event_mmap_page { | ... | @@ -737,7 +749,7 @@ struct perf_event_mmap_page { |
| 737 | 749 | ||
| 738 | 	/* | 750 | 	/* |
| 739 | 	 * AUX area is defined by aux_{offset,size} fields that should be set | 751 | 	 * AUX area is defined by aux_{offset,size} fields that should be set |
| 740 | 	 * by the userspace, so that | 752 | 	 * by the user-space, so that |
| 741 | 	 * | 753 | 	 * |
| 742 | 	 * aux_offset >= data_offset + data_size | 754 | 	 * aux_offset >= data_offset + data_size |
| 743 | 	 * | 755 | 	 * |
| ... | @@ -811,7 +823,7 @@ struct perf_event_mmap_page { | ... | @@ -811,7 +823,7 @@ struct perf_event_mmap_page { |
| 811 | * Indicates that thread was preempted in TASK_RUNNING state. | 823 | * Indicates that thread was preempted in TASK_RUNNING state. |
| 812 | * | 824 | * |
| 813 | * PERF_RECORD_MISC_MMAP_BUILD_ID: | 825 | * PERF_RECORD_MISC_MMAP_BUILD_ID: |
| 814 | * Indicates that mmap2 event carries build id data. | 826 | * Indicates that mmap2 event carries build ID data. |
| 815 | */ | 827 | */ |
| 816 | #define PERF_RECORD_MISC_EXACT_IP		(1 << 14) | 828 | #define PERF_RECORD_MISC_EXACT_IP		(1 << 14) |
| 817 | #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT	(1 << 14) | 829 | #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT	(1 << 14) |
| ... | @@ -822,26 +834,26 @@ struct perf_event_mmap_page { | ... | @@ -822,26 +834,26 @@ struct perf_event_mmap_page { |
| 822 | #define PERF_RECORD_MISC_EXT_RESERVED		(1 << 15) | 834 | #define PERF_RECORD_MISC_EXT_RESERVED		(1 << 15) |
| 823 | 835 | ||
| 824 | struct perf_event_header { | 836 | struct perf_event_header { |
| 825 | 	__u32	type; | 837 | 	__u32 type; |
| 826 | 	__u16	misc; | 838 | 	__u16 misc; |
| 827 | 	__u16	size; | 839 | 	__u16 size; |
| 828 | }; | 840 | }; |
| 829 | 841 | ||
| 830 | struct perf_ns_link_info { | 842 | struct perf_ns_link_info { |
| 831 | 	__u64	dev; | 843 | 	__u64 dev; |
| 832 | 	__u64	ino; | 844 | 	__u64 ino; |
| 833 | }; | 845 | }; |
| 834 | 846 | ||
| 835 | enum { | 847 | enum { |
| 836 | 	NET_NS_INDEX		= 0, | 848 | 	NET_NS_INDEX				= 0, |
| 837 | 	UTS_NS_INDEX		= 1, | 849 | 	UTS_NS_INDEX				= 1, |
| 838 | 	IPC_NS_INDEX		= 2, | 850 | 	IPC_NS_INDEX				= 2, |
| 839 | 	PID_NS_INDEX		= 3, | 851 | 	PID_NS_INDEX				= 3, |
| 840 | 	USER_NS_INDEX		= 4, | 852 | 	USER_NS_INDEX				= 4, |
| 841 | 	MNT_NS_INDEX		= 5, | 853 | 	MNT_NS_INDEX				= 5, |
| 842 | 	CGROUP_NS_INDEX		= 6, | 854 | 	CGROUP_NS_INDEX				= 6, |
| 843 | 855 | ||
| 844 | 	NR_NAMESPACES,		/* number of available namespaces */ | 856 | 	NR_NAMESPACES, /* number of available namespaces */ |
| 845 | }; | 857 | }; |
| 846 | 858 | ||
| 847 | enum perf_event_type { | 859 | enum perf_event_type { |
| ... | @@ -857,11 +869,11 @@ enum perf_event_type { | ... | @@ -857,11 +869,11 @@ enum perf_event_type { |
| 857 | 	 * optional fields being ignored. | 869 | 	 * optional fields being ignored. |
| 858 | 	 * | 870 | 	 * |
| 859 | 	 * struct sample_id { | 871 | 	 * struct sample_id { |
| 860 | 	 * 	{ u32			pid, tid; } && PERF_SAMPLE_TID | 872 | 	 *	{ u32			pid, tid; } && PERF_SAMPLE_TID |
| 861 | 	 * 	{ u64			time; } && PERF_SAMPLE_TIME | 873 | 	 *	{ u64			time; } && PERF_SAMPLE_TIME |
| 862 | 	 * 	{ u64			id; } && PERF_SAMPLE_ID | 874 | 	 *	{ u64			id; } && PERF_SAMPLE_ID |
| 863 | 	 * 	{ u64			stream_id;} && PERF_SAMPLE_STREAM_ID | 875 | 	 *	{ u64			stream_id;} && PERF_SAMPLE_STREAM_ID |
| 864 | 	 * 	{ u32			cpu, res; } && PERF_SAMPLE_CPU | 876 | 	 *	{ u32			cpu, res; } && PERF_SAMPLE_CPU |
| 865 | 	 *	{ u64			id;	 } && PERF_SAMPLE_IDENTIFIER | 877 | 	 *	{ u64			id;	 } && PERF_SAMPLE_IDENTIFIER |
| 866 | 	 * } && perf_event_attr::sample_id_all | 878 | 	 * } && perf_event_attr::sample_id_all |
| 867 | 	 * | 879 | 	 * |
| ... | @@ -872,7 +884,7 @@ enum perf_event_type { | ... | @@ -872,7 +884,7 @@ enum perf_event_type { |
| 872 | 884 | ||
| 873 | 	/* | 885 | 	/* |
| 874 | 	 * The MMAP events record the PROT_EXEC mappings so that we can | 886 | 	 * The MMAP events record the PROT_EXEC mappings so that we can |
| 875 | 	 * correlate userspace IPs to code. They have the following structure: | 887 | 	 * correlate user-space IPs to code. They have the following structure: |
| 876 | 	 * | 888 | 	 * |
| 877 | 	 * struct { | 889 | 	 * struct { |
| 878 | 	 *	struct perf_event_header	header; | 890 | 	 *	struct perf_event_header	header; |
| ... | @@ -882,7 +894,7 @@ enum perf_event_type { | ... | @@ -882,7 +894,7 @@ enum perf_event_type { |
| 882 | 	 *	u64				len; | 894 | 	 *	u64				len; |
| 883 | 	 *	u64				pgoff; | 895 | 	 *	u64				pgoff; |
| 884 | 	 *	char				filename[]; | 896 | 	 *	char				filename[]; |
| 885 | 	 * 	struct sample_id		sample_id; | 897 | 	 *	struct sample_id		sample_id; |
| 886 | 	 * }; | 898 | 	 * }; |
| 887 | 	 */ | 899 | 	 */ |
| 888 | 	PERF_RECORD_MMAP			= 1, | 900 | 	PERF_RECORD_MMAP			= 1, |
| ... | @@ -892,7 +904,7 @@ enum perf_event_type { | ... | @@ -892,7 +904,7 @@ enum perf_event_type { |
| 892 | 	 *	struct perf_event_header	header; | 904 | 	 *	struct perf_event_header	header; |
| 893 | 	 *	u64				id; | 905 | 	 *	u64				id; |
| 894 | 	 *	u64				lost; | 906 | 	 *	u64				lost; |
| 895 | 	 * 	struct sample_id		sample_id; | 907 | 	 *	struct sample_id		sample_id; |
| 896 | 	 * }; | 908 | 	 * }; |
| 897 | 	 */ | 909 | 	 */ |
| 898 | 	PERF_RECORD_LOST			= 2, | 910 | 	PERF_RECORD_LOST			= 2, |
| ... | @@ -903,7 +915,7 @@ enum perf_event_type { | ... | @@ -903,7 +915,7 @@ enum perf_event_type { |
| 903 | 	 * | 915 | 	 * |
| 904 | 	 *	u32				pid, tid; | 916 | 	 *	u32				pid, tid; |
| 905 | 	 *	char				comm[]; | 917 | 	 *	char				comm[]; |
| 906 | 	 * 	struct sample_id		sample_id; | 918 | 	 *	struct sample_id		sample_id; |
| 907 | 	 * }; | 919 | 	 * }; |
| 908 | 	 */ | 920 | 	 */ |
| 909 | 	PERF_RECORD_COMM			= 3, | 921 | 	PERF_RECORD_COMM			= 3, |
| ... | @@ -914,7 +926,7 @@ enum perf_event_type { | ... | @@ -914,7 +926,7 @@ enum perf_event_type { |
| 914 | 	 *	u32				pid, ppid; | 926 | 	 *	u32				pid, ppid; |
| 915 | 	 *	u32				tid, ptid; | 927 | 	 *	u32				tid, ptid; |
| 916 | 	 *	u64				time; | 928 | 	 *	u64				time; |
| 917 | 	 * 	struct sample_id		sample_id; | 929 | 	 *	struct sample_id		sample_id; |
| 918 | 	 * }; | 930 | 	 * }; |
| 919 | 	 */ | 931 | 	 */ |
| 920 | 	PERF_RECORD_EXIT			= 4, | 932 | 	PERF_RECORD_EXIT			= 4, |
| ... | @@ -925,7 +937,7 @@ enum perf_event_type { | ... | @@ -925,7 +937,7 @@ enum perf_event_type { |
| 925 | 	 *	u64				time; | 937 | 	 *	u64				time; |
| 926 | 	 *	u64				id; | 938 | 	 *	u64				id; |
| 927 | 	 *	u64				stream_id; | 939 | 	 *	u64				stream_id; |
| 928 | 	 * 	struct sample_id		sample_id; | 940 | 	 *	struct sample_id		sample_id; |
| 929 | 	 * }; | 941 | 	 * }; |
| 930 | 	 */ | 942 | 	 */ |
| 931 | 	PERF_RECORD_THROTTLE			= 5, | 943 | 	PERF_RECORD_THROTTLE			= 5, |
| ... | @@ -937,7 +949,7 @@ enum perf_event_type { | ... | @@ -937,7 +949,7 @@ enum perf_event_type { |
| 937 | 	 *	u32				pid, ppid; | 949 | 	 *	u32				pid, ppid; |
| 938 | 	 *	u32				tid, ptid; | 950 | 	 *	u32				tid, ptid; |
| 939 | 	 *	u64				time; | 951 | 	 *	u64				time; |
| 940 | 	 * 	struct sample_id		sample_id; | 952 | 	 *	struct sample_id		sample_id; |
| 941 | 	 * }; | 953 | 	 * }; |
| 942 | 	 */ | 954 | 	 */ |
| 943 | 	PERF_RECORD_FORK			= 7, | 955 | 	PERF_RECORD_FORK			= 7, |
| ... | @@ -948,7 +960,7 @@ enum perf_event_type { | ... | @@ -948,7 +960,7 @@ enum perf_event_type { |
| 948 | 	 *	u32				pid, tid; | 960 | 	 *	u32				pid, tid; |
| 949 | 	 * | 961 | 	 * |
| 950 | 	 *	struct read_format		values; | 962 | 	 *	struct read_format		values; |
| 951 | 	 * 	struct sample_id		sample_id; | 963 | 	 *	struct sample_id		sample_id; |
| 952 | 	 * }; | 964 | 	 * }; |
| 953 | 	 */ | 965 | 	 */ |
| 954 | 	PERF_RECORD_READ			= 8, | 966 | 	PERF_RECORD_READ			= 8, |
| ... | @@ -1003,12 +1015,12 @@ enum perf_event_type { | ... | @@ -1003,12 +1015,12 @@ enum perf_event_type { |
| 1003 | 	 * { u64 counters; } cntr[nr] && PERF_SAMPLE_BRANCH_COUNTERS | 1015 | 	 * { u64 counters; } cntr[nr] && PERF_SAMPLE_BRANCH_COUNTERS |
| 1004 | 	 * } && PERF_SAMPLE_BRANCH_STACK | 1016 | 	 * } && PERF_SAMPLE_BRANCH_STACK |
| 1005 | 	 * | 1017 | 	 * |
| 1006 | 	 * 	{ u64			abi; # enum perf_sample_regs_abi | 1018 | 	 *	{ u64			abi; # enum perf_sample_regs_abi |
| 1007 | 	 * 	 u64			regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER | 1019 | 	 *	 u64			regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER |
| 1008 | 	 * | 1020 | 	 * |
| 1009 | 	 * 	{ u64			size; | 1021 | 	 *	{ u64			size; |
| 1010 | 	 * 	 char			data[size]; | 1022 | 	 *	 char			data[size]; |
| 1011 | 	 * 	 u64			dyn_size; } && PERF_SAMPLE_STACK_USER | 1023 | 	 *	 u64			dyn_size; } && PERF_SAMPLE_STACK_USER |
| 1012 | 	 * | 1024 | 	 * |
| 1013 | 	 *	{ union perf_sample_weight | 1025 | 	 *	{ union perf_sample_weight |
| 1014 | 	 *	 { | 1026 | 	 *	 { |
| ... | @@ -1033,10 +1045,11 @@ enum perf_event_type { | ... | @@ -1033,10 +1045,11 @@ enum perf_event_type { |
| 1033 | 	 *	{ u64			abi; # enum perf_sample_regs_abi | 1045 | 	 *	{ u64			abi; # enum perf_sample_regs_abi |
| 1034 | 	 *	 u64			regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR | 1046 | 	 *	 u64			regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR |
| 1035 | 	 *	{ u64			phys_addr;} && PERF_SAMPLE_PHYS_ADDR | 1047 | 	 *	{ u64			phys_addr;} && PERF_SAMPLE_PHYS_ADDR |
| 1036 | 	 *	{ u64			size; | 1048 | 	 *	{ u64			cgroup;} && PERF_SAMPLE_CGROUP |
| 1037 | 	 *	 char			data[size]; } && PERF_SAMPLE_AUX | ||
| 1038 | 	 *	{ u64			data_page_size;} && PERF_SAMPLE_DATA_PAGE_SIZE | 1049 | 	 *	{ u64			data_page_size;} && PERF_SAMPLE_DATA_PAGE_SIZE |
| 1039 | 	 *	{ u64			code_page_size;} && PERF_SAMPLE_CODE_PAGE_SIZE | 1050 | 	 *	{ u64			code_page_size;} && PERF_SAMPLE_CODE_PAGE_SIZE |
| 1051 | 	 *	{ u64			size; | ||
| 1052 | 	 *	 char			data[size]; } && PERF_SAMPLE_AUX | ||
| 1040 | 	 * }; | 1053 | 	 * }; |
| 1041 | 	 */ | 1054 | 	 */ |
| 1042 | 	PERF_RECORD_SAMPLE			= 9, | 1055 | 	PERF_RECORD_SAMPLE			= 9, |
| ... | @@ -1068,7 +1081,7 @@ enum perf_event_type { | ... | @@ -1068,7 +1081,7 @@ enum perf_event_type { |
| 1068 | 	 *	}; | 1081 | 	 *	}; |
| 1069 | 	 *	u32				prot, flags; | 1082 | 	 *	u32				prot, flags; |
| 1070 | 	 *	char				filename[]; | 1083 | 	 *	char				filename[]; |
| 1071 | 	 * 	struct sample_id		sample_id; | 1084 | 	 *	struct sample_id		sample_id; |
| 1072 | 	 * }; | 1085 | 	 * }; |
| 1073 | 	 */ | 1086 | 	 */ |
| 1074 | 	PERF_RECORD_MMAP2			= 10, | 1087 | 	PERF_RECORD_MMAP2			= 10, |
| ... | @@ -1077,12 +1090,12 @@ enum perf_event_type { | ... | @@ -1077,12 +1090,12 @@ enum perf_event_type { |
| 1077 | 	 * Records that new data landed in the AUX buffer part. | 1090 | 	 * Records that new data landed in the AUX buffer part. |
| 1078 | 	 * | 1091 | 	 * |
| 1079 | 	 * struct { | 1092 | 	 * struct { |
| 1080 | 	 * 	struct perf_event_header	header; | 1093 | 	 *	struct perf_event_header	header; |
| 1081 | 	 * | 1094 | 	 * |
| 1082 | 	 * 	u64				aux_offset; | 1095 | 	 *	u64				aux_offset; |
| 1083 | 	 * 	u64				aux_size; | 1096 | 	 *	u64				aux_size; |
| 1084 | 	 *	u64				flags; | 1097 | 	 *	u64				flags; |
| 1085 | 	 * 	struct sample_id		sample_id; | 1098 | 	 *	struct sample_id		sample_id; |
| 1086 | 	 * }; | 1099 | 	 * }; |
| 1087 | 	 */ | 1100 | 	 */ |
| 1088 | 	PERF_RECORD_AUX				= 11, | 1101 | 	PERF_RECORD_AUX				= 11, |
| ... | @@ -1165,7 +1178,7 @@ enum perf_event_type { | ... | @@ -1165,7 +1178,7 @@ enum perf_event_type { |
| 1165 | 	PERF_RECORD_KSYMBOL			= 17, | 1178 | 	PERF_RECORD_KSYMBOL			= 17, |
| 1166 | 1179 | ||
| 1167 | 	/* | 1180 | 	/* |
| 1168 | 	 * Record bpf events: | 1181 | 	 * Record BPF events: |
| 1169 | 	 * enum perf_bpf_event_type { | 1182 | 	 * enum perf_bpf_event_type { |
| 1170 | 	 *	PERF_BPF_EVENT_UNKNOWN		= 0, | 1183 | 	 *	PERF_BPF_EVENT_UNKNOWN		= 0, |
| 1171 | 	 *	PERF_BPF_EVENT_PROG_LOAD	= 1, | 1184 | 	 *	PERF_BPF_EVENT_PROG_LOAD	= 1, |
| ... | @@ -1243,181 +1256,181 @@ enum perf_record_ksymbol_type { | ... | @@ -1243,181 +1256,181 @@ enum perf_record_ksymbol_type { |
| 1243 | #define PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER	(1 << 0) | 1256 | #define PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER	(1 << 0) |
| 1244 | 1257 | ||
| 1245 | enum perf_bpf_event_type { | 1258 | enum perf_bpf_event_type { |
| 1246 | 	PERF_BPF_EVENT_UNKNOWN		= 0, | 1259 | 	PERF_BPF_EVENT_UNKNOWN			= 0, |
| 1247 | 	PERF_BPF_EVENT_PROG_LOAD	= 1, | 1260 | 	PERF_BPF_EVENT_PROG_LOAD		= 1, |
| 1248 | 	PERF_BPF_EVENT_PROG_UNLOAD	= 2, | 1261 | 	PERF_BPF_EVENT_PROG_UNLOAD		= 2, |
| 1249 | 	PERF_BPF_EVENT_MAX,		/* non-ABI */ | 1262 | 	PERF_BPF_EVENT_MAX,			/* non-ABI */ |
| 1250 | }; | 1263 | }; |
| 1251 | 1264 | ||
| 1252 | #define PERF_MAX_STACK_DEPTH		127 | 1265 | #define PERF_MAX_STACK_DEPTH			127 |
| 1253 | #define PERF_MAX_CONTEXTS_PER_STACK	 8 | 1266 | #define PERF_MAX_CONTEXTS_PER_STACK		 8 |
| 1254 | 1267 | ||
| 1255 | enum perf_callchain_context { | 1268 | enum perf_callchain_context { |
| 1256 | 	PERF_CONTEXT_HV			= (__u64)-32, | 1269 | 	PERF_CONTEXT_HV				= (__u64)-32, |
| 1257 | 	PERF_CONTEXT_KERNEL		= (__u64)-128, | 1270 | 	PERF_CONTEXT_KERNEL			= (__u64)-128, |
| 1258 | 	PERF_CONTEXT_USER		= (__u64)-512, | 1271 | 	PERF_CONTEXT_USER			= (__u64)-512, |
| 1259 | 1272 | ||
| 1260 | 	PERF_CONTEXT_GUEST		= (__u64)-2048, | 1273 | 	PERF_CONTEXT_GUEST			= (__u64)-2048, |
| 1261 | 	PERF_CONTEXT_GUEST_KERNEL	= (__u64)-2176, | 1274 | 	PERF_CONTEXT_GUEST_KERNEL		= (__u64)-2176, |
| 1262 | 	PERF_CONTEXT_GUEST_USER		= (__u64)-2560, | 1275 | 	PERF_CONTEXT_GUEST_USER			= (__u64)-2560, |
| 1263 | 1276 | ||
| 1264 | 	PERF_CONTEXT_MAX		= (__u64)-4095, | 1277 | 	PERF_CONTEXT_MAX			= (__u64)-4095, |
| 1265 | }; | 1278 | }; |
| 1266 | 1279 | ||
| 1267 | /** | 1280 | /** |
| 1268 | * PERF_RECORD_AUX::flags bits | 1281 | * PERF_RECORD_AUX::flags bits |
| 1269 | */ | 1282 | */ |
| 1270 | #define PERF_AUX_FLAG_TRUNCATED			0x01	/* record was truncated to fit */ | 1283 | #define PERF_AUX_FLAG_TRUNCATED			0x0001	/* Record was truncated to fit */ |
| 1271 | #define PERF_AUX_FLAG_OVERWRITE			0x02	/* snapshot from overwrite mode */ | 1284 | #define PERF_AUX_FLAG_OVERWRITE			0x0002	/* Snapshot from overwrite mode */ |
| 1272 | #define PERF_AUX_FLAG_PARTIAL			0x04	/* record contains gaps */ | 1285 | #define PERF_AUX_FLAG_PARTIAL			0x0004	/* Record contains gaps */ |
| 1273 | #define PERF_AUX_FLAG_COLLISION			0x08	/* sample collided with another */ | 1286 | #define PERF_AUX_FLAG_COLLISION			0x0008	/* Sample collided with another */ |
| 1274 | #define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK	0xff00	/* PMU specific trace format type */ | 1287 | #define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK	0xff00	/* PMU specific trace format type */ |
| 1275 | 1288 | ||
| 1276 | /* CoreSight PMU AUX buffer formats */ | 1289 | /* CoreSight PMU AUX buffer formats */ |
| 1277 | #define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT	0x0000 /* Default for backward compatibility */ | 1290 | #define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */ |
| 1278 | #define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW		0x0100 /* Raw format of the source */ | 1291 | #define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW	 0x0100 /* Raw format of the source */ |
| 1279 | 1292 | ||
| 1280 | #define PERF_FLAG_FD_NO_GROUP		(1UL << 0) | 1293 | #define PERF_FLAG_FD_NO_GROUP			(1UL << 0) |
| 1281 | #define PERF_FLAG_FD_OUTPUT		(1UL << 1) | 1294 | #define PERF_FLAG_FD_OUTPUT			(1UL << 1) |
| 1282 | #define PERF_FLAG_PID_CGROUP		(1UL << 2) /* pid=cgroup id, per-cpu mode only */ | 1295 | #define PERF_FLAG_PID_CGROUP			(1UL << 2) /* pid=cgroup ID, per-CPU mode only */ |
| 1283 | #define PERF_FLAG_FD_CLOEXEC		(1UL << 3) /* O_CLOEXEC */ | 1296 | #define PERF_FLAG_FD_CLOEXEC			(1UL << 3) /* O_CLOEXEC */ |
| 1284 | 1297 | ||
| 1285 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 1298 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| 1286 | union perf_mem_data_src { | 1299 | union perf_mem_data_src { |
| 1287 | 	__u64 val; | 1300 | 	__u64 val; |
| 1288 | 	struct { | 1301 | 	struct { |
| 1289 | 		__u64 mem_op:5,	/* type of opcode */ | 1302 | 		__u64 mem_op : 5, /* Type of opcode */ |
| 1290 | 			mem_lvl:14,	/* memory hierarchy level */ | 1303 | 			mem_lvl : 14, /* Memory hierarchy level */ |
| 1291 | 			mem_snoop:5,	/* snoop mode */ | 1304 | 			mem_snoop : 5, /* Snoop mode */ |
| 1292 | 			mem_lock:2,	/* lock instr */ | 1305 | 			mem_lock : 2, /* Lock instr */ |
| 1293 | 			mem_dtlb:7,	/* tlb access */ | 1306 | 			mem_dtlb : 7, /* TLB access */ |
| 1294 | 			mem_lvl_num:4,	/* memory hierarchy level number */ | 1307 | 			mem_lvl_num : 4, /* Memory hierarchy level number */ |
| 1295 | 			mem_remote:1, /* remote */ | 1308 | 			mem_remote : 1, /* Remote */ |
| 1296 | 			mem_snoopx:2,	/* snoop mode, ext */ | 1309 | 			mem_snoopx : 2, /* Snoop mode, ext */ |
| 1297 | 			mem_blk:3,	/* access blocked */ | 1310 | 			mem_blk : 3, /* Access blocked */ |
| 1298 | 			mem_hops:3,	/* hop level */ | 1311 | 			mem_hops : 3, /* Hop level */ |
| 1299 | 			mem_rsvd:18; | 1312 | 			mem_rsvd : 18; |
| 1300 | 	}; | 1313 | 	}; |
| 1301 | }; | 1314 | }; |
| 1302 | #elif defined(__BIG_ENDIAN_BITFIELD) | 1315 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 1303 | union perf_mem_data_src { | 1316 | union perf_mem_data_src { |
| 1304 | 	__u64 val; | 1317 | 	__u64 val; |
| 1305 | 	struct { | 1318 | 	struct { |
| 1306 | 		__u64	mem_rsvd:18, | 1319 | 		__u64	mem_rsvd : 18, |
| 1307 | 			mem_hops:3,	/* hop level */ | 1320 | 			mem_hops : 3, /* Hop level */ |
| 1308 | 			mem_blk:3,	/* access blocked */ | 1321 | 			mem_blk : 3, /* Access blocked */ |
| 1309 | 			mem_snoopx:2,	/* snoop mode, ext */ | 1322 | 			mem_snoopx : 2, /* Snoop mode, ext */ |
| 1310 | 			mem_remote:1, /* remote */ | 1323 | 			mem_remote : 1, /* Remote */ |
| 1311 | 			mem_lvl_num:4,	/* memory hierarchy level number */ | 1324 | 			mem_lvl_num : 4, /* Memory hierarchy level number */ |
| 1312 | 			mem_dtlb:7,	/* tlb access */ | 1325 | 			mem_dtlb : 7, /* TLB access */ |
| 1313 | 			mem_lock:2,	/* lock instr */ | 1326 | 			mem_lock : 2, /* Lock instr */ |
| 1314 | 			mem_snoop:5,	/* snoop mode */ | 1327 | 			mem_snoop : 5, /* Snoop mode */ |
| 1315 | 			mem_lvl:14,	/* memory hierarchy level */ | 1328 | 			mem_lvl : 14, /* Memory hierarchy level */ |
| 1316 | 			mem_op:5;	/* type of opcode */ | 1329 | 			mem_op : 5; /* Type of opcode */ |
| 1317 | 	}; | 1330 | 	}; |
| 1318 | }; | 1331 | }; |
| 1319 | #else | 1332 | #else |
| 1320 | #error "Unknown endianness" | 1333 | # error "Unknown endianness" |
| 1321 | #endif | 1334 | #endif |
| 1322 | 1335 | ||
| 1323 | /* type of opcode (load/store/prefetch,code) */ | 1336 | /* Type of memory opcode: */ |
| 1324 | #define PERF_MEM_OP_NA		0x01 /* not available */ | 1337 | #define PERF_MEM_OP_NA				0x0001 /* Not available */ |
| 1325 | #define PERF_MEM_OP_LOAD	0x02 /* load instruction */ | 1338 | #define PERF_MEM_OP_LOAD			0x0002 /* Load instruction */ |
| 1326 | #define PERF_MEM_OP_STORE	0x04 /* store instruction */ | 1339 | #define PERF_MEM_OP_STORE			0x0004 /* Store instruction */ |
| 1327 | #define PERF_MEM_OP_PFETCH	0x08 /* prefetch */ | 1340 | #define PERF_MEM_OP_PFETCH			0x0008 /* Prefetch */ |
| 1328 | #define PERF_MEM_OP_EXEC	0x10 /* code (execution) */ | 1341 | #define PERF_MEM_OP_EXEC			0x0010 /* Code (execution) */ |
| 1329 | #define PERF_MEM_OP_SHIFT	0 | 1342 | #define PERF_MEM_OP_SHIFT			0 |
| 1330 | 1343 | ||
| 1331 | /* | 1344 | /* |
| 1332 | * PERF_MEM_LVL_* namespace being depricated to some extent in the | 1345 | * The PERF_MEM_LVL_* namespace is being deprecated to some extent in |
| 1333 | * favour of newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_} fields. | 1346 | * favour of newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_} fields. |
| 1334 | * Supporting this namespace inorder to not break defined ABIs. | 1347 | * We support this namespace in order to not break defined ABIs. |
| 1335 | * | 1348 | * |
| 1336 | * memory hierarchy (memory level, hit or miss) | 1349 | * Memory hierarchy (memory level, hit or miss) |
| 1337 | */ | 1350 | */ |
| 1338 | #define PERF_MEM_LVL_NA		0x01 /* not available */ | 1351 | #define PERF_MEM_LVL_NA				0x0001 /* Not available */ |
| 1339 | #define PERF_MEM_LVL_HIT	0x02 /* hit level */ | 1352 | #define PERF_MEM_LVL_HIT			0x0002 /* Hit level */ |
| 1340 | #define PERF_MEM_LVL_MISS	0x04 /* miss level */ | 1353 | #define PERF_MEM_LVL_MISS			0x0004 /* Miss level */ |
| 1341 | #define PERF_MEM_LVL_L1		0x08 /* L1 */ | 1354 | #define PERF_MEM_LVL_L1				0x0008 /* L1 */ |
| 1342 | #define PERF_MEM_LVL_LFB	0x10 /* Line Fill Buffer */ | 1355 | #define PERF_MEM_LVL_LFB			0x0010 /* Line Fill Buffer */ |
| 1343 | #define PERF_MEM_LVL_L2		0x20 /* L2 */ | 1356 | #define PERF_MEM_LVL_L2				0x0020 /* L2 */ |
| 1344 | #define PERF_MEM_LVL_L3		0x40 /* L3 */ | 1357 | #define PERF_MEM_LVL_L3				0x0040 /* L3 */ |
| 1345 | #define PERF_MEM_LVL_LOC_RAM	0x80 /* Local DRAM */ | 1358 | #define PERF_MEM_LVL_LOC_RAM			0x0080 /* Local DRAM */ |
| 1346 | #define PERF_MEM_LVL_REM_RAM1	0x100 /* Remote DRAM (1 hop) */ | 1359 | #define PERF_MEM_LVL_REM_RAM1			0x0100 /* Remote DRAM (1 hop) */ |
| 1347 | #define PERF_MEM_LVL_REM_RAM2	0x200 /* Remote DRAM (2 hops) */ | 1360 | #define PERF_MEM_LVL_REM_RAM2			0x0200 /* Remote DRAM (2 hops) */ |
| 1348 | #define PERF_MEM_LVL_REM_CCE1	0x400 /* Remote Cache (1 hop) */ | 1361 | #define PERF_MEM_LVL_REM_CCE1			0x0400 /* Remote Cache (1 hop) */ |
| 1349 | #define PERF_MEM_LVL_REM_CCE2	0x800 /* Remote Cache (2 hops) */ | 1362 | #define PERF_MEM_LVL_REM_CCE2			0x0800 /* Remote Cache (2 hops) */ |
| 1350 | #define PERF_MEM_LVL_IO		0x1000 /* I/O memory */ | 1363 | #define PERF_MEM_LVL_IO				0x1000 /* I/O memory */ |
| 1351 | #define PERF_MEM_LVL_UNC	0x2000 /* Uncached memory */ | 1364 | #define PERF_MEM_LVL_UNC			0x2000 /* Uncached memory */ |
| 1352 | #define PERF_MEM_LVL_SHIFT	5 | 1365 | #define PERF_MEM_LVL_SHIFT			5 |
| 1353 | 1366 | ||
| 1354 | #define PERF_MEM_REMOTE_REMOTE	0x01 /* Remote */ | 1367 | #define PERF_MEM_REMOTE_REMOTE			0x0001 /* Remote */ |
| 1355 | #define PERF_MEM_REMOTE_SHIFT	37 | 1368 | #define PERF_MEM_REMOTE_SHIFT			37 |
| 1356 | 1369 | ||
| 1357 | #define PERF_MEM_LVLNUM_L1	0x01 /* L1 */ | 1370 | #define PERF_MEM_LVLNUM_L1			0x0001 /* L1 */ |
| 1358 | #define PERF_MEM_LVLNUM_L2	0x02 /* L2 */ | 1371 | #define PERF_MEM_LVLNUM_L2			0x0002 /* L2 */ |
| 1359 | #define PERF_MEM_LVLNUM_L3	0x03 /* L3 */ | 1372 | #define PERF_MEM_LVLNUM_L3			0x0003 /* L3 */ |
| 1360 | #define PERF_MEM_LVLNUM_L4	0x04 /* L4 */ | 1373 | #define PERF_MEM_LVLNUM_L4			0x0004 /* L4 */ |
| 1361 | #define PERF_MEM_LVLNUM_L2_MHB	0x05 /* L2 Miss Handling Buffer */ | 1374 | #define PERF_MEM_LVLNUM_L2_MHB			0x0005 /* L2 Miss Handling Buffer */ |
| 1362 | #define PERF_MEM_LVLNUM_MSC	0x06 /* Memory-side Cache */ | 1375 | #define PERF_MEM_LVLNUM_MSC			0x0006 /* Memory-side Cache */ |
| 1363 | /* 0x7 available */ | 1376 | /* 0x007 available */ |
| 1364 | #define PERF_MEM_LVLNUM_UNC	0x08 /* Uncached */ | 1377 | #define PERF_MEM_LVLNUM_UNC			0x0008 /* Uncached */ |
| 1365 | #define PERF_MEM_LVLNUM_CXL	0x09 /* CXL */ | 1378 | #define PERF_MEM_LVLNUM_CXL			0x0009 /* CXL */ |
| 1366 | #define PERF_MEM_LVLNUM_IO	0x0a /* I/O */ | 1379 | #define PERF_MEM_LVLNUM_IO			0x000a /* I/O */ |
| 1367 | #define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */ | 1380 | #define PERF_MEM_LVLNUM_ANY_CACHE		0x000b /* Any cache */ |
| 1368 | #define PERF_MEM_LVLNUM_LFB	0x0c /* LFB / L1 Miss Handling Buffer */ | 1381 | #define PERF_MEM_LVLNUM_LFB			0x000c /* LFB / L1 Miss Handling Buffer */ |
| 1369 | #define PERF_MEM_LVLNUM_RAM	0x0d /* RAM */ | 1382 | #define PERF_MEM_LVLNUM_RAM			0x000d /* RAM */ |
| 1370 | #define PERF_MEM_LVLNUM_PMEM	0x0e /* PMEM */ | 1383 | #define PERF_MEM_LVLNUM_PMEM			0x000e /* PMEM */ |
| 1371 | #define PERF_MEM_LVLNUM_NA	0x0f /* N/A */ | 1384 | #define PERF_MEM_LVLNUM_NA			0x000f /* N/A */ |
| 1372 | 1385 | ||
| 1373 | #define PERF_MEM_LVLNUM_SHIFT	33 | 1386 | #define PERF_MEM_LVLNUM_SHIFT			33 |
| 1374 | 1387 | ||
| 1375 | /* snoop mode */ | 1388 | /* Snoop mode */ |
| 1376 | #define PERF_MEM_SNOOP_NA	0x01 /* not available */ | 1389 | #define PERF_MEM_SNOOP_NA			0x0001 /* Not available */ |
| 1377 | #define PERF_MEM_SNOOP_NONE	0x02 /* no snoop */ | 1390 | #define PERF_MEM_SNOOP_NONE			0x0002 /* No snoop */ |
| 1378 | #define PERF_MEM_SNOOP_HIT	0x04 /* snoop hit */ | 1391 | #define PERF_MEM_SNOOP_HIT			0x0004 /* Snoop hit */ |
| 1379 | #define PERF_MEM_SNOOP_MISS	0x08 /* snoop miss */ | 1392 | #define PERF_MEM_SNOOP_MISS			0x0008 /* Snoop miss */ |
| 1380 | #define PERF_MEM_SNOOP_HITM	0x10 /* snoop hit modified */ | 1393 | #define PERF_MEM_SNOOP_HITM			0x0010 /* Snoop hit modified */ |
| 1381 | #define PERF_MEM_SNOOP_SHIFT	19 | 1394 | #define PERF_MEM_SNOOP_SHIFT			19 |
| 1382 | 1395 | ||
| 1383 | #define PERF_MEM_SNOOPX_FWD	0x01 /* forward */ | 1396 | #define PERF_MEM_SNOOPX_FWD			0x0001 /* Forward */ |
| 1384 | #define PERF_MEM_SNOOPX_PEER	0x02 /* xfer from peer */ | 1397 | #define PERF_MEM_SNOOPX_PEER			0x0002 /* Transfer from peer */ |
| 1385 | #define PERF_MEM_SNOOPX_SHIFT 38 | 1398 | #define PERF_MEM_SNOOPX_SHIFT			38 |
| 1386 | 1399 | ||
| 1387 | /* locked instruction */ | 1400 | /* Locked instruction */ |
| 1388 | #define PERF_MEM_LOCK_NA	0x01 /* not available */ | 1401 | #define PERF_MEM_LOCK_NA			0x0001 /* Not available */ |
| 1389 | #define PERF_MEM_LOCK_LOCKED	0x02 /* locked transaction */ | 1402 | #define PERF_MEM_LOCK_LOCKED			0x0002 /* Locked transaction */ |
| 1390 | #define PERF_MEM_LOCK_SHIFT	24 | 1403 | #define PERF_MEM_LOCK_SHIFT			24 |
| 1391 | 1404 | ||
| 1392 | /* TLB access */ | 1405 | /* TLB access */ |
| 1393 | #define PERF_MEM_TLB_NA		0x01 /* not available */ | 1406 | #define PERF_MEM_TLB_NA				0x0001 /* Not available */ |
| 1394 | #define PERF_MEM_TLB_HIT	0x02 /* hit level */ | 1407 | #define PERF_MEM_TLB_HIT			0x0002 /* Hit level */ |
| 1395 | #define PERF_MEM_TLB_MISS	0x04 /* miss level */ | 1408 | #define PERF_MEM_TLB_MISS			0x0004 /* Miss level */ |
| 1396 | #define PERF_MEM_TLB_L1		0x08 /* L1 */ | 1409 | #define PERF_MEM_TLB_L1				0x0008 /* L1 */ |
| 1397 | #define PERF_MEM_TLB_L2		0x10 /* L2 */ | 1410 | #define PERF_MEM_TLB_L2				0x0010 /* L2 */ |
| 1398 | #define PERF_MEM_TLB_WK		0x20 /* Hardware Walker*/ | 1411 | #define PERF_MEM_TLB_WK				0x0020 /* Hardware Walker*/ |
| 1399 | #define PERF_MEM_TLB_OS		0x40 /* OS fault handler */ | 1412 | #define PERF_MEM_TLB_OS				0x0040 /* OS fault handler */ |
| 1400 | #define PERF_MEM_TLB_SHIFT	26 | 1413 | #define PERF_MEM_TLB_SHIFT			26 |
| 1401 | 1414 | ||
| 1402 | /* Access blocked */ | 1415 | /* Access blocked */ |
| 1403 | #define PERF_MEM_BLK_NA		0x01 /* not available */ | 1416 | #define PERF_MEM_BLK_NA				0x0001 /* Not available */ |
| 1404 | #define PERF_MEM_BLK_DATA	0x02 /* data could not be forwarded */ | 1417 | #define PERF_MEM_BLK_DATA			0x0002 /* Data could not be forwarded */ |
| 1405 | #define PERF_MEM_BLK_ADDR	0x04 /* address conflict */ | 1418 | #define PERF_MEM_BLK_ADDR			0x0004 /* Address conflict */ |
| 1406 | #define PERF_MEM_BLK_SHIFT	40 | 1419 | #define PERF_MEM_BLK_SHIFT			40 |
| 1407 | 1420 | ||
| 1408 | /* hop level */ | 1421 | /* Hop level */ |
| 1409 | #define PERF_MEM_HOPS_0		0x01 /* remote core, same node */ | 1422 | #define PERF_MEM_HOPS_0				0x0001 /* Remote core, same node */ |
| 1410 | #define PERF_MEM_HOPS_1		0x02 /* remote node, same socket */ | 1423 | #define PERF_MEM_HOPS_1				0x0002 /* Remote node, same socket */ |
| 1411 | #define PERF_MEM_HOPS_2		0x03 /* remote socket, same board */ | 1424 | #define PERF_MEM_HOPS_2				0x0003 /* Remote socket, same board */ |
| 1412 | #define PERF_MEM_HOPS_3		0x04 /* remote board */ | 1425 | #define PERF_MEM_HOPS_3				0x0004 /* Remote board */ |
| 1413 | /* 5-7 available */ | 1426 | /* 5-7 available */ |
| 1414 | #define PERF_MEM_HOPS_SHIFT	43 | 1427 | #define PERF_MEM_HOPS_SHIFT			43 |
| 1415 | 1428 | ||
| 1416 | #define PERF_MEM_S(a, s) \ | 1429 | #define PERF_MEM_S(a, s) \ |
| 1417 | 	(((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) | 1430 | 	(((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) |
| 1418 | 1431 | ||
| 1419 | /* | 1432 | /* |
| 1420 | * single taken branch record layout: | 1433 | * Layout of single taken branch records: |
| 1421 | * | 1434 | * |
| 1422 | * from: source instruction (may not always be a branch insn) | 1435 | * from: source instruction (may not always be a branch insn) |
| 1423 | * to: branch target | 1436 | * to: branch target |
| ... | @@ -1436,37 +1449,37 @@ union perf_mem_data_src { | ... | @@ -1436,37 +1449,37 @@ union perf_mem_data_src { |
| 1436 | struct perf_branch_entry { | 1449 | struct perf_branch_entry { |
| 1437 | 	__u64	from; | 1450 | 	__u64	from; |
| 1438 | 	__u64	to; | 1451 | 	__u64	to; |
| 1439 | 	__u64	mispred:1, /* target mispredicted */ | 1452 | 	__u64	mispred : 1, /* target mispredicted */ |
| 1440 | 		predicted:1,/* target predicted */ | 1453 | 		predicted : 1, /* target predicted */ |
| 1441 | 		in_tx:1, /* in transaction */ | 1454 | 		in_tx : 1, /* in transaction */ |
| 1442 | 		abort:1, /* transaction abort */ | 1455 | 		abort : 1, /* transaction abort */ |
| 1443 | 		cycles:16, /* cycle count to last branch */ | 1456 | 		cycles : 16, /* cycle count to last branch */ |
| 1444 | 		type:4, /* branch type */ | 1457 | 		type : 4, /* branch type */ |
| 1445 | 		spec:2, /* branch speculation info */ | 1458 | 		spec : 2, /* branch speculation info */ |
| 1446 | 		new_type:4, /* additional branch type */ | 1459 | 		new_type : 4, /* additional branch type */ |
| 1447 | 		priv:3, /* privilege level */ | 1460 | 		priv : 3, /* privilege level */ |
| 1448 | 		reserved:31; | 1461 | 		reserved : 31; |
| 1449 | }; | 1462 | }; |
| 1450 | 1463 | ||
| 1451 | /* Size of used info bits in struct perf_branch_entry */ | 1464 | /* Size of used info bits in struct perf_branch_entry */ |
| 1452 | #define PERF_BRANCH_ENTRY_INFO_BITS_MAX		33 | 1465 | #define PERF_BRANCH_ENTRY_INFO_BITS_MAX		33 |
| 1453 | 1466 | ||
| 1454 | union perf_sample_weight { | 1467 | union perf_sample_weight { |
| 1455 | 	__u64		full; | 1468 | 	__u64	 full; |
| 1456 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 1469 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| 1457 | 	struct { | 1470 | 	struct { |
| 1458 | 		__u32	var1_dw; | 1471 | 		__u32 var1_dw; |
| 1459 | 		__u16	var2_w; | 1472 | 		__u16 var2_w; |
| 1460 | 		__u16	var3_w; | 1473 | 		__u16 var3_w; |
| 1461 | 	}; | 1474 | 	}; |
| 1462 | #elif defined(__BIG_ENDIAN_BITFIELD) | 1475 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 1463 | 	struct { | 1476 | 	struct { |
| 1464 | 		__u16	var3_w; | 1477 | 		__u16 var3_w; |
| 1465 | 		__u16	var2_w; | 1478 | 		__u16 var2_w; |
| 1466 | 		__u32	var1_dw; | 1479 | 		__u32 var1_dw; |
| 1467 | 	}; | 1480 | 	}; |
| 1468 | #else | 1481 | #else |
| 1469 | #error "Unknown endianness" | 1482 | # error "Unknown endianness" |
| 1470 | #endif | 1483 | #endif |
| 1471 | }; | 1484 | }; |
| 1472 | 1485 |
lib/libc/include/any-linux-any/linux/pfrut.h+1| ... | @@ -89,6 +89,7 @@ struct pfru_payload_hdr { | ... | @@ -89,6 +89,7 @@ struct pfru_payload_hdr { |
| 89 | 	__u32 hw_ver; | 89 | 	__u32 hw_ver; |
| 90 | 	__u32 rt_ver; | 90 | 	__u32 rt_ver; |
| 91 | 	__u8 platform_id[16]; | 91 | 	__u8 platform_id[16]; |
| 92 | 	__u32 svn_ver; | ||
| 92 | }; | 93 | }; |
| 93 | 94 | ||
| 94 | enum pfru_dsm_status { | 95 | enum pfru_dsm_status { |
lib/libc/include/any-linux-any/linux/pidfd.h+27-1| ... | @@ -20,9 +20,33 @@ | ... | @@ -20,9 +20,33 @@ |
| 20 | #define PIDFD_INFO_PID			(1UL << 0) /* Always returned, even if not requested */ | 20 | #define PIDFD_INFO_PID			(1UL << 0) /* Always returned, even if not requested */ |
| 21 | #define PIDFD_INFO_CREDS		(1UL << 1) /* Always returned, even if not requested */ | 21 | #define PIDFD_INFO_CREDS		(1UL << 1) /* Always returned, even if not requested */ |
| 22 | #define PIDFD_INFO_CGROUPID		(1UL << 2) /* Always returned if available, even if not requested */ | 22 | #define PIDFD_INFO_CGROUPID		(1UL << 2) /* Always returned if available, even if not requested */ |
| 23 | #define PIDFD_INFO_EXIT			(1UL << 3) /* Only returned if requested. */ | ||
| 24 | #define PIDFD_INFO_COREDUMP		(1UL << 4) /* Only returned if requested. */ | ||
| 23 | 25 | ||
| 24 | #define PIDFD_INFO_SIZE_VER0		64 /* sizeof first published struct */ | 26 | #define PIDFD_INFO_SIZE_VER0		64 /* sizeof first published struct */ |
| 25 | 27 | ||
| 28 | /* | ||
| 29 | * Values for @coredump_mask in pidfd_info. | ||
| 30 | * Only valid if PIDFD_INFO_COREDUMP is set in @mask. | ||
| 31 | * | ||
| 32 | * Note, the @PIDFD_COREDUMP_ROOT flag indicates that the generated | ||
| 33 | * coredump should be treated as sensitive and access should only be | ||
| 34 | * granted to privileged users. | ||
| 35 | */ | ||
| 36 | #define PIDFD_COREDUMPED	(1U << 0) /* Did crash and... */ | ||
| 37 | #define PIDFD_COREDUMP_SKIP	(1U << 1) /* coredumping generation was skipped. */ | ||
| 38 | #define PIDFD_COREDUMP_USER	(1U << 2) /* coredump was done as the user. */ | ||
| 39 | #define PIDFD_COREDUMP_ROOT	(1U << 3) /* coredump was done as root. */ | ||
| 40 | |||
| 41 | /* | ||
| 42 | * ...and for userland we make life simpler - PIDFD_SELF refers to the current | ||
| 43 | * thread, PIDFD_SELF_PROCESS refers to the process thread group leader. | ||
| 44 | * | ||
| 45 | * For nearly all practical uses, a user will want to use PIDFD_SELF. | ||
| 46 | */ | ||
| 47 | #define PIDFD_SELF		PIDFD_SELF_THREAD | ||
| 48 | #define PIDFD_SELF_PROCESS	PIDFD_SELF_THREAD_GROUP | ||
| 49 | |||
| 26 | struct pidfd_info { | 50 | struct pidfd_info { |
| 27 | 	/* | 51 | 	/* |
| 28 | 	 * This mask is similar to the request_mask in statx(2). | 52 | 	 * This mask is similar to the request_mask in statx(2). |
| ... | @@ -62,7 +86,9 @@ struct pidfd_info { | ... | @@ -62,7 +86,9 @@ struct pidfd_info { |
| 62 | 	__u32 sgid; | 86 | 	__u32 sgid; |
| 63 | 	__u32 fsuid; | 87 | 	__u32 fsuid; |
| 64 | 	__u32 fsgid; | 88 | 	__u32 fsgid; |
| 65 | 	__u32 spare0[1]; | 89 | 	__s32 exit_code; |
| 90 | 	__u32 coredump_mask; | ||
| 91 | 	__u32 __spare1; | ||
| 66 | }; | 92 | }; |
| 67 | 93 | ||
| 68 | #define PIDFS_IOCTL_MAGIC 0xFF | 94 | #define PIDFS_IOCTL_MAGIC 0xFF |
lib/libc/include/any-linux-any/linux/pkt_cls.h+1| ... | @@ -697,6 +697,7 @@ enum { | ... | @@ -697,6 +697,7 @@ enum { |
| 697 | }; | 697 | }; |
| 698 | 698 | ||
| 699 | #define TCA_FLOWER_KEY_CFM_OPT_MAX (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1) | 699 | #define TCA_FLOWER_KEY_CFM_OPT_MAX (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1) |
| 700 | #define TCA_FLOWER_KEY_CFM_MAX	 (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1) | ||
| 700 | 701 | ||
| 701 | #define TCA_FLOWER_MASK_FLAGS_RANGE	(1 << 0) /* Range-based match */ | 702 | #define TCA_FLOWER_MASK_FLAGS_RANGE	(1 << 0) /* Range-based match */ |
| 702 | 703 |
lib/libc/include/any-linux-any/linux/pkt_sched.h+69| ... | @@ -1182,6 +1182,7 @@ enum { | ... | @@ -1182,6 +1182,7 @@ enum { |
| 1182 | 	TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */ | 1182 | 	TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */ |
| 1183 | 	TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ | 1183 | 	TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ |
| 1184 | 	TCA_TAPRIO_PAD, | 1184 | 	TCA_TAPRIO_PAD, |
| 1185 | 	TCA_TAPRIO_ATTR_PAD = TCA_TAPRIO_PAD, | ||
| 1185 | 	TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */ | 1186 | 	TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */ |
| 1186 | 	TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */ | 1187 | 	TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */ |
| 1187 | 	TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */ | 1188 | 	TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */ |
| ... | @@ -1210,4 +1211,72 @@ enum { | ... | @@ -1210,4 +1211,72 @@ enum { |
| 1210 | 1211 | ||
| 1211 | #define TCA_ETS_MAX (__TCA_ETS_MAX - 1) | 1212 | #define TCA_ETS_MAX (__TCA_ETS_MAX - 1) |
| 1212 | 1213 | ||
| 1214 | /* DUALPI2 */ | ||
| 1215 | enum tc_dualpi2_drop_overload { | ||
| 1216 | 	TC_DUALPI2_DROP_OVERLOAD_OVERFLOW = 0, | ||
| 1217 | 	TC_DUALPI2_DROP_OVERLOAD_DROP = 1, | ||
| 1218 | 	__TCA_DUALPI2_DROP_OVERLOAD_MAX, | ||
| 1219 | }; | ||
| 1220 | #define TCA_DUALPI2_DROP_OVERLOAD_MAX (__TCA_DUALPI2_DROP_OVERLOAD_MAX - 1) | ||
| 1221 | |||
| 1222 | enum tc_dualpi2_drop_early { | ||
| 1223 | 	TC_DUALPI2_DROP_EARLY_DROP_DEQUEUE = 0, | ||
| 1224 | 	TC_DUALPI2_DROP_EARLY_DROP_ENQUEUE = 1, | ||
| 1225 | 	__TCA_DUALPI2_DROP_EARLY_MAX, | ||
| 1226 | }; | ||
| 1227 | #define TCA_DUALPI2_DROP_EARLY_MAX (__TCA_DUALPI2_DROP_EARLY_MAX - 1) | ||
| 1228 | |||
| 1229 | enum tc_dualpi2_ecn_mask { | ||
| 1230 | 	TC_DUALPI2_ECN_MASK_L4S_ECT = 1, | ||
| 1231 | 	TC_DUALPI2_ECN_MASK_CLA_ECT = 2, | ||
| 1232 | 	TC_DUALPI2_ECN_MASK_ANY_ECT = 3, | ||
| 1233 | 	__TCA_DUALPI2_ECN_MASK_MAX, | ||
| 1234 | }; | ||
| 1235 | #define TCA_DUALPI2_ECN_MASK_MAX (__TCA_DUALPI2_ECN_MASK_MAX - 1) | ||
| 1236 | |||
| 1237 | enum tc_dualpi2_split_gso { | ||
| 1238 | 	TC_DUALPI2_SPLIT_GSO_NO_SPLIT_GSO = 0, | ||
| 1239 | 	TC_DUALPI2_SPLIT_GSO_SPLIT_GSO = 1, | ||
| 1240 | 	__TCA_DUALPI2_SPLIT_GSO_MAX, | ||
| 1241 | }; | ||
| 1242 | #define TCA_DUALPI2_SPLIT_GSO_MAX (__TCA_DUALPI2_SPLIT_GSO_MAX - 1) | ||
| 1243 | |||
| 1244 | enum { | ||
| 1245 | 	TCA_DUALPI2_UNSPEC, | ||
| 1246 | 	TCA_DUALPI2_LIMIT,		/* Packets */ | ||
| 1247 | 	TCA_DUALPI2_MEMORY_LIMIT,	/* Bytes */ | ||
| 1248 | 	TCA_DUALPI2_TARGET,		/* us */ | ||
| 1249 | 	TCA_DUALPI2_TUPDATE,		/* us */ | ||
| 1250 | 	TCA_DUALPI2_ALPHA,		/* Hz scaled up by 256 */ | ||
| 1251 | 	TCA_DUALPI2_BETA,		/* Hz scaled up by 256 */ | ||
| 1252 | 	TCA_DUALPI2_STEP_THRESH_PKTS,	/* Step threshold in packets */ | ||
| 1253 | 	TCA_DUALPI2_STEP_THRESH_US,	/* Step threshold in microseconds */ | ||
| 1254 | 	TCA_DUALPI2_MIN_QLEN_STEP,	/* Minimum qlen to apply STEP_THRESH */ | ||
| 1255 | 	TCA_DUALPI2_COUPLING,		/* Coupling factor between queues */ | ||
| 1256 | 	TCA_DUALPI2_DROP_OVERLOAD,	/* Whether to drop on overload */ | ||
| 1257 | 	TCA_DUALPI2_DROP_EARLY,		/* Whether to drop on enqueue */ | ||
| 1258 | 	TCA_DUALPI2_C_PROTECTION,	/* Percentage */ | ||
| 1259 | 	TCA_DUALPI2_ECN_MASK,		/* L4S queue classification mask */ | ||
| 1260 | 	TCA_DUALPI2_SPLIT_GSO,		/* Split GSO packets at enqueue */ | ||
| 1261 | 	TCA_DUALPI2_PAD, | ||
| 1262 | 	__TCA_DUALPI2_MAX | ||
| 1263 | }; | ||
| 1264 | |||
| 1265 | #define TCA_DUALPI2_MAX (__TCA_DUALPI2_MAX - 1) | ||
| 1266 | |||
| 1267 | struct tc_dualpi2_xstats { | ||
| 1268 | 	__u32 prob;		/* current probability */ | ||
| 1269 | 	__u32 delay_c;		/* current delay in C queue */ | ||
| 1270 | 	__u32 delay_l;		/* current delay in L queue */ | ||
| 1271 | 	__u32 packets_in_c;	/* number of packets enqueued in C queue */ | ||
| 1272 | 	__u32 packets_in_l;	/* number of packets enqueued in L queue */ | ||
| 1273 | 	__u32 maxq;		/* maximum queue size */ | ||
| 1274 | 	__u32 ecn_mark;		/* packets marked with ecn*/ | ||
| 1275 | 	__u32 step_marks;	/* ECN marks due to the step AQM */ | ||
| 1276 | 	__s32 credit;		/* current c_protection credit */ | ||
| 1277 | 	__u32 memory_used;	/* Memory used by both queues */ | ||
| 1278 | 	__u32 max_memory_used;	/* Maximum used memory */ | ||
| 1279 | 	__u32 memory_limit;	/* Memory limit of both queues */ | ||
| 1280 | }; | ||
| 1281 | |||
| 1213 | #endif | 1282 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/pps_gen.h created+37| ... | @@ -0,0 +1,37 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * PPS generator API header | ||
| 4 | * | ||
| 5 | * Copyright (C) 2024 Rodolfo Giometti <giometti@enneenne.com> | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _PPS_GEN_H_ | ||
| 9 | #define _PPS_GEN_H_ | ||
| 10 | |||
| 11 | #include <linux/types.h> | ||
| 12 | #include <linux/ioctl.h> | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct pps_gen_event - the PPS generator events | ||
| 16 | * @event: the event type | ||
| 17 | * @sequence: the event sequence number | ||
| 18 | * | ||
| 19 | * Userspace can get the last PPS generator event by using the | ||
| 20 | * ioctl(pps_gen, PPS_GEN_FETCHEVENT, ...) syscall. | ||
| 21 | * The sequence field can be used to save the last event ID, while in the | ||
| 22 | * event field is stored the last event type. Currently known event is: | ||
| 23 | * | ||
| 24 | * PPS_GEN_EVENT_MISSEDPULSE	: last pulse was not generated | ||
| 25 | */ | ||
| 26 | struct pps_gen_event { | ||
| 27 | 	unsigned int event; | ||
| 28 | 	unsigned int sequence; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #define PPS_GEN_EVENT_MISSEDPULSE	1 | ||
| 32 | |||
| 33 | #define PPS_GEN_SETENABLE		_IOW('p', 0xb1, unsigned int *) | ||
| 34 | #define PPS_GEN_USESYSTEMCLOCK		_IOR('p', 0xb2, unsigned int *) | ||
| 35 | #define PPS_GEN_FETCHEVENT		_IOR('p', 0xb3, struct pps_gen_event *) | ||
| 36 | |||
| 37 | #endif /* _PPS_GEN_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/prctl.h+24-1| ... | @@ -244,6 +244,8 @@ struct prctl_mm_map { | ... | @@ -244,6 +244,8 @@ struct prctl_mm_map { |
| 244 | # define PR_MTE_TAG_MASK		(0xffffUL << PR_MTE_TAG_SHIFT) | 244 | # define PR_MTE_TAG_MASK		(0xffffUL << PR_MTE_TAG_SHIFT) |
| 245 | /* Unused; kept only for source compatibility */ | 245 | /* Unused; kept only for source compatibility */ |
| 246 | # define PR_MTE_TCF_SHIFT		1 | 246 | # define PR_MTE_TCF_SHIFT		1 |
| 247 | /* MTE tag check store only */ | ||
| 248 | # define PR_MTE_STORE_ONLY		(1UL << 19) | ||
| 247 | /* RISC-V pointer masking tag length */ | 249 | /* RISC-V pointer masking tag length */ |
| 248 | # define PR_PMLEN_SHIFT			24 | 250 | # define PR_PMLEN_SHIFT			24 |
| 249 | # define PR_PMLEN_MASK			(0x7fUL << PR_PMLEN_SHIFT) | 251 | # define PR_PMLEN_MASK			(0x7fUL << PR_PMLEN_SHIFT) |
| ... | @@ -255,7 +257,12 @@ struct prctl_mm_map { | ... | @@ -255,7 +257,12 @@ struct prctl_mm_map { |
| 255 | /* Dispatch syscalls to a userspace handler */ | 257 | /* Dispatch syscalls to a userspace handler */ |
| 256 | #define PR_SET_SYSCALL_USER_DISPATCH	59 | 258 | #define PR_SET_SYSCALL_USER_DISPATCH	59 |
| 257 | # define PR_SYS_DISPATCH_OFF		0 | 259 | # define PR_SYS_DISPATCH_OFF		0 |
| 258 | # define PR_SYS_DISPATCH_ON		1 | 260 | /* Enable dispatch except for the specified range */ |
| 261 | # define PR_SYS_DISPATCH_EXCLUSIVE_ON	1 | ||
| 262 | /* Enable dispatch for the specified range */ | ||
| 263 | # define PR_SYS_DISPATCH_INCLUSIVE_ON	2 | ||
| 264 | /* Legacy name for backwards compatibility */ | ||
| 265 | # define PR_SYS_DISPATCH_ON		PR_SYS_DISPATCH_EXCLUSIVE_ON | ||
| 259 | /* The control values for the user space selector when dispatch is enabled */ | 266 | /* The control values for the user space selector when dispatch is enabled */ |
| 260 | # define SYSCALL_DISPATCH_FILTER_ALLOW	0 | 267 | # define SYSCALL_DISPATCH_FILTER_ALLOW	0 |
| 261 | # define SYSCALL_DISPATCH_FILTER_BLOCK	1 | 268 | # define SYSCALL_DISPATCH_FILTER_BLOCK	1 |
| ... | @@ -353,4 +360,20 @@ struct prctl_mm_map { | ... | @@ -353,4 +360,20 @@ struct prctl_mm_map { |
| 353 | */ | 360 | */ |
| 354 | #define PR_LOCK_SHADOW_STACK_STATUS 76 | 361 | #define PR_LOCK_SHADOW_STACK_STATUS 76 |
| 355 | 362 | ||
| 363 | /* | ||
| 364 | * Controls the mode of timer_create() for CRIU restore operations. | ||
| 365 | * Enabling this allows CRIU to restore timers with explicit IDs. | ||
| 366 | * | ||
| 367 | * Don't use for normal operations as the result might be undefined. | ||
| 368 | */ | ||
| 369 | #define PR_TIMER_CREATE_RESTORE_IDS		77 | ||
| 370 | # define PR_TIMER_CREATE_RESTORE_IDS_OFF	0 | ||
| 371 | # define PR_TIMER_CREATE_RESTORE_IDS_ON		1 | ||
| 372 | # define PR_TIMER_CREATE_RESTORE_IDS_GET	2 | ||
| 373 | |||
| 374 | /* FUTEX hash management */ | ||
| 375 | #define PR_FUTEX_HASH			78 | ||
| 376 | # define PR_FUTEX_HASH_SET_SLOTS	1 | ||
| 377 | # define PR_FUTEX_HASH_GET_SLOTS	2 | ||
| 378 | |||
| 356 | #endif /* _LINUX_PRCTL_H */ | 379 | #endif /* _LINUX_PRCTL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/psp-sev.h+14-7| ... | @@ -73,13 +73,20 @@ typedef enum { | ... | @@ -73,13 +73,20 @@ typedef enum { |
| 73 | 	SEV_RET_INVALID_PARAM, | 73 | 	SEV_RET_INVALID_PARAM, |
| 74 | 	SEV_RET_RESOURCE_LIMIT, | 74 | 	SEV_RET_RESOURCE_LIMIT, |
| 75 | 	SEV_RET_SECURE_DATA_INVALID, | 75 | 	SEV_RET_SECURE_DATA_INVALID, |
| 76 | 	SEV_RET_INVALID_KEY = 0x27, | 76 | 	SEV_RET_INVALID_PAGE_SIZE = 0x0019, |
| 77 | 	SEV_RET_INVALID_PAGE_SIZE, | 77 | 	SEV_RET_INVALID_PAGE_STATE = 0x001A, |
| 78 | 	SEV_RET_INVALID_PAGE_STATE, | 78 | 	SEV_RET_INVALID_MDATA_ENTRY = 0x001B, |
| 79 | 	SEV_RET_INVALID_MDATA_ENTRY, | 79 | 	SEV_RET_INVALID_PAGE_OWNER = 0x001C, |
| 80 | 	SEV_RET_INVALID_PAGE_OWNER, | 80 | 	SEV_RET_AEAD_OFLOW = 0x001D, |
| 81 | 	SEV_RET_INVALID_PAGE_AEAD_OFLOW, | 81 | 	SEV_RET_EXIT_RING_BUFFER = 0x001F, |
| 82 | 	SEV_RET_RMP_INIT_REQUIRED, | 82 | 	SEV_RET_RMP_INIT_REQUIRED = 0x0020, |
| 83 | 	SEV_RET_BAD_SVN = 0x0021, | ||
| 84 | 	SEV_RET_BAD_VERSION = 0x0022, | ||
| 85 | 	SEV_RET_SHUTDOWN_REQUIRED = 0x0023, | ||
| 86 | 	SEV_RET_UPDATE_FAILED = 0x0024, | ||
| 87 | 	SEV_RET_RESTORE_REQUIRED = 0x0025, | ||
| 88 | 	SEV_RET_RMP_INITIALIZATION_FAILED = 0x0026, | ||
| 89 | 	SEV_RET_INVALID_KEY = 0x0027, | ||
| 83 | 	SEV_RET_MAX, | 90 | 	SEV_RET_MAX, |
| 84 | } sev_ret_code; | 91 | } sev_ret_code; |
| 85 | 92 |
lib/libc/include/any-linux-any/linux/ptp_clock.h+3| ... | @@ -37,6 +37,9 @@ | ... | @@ -37,6 +37,9 @@ |
| 37 | 37 | ||
| 38 | /* | 38 | /* |
| 39 | * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl. | 39 | * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl. |
| 40 | * | ||
| 41 | * Note: PTP_STRICT_FLAGS is always enabled by the kernel for | ||
| 42 | * PTP_EXTTS_REQUEST2 regardless of whether it is set by userspace. | ||
| 40 | */ | 43 | */ |
| 41 | #define PTP_EXTTS_VALID_FLAGS	(PTP_ENABLE_FEATURE |	\ | 44 | #define PTP_EXTTS_VALID_FLAGS	(PTP_ENABLE_FEATURE |	\ |
| 42 | 				 PTP_RISING_EDGE |	\ | 45 | 				 PTP_RISING_EDGE |	\ |
lib/libc/include/any-linux-any/linux/ptrace.h+6-1| ... | @@ -74,6 +74,7 @@ struct seccomp_metadata { | ... | @@ -74,6 +74,7 @@ struct seccomp_metadata { |
| 74 | }; | 74 | }; |
| 75 | 75 | ||
| 76 | #define PTRACE_GET_SYSCALL_INFO		0x420e | 76 | #define PTRACE_GET_SYSCALL_INFO		0x420e |
| 77 | #define PTRACE_SET_SYSCALL_INFO		0x4212 | ||
| 77 | #define PTRACE_SYSCALL_INFO_NONE	0 | 78 | #define PTRACE_SYSCALL_INFO_NONE	0 |
| 78 | #define PTRACE_SYSCALL_INFO_ENTRY	1 | 79 | #define PTRACE_SYSCALL_INFO_ENTRY	1 |
| 79 | #define PTRACE_SYSCALL_INFO_EXIT	2 | 80 | #define PTRACE_SYSCALL_INFO_EXIT	2 |
| ... | @@ -81,7 +82,8 @@ struct seccomp_metadata { | ... | @@ -81,7 +82,8 @@ struct seccomp_metadata { |
| 81 | 82 | ||
| 82 | struct ptrace_syscall_info { | 83 | struct ptrace_syscall_info { |
| 83 | 	__u8 op;	/* PTRACE_SYSCALL_INFO_* */ | 84 | 	__u8 op;	/* PTRACE_SYSCALL_INFO_* */ |
| 84 | 	__u8 pad[3]; | 85 | 	__u8 reserved; |
| 86 | 	__u16 flags; | ||
| 85 | 	__u32 arch; | 87 | 	__u32 arch; |
| 86 | 	__u64 instruction_pointer; | 88 | 	__u64 instruction_pointer; |
| 87 | 	__u64 stack_pointer; | 89 | 	__u64 stack_pointer; |
| ... | @@ -98,6 +100,7 @@ struct ptrace_syscall_info { | ... | @@ -98,6 +100,7 @@ struct ptrace_syscall_info { |
| 98 | 			__u64 nr; | 100 | 			__u64 nr; |
| 99 | 			__u64 args[6]; | 101 | 			__u64 args[6]; |
| 100 | 			__u32 ret_data; | 102 | 			__u32 ret_data; |
| 103 | 			__u32 reserved2; | ||
| 101 | 		} seccomp; | 104 | 		} seccomp; |
| 102 | 	}; | 105 | 	}; |
| 103 | }; | 106 | }; |
| ... | @@ -142,6 +145,8 @@ struct ptrace_sud_config { | ... | @@ -142,6 +145,8 @@ struct ptrace_sud_config { |
| 142 | 	__u64 len; | 145 | 	__u64 len; |
| 143 | }; | 146 | }; |
| 144 | 147 | ||
| 148 | /* 0x4212 is PTRACE_SET_SYSCALL_INFO */ | ||
| 149 | |||
| 145 | /* | 150 | /* |
| 146 | * These values are stored in task->ptrace_message | 151 | * These values are stored in task->ptrace_message |
| 147 | * by ptrace_stop to describe the current syscall-stop. | 152 | * by ptrace_stop to describe the current syscall-stop. |
lib/libc/include/any-linux-any/linux/pwm.h created+53| ... | @@ -0,0 +1,53 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | ||
| 2 | |||
| 3 | #ifndef _PWM_H_ | ||
| 4 | #define _PWM_H_ | ||
| 5 | |||
| 6 | #include <linux/ioctl.h> | ||
| 7 | #include <linux/types.h> | ||
| 8 | |||
| 9 | /** | ||
| 10 | * struct pwmchip_waveform - Describe a PWM waveform for a pwm_chip's PWM channel | ||
| 11 | * @hwpwm: per-chip relative index of the PWM device | ||
| 12 | * @__pad: padding, must be zero | ||
| 13 | * @period_length_ns: duration of the repeating period. | ||
| 14 | * A value of 0 represents a disabled PWM. | ||
| 15 | * @duty_length_ns: duration of the active part in each period | ||
| 16 | * @duty_offset_ns: offset of the rising edge from a period's start | ||
| 17 | */ | ||
| 18 | struct pwmchip_waveform { | ||
| 19 | 	__u32 hwpwm; | ||
| 20 | 	__u32 __pad; | ||
| 21 | 	__u64 period_length_ns; | ||
| 22 | 	__u64 duty_length_ns; | ||
| 23 | 	__u64 duty_offset_ns; | ||
| 24 | }; | ||
| 25 | |||
| 26 | /* Reserves the passed hwpwm for exclusive control. */ | ||
| 27 | #define PWM_IOCTL_REQUEST	_IO(0x75, 1) | ||
| 28 | |||
| 29 | /* counter part to PWM_IOCTL_REQUEST */ | ||
| 30 | #define PWM_IOCTL_FREE		_IO(0x75, 2) | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Modifies the passed wf according to hardware constraints. All parameters are | ||
| 34 | * rounded down to the next possible value, unless there is no such value, then | ||
| 35 | * values are rounded up. Note that zero isn't considered for rounding down | ||
| 36 | * period_length_ns. | ||
| 37 | */ | ||
| 38 | #define PWM_IOCTL_ROUNDWF	_IOWR(0x75, 3, struct pwmchip_waveform) | ||
| 39 | |||
| 40 | /* Get the currently implemented waveform */ | ||
| 41 | #define PWM_IOCTL_GETWF		_IOWR(0x75, 4, struct pwmchip_waveform) | ||
| 42 | |||
| 43 | /* Like PWM_IOCTL_ROUNDWF + PWM_IOCTL_SETEXACTWF in one go. */ | ||
| 44 | #define PWM_IOCTL_SETROUNDEDWF	_IOW(0x75, 5, struct pwmchip_waveform) | ||
| 45 | |||
| 46 | /* | ||
| 47 | * Program the PWM to emit exactly the passed waveform, subject only to rounding | ||
| 48 | * down each value less than 1 ns. Returns 0 on success, -EDOM if the waveform | ||
| 49 | * cannot be implemented exactly, or other negative error codes. | ||
| 50 | */ | ||
| 51 | #define PWM_IOCTL_SETEXACTWF	_IOW(0x75, 6, struct pwmchip_waveform) | ||
| 52 | |||
| 53 | #endif /* _PWM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/raid/md_p.h+1-1| ... | @@ -173,7 +173,7 @@ typedef struct mdp_superblock_s { | ... | @@ -173,7 +173,7 @@ typedef struct mdp_superblock_s { |
| 173 | #else | 173 | #else |
| 174 | #error unspecified endianness | 174 | #error unspecified endianness |
| 175 | #endif | 175 | #endif |
| 176 | 	__u32 recovery_cp;	/* 11 recovery checkpoint sector count	 */ | 176 | 	__u32 recovery_cp;	/* 11 resync checkpoint sector count	 */ |
| 177 | 	/* There are only valid for minor_version > 90 */ | 177 | 	/* There are only valid for minor_version > 90 */ |
| 178 | 	__u64 reshape_position;	/* 12,13 next address in array-space for reshape */ | 178 | 	__u64 reshape_position;	/* 12,13 next address in array-space for reshape */ |
| 179 | 	__u32 new_level;	/* 14 new level we are reshaping to	 */ | 179 | 	__u32 new_level;	/* 14 new level we are reshaping to	 */ |
lib/libc/include/any-linux-any/linux/rkisp1-config.h+106-2| ... | @@ -169,6 +169,13 @@ | ... | @@ -169,6 +169,13 @@ |
| 169 | */ | 169 | */ |
| 170 | #define RKISP1_CIF_ISP_COMPAND_NUM_POINTS	64 | 170 | #define RKISP1_CIF_ISP_COMPAND_NUM_POINTS	64 |
| 171 | 171 | ||
| 172 | /* | ||
| 173 | * Wide Dynamic Range | ||
| 174 | */ | ||
| 175 | #define RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV	32 | ||
| 176 | #define RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF	(RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV + 1) | ||
| 177 | #define RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS	4 | ||
| 178 | |||
| 172 | /* | 179 | /* |
| 173 | * Measurement types | 180 | * Measurement types |
| 174 | */ | 181 | */ |
| ... | @@ -889,6 +896,72 @@ struct rkisp1_cif_isp_compand_curve_config { | ... | @@ -889,6 +896,72 @@ struct rkisp1_cif_isp_compand_curve_config { |
| 889 | 	__u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS]; | 896 | 	__u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS]; |
| 890 | }; | 897 | }; |
| 891 | 898 | ||
| 899 | /** | ||
| 900 | * struct rkisp1_cif_isp_wdr_tone_curve - Tone mapping curve definition for WDR. | ||
| 901 | * | ||
| 902 | * @dY: the dYn increments for horizontal (input) axis of the tone curve. | ||
| 903 | * each 3-bit dY value represents an increment of 2**(value+3). | ||
| 904 | * dY[0] bits 0:2 is increment dY1, bit 3 unused | ||
| 905 | * dY[0] bits 4:6 is increment dY2, bit 7 unused | ||
| 906 | * ... | ||
| 907 | * dY[0] bits 28:30 is increment dY8, bit 31 unused | ||
| 908 | * ... and so on till dY[3] bits 28:30 is increment dY32, bit 31 unused. | ||
| 909 | * @ym: the Ym values for the vertical (output) axis of the tone curve. | ||
| 910 | * each value is 13 bit. | ||
| 911 | */ | ||
| 912 | struct rkisp1_cif_isp_wdr_tone_curve { | ||
| 913 | 	__u32 dY[RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS]; | ||
| 914 | 	__u16 ym[RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF]; | ||
| 915 | }; | ||
| 916 | |||
| 917 | /** | ||
| 918 | * struct rkisp1_cif_isp_wdr_iref_config - Illumination reference config for WDR. | ||
| 919 | * | ||
| 920 | * Use illumination reference value as described below, instead of only the | ||
| 921 | * luminance (Y) value for tone mapping and gain calculations: | ||
| 922 | * IRef = (rgb_factor * RGBMax_tr + (8 - rgb_factor) * Y)/8 | ||
| 923 | * | ||
| 924 | * @rgb_factor: defines how much influence the RGBmax approach has in | ||
| 925 | * comparison to Y (valid values are 0..8). | ||
| 926 | * @use_y9_8: use Y*9/8 for maximum value calculation along with the | ||
| 927 | * default of R, G, B for noise reduction. | ||
| 928 | * @use_rgb7_8: decrease RGBMax by 7/8 for noise reduction. | ||
| 929 | * @disable_transient: disable transient calculation between Y and RGBY_max. | ||
| 930 | */ | ||
| 931 | struct rkisp1_cif_isp_wdr_iref_config { | ||
| 932 | 	__u8 rgb_factor; | ||
| 933 | 	__u8 use_y9_8; | ||
| 934 | 	__u8 use_rgb7_8; | ||
| 935 | 	__u8 disable_transient; | ||
| 936 | }; | ||
| 937 | |||
| 938 | /** | ||
| 939 | * struct rkisp1_cif_isp_wdr_config - Configuration for wide dynamic range. | ||
| 940 | * | ||
| 941 | * @tone_curve: tone mapping curve. | ||
| 942 | * @iref_config: illumination reference configuration. (when use_iref is true) | ||
| 943 | * @rgb_offset: RGB offset value for RGB operation mode. (12 bits) | ||
| 944 | * @luma_offset: luminance offset value for RGB operation mode. (12 bits) | ||
| 945 | * @dmin_thresh: lower threshold for deltaMin value. (12 bits) | ||
| 946 | * @dmin_strength: strength factor for deltaMin. (valid range is 0x00..0x10) | ||
| 947 | * @use_rgb_colorspace: use RGB instead of luminance/chrominance colorspace. | ||
| 948 | * @bypass_chroma_mapping: disable chrominance mapping (only valid if | ||
| 949 | * use_rgb_colorspace = 0) | ||
| 950 | * @use_iref: use illumination reference instead of Y for tone mapping | ||
| 951 | * and gain calculations. | ||
| 952 | */ | ||
| 953 | struct rkisp1_cif_isp_wdr_config { | ||
| 954 | 	struct rkisp1_cif_isp_wdr_tone_curve tone_curve; | ||
| 955 | 	struct rkisp1_cif_isp_wdr_iref_config iref_config; | ||
| 956 | 	__u16 rgb_offset; | ||
| 957 | 	__u16 luma_offset; | ||
| 958 | 	__u16 dmin_thresh; | ||
| 959 | 	__u8 dmin_strength; | ||
| 960 | 	__u8 use_rgb_colorspace; | ||
| 961 | 	__u8 bypass_chroma_mapping; | ||
| 962 | 	__u8 use_iref; | ||
| 963 | }; | ||
| 964 | |||
| 892 | /*---------- PART2: Measurement Statistics ------------*/ | 965 | /*---------- PART2: Measurement Statistics ------------*/ |
| 893 | 966 | ||
| 894 | /** | 967 | /** |
| ... | @@ -1059,6 +1132,7 @@ struct rkisp1_stat_buffer { | ... | @@ -1059,6 +1132,7 @@ struct rkisp1_stat_buffer { |
| 1059 | * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block | 1132 | * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block |
| 1060 | * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve | 1133 | * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve |
| 1061 | * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve | 1134 | * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve |
| 1135 | * @RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR: Wide dynamic range | ||
| 1062 | */ | 1136 | */ |
| 1063 | enum rkisp1_ext_params_block_type { | 1137 | enum rkisp1_ext_params_block_type { |
| 1064 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS, | 1138 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS, |
| ... | @@ -1081,11 +1155,15 @@ enum rkisp1_ext_params_block_type { | ... | @@ -1081,11 +1155,15 @@ enum rkisp1_ext_params_block_type { |
| 1081 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS, | 1155 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS, |
| 1082 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND, | 1156 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND, |
| 1083 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS, | 1157 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS, |
| 1158 | 	RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR, | ||
| 1084 | }; | 1159 | }; |
| 1085 | 1160 | ||
| 1086 | #define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE	(1U << 0) | 1161 | #define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE	(1U << 0) |
| 1087 | #define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE	(1U << 1) | 1162 | #define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE	(1U << 1) |
| 1088 | 1163 | ||
| 1164 | /* A bitmask of parameters blocks supported on the current hardware. */ | ||
| 1165 | #define RKISP1_CID_SUPPORTED_PARAMS_BLOCKS	(V4L2_CID_USER_RKISP1_BASE + 0x01) | ||
| 1166 | |||
| 1089 | /** | 1167 | /** |
| 1090 | * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block | 1168 | * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block |
| 1091 | *					 header | 1169 | *					 header |
| ... | @@ -1460,6 +1538,23 @@ struct rkisp1_ext_params_compand_curve_config { | ... | @@ -1460,6 +1538,23 @@ struct rkisp1_ext_params_compand_curve_config { |
| 1460 | 	struct rkisp1_cif_isp_compand_curve_config config; | 1538 | 	struct rkisp1_cif_isp_compand_curve_config config; |
| 1461 | } __attribute__((aligned(8))); | 1539 | } __attribute__((aligned(8))); |
| 1462 | 1540 | ||
| 1541 | /** | ||
| 1542 | * struct rkisp1_ext_params_wdr_config - RkISP1 extensible params | ||
| 1543 | * Wide dynamic range config | ||
| 1544 | * | ||
| 1545 | * RkISP1 extensible parameters WDR block. | ||
| 1546 | * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR` | ||
| 1547 | * | ||
| 1548 | * @header: The RkISP1 extensible parameters header, see | ||
| 1549 | *	 :c:type:`rkisp1_ext_params_block_header` | ||
| 1550 | * @config: WDR configuration, see | ||
| 1551 | *	 :c:type:`rkisp1_cif_isp_wdr_config` | ||
| 1552 | */ | ||
| 1553 | struct rkisp1_ext_params_wdr_config { | ||
| 1554 | 	struct rkisp1_ext_params_block_header header; | ||
| 1555 | 	struct rkisp1_cif_isp_wdr_config config; | ||
| 1556 | } __attribute__((aligned(8))); | ||
| 1557 | |||
| 1463 | /* | 1558 | /* |
| 1464 | * The rkisp1_ext_params_compand_curve_config structure is counted twice as it | 1559 | * The rkisp1_ext_params_compand_curve_config structure is counted twice as it |
| 1465 | * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types. | 1560 | * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types. |
| ... | @@ -1484,7 +1579,8 @@ struct rkisp1_ext_params_compand_curve_config { | ... | @@ -1484,7 +1579,8 @@ struct rkisp1_ext_params_compand_curve_config { |
| 1484 | 	sizeof(struct rkisp1_ext_params_afc_config)			+\ | 1579 | 	sizeof(struct rkisp1_ext_params_afc_config)			+\ |
| 1485 | 	sizeof(struct rkisp1_ext_params_compand_bls_config)		+\ | 1580 | 	sizeof(struct rkisp1_ext_params_compand_bls_config)		+\ |
| 1486 | 	sizeof(struct rkisp1_ext_params_compand_curve_config)		+\ | 1581 | 	sizeof(struct rkisp1_ext_params_compand_curve_config)		+\ |
| 1487 | 	sizeof(struct rkisp1_ext_params_compand_curve_config)) | 1582 | 	sizeof(struct rkisp1_ext_params_compand_curve_config)		+\ |
| 1583 | 	sizeof(struct rkisp1_ext_params_wdr_config)) | ||
| 1488 | 1584 | ||
| 1489 | /** | 1585 | /** |
| 1490 | * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version | 1586 | * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version |
| ... | @@ -1520,6 +1616,14 @@ enum rksip1_ext_param_buffer_version { | ... | @@ -1520,6 +1616,14 @@ enum rksip1_ext_param_buffer_version { |
| 1520 | * V4L2 control. If such control is not available, userspace should assume only | 1616 | * V4L2 control. If such control is not available, userspace should assume only |
| 1521 | * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver. | 1617 | * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver. |
| 1522 | * | 1618 | * |
| 1619 | * The read-only V4L2 control ``RKISP1_CID_SUPPORTED_PARAMS_BLOCKS`` can be used | ||
| 1620 | * to query the blocks supported by the device. It contains a bitmask where each | ||
| 1621 | * bit represents the availability of the corresponding entry from the | ||
| 1622 | * :c:type:`rkisp1_ext_params_block_type` enum. The current and default values | ||
| 1623 | * of the control represents the blocks supported by the device instance, while | ||
| 1624 | * the maximum value represents the blocks supported by the kernel driver, | ||
| 1625 | * independently of the device instance. | ||
| 1626 | * | ||
| 1523 | * For each ISP block that userspace wants to configure, a block-specific | 1627 | * For each ISP block that userspace wants to configure, a block-specific |
| 1524 | * structure is appended to the @data buffer, one after the other without gaps | 1628 | * structure is appended to the @data buffer, one after the other without gaps |
| 1525 | * in between nor overlaps. Userspace shall populate the @data_size field with | 1629 | * in between nor overlaps. Userspace shall populate the @data_size field with |
| ... | @@ -1528,7 +1632,7 @@ enum rksip1_ext_param_buffer_version { | ... | @@ -1528,7 +1632,7 @@ enum rksip1_ext_param_buffer_version { |
| 1528 | * The expected memory layout of the parameters buffer is:: | 1632 | * The expected memory layout of the parameters buffer is:: |
| 1529 | * | 1633 | * |
| 1530 | *	+-------------------- struct rkisp1_ext_params_cfg -------------------+ | 1634 | *	+-------------------- struct rkisp1_ext_params_cfg -------------------+ |
| 1531 | *	| version = RKISP_EXT_PARAMS_BUFFER_V1; | | 1635 | *	| version = RKISP1_EXT_PARAM_BUFFER_V1; | |
| 1532 | *	| data_size = sizeof(struct rkisp1_ext_params_bls_config) | | 1636 | *	| data_size = sizeof(struct rkisp1_ext_params_bls_config) | |
| 1533 | *	| + sizeof(struct rkisp1_ext_params_dpcc_config); | | 1637 | *	| + sizeof(struct rkisp1_ext_params_dpcc_config); | |
| 1534 | *	| +------------------------- data ---------------------------------+ | | 1638 | *	| +------------------------- data ---------------------------------+ | |
lib/libc/include/any-linux-any/linux/rtnetlink.h+18-2| ... | @@ -93,10 +93,18 @@ enum { | ... | @@ -93,10 +93,18 @@ enum { |
| 93 | 	RTM_NEWPREFIX	= 52, | 93 | 	RTM_NEWPREFIX	= 52, |
| 94 | #define RTM_NEWPREFIX	RTM_NEWPREFIX | 94 | #define RTM_NEWPREFIX	RTM_NEWPREFIX |
| 95 | 95 | ||
| 96 | 	RTM_GETMULTICAST = 58, | 96 | 	RTM_NEWMULTICAST = 56, |
| 97 | #define RTM_NEWMULTICAST RTM_NEWMULTICAST | ||
| 98 | 	RTM_DELMULTICAST, | ||
| 99 | #define RTM_DELMULTICAST RTM_DELMULTICAST | ||
| 100 | 	RTM_GETMULTICAST, | ||
| 97 | #define RTM_GETMULTICAST RTM_GETMULTICAST | 101 | #define RTM_GETMULTICAST RTM_GETMULTICAST |
| 98 | 102 | ||
| 99 | 	RTM_GETANYCAST	= 62, | 103 | 	RTM_NEWANYCAST	= 60, |
| 104 | #define RTM_NEWANYCAST RTM_NEWANYCAST | ||
| 105 | 	RTM_DELANYCAST, | ||
| 106 | #define RTM_DELANYCAST RTM_DELANYCAST | ||
| 107 | 	RTM_GETANYCAST, | ||
| 100 | #define RTM_GETANYCAST	RTM_GETANYCAST | 108 | #define RTM_GETANYCAST	RTM_GETANYCAST |
| 101 | 109 | ||
| 102 | 	RTM_NEWNEIGHTBL	= 64, | 110 | 	RTM_NEWNEIGHTBL	= 64, |
| ... | @@ -299,6 +307,7 @@ enum { | ... | @@ -299,6 +307,7 @@ enum { |
| 299 | #define RTPROT_MROUTED		17	/* Multicast daemon */ | 307 | #define RTPROT_MROUTED		17	/* Multicast daemon */ |
| 300 | #define RTPROT_KEEPALIVED	18	/* Keepalived daemon */ | 308 | #define RTPROT_KEEPALIVED	18	/* Keepalived daemon */ |
| 301 | #define RTPROT_BABEL		42	/* Babel daemon */ | 309 | #define RTPROT_BABEL		42	/* Babel daemon */ |
| 310 | #define RTPROT_OVN		84	/* OVN daemon */ | ||
| 302 | #define RTPROT_OPENR		99	/* Open Routing (Open/R) Routes */ | 311 | #define RTPROT_OPENR		99	/* Open Routing (Open/R) Routes */ |
| 303 | #define RTPROT_BGP		186	/* BGP Routes */ | 312 | #define RTPROT_BGP		186	/* BGP Routes */ |
| 304 | #define RTPROT_ISIS		187	/* ISIS Routes */ | 313 | #define RTPROT_ISIS		187	/* ISIS Routes */ |
| ... | @@ -389,6 +398,7 @@ enum rtattr_type_t { | ... | @@ -389,6 +398,7 @@ enum rtattr_type_t { |
| 389 | 	RTA_SPORT, | 398 | 	RTA_SPORT, |
| 390 | 	RTA_DPORT, | 399 | 	RTA_DPORT, |
| 391 | 	RTA_NH_ID, | 400 | 	RTA_NH_ID, |
| 401 | 	RTA_FLOWLABEL, | ||
| 392 | 	__RTA_MAX | 402 | 	__RTA_MAX |
| 393 | }; | 403 | }; |
| 394 | 404 | ||
| ... | @@ -772,6 +782,12 @@ enum rtnetlink_groups { | ... | @@ -772,6 +782,12 @@ enum rtnetlink_groups { |
| 772 | #define RTNLGRP_TUNNEL		RTNLGRP_TUNNEL | 782 | #define RTNLGRP_TUNNEL		RTNLGRP_TUNNEL |
| 773 | 	RTNLGRP_STATS, | 783 | 	RTNLGRP_STATS, |
| 774 | #define RTNLGRP_STATS		RTNLGRP_STATS | 784 | #define RTNLGRP_STATS		RTNLGRP_STATS |
| 785 | 	RTNLGRP_IPV4_MCADDR, | ||
| 786 | #define RTNLGRP_IPV4_MCADDR	RTNLGRP_IPV4_MCADDR | ||
| 787 | 	RTNLGRP_IPV6_MCADDR, | ||
| 788 | #define RTNLGRP_IPV6_MCADDR	RTNLGRP_IPV6_MCADDR | ||
| 789 | 	RTNLGRP_IPV6_ACADDR, | ||
| 790 | #define RTNLGRP_IPV6_ACADDR	RTNLGRP_IPV6_ACADDR | ||
| 775 | 	__RTNLGRP_MAX | 791 | 	__RTNLGRP_MAX |
| 776 | }; | 792 | }; |
| 777 | #define RTNLGRP_MAX	(__RTNLGRP_MAX - 1) | 793 | #define RTNLGRP_MAX	(__RTNLGRP_MAX - 1) |
lib/libc/include/any-linux-any/linux/rxrpc.h+65-12| ... | @@ -36,26 +36,33 @@ struct sockaddr_rxrpc { | ... | @@ -36,26 +36,33 @@ struct sockaddr_rxrpc { |
| 36 | #define RXRPC_MIN_SECURITY_LEVEL	4	/* minimum security level */ | 36 | #define RXRPC_MIN_SECURITY_LEVEL	4	/* minimum security level */ |
| 37 | #define RXRPC_UPGRADEABLE_SERVICE	5	/* Upgrade service[0] -> service[1] */ | 37 | #define RXRPC_UPGRADEABLE_SERVICE	5	/* Upgrade service[0] -> service[1] */ |
| 38 | #define RXRPC_SUPPORTED_CMSG		6	/* Get highest supported control message type */ | 38 | #define RXRPC_SUPPORTED_CMSG		6	/* Get highest supported control message type */ |
| 39 | #define RXRPC_MANAGE_RESPONSE		7	/* [clnt] Want to manage RESPONSE packets */ | ||
| 39 | 40 | ||
| 40 | /* | 41 | /* |
| 41 | * RxRPC control messages | 42 | * RxRPC control messages |
| 42 | * - If neither abort or accept are specified, the message is a data message. | 43 | * - If neither abort or accept are specified, the message is a data message. |
| 43 | * - terminal messages mean that a user call ID tag can be recycled | 44 | * - terminal messages mean that a user call ID tag can be recycled |
| 45 | * - C/S/- indicate whether these are applicable to client, server or both | ||
| 44 | * - s/r/- indicate whether these are applicable to sendmsg() and/or recvmsg() | 46 | * - s/r/- indicate whether these are applicable to sendmsg() and/or recvmsg() |
| 45 | */ | 47 | */ |
| 46 | enum rxrpc_cmsg_type { | 48 | enum rxrpc_cmsg_type { |
| 47 | 	RXRPC_USER_CALL_ID	= 1,	/* sr: user call ID specifier */ | 49 | 	RXRPC_USER_CALL_ID	= 1,	/* -sr: User call ID specifier */ |
| 48 | 	RXRPC_ABORT		= 2,	/* sr: abort request / notification [terminal] */ | 50 | 	RXRPC_ABORT		= 2,	/* -sr: Abort request / notification [terminal] */ |
| 49 | 	RXRPC_ACK		= 3,	/* -r: [Service] RPC op final ACK received [terminal] */ | 51 | 	RXRPC_ACK		= 3,	/* S-r: RPC op final ACK received [terminal] */ |
| 50 | 	RXRPC_NET_ERROR		= 5,	/* -r: network error received [terminal] */ | 52 | 	RXRPC_NET_ERROR		= 5,	/* --r: Network error received [terminal] */ |
| 51 | 	RXRPC_BUSY		= 6,	/* -r: server busy received [terminal] */ | 53 | 	RXRPC_BUSY		= 6,	/* C-r: Server busy received [terminal] */ |
| 52 | 	RXRPC_LOCAL_ERROR	= 7,	/* -r: local error generated [terminal] */ | 54 | 	RXRPC_LOCAL_ERROR	= 7,	/* --r: Local error generated [terminal] */ |
| 53 | 	RXRPC_NEW_CALL		= 8,	/* -r: [Service] new incoming call notification */ | 55 | 	RXRPC_NEW_CALL		= 8,	/* S-r: New incoming call notification */ |
| 54 | 	RXRPC_EXCLUSIVE_CALL	= 10,	/* s-: Call should be on exclusive connection */ | 56 | 	RXRPC_EXCLUSIVE_CALL	= 10,	/* Cs-: Call should be on exclusive connection */ |
| 55 | 	RXRPC_UPGRADE_SERVICE	= 11,	/* s-: Request service upgrade for client call */ | 57 | 	RXRPC_UPGRADE_SERVICE	= 11,	/* Cs-: Request service upgrade for client call */ |
| 56 | 	RXRPC_TX_LENGTH		= 12,	/* s-: Total length of Tx data */ | 58 | 	RXRPC_TX_LENGTH		= 12,	/* -s-: Total length of Tx data */ |
| 57 | 	RXRPC_SET_CALL_TIMEOUT	= 13,	/* s-: Set one or more call timeouts */ | 59 | 	RXRPC_SET_CALL_TIMEOUT	= 13,	/* -s-: Set one or more call timeouts */ |
| 58 | 	RXRPC_CHARGE_ACCEPT	= 14,	/* s-: Charge the accept pool with a user call ID */ | 60 | 	RXRPC_CHARGE_ACCEPT	= 14,	/* Ss-: Charge the accept pool with a user call ID */ |
| 61 | 	RXRPC_OOB_ID		= 15,	/* -sr: OOB message ID */ | ||
| 62 | 	RXRPC_CHALLENGED	= 16,	/* C-r: Info on a received CHALLENGE */ | ||
| 63 | 	RXRPC_RESPOND		= 17,	/* Cs-: Respond to a challenge */ | ||
| 64 | 	RXRPC_RESPONDED		= 18,	/* S-r: Data received in RESPONSE */ | ||
| 65 | 	RXRPC_RESP_RXGK_APPDATA	= 19,	/* Cs-: RESPONSE: RxGK app data to include */ | ||
| 59 | 	RXRPC__SUPPORTED | 66 | 	RXRPC__SUPPORTED |
| 60 | }; | 67 | }; |
| 61 | 68 | ||
| ... | @@ -73,6 +80,7 @@ enum rxrpc_cmsg_type { | ... | @@ -73,6 +80,7 @@ enum rxrpc_cmsg_type { |
| 73 | #define RXRPC_SECURITY_RXKAD	2	/* kaserver or kerberos 4 */ | 80 | #define RXRPC_SECURITY_RXKAD	2	/* kaserver or kerberos 4 */ |
| 74 | #define RXRPC_SECURITY_RXGK	4	/* gssapi-based */ | 81 | #define RXRPC_SECURITY_RXGK	4	/* gssapi-based */ |
| 75 | #define RXRPC_SECURITY_RXK5	5	/* kerberos 5 */ | 82 | #define RXRPC_SECURITY_RXK5	5	/* kerberos 5 */ |
| 83 | #define RXRPC_SECURITY_YFS_RXGK	6	/* YFS gssapi-based */ | ||
| 76 | 84 | ||
| 77 | /* | 85 | /* |
| 78 | * RxRPC-level abort codes | 86 | * RxRPC-level abort codes |
| ... | @@ -118,4 +126,49 @@ enum rxrpc_cmsg_type { | ... | @@ -118,4 +126,49 @@ enum rxrpc_cmsg_type { |
| 118 | #define RXKADDATALEN		19270411	/* user data too long */ | 126 | #define RXKADDATALEN		19270411	/* user data too long */ |
| 119 | #define RXKADILLEGALLEVEL	19270412	/* caller not authorised to use encrypted conns */ | 127 | #define RXKADILLEGALLEVEL	19270412	/* caller not authorised to use encrypted conns */ |
| 120 | 128 | ||
| 129 | /* | ||
| 130 | * RxGK GSSAPI security abort codes. | ||
| 131 | */ | ||
| 132 | #if 0 /* Original standard abort codes (used by OpenAFS) */ | ||
| 133 | #define RXGK_INCONSISTENCY	1233242880	/* Security module structure inconsistent */ | ||
| 134 | #define RXGK_PACKETSHORT	1233242881	/* Packet too short for security challenge */ | ||
| 135 | #define RXGK_BADCHALLENGE	1233242882	/* Invalid security challenge */ | ||
| 136 | #define RXGK_BADETYPE		1233242883	/* Invalid or impermissible encryption type */ | ||
| 137 | #define RXGK_BADLEVEL		1233242884	/* Invalid or impermissible security level */ | ||
| 138 | #define RXGK_BADKEYNO		1233242885	/* Key version number not found */ | ||
| 139 | #define RXGK_EXPIRED		1233242886	/* Token has expired */ | ||
| 140 | #define RXGK_NOTAUTH		1233242887	/* Caller not authorized */ | ||
| 141 | #define RXGK_BAD_TOKEN		1233242888	/* Security object was passed a bad token */ | ||
| 142 | #define RXGK_SEALED_INCON	1233242889	/* Sealed data inconsistent */ | ||
| 143 | #define RXGK_DATA_LEN		1233242890	/* User data too long */ | ||
| 144 | #define RXGK_BAD_QOP		1233242891	/* Inadequate quality of protection available */ | ||
| 145 | #else /* Revised standard abort codes (used by YFS) */ | ||
| 146 | #define RXGK_INCONSISTENCY	1233242880	/* Security module structure inconsistent */ | ||
| 147 | #define RXGK_PACKETSHORT	1233242881	/* Packet too short for security challenge */ | ||
| 148 | #define RXGK_BADCHALLENGE	1233242882	/* Security challenge/response failed */ | ||
| 149 | #define RXGK_SEALEDINCON	1233242883	/* Sealed data is inconsistent */ | ||
| 150 | #define RXGK_NOTAUTH		1233242884	/* Caller not authorised */ | ||
| 151 | #define RXGK_EXPIRED		1233242885	/* Authentication expired */ | ||
| 152 | #define RXGK_BADLEVEL		1233242886	/* Unsupported or not permitted security level */ | ||
| 153 | #define RXGK_BADKEYNO		1233242887	/* Bad transport key number */ | ||
| 154 | #define RXGK_NOTRXGK		1233242888	/* Security layer is not rxgk */ | ||
| 155 | #define RXGK_UNSUPPORTED	1233242889	/* Endpoint does not support rxgk */ | ||
| 156 | #define RXGK_GSSERROR		1233242890	/* GSSAPI mechanism error */ | ||
| 157 | #endif | ||
| 158 | |||
| 159 | /* | ||
| 160 | * Challenge information in the RXRPC_CHALLENGED control message. | ||
| 161 | */ | ||
| 162 | struct rxrpc_challenge { | ||
| 163 | 	__u16		service_id;	/* The service ID of the connection (may be upgraded) */ | ||
| 164 | 	__u8		security_index;	/* The security index of the connection */ | ||
| 165 | 	__u8		pad;		/* Round out to a multiple of 4 bytes. */ | ||
| 166 | 	/* ... The security class gets to append extra information ... */ | ||
| 167 | }; | ||
| 168 | |||
| 169 | struct rxgk_challenge { | ||
| 170 | 	struct rxrpc_challenge	base; | ||
| 171 | 	__u32			enctype;	/* Krb5 encoding type */ | ||
| 172 | }; | ||
| 173 | |||
| 121 | #endif /* _LINUX_RXRPC_H */ | 174 | #endif /* _LINUX_RXRPC_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/securebits.h+23-1| ... | @@ -52,10 +52,32 @@ | ... | @@ -52,10 +52,32 @@ |
| 52 | #define SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED \ | 52 | #define SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED \ |
| 53 | 			(issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE_LOCKED)) | 53 | 			(issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE_LOCKED)) |
| 54 | 54 | ||
| 55 | /* See Documentation/userspace-api/check_exec.rst */ | ||
| 56 | #define SECURE_EXEC_RESTRICT_FILE		8 | ||
| 57 | #define SECURE_EXEC_RESTRICT_FILE_LOCKED	9 /* make bit-8 immutable */ | ||
| 58 | |||
| 59 | #define SECBIT_EXEC_RESTRICT_FILE (issecure_mask(SECURE_EXEC_RESTRICT_FILE)) | ||
| 60 | #define SECBIT_EXEC_RESTRICT_FILE_LOCKED \ | ||
| 61 | 			(issecure_mask(SECURE_EXEC_RESTRICT_FILE_LOCKED)) | ||
| 62 | |||
| 63 | /* See Documentation/userspace-api/check_exec.rst */ | ||
| 64 | #define SECURE_EXEC_DENY_INTERACTIVE		10 | ||
| 65 | #define SECURE_EXEC_DENY_INTERACTIVE_LOCKED	11 /* make bit-10 immutable */ | ||
| 66 | |||
| 67 | #define SECBIT_EXEC_DENY_INTERACTIVE \ | ||
| 68 | 			(issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) | ||
| 69 | #define SECBIT_EXEC_DENY_INTERACTIVE_LOCKED \ | ||
| 70 | 			(issecure_mask(SECURE_EXEC_DENY_INTERACTIVE_LOCKED)) | ||
| 71 | |||
| 55 | #define SECURE_ALL_BITS		(issecure_mask(SECURE_NOROOT) | \ | 72 | #define SECURE_ALL_BITS		(issecure_mask(SECURE_NOROOT) | \ |
| 56 | 				 issecure_mask(SECURE_NO_SETUID_FIXUP) | \ | 73 | 				 issecure_mask(SECURE_NO_SETUID_FIXUP) | \ |
| 57 | 				 issecure_mask(SECURE_KEEP_CAPS) | \ | 74 | 				 issecure_mask(SECURE_KEEP_CAPS) | \ |
| 58 | 				 issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE)) | 75 | 				 issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE) | \ |
| 76 | 				 issecure_mask(SECURE_EXEC_RESTRICT_FILE) | \ | ||
| 77 | 				 issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) | ||
| 59 | #define SECURE_ALL_LOCKS	(SECURE_ALL_BITS << 1) | 78 | #define SECURE_ALL_LOCKS	(SECURE_ALL_BITS << 1) |
| 60 | 79 | ||
| 80 | #define SECURE_ALL_UNPRIVILEGED (issecure_mask(SECURE_EXEC_RESTRICT_FILE) | \ | ||
| 81 | 				 issecure_mask(SECURE_EXEC_DENY_INTERACTIVE)) | ||
| 82 | |||
| 61 | #endif /* _LINUX_SECUREBITS_H */ | 83 | #endif /* _LINUX_SECUREBITS_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/snmp.h+17-6| ... | @@ -23,9 +23,14 @@ enum | ... | @@ -23,9 +23,14 @@ enum |
| 23 | 	IPSTATS_MIB_INPKTS,			/* InReceives */ | 23 | 	IPSTATS_MIB_INPKTS,			/* InReceives */ |
| 24 | 	IPSTATS_MIB_INOCTETS,			/* InOctets */ | 24 | 	IPSTATS_MIB_INOCTETS,			/* InOctets */ |
| 25 | 	IPSTATS_MIB_INDELIVERS,			/* InDelivers */ | 25 | 	IPSTATS_MIB_INDELIVERS,			/* InDelivers */ |
| 26 | 	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */ | 26 | 	IPSTATS_MIB_NOECTPKTS,			/* InNoECTPkts */ |
| 27 | 	IPSTATS_MIB_ECT1PKTS,			/* InECT1Pkts */ | ||
| 28 | 	IPSTATS_MIB_ECT0PKTS,			/* InECT0Pkts */ | ||
| 29 | 	IPSTATS_MIB_CEPKTS,			/* InCEPkts */ | ||
| 27 | 	IPSTATS_MIB_OUTREQUESTS,		/* OutRequests */ | 30 | 	IPSTATS_MIB_OUTREQUESTS,		/* OutRequests */ |
| 31 | 	IPSTATS_MIB_OUTPKTS,			/* OutTransmits */ | ||
| 28 | 	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */ | 32 | 	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */ |
| 33 | 	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */ | ||
| 29 | /* other fields */ | 34 | /* other fields */ |
| 30 | 	IPSTATS_MIB_INHDRERRORS,		/* InHdrErrors */ | 35 | 	IPSTATS_MIB_INHDRERRORS,		/* InHdrErrors */ |
| 31 | 	IPSTATS_MIB_INTOOBIGERRORS,		/* InTooBigErrors */ | 36 | 	IPSTATS_MIB_INTOOBIGERRORS,		/* InTooBigErrors */ |
| ... | @@ -52,12 +57,7 @@ enum | ... | @@ -52,12 +57,7 @@ enum |
| 52 | 	IPSTATS_MIB_INBCASTOCTETS,		/* InBcastOctets */ | 57 | 	IPSTATS_MIB_INBCASTOCTETS,		/* InBcastOctets */ |
| 53 | 	IPSTATS_MIB_OUTBCASTOCTETS,		/* OutBcastOctets */ | 58 | 	IPSTATS_MIB_OUTBCASTOCTETS,		/* OutBcastOctets */ |
| 54 | 	IPSTATS_MIB_CSUMERRORS,			/* InCsumErrors */ | 59 | 	IPSTATS_MIB_CSUMERRORS,			/* InCsumErrors */ |
| 55 | 	IPSTATS_MIB_NOECTPKTS,			/* InNoECTPkts */ | ||
| 56 | 	IPSTATS_MIB_ECT1PKTS,			/* InECT1Pkts */ | ||
| 57 | 	IPSTATS_MIB_ECT0PKTS,			/* InECT0Pkts */ | ||
| 58 | 	IPSTATS_MIB_CEPKTS,			/* InCEPkts */ | ||
| 59 | 	IPSTATS_MIB_REASM_OVERLAPS,		/* ReasmOverlaps */ | 60 | 	IPSTATS_MIB_REASM_OVERLAPS,		/* ReasmOverlaps */ |
| 60 | 	IPSTATS_MIB_OUTPKTS,			/* OutTransmits */ | ||
| 61 | 	__IPSTATS_MIB_MAX | 61 | 	__IPSTATS_MIB_MAX |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| ... | @@ -186,6 +186,10 @@ enum | ... | @@ -186,6 +186,10 @@ enum |
| 186 | 	LINUX_MIB_TIMEWAITKILLED,		/* TimeWaitKilled */ | 186 | 	LINUX_MIB_TIMEWAITKILLED,		/* TimeWaitKilled */ |
| 187 | 	LINUX_MIB_PAWSACTIVEREJECTED,		/* PAWSActiveRejected */ | 187 | 	LINUX_MIB_PAWSACTIVEREJECTED,		/* PAWSActiveRejected */ |
| 188 | 	LINUX_MIB_PAWSESTABREJECTED,		/* PAWSEstabRejected */ | 188 | 	LINUX_MIB_PAWSESTABREJECTED,		/* PAWSEstabRejected */ |
| 189 | 	LINUX_MIB_BEYOND_WINDOW,		/* BeyondWindow */ | ||
| 190 | 	LINUX_MIB_TSECRREJECTED,		/* TSEcrRejected */ | ||
| 191 | 	LINUX_MIB_PAWS_OLD_ACK,			/* PAWSOldAck */ | ||
| 192 | 	LINUX_MIB_PAWS_TW_REJECTED,		/* PAWSTimewait */ | ||
| 189 | 	LINUX_MIB_DELAYEDACKS,			/* DelayedACKs */ | 193 | 	LINUX_MIB_DELAYEDACKS,			/* DelayedACKs */ |
| 190 | 	LINUX_MIB_DELAYEDACKLOCKED,		/* DelayedACKLocked */ | 194 | 	LINUX_MIB_DELAYEDACKLOCKED,		/* DelayedACKLocked */ |
| 191 | 	LINUX_MIB_DELAYEDACKLOST,		/* DelayedACKLost */ | 195 | 	LINUX_MIB_DELAYEDACKLOST,		/* DelayedACKLost */ |
| ... | @@ -339,6 +343,8 @@ enum | ... | @@ -339,6 +343,8 @@ enum |
| 339 | 	LINUX_MIB_XFRMACQUIREERROR,		/* XfrmAcquireError */ | 343 | 	LINUX_MIB_XFRMACQUIREERROR,		/* XfrmAcquireError */ |
| 340 | 	LINUX_MIB_XFRMOUTSTATEDIRERROR,		/* XfrmOutStateDirError */ | 344 | 	LINUX_MIB_XFRMOUTSTATEDIRERROR,		/* XfrmOutStateDirError */ |
| 341 | 	LINUX_MIB_XFRMINSTATEDIRERROR,		/* XfrmInStateDirError */ | 345 | 	LINUX_MIB_XFRMINSTATEDIRERROR,		/* XfrmInStateDirError */ |
| 346 | 	LINUX_MIB_XFRMINIPTFSERROR,		/* XfrmInIptfsError */ | ||
| 347 | 	LINUX_MIB_XFRMOUTNOQSPACE,		/* XfrmOutNoQueueSpace */ | ||
| 342 | 	__LINUX_MIB_XFRMMAX | 348 | 	__LINUX_MIB_XFRMMAX |
| 343 | }; | 349 | }; |
| 344 | 350 | ||
| ... | @@ -358,6 +364,11 @@ enum | ... | @@ -358,6 +364,11 @@ enum |
| 358 | 	LINUX_MIB_TLSRXDEVICERESYNC,		/* TlsRxDeviceResync */ | 364 | 	LINUX_MIB_TLSRXDEVICERESYNC,		/* TlsRxDeviceResync */ |
| 359 | 	LINUX_MIB_TLSDECRYPTRETRY,		/* TlsDecryptRetry */ | 365 | 	LINUX_MIB_TLSDECRYPTRETRY,		/* TlsDecryptRetry */ |
| 360 | 	LINUX_MIB_TLSRXNOPADVIOL,		/* TlsRxNoPadViolation */ | 366 | 	LINUX_MIB_TLSRXNOPADVIOL,		/* TlsRxNoPadViolation */ |
| 367 | 	LINUX_MIB_TLSRXREKEYOK,			/* TlsRxRekeyOk */ | ||
| 368 | 	LINUX_MIB_TLSRXREKEYERROR,		/* TlsRxRekeyError */ | ||
| 369 | 	LINUX_MIB_TLSTXREKEYOK,			/* TlsTxRekeyOk */ | ||
| 370 | 	LINUX_MIB_TLSTXREKEYERROR,		/* TlsTxRekeyError */ | ||
| 371 | 	LINUX_MIB_TLSRXREKEYRECEIVED,		/* TlsRxRekeyReceived */ | ||
| 361 | 	__LINUX_MIB_TLSMAX | 372 | 	__LINUX_MIB_TLSMAX |
| 362 | }; | 373 | }; |
| 363 | 374 |
lib/libc/include/any-linux-any/linux/stat.h+81-26| ... | @@ -98,43 +98,97 @@ struct statx_timestamp { | ... | @@ -98,43 +98,97 @@ struct statx_timestamp { |
| 98 | */ | 98 | */ |
| 99 | struct statx { | 99 | struct statx { |
| 100 | 	/* 0x00 */ | 100 | 	/* 0x00 */ |
| 101 | 	__u32	stx_mask;	/* What results were written [uncond] */ | 101 | 	/* What results were written [uncond] */ |
| 102 | 	__u32	stx_blksize;	/* Preferred general I/O size [uncond] */ | 102 | 	__u32	stx_mask; |
| 103 | 	__u64	stx_attributes;	/* Flags conveying information about the file [uncond] */ | 103 | |
| 104 | 	/* Preferred general I/O size [uncond] */ | ||
| 105 | 	__u32	stx_blksize; | ||
| 106 | |||
| 107 | 	/* Flags conveying information about the file [uncond] */ | ||
| 108 | 	__u64	stx_attributes; | ||
| 109 | |||
| 104 | 	/* 0x10 */ | 110 | 	/* 0x10 */ |
| 105 | 	__u32	stx_nlink;	/* Number of hard links */ | 111 | 	/* Number of hard links */ |
| 106 | 	__u32	stx_uid;	/* User ID of owner */ | 112 | 	__u32	stx_nlink; |
| 107 | 	__u32	stx_gid;	/* Group ID of owner */ | 113 | |
| 108 | 	__u16	stx_mode;	/* File mode */ | 114 | 	/* User ID of owner */ |
| 115 | 	__u32	stx_uid; | ||
| 116 | |||
| 117 | 	/* Group ID of owner */ | ||
| 118 | 	__u32	stx_gid; | ||
| 119 | |||
| 120 | 	/* File mode */ | ||
| 121 | 	__u16	stx_mode; | ||
| 109 | 	__u16	__spare0[1]; | 122 | 	__u16	__spare0[1]; |
| 123 | |||
| 110 | 	/* 0x20 */ | 124 | 	/* 0x20 */ |
| 111 | 	__u64	stx_ino;	/* Inode number */ | 125 | 	/* Inode number */ |
| 112 | 	__u64	stx_size;	/* File size */ | 126 | 	__u64	stx_ino; |
| 113 | 	__u64	stx_blocks;	/* Number of 512-byte blocks allocated */ | 127 | |
| 114 | 	__u64	stx_attributes_mask; /* Mask to show what's supported in stx_attributes */ | 128 | 	/* File size */ |
| 129 | 	__u64	stx_size; | ||
| 130 | |||
| 131 | 	/* Number of 512-byte blocks allocated */ | ||
| 132 | 	__u64	stx_blocks; | ||
| 133 | |||
| 134 | 	/* Mask to show what's supported in stx_attributes */ | ||
| 135 | 	__u64	stx_attributes_mask; | ||
| 136 | |||
| 115 | 	/* 0x40 */ | 137 | 	/* 0x40 */ |
| 116 | 	struct statx_timestamp	stx_atime;	/* Last access time */ | 138 | 	/* Last access time */ |
| 117 | 	struct statx_timestamp	stx_btime;	/* File creation time */ | 139 | 	struct statx_timestamp	stx_atime; |
| 118 | 	struct statx_timestamp	stx_ctime;	/* Last attribute change time */ | 140 | |
| 119 | 	struct statx_timestamp	stx_mtime;	/* Last data modification time */ | 141 | 	/* File creation time */ |
| 142 | 	struct statx_timestamp	stx_btime; | ||
| 143 | |||
| 144 | 	/* Last attribute change time */ | ||
| 145 | 	struct statx_timestamp	stx_ctime; | ||
| 146 | |||
| 147 | 	/* Last data modification time */ | ||
| 148 | 	struct statx_timestamp	stx_mtime; | ||
| 149 | |||
| 120 | 	/* 0x80 */ | 150 | 	/* 0x80 */ |
| 121 | 	__u32	stx_rdev_major;	/* Device ID of special file [if bdev/cdev] */ | 151 | 	/* Device ID of special file [if bdev/cdev] */ |
| 152 | 	__u32	stx_rdev_major; | ||
| 122 | 	__u32	stx_rdev_minor; | 153 | 	__u32	stx_rdev_minor; |
| 123 | 	__u32	stx_dev_major;	/* ID of device containing file [uncond] */ | 154 | |
| 155 | 	/* ID of device containing file [uncond] */ | ||
| 156 | 	__u32	stx_dev_major; | ||
| 124 | 	__u32	stx_dev_minor; | 157 | 	__u32	stx_dev_minor; |
| 158 | |||
| 125 | 	/* 0x90 */ | 159 | 	/* 0x90 */ |
| 126 | 	__u64	stx_mnt_id; | 160 | 	__u64	stx_mnt_id; |
| 127 | 	__u32	stx_dio_mem_align;	/* Memory buffer alignment for direct I/O */ | 161 | |
| 128 | 	__u32	stx_dio_offset_align;	/* File offset alignment for direct I/O */ | 162 | 	/* Memory buffer alignment for direct I/O */ |
| 163 | 	__u32	stx_dio_mem_align; | ||
| 164 | |||
| 165 | 	/* File offset alignment for direct I/O */ | ||
| 166 | 	__u32	stx_dio_offset_align; | ||
| 167 | |||
| 129 | 	/* 0xa0 */ | 168 | 	/* 0xa0 */ |
| 130 | 	__u64	stx_subvol;	/* Subvolume identifier */ | 169 | 	/* Subvolume identifier */ |
| 131 | 	__u32	stx_atomic_write_unit_min;	/* Min atomic write unit in bytes */ | 170 | 	__u64	stx_subvol; |
| 132 | 	__u32	stx_atomic_write_unit_max;	/* Max atomic write unit in bytes */ | 171 | |
| 172 | 	/* Min atomic write unit in bytes */ | ||
| 173 | 	__u32	stx_atomic_write_unit_min; | ||
| 174 | |||
| 175 | 	/* Max atomic write unit in bytes */ | ||
| 176 | 	__u32	stx_atomic_write_unit_max; | ||
| 177 | |||
| 133 | 	/* 0xb0 */ | 178 | 	/* 0xb0 */ |
| 134 | 	__u32 stx_atomic_write_segments_max;	/* Max atomic write segment count */ | 179 | 	/* Max atomic write segment count */ |
| 135 | 	__u32 __spare1[1]; | 180 | 	__u32 stx_atomic_write_segments_max; |
| 136 | 	/* 0xb8 */ | 181 | |
| 137 | 	__u64	__spare3[9];	/* Spare space for future expansion */ | 182 | 	/* File offset alignment for direct I/O reads */ |
| 183 | 	__u32	stx_dio_read_offset_align; | ||
| 184 | |||
| 185 | 	/* Optimised max atomic write unit in bytes */ | ||
| 186 | 	__u32	stx_atomic_write_unit_max_opt; | ||
| 187 | 	__u32	__spare2[1]; | ||
| 188 | |||
| 189 | 	/* 0xc0 */ | ||
| 190 | 	__u64	__spare3[8];	/* Spare space for future expansion */ | ||
| 191 | |||
| 138 | 	/* 0x100 */ | 192 | 	/* 0x100 */ |
| 139 | }; | 193 | }; |
| 140 | 194 | ||
| ... | @@ -164,6 +218,7 @@ struct statx { | ... | @@ -164,6 +218,7 @@ struct statx { |
| 164 | #define STATX_MNT_ID_UNIQUE	0x00004000U	/* Want/got extended stx_mount_id */ | 218 | #define STATX_MNT_ID_UNIQUE	0x00004000U	/* Want/got extended stx_mount_id */ |
| 165 | #define STATX_SUBVOL		0x00008000U	/* Want/got stx_subvol */ | 219 | #define STATX_SUBVOL		0x00008000U	/* Want/got stx_subvol */ |
| 166 | #define STATX_WRITE_ATOMIC	0x00010000U	/* Want/got atomic_write_* fields */ | 220 | #define STATX_WRITE_ATOMIC	0x00010000U	/* Want/got atomic_write_* fields */ |
| 221 | #define STATX_DIO_READ_ALIGN	0x00020000U	/* Want/got dio read alignment info */ | ||
| 167 | 222 | ||
| 168 | #define STATX__RESERVED		0x80000000U	/* Reserved for future struct statx expansion */ | 223 | #define STATX__RESERVED		0x80000000U	/* Reserved for future struct statx expansion */ |
| 169 | 224 |
lib/libc/include/any-linux-any/linux/stddef.h+2| ... | @@ -70,4 +70,6 @@ | ... | @@ -70,4 +70,6 @@ |
| 70 | #define __counted_by_be(m) | 70 | #define __counted_by_be(m) |
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
| 73 | #define __kernel_nonstring | ||
| 74 | |||
| 73 | #endif /* _LINUX_STDDEF_H */ | 75 | #endif /* _LINUX_STDDEF_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/sysctl.h+1| ... | @@ -573,6 +573,7 @@ enum { | ... | @@ -573,6 +573,7 @@ enum { |
| 573 | 	NET_IPV6_ACCEPT_RA_FROM_LOCAL=26, | 573 | 	NET_IPV6_ACCEPT_RA_FROM_LOCAL=26, |
| 574 | 	NET_IPV6_ACCEPT_RA_RT_INFO_MIN_PLEN=27, | 574 | 	NET_IPV6_ACCEPT_RA_RT_INFO_MIN_PLEN=27, |
| 575 | 	NET_IPV6_RA_DEFRTR_METRIC=28, | 575 | 	NET_IPV6_RA_DEFRTR_METRIC=28, |
| 576 | 	NET_IPV6_FORCE_FORWARDING=29, | ||
| 576 | 	__NET_IPV6_MAX | 577 | 	__NET_IPV6_MAX |
| 577 | }; | 578 | }; |
| 578 | 579 |
lib/libc/include/any-linux-any/linux/taskstats.h+29-1| ... | @@ -34,7 +34,7 @@ | ... | @@ -34,7 +34,7 @@ |
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | #define TASKSTATS_VERSION	14 | 37 | #define TASKSTATS_VERSION	16 |
| 38 | #define TS_COMM_LEN		32	/* should be >= TASK_COMM_LEN | 38 | #define TS_COMM_LEN		32	/* should be >= TASK_COMM_LEN |
| 39 | 					 * in linux/sched.h */ | 39 | 					 * in linux/sched.h */ |
| 40 | 40 | ||
| ... | @@ -167,6 +167,7 @@ struct taskstats { | ... | @@ -167,6 +167,7 @@ struct taskstats { |
| 167 | 	__u64	freepages_count; | 167 | 	__u64	freepages_count; |
| 168 | 	__u64	freepages_delay_total; | 168 | 	__u64	freepages_delay_total; |
| 169 | 169 | ||
| 170 | |||
| 170 | 	/* Delay waiting for thrashing page */ | 171 | 	/* Delay waiting for thrashing page */ |
| 171 | 	__u64	thrashing_count; | 172 | 	__u64	thrashing_count; |
| 172 | 	__u64	thrashing_delay_total; | 173 | 	__u64	thrashing_delay_total; |
| ... | @@ -202,6 +203,33 @@ struct taskstats { | ... | @@ -202,6 +203,33 @@ struct taskstats { |
| 202 | 	/* v14: Delay waiting for IRQ/SOFTIRQ */ | 203 | 	/* v14: Delay waiting for IRQ/SOFTIRQ */ |
| 203 | 	__u64 irq_count; | 204 | 	__u64 irq_count; |
| 204 | 	__u64 irq_delay_total; | 205 | 	__u64 irq_delay_total; |
| 206 | |||
| 207 | 	/* v15: add Delay max and Delay min */ | ||
| 208 | |||
| 209 | 	/* v16: move Delay max and Delay min to the end of taskstat */ | ||
| 210 | 	__u64	cpu_delay_max; | ||
| 211 | 	__u64	cpu_delay_min; | ||
| 212 | |||
| 213 | 	__u64	blkio_delay_max; | ||
| 214 | 	__u64	blkio_delay_min; | ||
| 215 | |||
| 216 | 	__u64	swapin_delay_max; | ||
| 217 | 	__u64	swapin_delay_min; | ||
| 218 | |||
| 219 | 	__u64	freepages_delay_max; | ||
| 220 | 	__u64	freepages_delay_min; | ||
| 221 | |||
| 222 | 	__u64	thrashing_delay_max; | ||
| 223 | 	__u64	thrashing_delay_min; | ||
| 224 | |||
| 225 | 	__u64	compact_delay_max; | ||
| 226 | 	__u64	compact_delay_min; | ||
| 227 | |||
| 228 | 	__u64	wpcopy_delay_max; | ||
| 229 | 	__u64	wpcopy_delay_min; | ||
| 230 | |||
| 231 | 	__u64	irq_delay_max; | ||
| 232 | 	__u64	irq_delay_min; | ||
| 205 | }; | 233 | }; |
| 206 | 234 | ||
| 207 | 235 |
lib/libc/include/any-linux-any/linux/tcp.h+10-3| ... | @@ -28,7 +28,8 @@ struct tcphdr { | ... | @@ -28,7 +28,8 @@ struct tcphdr { |
| 28 | 	__be32	seq; | 28 | 	__be32	seq; |
| 29 | 	__be32	ack_seq; | 29 | 	__be32	ack_seq; |
| 30 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 30 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| 31 | 	__u16	res1:4, | 31 | 	__u16	ae:1, |
| 32 | 		res1:3, | ||
| 32 | 		doff:4, | 33 | 		doff:4, |
| 33 | 		fin:1, | 34 | 		fin:1, |
| 34 | 		syn:1, | 35 | 		syn:1, |
| ... | @@ -40,7 +41,8 @@ struct tcphdr { | ... | @@ -40,7 +41,8 @@ struct tcphdr { |
| 40 | 		cwr:1; | 41 | 		cwr:1; |
| 41 | #elif defined(__BIG_ENDIAN_BITFIELD) | 42 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 42 | 	__u16	doff:4, | 43 | 	__u16	doff:4, |
| 43 | 		res1:4, | 44 | 		res1:3, |
| 45 | 		ae:1, | ||
| 44 | 		cwr:1, | 46 | 		cwr:1, |
| 45 | 		ece:1, | 47 | 		ece:1, |
| 46 | 		urg:1, | 48 | 		urg:1, |
| ... | @@ -70,6 +72,7 @@ union tcp_word_hdr { | ... | @@ -70,6 +72,7 @@ union tcp_word_hdr { |
| 70 | #define tcp_flag_word(tp) (((union tcp_word_hdr *)(tp))->words[3]) | 72 | #define tcp_flag_word(tp) (((union tcp_word_hdr *)(tp))->words[3]) |
| 71 | 73 | ||
| 72 | enum { | 74 | enum { |
| 75 | 	TCP_FLAG_AE = __constant_cpu_to_be32(0x01000000), | ||
| 73 | 	TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000), | 76 | 	TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000), |
| 74 | 	TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000), | 77 | 	TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000), |
| 75 | 	TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000), | 78 | 	TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000), |
| ... | @@ -78,7 +81,7 @@ enum { | ... | @@ -78,7 +81,7 @@ enum { |
| 78 | 	TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000), | 81 | 	TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000), |
| 79 | 	TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000), | 82 | 	TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000), |
| 80 | 	TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000), | 83 | 	TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000), |
| 81 | 	TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000), | 84 | 	TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0E000000), |
| 82 | 	TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000) | 85 | 	TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000) |
| 83 | }; | 86 | }; |
| 84 | 87 | ||
| ... | @@ -136,6 +139,9 @@ enum { | ... | @@ -136,6 +139,9 @@ enum { |
| 136 | #define TCP_AO_REPAIR		42	/* Get/Set SNEs and ISNs */ | 139 | #define TCP_AO_REPAIR		42	/* Get/Set SNEs and ISNs */ |
| 137 | 140 | ||
| 138 | #define TCP_IS_MPTCP		43	/* Is MPTCP being used? */ | 141 | #define TCP_IS_MPTCP		43	/* Is MPTCP being used? */ |
| 142 | #define TCP_RTO_MAX_MS		44	/* max rto time in ms */ | ||
| 143 | #define TCP_RTO_MIN_US		45	/* min rto time in us */ | ||
| 144 | #define TCP_DELACK_MAX_US	46	/* max delayed ack time in us */ | ||
| 139 | 145 | ||
| 140 | #define TCP_REPAIR_ON		1 | 146 | #define TCP_REPAIR_ON		1 |
| 141 | #define TCP_REPAIR_OFF		0 | 147 | #define TCP_REPAIR_OFF		0 |
| ... | @@ -178,6 +184,7 @@ enum tcp_fastopen_client_fail { | ... | @@ -178,6 +184,7 @@ enum tcp_fastopen_client_fail { |
| 178 | #define TCPI_OPT_ECN_SEEN	16 /* we received at least one packet with ECT */ | 184 | #define TCPI_OPT_ECN_SEEN	16 /* we received at least one packet with ECT */ |
| 179 | #define TCPI_OPT_SYN_DATA	32 /* SYN-ACK acked data in SYN sent or rcvd */ | 185 | #define TCPI_OPT_SYN_DATA	32 /* SYN-ACK acked data in SYN sent or rcvd */ |
| 180 | #define TCPI_OPT_USEC_TS	64 /* usec timestamps */ | 186 | #define TCPI_OPT_USEC_TS	64 /* usec timestamps */ |
| 187 | #define TCPI_OPT_TFO_CHILD	128 /* child from a Fast Open option on SYN */ | ||
| 181 | 188 | ||
| 182 | /* | 189 | /* |
| 183 | * Sender's congestion state indicating normal or abnormal situations | 190 | * Sender's congestion state indicating normal or abnormal situations |
lib/libc/include/any-linux-any/linux/time.h+11| ... | @@ -62,6 +62,17 @@ struct timezone { | ... | @@ -62,6 +62,17 @@ struct timezone { |
| 62 | #define CLOCK_TAI			11 | 62 | #define CLOCK_TAI			11 |
| 63 | 63 | ||
| 64 | #define MAX_CLOCKS			16 | 64 | #define MAX_CLOCKS			16 |
| 65 | |||
| 66 | /* | ||
| 67 | * AUX clock support. AUXiliary clocks are dynamically configured by | ||
| 68 | * enabling a clock ID. These clock can be steered independently of the | ||
| 69 | * core timekeeper. The kernel can support up to 8 auxiliary clocks, but | ||
| 70 | * the actual limit depends on eventual architecture constraints vs. VDSO. | ||
| 71 | */ | ||
| 72 | #define CLOCK_AUX			MAX_CLOCKS | ||
| 73 | #define MAX_AUX_CLOCKS			8 | ||
| 74 | #define CLOCK_AUX_LAST			(CLOCK_AUX + MAX_AUX_CLOCKS - 1) | ||
| 75 | |||
| 65 | #define CLOCKS_MASK			(CLOCK_REALTIME | CLOCK_MONOTONIC) | 76 | #define CLOCKS_MASK			(CLOCK_REALTIME | CLOCK_MONOTONIC) |
| 66 | #define CLOCKS_MONO			CLOCK_MONOTONIC | 77 | #define CLOCKS_MONO			CLOCK_MONOTONIC |
| 67 | 78 |
lib/libc/include/any-linux-any/linux/tiocl.h+1| ... | @@ -36,5 +36,6 @@ struct tiocl_selection { | ... | @@ -36,5 +36,6 @@ struct tiocl_selection { |
| 36 | #define TIOCL_BLANKSCREEN	14	/* keep screen blank even if a key is pressed */ | 36 | #define TIOCL_BLANKSCREEN	14	/* keep screen blank even if a key is pressed */ |
| 37 | #define TIOCL_BLANKEDSCREEN	15	/* return which vt was blanked */ | 37 | #define TIOCL_BLANKEDSCREEN	15	/* return which vt was blanked */ |
| 38 | #define TIOCL_GETKMSGREDIRECT	17	/* get the vt the kernel messages are restricted to */ | 38 | #define TIOCL_GETKMSGREDIRECT	17	/* get the vt the kernel messages are restricted to */ |
| 39 | #define TIOCL_GETBRACKETEDPASTE	18	/* get whether paste may be bracketed */ | ||
| 39 | 40 | ||
| 40 | #endif /* _LINUX_TIOCL_H */ | 41 | #endif /* _LINUX_TIOCL_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/ublk_cmd.h+205-2| ... | @@ -51,6 +51,10 @@ | ... | @@ -51,6 +51,10 @@ |
| 51 | 	_IOR('u', 0x13, struct ublksrv_ctrl_cmd) | 51 | 	_IOR('u', 0x13, struct ublksrv_ctrl_cmd) |
| 52 | #define UBLK_U_CMD_DEL_DEV_ASYNC	\ | 52 | #define UBLK_U_CMD_DEL_DEV_ASYNC	\ |
| 53 | 	_IOR('u', 0x14, struct ublksrv_ctrl_cmd) | 53 | 	_IOR('u', 0x14, struct ublksrv_ctrl_cmd) |
| 54 | #define UBLK_U_CMD_UPDATE_SIZE		\ | ||
| 55 | 	_IOWR('u', 0x15, struct ublksrv_ctrl_cmd) | ||
| 56 | #define UBLK_U_CMD_QUIESCE_DEV		\ | ||
| 57 | 	_IOWR('u', 0x16, struct ublksrv_ctrl_cmd) | ||
| 54 | 58 | ||
| 55 | /* | 59 | /* |
| 56 | * 64bits are enough now, and it should be easy to extend in case of | 60 | * 64bits are enough now, and it should be easy to extend in case of |
| ... | @@ -94,6 +98,10 @@ | ... | @@ -94,6 +98,10 @@ |
| 94 | 	_IOWR('u', UBLK_IO_COMMIT_AND_FETCH_REQ, struct ublksrv_io_cmd) | 98 | 	_IOWR('u', UBLK_IO_COMMIT_AND_FETCH_REQ, struct ublksrv_io_cmd) |
| 95 | #define	UBLK_U_IO_NEED_GET_DATA		\ | 99 | #define	UBLK_U_IO_NEED_GET_DATA		\ |
| 96 | 	_IOWR('u', UBLK_IO_NEED_GET_DATA, struct ublksrv_io_cmd) | 100 | 	_IOWR('u', UBLK_IO_NEED_GET_DATA, struct ublksrv_io_cmd) |
| 101 | #define	UBLK_U_IO_REGISTER_IO_BUF	\ | ||
| 102 | 	_IOWR('u', 0x23, struct ublksrv_io_cmd) | ||
| 103 | #define	UBLK_U_IO_UNREGISTER_IO_BUF	\ | ||
| 104 | 	_IOWR('u', 0x24, struct ublksrv_io_cmd) | ||
| 97 | 105 | ||
| 98 | /* only ABORT means that no re-fetch */ | 106 | /* only ABORT means that no re-fetch */ |
| 99 | #define UBLK_IO_RES_OK			0 | 107 | #define UBLK_IO_RES_OK			0 |
| ... | @@ -127,8 +135,28 @@ | ... | @@ -127,8 +135,28 @@ |
| 127 | #define UBLKSRV_IO_BUF_TOTAL_SIZE	(1ULL << UBLKSRV_IO_BUF_TOTAL_BITS) | 135 | #define UBLKSRV_IO_BUF_TOTAL_SIZE	(1ULL << UBLKSRV_IO_BUF_TOTAL_BITS) |
| 128 | 136 | ||
| 129 | /* | 137 | /* |
| 130 | * zero copy requires 4k block size, and can remap ublk driver's io | 138 | * ublk server can register data buffers for incoming I/O requests with a sparse |
| 131 | * request into ublksrv's vm space | 139 | * io_uring buffer table. The request buffer can then be used as the data buffer |
| 140 | * for io_uring operations via the fixed buffer index. | ||
| 141 | * Note that the ublk server can never directly access the request data memory. | ||
| 142 | * | ||
| 143 | * To use this feature, the ublk server must first register a sparse buffer | ||
| 144 | * table on an io_uring instance. | ||
| 145 | * When an incoming ublk request is received, the ublk server submits a | ||
| 146 | * UBLK_U_IO_REGISTER_IO_BUF command to that io_uring instance. The | ||
| 147 | * ublksrv_io_cmd's q_id and tag specify the request whose buffer to register | ||
| 148 | * and addr is the index in the io_uring's buffer table to install the buffer. | ||
| 149 | * SQEs can now be submitted to the io_uring to read/write the request's buffer | ||
| 150 | * by enabling fixed buffers (e.g. using IORING_OP_{READ,WRITE}_FIXED or | ||
| 151 | * IORING_URING_CMD_FIXED) and passing the registered buffer index in buf_index. | ||
| 152 | * Once the last io_uring operation using the request's buffer has completed, | ||
| 153 | * the ublk server submits a UBLK_U_IO_UNREGISTER_IO_BUF command with q_id, tag, | ||
| 154 | * and addr again specifying the request buffer to unregister. | ||
| 155 | * The ublk request is completed when its buffer is unregistered from all | ||
| 156 | * io_uring instances and the ublk server issues UBLK_U_IO_COMMIT_AND_FETCH_REQ. | ||
| 157 | * | ||
| 158 | * Not available for UBLK_F_UNPRIVILEGED_DEV, as a ublk server can leak | ||
| 159 | * uninitialized kernel memory by not reading into the full request buffer. | ||
| 132 | */ | 160 | */ |
| 133 | #define UBLK_F_SUPPORT_ZERO_COPY	(1ULL << 0) | 161 | #define UBLK_F_SUPPORT_ZERO_COPY	(1ULL << 0) |
| 134 | 162 | ||
| ... | @@ -207,6 +235,82 @@ | ... | @@ -207,6 +235,82 @@ |
| 207 | */ | 235 | */ |
| 208 | #define UBLK_F_USER_RECOVERY_FAIL_IO (1ULL << 9) | 236 | #define UBLK_F_USER_RECOVERY_FAIL_IO (1ULL << 9) |
| 209 | 237 | ||
| 238 | /* | ||
| 239 | * Resizing a block device is possible with UBLK_U_CMD_UPDATE_SIZE | ||
| 240 | * New size is passed in cmd->data[0] and is in units of sectors | ||
| 241 | */ | ||
| 242 | #define UBLK_F_UPDATE_SIZE		 (1ULL << 10) | ||
| 243 | |||
| 244 | /* | ||
| 245 | * request buffer is registered automatically to uring_cmd's io_uring | ||
| 246 | * context before delivering this io command to ublk server, meantime | ||
| 247 | * it is un-registered automatically when completing this io command. | ||
| 248 | * | ||
| 249 | * For using this feature: | ||
| 250 | * | ||
| 251 | * - ublk server has to create sparse buffer table on the same `io_ring_ctx` | ||
| 252 | * for issuing `UBLK_IO_FETCH_REQ` and `UBLK_IO_COMMIT_AND_FETCH_REQ`. | ||
| 253 | * If uring_cmd isn't issued on same `io_ring_ctx`, it is ublk server's | ||
| 254 | * responsibility to unregister the buffer by issuing `IO_UNREGISTER_IO_BUF` | ||
| 255 | * manually, otherwise this ublk request won't complete. | ||
| 256 | * | ||
| 257 | * - ublk server passes auto buf register data via uring_cmd's sqe->addr, | ||
| 258 | * `struct ublk_auto_buf_reg` is populated from sqe->addr, please see | ||
| 259 | * the definition of ublk_sqe_addr_to_auto_buf_reg() | ||
| 260 | * | ||
| 261 | * - pass buffer index from `ublk_auto_buf_reg.index` | ||
| 262 | * | ||
| 263 | * - all reserved fields in `ublk_auto_buf_reg` need to be zeroed | ||
| 264 | * | ||
| 265 | * - pass flags from `ublk_auto_buf_reg.flags` if needed | ||
| 266 | * | ||
| 267 | * This way avoids extra cost from two uring_cmd, but also simplifies backend | ||
| 268 | * implementation, such as, the dependency on IO_REGISTER_IO_BUF and | ||
| 269 | * IO_UNREGISTER_IO_BUF becomes not necessary. | ||
| 270 | * | ||
| 271 | * If wrong data or flags are provided, both IO_FETCH_REQ and | ||
| 272 | * IO_COMMIT_AND_FETCH_REQ are failed, for the latter, the ublk IO request | ||
| 273 | * won't be completed until new IO_COMMIT_AND_FETCH_REQ command is issued | ||
| 274 | * successfully | ||
| 275 | */ | ||
| 276 | #define UBLK_F_AUTO_BUF_REG 	(1ULL << 11) | ||
| 277 | |||
| 278 | /* | ||
| 279 | * Control command `UBLK_U_CMD_QUIESCE_DEV` is added for quiescing device, | ||
| 280 | * which state can be transitioned to `UBLK_S_DEV_QUIESCED` or | ||
| 281 | * `UBLK_S_DEV_FAIL_IO` finally, and it needs ublk server cooperation for | ||
| 282 | * handling `UBLK_IO_RES_ABORT` correctly. | ||
| 283 | * | ||
| 284 | * Typical use case is for supporting to upgrade ublk server application, | ||
| 285 | * meantime keep ublk block device persistent during the period. | ||
| 286 | * | ||
| 287 | * This feature is only available when UBLK_F_USER_RECOVERY is enabled. | ||
| 288 | * | ||
| 289 | * Note, this command returns -EBUSY in case that all IO commands are being | ||
| 290 | * handled by ublk server and not completed in specified time period which | ||
| 291 | * is passed from the control command parameter. | ||
| 292 | */ | ||
| 293 | #define UBLK_F_QUIESCE		(1ULL << 12) | ||
| 294 | |||
| 295 | /* | ||
| 296 | * If this feature is set, ublk_drv supports each (qid,tag) pair having | ||
| 297 | * its own independent daemon task that is responsible for handling it. | ||
| 298 | * If it is not set, daemons are per-queue instead, so for two pairs | ||
| 299 | * (qid1,tag1) and (qid2,tag2), if qid1 == qid2, then the same task must | ||
| 300 | * be responsible for handling (qid1,tag1) and (qid2,tag2). | ||
| 301 | */ | ||
| 302 | #define UBLK_F_PER_IO_DAEMON (1ULL << 13) | ||
| 303 | |||
| 304 | /* | ||
| 305 | * If this feature is set, UBLK_U_IO_REGISTER_IO_BUF/UBLK_U_IO_UNREGISTER_IO_BUF | ||
| 306 | * can be issued for an I/O on any task. q_id and tag are also ignored in | ||
| 307 | * UBLK_U_IO_UNREGISTER_IO_BUF's ublksrv_io_cmd. | ||
| 308 | * If it is unset, zero-copy buffers can only be registered and unregistered by | ||
| 309 | * the I/O's daemon task. The q_id and tag of the registered buffer are required | ||
| 310 | * in UBLK_U_IO_UNREGISTER_IO_BUF's ublksrv_io_cmd. | ||
| 311 | */ | ||
| 312 | #define UBLK_F_BUF_REG_OFF_DAEMON (1ULL << 14) | ||
| 313 | |||
| 210 | /* device state */ | 314 | /* device state */ |
| 211 | #define UBLK_S_DEV_DEAD	0 | 315 | #define UBLK_S_DEV_DEAD	0 |
| 212 | #define UBLK_S_DEV_LIVE	1 | 316 | #define UBLK_S_DEV_LIVE	1 |
| ... | @@ -293,6 +397,17 @@ struct ublksrv_ctrl_dev_info { | ... | @@ -293,6 +397,17 @@ struct ublksrv_ctrl_dev_info { |
| 293 | #define		UBLK_IO_F_FUA			(1U << 13) | 397 | #define		UBLK_IO_F_FUA			(1U << 13) |
| 294 | #define		UBLK_IO_F_NOUNMAP		(1U << 15) | 398 | #define		UBLK_IO_F_NOUNMAP		(1U << 15) |
| 295 | #define		UBLK_IO_F_SWAP			(1U << 16) | 399 | #define		UBLK_IO_F_SWAP			(1U << 16) |
| 400 | /* | ||
| 401 | * For UBLK_F_AUTO_BUF_REG & UBLK_AUTO_BUF_REG_FALLBACK only. | ||
| 402 | * | ||
| 403 | * This flag is set if auto buffer register is failed & ublk server passes | ||
| 404 | * UBLK_AUTO_BUF_REG_FALLBACK, and ublk server need to register buffer | ||
| 405 | * manually for handling the delivered IO command if this flag is observed | ||
| 406 | * | ||
| 407 | * ublk server has to check this flag if UBLK_AUTO_BUF_REG_FALLBACK is | ||
| 408 | * passed in. | ||
| 409 | */ | ||
| 410 | #define		UBLK_IO_F_NEED_REG_BUF		(1U << 17) | ||
| 296 | 411 | ||
| 297 | /* | 412 | /* |
| 298 | * io cmd is described by this structure, and stored in share memory, indexed | 413 | * io cmd is described by this structure, and stored in share memory, indexed |
| ... | @@ -327,6 +442,62 @@ static __inline__ __u32 ublksrv_get_flags(const struct ublksrv_io_desc *iod) | ... | @@ -327,6 +442,62 @@ static __inline__ __u32 ublksrv_get_flags(const struct ublksrv_io_desc *iod) |
| 327 | 	return iod->op_flags >> 8; | 442 | 	return iod->op_flags >> 8; |
| 328 | } | 443 | } |
| 329 | 444 | ||
| 445 | /* | ||
| 446 | * If this flag is set, fallback by completing the uring_cmd and setting | ||
| 447 | * `UBLK_IO_F_NEED_REG_BUF` in case of auto-buf-register failure; | ||
| 448 | * otherwise the client ublk request is failed silently | ||
| 449 | * | ||
| 450 | * If ublk server passes this flag, it has to check if UBLK_IO_F_NEED_REG_BUF | ||
| 451 | * is set in `ublksrv_io_desc.op_flags`. If UBLK_IO_F_NEED_REG_BUF is set, | ||
| 452 | * ublk server needs to register io buffer manually for handling IO command. | ||
| 453 | */ | ||
| 454 | #define UBLK_AUTO_BUF_REG_FALLBACK 	(1 << 0) | ||
| 455 | #define UBLK_AUTO_BUF_REG_F_MASK 	UBLK_AUTO_BUF_REG_FALLBACK | ||
| 456 | |||
| 457 | struct ublk_auto_buf_reg { | ||
| 458 | 	/* index for registering the delivered request buffer */ | ||
| 459 | 	__u16 index; | ||
| 460 | 	__u8 flags; | ||
| 461 | 	__u8 reserved0; | ||
| 462 | |||
| 463 | 	/* | ||
| 464 | 	 * io_ring FD can be passed via the reserve field in future for | ||
| 465 | 	 * supporting to register io buffer to external io_uring | ||
| 466 | 	 */ | ||
| 467 | 	__u32 reserved1; | ||
| 468 | }; | ||
| 469 | |||
| 470 | /* | ||
| 471 | * For UBLK_F_AUTO_BUF_REG, auto buffer register data is carried via | ||
| 472 | * uring_cmd's sqe->addr: | ||
| 473 | * | ||
| 474 | * 	- bit0 ~ bit15: buffer index | ||
| 475 | * 	- bit16 ~ bit23: flags | ||
| 476 | * 	- bit24 ~ bit31: reserved0 | ||
| 477 | * 	- bit32 ~ bit63: reserved1 | ||
| 478 | */ | ||
| 479 | static __inline__ struct ublk_auto_buf_reg ublk_sqe_addr_to_auto_buf_reg( | ||
| 480 | 		__u64 sqe_addr) | ||
| 481 | { | ||
| 482 | 	struct ublk_auto_buf_reg reg = { | ||
| 483 | 		.index = (__u16)sqe_addr, | ||
| 484 | 		.flags = (__u8)(sqe_addr >> 16), | ||
| 485 | 		.reserved0 = (__u8)(sqe_addr >> 24), | ||
| 486 | 		.reserved1 = (__u32)(sqe_addr >> 32), | ||
| 487 | 	}; | ||
| 488 | |||
| 489 | 	return reg; | ||
| 490 | } | ||
| 491 | |||
| 492 | static __inline__ __u64 | ||
| 493 | ublk_auto_buf_reg_to_sqe_addr(const struct ublk_auto_buf_reg *buf) | ||
| 494 | { | ||
| 495 | 	__u64 addr = buf->index | (__u64)buf->flags << 16 | (__u64)buf->reserved0 << 24 | | ||
| 496 | 		(__u64)buf->reserved1 << 32; | ||
| 497 | |||
| 498 | 	return addr; | ||
| 499 | } | ||
| 500 | |||
| 330 | /* issued to ublk driver via /dev/ublkcN */ | 501 | /* issued to ublk driver via /dev/ublkcN */ |
| 331 | struct ublksrv_io_cmd { | 502 | struct ublksrv_io_cmd { |
| 332 | 	__u16	q_id; | 503 | 	__u16	q_id; |
| ... | @@ -401,6 +572,34 @@ struct ublk_param_zoned { | ... | @@ -401,6 +572,34 @@ struct ublk_param_zoned { |
| 401 | 	__u8	reserved[20]; | 572 | 	__u8	reserved[20]; |
| 402 | }; | 573 | }; |
| 403 | 574 | ||
| 575 | struct ublk_param_dma_align { | ||
| 576 | 	__u32	alignment; | ||
| 577 | 	__u8	pad[4]; | ||
| 578 | }; | ||
| 579 | |||
| 580 | #define UBLK_MIN_SEGMENT_SIZE 4096 | ||
| 581 | /* | ||
| 582 | * If any one of the three segment parameter is set as 0, the behavior is | ||
| 583 | * undefined. | ||
| 584 | */ | ||
| 585 | struct ublk_param_segment { | ||
| 586 | 	/* | ||
| 587 | 	 * seg_boundary_mask + 1 needs to be power_of_2(), and the sum has | ||
| 588 | 	 * to be >= UBLK_MIN_SEGMENT_SIZE(4096) | ||
| 589 | 	 */ | ||
| 590 | 	__u64 	seg_boundary_mask; | ||
| 591 | |||
| 592 | 	/* | ||
| 593 | 	 * max_segment_size could be override by virt_boundary_mask, so be | ||
| 594 | 	 * careful when setting both. | ||
| 595 | 	 * | ||
| 596 | 	 * max_segment_size has to be >= UBLK_MIN_SEGMENT_SIZE(4096) | ||
| 597 | 	 */ | ||
| 598 | 	__u32 	max_segment_size; | ||
| 599 | 	__u16 	max_segments; | ||
| 600 | 	__u8	pad[2]; | ||
| 601 | }; | ||
| 602 | |||
| 404 | struct ublk_params { | 603 | struct ublk_params { |
| 405 | 	/* | 604 | 	/* |
| 406 | 	 * Total length of parameters, userspace has to set 'len' for both | 605 | 	 * Total length of parameters, userspace has to set 'len' for both |
| ... | @@ -413,12 +612,16 @@ struct ublk_params { | ... | @@ -413,12 +612,16 @@ struct ublk_params { |
| 413 | #define UBLK_PARAM_TYPE_DISCARD (1 << 1) | 612 | #define UBLK_PARAM_TYPE_DISCARD (1 << 1) |
| 414 | #define UBLK_PARAM_TYPE_DEVT (1 << 2) | 613 | #define UBLK_PARAM_TYPE_DEVT (1 << 2) |
| 415 | #define UBLK_PARAM_TYPE_ZONED (1 << 3) | 614 | #define UBLK_PARAM_TYPE_ZONED (1 << 3) |
| 615 | #define UBLK_PARAM_TYPE_DMA_ALIGN (1 << 4) | ||
| 616 | #define UBLK_PARAM_TYPE_SEGMENT (1 << 5) | ||
| 416 | 	__u32	types;			/* types of parameter included */ | 617 | 	__u32	types;			/* types of parameter included */ |
| 417 | 618 | ||
| 418 | 	struct ublk_param_basic		basic; | 619 | 	struct ublk_param_basic		basic; |
| 419 | 	struct ublk_param_discard	discard; | 620 | 	struct ublk_param_discard	discard; |
| 420 | 	struct ublk_param_devt		devt; | 621 | 	struct ublk_param_devt		devt; |
| 421 | 	struct ublk_param_zoned	zoned; | 622 | 	struct ublk_param_zoned	zoned; |
| 623 | 	struct ublk_param_dma_align	dma; | ||
| 624 | 	struct ublk_param_segment	seg; | ||
| 422 | }; | 625 | }; |
| 423 | 626 | ||
| 424 | #endif | 627 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/udp.h+1| ... | @@ -43,5 +43,6 @@ struct udphdr { | ... | @@ -43,5 +43,6 @@ struct udphdr { |
| 43 | #define UDP_ENCAP_GTP1U		5 /* 3GPP TS 29.060 */ | 43 | #define UDP_ENCAP_GTP1U		5 /* 3GPP TS 29.060 */ |
| 44 | #define UDP_ENCAP_RXRPC		6 | 44 | #define UDP_ENCAP_RXRPC		6 |
| 45 | #define TCP_ENCAP_ESPINTCP	7 /* Yikes, this is really xfrm encap types. */ | 45 | #define TCP_ENCAP_ESPINTCP	7 /* Yikes, this is really xfrm encap types. */ |
| 46 | #define UDP_ENCAP_OVPNINUDP	8 /* OpenVPN traffic */ | ||
| 46 | 47 | ||
| 47 | #endif /* _LINUX_UDP_H */ | 48 | #endif /* _LINUX_UDP_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/usb/ch9.h+16| ... | @@ -253,6 +253,9 @@ struct usb_ctrlrequest { | ... | @@ -253,6 +253,9 @@ struct usb_ctrlrequest { |
| 253 | #define USB_DT_BOS			0x0f | 253 | #define USB_DT_BOS			0x0f |
| 254 | #define USB_DT_DEVICE_CAPABILITY	0x10 | 254 | #define USB_DT_DEVICE_CAPABILITY	0x10 |
| 255 | #define USB_DT_WIRELESS_ENDPOINT_COMP	0x11 | 255 | #define USB_DT_WIRELESS_ENDPOINT_COMP	0x11 |
| 256 | /* From the eUSB2 spec */ | ||
| 257 | #define USB_DT_EUSB2_ISOC_ENDPOINT_COMP	0x12 | ||
| 258 | /* From Wireless USB spec */ | ||
| 256 | #define USB_DT_WIRE_ADAPTER		0x21 | 259 | #define USB_DT_WIRE_ADAPTER		0x21 |
| 257 | /* From USB Device Firmware Upgrade Specification, Revision 1.1 */ | 260 | /* From USB Device Firmware Upgrade Specification, Revision 1.1 */ |
| 258 | #define USB_DT_DFU_FUNCTIONAL		0x21 | 261 | #define USB_DT_DFU_FUNCTIONAL		0x21 |
| ... | @@ -330,6 +333,7 @@ struct usb_device_descriptor { | ... | @@ -330,6 +333,7 @@ struct usb_device_descriptor { |
| 330 | #define USB_CLASS_AUDIO_VIDEO		0x10 | 333 | #define USB_CLASS_AUDIO_VIDEO		0x10 |
| 331 | #define USB_CLASS_BILLBOARD		0x11 | 334 | #define USB_CLASS_BILLBOARD		0x11 |
| 332 | #define USB_CLASS_USB_TYPE_C_BRIDGE	0x12 | 335 | #define USB_CLASS_USB_TYPE_C_BRIDGE	0x12 |
| 336 | #define USB_CLASS_MCTP			0x14 | ||
| 333 | #define USB_CLASS_MISC			0xef | 337 | #define USB_CLASS_MISC			0xef |
| 334 | #define USB_CLASS_APP_SPEC		0xfe | 338 | #define USB_CLASS_APP_SPEC		0xfe |
| 335 | #define USB_SUBCLASS_DFU			0x01 | 339 | #define USB_SUBCLASS_DFU			0x01 |
| ... | @@ -675,6 +679,18 @@ static __inline__ int usb_endpoint_interrupt_type( | ... | @@ -675,6 +679,18 @@ static __inline__ int usb_endpoint_interrupt_type( |
| 675 | 679 | ||
| 676 | /*-------------------------------------------------------------------------*/ | 680 | /*-------------------------------------------------------------------------*/ |
| 677 | 681 | ||
| 682 | /* USB_DT_EUSB2_ISOC_ENDPOINT_COMP: eUSB2 Isoch Endpoint Companion descriptor */ | ||
| 683 | struct usb_eusb2_isoc_ep_comp_descriptor { | ||
| 684 | 	__u8	bLength; | ||
| 685 | 	__u8	bDescriptorType; | ||
| 686 | 	__le16	wMaxPacketSize; | ||
| 687 | 	__le32	dwBytesPerInterval; | ||
| 688 | } __attribute__ ((packed)); | ||
| 689 | |||
| 690 | #define USB_DT_EUSB2_ISOC_EP_COMP_SIZE	8 | ||
| 691 | |||
| 692 | /*-------------------------------------------------------------------------*/ | ||
| 693 | |||
| 678 | /* USB_DT_SSP_ISOC_ENDPOINT_COMP: SuperSpeedPlus Isochronous Endpoint Companion | 694 | /* USB_DT_SSP_ISOC_ENDPOINT_COMP: SuperSpeedPlus Isochronous Endpoint Companion |
| 679 | * descriptor | 695 | * descriptor |
| 680 | */ | 696 | */ |
lib/libc/include/any-linux-any/linux/usb/functionfs.h+4-4| ... | @@ -205,7 +205,7 @@ struct usb_ffs_dmabuf_transfer_req { | ... | @@ -205,7 +205,7 @@ struct usb_ffs_dmabuf_transfer_req { |
| 205 | * +-----+-----------------+------+--------------------------+ | 205 | * +-----+-----------------+------+--------------------------+ |
| 206 | * | off | name | type | description | | 206 | * | off | name | type | description | |
| 207 | * +-----+-----------------+------+--------------------------+ | 207 | * +-----+-----------------+------+--------------------------+ |
| 208 | * | 0 | inteface | U8 | related interface number | | 208 | * | 0 | interface | U8 | related interface number | |
| 209 | * +-----+-----------------+------+--------------------------+ | 209 | * +-----+-----------------+------+--------------------------+ |
| 210 | * | 1 | dwLength | U32 | length of the descriptor | | 210 | * | 1 | dwLength | U32 | length of the descriptor | |
| 211 | * +-----+-----------------+------+--------------------------+ | 211 | * +-----+-----------------+------+--------------------------+ |
| ... | @@ -223,7 +223,7 @@ struct usb_ffs_dmabuf_transfer_req { | ... | @@ -223,7 +223,7 @@ struct usb_ffs_dmabuf_transfer_req { |
| 223 | * +-----+-----------------+------+--------------------------+ | 223 | * +-----+-----------------+------+--------------------------+ |
| 224 | * | off | name | type | description | | 224 | * | off | name | type | description | |
| 225 | * +-----+-----------------+------+--------------------------+ | 225 | * +-----+-----------------+------+--------------------------+ |
| 226 | * | 0 | inteface | U8 | related interface number | | 226 | * | 0 | interface | U8 | related interface number | |
| 227 | * +-----+-----------------+------+--------------------------+ | 227 | * +-----+-----------------+------+--------------------------+ |
| 228 | * | 1 | dwLength | U32 | length of the descriptor | | 228 | * | 1 | dwLength | U32 | length of the descriptor | |
| 229 | * +-----+-----------------+------+--------------------------+ | 229 | * +-----+-----------------+------+--------------------------+ |
| ... | @@ -236,7 +236,7 @@ struct usb_ffs_dmabuf_transfer_req { | ... | @@ -236,7 +236,7 @@ struct usb_ffs_dmabuf_transfer_req { |
| 236 | * | 11 | ExtProp[] | | list of ext. prop. d. | | 236 | * | 11 | ExtProp[] | | list of ext. prop. d. | |
| 237 | * +-----+-----------------+------+--------------------------+ | 237 | * +-----+-----------------+------+--------------------------+ |
| 238 | * | 238 | * |
| 239 | * ExtCompat[] is an array of valid Extended Compatiblity descriptors | 239 | * ExtCompat[] is an array of valid Extended Compatibility descriptors |
| 240 | * which have the following format: | 240 | * which have the following format: |
| 241 | * | 241 | * |
| 242 | * +-----+-----------------------+------+-------------------------------------+ | 242 | * +-----+-----------------------+------+-------------------------------------+ |
| ... | @@ -294,7 +294,7 @@ struct usb_functionfs_strings_head { | ... | @@ -294,7 +294,7 @@ struct usb_functionfs_strings_head { |
| 294 | * | 16 | stringtab | StringTab[lang_count] | table of strings per lang | | 294 | * | 16 | stringtab | StringTab[lang_count] | table of strings per lang | |
| 295 | * | 295 | * |
| 296 | * For each language there is one stringtab entry (ie. there are lang_count | 296 | * For each language there is one stringtab entry (ie. there are lang_count |
| 297 | * stringtab entires). Each StringTab has following format: | 297 | * stringtab entries). Each StringTab has following format: |
| 298 | * | 298 | * |
| 299 | * | off | name | type | description | | 299 | * | off | name | type | description | |
| 300 | * |-----+---------+-------------------+------------------------------------| | 300 | * |-----+---------+-------------------+------------------------------------| |
lib/libc/include/any-linux-any/linux/usb/video.h+1| ... | @@ -104,6 +104,7 @@ | ... | @@ -104,6 +104,7 @@ |
| 104 | #define UVC_CT_ROLL_ABSOLUTE_CONTROL			0x0f | 104 | #define UVC_CT_ROLL_ABSOLUTE_CONTROL			0x0f |
| 105 | #define UVC_CT_ROLL_RELATIVE_CONTROL			0x10 | 105 | #define UVC_CT_ROLL_RELATIVE_CONTROL			0x10 |
| 106 | #define UVC_CT_PRIVACY_CONTROL				0x11 | 106 | #define UVC_CT_PRIVACY_CONTROL				0x11 |
| 107 | #define UVC_CT_REGION_OF_INTEREST_CONTROL		0x14 | ||
| 107 | 108 | ||
| 108 | /* A.9.5. Processing Unit Control Selectors */ | 109 | /* A.9.5. Processing Unit Control Selectors */ |
| 109 | #define UVC_PU_CONTROL_UNDEFINED			0x00 | 110 | #define UVC_PU_CONTROL_UNDEFINED			0x00 |
lib/libc/include/any-linux-any/linux/uvcvideo.h+13| ... | @@ -16,6 +16,7 @@ | ... | @@ -16,6 +16,7 @@ |
| 16 | #define UVC_CTRL_DATA_TYPE_BOOLEAN	3 | 16 | #define UVC_CTRL_DATA_TYPE_BOOLEAN	3 |
| 17 | #define UVC_CTRL_DATA_TYPE_ENUM		4 | 17 | #define UVC_CTRL_DATA_TYPE_ENUM		4 |
| 18 | #define UVC_CTRL_DATA_TYPE_BITMASK	5 | 18 | #define UVC_CTRL_DATA_TYPE_BITMASK	5 |
| 19 | #define UVC_CTRL_DATA_TYPE_RECT		6 | ||
| 19 | 20 | ||
| 20 | /* Control flags */ | 21 | /* Control flags */ |
| 21 | #define UVC_CTRL_FLAG_SET_CUR		(1 << 0) | 22 | #define UVC_CTRL_FLAG_SET_CUR		(1 << 0) |
| ... | @@ -38,6 +39,18 @@ | ... | @@ -38,6 +39,18 @@ |
| 38 | 39 | ||
| 39 | #define UVC_MENU_NAME_LEN 32 | 40 | #define UVC_MENU_NAME_LEN 32 |
| 40 | 41 | ||
| 42 | /* V4L2 driver-specific controls */ | ||
| 43 | #define V4L2_CID_UVC_REGION_OF_INTEREST_RECT	(V4L2_CID_USER_UVC_BASE + 1) | ||
| 44 | #define V4L2_CID_UVC_REGION_OF_INTEREST_AUTO	(V4L2_CID_USER_UVC_BASE + 2) | ||
| 45 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_EXPOSURE		(1 << 0) | ||
| 46 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_IRIS			(1 << 1) | ||
| 47 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_WHITE_BALANCE		(1 << 2) | ||
| 48 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_FOCUS			(1 << 3) | ||
| 49 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_FACE_DETECT		(1 << 4) | ||
| 50 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_DETECT_AND_TRACK	(1 << 5) | ||
| 51 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_IMAGE_STABILIZATION	(1 << 6) | ||
| 52 | #define V4L2_UVC_REGION_OF_INTEREST_AUTO_HIGHER_QUALITY		(1 << 7) | ||
| 53 | |||
| 41 | struct uvc_menu_info { | 54 | struct uvc_menu_info { |
| 42 | 	__u32 value; | 55 | 	__u32 value; |
| 43 | 	__u8 name[UVC_MENU_NAME_LEN]; | 56 | 	__u8 name[UVC_MENU_NAME_LEN]; |
lib/libc/include/any-linux-any/linux/v4l2-controls.h+13| ... | @@ -213,6 +213,19 @@ enum v4l2_colorfx { | ... | @@ -213,6 +213,19 @@ enum v4l2_colorfx { |
| 213 | */ | 213 | */ |
| 214 | #define V4L2_CID_USER_THP7312_BASE		(V4L2_CID_USER_BASE + 0x11c0) | 214 | #define V4L2_CID_USER_THP7312_BASE		(V4L2_CID_USER_BASE + 0x11c0) |
| 215 | 215 | ||
| 216 | /* | ||
| 217 | * The base for the uvc driver controls. | ||
| 218 | * See linux/uvcvideo.h for the list of controls. | ||
| 219 | * We reserve 64 controls for this driver. | ||
| 220 | */ | ||
| 221 | #define V4L2_CID_USER_UVC_BASE			(V4L2_CID_USER_BASE + 0x11e0) | ||
| 222 | |||
| 223 | /* | ||
| 224 | * The base for Rockchip ISP1 driver controls. | ||
| 225 | * We reserve 16 controls for this driver. | ||
| 226 | */ | ||
| 227 | #define V4L2_CID_USER_RKISP1_BASE		(V4L2_CID_USER_BASE + 0x1220) | ||
| 228 | |||
| 216 | /* MPEG-class control IDs */ | 229 | /* MPEG-class control IDs */ |
| 217 | /* The MPEG controls are applicable to all codec controls | 230 | /* The MPEG controls are applicable to all codec controls |
| 218 | * and the 'MPEG' part of the define is historical */ | 231 | * and the 'MPEG' part of the define is historical */ |
lib/libc/include/any-linux-any/linux/vduse.h+2-2| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ |
| 2 | #ifndef _VDUSE_H_ | 2 | #ifndef _VDUSE_H_ |
| 3 | #define _VDUSE_H_ | 3 | #define _VDUSE_H_ |
| 4 | 4 | ||
| ... | @@ -237,7 +237,7 @@ struct vduse_iova_umem { | ... | @@ -237,7 +237,7 @@ struct vduse_iova_umem { |
| 237 | * struct vduse_iova_info - information of one IOVA region | 237 | * struct vduse_iova_info - information of one IOVA region |
| 238 | * @start: start of the IOVA region | 238 | * @start: start of the IOVA region |
| 239 | * @last: last of the IOVA region | 239 | * @last: last of the IOVA region |
| 240 | * @capability: capability of the IOVA regsion | 240 | * @capability: capability of the IOVA region |
| 241 | * @reserved: for future use, needs to be initialized to zero | 241 | * @reserved: for future use, needs to be initialized to zero |
| 242 | * | 242 | * |
| 243 | * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of | 243 | * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of |
lib/libc/include/any-linux-any/linux/version.h+3-3| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | #define LINUX_VERSION_CODE 396548 | 1 | #define LINUX_VERSION_CODE 397568 |
| 2 | #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) | 2 | #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) |
| 3 | #define LINUX_VERSION_MAJOR 6 | 3 | #define LINUX_VERSION_MAJOR 6 |
| 4 | #define LINUX_VERSION_PATCHLEVEL 13 | ||
| 5 | #define LINUX_VERSION_SUBLEVEL 4 | ||
| \ No newline at end of file | |||
| 4 | #define LINUX_VERSION_PATCHLEVEL 17 | ||
| 5 | #define LINUX_VERSION_SUBLEVEL 0 | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/vfio.h+31-11| ... | @@ -671,6 +671,7 @@ enum { | ... | @@ -671,6 +671,7 @@ enum { |
| 671 | */ | 671 | */ |
| 672 | enum { | 672 | enum { |
| 673 | 	VFIO_AP_REQ_IRQ_INDEX, | 673 | 	VFIO_AP_REQ_IRQ_INDEX, |
| 674 | 	VFIO_AP_CFG_CHG_IRQ_INDEX, | ||
| 674 | 	VFIO_AP_NUM_IRQS | 675 | 	VFIO_AP_NUM_IRQS |
| 675 | }; | 676 | }; |
| 676 | 677 | ||
| ... | @@ -904,10 +905,12 @@ struct vfio_device_feature { | ... | @@ -904,10 +905,12 @@ struct vfio_device_feature { |
| 904 | * VFIO_DEVICE_BIND_IOMMUFD - _IOR(VFIO_TYPE, VFIO_BASE + 18, | 905 | * VFIO_DEVICE_BIND_IOMMUFD - _IOR(VFIO_TYPE, VFIO_BASE + 18, |
| 905 | *				 struct vfio_device_bind_iommufd) | 906 | *				 struct vfio_device_bind_iommufd) |
| 906 | * @argsz:	 User filled size of this data. | 907 | * @argsz:	 User filled size of this data. |
| 907 | * @flags:	 Must be 0. | 908 | * @flags:	 Must be 0 or a bit flags of VFIO_DEVICE_BIND_* |
| 908 | * @iommufd:	 iommufd to bind. | 909 | * @iommufd:	 iommufd to bind. |
| 909 | * @out_devid:	 The device id generated by this bind. devid is a handle for | 910 | * @out_devid:	 The device id generated by this bind. devid is a handle for |
| 910 | *		 this device/iommufd bond and can be used in IOMMUFD commands. | 911 | *		 this device/iommufd bond and can be used in IOMMUFD commands. |
| 912 | * @token_uuid_ptr: Valid if VFIO_DEVICE_BIND_FLAG_TOKEN. Points to a 16 byte | ||
| 913 | * UUID in the same format as VFIO_DEVICE_FEATURE_PCI_VF_TOKEN. | ||
| 911 | * | 914 | * |
| 912 | * Bind a vfio_device to the specified iommufd. | 915 | * Bind a vfio_device to the specified iommufd. |
| 913 | * | 916 | * |
| ... | @@ -916,13 +919,21 @@ struct vfio_device_feature { | ... | @@ -916,13 +919,21 @@ struct vfio_device_feature { |
| 916 | * | 919 | * |
| 917 | * Unbind is automatically conducted when device fd is closed. | 920 | * Unbind is automatically conducted when device fd is closed. |
| 918 | * | 921 | * |
| 922 | * A token is sometimes required to open the device, unless this is known to be | ||
| 923 | * needed VFIO_DEVICE_BIND_FLAG_TOKEN should not be set and token_uuid_ptr is | ||
| 924 | * ignored. The only case today is a PF/VF relationship where the VF bind must | ||
| 925 | * be provided the same token as VFIO_DEVICE_FEATURE_PCI_VF_TOKEN provided to | ||
| 926 | * the PF. | ||
| 927 | * | ||
| 919 | * Return: 0 on success, -errno on failure. | 928 | * Return: 0 on success, -errno on failure. |
| 920 | */ | 929 | */ |
| 921 | struct vfio_device_bind_iommufd { | 930 | struct vfio_device_bind_iommufd { |
| 922 | 	__u32		argsz; | 931 | 	__u32		argsz; |
| 923 | 	__u32		flags; | 932 | 	__u32		flags; |
| 933 | #define VFIO_DEVICE_BIND_FLAG_TOKEN (1 << 0) | ||
| 924 | 	__s32		iommufd; | 934 | 	__s32		iommufd; |
| 925 | 	__u32		out_devid; | 935 | 	__u32		out_devid; |
| 936 | 	__aligned_u64	token_uuid_ptr; | ||
| 926 | }; | 937 | }; |
| 927 | 938 | ||
| 928 | #define VFIO_DEVICE_BIND_IOMMUFD	_IO(VFIO_TYPE, VFIO_BASE + 18) | 939 | #define VFIO_DEVICE_BIND_IOMMUFD	_IO(VFIO_TYPE, VFIO_BASE + 18) |
| ... | @@ -931,29 +942,34 @@ struct vfio_device_bind_iommufd { | ... | @@ -931,29 +942,34 @@ struct vfio_device_bind_iommufd { |
| 931 | * VFIO_DEVICE_ATTACH_IOMMUFD_PT - _IOW(VFIO_TYPE, VFIO_BASE + 19, | 942 | * VFIO_DEVICE_ATTACH_IOMMUFD_PT - _IOW(VFIO_TYPE, VFIO_BASE + 19, |
| 932 | *					struct vfio_device_attach_iommufd_pt) | 943 | *					struct vfio_device_attach_iommufd_pt) |
| 933 | * @argsz:	User filled size of this data. | 944 | * @argsz:	User filled size of this data. |
| 934 | * @flags:	Must be 0. | 945 | * @flags:	Flags for attach. |
| 935 | * @pt_id:	Input the target id which can represent an ioas or a hwpt | 946 | * @pt_id:	Input the target id which can represent an ioas or a hwpt |
| 936 | *		allocated via iommufd subsystem. | 947 | *		allocated via iommufd subsystem. |
| 937 | *		Output the input ioas id or the attached hwpt id which could | 948 | *		Output the input ioas id or the attached hwpt id which could |
| 938 | *		be the specified hwpt itself or a hwpt automatically created | 949 | *		be the specified hwpt itself or a hwpt automatically created |
| 939 | *		for the specified ioas by kernel during the attachment. | 950 | *		for the specified ioas by kernel during the attachment. |
| 951 | * @pasid:	The pasid to be attached, only meaningful when | ||
| 952 | *		VFIO_DEVICE_ATTACH_PASID is set in @flags | ||
| 940 | * | 953 | * |
| 941 | * Associate the device with an address space within the bound iommufd. | 954 | * Associate the device with an address space within the bound iommufd. |
| 942 | * Undo by VFIO_DEVICE_DETACH_IOMMUFD_PT or device fd close. This is only | 955 | * Undo by VFIO_DEVICE_DETACH_IOMMUFD_PT or device fd close. This is only |
| 943 | * allowed on cdev fds. | 956 | * allowed on cdev fds. |
| 944 | * | 957 | * |
| 945 | * If a vfio device is currently attached to a valid hw_pagetable, without doing | 958 | * If a vfio device or a pasid of this device is currently attached to a valid |
| 946 | * a VFIO_DEVICE_DETACH_IOMMUFD_PT, a second VFIO_DEVICE_ATTACH_IOMMUFD_PT ioctl | 959 | * hw_pagetable (hwpt), without doing a VFIO_DEVICE_DETACH_IOMMUFD_PT, a second |
| 947 | * passing in another hw_pagetable (hwpt) id is allowed. This action, also known | 960 | * VFIO_DEVICE_ATTACH_IOMMUFD_PT ioctl passing in another hwpt id is allowed. |
| 948 | * as a hw_pagetable replacement, will replace the device's currently attached | 961 | * This action, also known as a hw_pagetable replacement, will replace the |
| 949 | * hw_pagetable with a new hw_pagetable corresponding to the given pt_id. | 962 | * currently attached hwpt of the device or the pasid of this device with a new |
| 963 | * hwpt corresponding to the given pt_id. | ||
| 950 | * | 964 | * |
| 951 | * Return: 0 on success, -errno on failure. | 965 | * Return: 0 on success, -errno on failure. |
| 952 | */ | 966 | */ |
| 953 | struct vfio_device_attach_iommufd_pt { | 967 | struct vfio_device_attach_iommufd_pt { |
| 954 | 	__u32	argsz; | 968 | 	__u32	argsz; |
| 955 | 	__u32	flags; | 969 | 	__u32	flags; |
| 970 | #define VFIO_DEVICE_ATTACH_PASID	(1 << 0) | ||
| 956 | 	__u32	pt_id; | 971 | 	__u32	pt_id; |
| 972 | 	__u32	pasid; | ||
| 957 | }; | 973 | }; |
| 958 | 974 | ||
| 959 | #define VFIO_DEVICE_ATTACH_IOMMUFD_PT		_IO(VFIO_TYPE, VFIO_BASE + 19) | 975 | #define VFIO_DEVICE_ATTACH_IOMMUFD_PT		_IO(VFIO_TYPE, VFIO_BASE + 19) |
| ... | @@ -962,17 +978,21 @@ struct vfio_device_attach_iommufd_pt { | ... | @@ -962,17 +978,21 @@ struct vfio_device_attach_iommufd_pt { |
| 962 | * VFIO_DEVICE_DETACH_IOMMUFD_PT - _IOW(VFIO_TYPE, VFIO_BASE + 20, | 978 | * VFIO_DEVICE_DETACH_IOMMUFD_PT - _IOW(VFIO_TYPE, VFIO_BASE + 20, |
| 963 | *					struct vfio_device_detach_iommufd_pt) | 979 | *					struct vfio_device_detach_iommufd_pt) |
| 964 | * @argsz:	User filled size of this data. | 980 | * @argsz:	User filled size of this data. |
| 965 | * @flags:	Must be 0. | 981 | * @flags:	Flags for detach. |
| 982 | * @pasid:	The pasid to be detached, only meaningful when | ||
| 983 | *		VFIO_DEVICE_DETACH_PASID is set in @flags | ||
| 966 | * | 984 | * |
| 967 | * Remove the association of the device and its current associated address | 985 | * Remove the association of the device or a pasid of the device and its current |
| 968 | * space. After it, the device should be in a blocking DMA state. This is only | 986 | * associated address space. After it, the device or the pasid should be in a |
| 969 | * allowed on cdev fds. | 987 | * blocking DMA state. This is only allowed on cdev fds. |
| 970 | * | 988 | * |
| 971 | * Return: 0 on success, -errno on failure. | 989 | * Return: 0 on success, -errno on failure. |
| 972 | */ | 990 | */ |
| 973 | struct vfio_device_detach_iommufd_pt { | 991 | struct vfio_device_detach_iommufd_pt { |
| 974 | 	__u32	argsz; | 992 | 	__u32	argsz; |
| 975 | 	__u32	flags; | 993 | 	__u32	flags; |
| 994 | #define VFIO_DEVICE_DETACH_PASID	(1 << 0) | ||
| 995 | 	__u32	pasid; | ||
| 976 | }; | 996 | }; |
| 977 | 997 | ||
| 978 | #define VFIO_DEVICE_DETACH_IOMMUFD_PT		_IO(VFIO_TYPE, VFIO_BASE + 20) | 998 | #define VFIO_DEVICE_DETACH_IOMMUFD_PT		_IO(VFIO_TYPE, VFIO_BASE + 20) |
lib/libc/include/any-linux-any/linux/vhost.h+37-2| ... | @@ -28,10 +28,10 @@ | ... | @@ -28,10 +28,10 @@ |
| 28 | 28 | ||
| 29 | /* Set current process as the (exclusive) owner of this file descriptor. This | 29 | /* Set current process as the (exclusive) owner of this file descriptor. This |
| 30 | * must be called before any other vhost command. Further calls to | 30 | * must be called before any other vhost command. Further calls to |
| 31 | * VHOST_OWNER_SET fail until VHOST_OWNER_RESET is called. */ | 31 | * VHOST_SET_OWNER fail until VHOST_RESET_OWNER is called. */ |
| 32 | #define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01) | 32 | #define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01) |
| 33 | /* Give up ownership, and reset the device to default values. | 33 | /* Give up ownership, and reset the device to default values. |
| 34 | * Allows subsequent call to VHOST_OWNER_SET to succeed. */ | 34 | * Allows subsequent call to VHOST_SET_OWNER to succeed. */ |
| 35 | #define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02) | 35 | #define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02) |
| 36 | 36 | ||
| 37 | /* Set up/modify memory layout */ | 37 | /* Set up/modify memory layout */ |
| ... | @@ -235,4 +235,39 @@ | ... | @@ -235,4 +235,39 @@ |
| 235 | */ | 235 | */ |
| 236 | #define VHOST_VDPA_GET_VRING_SIZE	_IOWR(VHOST_VIRTIO, 0x82,	\ | 236 | #define VHOST_VDPA_GET_VRING_SIZE	_IOWR(VHOST_VIRTIO, 0x82,	\ |
| 237 | 					 struct vhost_vring_state) | 237 | 					 struct vhost_vring_state) |
| 238 | |||
| 239 | /* Extended features manipulation */ | ||
| 240 | #define VHOST_GET_FEATURES_ARRAY _IOR(VHOST_VIRTIO, 0x83, \ | ||
| 241 | 				 struct vhost_features_array) | ||
| 242 | #define VHOST_SET_FEATURES_ARRAY _IOW(VHOST_VIRTIO, 0x83, \ | ||
| 243 | 				 struct vhost_features_array) | ||
| 244 | |||
| 245 | /* fork_owner values for vhost */ | ||
| 246 | #define VHOST_FORK_OWNER_KTHREAD 0 | ||
| 247 | #define VHOST_FORK_OWNER_TASK 1 | ||
| 248 | |||
| 249 | /** | ||
| 250 | * VHOST_SET_FORK_FROM_OWNER - Set the fork_owner flag for the vhost device, | ||
| 251 | * This ioctl must called before VHOST_SET_OWNER. | ||
| 252 | * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y | ||
| 253 | * | ||
| 254 | * @param fork_owner: An 8-bit value that determines the vhost thread mode | ||
| 255 | * | ||
| 256 | * When fork_owner is set to VHOST_FORK_OWNER_TASK(default value): | ||
| 257 | * - Vhost will create vhost worker as tasks forked from the owner, | ||
| 258 | * inheriting all of the owner's attributes. | ||
| 259 | * | ||
| 260 | * When fork_owner is set to VHOST_FORK_OWNER_KTHREAD: | ||
| 261 | * - Vhost will create vhost workers as kernel threads. | ||
| 262 | */ | ||
| 263 | #define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x84, __u8) | ||
| 264 | |||
| 265 | /** | ||
| 266 | * VHOST_GET_FORK_OWNER - Get the current fork_owner flag for the vhost device. | ||
| 267 | * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y | ||
| 268 | * | ||
| 269 | * @return: An 8-bit value indicating the current thread mode. | ||
| 270 | */ | ||
| 271 | #define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x85, __u8) | ||
| 272 | |||
| 238 | #endif | 273 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/vhost_types.h+5| ... | @@ -110,6 +110,11 @@ struct vhost_msg_v2 { | ... | @@ -110,6 +110,11 @@ struct vhost_msg_v2 { |
| 110 | 	}; | 110 | 	}; |
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | struct vhost_features_array { | ||
| 114 | 	__u64 count; /* number of entries present in features array */ | ||
| 115 | 	__u64 features[] __counted_by(count); | ||
| 116 | }; | ||
| 117 | |||
| 113 | struct vhost_memory_region { | 118 | struct vhost_memory_region { |
| 114 | 	__u64 guest_phys_addr; | 119 | 	__u64 guest_phys_addr; |
| 115 | 	__u64 memory_size; /* bytes */ | 120 | 	__u64 memory_size; /* bytes */ |
lib/libc/include/any-linux-any/linux/videodev2.h+29-3| ... | @@ -151,10 +151,18 @@ enum v4l2_buf_type { | ... | @@ -151,10 +151,18 @@ enum v4l2_buf_type { |
| 151 | 	V4L2_BUF_TYPE_SDR_OUTPUT = 12, | 151 | 	V4L2_BUF_TYPE_SDR_OUTPUT = 12, |
| 152 | 	V4L2_BUF_TYPE_META_CAPTURE = 13, | 152 | 	V4L2_BUF_TYPE_META_CAPTURE = 13, |
| 153 | 	V4L2_BUF_TYPE_META_OUTPUT	 = 14, | 153 | 	V4L2_BUF_TYPE_META_OUTPUT	 = 14, |
| 154 | 	/* | ||
| 155 | 	 * Note: V4L2_TYPE_IS_VALID and V4L2_TYPE_IS_OUTPUT must | ||
| 156 | 	 * be updated if a new type is added. | ||
| 157 | 	 */ | ||
| 154 | 	/* Deprecated, do not use */ | 158 | 	/* Deprecated, do not use */ |
| 155 | 	V4L2_BUF_TYPE_PRIVATE = 0x80, | 159 | 	V4L2_BUF_TYPE_PRIVATE = 0x80, |
| 156 | }; | 160 | }; |
| 157 | 161 | ||
| 162 | #define V4L2_TYPE_IS_VALID(type)		 \ | ||
| 163 | 	((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE &&\ | ||
| 164 | 	 (type) <= V4L2_BUF_TYPE_META_OUTPUT) | ||
| 165 | |||
| 158 | #define V4L2_TYPE_IS_MULTIPLANAR(type)			\ | 166 | #define V4L2_TYPE_IS_MULTIPLANAR(type)			\ |
| 159 | 	((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE	\ | 167 | 	((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE	\ |
| 160 | 	 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) | 168 | 	 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) |
| ... | @@ -162,14 +170,14 @@ enum v4l2_buf_type { | ... | @@ -162,14 +170,14 @@ enum v4l2_buf_type { |
| 162 | #define V4L2_TYPE_IS_OUTPUT(type)				\ | 170 | #define V4L2_TYPE_IS_OUTPUT(type)				\ |
| 163 | 	((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT			\ | 171 | 	((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT			\ |
| 164 | 	 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE		\ | 172 | 	 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE		\ |
| 165 | 	 || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY		\ | ||
| 166 | 	 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY	\ | 173 | 	 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY	\ |
| 167 | 	 || (type) == V4L2_BUF_TYPE_VBI_OUTPUT			\ | 174 | 	 || (type) == V4L2_BUF_TYPE_VBI_OUTPUT			\ |
| 168 | 	 || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT		\ | 175 | 	 || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT		\ |
| 169 | 	 || (type) == V4L2_BUF_TYPE_SDR_OUTPUT			\ | 176 | 	 || (type) == V4L2_BUF_TYPE_SDR_OUTPUT			\ |
| 170 | 	 || (type) == V4L2_BUF_TYPE_META_OUTPUT) | 177 | 	 || (type) == V4L2_BUF_TYPE_META_OUTPUT) |
| 171 | 178 | ||
| 172 | #define V4L2_TYPE_IS_CAPTURE(type) (!V4L2_TYPE_IS_OUTPUT(type)) | 179 | #define V4L2_TYPE_IS_CAPTURE(type)	\ |
| 180 | 	(V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type)) | ||
| 173 | 181 | ||
| 174 | enum v4l2_tuner_type { | 182 | enum v4l2_tuner_type { |
| 175 | 	V4L2_TUNER_RADIO	 = 1, | 183 | 	V4L2_TUNER_RADIO	 = 1, |
| ... | @@ -616,8 +624,10 @@ struct v4l2_pix_format { | ... | @@ -616,8 +624,10 @@ struct v4l2_pix_format { |
| 616 | /* two planes -- one Y, one Cr + Cb interleaved */ | 624 | /* two planes -- one Y, one Cr + Cb interleaved */ |
| 617 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ | 625 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
| 618 | #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ | 626 | #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ |
| 627 | #define V4L2_PIX_FMT_NV15 v4l2_fourcc('N', 'V', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit packed */ | ||
| 619 | #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ | 628 | #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ |
| 620 | #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ | 629 | #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ |
| 630 | #define V4L2_PIX_FMT_NV20 v4l2_fourcc('N', 'V', '2', '0') /* 20 Y/CbCr 4:2:2 10-bit packed */ | ||
| 621 | #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ | 631 | #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ |
| 622 | #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ | 632 | #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ |
| 623 | #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per component */ | 633 | #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per component */ |
| ... | @@ -689,7 +699,7 @@ struct v4l2_pix_format { | ... | @@ -689,7 +699,7 @@ struct v4l2_pix_format { |
| 689 | #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ | 699 | #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ |
| 690 | #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ | 700 | #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ |
| 691 | #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ | 701 | #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ |
| 692 | 	/* 12bit raw bayer packed, 6 bytes for every 4 pixels */ | 702 | 	/* 12bit raw bayer packed, 3 bytes for every 2 pixels */ |
| 693 | #define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') | 703 | #define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') |
| 694 | #define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') | 704 | #define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') |
| 695 | #define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') | 705 | #define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') |
| ... | @@ -803,6 +813,12 @@ struct v4l2_pix_format { | ... | @@ -803,6 +813,12 @@ struct v4l2_pix_format { |
| 803 | #define V4L2_PIX_FMT_PISP_COMP2_BGGR	v4l2_fourcc('P', 'C', '2', 'B') /* PiSP 8-bit mode 2 compressed BGGR bayer */ | 813 | #define V4L2_PIX_FMT_PISP_COMP2_BGGR	v4l2_fourcc('P', 'C', '2', 'B') /* PiSP 8-bit mode 2 compressed BGGR bayer */ |
| 804 | #define V4L2_PIX_FMT_PISP_COMP2_MONO	v4l2_fourcc('P', 'C', '2', 'M') /* PiSP 8-bit mode 2 compressed monochrome */ | 814 | #define V4L2_PIX_FMT_PISP_COMP2_MONO	v4l2_fourcc('P', 'C', '2', 'M') /* PiSP 8-bit mode 2 compressed monochrome */ |
| 805 | 815 | ||
| 816 | /* Renesas RZ/V2H CRU packed formats. 64-bit units with contiguous pixels */ | ||
| 817 | #define V4L2_PIX_FMT_RAW_CRU10	v4l2_fourcc('C', 'R', '1', '0') | ||
| 818 | #define V4L2_PIX_FMT_RAW_CRU12	v4l2_fourcc('C', 'R', '1', '2') | ||
| 819 | #define V4L2_PIX_FMT_RAW_CRU14	v4l2_fourcc('C', 'R', '1', '4') | ||
| 820 | #define V4L2_PIX_FMT_RAW_CRU20	v4l2_fourcc('C', 'R', '2', '0') | ||
| 821 | |||
| 806 | /* SDR formats - used only for Software Defined Radio devices */ | 822 | /* SDR formats - used only for Software Defined Radio devices */ |
| 807 | #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ | 823 | #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ |
| 808 | #define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ | 824 | #define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ |
| ... | @@ -824,6 +840,7 @@ struct v4l2_pix_format { | ... | @@ -824,6 +840,7 @@ struct v4l2_pix_format { |
| 824 | #define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ | 840 | #define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ |
| 825 | #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ | 841 | #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ |
| 826 | #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ | 842 | #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ |
| 843 | #define V4L2_META_FMT_UVC_MSXU_1_5 v4l2_fourcc('U', 'V', 'C', 'M') /* UVC MSXU metadata */ | ||
| 827 | #define V4L2_META_FMT_VIVID	 v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */ | 844 | #define V4L2_META_FMT_VIVID	 v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */ |
| 828 | 845 | ||
| 829 | /* Vendor specific - used for RK_ISP1 camera sub-system */ | 846 | /* Vendor specific - used for RK_ISP1 camera sub-system */ |
| ... | @@ -831,6 +848,10 @@ struct v4l2_pix_format { | ... | @@ -831,6 +848,10 @@ struct v4l2_pix_format { |
| 831 | #define V4L2_META_FMT_RK_ISP1_STAT_3A	v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ | 848 | #define V4L2_META_FMT_RK_ISP1_STAT_3A	v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ |
| 832 | #define V4L2_META_FMT_RK_ISP1_EXT_PARAMS	v4l2_fourcc('R', 'K', '1', 'E') /* Rockchip ISP1 3a Extensible Parameters */ | 849 | #define V4L2_META_FMT_RK_ISP1_EXT_PARAMS	v4l2_fourcc('R', 'K', '1', 'E') /* Rockchip ISP1 3a Extensible Parameters */ |
| 833 | 850 | ||
| 851 | /* Vendor specific - used for C3_ISP */ | ||
| 852 | #define V4L2_META_FMT_C3ISP_PARAMS	v4l2_fourcc('C', '3', 'P', 'M') /* Amlogic C3 ISP Parameters */ | ||
| 853 | #define V4L2_META_FMT_C3ISP_STATS	v4l2_fourcc('C', '3', 'S', 'T') /* Amlogic C3 ISP Statistics */ | ||
| 854 | |||
| 834 | /* Vendor specific - used for RaspberryPi PiSP */ | 855 | /* Vendor specific - used for RaspberryPi PiSP */ |
| 835 | #define V4L2_META_FMT_RPI_BE_CFG	v4l2_fourcc('R', 'P', 'B', 'C') /* PiSP BE configuration */ | 856 | #define V4L2_META_FMT_RPI_BE_CFG	v4l2_fourcc('R', 'P', 'B', 'C') /* PiSP BE configuration */ |
| 836 | #define V4L2_META_FMT_RPI_FE_CFG	v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */ | 857 | #define V4L2_META_FMT_RPI_FE_CFG	v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */ |
| ... | @@ -1794,6 +1815,7 @@ struct v4l2_ext_control { | ... | @@ -1794,6 +1815,7 @@ struct v4l2_ext_control { |
| 1794 | 		__s32 *p_s32; | 1815 | 		__s32 *p_s32; |
| 1795 | 		__s64 *p_s64; | 1816 | 		__s64 *p_s64; |
| 1796 | 		struct v4l2_area *p_area; | 1817 | 		struct v4l2_area *p_area; |
| 1818 | 		struct v4l2_rect *p_rect; | ||
| 1797 | 		struct v4l2_ctrl_h264_sps *p_h264_sps; | 1819 | 		struct v4l2_ctrl_h264_sps *p_h264_sps; |
| 1798 | 		struct v4l2_ctrl_h264_pps *p_h264_pps; | 1820 | 		struct v4l2_ctrl_h264_pps *p_h264_pps; |
| 1799 | 		struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix; | 1821 | 		struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix; |
| ... | @@ -1842,6 +1864,8 @@ struct v4l2_ext_controls { | ... | @@ -1842,6 +1864,8 @@ struct v4l2_ext_controls { |
| 1842 | #define V4L2_CTRL_WHICH_CUR_VAL 0 | 1864 | #define V4L2_CTRL_WHICH_CUR_VAL 0 |
| 1843 | #define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 | 1865 | #define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 |
| 1844 | #define V4L2_CTRL_WHICH_REQUEST_VAL 0x0f010000 | 1866 | #define V4L2_CTRL_WHICH_REQUEST_VAL 0x0f010000 |
| 1867 | #define V4L2_CTRL_WHICH_MIN_VAL 0x0f020000 | ||
| 1868 | #define V4L2_CTRL_WHICH_MAX_VAL 0x0f030000 | ||
| 1845 | 1869 | ||
| 1846 | enum v4l2_ctrl_type { | 1870 | enum v4l2_ctrl_type { |
| 1847 | 	V4L2_CTRL_TYPE_INTEGER	 = 1, | 1871 | 	V4L2_CTRL_TYPE_INTEGER	 = 1, |
| ... | @@ -1860,6 +1884,7 @@ enum v4l2_ctrl_type { | ... | @@ -1860,6 +1884,7 @@ enum v4l2_ctrl_type { |
| 1860 | 	V4L2_CTRL_TYPE_U16	 = 0x0101, | 1884 | 	V4L2_CTRL_TYPE_U16	 = 0x0101, |
| 1861 | 	V4L2_CTRL_TYPE_U32	 = 0x0102, | 1885 | 	V4L2_CTRL_TYPE_U32	 = 0x0102, |
| 1862 | 	V4L2_CTRL_TYPE_AREA = 0x0106, | 1886 | 	V4L2_CTRL_TYPE_AREA = 0x0106, |
| 1887 | 	V4L2_CTRL_TYPE_RECT	 = 0x0107, | ||
| 1863 | 1888 | ||
| 1864 | 	V4L2_CTRL_TYPE_HDR10_CLL_INFO		= 0x0110, | 1889 | 	V4L2_CTRL_TYPE_HDR10_CLL_INFO		= 0x0110, |
| 1865 | 	V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY	= 0x0111, | 1890 | 	V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY	= 0x0111, |
| ... | @@ -1948,6 +1973,7 @@ struct v4l2_querymenu { | ... | @@ -1948,6 +1973,7 @@ struct v4l2_querymenu { |
| 1948 | #define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE	0x0200 | 1973 | #define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE	0x0200 |
| 1949 | #define V4L2_CTRL_FLAG_MODIFY_LAYOUT	0x0400 | 1974 | #define V4L2_CTRL_FLAG_MODIFY_LAYOUT	0x0400 |
| 1950 | #define V4L2_CTRL_FLAG_DYNAMIC_ARRAY	0x0800 | 1975 | #define V4L2_CTRL_FLAG_DYNAMIC_ARRAY	0x0800 |
| 1976 | #define V4L2_CTRL_FLAG_HAS_WHICH_MIN_MAX 0x1000 | ||
| 1951 | 1977 | ||
| 1952 | /* Query flags, to be ORed with the control ID */ | 1978 | /* Query flags, to be ORed with the control ID */ |
| 1953 | #define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000 | 1979 | #define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000 |
lib/libc/include/any-linux-any/linux/virtio_gpu.h+2-1| ... | @@ -309,8 +309,9 @@ struct virtio_gpu_cmd_submit { | ... | @@ -309,8 +309,9 @@ struct virtio_gpu_cmd_submit { |
| 309 | 309 | ||
| 310 | #define VIRTIO_GPU_CAPSET_VIRGL 1 | 310 | #define VIRTIO_GPU_CAPSET_VIRGL 1 |
| 311 | #define VIRTIO_GPU_CAPSET_VIRGL2 2 | 311 | #define VIRTIO_GPU_CAPSET_VIRGL2 2 |
| 312 | /* 3 is reserved for gfxstream */ | 312 | #define VIRTIO_GPU_CAPSET_GFXSTREAM_VULKAN 3 |
| 313 | #define VIRTIO_GPU_CAPSET_VENUS 4 | 313 | #define VIRTIO_GPU_CAPSET_VENUS 4 |
| 314 | #define VIRTIO_GPU_CAPSET_CROSS_DOMAIN 5 | ||
| 314 | #define VIRTIO_GPU_CAPSET_DRM 6 | 315 | #define VIRTIO_GPU_CAPSET_DRM 6 |
| 315 | 316 | ||
| 316 | /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ | 317 | /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ |
lib/libc/include/any-linux-any/linux/virtio_net.h+46| ... | @@ -70,6 +70,28 @@ | ... | @@ -70,6 +70,28 @@ |
| 70 | 					 * with the same MAC. | 70 | 					 * with the same MAC. |
| 71 | 					 */ | 71 | 					 */ |
| 72 | #define VIRTIO_NET_F_SPEED_DUPLEX 63	/* Device set linkspeed and duplex */ | 72 | #define VIRTIO_NET_F_SPEED_DUPLEX 63	/* Device set linkspeed and duplex */ |
| 73 | #define VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO 65 /* Driver can receive | ||
| 74 | 					 * GSO-over-UDP-tunnel packets | ||
| 75 | 					 */ | ||
| 76 | #define VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO_CSUM 66 /* Driver handles | ||
| 77 | 						 * GSO-over-UDP-tunnel | ||
| 78 | 						 * packets with partial csum | ||
| 79 | 						 * for the outer header | ||
| 80 | 						 */ | ||
| 81 | #define VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO 67 /* Device can receive | ||
| 82 | 					 * GSO-over-UDP-tunnel packets | ||
| 83 | 					 */ | ||
| 84 | #define VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO_CSUM 68 /* Device handles | ||
| 85 | 						 * GSO-over-UDP-tunnel | ||
| 86 | 						 * packets with partial csum | ||
| 87 | 						 * for the outer header | ||
| 88 | 						 */ | ||
| 89 | |||
| 90 | /* Offloads bits corresponding to VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO{,_CSUM} | ||
| 91 | * features | ||
| 92 | */ | ||
| 93 | #define VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO_MAPPED	46 | ||
| 94 | #define VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO_CSUM_MAPPED	47 | ||
| 73 | 95 | ||
| 74 | #ifndef VIRTIO_NET_NO_LEGACY | 96 | #ifndef VIRTIO_NET_NO_LEGACY |
| 75 | #define VIRTIO_NET_F_GSO	6	/* Host handles pkts w/ any GSO type */ | 97 | #define VIRTIO_NET_F_GSO	6	/* Host handles pkts w/ any GSO type */ |
| ... | @@ -131,12 +153,17 @@ struct virtio_net_hdr_v1 { | ... | @@ -131,12 +153,17 @@ struct virtio_net_hdr_v1 { |
| 131 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM	1	/* Use csum_start, csum_offset */ | 153 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM	1	/* Use csum_start, csum_offset */ |
| 132 | #define VIRTIO_NET_HDR_F_DATA_VALID	2	/* Csum is valid */ | 154 | #define VIRTIO_NET_HDR_F_DATA_VALID	2	/* Csum is valid */ |
| 133 | #define VIRTIO_NET_HDR_F_RSC_INFO	4	/* rsc info in csum_ fields */ | 155 | #define VIRTIO_NET_HDR_F_RSC_INFO	4	/* rsc info in csum_ fields */ |
| 156 | #define VIRTIO_NET_HDR_F_UDP_TUNNEL_CSUM 8	/* UDP tunnel csum offload */ | ||
| 134 | 	__u8 flags; | 157 | 	__u8 flags; |
| 135 | #define VIRTIO_NET_HDR_GSO_NONE		0	/* Not a GSO frame */ | 158 | #define VIRTIO_NET_HDR_GSO_NONE		0	/* Not a GSO frame */ |
| 136 | #define VIRTIO_NET_HDR_GSO_TCPV4	1	/* GSO frame, IPv4 TCP (TSO) */ | 159 | #define VIRTIO_NET_HDR_GSO_TCPV4	1	/* GSO frame, IPv4 TCP (TSO) */ |
| 137 | #define VIRTIO_NET_HDR_GSO_UDP		3	/* GSO frame, IPv4 UDP (UFO) */ | 160 | #define VIRTIO_NET_HDR_GSO_UDP		3	/* GSO frame, IPv4 UDP (UFO) */ |
| 138 | #define VIRTIO_NET_HDR_GSO_TCPV6	4	/* GSO frame, IPv6 TCP */ | 161 | #define VIRTIO_NET_HDR_GSO_TCPV6	4	/* GSO frame, IPv6 TCP */ |
| 139 | #define VIRTIO_NET_HDR_GSO_UDP_L4	5	/* GSO frame, IPv4& IPv6 UDP (USO) */ | 162 | #define VIRTIO_NET_HDR_GSO_UDP_L4	5	/* GSO frame, IPv4& IPv6 UDP (USO) */ |
| 163 | #define VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 0x20 /* UDPv4 tunnel present */ | ||
| 164 | #define VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV6 0x40 /* UDPv6 tunnel present */ | ||
| 165 | #define VIRTIO_NET_HDR_GSO_UDP_TUNNEL (VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 | \ | ||
| 166 | 				 VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV6) | ||
| 140 | #define VIRTIO_NET_HDR_GSO_ECN		0x80	/* TCP has ECN set */ | 167 | #define VIRTIO_NET_HDR_GSO_ECN		0x80	/* TCP has ECN set */ |
| 141 | 	__u8 gso_type; | 168 | 	__u8 gso_type; |
| 142 | 	__virtio16 hdr_len;	/* Ethernet + IP + tcp/udp hdrs */ | 169 | 	__virtio16 hdr_len;	/* Ethernet + IP + tcp/udp hdrs */ |
| ... | @@ -181,6 +208,12 @@ struct virtio_net_hdr_v1_hash { | ... | @@ -181,6 +208,12 @@ struct virtio_net_hdr_v1_hash { |
| 181 | 	__le16 padding; | 208 | 	__le16 padding; |
| 182 | }; | 209 | }; |
| 183 | 210 | ||
| 211 | struct virtio_net_hdr_v1_hash_tunnel { | ||
| 212 | 	struct virtio_net_hdr_v1_hash hash_hdr; | ||
| 213 | 	__le16 outer_th_offset; | ||
| 214 | 	__le16 inner_nh_offset; | ||
| 215 | }; | ||
| 216 | |||
| 184 | #ifndef VIRTIO_NET_NO_LEGACY | 217 | #ifndef VIRTIO_NET_NO_LEGACY |
| 185 | /* This header comes first in the scatter-gather list. | 218 | /* This header comes first in the scatter-gather list. |
| 186 | * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated, it must | 219 | * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated, it must |
| ... | @@ -327,6 +360,19 @@ struct virtio_net_rss_config { | ... | @@ -327,6 +360,19 @@ struct virtio_net_rss_config { |
| 327 | 	__u8 hash_key_data[/* hash_key_length */]; | 360 | 	__u8 hash_key_data[/* hash_key_length */]; |
| 328 | }; | 361 | }; |
| 329 | 362 | ||
| 363 | struct virtio_net_rss_config_hdr { | ||
| 364 | 	__le32 hash_types; | ||
| 365 | 	__le16 indirection_table_mask; | ||
| 366 | 	__le16 unclassified_queue; | ||
| 367 | 	__le16 indirection_table[/* 1 + indirection_table_mask */]; | ||
| 368 | }; | ||
| 369 | |||
| 370 | struct virtio_net_rss_config_trailer { | ||
| 371 | 	__le16 max_tx_vq; | ||
| 372 | 	__u8 hash_key_length; | ||
| 373 | 	__u8 hash_key_data[/* hash_key_length */]; | ||
| 374 | }; | ||
| 375 | |||
| 330 | #define VIRTIO_NET_CTRL_MQ_RSS_CONFIG 1 | 376 | #define VIRTIO_NET_CTRL_MQ_RSS_CONFIG 1 |
| 331 | 377 | ||
| 332 | /* | 378 | /* |
lib/libc/include/any-linux-any/linux/virtio_pci.h+15| ... | @@ -116,6 +116,8 @@ | ... | @@ -116,6 +116,8 @@ |
| 116 | #define VIRTIO_PCI_CAP_PCI_CFG		5 | 116 | #define VIRTIO_PCI_CAP_PCI_CFG		5 |
| 117 | /* Additional shared memory capability */ | 117 | /* Additional shared memory capability */ |
| 118 | #define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8 | 118 | #define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8 |
| 119 | /* PCI vendor data configuration */ | ||
| 120 | #define VIRTIO_PCI_CAP_VENDOR_CFG	9 | ||
| 119 | 121 | ||
| 120 | /* This is the PCI capability header: */ | 122 | /* This is the PCI capability header: */ |
| 121 | struct virtio_pci_cap { | 123 | struct virtio_pci_cap { |
| ... | @@ -130,6 +132,18 @@ struct virtio_pci_cap { | ... | @@ -130,6 +132,18 @@ struct virtio_pci_cap { |
| 130 | 	__le32 length;		/* Length of the structure, in bytes. */ | 132 | 	__le32 length;		/* Length of the structure, in bytes. */ |
| 131 | }; | 133 | }; |
| 132 | 134 | ||
| 135 | /* This is the PCI vendor data capability header: */ | ||
| 136 | struct virtio_pci_vndr_data { | ||
| 137 | 	__u8 cap_vndr;		/* Generic PCI field: PCI_CAP_ID_VNDR */ | ||
| 138 | 	__u8 cap_next;		/* Generic PCI field: next ptr. */ | ||
| 139 | 	__u8 cap_len;		/* Generic PCI field: capability length */ | ||
| 140 | 	__u8 cfg_type;		/* Identifies the structure. */ | ||
| 141 | 	__u16 vendor_id;	/* Identifies the vendor-specific format. */ | ||
| 142 | 	/* For Vendor Definition */ | ||
| 143 | 	/* Pads structure to a multiple of 4 bytes */ | ||
| 144 | 	/* Reads must not have side effects */ | ||
| 145 | }; | ||
| 146 | |||
| 133 | struct virtio_pci_cap64 { | 147 | struct virtio_pci_cap64 { |
| 134 | 	struct virtio_pci_cap cap; | 148 | 	struct virtio_pci_cap cap; |
| 135 | 	__le32 offset_hi; /* Most sig 32 bits of offset */ | 149 | 	__le32 offset_hi; /* Most sig 32 bits of offset */ |
| ... | @@ -232,6 +246,7 @@ struct virtio_pci_cfg_cap { | ... | @@ -232,6 +246,7 @@ struct virtio_pci_cfg_cap { |
| 232 | #define VIRTIO_ADMIN_CMD_LIST_USE	0x1 | 246 | #define VIRTIO_ADMIN_CMD_LIST_USE	0x1 |
| 233 | 247 | ||
| 234 | /* Admin command group type. */ | 248 | /* Admin command group type. */ |
| 249 | #define VIRTIO_ADMIN_GROUP_TYPE_SELF	0x0 | ||
| 235 | #define VIRTIO_ADMIN_GROUP_TYPE_SRIOV	0x1 | 250 | #define VIRTIO_ADMIN_GROUP_TYPE_SRIOV	0x1 |
| 236 | 251 | ||
| 237 | /* Transitional device admin command. */ | 252 | /* Transitional device admin command. */ |
lib/libc/include/any-linux-any/linux/virtio_rtc.h created+237| ... | @@ -0,0 +1,237 @@ | ||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2022-2024 OpenSynergy GmbH | ||
| 4 | * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef _LINUX_VIRTIO_RTC_H | ||
| 8 | #define _LINUX_VIRTIO_RTC_H | ||
| 9 | |||
| 10 | #include <linux/types.h> | ||
| 11 | |||
| 12 | /* alarm feature */ | ||
| 13 | #define VIRTIO_RTC_F_ALARM	0 | ||
| 14 | |||
| 15 | /* read request message types */ | ||
| 16 | |||
| 17 | #define VIRTIO_RTC_REQ_READ			0x0001 | ||
| 18 | #define VIRTIO_RTC_REQ_READ_CROSS		0x0002 | ||
| 19 | |||
| 20 | /* control request message types */ | ||
| 21 | |||
| 22 | #define VIRTIO_RTC_REQ_CFG			0x1000 | ||
| 23 | #define VIRTIO_RTC_REQ_CLOCK_CAP		0x1001 | ||
| 24 | #define VIRTIO_RTC_REQ_CROSS_CAP		0x1002 | ||
| 25 | #define VIRTIO_RTC_REQ_READ_ALARM		0x1003 | ||
| 26 | #define VIRTIO_RTC_REQ_SET_ALARM		0x1004 | ||
| 27 | #define VIRTIO_RTC_REQ_SET_ALARM_ENABLED	0x1005 | ||
| 28 | |||
| 29 | /* alarmq message types */ | ||
| 30 | |||
| 31 | #define VIRTIO_RTC_NOTIF_ALARM			0x2000 | ||
| 32 | |||
| 33 | /* Message headers */ | ||
| 34 | |||
| 35 | /** common request header */ | ||
| 36 | struct virtio_rtc_req_head { | ||
| 37 | 	__le16 msg_type; | ||
| 38 | 	__u8 reserved[6]; | ||
| 39 | }; | ||
| 40 | |||
| 41 | /** common response header */ | ||
| 42 | struct virtio_rtc_resp_head { | ||
| 43 | #define VIRTIO_RTC_S_OK			0 | ||
| 44 | #define VIRTIO_RTC_S_EOPNOTSUPP		2 | ||
| 45 | #define VIRTIO_RTC_S_ENODEV		3 | ||
| 46 | #define VIRTIO_RTC_S_EINVAL		4 | ||
| 47 | #define VIRTIO_RTC_S_EIO		5 | ||
| 48 | 	__u8 status; | ||
| 49 | 	__u8 reserved[7]; | ||
| 50 | }; | ||
| 51 | |||
| 52 | /** common notification header */ | ||
| 53 | struct virtio_rtc_notif_head { | ||
| 54 | 	__le16 msg_type; | ||
| 55 | 	__u8 reserved[6]; | ||
| 56 | }; | ||
| 57 | |||
| 58 | /* read requests */ | ||
| 59 | |||
| 60 | /* VIRTIO_RTC_REQ_READ message */ | ||
| 61 | |||
| 62 | struct virtio_rtc_req_read { | ||
| 63 | 	struct virtio_rtc_req_head head; | ||
| 64 | 	__le16 clock_id; | ||
| 65 | 	__u8 reserved[6]; | ||
| 66 | }; | ||
| 67 | |||
| 68 | struct virtio_rtc_resp_read { | ||
| 69 | 	struct virtio_rtc_resp_head head; | ||
| 70 | 	__le64 clock_reading; | ||
| 71 | }; | ||
| 72 | |||
| 73 | /* VIRTIO_RTC_REQ_READ_CROSS message */ | ||
| 74 | |||
| 75 | struct virtio_rtc_req_read_cross { | ||
| 76 | 	struct virtio_rtc_req_head head; | ||
| 77 | 	__le16 clock_id; | ||
| 78 | /* Arm Generic Timer Counter-timer Virtual Count Register (CNTVCT_EL0) */ | ||
| 79 | #define VIRTIO_RTC_COUNTER_ARM_VCT	0 | ||
| 80 | /* x86 Time-Stamp Counter */ | ||
| 81 | #define VIRTIO_RTC_COUNTER_X86_TSC	1 | ||
| 82 | /* Invalid */ | ||
| 83 | #define VIRTIO_RTC_COUNTER_INVALID	0xFF | ||
| 84 | 	__u8 hw_counter; | ||
| 85 | 	__u8 reserved[5]; | ||
| 86 | }; | ||
| 87 | |||
| 88 | struct virtio_rtc_resp_read_cross { | ||
| 89 | 	struct virtio_rtc_resp_head head; | ||
| 90 | 	__le64 clock_reading; | ||
| 91 | 	__le64 counter_cycles; | ||
| 92 | }; | ||
| 93 | |||
| 94 | /* control requests */ | ||
| 95 | |||
| 96 | /* VIRTIO_RTC_REQ_CFG message */ | ||
| 97 | |||
| 98 | struct virtio_rtc_req_cfg { | ||
| 99 | 	struct virtio_rtc_req_head head; | ||
| 100 | 	/* no request params */ | ||
| 101 | }; | ||
| 102 | |||
| 103 | struct virtio_rtc_resp_cfg { | ||
| 104 | 	struct virtio_rtc_resp_head head; | ||
| 105 | 	/** # of clocks -> clock ids < num_clocks are valid */ | ||
| 106 | 	__le16 num_clocks; | ||
| 107 | 	__u8 reserved[6]; | ||
| 108 | }; | ||
| 109 | |||
| 110 | /* VIRTIO_RTC_REQ_CLOCK_CAP message */ | ||
| 111 | |||
| 112 | struct virtio_rtc_req_clock_cap { | ||
| 113 | 	struct virtio_rtc_req_head head; | ||
| 114 | 	__le16 clock_id; | ||
| 115 | 	__u8 reserved[6]; | ||
| 116 | }; | ||
| 117 | |||
| 118 | struct virtio_rtc_resp_clock_cap { | ||
| 119 | 	struct virtio_rtc_resp_head head; | ||
| 120 | #define VIRTIO_RTC_CLOCK_UTC			0 | ||
| 121 | #define VIRTIO_RTC_CLOCK_TAI			1 | ||
| 122 | #define VIRTIO_RTC_CLOCK_MONOTONIC		2 | ||
| 123 | #define VIRTIO_RTC_CLOCK_UTC_SMEARED		3 | ||
| 124 | #define VIRTIO_RTC_CLOCK_UTC_MAYBE_SMEARED	4 | ||
| 125 | 	__u8 type; | ||
| 126 | #define VIRTIO_RTC_SMEAR_UNSPECIFIED	0 | ||
| 127 | #define VIRTIO_RTC_SMEAR_NOON_LINEAR	1 | ||
| 128 | #define VIRTIO_RTC_SMEAR_UTC_SLS	2 | ||
| 129 | 	__u8 leap_second_smearing; | ||
| 130 | #define VIRTIO_RTC_FLAG_ALARM_CAP		(1 << 0) | ||
| 131 | 	__u8 flags; | ||
| 132 | 	__u8 reserved[5]; | ||
| 133 | }; | ||
| 134 | |||
| 135 | /* VIRTIO_RTC_REQ_CROSS_CAP message */ | ||
| 136 | |||
| 137 | struct virtio_rtc_req_cross_cap { | ||
| 138 | 	struct virtio_rtc_req_head head; | ||
| 139 | 	__le16 clock_id; | ||
| 140 | 	__u8 hw_counter; | ||
| 141 | 	__u8 reserved[5]; | ||
| 142 | }; | ||
| 143 | |||
| 144 | struct virtio_rtc_resp_cross_cap { | ||
| 145 | 	struct virtio_rtc_resp_head head; | ||
| 146 | #define VIRTIO_RTC_FLAG_CROSS_CAP	(1 << 0) | ||
| 147 | 	__u8 flags; | ||
| 148 | 	__u8 reserved[7]; | ||
| 149 | }; | ||
| 150 | |||
| 151 | /* VIRTIO_RTC_REQ_READ_ALARM message */ | ||
| 152 | |||
| 153 | struct virtio_rtc_req_read_alarm { | ||
| 154 | 	struct virtio_rtc_req_head head; | ||
| 155 | 	__le16 clock_id; | ||
| 156 | 	__u8 reserved[6]; | ||
| 157 | }; | ||
| 158 | |||
| 159 | struct virtio_rtc_resp_read_alarm { | ||
| 160 | 	struct virtio_rtc_resp_head head; | ||
| 161 | 	__le64 alarm_time; | ||
| 162 | #define VIRTIO_RTC_FLAG_ALARM_ENABLED	(1 << 0) | ||
| 163 | 	__u8 flags; | ||
| 164 | 	__u8 reserved[7]; | ||
| 165 | }; | ||
| 166 | |||
| 167 | /* VIRTIO_RTC_REQ_SET_ALARM message */ | ||
| 168 | |||
| 169 | struct virtio_rtc_req_set_alarm { | ||
| 170 | 	struct virtio_rtc_req_head head; | ||
| 171 | 	__le64 alarm_time; | ||
| 172 | 	__le16 clock_id; | ||
| 173 | 	/* flag VIRTIO_RTC_FLAG_ALARM_ENABLED */ | ||
| 174 | 	__u8 flags; | ||
| 175 | 	__u8 reserved[5]; | ||
| 176 | }; | ||
| 177 | |||
| 178 | struct virtio_rtc_resp_set_alarm { | ||
| 179 | 	struct virtio_rtc_resp_head head; | ||
| 180 | 	/* no response params */ | ||
| 181 | }; | ||
| 182 | |||
| 183 | /* VIRTIO_RTC_REQ_SET_ALARM_ENABLED message */ | ||
| 184 | |||
| 185 | struct virtio_rtc_req_set_alarm_enabled { | ||
| 186 | 	struct virtio_rtc_req_head head; | ||
| 187 | 	__le16 clock_id; | ||
| 188 | 	/* flag VIRTIO_RTC_ALARM_ENABLED */ | ||
| 189 | 	__u8 flags; | ||
| 190 | 	__u8 reserved[5]; | ||
| 191 | }; | ||
| 192 | |||
| 193 | struct virtio_rtc_resp_set_alarm_enabled { | ||
| 194 | 	struct virtio_rtc_resp_head head; | ||
| 195 | 	/* no response params */ | ||
| 196 | }; | ||
| 197 | |||
| 198 | /** Union of request types for requestq */ | ||
| 199 | union virtio_rtc_req_requestq { | ||
| 200 | 	struct virtio_rtc_req_read read; | ||
| 201 | 	struct virtio_rtc_req_read_cross read_cross; | ||
| 202 | 	struct virtio_rtc_req_cfg cfg; | ||
| 203 | 	struct virtio_rtc_req_clock_cap clock_cap; | ||
| 204 | 	struct virtio_rtc_req_cross_cap cross_cap; | ||
| 205 | 	struct virtio_rtc_req_read_alarm read_alarm; | ||
| 206 | 	struct virtio_rtc_req_set_alarm set_alarm; | ||
| 207 | 	struct virtio_rtc_req_set_alarm_enabled set_alarm_enabled; | ||
| 208 | }; | ||
| 209 | |||
| 210 | /** Union of response types for requestq */ | ||
| 211 | union virtio_rtc_resp_requestq { | ||
| 212 | 	struct virtio_rtc_resp_read read; | ||
| 213 | 	struct virtio_rtc_resp_read_cross read_cross; | ||
| 214 | 	struct virtio_rtc_resp_cfg cfg; | ||
| 215 | 	struct virtio_rtc_resp_clock_cap clock_cap; | ||
| 216 | 	struct virtio_rtc_resp_cross_cap cross_cap; | ||
| 217 | 	struct virtio_rtc_resp_read_alarm read_alarm; | ||
| 218 | 	struct virtio_rtc_resp_set_alarm set_alarm; | ||
| 219 | 	struct virtio_rtc_resp_set_alarm_enabled set_alarm_enabled; | ||
| 220 | }; | ||
| 221 | |||
| 222 | /* alarmq notifications */ | ||
| 223 | |||
| 224 | /* VIRTIO_RTC_NOTIF_ALARM notification */ | ||
| 225 | |||
| 226 | struct virtio_rtc_notif_alarm { | ||
| 227 | 	struct virtio_rtc_notif_head head; | ||
| 228 | 	__le16 clock_id; | ||
| 229 | 	__u8 reserved[6]; | ||
| 230 | }; | ||
| 231 | |||
| 232 | /** Union of notification types for alarmq */ | ||
| 233 | union virtio_rtc_notif_alarmq { | ||
| 234 | 	struct virtio_rtc_notif_alarm alarm; | ||
| 235 | }; | ||
| 236 | |||
| 237 | #endif /* _LINUX_VIRTIO_RTC_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/virtio_snd.h+1-1| ... | @@ -25,7 +25,7 @@ struct virtio_snd_config { | ... | @@ -25,7 +25,7 @@ struct virtio_snd_config { |
| 25 | 	__le32 streams; | 25 | 	__le32 streams; |
| 26 | 	/* # of available channel maps */ | 26 | 	/* # of available channel maps */ |
| 27 | 	__le32 chmaps; | 27 | 	__le32 chmaps; |
| 28 | 	/* # of available control elements */ | 28 | 	/* # of available control elements (if VIRTIO_SND_F_CTLS) */ |
| 29 | 	__le32 controls; | 29 | 	__le32 controls; |
| 30 | }; | 30 | }; |
| 31 | 31 |
lib/libc/include/any-linux-any/linux/vm_sockets.h+2| ... | @@ -17,6 +17,8 @@ | ... | @@ -17,6 +17,8 @@ |
| 17 | #ifndef _VM_SOCKETS_H | 17 | #ifndef _VM_SOCKETS_H |
| 18 | #define _VM_SOCKETS_H | 18 | #define _VM_SOCKETS_H |
| 19 | 19 | ||
| 20 | #include <sys/socket.h> /* for struct sockaddr and sa_family_t */ | ||
| 21 | |||
| 20 | #include <linux/socket.h> | 22 | #include <linux/socket.h> |
| 21 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 22 | 24 |
lib/libc/include/any-linux-any/linux/vt.h+33-22| ... | @@ -2,6 +2,8 @@ | ... | @@ -2,6 +2,8 @@ |
| 2 | #ifndef _LINUX_VT_H | 2 | #ifndef _LINUX_VT_H |
| 3 | #define _LINUX_VT_H | 3 | #define _LINUX_VT_H |
| 4 | 4 | ||
| 5 | #include <linux/ioctl.h> | ||
| 6 | #include <linux/types.h> | ||
| 5 | 7 | ||
| 6 | /* | 8 | /* |
| 7 | * These constants are also useful for user-level apps (e.g., VC | 9 | * These constants are also useful for user-level apps (e.g., VC |
| ... | @@ -17,11 +19,11 @@ | ... | @@ -17,11 +19,11 @@ |
| 17 | #define VT_OPENQRY	0x5600	/* find available vt */ | 19 | #define VT_OPENQRY	0x5600	/* find available vt */ |
| 18 | 20 | ||
| 19 | struct vt_mode { | 21 | struct vt_mode { |
| 20 | 	char mode;		/* vt mode */ | 22 | 	__u8 mode;		/* vt mode */ |
| 21 | 	char waitv;		/* if set, hang on writes if not active */ | 23 | 	__u8 waitv;		/* if set, hang on writes if not active */ |
| 22 | 	short relsig;		/* signal to raise on release req */ | 24 | 	__s16 relsig;		/* signal to raise on release req */ |
| 23 | 	short acqsig;		/* signal to raise on acquisition */ | 25 | 	__s16 acqsig;		/* signal to raise on acquisition */ |
| 24 | 	short frsig;		/* unused (set to 0) */ | 26 | 	__s16 frsig;		/* unused (set to 0) */ |
| 25 | }; | 27 | }; |
| 26 | #define VT_GETMODE	0x5601	/* get mode of active vt */ | 28 | #define VT_GETMODE	0x5601	/* get mode of active vt */ |
| 27 | #define VT_SETMODE	0x5602	/* set mode of active vt */ | 29 | #define VT_SETMODE	0x5602	/* set mode of active vt */ |
| ... | @@ -30,9 +32,9 @@ struct vt_mode { | ... | @@ -30,9 +32,9 @@ struct vt_mode { |
| 30 | #define		VT_ACKACQ	0x02	/* acknowledge switch */ | 32 | #define		VT_ACKACQ	0x02	/* acknowledge switch */ |
| 31 | 33 | ||
| 32 | struct vt_stat { | 34 | struct vt_stat { |
| 33 | 	unsigned short v_active;	/* active vt */ | 35 | 	__u16 v_active;	/* active vt */ |
| 34 | 	unsigned short v_signal;	/* signal to send */ | 36 | 	__u16 v_signal;	/* signal to send */ |
| 35 | 	unsigned short v_state;		/* vt bitmask */ | 37 | 	__u16 v_state;		/* vt bitmask */ |
| 36 | }; | 38 | }; |
| 37 | #define VT_GETSTATE	0x5603	/* get global vt state info */ | 39 | #define VT_GETSTATE	0x5603	/* get global vt state info */ |
| 38 | #define VT_SENDSIG	0x5604	/* signal to send to bitmask of vts */ | 40 | #define VT_SENDSIG	0x5604	/* signal to send to bitmask of vts */ |
| ... | @@ -44,19 +46,19 @@ struct vt_stat { | ... | @@ -44,19 +46,19 @@ struct vt_stat { |
| 44 | #define VT_DISALLOCATE	0x5608 /* free memory associated to vt */ | 46 | #define VT_DISALLOCATE	0x5608 /* free memory associated to vt */ |
| 45 | 47 | ||
| 46 | struct vt_sizes { | 48 | struct vt_sizes { |
| 47 | 	unsigned short v_rows;		/* number of rows */ | 49 | 	__u16 v_rows;		/* number of rows */ |
| 48 | 	unsigned short v_cols;		/* number of columns */ | 50 | 	__u16 v_cols;		/* number of columns */ |
| 49 | 	unsigned short v_scrollsize;	/* number of lines of scrollback */ | 51 | 	__u16 v_scrollsize;	/* number of lines of scrollback */ |
| 50 | }; | 52 | }; |
| 51 | #define VT_RESIZE	0x5609	/* set kernel's idea of screensize */ | 53 | #define VT_RESIZE	0x5609	/* set kernel's idea of screensize */ |
| 52 | 54 | ||
| 53 | struct vt_consize { | 55 | struct vt_consize { |
| 54 | 	unsigned short v_rows;	/* number of rows */ | 56 | 	__u16 v_rows;	/* number of rows */ |
| 55 | 	unsigned short v_cols;	/* number of columns */ | 57 | 	__u16 v_cols;	/* number of columns */ |
| 56 | 	unsigned short v_vlin;	/* number of pixel rows on screen */ | 58 | 	__u16 v_vlin;	/* number of pixel rows on screen */ |
| 57 | 	unsigned short v_clin;	/* number of pixel rows per character */ | 59 | 	__u16 v_clin;	/* number of pixel rows per character */ |
| 58 | 	unsigned short v_vcol;	/* number of pixel columns on screen */ | 60 | 	__u16 v_vcol;	/* number of pixel columns on screen */ |
| 59 | 	unsigned short v_ccol;	/* number of pixel columns per character */ | 61 | 	__u16 v_ccol;	/* number of pixel columns per character */ |
| 60 | }; | 62 | }; |
| 61 | #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ | 63 | #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ |
| 62 | #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ | 64 | #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ |
| ... | @@ -64,24 +66,33 @@ struct vt_consize { | ... | @@ -64,24 +66,33 @@ struct vt_consize { |
| 64 | #define VT_GETHIFONTMASK 0x560D /* return hi font mask */ | 66 | #define VT_GETHIFONTMASK 0x560D /* return hi font mask */ |
| 65 | 67 | ||
| 66 | struct vt_event { | 68 | struct vt_event { |
| 67 | 	unsigned int event; | 69 | 	__u32 event; |
| 68 | #define VT_EVENT_SWITCH		0x0001	/* Console switch */ | 70 | #define VT_EVENT_SWITCH		0x0001	/* Console switch */ |
| 69 | #define VT_EVENT_BLANK		0x0002	/* Screen blank */ | 71 | #define VT_EVENT_BLANK		0x0002	/* Screen blank */ |
| 70 | #define VT_EVENT_UNBLANK	0x0004	/* Screen unblank */ | 72 | #define VT_EVENT_UNBLANK	0x0004	/* Screen unblank */ |
| 71 | #define VT_EVENT_RESIZE		0x0008	/* Resize display */ | 73 | #define VT_EVENT_RESIZE		0x0008	/* Resize display */ |
| 72 | #define VT_MAX_EVENT		0x000F | 74 | #define VT_MAX_EVENT		0x000F |
| 73 | 	unsigned int oldev;		/* Old console */ | 75 | 	__u32 oldev;		/* Old console */ |
| 74 | 	unsigned int newev;		/* New console (if changing) */ | 76 | 	__u32 newev;		/* New console (if changing) */ |
| 75 | 	unsigned int pad[4];		/* Padding for expansion */ | 77 | 	__u32 pad[4];		/* Padding for expansion */ |
| 76 | }; | 78 | }; |
| 77 | 79 | ||
| 78 | #define VT_WAITEVENT	0x560E	/* Wait for an event */ | 80 | #define VT_WAITEVENT	0x560E	/* Wait for an event */ |
| 79 | 81 | ||
| 80 | struct vt_setactivate { | 82 | struct vt_setactivate { |
| 81 | 	unsigned int console; | 83 | 	__u32 console; |
| 82 | 	struct vt_mode mode; | 84 | 	struct vt_mode mode; |
| 83 | }; | 85 | }; |
| 84 | 86 | ||
| 85 | #define VT_SETACTIVATE	0x560F	/* Activate and set the mode of a console */ | 87 | #define VT_SETACTIVATE	0x560F	/* Activate and set the mode of a console */ |
| 86 | 88 | ||
| 89 | /* get console size and cursor position */ | ||
| 90 | struct vt_consizecsrpos { | ||
| 91 | 	__u16 con_rows;		/* number of console rows */ | ||
| 92 | 	__u16 con_cols;		/* number of console columns */ | ||
| 93 | 	__u16 csr_row;		/* current cursor's row */ | ||
| 94 | 	__u16 csr_col;		/* current cursor's column */ | ||
| 95 | }; | ||
| 96 | #define VT_GETCONSIZECSRPOS	_IOR('V', 0x10, struct vt_consizecsrpos) | ||
| 97 | |||
| 87 | #endif /* _LINUX_VT_H */ | 98 | #endif /* _LINUX_VT_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/linux/wireguard.h+9| ... | @@ -101,6 +101,10 @@ | ... | @@ -101,6 +101,10 @@ |
| 101 | * WGALLOWEDIP_A_FAMILY: NLA_U16 | 101 | * WGALLOWEDIP_A_FAMILY: NLA_U16 |
| 102 | * WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr | 102 | * WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr |
| 103 | * WGALLOWEDIP_A_CIDR_MASK: NLA_U8 | 103 | * WGALLOWEDIP_A_CIDR_MASK: NLA_U8 |
| 104 | * WGALLOWEDIP_A_FLAGS: NLA_U32, WGALLOWEDIP_F_REMOVE_ME if | ||
| 105 | * the specified IP should be removed; | ||
| 106 | * otherwise, this IP will be added if | ||
| 107 | * it is not already present. | ||
| 104 | * 0: NLA_NESTED | 108 | * 0: NLA_NESTED |
| 105 | * ... | 109 | * ... |
| 106 | * 0: NLA_NESTED | 110 | * 0: NLA_NESTED |
| ... | @@ -184,11 +188,16 @@ enum wgpeer_attribute { | ... | @@ -184,11 +188,16 @@ enum wgpeer_attribute { |
| 184 | }; | 188 | }; |
| 185 | #define WGPEER_A_MAX (__WGPEER_A_LAST - 1) | 189 | #define WGPEER_A_MAX (__WGPEER_A_LAST - 1) |
| 186 | 190 | ||
| 191 | enum wgallowedip_flag { | ||
| 192 | 	WGALLOWEDIP_F_REMOVE_ME = 1U << 0, | ||
| 193 | 	__WGALLOWEDIP_F_ALL = WGALLOWEDIP_F_REMOVE_ME | ||
| 194 | }; | ||
| 187 | enum wgallowedip_attribute { | 195 | enum wgallowedip_attribute { |
| 188 | 	WGALLOWEDIP_A_UNSPEC, | 196 | 	WGALLOWEDIP_A_UNSPEC, |
| 189 | 	WGALLOWEDIP_A_FAMILY, | 197 | 	WGALLOWEDIP_A_FAMILY, |
| 190 | 	WGALLOWEDIP_A_IPADDR, | 198 | 	WGALLOWEDIP_A_IPADDR, |
| 191 | 	WGALLOWEDIP_A_CIDR_MASK, | 199 | 	WGALLOWEDIP_A_CIDR_MASK, |
| 200 | 	WGALLOWEDIP_A_FLAGS, | ||
| 192 | 	__WGALLOWEDIP_A_LAST | 201 | 	__WGALLOWEDIP_A_LAST |
| 193 | }; | 202 | }; |
| 194 | #define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1) | 203 | #define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1) |
lib/libc/include/any-linux-any/linux/xattr.h+4| ... | @@ -83,6 +83,10 @@ struct xattr_args { | ... | @@ -83,6 +83,10 @@ struct xattr_args { |
| 83 | #define XATTR_CAPS_SUFFIX "capability" | 83 | #define XATTR_CAPS_SUFFIX "capability" |
| 84 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | 84 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |
| 85 | 85 | ||
| 86 | #define XATTR_BPF_LSM_SUFFIX "bpf." | ||
| 87 | #define XATTR_NAME_BPF_LSM (XATTR_SECURITY_PREFIX XATTR_BPF_LSM_SUFFIX) | ||
| 88 | #define XATTR_NAME_BPF_LSM_LEN (sizeof(XATTR_NAME_BPF_LSM) - 1) | ||
| 89 | |||
| 86 | #define XATTR_POSIX_ACL_ACCESS "posix_acl_access" | 90 | #define XATTR_POSIX_ACL_ACCESS "posix_acl_access" |
| 87 | #define XATTR_NAME_POSIX_ACL_ACCESS XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_ACCESS | 91 | #define XATTR_NAME_POSIX_ACL_ACCESS XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_ACCESS |
| 88 | #define XATTR_POSIX_ACL_DEFAULT "posix_acl_default" | 92 | #define XATTR_POSIX_ACL_DEFAULT "posix_acl_default" |
lib/libc/include/any-linux-any/linux/xfrm.h+8-1| ... | @@ -158,7 +158,8 @@ enum { | ... | @@ -158,7 +158,8 @@ enum { |
| 158 | #define XFRM_MODE_ROUTEOPTIMIZATION 2 | 158 | #define XFRM_MODE_ROUTEOPTIMIZATION 2 |
| 159 | #define XFRM_MODE_IN_TRIGGER 3 | 159 | #define XFRM_MODE_IN_TRIGGER 3 |
| 160 | #define XFRM_MODE_BEET 4 | 160 | #define XFRM_MODE_BEET 4 |
| 161 | #define XFRM_MODE_MAX 5 | 161 | #define XFRM_MODE_IPTFS 5 |
| 162 | #define XFRM_MODE_MAX 6 | ||
| 162 | 163 | ||
| 163 | /* Netlink configuration messages. */ | 164 | /* Netlink configuration messages. */ |
| 164 | enum { | 165 | enum { |
| ... | @@ -323,6 +324,12 @@ enum xfrm_attr_type_t { | ... | @@ -323,6 +324,12 @@ enum xfrm_attr_type_t { |
| 323 | 	XFRMA_SA_DIR,		/* __u8 */ | 324 | 	XFRMA_SA_DIR,		/* __u8 */ |
| 324 | 	XFRMA_NAT_KEEPALIVE_INTERVAL,	/* __u32 in seconds for NAT keepalive */ | 325 | 	XFRMA_NAT_KEEPALIVE_INTERVAL,	/* __u32 in seconds for NAT keepalive */ |
| 325 | 	XFRMA_SA_PCPU,		/* __u32 */ | 326 | 	XFRMA_SA_PCPU,		/* __u32 */ |
| 327 | 	XFRMA_IPTFS_DROP_TIME,	/* __u32 in: usec to wait for next seq */ | ||
| 328 | 	XFRMA_IPTFS_REORDER_WINDOW, /* __u16 in: reorder window size (pkts) */ | ||
| 329 | 	XFRMA_IPTFS_DONT_FRAG,	/* out: don't use fragmentation */ | ||
| 330 | 	XFRMA_IPTFS_INIT_DELAY,	/* __u32 out: initial packet wait delay (usec) */ | ||
| 331 | 	XFRMA_IPTFS_MAX_QSIZE,	/* __u32 out: max ingress queue size (octets) */ | ||
| 332 | 	XFRMA_IPTFS_PKT_SIZE,	/* __u32 out: size of outer packet, 0 for PMTU */ | ||
| 326 | 	__XFRMA_MAX | 333 | 	__XFRMA_MAX |
| 327 | 334 | ||
| 328 | #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK	/* Compatibility */ | 335 | #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK	/* Compatibility */ |
lib/libc/include/any-linux-any/misc/amd-apml.h created+152| ... | @@ -0,0 +1,152 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2021-2024 Advanced Micro Devices, Inc. | ||
| 4 | */ | ||
| 5 | #ifndef _AMD_APML_H_ | ||
| 6 | #define _AMD_APML_H_ | ||
| 7 | |||
| 8 | #include <linux/types.h> | ||
| 9 | |||
| 10 | /* Mailbox data size for data_in and data_out */ | ||
| 11 | #define AMD_SBI_MB_DATA_SIZE		4 | ||
| 12 | |||
| 13 | struct apml_mbox_msg { | ||
| 14 | 	/* | ||
| 15 | 	 * Mailbox Message ID | ||
| 16 | 	 */ | ||
| 17 | 	__u32 cmd; | ||
| 18 | 	/* | ||
| 19 | 	 * [0]...[3] mailbox 32bit input/output data | ||
| 20 | 	 */ | ||
| 21 | 	__u32 mb_in_out; | ||
| 22 | 	/* | ||
| 23 | 	 * Error code is returned in case of soft mailbox error | ||
| 24 | 	 */ | ||
| 25 | 	__u32 fw_ret_code; | ||
| 26 | }; | ||
| 27 | |||
| 28 | struct apml_cpuid_msg { | ||
| 29 | 	/* | ||
| 30 | 	 * CPUID input | ||
| 31 | 	 * [0]...[3] cpuid func, | ||
| 32 | 	 * [4][5] cpuid: thread | ||
| 33 | 	 * [6] cpuid: ext function & read eax/ebx or ecx/edx | ||
| 34 | 	 *	[7:0] -> bits [7:4] -> ext function & | ||
| 35 | 	 *	bit [0] read eax/ebx or ecx/edx | ||
| 36 | 	 * CPUID output | ||
| 37 | 	 */ | ||
| 38 | 	__u64 cpu_in_out; | ||
| 39 | 	/* | ||
| 40 | 	 * Status code for CPUID read | ||
| 41 | 	 */ | ||
| 42 | 	__u32 fw_ret_code; | ||
| 43 | 	__u32 pad; | ||
| 44 | }; | ||
| 45 | |||
| 46 | struct apml_mcamsr_msg { | ||
| 47 | 	/* | ||
| 48 | 	 * MCAMSR input | ||
| 49 | 	 * [0]...[3] mca msr func, | ||
| 50 | 	 * [4][5] thread | ||
| 51 | 	 * MCAMSR output | ||
| 52 | 	 */ | ||
| 53 | 	__u64 mcamsr_in_out; | ||
| 54 | 	/* | ||
| 55 | 	 * Status code for MCA/MSR access | ||
| 56 | 	 */ | ||
| 57 | 	__u32 fw_ret_code; | ||
| 58 | 	__u32 pad; | ||
| 59 | }; | ||
| 60 | |||
| 61 | struct apml_reg_xfer_msg { | ||
| 62 | 	/* | ||
| 63 | 	 * RMI register address offset | ||
| 64 | 	 */ | ||
| 65 | 	__u16 reg_addr; | ||
| 66 | 	/* | ||
| 67 | 	 * Register data for read/write | ||
| 68 | 	 */ | ||
| 69 | 	__u8 data_in_out; | ||
| 70 | 	/* | ||
| 71 | 	 * Register read or write | ||
| 72 | 	 */ | ||
| 73 | 	__u8 rflag; | ||
| 74 | }; | ||
| 75 | |||
| 76 | /* | ||
| 77 | * AMD sideband interface base IOCTL | ||
| 78 | */ | ||
| 79 | #define SB_BASE_IOCTL_NR	0xF9 | ||
| 80 | |||
| 81 | /** | ||
| 82 | * DOC: SBRMI_IOCTL_MBOX_CMD | ||
| 83 | * | ||
| 84 | * @Parameters | ||
| 85 | * | ||
| 86 | * @struct apml_mbox_msg | ||
| 87 | *	Pointer to the &struct apml_mbox_msg that will contain the protocol | ||
| 88 | *	information | ||
| 89 | * | ||
| 90 | * @Description | ||
| 91 | * IOCTL command for APML messages using generic _IOWR | ||
| 92 | * The IOCTL provides userspace access to AMD sideband mailbox protocol | ||
| 93 | * - Mailbox message read/write(0x0~0xFF) | ||
| 94 | * - returning "-EFAULT" if none of the above | ||
| 95 | * "-EPROTOTYPE" error is returned to provide additional error details | ||
| 96 | */ | ||
| 97 | #define SBRMI_IOCTL_MBOX_CMD		_IOWR(SB_BASE_IOCTL_NR, 0, struct apml_mbox_msg) | ||
| 98 | |||
| 99 | /** | ||
| 100 | * DOC: SBRMI_IOCTL_CPUID_CMD | ||
| 101 | * | ||
| 102 | * @Parameters | ||
| 103 | * | ||
| 104 | * @struct apml_cpuid_msg | ||
| 105 | *	Pointer to the &struct apml_cpuid_msg that will contain the protocol | ||
| 106 | *	information | ||
| 107 | * | ||
| 108 | * @Description | ||
| 109 | * IOCTL command for APML messages using generic _IOWR | ||
| 110 | * The IOCTL provides userspace access to AMD sideband cpuid protocol | ||
| 111 | * - CPUID protocol to get CPU details for Function/Ext Function | ||
| 112 | * at thread level | ||
| 113 | * - returning "-EFAULT" if none of the above | ||
| 114 | * "-EPROTOTYPE" error is returned to provide additional error details | ||
| 115 | */ | ||
| 116 | #define SBRMI_IOCTL_CPUID_CMD		_IOWR(SB_BASE_IOCTL_NR, 1, struct apml_cpuid_msg) | ||
| 117 | |||
| 118 | /** | ||
| 119 | * DOC: SBRMI_IOCTL_MCAMSR_CMD | ||
| 120 | * | ||
| 121 | * @Parameters | ||
| 122 | * | ||
| 123 | * @struct apml_mcamsr_msg | ||
| 124 | *	Pointer to the &struct apml_mcamsr_msg that will contain the protocol | ||
| 125 | *	information | ||
| 126 | * | ||
| 127 | * @Description | ||
| 128 | * IOCTL command for APML messages using generic _IOWR | ||
| 129 | * The IOCTL provides userspace access to AMD sideband MCAMSR protocol | ||
| 130 | * - MCAMSR protocol to get MCA bank details for Function at thread level | ||
| 131 | * - returning "-EFAULT" if none of the above | ||
| 132 | * "-EPROTOTYPE" error is returned to provide additional error details | ||
| 133 | */ | ||
| 134 | #define SBRMI_IOCTL_MCAMSR_CMD		_IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg) | ||
| 135 | |||
| 136 | /** | ||
| 137 | * DOC: SBRMI_IOCTL_REG_XFER_CMD | ||
| 138 | * | ||
| 139 | * @Parameters | ||
| 140 | * | ||
| 141 | * @struct apml_reg_xfer_msg | ||
| 142 | *	Pointer to the &struct apml_reg_xfer_msg that will contain the protocol | ||
| 143 | *	information | ||
| 144 | * | ||
| 145 | * @Description | ||
| 146 | * IOCTL command for APML messages using generic _IOWR | ||
| 147 | * The IOCTL provides userspace access to AMD sideband register xfer protocol | ||
| 148 | * - Register xfer protocol to get/set hardware register for given offset | ||
| 149 | */ | ||
| 150 | #define SBRMI_IOCTL_REG_XFER_CMD	_IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg) | ||
| 151 | |||
| 152 | #endif /*_AMD_APML_H_*/ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/misc/cxl.h deleted-156| ... | @@ -1,156 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright 2014 IBM Corp. | ||
| 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 | |||
| 11 | #ifndef _MISC_CXL_H | ||
| 12 | #define _MISC_CXL_H | ||
| 13 | |||
| 14 | #include <linux/types.h> | ||
| 15 | #include <linux/ioctl.h> | ||
| 16 | |||
| 17 | |||
| 18 | struct cxl_ioctl_start_work { | ||
| 19 | 	__u64 flags; | ||
| 20 | 	__u64 work_element_descriptor; | ||
| 21 | 	__u64 amr; | ||
| 22 | 	__s16 num_interrupts; | ||
| 23 | 	__u16 tid; | ||
| 24 | 	__s32 reserved1; | ||
| 25 | 	__u64 reserved2; | ||
| 26 | 	__u64 reserved3; | ||
| 27 | 	__u64 reserved4; | ||
| 28 | 	__u64 reserved5; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #define CXL_START_WORK_AMR		0x0000000000000001ULL | ||
| 32 | #define CXL_START_WORK_NUM_IRQS		0x0000000000000002ULL | ||
| 33 | #define CXL_START_WORK_ERR_FF		0x0000000000000004ULL | ||
| 34 | #define CXL_START_WORK_TID		0x0000000000000008ULL | ||
| 35 | #define CXL_START_WORK_ALL		(CXL_START_WORK_AMR |\ | ||
| 36 | 					 CXL_START_WORK_NUM_IRQS |\ | ||
| 37 | 					 CXL_START_WORK_ERR_FF |\ | ||
| 38 | 					 CXL_START_WORK_TID) | ||
| 39 | |||
| 40 | |||
| 41 | /* Possible modes that an afu can be in */ | ||
| 42 | #define CXL_MODE_DEDICATED 0x1 | ||
| 43 | #define CXL_MODE_DIRECTED 0x2 | ||
| 44 | |||
| 45 | /* possible flags for the cxl_afu_id flags field */ | ||
| 46 | #define CXL_AFUID_FLAG_SLAVE 0x1 /* In directed-mode afu is in slave mode */ | ||
| 47 | |||
| 48 | struct cxl_afu_id { | ||
| 49 | 	__u64 flags; /* One of CXL_AFUID_FLAG_X */ | ||
| 50 | 	__u32 card_id; | ||
| 51 | 	__u32 afu_offset; | ||
| 52 | 	__u32 afu_mode; /* one of the CXL_MODE_X */ | ||
| 53 | 	__u32 reserved1; | ||
| 54 | 	__u64 reserved2; | ||
| 55 | 	__u64 reserved3; | ||
| 56 | 	__u64 reserved4; | ||
| 57 | 	__u64 reserved5; | ||
| 58 | 	__u64 reserved6; | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* base adapter image header is included in the image */ | ||
| 62 | #define CXL_AI_NEED_HEADER	0x0000000000000001ULL | ||
| 63 | #define CXL_AI_ALL		CXL_AI_NEED_HEADER | ||
| 64 | |||
| 65 | #define CXL_AI_HEADER_SIZE 128 | ||
| 66 | #define CXL_AI_BUFFER_SIZE 4096 | ||
| 67 | #define CXL_AI_MAX_ENTRIES 256 | ||
| 68 | #define CXL_AI_MAX_CHUNK_SIZE (CXL_AI_BUFFER_SIZE * CXL_AI_MAX_ENTRIES) | ||
| 69 | |||
| 70 | struct cxl_adapter_image { | ||
| 71 | 	__u64 flags; | ||
| 72 | 	__u64 data; | ||
| 73 | 	__u64 len_data; | ||
| 74 | 	__u64 len_image; | ||
| 75 | 	__u64 reserved1; | ||
| 76 | 	__u64 reserved2; | ||
| 77 | 	__u64 reserved3; | ||
| 78 | 	__u64 reserved4; | ||
| 79 | }; | ||
| 80 | |||
| 81 | /* ioctl numbers */ | ||
| 82 | #define CXL_MAGIC 0xCA | ||
| 83 | /* AFU devices */ | ||
| 84 | #define CXL_IOCTL_START_WORK		_IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work) | ||
| 85 | #define CXL_IOCTL_GET_PROCESS_ELEMENT	_IOR(CXL_MAGIC, 0x01, __u32) | ||
| 86 | #define CXL_IOCTL_GET_AFU_ID _IOR(CXL_MAGIC, 0x02, struct cxl_afu_id) | ||
| 87 | /* adapter devices */ | ||
| 88 | #define CXL_IOCTL_DOWNLOAD_IMAGE _IOW(CXL_MAGIC, 0x0A, struct cxl_adapter_image) | ||
| 89 | #define CXL_IOCTL_VALIDATE_IMAGE _IOW(CXL_MAGIC, 0x0B, struct cxl_adapter_image) | ||
| 90 | |||
| 91 | #define CXL_READ_MIN_SIZE 0x1000 /* 4K */ | ||
| 92 | |||
| 93 | /* Events from read() */ | ||
| 94 | enum cxl_event_type { | ||
| 95 | 	CXL_EVENT_RESERVED = 0, | ||
| 96 | 	CXL_EVENT_AFU_INTERRUPT = 1, | ||
| 97 | 	CXL_EVENT_DATA_STORAGE = 2, | ||
| 98 | 	CXL_EVENT_AFU_ERROR = 3, | ||
| 99 | 	CXL_EVENT_AFU_DRIVER = 4, | ||
| 100 | }; | ||
| 101 | |||
| 102 | struct cxl_event_header { | ||
| 103 | 	__u16 type; | ||
| 104 | 	__u16 size; | ||
| 105 | 	__u16 process_element; | ||
| 106 | 	__u16 reserved1; | ||
| 107 | }; | ||
| 108 | |||
| 109 | struct cxl_event_afu_interrupt { | ||
| 110 | 	__u16 flags; | ||
| 111 | 	__u16 irq; /* Raised AFU interrupt number */ | ||
| 112 | 	__u32 reserved1; | ||
| 113 | }; | ||
| 114 | |||
| 115 | struct cxl_event_data_storage { | ||
| 116 | 	__u16 flags; | ||
| 117 | 	__u16 reserved1; | ||
| 118 | 	__u32 reserved2; | ||
| 119 | 	__u64 addr; | ||
| 120 | 	__u64 dsisr; | ||
| 121 | 	__u64 reserved3; | ||
| 122 | }; | ||
| 123 | |||
| 124 | struct cxl_event_afu_error { | ||
| 125 | 	__u16 flags; | ||
| 126 | 	__u16 reserved1; | ||
| 127 | 	__u32 reserved2; | ||
| 128 | 	__u64 error; | ||
| 129 | }; | ||
| 130 | |||
| 131 | struct cxl_event_afu_driver_reserved { | ||
| 132 | 	/* | ||
| 133 | 	 * Defines the buffer passed to the cxl driver by the AFU driver. | ||
| 134 | 	 * | ||
| 135 | 	 * This is not ABI since the event header.size passed to the user for | ||
| 136 | 	 * existing events is set in the read call to sizeof(cxl_event_header) | ||
| 137 | 	 * + sizeof(whatever event is being dispatched) and the user is already | ||
| 138 | 	 * required to use a 4K buffer on the read call. | ||
| 139 | 	 * | ||
| 140 | 	 * Of course the contents will be ABI, but that's up the AFU driver. | ||
| 141 | 	 */ | ||
| 142 | 	__u32 data_size; | ||
| 143 | 	__u8 data[]; | ||
| 144 | }; | ||
| 145 | |||
| 146 | struct cxl_event { | ||
| 147 | 	struct cxl_event_header header; | ||
| 148 | 	union { | ||
| 149 | 		struct cxl_event_afu_interrupt irq; | ||
| 150 | 		struct cxl_event_data_storage fault; | ||
| 151 | 		struct cxl_event_afu_error afu_error; | ||
| 152 | 		struct cxl_event_afu_driver_reserved afu_driver_event; | ||
| 153 | 	}; | ||
| 154 | }; | ||
| 155 | |||
| 156 | #endif /* _MISC_CXL_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/mtd/ubi-user.h+33| ... | @@ -175,6 +175,8 @@ | ... | @@ -175,6 +175,8 @@ |
| 175 | #define UBI_IOCRPEB _IOW(UBI_IOC_MAGIC, 4, __s32) | 175 | #define UBI_IOCRPEB _IOW(UBI_IOC_MAGIC, 4, __s32) |
| 176 | /* Force scrubbing on the specified PEB */ | 176 | /* Force scrubbing on the specified PEB */ |
| 177 | #define UBI_IOCSPEB _IOW(UBI_IOC_MAGIC, 5, __s32) | 177 | #define UBI_IOCSPEB _IOW(UBI_IOC_MAGIC, 5, __s32) |
| 178 | /* Read detailed device erase counter information */ | ||
| 179 | #define UBI_IOCECNFO _IOWR(UBI_IOC_MAGIC, 6, struct ubi_ecinfo_req) | ||
| 178 | 180 | ||
| 179 | /* ioctl commands of the UBI control character device */ | 181 | /* ioctl commands of the UBI control character device */ |
| 180 | 182 | ||
| ... | @@ -412,6 +414,37 @@ struct ubi_rnvol_req { | ... | @@ -412,6 +414,37 @@ struct ubi_rnvol_req { |
| 412 | 	} ents[UBI_MAX_RNVOL]; | 414 | 	} ents[UBI_MAX_RNVOL]; |
| 413 | } __attribute__((packed)); | 415 | } __attribute__((packed)); |
| 414 | 416 | ||
| 417 | /** | ||
| 418 | * struct ubi_ecinfo_req - a data structure used for requesting and receiving | ||
| 419 | * erase block counter information from a UBI device. | ||
| 420 | * | ||
| 421 | * @start: index of first physical erase block to read (in) | ||
| 422 | * @length: number of erase counters to read (in) | ||
| 423 | * @read_length: number of erase counters that was actually read (out) | ||
| 424 | * @padding: reserved for future, not used, has to be zeroed | ||
| 425 | * @erase_counters: array of erase counter values (out) | ||
| 426 | * | ||
| 427 | * This structure is used to retrieve erase counter information for a specified | ||
| 428 | * range of PEBs on a UBI device. | ||
| 429 | * Erase counters are read from @start and attempts to read @length number of | ||
| 430 | * erase counters. | ||
| 431 | * The retrieved values are stored in the @erase_counters array. It is the | ||
| 432 | * responsibility of the caller to allocate enough memory for storing @length | ||
| 433 | * elements in the @erase_counters array. | ||
| 434 | * If a block is bad or if the erase counter is unknown the corresponding value | ||
| 435 | * in the array will be set to -1. | ||
| 436 | * The @read_length field will indicate the number of erase counters actually | ||
| 437 | * read. Typically @read_length will be limited due to memory or the number of | ||
| 438 | * PEBs on the UBI device. | ||
| 439 | */ | ||
| 440 | struct ubi_ecinfo_req { | ||
| 441 | 	__s32 start; | ||
| 442 | 	__s32 length; | ||
| 443 | 	__s32 read_length; | ||
| 444 | 	__s8 padding[16]; | ||
| 445 | 	__s32 erase_counters[]; | ||
| 446 | } __attribute__((packed)); | ||
| 447 | |||
| 415 | /** | 448 | /** |
| 416 | * struct ubi_leb_change_req - a data structure used in atomic LEB change | 449 | * struct ubi_leb_change_req - a data structure used in atomic LEB change |
| 417 | * requests. | 450 | * requests. |
lib/libc/include/any-linux-any/rdma/efa-abi.h+2-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved. | 3 | * Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved. |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef EFA_ABI_USER_H | 6 | #ifndef EFA_ABI_USER_H |
| ... | @@ -131,6 +131,7 @@ enum { | ... | @@ -131,6 +131,7 @@ enum { |
| 131 | 	EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4, | 131 | 	EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4, |
| 132 | 	EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5, | 132 | 	EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5, |
| 133 | 	EFA_QUERY_DEVICE_CAPS_UNSOLICITED_WRITE_RECV = 1 << 6, | 133 | 	EFA_QUERY_DEVICE_CAPS_UNSOLICITED_WRITE_RECV = 1 << 6, |
| 134 | 	EFA_QUERY_DEVICE_CAPS_CQ_WITH_EXT_MEM = 1 << 7, | ||
| 134 | }; | 135 | }; |
| 135 | 136 | ||
| 136 | struct efa_ibv_ex_query_device_resp { | 137 | struct efa_ibv_ex_query_device_resp { |
lib/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h+37| ... | @@ -55,6 +55,7 @@ enum uverbs_default_objects { | ... | @@ -55,6 +55,7 @@ enum uverbs_default_objects { |
| 55 | 	UVERBS_OBJECT_DM, | 55 | 	UVERBS_OBJECT_DM, |
| 56 | 	UVERBS_OBJECT_COUNTERS, | 56 | 	UVERBS_OBJECT_COUNTERS, |
| 57 | 	UVERBS_OBJECT_ASYNC_EVENT, | 57 | 	UVERBS_OBJECT_ASYNC_EVENT, |
| 58 | 	UVERBS_OBJECT_DMAH, | ||
| 58 | }; | 59 | }; |
| 59 | 60 | ||
| 60 | enum { | 61 | enum { |
| ... | @@ -88,6 +89,7 @@ enum uverbs_attrs_query_port_cmd_attr_ids { | ... | @@ -88,6 +89,7 @@ enum uverbs_attrs_query_port_cmd_attr_ids { |
| 88 | enum uverbs_attrs_get_context_attr_ids { | 89 | enum uverbs_attrs_get_context_attr_ids { |
| 89 | 	UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS, | 90 | 	UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS, |
| 90 | 	UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT, | 91 | 	UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT, |
| 92 | 	UVERBS_ATTR_GET_CONTEXT_FD_ARR, | ||
| 91 | }; | 93 | }; |
| 92 | 94 | ||
| 93 | enum uverbs_attrs_query_context_attr_ids { | 95 | enum uverbs_attrs_query_context_attr_ids { |
| ... | @@ -104,6 +106,10 @@ enum uverbs_attrs_create_cq_cmd_attr_ids { | ... | @@ -104,6 +106,10 @@ enum uverbs_attrs_create_cq_cmd_attr_ids { |
| 104 | 	UVERBS_ATTR_CREATE_CQ_FLAGS, | 106 | 	UVERBS_ATTR_CREATE_CQ_FLAGS, |
| 105 | 	UVERBS_ATTR_CREATE_CQ_RESP_CQE, | 107 | 	UVERBS_ATTR_CREATE_CQ_RESP_CQE, |
| 106 | 	UVERBS_ATTR_CREATE_CQ_EVENT_FD, | 108 | 	UVERBS_ATTR_CREATE_CQ_EVENT_FD, |
| 109 | 	UVERBS_ATTR_CREATE_CQ_BUFFER_VA, | ||
| 110 | 	UVERBS_ATTR_CREATE_CQ_BUFFER_LENGTH, | ||
| 111 | 	UVERBS_ATTR_CREATE_CQ_BUFFER_FD, | ||
| 112 | 	UVERBS_ATTR_CREATE_CQ_BUFFER_OFFSET, | ||
| 107 | }; | 113 | }; |
| 108 | 114 | ||
| 109 | enum uverbs_attrs_destroy_cq_cmd_attr_ids { | 115 | enum uverbs_attrs_destroy_cq_cmd_attr_ids { |
| ... | @@ -235,6 +241,22 @@ enum uverbs_methods_dm { | ... | @@ -235,6 +241,22 @@ enum uverbs_methods_dm { |
| 235 | 	UVERBS_METHOD_DM_FREE, | 241 | 	UVERBS_METHOD_DM_FREE, |
| 236 | }; | 242 | }; |
| 237 | 243 | ||
| 244 | enum uverbs_attrs_alloc_dmah_cmd_attr_ids { | ||
| 245 | 	UVERBS_ATTR_ALLOC_DMAH_HANDLE, | ||
| 246 | 	UVERBS_ATTR_ALLOC_DMAH_CPU_ID, | ||
| 247 | 	UVERBS_ATTR_ALLOC_DMAH_TPH_MEM_TYPE, | ||
| 248 | 	UVERBS_ATTR_ALLOC_DMAH_PH, | ||
| 249 | }; | ||
| 250 | |||
| 251 | enum uverbs_attrs_free_dmah_cmd_attr_ids { | ||
| 252 | 	UVERBS_ATTR_FREE_DMA_HANDLE, | ||
| 253 | }; | ||
| 254 | |||
| 255 | enum uverbs_methods_dmah { | ||
| 256 | 	UVERBS_METHOD_DMAH_ALLOC, | ||
| 257 | 	UVERBS_METHOD_DMAH_FREE, | ||
| 258 | }; | ||
| 259 | |||
| 238 | enum uverbs_attrs_reg_dm_mr_cmd_attr_ids { | 260 | enum uverbs_attrs_reg_dm_mr_cmd_attr_ids { |
| 239 | 	UVERBS_ATTR_REG_DM_MR_HANDLE, | 261 | 	UVERBS_ATTR_REG_DM_MR_HANDLE, |
| 240 | 	UVERBS_ATTR_REG_DM_MR_OFFSET, | 262 | 	UVERBS_ATTR_REG_DM_MR_OFFSET, |
| ... | @@ -252,6 +274,7 @@ enum uverbs_methods_mr { | ... | @@ -252,6 +274,7 @@ enum uverbs_methods_mr { |
| 252 | 	UVERBS_METHOD_ADVISE_MR, | 274 | 	UVERBS_METHOD_ADVISE_MR, |
| 253 | 	UVERBS_METHOD_QUERY_MR, | 275 | 	UVERBS_METHOD_QUERY_MR, |
| 254 | 	UVERBS_METHOD_REG_DMABUF_MR, | 276 | 	UVERBS_METHOD_REG_DMABUF_MR, |
| 277 | 	UVERBS_METHOD_REG_MR, | ||
| 255 | }; | 278 | }; |
| 256 | 279 | ||
| 257 | enum uverbs_attrs_mr_destroy_ids { | 280 | enum uverbs_attrs_mr_destroy_ids { |
| ... | @@ -285,6 +308,20 @@ enum uverbs_attrs_reg_dmabuf_mr_cmd_attr_ids { | ... | @@ -285,6 +308,20 @@ enum uverbs_attrs_reg_dmabuf_mr_cmd_attr_ids { |
| 285 | 	UVERBS_ATTR_REG_DMABUF_MR_RESP_RKEY, | 308 | 	UVERBS_ATTR_REG_DMABUF_MR_RESP_RKEY, |
| 286 | }; | 309 | }; |
| 287 | 310 | ||
| 311 | enum uverbs_attrs_reg_mr_cmd_attr_ids { | ||
| 312 | 	UVERBS_ATTR_REG_MR_HANDLE, | ||
| 313 | 	UVERBS_ATTR_REG_MR_PD_HANDLE, | ||
| 314 | 	UVERBS_ATTR_REG_MR_DMA_HANDLE, | ||
| 315 | 	UVERBS_ATTR_REG_MR_IOVA, | ||
| 316 | 	UVERBS_ATTR_REG_MR_ADDR, | ||
| 317 | 	UVERBS_ATTR_REG_MR_LENGTH, | ||
| 318 | 	UVERBS_ATTR_REG_MR_ACCESS_FLAGS, | ||
| 319 | 	UVERBS_ATTR_REG_MR_FD, | ||
| 320 | 	UVERBS_ATTR_REG_MR_FD_OFFSET, | ||
| 321 | 	UVERBS_ATTR_REG_MR_RESP_LKEY, | ||
| 322 | 	UVERBS_ATTR_REG_MR_RESP_RKEY, | ||
| 323 | }; | ||
| 324 | |||
| 288 | enum uverbs_attrs_create_counters_cmd_attr_ids { | 325 | enum uverbs_attrs_create_counters_cmd_attr_ids { |
| 289 | 	UVERBS_ATTR_CREATE_COUNTERS_HANDLE, | 326 | 	UVERBS_ATTR_CREATE_COUNTERS_HANDLE, |
| 290 | }; | 327 | }; |
lib/libc/include/any-linux-any/rdma/ib_user_verbs.h+16| ... | @@ -233,6 +233,22 @@ struct ib_uverbs_ex_query_device { | ... | @@ -233,6 +233,22 @@ struct ib_uverbs_ex_query_device { |
| 233 | 	__u32 reserved; | 233 | 	__u32 reserved; |
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | enum ib_uverbs_odp_general_cap_bits { | ||
| 237 | 	IB_UVERBS_ODP_SUPPORT = 1 << 0, | ||
| 238 | 	IB_UVERBS_ODP_SUPPORT_IMPLICIT = 1 << 1, | ||
| 239 | }; | ||
| 240 | |||
| 241 | enum ib_uverbs_odp_transport_cap_bits { | ||
| 242 | 	IB_UVERBS_ODP_SUPPORT_SEND = 1 << 0, | ||
| 243 | 	IB_UVERBS_ODP_SUPPORT_RECV = 1 << 1, | ||
| 244 | 	IB_UVERBS_ODP_SUPPORT_WRITE = 1 << 2, | ||
| 245 | 	IB_UVERBS_ODP_SUPPORT_READ = 1 << 3, | ||
| 246 | 	IB_UVERBS_ODP_SUPPORT_ATOMIC = 1 << 4, | ||
| 247 | 	IB_UVERBS_ODP_SUPPORT_SRQ_RECV = 1 << 5, | ||
| 248 | 	IB_UVERBS_ODP_SUPPORT_FLUSH = 1 << 6, | ||
| 249 | 	IB_UVERBS_ODP_SUPPORT_ATOMIC_WRITE = 1 << 7, | ||
| 250 | }; | ||
| 251 | |||
| 236 | struct ib_uverbs_odp_caps { | 252 | struct ib_uverbs_odp_caps { |
| 237 | 	__aligned_u64 general_caps; | 253 | 	__aligned_u64 general_caps; |
| 238 | 	struct { | 254 | 	struct { |
lib/libc/include/any-linux-any/rdma/mlx5_user_ioctl_cmds.h+1| ... | @@ -239,6 +239,7 @@ enum mlx5_ib_flow_matcher_create_attrs { | ... | @@ -239,6 +239,7 @@ enum mlx5_ib_flow_matcher_create_attrs { |
| 239 | 	MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, | 239 | 	MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, |
| 240 | 	MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, | 240 | 	MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, |
| 241 | 	MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE, | 241 | 	MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE, |
| 242 | 	MLX5_IB_ATTR_FLOW_MATCHER_IB_PORT, | ||
| 242 | }; | 243 | }; |
| 243 | 244 | ||
| 244 | enum mlx5_ib_flow_matcher_destroy_attrs { | 245 | enum mlx5_ib_flow_matcher_destroy_attrs { |
lib/libc/include/any-linux-any/rdma/mlx5_user_ioctl_verbs.h+2| ... | @@ -45,6 +45,8 @@ enum mlx5_ib_uapi_flow_table_type { | ... | @@ -45,6 +45,8 @@ enum mlx5_ib_uapi_flow_table_type { |
| 45 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB	= 0x2, | 45 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB	= 0x2, |
| 46 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX	= 0x3, | 46 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX	= 0x3, |
| 47 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_TX	= 0x4, | 47 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_TX	= 0x4, |
| 48 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_TRANSPORT_RX	= 0x5, | ||
| 49 | 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_TRANSPORT_TX	= 0x6, | ||
| 48 | }; | 50 | }; |
| 49 | 51 | ||
| 50 | enum mlx5_ib_uapi_flow_action_packet_reformat_type { | 52 | enum mlx5_ib_uapi_flow_action_packet_reformat_type { |
lib/libc/include/any-linux-any/rdma/rdma_netlink.h+2| ... | @@ -580,6 +580,8 @@ enum rdma_nldev_attr { | ... | @@ -580,6 +580,8 @@ enum rdma_nldev_attr { |
| 580 | 	RDMA_NLDEV_ATTR_EVENT_TYPE,		/* u8 */ | 580 | 	RDMA_NLDEV_ATTR_EVENT_TYPE,		/* u8 */ |
| 581 | 581 | ||
| 582 | 	RDMA_NLDEV_SYS_ATTR_MONITOR_MODE,	/* u8 */ | 582 | 	RDMA_NLDEV_SYS_ATTR_MONITOR_MODE,	/* u8 */ |
| 583 | |||
| 584 | 	RDMA_NLDEV_ATTR_STAT_OPCOUNTER_ENABLED,	/* u8 */ | ||
| 583 | 	/* | 585 | 	/* |
| 584 | 	 * Always the end | 586 | 	 * Always the end |
| 585 | 	 */ | 587 | 	 */ |
lib/libc/include/any-linux-any/scsi/cxlflash_ioctl.h deleted-276| ... | @@ -1,276 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * CXL Flash Device Driver | ||
| 4 | * | ||
| 5 | * Written by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>, IBM Corporation | ||
| 6 | * Matthew R. Ochs <mrochs@linux.vnet.ibm.com>, IBM Corporation | ||
| 7 | * | ||
| 8 | * Copyright (C) 2015 IBM Corporation | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License | ||
| 12 | * as published by the Free Software Foundation; either version | ||
| 13 | * 2 of the License, or (at your option) any later version. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef _CXLFLASH_IOCTL_H | ||
| 17 | #define _CXLFLASH_IOCTL_H | ||
| 18 | |||
| 19 | #include <linux/types.h> | ||
| 20 | |||
| 21 | /* | ||
| 22 | * Structure and definitions for all CXL Flash ioctls | ||
| 23 | */ | ||
| 24 | #define CXLFLASH_WWID_LEN		16 | ||
| 25 | |||
| 26 | /* | ||
| 27 | * Structure and flag definitions CXL Flash superpipe ioctls | ||
| 28 | */ | ||
| 29 | |||
| 30 | #define DK_CXLFLASH_VERSION_0	0 | ||
| 31 | |||
| 32 | struct dk_cxlflash_hdr { | ||
| 33 | 	__u16 version;			/* Version data */ | ||
| 34 | 	__u16 rsvd[3];			/* Reserved for future use */ | ||
| 35 | 	__u64 flags;			/* Input flags */ | ||
| 36 | 	__u64 return_flags;		/* Returned flags */ | ||
| 37 | }; | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Return flag definitions available to all superpipe ioctls | ||
| 41 | * | ||
| 42 | * Similar to the input flags, these are grown from the bottom-up with the | ||
| 43 | * intention that ioctl-specific return flag definitions would grow from the | ||
| 44 | * top-down, allowing the two sets to co-exist. While not required/enforced | ||
| 45 | * at this time, this provides future flexibility. | ||
| 46 | */ | ||
| 47 | #define DK_CXLFLASH_ALL_PORTS_ACTIVE	0x0000000000000001ULL | ||
| 48 | #define DK_CXLFLASH_APP_CLOSE_ADAP_FD	0x0000000000000002ULL | ||
| 49 | #define DK_CXLFLASH_CONTEXT_SQ_CMD_MODE	0x0000000000000004ULL | ||
| 50 | |||
| 51 | /* | ||
| 52 | * General Notes: | ||
| 53 | * ------------- | ||
| 54 | * The 'context_id' field of all ioctl structures contains the context | ||
| 55 | * identifier for a context in the lower 32-bits (upper 32-bits are not | ||
| 56 | * to be used when identifying a context to the AFU). That said, the value | ||
| 57 | * in its entirety (all 64-bits) is to be treated as an opaque cookie and | ||
| 58 | * should be presented as such when issuing ioctls. | ||
| 59 | */ | ||
| 60 | |||
| 61 | /* | ||
| 62 | * DK_CXLFLASH_ATTACH Notes: | ||
| 63 | * ------------------------ | ||
| 64 | * Read/write access permissions are specified via the O_RDONLY, O_WRONLY, | ||
| 65 | * and O_RDWR flags defined in the fcntl.h header file. | ||
| 66 | * | ||
| 67 | * A valid adapter file descriptor (fd >= 0) is only returned on the initial | ||
| 68 | * attach (successful) of a context. When a context is shared(reused), the user | ||
| 69 | * is expected to already 'know' the adapter file descriptor associated with the | ||
| 70 | * context. | ||
| 71 | */ | ||
| 72 | #define DK_CXLFLASH_ATTACH_REUSE_CONTEXT	0x8000000000000000ULL | ||
| 73 | |||
| 74 | struct dk_cxlflash_attach { | ||
| 75 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 76 | 	__u64 num_interrupts;		/* Requested number of interrupts */ | ||
| 77 | 	__u64 context_id;		/* Returned context */ | ||
| 78 | 	__u64 mmio_size;		/* Returned size of MMIO area */ | ||
| 79 | 	__u64 block_size;		/* Returned block size, in bytes */ | ||
| 80 | 	__u64 adap_fd;			/* Returned adapter file descriptor */ | ||
| 81 | 	__u64 last_lba;			/* Returned last LBA on the device */ | ||
| 82 | 	__u64 max_xfer;			/* Returned max transfer size, blocks */ | ||
| 83 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 84 | }; | ||
| 85 | |||
| 86 | struct dk_cxlflash_detach { | ||
| 87 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 88 | 	__u64 context_id;		/* Context to detach */ | ||
| 89 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 90 | }; | ||
| 91 | |||
| 92 | struct dk_cxlflash_udirect { | ||
| 93 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 94 | 	__u64 context_id;		/* Context to own physical resources */ | ||
| 95 | 	__u64 rsrc_handle;		/* Returned resource handle */ | ||
| 96 | 	__u64 last_lba;			/* Returned last LBA on the device */ | ||
| 97 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 98 | }; | ||
| 99 | |||
| 100 | #define DK_CXLFLASH_UVIRTUAL_NEED_WRITE_SAME	0x8000000000000000ULL | ||
| 101 | |||
| 102 | struct dk_cxlflash_uvirtual { | ||
| 103 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 104 | 	__u64 context_id;		/* Context to own virtual resources */ | ||
| 105 | 	__u64 lun_size;			/* Requested size, in 4K blocks */ | ||
| 106 | 	__u64 rsrc_handle;		/* Returned resource handle */ | ||
| 107 | 	__u64 last_lba;			/* Returned last LBA of LUN */ | ||
| 108 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct dk_cxlflash_release { | ||
| 112 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 113 | 	__u64 context_id;		/* Context owning resources */ | ||
| 114 | 	__u64 rsrc_handle;		/* Resource handle to release */ | ||
| 115 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 116 | }; | ||
| 117 | |||
| 118 | struct dk_cxlflash_resize { | ||
| 119 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 120 | 	__u64 context_id;		/* Context owning resources */ | ||
| 121 | 	__u64 rsrc_handle;		/* Resource handle of LUN to resize */ | ||
| 122 | 	__u64 req_size;			/* New requested size, in 4K blocks */ | ||
| 123 | 	__u64 last_lba;			/* Returned last LBA of LUN */ | ||
| 124 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 125 | }; | ||
| 126 | |||
| 127 | struct dk_cxlflash_clone { | ||
| 128 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 129 | 	__u64 context_id_src;		/* Context to clone from */ | ||
| 130 | 	__u64 context_id_dst;		/* Context to clone to */ | ||
| 131 | 	__u64 adap_fd_src;		/* Source context adapter fd */ | ||
| 132 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 133 | }; | ||
| 134 | |||
| 135 | #define DK_CXLFLASH_VERIFY_SENSE_LEN	18 | ||
| 136 | #define DK_CXLFLASH_VERIFY_HINT_SENSE	0x8000000000000000ULL | ||
| 137 | |||
| 138 | struct dk_cxlflash_verify { | ||
| 139 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 140 | 	__u64 context_id;		/* Context owning resources to verify */ | ||
| 141 | 	__u64 rsrc_handle;		/* Resource handle of LUN */ | ||
| 142 | 	__u64 hint;			/* Reasons for verify */ | ||
| 143 | 	__u64 last_lba;			/* Returned last LBA of device */ | ||
| 144 | 	__u8 sense_data[DK_CXLFLASH_VERIFY_SENSE_LEN]; /* SCSI sense data */ | ||
| 145 | 	__u8 pad[6];			/* Pad to next 8-byte boundary */ | ||
| 146 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 147 | }; | ||
| 148 | |||
| 149 | #define DK_CXLFLASH_RECOVER_AFU_CONTEXT_RESET	0x8000000000000000ULL | ||
| 150 | |||
| 151 | struct dk_cxlflash_recover_afu { | ||
| 152 | 	struct dk_cxlflash_hdr hdr;	/* Common fields */ | ||
| 153 | 	__u64 reason;			/* Reason for recovery request */ | ||
| 154 | 	__u64 context_id;		/* Context to recover / updated ID */ | ||
| 155 | 	__u64 mmio_size;		/* Returned size of MMIO area */ | ||
| 156 | 	__u64 adap_fd;			/* Returned adapter file descriptor */ | ||
| 157 | 	__u64 reserved[8];		/* Reserved for future use */ | ||
| 158 | }; | ||
| 159 | |||
| 160 | #define DK_CXLFLASH_MANAGE_LUN_WWID_LEN			CXLFLASH_WWID_LEN | ||
| 161 | #define DK_CXLFLASH_MANAGE_LUN_ENABLE_SUPERPIPE		0x8000000000000000ULL | ||
| 162 | #define DK_CXLFLASH_MANAGE_LUN_DISABLE_SUPERPIPE	0x4000000000000000ULL | ||
| 163 | #define DK_CXLFLASH_MANAGE_LUN_ALL_PORTS_ACCESSIBLE	0x2000000000000000ULL | ||
| 164 | |||
| 165 | struct dk_cxlflash_manage_lun { | ||
| 166 | 	struct dk_cxlflash_hdr hdr;			/* Common fields */ | ||
| 167 | 	__u8 wwid[DK_CXLFLASH_MANAGE_LUN_WWID_LEN];	/* Page83 WWID, NAA-6 */ | ||
| 168 | 	__u64 reserved[8];				/* Rsvd, future use */ | ||
| 169 | }; | ||
| 170 | |||
| 171 | union cxlflash_ioctls { | ||
| 172 | 	struct dk_cxlflash_attach attach; | ||
| 173 | 	struct dk_cxlflash_detach detach; | ||
| 174 | 	struct dk_cxlflash_udirect udirect; | ||
| 175 | 	struct dk_cxlflash_uvirtual uvirtual; | ||
| 176 | 	struct dk_cxlflash_release release; | ||
| 177 | 	struct dk_cxlflash_resize resize; | ||
| 178 | 	struct dk_cxlflash_clone clone; | ||
| 179 | 	struct dk_cxlflash_verify verify; | ||
| 180 | 	struct dk_cxlflash_recover_afu recover_afu; | ||
| 181 | 	struct dk_cxlflash_manage_lun manage_lun; | ||
| 182 | }; | ||
| 183 | |||
| 184 | #define MAX_CXLFLASH_IOCTL_SZ	(sizeof(union cxlflash_ioctls)) | ||
| 185 | |||
| 186 | #define CXL_MAGIC 0xCA | ||
| 187 | #define CXL_IOWR(_n, _s)	_IOWR(CXL_MAGIC, _n, struct _s) | ||
| 188 | |||
| 189 | /* | ||
| 190 | * CXL Flash superpipe ioctls start at base of the reserved CXL_MAGIC | ||
| 191 | * region (0x80) and grow upwards. | ||
| 192 | */ | ||
| 193 | #define DK_CXLFLASH_ATTACH		CXL_IOWR(0x80, dk_cxlflash_attach) | ||
| 194 | #define DK_CXLFLASH_USER_DIRECT		CXL_IOWR(0x81, dk_cxlflash_udirect) | ||
| 195 | #define DK_CXLFLASH_RELEASE		CXL_IOWR(0x82, dk_cxlflash_release) | ||
| 196 | #define DK_CXLFLASH_DETACH		CXL_IOWR(0x83, dk_cxlflash_detach) | ||
| 197 | #define DK_CXLFLASH_VERIFY		CXL_IOWR(0x84, dk_cxlflash_verify) | ||
| 198 | #define DK_CXLFLASH_RECOVER_AFU		CXL_IOWR(0x85, dk_cxlflash_recover_afu) | ||
| 199 | #define DK_CXLFLASH_MANAGE_LUN		CXL_IOWR(0x86, dk_cxlflash_manage_lun) | ||
| 200 | #define DK_CXLFLASH_USER_VIRTUAL	CXL_IOWR(0x87, dk_cxlflash_uvirtual) | ||
| 201 | #define DK_CXLFLASH_VLUN_RESIZE		CXL_IOWR(0x88, dk_cxlflash_resize) | ||
| 202 | #define DK_CXLFLASH_VLUN_CLONE		CXL_IOWR(0x89, dk_cxlflash_clone) | ||
| 203 | |||
| 204 | /* | ||
| 205 | * Structure and flag definitions CXL Flash host ioctls | ||
| 206 | */ | ||
| 207 | |||
| 208 | #define HT_CXLFLASH_VERSION_0 0 | ||
| 209 | |||
| 210 | struct ht_cxlflash_hdr { | ||
| 211 | 	__u16 version;		/* Version data */ | ||
| 212 | 	__u16 subcmd;		/* Sub-command */ | ||
| 213 | 	__u16 rsvd[2];		/* Reserved for future use */ | ||
| 214 | 	__u64 flags;		/* Input flags */ | ||
| 215 | 	__u64 return_flags;	/* Returned flags */ | ||
| 216 | }; | ||
| 217 | |||
| 218 | /* | ||
| 219 | * Input flag definitions available to all host ioctls | ||
| 220 | * | ||
| 221 | * These are grown from the bottom-up with the intention that ioctl-specific | ||
| 222 | * input flag definitions would grow from the top-down, allowing the two sets | ||
| 223 | * to co-exist. While not required/enforced at this time, this provides future | ||
| 224 | * flexibility. | ||
| 225 | */ | ||
| 226 | #define HT_CXLFLASH_HOST_READ				0x0000000000000000ULL | ||
| 227 | #define HT_CXLFLASH_HOST_WRITE				0x0000000000000001ULL | ||
| 228 | |||
| 229 | #define HT_CXLFLASH_LUN_PROVISION_SUBCMD_CREATE_LUN	0x0001 | ||
| 230 | #define HT_CXLFLASH_LUN_PROVISION_SUBCMD_DELETE_LUN	0x0002 | ||
| 231 | #define HT_CXLFLASH_LUN_PROVISION_SUBCMD_QUERY_PORT	0x0003 | ||
| 232 | |||
| 233 | struct ht_cxlflash_lun_provision { | ||
| 234 | 	struct ht_cxlflash_hdr hdr; /* Common fields */ | ||
| 235 | 	__u16 port;		 /* Target port for provision request */ | ||
| 236 | 	__u16 reserved16[3];	 /* Reserved for future use */ | ||
| 237 | 	__u64 size;		 /* Size of LUN (4K blocks) */ | ||
| 238 | 	__u64 lun_id;		 /* SCSI LUN ID */ | ||
| 239 | 	__u8 wwid[CXLFLASH_WWID_LEN];/* Page83 WWID, NAA-6 */ | ||
| 240 | 	__u64 max_num_luns;	 /* Maximum number of LUNs provisioned */ | ||
| 241 | 	__u64 cur_num_luns;	 /* Current number of LUNs provisioned */ | ||
| 242 | 	__u64 max_cap_port;	 /* Total capacity for port (4K blocks) */ | ||
| 243 | 	__u64 cur_cap_port;	 /* Current capacity for port (4K blocks) */ | ||
| 244 | 	__u64 reserved[8];	 /* Reserved for future use */ | ||
| 245 | }; | ||
| 246 | |||
| 247 | #define	HT_CXLFLASH_AFU_DEBUG_MAX_DATA_LEN		262144	/* 256K */ | ||
| 248 | #define HT_CXLFLASH_AFU_DEBUG_SUBCMD_LEN		12 | ||
| 249 | struct ht_cxlflash_afu_debug { | ||
| 250 | 	struct ht_cxlflash_hdr hdr; /* Common fields */ | ||
| 251 | 	__u8 reserved8[4];	 /* Reserved for future use */ | ||
| 252 | 	__u8 afu_subcmd[HT_CXLFLASH_AFU_DEBUG_SUBCMD_LEN]; /* AFU subcommand, | ||
| 253 | 							 * (pass through) | ||
| 254 | 							 */ | ||
| 255 | 	__u64 data_ea;		 /* Data buffer effective address */ | ||
| 256 | 	__u32 data_len;		 /* Data buffer length */ | ||
| 257 | 	__u32 reserved32;	 /* Reserved for future use */ | ||
| 258 | 	__u64 reserved[8];	 /* Reserved for future use */ | ||
| 259 | }; | ||
| 260 | |||
| 261 | union cxlflash_ht_ioctls { | ||
| 262 | 	struct ht_cxlflash_lun_provision lun_provision; | ||
| 263 | 	struct ht_cxlflash_afu_debug afu_debug; | ||
| 264 | }; | ||
| 265 | |||
| 266 | #define MAX_HT_CXLFLASH_IOCTL_SZ	(sizeof(union cxlflash_ht_ioctls)) | ||
| 267 | |||
| 268 | /* | ||
| 269 | * CXL Flash host ioctls start at the top of the reserved CXL_MAGIC | ||
| 270 | * region (0xBF) and grow downwards. | ||
| 271 | */ | ||
| 272 | #define HT_CXLFLASH_LUN_PROVISION CXL_IOWR(0xBF, ht_cxlflash_lun_provision) | ||
| 273 | #define HT_CXLFLASH_AFU_DEBUG	 CXL_IOWR(0xBE, ht_cxlflash_afu_debug) | ||
| 274 | |||
| 275 | |||
| 276 | #endif /* ifndef _CXLFLASH_IOCTL_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/asequencer.h+11-1| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | #include <sound/asound.h> | 10 | #include <sound/asound.h> |
| 11 | 11 | ||
| 12 | /** version of the sequencer */ | 12 | /** version of the sequencer */ |
| 13 | #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 4) | 13 | #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 5) |
| 14 | 14 | ||
| 15 | /** | 15 | /** |
| 16 | * definition of sequencer event types | 16 | * definition of sequencer event types |
| ... | @@ -92,6 +92,9 @@ | ... | @@ -92,6 +92,9 @@ |
| 92 | #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */ | 92 | #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */ |
| 93 | #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */ | 93 | #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */ |
| 94 | 94 | ||
| 95 | #define SNDRV_SEQ_EVENT_UMP_EP_CHANGE	68	/* UMP EP info has changed */ | ||
| 96 | #define SNDRV_SEQ_EVENT_UMP_BLOCK_CHANGE 69	/* UMP block info has changed */ | ||
| 97 | |||
| 95 | /* 70-89: synthesizer events - obsoleted */ | 98 | /* 70-89: synthesizer events - obsoleted */ |
| 96 | 99 | ||
| 97 | /** user-defined events with fixed length | 100 | /** user-defined events with fixed length |
| ... | @@ -253,6 +256,12 @@ struct snd_seq_ev_quote { | ... | @@ -253,6 +256,12 @@ struct snd_seq_ev_quote { |
| 253 | 	struct snd_seq_event *event;		/* quoted event */ | 256 | 	struct snd_seq_event *event;		/* quoted event */ |
| 254 | } __attribute__((packed)); | 257 | } __attribute__((packed)); |
| 255 | 258 | ||
| 259 | 	/* UMP info change notify */ | ||
| 260 | struct snd_seq_ev_ump_notify { | ||
| 261 | 	unsigned char client;	/**< Client number */ | ||
| 262 | 	unsigned char block;	/**< Block number (optional) */ | ||
| 263 | }; | ||
| 264 | |||
| 256 | union snd_seq_event_data { /* event data... */ | 265 | union snd_seq_event_data { /* event data... */ |
| 257 | 	struct snd_seq_ev_note note; | 266 | 	struct snd_seq_ev_note note; |
| 258 | 	struct snd_seq_ev_ctrl control; | 267 | 	struct snd_seq_ev_ctrl control; |
| ... | @@ -265,6 +274,7 @@ union snd_seq_event_data { /* event data... */ | ... | @@ -265,6 +274,7 @@ union snd_seq_event_data { /* event data... */ |
| 265 | 	struct snd_seq_connect connect; | 274 | 	struct snd_seq_connect connect; |
| 266 | 	struct snd_seq_result result; | 275 | 	struct snd_seq_result result; |
| 267 | 	struct snd_seq_ev_quote quote; | 276 | 	struct snd_seq_ev_quote quote; |
| 277 | 	struct snd_seq_ev_ump_notify ump_notify; | ||
| 268 | }; | 278 | }; |
| 269 | 279 | ||
| 270 | 	/* sequencer event */ | 280 | 	/* sequencer event */ |
lib/libc/include/any-linux-any/sound/asound.h+6-2| ... | @@ -708,7 +708,7 @@ enum { | ... | @@ -708,7 +708,7 @@ enum { |
| 708 | * Raw MIDI section - /dev/snd/midi?? | 708 | * Raw MIDI section - /dev/snd/midi?? |
| 709 | */ | 709 | */ |
| 710 | 710 | ||
| 711 | #define SNDRV_RAWMIDI_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 4) | 711 | #define SNDRV_RAWMIDI_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 5) |
| 712 | 712 | ||
| 713 | enum { | 713 | enum { |
| 714 | 	SNDRV_RAWMIDI_STREAM_OUTPUT = 0, | 714 | 	SNDRV_RAWMIDI_STREAM_OUTPUT = 0, |
| ... | @@ -720,6 +720,9 @@ enum { | ... | @@ -720,6 +720,9 @@ enum { |
| 720 | #define SNDRV_RAWMIDI_INFO_INPUT		0x00000002 | 720 | #define SNDRV_RAWMIDI_INFO_INPUT		0x00000002 |
| 721 | #define SNDRV_RAWMIDI_INFO_DUPLEX		0x00000004 | 721 | #define SNDRV_RAWMIDI_INFO_DUPLEX		0x00000004 |
| 722 | #define SNDRV_RAWMIDI_INFO_UMP			0x00000008 | 722 | #define SNDRV_RAWMIDI_INFO_UMP			0x00000008 |
| 723 | #define SNDRV_RAWMIDI_INFO_STREAM_INACTIVE	0x00000010 | ||
| 724 | |||
| 725 | #define SNDRV_RAWMIDI_DEVICE_UNKNOWN		0 | ||
| 723 | 726 | ||
| 724 | struct snd_rawmidi_info { | 727 | struct snd_rawmidi_info { |
| 725 | 	unsigned int device;		/* RO/WR (control): device number */ | 728 | 	unsigned int device;		/* RO/WR (control): device number */ |
| ... | @@ -732,7 +735,8 @@ struct snd_rawmidi_info { | ... | @@ -732,7 +735,8 @@ struct snd_rawmidi_info { |
| 732 | 	unsigned char subname[32];	/* name of active or selected subdevice */ | 735 | 	unsigned char subname[32];	/* name of active or selected subdevice */ |
| 733 | 	unsigned int subdevices_count; | 736 | 	unsigned int subdevices_count; |
| 734 | 	unsigned int subdevices_avail; | 737 | 	unsigned int subdevices_avail; |
| 735 | 	unsigned char reserved[64];	/* reserved for future use */ | 738 | 	int tied_device;		/* R: tied rawmidi device (UMP/legacy) */ |
| 739 | 	unsigned char reserved[60];	/* reserved for future use */ | ||
| 736 | }; | 740 | }; |
| 737 | 741 | ||
| 738 | #define SNDRV_RAWMIDI_MODE_FRAMING_MASK		(7<<0) | 742 | #define SNDRV_RAWMIDI_MODE_FRAMING_MASK		(7<<0) |
lib/libc/include/any-linux-any/sound/compress_params.h+21-2| ... | @@ -334,6 +334,14 @@ union snd_codec_options { | ... | @@ -334,6 +334,14 @@ union snd_codec_options { |
| 334 | 	struct snd_dec_wma wma_d; | 334 | 	struct snd_dec_wma wma_d; |
| 335 | 	struct snd_dec_alac alac_d; | 335 | 	struct snd_dec_alac alac_d; |
| 336 | 	struct snd_dec_ape ape_d; | 336 | 	struct snd_dec_ape ape_d; |
| 337 | 	struct { | ||
| 338 | 		__u32 out_sample_rate; | ||
| 339 | 	} src_d; | ||
| 340 | } __attribute__((packed, aligned(4))); | ||
| 341 | |||
| 342 | struct snd_codec_desc_src { | ||
| 343 | 	__u32 out_sample_rate_min; | ||
| 344 | 	__u32 out_sample_rate_max; | ||
| 337 | } __attribute__((packed, aligned(4))); | 345 | } __attribute__((packed, aligned(4))); |
| 338 | 346 | ||
| 339 | /** struct snd_codec_desc - description of codec capabilities | 347 | /** struct snd_codec_desc - description of codec capabilities |
| ... | @@ -347,6 +355,9 @@ union snd_codec_options { | ... | @@ -347,6 +355,9 @@ union snd_codec_options { |
| 347 | * @modes: Supported modes. See SND_AUDIOMODE defines | 355 | * @modes: Supported modes. See SND_AUDIOMODE defines |
| 348 | * @formats: Supported formats. See SND_AUDIOSTREAMFORMAT defines | 356 | * @formats: Supported formats. See SND_AUDIOSTREAMFORMAT defines |
| 349 | * @min_buffer: Minimum buffer size handled by codec implementation | 357 | * @min_buffer: Minimum buffer size handled by codec implementation |
| 358 | * @pcm_formats: Output (for decoders) or input (for encoders) | ||
| 359 | * PCM formats (required to accel mode, 0 for other modes) | ||
| 360 | * @u_space: union space (for codec dependent data) | ||
| 350 | * @reserved: reserved for future use | 361 | * @reserved: reserved for future use |
| 351 | * | 362 | * |
| 352 | * This structure provides a scalar value for profiles, modes and stream | 363 | * This structure provides a scalar value for profiles, modes and stream |
| ... | @@ -370,7 +381,12 @@ struct snd_codec_desc { | ... | @@ -370,7 +381,12 @@ struct snd_codec_desc { |
| 370 | 	__u32 modes; | 381 | 	__u32 modes; |
| 371 | 	__u32 formats; | 382 | 	__u32 formats; |
| 372 | 	__u32 min_buffer; | 383 | 	__u32 min_buffer; |
| 373 | 	__u32 reserved[15]; | 384 | 	__u32 pcm_formats; |
| 385 | 	union { | ||
| 386 | 		__u32 u_space[6]; | ||
| 387 | 		struct snd_codec_desc_src src; | ||
| 388 | 	} __attribute__((packed, aligned(4))); | ||
| 389 | 	__u32 reserved[8]; | ||
| 374 | } __attribute__((packed, aligned(4))); | 390 | } __attribute__((packed, aligned(4))); |
| 375 | 391 | ||
| 376 | /** struct snd_codec | 392 | /** struct snd_codec |
| ... | @@ -395,6 +411,8 @@ struct snd_codec_desc { | ... | @@ -395,6 +411,8 @@ struct snd_codec_desc { |
| 395 | * @align: Block alignment in bytes of an audio sample. | 411 | * @align: Block alignment in bytes of an audio sample. |
| 396 | *		Only required for PCM or IEC formats. | 412 | *		Only required for PCM or IEC formats. |
| 397 | * @options: encoder-specific settings | 413 | * @options: encoder-specific settings |
| 414 | * @pcm_format: Output (for decoders) or input (for encoders) | ||
| 415 | * PCM formats (required to accel mode, 0 for other modes) | ||
| 398 | * @reserved: reserved for future use | 416 | * @reserved: reserved for future use |
| 399 | */ | 417 | */ |
| 400 | 418 | ||
| ... | @@ -411,7 +429,8 @@ struct snd_codec { | ... | @@ -411,7 +429,8 @@ struct snd_codec { |
| 411 | 	__u32 format; | 429 | 	__u32 format; |
| 412 | 	__u32 align; | 430 | 	__u32 align; |
| 413 | 	union snd_codec_options options; | 431 | 	union snd_codec_options options; |
| 414 | 	__u32 reserved[3]; | 432 | 	__u32 pcm_format; |
| 433 | 	__u32 reserved[2]; | ||
| 415 | } __attribute__((packed, aligned(4))); | 434 | } __attribute__((packed, aligned(4))); |
| 416 | 435 | ||
| 417 | #endif | 436 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/fcp.h created+120| ... | @@ -0,0 +1,120 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Focusrite Control Protocol Driver for ALSA | ||
| 4 | * | ||
| 5 | * Copyright (c) 2024-2025 by Geoffrey D. Bennett <g at b4.vu> | ||
| 6 | */ | ||
| 7 | /* | ||
| 8 | * DOC: FCP (Focusrite Control Protocol) User-Space API | ||
| 9 | * | ||
| 10 | * This header defines the interface between the FCP kernel driver and | ||
| 11 | * user-space programs to enable the use of the proprietary features | ||
| 12 | * available in Focusrite USB audio interfaces. This includes Scarlett | ||
| 13 | * 2nd Gen, 3rd Gen, 4th Gen, Clarett USB, Clarett+, and Vocaster | ||
| 14 | * series devices. | ||
| 15 | * | ||
| 16 | * The interface is provided via ALSA's hwdep interface. Opening the | ||
| 17 | * hwdep device requires CAP_SYS_RAWIO privileges as this interface | ||
| 18 | * provides near-direct access. | ||
| 19 | * | ||
| 20 | * For details on the FCP protocol, refer to the kernel scarlett2 | ||
| 21 | * driver in sound/usb/mixer_scarlett2.c and the fcp-support project | ||
| 22 | * at https://github.com/geoffreybennett/fcp-support | ||
| 23 | * | ||
| 24 | * For examples of using these IOCTLs, see the fcp-server source in | ||
| 25 | * the fcp-support project. | ||
| 26 | * | ||
| 27 | * IOCTL Interface | ||
| 28 | * -------------- | ||
| 29 | * FCP_IOCTL_PVERSION: | ||
| 30 | * Returns the protocol version supported by the driver. | ||
| 31 | * | ||
| 32 | * FCP_IOCTL_INIT: | ||
| 33 | * Initialises the protocol and synchronises sequence numbers | ||
| 34 | * between the driver and device. Must be called at least once | ||
| 35 | * before sending commands. Can be safely called again at any time. | ||
| 36 | * | ||
| 37 | * FCP_IOCTL_CMD: | ||
| 38 | * Sends an FCP command to the device and returns the response. | ||
| 39 | * Requires prior initialisation via FCP_IOCTL_INIT. | ||
| 40 | * | ||
| 41 | * FCP_IOCTL_SET_METER_MAP: | ||
| 42 | * Configures the Level Meter control's mapping between device | ||
| 43 | * meters and control channels. Requires FCP_IOCTL_INIT to have been | ||
| 44 | * called first. The map size and number of slots cannot be changed | ||
| 45 | * after initial configuration, although the map itself can be | ||
| 46 | * updated. Once configured, the Level Meter remains functional even | ||
| 47 | * after the hwdep device is closed. | ||
| 48 | * | ||
| 49 | * FCP_IOCTL_SET_METER_LABELS: | ||
| 50 | * Set the labels for the Level Meter control. Requires | ||
| 51 | * FCP_IOCTL_SET_METER_MAP to have been called first. labels[] | ||
| 52 | * should contain a sequence of null-terminated labels corresponding | ||
| 53 | * to the control's channels. | ||
| 54 | */ | ||
| 55 | #ifndef __UAPI_SOUND_FCP_H | ||
| 56 | #define __UAPI_SOUND_FCP_H | ||
| 57 | |||
| 58 | #include <linux/types.h> | ||
| 59 | #include <linux/ioctl.h> | ||
| 60 | |||
| 61 | #define FCP_HWDEP_MAJOR 2 | ||
| 62 | #define FCP_HWDEP_MINOR 0 | ||
| 63 | #define FCP_HWDEP_SUBMINOR 0 | ||
| 64 | |||
| 65 | #define FCP_HWDEP_VERSION \ | ||
| 66 | 	((FCP_HWDEP_MAJOR << 16) | \ | ||
| 67 | 	 (FCP_HWDEP_MINOR << 8) | \ | ||
| 68 | 	 FCP_HWDEP_SUBMINOR) | ||
| 69 | |||
| 70 | #define FCP_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF) | ||
| 71 | #define FCP_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF) | ||
| 72 | #define FCP_HWDEP_VERSION_SUBMINOR(v) ((v) & 0xFF) | ||
| 73 | |||
| 74 | /* Get protocol version */ | ||
| 75 | #define FCP_IOCTL_PVERSION _IOR('S', 0x60, int) | ||
| 76 | |||
| 77 | /* Start the protocol */ | ||
| 78 | |||
| 79 | /* Step 0 and step 2 responses are variable length and placed in | ||
| 80 | * resp[] one after the other. | ||
| 81 | */ | ||
| 82 | struct fcp_init { | ||
| 83 | 	__u16 step0_resp_size; | ||
| 84 | 	__u16 step2_resp_size; | ||
| 85 | 	__u32 init1_opcode; | ||
| 86 | 	__u32 init2_opcode; | ||
| 87 | 	__u8 resp[]; | ||
| 88 | } __attribute__((packed)); | ||
| 89 | |||
| 90 | #define FCP_IOCTL_INIT _IOWR('S', 0x64, struct fcp_init) | ||
| 91 | |||
| 92 | /* Perform a command */ | ||
| 93 | |||
| 94 | /* The request data is placed in data[] and the response data will | ||
| 95 | * overwrite it. | ||
| 96 | */ | ||
| 97 | struct fcp_cmd { | ||
| 98 | 	__u32 opcode; | ||
| 99 | 	__u16 req_size; | ||
| 100 | 	__u16 resp_size; | ||
| 101 | 	__u8 data[]; | ||
| 102 | } __attribute__((packed)); | ||
| 103 | #define FCP_IOCTL_CMD _IOWR('S', 0x65, struct fcp_cmd) | ||
| 104 | |||
| 105 | /* Set the meter map */ | ||
| 106 | struct fcp_meter_map { | ||
| 107 | 	__u16 map_size; | ||
| 108 | 	__u16 meter_slots; | ||
| 109 | 	__s16 map[]; | ||
| 110 | } __attribute__((packed)); | ||
| 111 | #define FCP_IOCTL_SET_METER_MAP _IOW('S', 0x66, struct fcp_meter_map) | ||
| 112 | |||
| 113 | /* Set the meter labels */ | ||
| 114 | struct fcp_meter_labels { | ||
| 115 | 	__u16 labels_size; | ||
| 116 | 	char labels[]; | ||
| 117 | } __attribute__((packed)); | ||
| 118 | #define FCP_IOCTL_SET_METER_LABELS _IOW('S', 0x67, struct fcp_meter_labels) | ||
| 119 | |||
| 120 | #endif /* __UAPI_SOUND_FCP_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-linux-any/sound/intel/avs/tokens.h+11| ... | @@ -77,6 +77,17 @@ enum avs_tplg_token { | ... | @@ -77,6 +77,17 @@ enum avs_tplg_token { |
| 77 | 	AVS_TKN_MODCFG_UPDOWN_MIX_CHAN_MAP_U32		= 430, | 77 | 	AVS_TKN_MODCFG_UPDOWN_MIX_CHAN_MAP_U32		= 430, |
| 78 | 	AVS_TKN_MODCFG_EXT_NUM_INPUT_PINS_U16		= 431, | 78 | 	AVS_TKN_MODCFG_EXT_NUM_INPUT_PINS_U16		= 431, |
| 79 | 	AVS_TKN_MODCFG_EXT_NUM_OUTPUT_PINS_U16		= 432, | 79 | 	AVS_TKN_MODCFG_EXT_NUM_OUTPUT_PINS_U16		= 432, |
| 80 | 	AVS_TKN_MODCFG_WHM_REF_AFMT_ID_U32		= 433, | ||
| 81 | 	AVS_TKN_MODCFG_WHM_OUT_AFMT_ID_U32		= 434, | ||
| 82 | 	AVS_TKN_MODCFG_WHM_WAKE_TICK_PERIOD_U32		= 435, | ||
| 83 | 	AVS_TKN_MODCFG_WHM_VINDEX_U8			= 436, | ||
| 84 | 	AVS_TKN_MODCFG_WHM_DMA_TYPE_U32			= 437, | ||
| 85 | 	AVS_TKN_MODCFG_WHM_DMABUFF_SIZE_U32		= 438, | ||
| 86 | 	AVS_TKN_MODCFG_WHM_BLOB_AFMT_ID_U32		= 439, | ||
| 87 | 	AVS_TKN_MODCFG_PEAKVOL_VOLUME_U32		= 440, | ||
| 88 | 	AVS_TKN_MODCFG_PEAKVOL_CHANNEL_ID_U32		= 441, /* reserved */ | ||
| 89 | 	AVS_TKN_MODCFG_PEAKVOL_CURVE_TYPE_U32		= 442, | ||
| 90 | 	AVS_TKN_MODCFG_PEAKVOL_CURVE_DURATION_U32	= 443, | ||
| 80 | 91 | ||
| 81 | 	/* struct avs_tplg_pplcfg */ | 92 | 	/* struct avs_tplg_pplcfg */ |
| 82 | 	AVS_TKN_PPLCFG_ID_U32				= 1401, | 93 | 	AVS_TKN_PPLCFG_ID_U32				= 1401, |
lib/libc/include/any-linux-any/sound/sof/tokens.h+2| ... | @@ -153,6 +153,8 @@ | ... | @@ -153,6 +153,8 @@ |
| 153 | /* Stream */ | 153 | /* Stream */ |
| 154 | #define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3	1200 | 154 | #define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3	1200 |
| 155 | #define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3	1201 | 155 | #define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3	1201 |
| 156 | #define SOF_TKN_STREAM_PLAYBACK_PAUSE_SUPPORTED	1202 | ||
| 157 | #define SOF_TKN_STREAM_CAPTURE_PAUSE_SUPPORTED	1203 | ||
| 156 | 158 | ||
| 157 | /* Led control for mute switches */ | 159 | /* Led control for mute switches */ |
| 158 | #define SOF_TKN_MUTE_LED_USE			1300 | 160 | #define SOF_TKN_MUTE_LED_USE			1300 |
lib/libc/include/any-linux-any/sound/tlv.h+2| ... | @@ -18,6 +18,8 @@ | ... | @@ -18,6 +18,8 @@ |
| 18 | #define SNDRV_CTL_TLVT_CHMAP_VAR	0x102	/* channels freely swappable */ | 18 | #define SNDRV_CTL_TLVT_CHMAP_VAR	0x102	/* channels freely swappable */ |
| 19 | #define SNDRV_CTL_TLVT_CHMAP_PAIRED	0x103	/* pair-wise swappable */ | 19 | #define SNDRV_CTL_TLVT_CHMAP_PAIRED	0x103	/* pair-wise swappable */ |
| 20 | 20 | ||
| 21 | #define SNDRV_CTL_TLVT_FCP_CHANNEL_LABELS	0x110	/* channel labels */ | ||
| 22 | |||
| 21 | /* | 23 | /* |
| 22 | * TLV structure is right behind the struct snd_ctl_tlv: | 24 | * TLV structure is right behind the struct snd_ctl_tlv: |
| 23 | * unsigned int type 	- see SNDRV_CTL_TLVT_* | 25 | * unsigned int type 	- see SNDRV_CTL_TLVT_* |
lib/libc/include/arc-linux-any/asm/ptrace.h+2-2| ... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | ||
| 15 | #define PTRACE_GET_THREAD_AREA	25 | 15 | #define PTRACE_GET_THREAD_AREA	25 |
| 16 | 16 | ||
| 17 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLER__ |
| 18 | /* | 18 | /* |
| 19 | * Userspace ABI: Register state needed by | 19 | * Userspace ABI: Register state needed by |
| 20 | * -ptrace (gdbserver) | 20 | * -ptrace (gdbserver) |
| ... | @@ -53,6 +53,6 @@ struct user_regs_arcv2 { | ... | @@ -53,6 +53,6 @@ struct user_regs_arcv2 { |
| 53 | 	unsigned long r30, r58, r59; | 53 | 	unsigned long r30, r58, r59; |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | #endif /* !__ASSEMBLY__ */ | 56 | #endif /* !__ASSEMBLER__ */ |
| 57 | 57 | ||
| 58 | #endif /* __ASM_ARC_PTRACE_H */ | 58 | #endif /* __ASM_ARC_PTRACE_H */ |
| \ No newline at end of file | |||
lib/libc/include/arc-linux-any/asm/unistd_32.h+3| ... | @@ -347,6 +347,9 @@ | ... | @@ -347,6 +347,9 @@ |
| 347 | #define __NR_getxattrat 464 | 347 | #define __NR_getxattrat 464 |
| 348 | #define __NR_listxattrat 465 | 348 | #define __NR_listxattrat 465 |
| 349 | #define __NR_removexattrat 466 | 349 | #define __NR_removexattrat 466 |
| 350 | #define __NR_open_tree_attr 467 | ||
| 351 | #define __NR_file_getattr 468 | ||
| 352 | #define __NR_file_setattr 469 | ||
| 350 | 353 | ||
| 351 | 354 | ||
| 352 | #endif /* _ASM_UNISTD_32_H */ | 355 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/arm-linux-any/asm/unistd-eabi.h+3| ... | @@ -420,5 +420,8 @@ | ... | @@ -420,5 +420,8 @@ |
| 420 | #define __NR_getxattrat (__NR_SYSCALL_BASE + 464) | 420 | #define __NR_getxattrat (__NR_SYSCALL_BASE + 464) |
| 421 | #define __NR_listxattrat (__NR_SYSCALL_BASE + 465) | 421 | #define __NR_listxattrat (__NR_SYSCALL_BASE + 465) |
| 422 | #define __NR_removexattrat (__NR_SYSCALL_BASE + 466) | 422 | #define __NR_removexattrat (__NR_SYSCALL_BASE + 466) |
| 423 | #define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467) | ||
| 424 | #define __NR_file_getattr (__NR_SYSCALL_BASE + 468) | ||
| 425 | #define __NR_file_setattr (__NR_SYSCALL_BASE + 469) | ||
| 423 | 426 | ||
| 424 | #endif /* _ASM_UNISTD_EABI_H */ | 427 | #endif /* _ASM_UNISTD_EABI_H */ |
| \ No newline at end of file | |||
lib/libc/include/arm-linux-any/asm/unistd-oabi.h+3| ... | @@ -432,5 +432,8 @@ | ... | @@ -432,5 +432,8 @@ |
| 432 | #define __NR_getxattrat (__NR_SYSCALL_BASE + 464) | 432 | #define __NR_getxattrat (__NR_SYSCALL_BASE + 464) |
| 433 | #define __NR_listxattrat (__NR_SYSCALL_BASE + 465) | 433 | #define __NR_listxattrat (__NR_SYSCALL_BASE + 465) |
| 434 | #define __NR_removexattrat (__NR_SYSCALL_BASE + 466) | 434 | #define __NR_removexattrat (__NR_SYSCALL_BASE + 466) |
| 435 | #define __NR_open_tree_attr (__NR_SYSCALL_BASE + 467) | ||
| 436 | #define __NR_file_getattr (__NR_SYSCALL_BASE + 468) | ||
| 437 | #define __NR_file_setattr (__NR_SYSCALL_BASE + 469) | ||
| 435 | 438 | ||
| 436 | #endif /* _ASM_UNISTD_OABI_H */ | 439 | #endif /* _ASM_UNISTD_OABI_H */ |
| \ No newline at end of file | |||
lib/libc/include/csky-linux-any/asm/setup.h created+1| ... | @@ -0,0 +1 @@ | ||
| 1 | #include <asm-generic/setup.h> | ||
| \ No newline at end of file | |||
lib/libc/include/csky-linux-any/asm/unistd_32.h+3| ... | @@ -343,6 +343,9 @@ | ... | @@ -343,6 +343,9 @@ |
| 343 | #define __NR_getxattrat 464 | 343 | #define __NR_getxattrat 464 |
| 344 | #define __NR_listxattrat 465 | 344 | #define __NR_listxattrat 465 |
| 345 | #define __NR_removexattrat 466 | 345 | #define __NR_removexattrat 466 |
| 346 | #define __NR_open_tree_attr 467 | ||
| 347 | #define __NR_file_getattr 468 | ||
| 348 | #define __NR_file_setattr 469 | ||
| 346 | 349 | ||
| 347 | 350 | ||
| 348 | #endif /* _ASM_UNISTD_32_H */ | 351 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/hexagon-linux-any/asm/setup.h+2-8| ... | @@ -17,15 +17,9 @@ | ... | @@ -17,15 +17,9 @@ |
| 17 | * 02110-1301, USA. | 17 | * 02110-1301, USA. |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #ifndef _ASM_SETUP_H | 20 | #ifndef _ASM_HEXAGON_SETUP_H |
| 21 | #define _ASM_SETUP_H | 21 | #define _ASM_HEXAGON_SETUP_H |
| 22 | |||
| 23 | #define __init | ||
| 24 | 22 | ||
| 25 | #include <asm-generic/setup.h> | 23 | #include <asm-generic/setup.h> |
| 26 | 24 | ||
| 27 | extern char external_cmdline_buffer; | ||
| 28 | |||
| 29 | void __init setup_arch_memory(void); | ||
| 30 | |||
| 31 | #endif | 25 | #endif |
| \ No newline at end of file | |||
lib/libc/include/hexagon-linux-any/asm/unistd_32.h+3| ... | @@ -342,6 +342,9 @@ | ... | @@ -342,6 +342,9 @@ |
| 342 | #define __NR_getxattrat 464 | 342 | #define __NR_getxattrat 464 |
| 343 | #define __NR_listxattrat 465 | 343 | #define __NR_listxattrat 465 |
| 344 | #define __NR_removexattrat 466 | 344 | #define __NR_removexattrat 466 |
| 345 | #define __NR_open_tree_attr 467 | ||
| 346 | #define __NR_file_getattr 468 | ||
| 347 | #define __NR_file_setattr 469 | ||
| 345 | 348 | ||
| 346 | 349 | ||
| 347 | #endif /* _ASM_UNISTD_32_H */ | 350 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/loongarch-linux-any/asm/kvm_para.h+1| ... | @@ -17,5 +17,6 @@ | ... | @@ -17,5 +17,6 @@ |
| 17 | #define KVM_FEATURE_STEAL_TIME		2 | 17 | #define KVM_FEATURE_STEAL_TIME		2 |
| 18 | /* BIT 24 - 31 are features configurable by user space vmm */ | 18 | /* BIT 24 - 31 are features configurable by user space vmm */ |
| 19 | #define KVM_FEATURE_VIRT_EXTIOI	24 | 19 | #define KVM_FEATURE_VIRT_EXTIOI	24 |
| 20 | #define KVM_FEATURE_USER_HCALL		25 | ||
| 20 | 21 | ||
| 21 | #endif /* _ASM_KVM_PARA_H */ | 22 | #endif /* _ASM_KVM_PARA_H */ |
| \ No newline at end of file | |||
lib/libc/include/loongarch-linux-any/asm/setup.h created+8| ... | @@ -0,0 +1,8 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | |||
| 3 | #ifndef _ASM_LOONGARCH_SETUP_H | ||
| 4 | #define _ASM_LOONGARCH_SETUP_H | ||
| 5 | |||
| 6 | #define COMMAND_LINE_SIZE	4096 | ||
| 7 | |||
| 8 | #endif /* _ASM_LOONGARCH_SETUP_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/loongarch-linux-any/asm/unistd_64.h+3| ... | @@ -319,6 +319,9 @@ | ... | @@ -319,6 +319,9 @@ |
| 319 | #define __NR_getxattrat 464 | 319 | #define __NR_getxattrat 464 |
| 320 | #define __NR_listxattrat 465 | 320 | #define __NR_listxattrat 465 |
| 321 | #define __NR_removexattrat 466 | 321 | #define __NR_removexattrat 466 |
| 322 | #define __NR_open_tree_attr 467 | ||
| 323 | #define __NR_file_getattr 468 | ||
| 324 | #define __NR_file_setattr 469 | ||
| 322 | 325 | ||
| 323 | 326 | ||
| 324 | #endif /* _ASM_UNISTD_64_H */ | 327 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/m68k-linux-any/asm/bootinfo-vme.h+2-2| ... | @@ -33,7 +33,7 @@ | ... | @@ -33,7 +33,7 @@ |
| 33 | #define VME_TYPE_BVME6000	0x6000	/* BVM Ltd. BVME6000 */ | 33 | #define VME_TYPE_BVME6000	0x6000	/* BVM Ltd. BVME6000 */ |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | #ifndef __ASSEMBLY__ | 36 | #ifndef __ASSEMBLER__ |
| 37 | 37 | ||
| 38 | /* | 38 | /* |
| 39 | * Board ID data structure - pointer to this retrieved from Bug by head.S | 39 | * Board ID data structure - pointer to this retrieved from Bug by head.S |
| ... | @@ -56,7 +56,7 @@ typedef struct { | ... | @@ -56,7 +56,7 @@ typedef struct { |
| 56 | 	__be32	option2; | 56 | 	__be32	option2; |
| 57 | } t_bdid, *p_bdid; | 57 | } t_bdid, *p_bdid; |
| 58 | 58 | ||
| 59 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLER__ */ |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | /* | 62 | /* |
lib/libc/include/m68k-linux-any/asm/bootinfo.h+4-4| ... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLER__ |
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * Bootinfo definitions | 22 | * Bootinfo definitions |
| ... | @@ -43,7 +43,7 @@ struct mem_info { | ... | @@ -43,7 +43,7 @@ struct mem_info { |
| 43 | 	__be32 size;			/* length of memory chunk (in bytes) */ | 43 | 	__be32 size;			/* length of memory chunk (in bytes) */ |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | #endif /* __ASSEMBLY__ */ | 46 | #endif /* __ASSEMBLER__ */ |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | /* | 49 | /* |
| ... | @@ -167,7 +167,7 @@ struct mem_info { | ... | @@ -167,7 +167,7 @@ struct mem_info { |
| 167 | #define BI_VERSION_MAJOR(v)		(((v) >> 16) & 0xffff) | 167 | #define BI_VERSION_MAJOR(v)		(((v) >> 16) & 0xffff) |
| 168 | #define BI_VERSION_MINOR(v)		((v) & 0xffff) | 168 | #define BI_VERSION_MINOR(v)		((v) & 0xffff) |
| 169 | 169 | ||
| 170 | #ifndef __ASSEMBLY__ | 170 | #ifndef __ASSEMBLER__ |
| 171 | 171 | ||
| 172 | struct bootversion { | 172 | struct bootversion { |
| 173 | 	__be16 branch; | 173 | 	__be16 branch; |
| ... | @@ -178,7 +178,7 @@ struct bootversion { | ... | @@ -178,7 +178,7 @@ struct bootversion { |
| 178 | 	} machversions[]; | 178 | 	} machversions[]; |
| 179 | } __attribute__((packed)); | 179 | } __attribute__((packed)); |
| 180 | 180 | ||
| 181 | #endif /* __ASSEMBLY__ */ | 181 | #endif /* __ASSEMBLER__ */ |
| 182 | 182 | ||
| 183 | 183 | ||
| 184 | #endif /* _ASM_M68K_BOOTINFO_H */ | 184 | #endif /* _ASM_M68K_BOOTINFO_H */ |
| \ No newline at end of file | |||
lib/libc/include/m68k-linux-any/asm/ptrace.h+2-2| ... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
| 22 | #define PT_SR	 17 | 22 | #define PT_SR	 17 |
| 23 | #define PT_PC	 18 | 23 | #define PT_PC	 18 |
| 24 | 24 | ||
| 25 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLER__ |
| 26 | 26 | ||
| 27 | /* this struct defines the way the registers are stored on the | 27 | /* this struct defines the way the registers are stored on the |
| 28 | stack during a system call. */ | 28 | stack during a system call. */ |
| ... | @@ -81,5 +81,5 @@ struct switch_stack { | ... | @@ -81,5 +81,5 @@ struct switch_stack { |
| 81 | #define PTRACE_GETFDPIC_EXEC	0 | 81 | #define PTRACE_GETFDPIC_EXEC	0 |
| 82 | #define PTRACE_GETFDPIC_INTERP	1 | 82 | #define PTRACE_GETFDPIC_INTERP	1 |
| 83 | 83 | ||
| 84 | #endif /* __ASSEMBLY__ */ | 84 | #endif /* __ASSEMBLER__ */ |
| 85 | #endif /* _M68K_PTRACE_H */ | 85 | #endif /* _M68K_PTRACE_H */ |
| \ No newline at end of file | |||
lib/libc/include/m68k-linux-any/asm/unistd_32.h+3| ... | @@ -439,6 +439,9 @@ | ... | @@ -439,6 +439,9 @@ |
| 439 | #define __NR_getxattrat 464 | 439 | #define __NR_getxattrat 464 |
| 440 | #define __NR_listxattrat 465 | 440 | #define __NR_listxattrat 465 |
| 441 | #define __NR_removexattrat 466 | 441 | #define __NR_removexattrat 466 |
| 442 | #define __NR_open_tree_attr 467 | ||
| 443 | #define __NR_file_getattr 468 | ||
| 444 | #define __NR_file_setattr 469 | ||
| 442 | 445 | ||
| 443 | 446 | ||
| 444 | #endif /* _ASM_UNISTD_32_H */ | 447 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/mips-linux-any/asm/socket.h+7| ... | @@ -159,6 +159,13 @@ | ... | @@ -159,6 +159,13 @@ |
| 159 | 159 | ||
| 160 | #define SCM_TS_OPT_ID		81 | 160 | #define SCM_TS_OPT_ID		81 |
| 161 | 161 | ||
| 162 | #define SO_RCVPRIORITY		82 | ||
| 163 | |||
| 164 | #define SO_PASSRIGHTS		83 | ||
| 165 | |||
| 166 | #define SO_INQ			84 | ||
| 167 | #define SCM_INQ			SO_INQ | ||
| 168 | |||
| 162 | 169 | ||
| 163 | #if __BITS_PER_LONG == 64 | 170 | #if __BITS_PER_LONG == 64 |
| 164 | #define SO_TIMESTAMP		SO_TIMESTAMP_OLD | 171 | #define SO_TIMESTAMP		SO_TIMESTAMP_OLD |
lib/libc/include/mips-linux-any/asm/unistd_n32.h+3| ... | @@ -395,5 +395,8 @@ | ... | @@ -395,5 +395,8 @@ |
| 395 | #define __NR_getxattrat (__NR_Linux + 464) | 395 | #define __NR_getxattrat (__NR_Linux + 464) |
| 396 | #define __NR_listxattrat (__NR_Linux + 465) | 396 | #define __NR_listxattrat (__NR_Linux + 465) |
| 397 | #define __NR_removexattrat (__NR_Linux + 466) | 397 | #define __NR_removexattrat (__NR_Linux + 466) |
| 398 | #define __NR_open_tree_attr (__NR_Linux + 467) | ||
| 399 | #define __NR_file_getattr (__NR_Linux + 468) | ||
| 400 | #define __NR_file_setattr (__NR_Linux + 469) | ||
| 398 | 401 | ||
| 399 | #endif /* _ASM_UNISTD_N32_H */ | 402 | #endif /* _ASM_UNISTD_N32_H */ |
| \ No newline at end of file | |||
lib/libc/include/mips-linux-any/asm/unistd_n64.h+3| ... | @@ -371,5 +371,8 @@ | ... | @@ -371,5 +371,8 @@ |
| 371 | #define __NR_getxattrat (__NR_Linux + 464) | 371 | #define __NR_getxattrat (__NR_Linux + 464) |
| 372 | #define __NR_listxattrat (__NR_Linux + 465) | 372 | #define __NR_listxattrat (__NR_Linux + 465) |
| 373 | #define __NR_removexattrat (__NR_Linux + 466) | 373 | #define __NR_removexattrat (__NR_Linux + 466) |
| 374 | #define __NR_open_tree_attr (__NR_Linux + 467) | ||
| 375 | #define __NR_file_getattr (__NR_Linux + 468) | ||
| 376 | #define __NR_file_setattr (__NR_Linux + 469) | ||
| 374 | 377 | ||
| 375 | #endif /* _ASM_UNISTD_N64_H */ | 378 | #endif /* _ASM_UNISTD_N64_H */ |
| \ No newline at end of file | |||
lib/libc/include/mips-linux-any/asm/unistd_o32.h+3| ... | @@ -441,5 +441,8 @@ | ... | @@ -441,5 +441,8 @@ |
| 441 | #define __NR_getxattrat (__NR_Linux + 464) | 441 | #define __NR_getxattrat (__NR_Linux + 464) |
| 442 | #define __NR_listxattrat (__NR_Linux + 465) | 442 | #define __NR_listxattrat (__NR_Linux + 465) |
| 443 | #define __NR_removexattrat (__NR_Linux + 466) | 443 | #define __NR_removexattrat (__NR_Linux + 466) |
| 444 | #define __NR_open_tree_attr (__NR_Linux + 467) | ||
| 445 | #define __NR_file_getattr (__NR_Linux + 468) | ||
| 446 | #define __NR_file_setattr (__NR_Linux + 469) | ||
| 444 | 447 | ||
| 445 | #endif /* _ASM_UNISTD_O32_H */ | 448 | #endif /* _ASM_UNISTD_O32_H */ |
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/eeh.h-13| ... | @@ -1,18 +1,5 @@ | ... | @@ -1,18 +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 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License, version 2, as | ||
| 5 | * published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | * | ||
| 12 | * You should have received a copy of the GNU General Public License | ||
| 13 | * along with this program; if not, write to the Free Software | ||
| 14 | * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 15 | * | ||
| 16 | * Copyright IBM Corp. 2015 | 3 | * Copyright IBM Corp. 2015 |
| 17 | * | 4 | * |
| 18 | * Authors: Gavin Shan <gwshan@linux.vnet.ibm.com> | 5 | * Authors: Gavin Shan <gwshan@linux.vnet.ibm.com> |
lib/libc/include/powerpc-linux-any/asm/ioctls.h+4-4| ... | @@ -23,10 +23,10 @@ | ... | @@ -23,10 +23,10 @@ |
| 23 | #define TCSETSW		_IOW('t', 21, struct termios) | 23 | #define TCSETSW		_IOW('t', 21, struct termios) |
| 24 | #define TCSETSF		_IOW('t', 22, struct termios) | 24 | #define TCSETSF		_IOW('t', 22, struct termios) |
| 25 | 25 | ||
| 26 | #define TCGETA		_IOR('t', 23, struct termio) | 26 | #define TCGETA		0x40147417 /* _IOR('t', 23, struct termio) */ |
| 27 | #define TCSETA		_IOW('t', 24, struct termio) | 27 | #define TCSETA		0x80147418 /* _IOW('t', 24, struct termio) */ |
| 28 | #define TCSETAW		_IOW('t', 25, struct termio) | 28 | #define TCSETAW		0x80147419 /* _IOW('t', 25, struct termio) */ |
| 29 | #define TCSETAF		_IOW('t', 28, struct termio) | 29 | #define TCSETAF		0x8014741c /* _IOW('t', 28, struct termio) */ |
| 30 | 30 | ||
| 31 | #define TCSBRK		_IO('t', 29) | 31 | #define TCSBRK		_IO('t', 29) |
| 32 | #define TCXONC		_IO('t', 30) | 32 | #define TCXONC		_IO('t', 30) |
lib/libc/include/powerpc-linux-any/asm/kvm.h-13| ... | @@ -1,18 +1,5 @@ | ... | @@ -1,18 +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 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License, version 2, as | ||
| 5 | * published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | * | ||
| 12 | * You should have received a copy of the GNU General Public License | ||
| 13 | * along with this program; if not, write to the Free Software | ||
| 14 | * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 15 | * | ||
| 16 | * Copyright IBM Corp. 2007 | 3 | * Copyright IBM Corp. 2007 |
| 17 | * | 4 | * |
| 18 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> | 5 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> |
lib/libc/include/powerpc-linux-any/asm/kvm_para.h-13| ... | @@ -1,18 +1,5 @@ | ... | @@ -1,18 +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 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License, version 2, as | ||
| 5 | * published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | * | ||
| 12 | * You should have received a copy of the GNU General Public License | ||
| 13 | * along with this program; if not, write to the Free Software | ||
| 14 | * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 15 | * | ||
| 16 | * Copyright IBM Corp. 2008 | 3 | * Copyright IBM Corp. 2008 |
| 17 | * | 4 | * |
| 18 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> | 5 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> |
lib/libc/include/powerpc-linux-any/asm/papr-indices.h created+41| ... | @@ -0,0 +1,41 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _PAPR_INDICES_H_ | ||
| 3 | #define _PAPR_INDICES_H_ | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | #include <asm/ioctl.h> | ||
| 7 | #include <asm/papr-miscdev.h> | ||
| 8 | |||
| 9 | #define LOC_CODE_SIZE			80 | ||
| 10 | #define RTAS_GET_INDICES_BUF_SIZE	SZ_4K | ||
| 11 | |||
| 12 | struct papr_indices_io_block { | ||
| 13 | 	union { | ||
| 14 | 		struct { | ||
| 15 | 			__u8 is_sensor; /* 0 for indicator and 1 for sensor */ | ||
| 16 | 			__u32 indice_type; | ||
| 17 | 		} indices; | ||
| 18 | 		struct { | ||
| 19 | 			__u32 token; /* Sensor or indicator token */ | ||
| 20 | 			__u32 state; /* get / set state */ | ||
| 21 | 			/* | ||
| 22 | 			 * PAPR+ 12.3.2.4 Converged Location Code Rules - Length | ||
| 23 | 			 * Restrictions. 79 characters plus null. | ||
| 24 | 			 */ | ||
| 25 | 			char location_code_str[LOC_CODE_SIZE]; /* location code */ | ||
| 26 | 		} dynamic_param; | ||
| 27 | 	}; | ||
| 28 | }; | ||
| 29 | |||
| 30 | /* | ||
| 31 | * ioctls for /dev/papr-indices. | ||
| 32 | * PAPR_INDICES_IOC_GET: Returns a get-indices handle fd to read data | ||
| 33 | * PAPR_DYNAMIC_SENSOR_IOC_GET: Gets the state of the input sensor | ||
| 34 | * PAPR_DYNAMIC_INDICATOR_IOC_SET: Sets the new state for the input indicator | ||
| 35 | */ | ||
| 36 | #define PAPR_INDICES_IOC_GET		_IOW(PAPR_MISCDEV_IOC_ID, 3, struct papr_indices_io_block) | ||
| 37 | #define PAPR_DYNAMIC_SENSOR_IOC_GET	_IOWR(PAPR_MISCDEV_IOC_ID, 4, struct papr_indices_io_block) | ||
| 38 | #define PAPR_DYNAMIC_INDICATOR_IOC_SET	_IOW(PAPR_MISCDEV_IOC_ID, 5, struct papr_indices_io_block) | ||
| 39 | |||
| 40 | |||
| 41 | #endif /* _PAPR_INDICES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/papr-physical-attestation.h created+31| ... | @@ -0,0 +1,31 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _PAPR_PHYSICAL_ATTESTATION_H_ | ||
| 3 | #define _PAPR_PHYSICAL_ATTESTATION_H_ | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | #include <asm/ioctl.h> | ||
| 7 | #include <asm/papr-miscdev.h> | ||
| 8 | |||
| 9 | #define PAPR_PHYATTEST_MAX_INPUT 4084 /* Max 4K buffer: 4K-12 */ | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Defined in PAPR 2.13+ 21.6 Attestation Command Structures. | ||
| 13 | * User space pass this struct and the max size should be 4K. | ||
| 14 | */ | ||
| 15 | struct papr_phy_attest_io_block { | ||
| 16 | 	__u8 version; | ||
| 17 | 	__u8 command; | ||
| 18 | 	__u8 TCG_major_ver; | ||
| 19 | 	__u8 TCG_minor_ver; | ||
| 20 | 	__be32 length; | ||
| 21 | 	__be32 correlator; | ||
| 22 | 	__u8 payload[PAPR_PHYATTEST_MAX_INPUT]; | ||
| 23 | }; | ||
| 24 | |||
| 25 | /* | ||
| 26 | * ioctl for /dev/papr-physical-attestation. Returns a attestation | ||
| 27 | * command fd handle | ||
| 28 | */ | ||
| 29 | #define PAPR_PHY_ATTEST_IOC_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 8, struct papr_phy_attest_io_block) | ||
| 30 | |||
| 31 | #endif /* _PAPR_PHYSICAL_ATTESTATION_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/papr-platform-dump.h created+16| ... | @@ -0,0 +1,16 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _PAPR_PLATFORM_DUMP_H_ | ||
| 3 | #define _PAPR_PLATFORM_DUMP_H_ | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | #include <asm/ioctl.h> | ||
| 7 | #include <asm/papr-miscdev.h> | ||
| 8 | |||
| 9 | /* | ||
| 10 | * ioctl for /dev/papr-platform-dump. Returns a platform-dump handle fd | ||
| 11 | * corresponding to dump tag. | ||
| 12 | */ | ||
| 13 | #define PAPR_PLATFORM_DUMP_IOC_CREATE_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 6, __u64) | ||
| 14 | #define PAPR_PLATFORM_DUMP_IOC_INVALIDATE _IOW(PAPR_MISCDEV_IOC_ID, 7, __u64) | ||
| 15 | |||
| 16 | #endif /* _PAPR_PLATFORM_DUMP_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/ps3fb.h-13| ... | @@ -2,19 +2,6 @@ | ... | @@ -2,19 +2,6 @@ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (C) 2006 Sony Computer Entertainment Inc. | 3 | * Copyright (C) 2006 Sony Computer Entertainment Inc. |
| 4 | * Copyright 2006, 2007 Sony Corporation | 4 | * Copyright 2006, 2007 Sony Corporation |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published | ||
| 8 | * by the Free Software Foundation; version 2 of the License. | ||
| 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 along | ||
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 18 | */ | 5 | */ |
| 19 | 6 | ||
| 20 | #ifndef _ASM_POWERPC_PS3FB_H_ | 7 | #ifndef _ASM_POWERPC_PS3FB_H_ |
lib/libc/include/powerpc-linux-any/asm/unistd_32.h+3| ... | @@ -448,6 +448,9 @@ | ... | @@ -448,6 +448,9 @@ |
| 448 | #define __NR_getxattrat 464 | 448 | #define __NR_getxattrat 464 |
| 449 | #define __NR_listxattrat 465 | 449 | #define __NR_listxattrat 465 |
| 450 | #define __NR_removexattrat 466 | 450 | #define __NR_removexattrat 466 |
| 451 | #define __NR_open_tree_attr 467 | ||
| 452 | #define __NR_file_getattr 468 | ||
| 453 | #define __NR_file_setattr 469 | ||
| 451 | 454 | ||
| 452 | 455 | ||
| 453 | #endif /* _ASM_UNISTD_32_H */ | 456 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/powerpc-linux-any/asm/unistd_64.h+3| ... | @@ -420,6 +420,9 @@ | ... | @@ -420,6 +420,9 @@ |
| 420 | #define __NR_getxattrat 464 | 420 | #define __NR_getxattrat 464 |
| 421 | #define __NR_listxattrat 465 | 421 | #define __NR_listxattrat 465 |
| 422 | #define __NR_removexattrat 466 | 422 | #define __NR_removexattrat 466 |
| 423 | #define __NR_open_tree_attr 467 | ||
| 424 | #define __NR_file_getattr 468 | ||
| 425 | #define __NR_file_setattr 469 | ||
| 423 | 426 | ||
| 424 | 427 | ||
| 425 | #endif /* _ASM_UNISTD_64_H */ | 428 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/hwprobe.h+13-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 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 | * Copyright 2023 Rivos, Inc | 3 | * Copyright 2023-2024 Rivos, Inc |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef _ASM_HWPROBE_H | 6 | #ifndef _ASM_HWPROBE_H |
| ... | @@ -73,6 +73,15 @@ struct riscv_hwprobe { | ... | @@ -73,6 +73,15 @@ struct riscv_hwprobe { |
| 73 | #define		RISCV_HWPROBE_EXT_ZCMOP		(1ULL << 47) | 73 | #define		RISCV_HWPROBE_EXT_ZCMOP		(1ULL << 47) |
| 74 | #define		RISCV_HWPROBE_EXT_ZAWRS		(1ULL << 48) | 74 | #define		RISCV_HWPROBE_EXT_ZAWRS		(1ULL << 48) |
| 75 | #define		RISCV_HWPROBE_EXT_SUPM		(1ULL << 49) | 75 | #define		RISCV_HWPROBE_EXT_SUPM		(1ULL << 49) |
| 76 | #define		RISCV_HWPROBE_EXT_ZICNTR	(1ULL << 50) | ||
| 77 | #define		RISCV_HWPROBE_EXT_ZIHPM		(1ULL << 51) | ||
| 78 | #define		RISCV_HWPROBE_EXT_ZFBFMIN	(1ULL << 52) | ||
| 79 | #define		RISCV_HWPROBE_EXT_ZVFBFMIN	(1ULL << 53) | ||
| 80 | #define		RISCV_HWPROBE_EXT_ZVFBFWMA	(1ULL << 54) | ||
| 81 | #define		RISCV_HWPROBE_EXT_ZICBOM	(1ULL << 55) | ||
| 82 | #define		RISCV_HWPROBE_EXT_ZAAMO		(1ULL << 56) | ||
| 83 | #define		RISCV_HWPROBE_EXT_ZALRSC	(1ULL << 57) | ||
| 84 | #define		RISCV_HWPROBE_EXT_ZABHA		(1ULL << 58) | ||
| 76 | #define RISCV_HWPROBE_KEY_CPUPERF_0	5 | 85 | #define RISCV_HWPROBE_KEY_CPUPERF_0	5 |
| 77 | #define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0) | 86 | #define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0) |
| 78 | #define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0) | 87 | #define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0) |
| ... | @@ -94,6 +103,9 @@ struct riscv_hwprobe { | ... | @@ -94,6 +103,9 @@ struct riscv_hwprobe { |
| 94 | #define		RISCV_HWPROBE_MISALIGNED_VECTOR_SLOW		2 | 103 | #define		RISCV_HWPROBE_MISALIGNED_VECTOR_SLOW		2 |
| 95 | #define		RISCV_HWPROBE_MISALIGNED_VECTOR_FAST		3 | 104 | #define		RISCV_HWPROBE_MISALIGNED_VECTOR_FAST		3 |
| 96 | #define		RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED	4 | 105 | #define		RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED	4 |
| 106 | #define RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0	11 | ||
| 107 | #define RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE	12 | ||
| 108 | #define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0	13 | ||
| 97 | /* Increase RISCV_HWPROBE_MAX_KEY when adding items. */ | 109 | /* Increase RISCV_HWPROBE_MAX_KEY when adding items. */ |
| 98 | 110 | ||
| 99 | /* Flags */ | 111 | /* Flags */ |
lib/libc/include/riscv-linux-any/asm/kvm.h+7-3| ... | @@ -18,6 +18,7 @@ | ... | @@ -18,6 +18,7 @@ |
| 18 | #define __KVM_HAVE_IRQ_LINE | 18 | #define __KVM_HAVE_IRQ_LINE |
| 19 | 19 | ||
| 20 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 20 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 21 | #define KVM_DIRTY_LOG_PAGE_OFFSET 64 | ||
| 21 | 22 | ||
| 22 | #define KVM_INTERRUPT_SET	-1U | 23 | #define KVM_INTERRUPT_SET	-1U |
| 23 | #define KVM_INTERRUPT_UNSET	-2U | 24 | #define KVM_INTERRUPT_UNSET	-2U |
| ... | @@ -179,6 +180,11 @@ enum KVM_RISCV_ISA_EXT_ID { | ... | @@ -179,6 +180,11 @@ enum KVM_RISCV_ISA_EXT_ID { |
| 179 | 	KVM_RISCV_ISA_EXT_SSNPM, | 180 | 	KVM_RISCV_ISA_EXT_SSNPM, |
| 180 | 	KVM_RISCV_ISA_EXT_SVADE, | 181 | 	KVM_RISCV_ISA_EXT_SVADE, |
| 181 | 	KVM_RISCV_ISA_EXT_SVADU, | 182 | 	KVM_RISCV_ISA_EXT_SVADU, |
| 183 | 	KVM_RISCV_ISA_EXT_SVVPTC, | ||
| 184 | 	KVM_RISCV_ISA_EXT_ZABHA, | ||
| 185 | 	KVM_RISCV_ISA_EXT_ZICCRSE, | ||
| 186 | 	KVM_RISCV_ISA_EXT_ZAAMO, | ||
| 187 | 	KVM_RISCV_ISA_EXT_ZALRSC, | ||
| 182 | 	KVM_RISCV_ISA_EXT_MAX, | 188 | 	KVM_RISCV_ISA_EXT_MAX, |
| 183 | }; | 189 | }; |
| 184 | 190 | ||
| ... | @@ -198,6 +204,7 @@ enum KVM_RISCV_SBI_EXT_ID { | ... | @@ -198,6 +204,7 @@ enum KVM_RISCV_SBI_EXT_ID { |
| 198 | 	KVM_RISCV_SBI_EXT_VENDOR, | 204 | 	KVM_RISCV_SBI_EXT_VENDOR, |
| 199 | 	KVM_RISCV_SBI_EXT_DBCN, | 205 | 	KVM_RISCV_SBI_EXT_DBCN, |
| 200 | 	KVM_RISCV_SBI_EXT_STA, | 206 | 	KVM_RISCV_SBI_EXT_STA, |
| 207 | 	KVM_RISCV_SBI_EXT_SUSP, | ||
| 201 | 	KVM_RISCV_SBI_EXT_MAX, | 208 | 	KVM_RISCV_SBI_EXT_MAX, |
| 202 | }; | 209 | }; |
| 203 | 210 | ||
| ... | @@ -211,9 +218,6 @@ struct kvm_riscv_sbi_sta { | ... | @@ -211,9 +218,6 @@ struct kvm_riscv_sbi_sta { |
| 211 | #define KVM_RISCV_TIMER_STATE_OFF	0 | 218 | #define KVM_RISCV_TIMER_STATE_OFF	0 |
| 212 | #define KVM_RISCV_TIMER_STATE_ON	1 | 219 | #define KVM_RISCV_TIMER_STATE_ON	1 |
| 213 | 220 | ||
| 214 | #define KVM_REG_SIZE(id)		\ | ||
| 215 | 	(1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) | ||
| 216 | |||
| 217 | /* If you need to interpret the index values, here is the key: */ | 221 | /* If you need to interpret the index values, here is the key: */ |
| 218 | #define KVM_REG_RISCV_TYPE_MASK		0x00000000FF000000 | 222 | #define KVM_REG_RISCV_TYPE_MASK		0x00000000FF000000 |
| 219 | #define KVM_REG_RISCV_TYPE_SHIFT	24 | 223 | #define KVM_REG_RISCV_TYPE_SHIFT	24 |
lib/libc/include/riscv-linux-any/asm/unistd_32.h+3| ... | @@ -314,6 +314,9 @@ | ... | @@ -314,6 +314,9 @@ |
| 314 | #define __NR_getxattrat 464 | 314 | #define __NR_getxattrat 464 |
| 315 | #define __NR_listxattrat 465 | 315 | #define __NR_listxattrat 465 |
| 316 | #define __NR_removexattrat 466 | 316 | #define __NR_removexattrat 466 |
| 317 | #define __NR_open_tree_attr 467 | ||
| 318 | #define __NR_file_getattr 468 | ||
| 319 | #define __NR_file_setattr 469 | ||
| 317 | 320 | ||
| 318 | 321 | ||
| 319 | #endif /* _ASM_UNISTD_32_H */ | 322 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/unistd_64.h+3| ... | @@ -324,6 +324,9 @@ | ... | @@ -324,6 +324,9 @@ |
| 324 | #define __NR_getxattrat 464 | 324 | #define __NR_getxattrat 464 |
| 325 | #define __NR_listxattrat 465 | 325 | #define __NR_listxattrat 465 |
| 326 | #define __NR_removexattrat 466 | 326 | #define __NR_removexattrat 466 |
| 327 | #define __NR_open_tree_attr 467 | ||
| 328 | #define __NR_file_getattr 468 | ||
| 329 | #define __NR_file_setattr 469 | ||
| 327 | 330 | ||
| 328 | 331 | ||
| 329 | #endif /* _ASM_UNISTD_64_H */ | 332 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/vendor/sifive.h created+6| ... | @@ -0,0 +1,6 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | |||
| 3 | #define	RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCDOD		(1 << 0) | ||
| 4 | #define	RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCQOQ		(1 << 1) | ||
| 5 | #define	RISCV_HWPROBE_VENDOR_EXT_XSFVFNRCLIPXFQF		(1 << 2) | ||
| 6 | #define	RISCV_HWPROBE_VENDOR_EXT_XSFVFWMACCQQQ		(1 << 3) | ||
| \ No newline at end of file | |||
lib/libc/include/riscv-linux-any/asm/vendor/thead.h created+3| ... | @@ -0,0 +1,3 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | |||
| 3 | #define		RISCV_HWPROBE_VENDOR_EXT_XTHEADVECTOR	(1 << 0) | ||
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/diag.h created+32| ... | @@ -0,0 +1,32 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Diag ioctls and its associated structures definitions. | ||
| 4 | * | ||
| 5 | * Copyright IBM Corp. 2024 | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef __S390_UAPI_ASM_DIAG_H | ||
| 9 | #define __S390_UAPI_ASM_DIAG_H | ||
| 10 | |||
| 11 | #include <linux/types.h> | ||
| 12 | |||
| 13 | #define DIAG_MAGIC_STR 'D' | ||
| 14 | |||
| 15 | struct diag324_pib { | ||
| 16 | 	__u64 address; | ||
| 17 | 	__u64 sequence; | ||
| 18 | }; | ||
| 19 | |||
| 20 | struct diag310_memtop { | ||
| 21 | 	__u64 address; | ||
| 22 | 	__u64 nesting_lvl; | ||
| 23 | }; | ||
| 24 | |||
| 25 | /* Diag ioctl definitions */ | ||
| 26 | #define DIAG324_GET_PIBBUF	_IOWR(DIAG_MAGIC_STR, 0x77, struct diag324_pib) | ||
| 27 | #define DIAG324_GET_PIBLEN	_IOR(DIAG_MAGIC_STR, 0x78, size_t) | ||
| 28 | #define DIAG310_GET_STRIDE	_IOR(DIAG_MAGIC_STR, 0x79, size_t) | ||
| 29 | #define DIAG310_GET_MEMTOPLEN	_IOWR(DIAG_MAGIC_STR, 0x7a, size_t) | ||
| 30 | #define DIAG310_GET_MEMTOPBUF	_IOWR(DIAG_MAGIC_STR, 0x7b, struct diag310_memtop) | ||
| 31 | |||
| 32 | #endif /* __S390_UAPI_ASM_DIAG_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/ptrace.h+3-2| ... | @@ -242,7 +242,8 @@ | ... | @@ -242,7 +242,8 @@ |
| 242 | #define PTRACE_OLDSETOPTIONS		21 | 242 | #define PTRACE_OLDSETOPTIONS		21 |
| 243 | #define PTRACE_SYSEMU			31 | 243 | #define PTRACE_SYSEMU			31 |
| 244 | #define PTRACE_SYSEMU_SINGLESTEP	32 | 244 | #define PTRACE_SYSEMU_SINGLESTEP	32 |
| 245 | #ifndef __ASSEMBLY__ | 245 | |
| 246 | #ifndef __ASSEMBLER__ | ||
| 246 | #include <linux/stddef.h> | 247 | #include <linux/stddef.h> |
| 247 | #include <linux/types.h> | 248 | #include <linux/types.h> |
| 248 | 249 | ||
| ... | @@ -450,6 +451,6 @@ struct user_regs_struct { | ... | @@ -450,6 +451,6 @@ struct user_regs_struct { |
| 450 | 	unsigned long ieee_instruction_pointer;	/* obsolete, always 0 */ | 451 | 	unsigned long ieee_instruction_pointer;	/* obsolete, always 0 */ |
| 451 | }; | 452 | }; |
| 452 | 453 | ||
| 453 | #endif /* __ASSEMBLY__ */ | 454 | #endif /* __ASSEMBLER__ */ |
| 454 | 455 | ||
| 455 | #endif /* _S390_PTRACE_H */ | 456 | #endif /* _S390_PTRACE_H */ |
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/schid.h+2-2| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | ||
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | 6 | ||
| 7 | #ifndef __ASSEMBLY__ | 7 | #ifndef __ASSEMBLER__ |
| 8 | 8 | ||
| 9 | struct subchannel_id { | 9 | struct subchannel_id { |
| 10 | 	__u32 cssid : 8; | 10 | 	__u32 cssid : 8; |
| ... | @@ -15,6 +15,6 @@ struct subchannel_id { | ... | @@ -15,6 +15,6 @@ struct subchannel_id { |
| 15 | 	__u32 sch_no : 16; | 15 | 	__u32 sch_no : 16; |
| 16 | } __attribute__ ((packed, aligned(4))); | 16 | } __attribute__ ((packed, aligned(4))); |
| 17 | 17 | ||
| 18 | #endif /* __ASSEMBLY__ */ | 18 | #endif /* __ASSEMBLER__ */ |
| 19 | 19 | ||
| 20 | #endif /* ASM_SCHID_H */ | 20 | #endif /* ASM_SCHID_H */ |
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/types.h+2-2| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | ||
| 11 | #include <asm-generic/int-ll64.h> | 11 | #include <asm-generic/int-ll64.h> |
| 12 | 12 | ||
| 13 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLER__ |
| 14 | 14 | ||
| 15 | typedef unsigned long addr_t; | 15 | typedef unsigned long addr_t; |
| 16 | typedef __signed__ long saddr_t; | 16 | typedef __signed__ long saddr_t; |
| ... | @@ -25,6 +25,6 @@ typedef struct { | ... | @@ -25,6 +25,6 @@ typedef struct { |
| 25 | 	}; | 25 | 	}; |
| 26 | } __attribute__((packed, aligned(4))) __vector128; | 26 | } __attribute__((packed, aligned(4))) __vector128; |
| 27 | 27 | ||
| 28 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLER__ */ |
| 29 | 29 | ||
| 30 | #endif /* _S390_TYPES_H */ | 30 | #endif /* _S390_TYPES_H */ |
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/unistd_32.h+3| ... | @@ -439,5 +439,8 @@ | ... | @@ -439,5 +439,8 @@ |
| 439 | #define __NR_getxattrat 464 | 439 | #define __NR_getxattrat 464 |
| 440 | #define __NR_listxattrat 465 | 440 | #define __NR_listxattrat 465 |
| 441 | #define __NR_removexattrat 466 | 441 | #define __NR_removexattrat 466 |
| 442 | #define __NR_open_tree_attr 467 | ||
| 443 | #define __NR_file_getattr 468 | ||
| 444 | #define __NR_file_setattr 469 | ||
| 442 | 445 | ||
| 443 | #endif /* _ASM_S390_UNISTD_32_H */ | 446 | #endif /* _ASM_S390_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/s390x-linux-any/asm/unistd_64.h+3| ... | @@ -387,5 +387,8 @@ | ... | @@ -387,5 +387,8 @@ |
| 387 | #define __NR_getxattrat 464 | 387 | #define __NR_getxattrat 464 |
| 388 | #define __NR_listxattrat 465 | 388 | #define __NR_listxattrat 465 |
| 389 | #define __NR_removexattrat 466 | 389 | #define __NR_removexattrat 466 |
| 390 | #define __NR_open_tree_attr 467 | ||
| 391 | #define __NR_file_getattr 468 | ||
| 392 | #define __NR_file_setattr 469 | ||
| 390 | 393 | ||
| 391 | #endif /* _ASM_S390_UNISTD_64_H */ | 394 | #endif /* _ASM_S390_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/sparc-linux-any/asm/socket.h+7| ... | @@ -141,6 +141,13 @@ | ... | @@ -141,6 +141,13 @@ |
| 141 | 141 | ||
| 142 | #define SCM_TS_OPT_ID 0x005a | 142 | #define SCM_TS_OPT_ID 0x005a |
| 143 | 143 | ||
| 144 | #define SO_RCVPRIORITY 0x005b | ||
| 145 | |||
| 146 | #define SO_PASSRIGHTS 0x005c | ||
| 147 | |||
| 148 | #define SO_INQ 0x005d | ||
| 149 | #define SCM_INQ SO_INQ | ||
| 150 | |||
| 144 | 151 | ||
| 145 | 152 | ||
| 146 | #if __BITS_PER_LONG == 64 | 153 | #if __BITS_PER_LONG == 64 |
lib/libc/include/sparc-linux-any/asm/unistd_32.h+3| ... | @@ -436,6 +436,9 @@ | ... | @@ -436,6 +436,9 @@ |
| 436 | #define __NR_getxattrat 464 | 436 | #define __NR_getxattrat 464 |
| 437 | #define __NR_listxattrat 465 | 437 | #define __NR_listxattrat 465 |
| 438 | #define __NR_removexattrat 466 | 438 | #define __NR_removexattrat 466 |
| 439 | #define __NR_open_tree_attr 467 | ||
| 440 | #define __NR_file_getattr 468 | ||
| 441 | #define __NR_file_setattr 469 | ||
| 439 | 442 | ||
| 440 | 443 | ||
| 441 | #endif /* _ASM_UNISTD_32_H */ | 444 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/sparc-linux-any/asm/unistd_64.h+3| ... | @@ -399,6 +399,9 @@ | ... | @@ -399,6 +399,9 @@ |
| 399 | #define __NR_getxattrat 464 | 399 | #define __NR_getxattrat 464 |
| 400 | #define __NR_listxattrat 465 | 400 | #define __NR_listxattrat 465 |
| 401 | #define __NR_removexattrat 466 | 401 | #define __NR_removexattrat 466 |
| 402 | #define __NR_open_tree_attr 467 | ||
| 403 | #define __NR_file_getattr 468 | ||
| 404 | #define __NR_file_setattr 469 | ||
| 402 | 405 | ||
| 403 | 406 | ||
| 404 | #endif /* _ASM_UNISTD_64_H */ | 407 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/amd_hsmp.h+62-2| ... | @@ -50,6 +50,12 @@ enum hsmp_message_ids { | ... | @@ -50,6 +50,12 @@ enum hsmp_message_ids { |
| 50 | 	HSMP_GET_METRIC_TABLE_VER,	/* 23h Get metrics table version */ | 50 | 	HSMP_GET_METRIC_TABLE_VER,	/* 23h Get metrics table version */ |
| 51 | 	HSMP_GET_METRIC_TABLE,		/* 24h Get metrics table */ | 51 | 	HSMP_GET_METRIC_TABLE,		/* 24h Get metrics table */ |
| 52 | 	HSMP_GET_METRIC_TABLE_DRAM_ADDR,/* 25h Get metrics table dram address */ | 52 | 	HSMP_GET_METRIC_TABLE_DRAM_ADDR,/* 25h Get metrics table dram address */ |
| 53 | 	HSMP_SET_XGMI_PSTATE_RANGE,	/* 26h Set xGMI P-state range */ | ||
| 54 | 	HSMP_CPU_RAIL_ISO_FREQ_POLICY,	/* 27h Get/Set Cpu Iso frequency policy */ | ||
| 55 | 	HSMP_DFC_ENABLE_CTRL,		/* 28h Enable/Disable DF C-state */ | ||
| 56 | 	HSMP_GET_RAPL_UNITS = 0x30,	/* 30h Get scaling factor for energy */ | ||
| 57 | 	HSMP_GET_RAPL_CORE_COUNTER,	/* 31h Get core energy counter value */ | ||
| 58 | 	HSMP_GET_RAPL_PACKAGE_COUNTER,	/* 32h Get package energy counter value */ | ||
| 53 | 	HSMP_MSG_ID_MAX, | 59 | 	HSMP_MSG_ID_MAX, |
| 54 | }; | 60 | }; |
| 55 | 61 | ||
| ... | @@ -65,6 +71,7 @@ enum hsmp_msg_type { | ... | @@ -65,6 +71,7 @@ enum hsmp_msg_type { |
| 65 | 	HSMP_RSVD = -1, | 71 | 	HSMP_RSVD = -1, |
| 66 | 	HSMP_SET = 0, | 72 | 	HSMP_SET = 0, |
| 67 | 	HSMP_GET = 1, | 73 | 	HSMP_GET = 1, |
| 74 | 	HSMP_SET_GET	= 2, | ||
| 68 | }; | 75 | }; |
| 69 | 76 | ||
| 70 | enum hsmp_proto_versions { | 77 | enum hsmp_proto_versions { |
| ... | @@ -72,7 +79,8 @@ enum hsmp_proto_versions { | ... | @@ -72,7 +79,8 @@ enum hsmp_proto_versions { |
| 72 | 	HSMP_PROTO_VER3, | 79 | 	HSMP_PROTO_VER3, |
| 73 | 	HSMP_PROTO_VER4, | 80 | 	HSMP_PROTO_VER4, |
| 74 | 	HSMP_PROTO_VER5, | 81 | 	HSMP_PROTO_VER5, |
| 75 | 	HSMP_PROTO_VER6 | 82 | 	HSMP_PROTO_VER6, |
| 83 | 	HSMP_PROTO_VER7 | ||
| 76 | }; | 84 | }; |
| 77 | 85 | ||
| 78 | struct hsmp_msg_desc { | 86 | struct hsmp_msg_desc { |
| ... | @@ -300,7 +308,7 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] | ... | @@ -300,7 +308,7 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] |
| 300 | 	 * HSMP_SET_POWER_MODE, num_args = 1, response_sz = 0 | 308 | 	 * HSMP_SET_POWER_MODE, num_args = 1, response_sz = 0 |
| 301 | 	 * input: args[0] = power efficiency mode[2:0] | 309 | 	 * input: args[0] = power efficiency mode[2:0] |
| 302 | 	 */ | 310 | 	 */ |
| 303 | 	{1, 0, HSMP_SET}, | 311 | 	{1, 1, HSMP_SET_GET}, |
| 304 | 312 | ||
| 305 | 	/* | 313 | 	/* |
| 306 | 	 * HSMP_SET_PSTATE_MAX_MIN, num_args = 1, response_sz = 0 | 314 | 	 * HSMP_SET_PSTATE_MAX_MIN, num_args = 1, response_sz = 0 |
| ... | @@ -325,6 +333,58 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] | ... | @@ -325,6 +333,58 @@ static const struct hsmp_msg_desc hsmp_msg_desc_table[] |
| 325 | 	 * output: args[1] = upper 32 bits of the address | 333 | 	 * output: args[1] = upper 32 bits of the address |
| 326 | 	 */ | 334 | 	 */ |
| 327 | 	{0, 2, HSMP_GET}, | 335 | 	{0, 2, HSMP_GET}, |
| 336 | |||
| 337 | 	/* | ||
| 338 | 	 * HSMP_SET_XGMI_PSTATE_RANGE, num_args = 1, response_sz = 0 | ||
| 339 | 	 * input: args[0] = min xGMI p-state[15:8] + max xGMI p-state[7:0] | ||
| 340 | 	 */ | ||
| 341 | 	{1, 0, HSMP_SET}, | ||
| 342 | |||
| 343 | 	/* | ||
| 344 | 	 * HSMP_CPU_RAIL_ISO_FREQ_POLICY, num_args = 1, response_sz = 1 | ||
| 345 | 	 * input: args[0] = set/get policy[31] + | ||
| 346 | 	 * disable/enable independent control[0] | ||
| 347 | 	 * output: args[0] = current policy[0] | ||
| 348 | 	 */ | ||
| 349 | 	{1, 1, HSMP_SET_GET}, | ||
| 350 | |||
| 351 | 	/* | ||
| 352 | 	 * HSMP_DFC_ENABLE_CTRL, num_args = 1, response_sz = 1 | ||
| 353 | 	 * input: args[0] = set/get policy[31] + enable/disable DFC[0] | ||
| 354 | 	 * output: args[0] = current policy[0] | ||
| 355 | 	 */ | ||
| 356 | 	{1, 1, HSMP_SET_GET}, | ||
| 357 | |||
| 358 | 	/* RESERVED(0x29-0x2f) */ | ||
| 359 | 	{0, 0, HSMP_RSVD}, | ||
| 360 | 	{0, 0, HSMP_RSVD}, | ||
| 361 | 	{0, 0, HSMP_RSVD}, | ||
| 362 | 	{0, 0, HSMP_RSVD}, | ||
| 363 | 	{0, 0, HSMP_RSVD}, | ||
| 364 | 	{0, 0, HSMP_RSVD}, | ||
| 365 | 	{0, 0, HSMP_RSVD}, | ||
| 366 | |||
| 367 | 	/* | ||
| 368 | 	 * HSMP_GET_RAPL_UNITS, response_sz = 1 | ||
| 369 | 	 * output: args[0] = tu value[19:16] + esu value[12:8] | ||
| 370 | 	 */ | ||
| 371 | 	{0, 1, HSMP_GET}, | ||
| 372 | |||
| 373 | 	/* | ||
| 374 | 	 * HSMP_GET_RAPL_CORE_COUNTER, num_args = 1, response_sz = 1 | ||
| 375 | 	 * input: args[0] = apic id[15:0] | ||
| 376 | 	 * output: args[0] = lower 32 bits of energy | ||
| 377 | 	 * output: args[1] = upper 32 bits of energy | ||
| 378 | 	 */ | ||
| 379 | 	{1, 2, HSMP_GET}, | ||
| 380 | |||
| 381 | 	/* | ||
| 382 | 	 * HSMP_GET_RAPL_PACKAGE_COUNTER, num_args = 0, response_sz = 1 | ||
| 383 | 	 * output: args[0] = lower 32 bits of energy | ||
| 384 | 	 * output: args[1] = upper 32 bits of energy | ||
| 385 | 	 */ | ||
| 386 | 	{0, 2, HSMP_GET}, | ||
| 387 | |||
| 328 | }; | 388 | }; |
| 329 | 389 | ||
| 330 | /* Metrics table (supported only with proto version 6) */ | 390 | /* Metrics table (supported only with proto version 6) */ |
lib/libc/include/x86-linux-any/asm/bootparam.h+2-2| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
| 26 | #define XLF_5LEVEL_ENABLED		(1<<6) | 26 | #define XLF_5LEVEL_ENABLED		(1<<6) |
| 27 | #define XLF_MEM_ENCRYPTION		(1<<7) | 27 | #define XLF_MEM_ENCRYPTION		(1<<7) |
| 28 | 28 | ||
| 29 | #ifndef __ASSEMBLY__ | 29 | #ifndef __ASSEMBLER__ |
| 30 | 30 | ||
| 31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
| 32 | #include <linux/screen_info.h> | 32 | #include <linux/screen_info.h> |
| ... | @@ -210,6 +210,6 @@ enum x86_hardware_subarch { | ... | @@ -210,6 +210,6 @@ enum x86_hardware_subarch { |
| 210 | 	X86_NR_SUBARCHS, | 210 | 	X86_NR_SUBARCHS, |
| 211 | }; | 211 | }; |
| 212 | 212 | ||
| 213 | #endif /* __ASSEMBLY__ */ | 213 | #endif /* __ASSEMBLER__ */ |
| 214 | 214 | ||
| 215 | #endif /* _ASM_X86_BOOTPARAM_H */ | 215 | #endif /* _ASM_X86_BOOTPARAM_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/debugreg.h+20-1| ... | @@ -15,7 +15,26 @@ | ... | @@ -15,7 +15,26 @@ |
| 15 | which debugging register was responsible for the trap. The other bits | 15 | which debugging register was responsible for the trap. The other bits |
| 16 | are either reserved or not of interest to us. */ | 16 | are either reserved or not of interest to us. */ |
| 17 | 17 | ||
| 18 | /* Define reserved bits in DR6 which are always set to 1 */ | 18 | /* |
| 19 | * Define bits in DR6 which are set to 1 by default. | ||
| 20 | * | ||
| 21 | * This is also the DR6 architectural value following Power-up, Reset or INIT. | ||
| 22 | * | ||
| 23 | * Note, with the introduction of Bus Lock Detection (BLD) and Restricted | ||
| 24 | * Transactional Memory (RTM), the DR6 register has been modified: | ||
| 25 | * | ||
| 26 | * 1) BLD flag (bit 11) is no longer reserved to 1 if the CPU supports | ||
| 27 | * Bus Lock Detection. The assertion of a bus lock could clear it. | ||
| 28 | * | ||
| 29 | * 2) RTM flag (bit 16) is no longer reserved to 1 if the CPU supports | ||
| 30 | * restricted transactional memory. #DB occurred inside an RTM region | ||
| 31 | * could clear it. | ||
| 32 | * | ||
| 33 | * Apparently, DR6.BLD and DR6.RTM are active low bits. | ||
| 34 | * | ||
| 35 | * As a result, DR6_RESERVED is an incorrect name now, but it is kept for | ||
| 36 | * compatibility. | ||
| 37 | */ | ||
| 19 | #define DR6_RESERVED	(0xFFFF0FF0) | 38 | #define DR6_RESERVED	(0xFFFF0FF0) |
| 20 | 39 | ||
| 21 | #define DR_TRAP0	(0x1)		/* db0 */ | 40 | #define DR_TRAP0	(0x1)		/* db0 */ |
lib/libc/include/x86-linux-any/asm/e820.h+2-2| ... | @@ -52,7 +52,7 @@ | ... | @@ -52,7 +52,7 @@ |
| 52 | */ | 52 | */ |
| 53 | #define E820_RESERVED_KERN 128 | 53 | #define E820_RESERVED_KERN 128 |
| 54 | 54 | ||
| 55 | #ifndef __ASSEMBLY__ | 55 | #ifndef __ASSEMBLER__ |
| 56 | #include <linux/types.h> | 56 | #include <linux/types.h> |
| 57 | struct e820entry { | 57 | struct e820entry { |
| 58 | 	__u64 addr;	/* start of memory segment */ | 58 | 	__u64 addr;	/* start of memory segment */ |
| ... | @@ -74,7 +74,7 @@ struct e820map { | ... | @@ -74,7 +74,7 @@ struct e820map { |
| 74 | #define BIOS_ROM_BASE		0xffe00000 | 74 | #define BIOS_ROM_BASE		0xffe00000 |
| 75 | #define BIOS_ROM_END		0xffffffff | 75 | #define BIOS_ROM_END		0xffffffff |
| 76 | 76 | ||
| 77 | #endif /* __ASSEMBLY__ */ | 77 | #endif /* __ASSEMBLER__ */ |
| 78 | 78 | ||
| 79 | 79 | ||
| 80 | #endif /* _ASM_X86_E820_H */ | 80 | #endif /* _ASM_X86_E820_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/kvm.h+82| ... | @@ -439,6 +439,7 @@ struct kvm_sync_regs { | ... | @@ -439,6 +439,7 @@ struct kvm_sync_regs { |
| 439 | #define KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS	(1 << 6) | 439 | #define KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS	(1 << 6) |
| 440 | #define KVM_X86_QUIRK_SLOT_ZAP_ALL		(1 << 7) | 440 | #define KVM_X86_QUIRK_SLOT_ZAP_ALL		(1 << 7) |
| 441 | #define KVM_X86_QUIRK_STUFF_FEATURE_MSRS	(1 << 8) | 441 | #define KVM_X86_QUIRK_STUFF_FEATURE_MSRS	(1 << 8) |
| 442 | #define KVM_X86_QUIRK_IGNORE_GUEST_PAT		(1 << 9) | ||
| 442 | 443 | ||
| 443 | #define KVM_STATE_NESTED_FORMAT_VMX	0 | 444 | #define KVM_STATE_NESTED_FORMAT_VMX	0 |
| 444 | #define KVM_STATE_NESTED_FORMAT_SVM	1 | 445 | #define KVM_STATE_NESTED_FORMAT_SVM	1 |
| ... | @@ -557,6 +558,9 @@ struct kvm_x86_mce { | ... | @@ -557,6 +558,9 @@ struct kvm_x86_mce { |
| 557 | #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE	(1 << 7) | 558 | #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE	(1 << 7) |
| 558 | #define KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA	(1 << 8) | 559 | #define KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA	(1 << 8) |
| 559 | 560 | ||
| 561 | #define KVM_XEN_MSR_MIN_INDEX			0x40000000u | ||
| 562 | #define KVM_XEN_MSR_MAX_INDEX			0x4fffffffu | ||
| 563 | |||
| 560 | struct kvm_xen_hvm_config { | 564 | struct kvm_xen_hvm_config { |
| 561 | 	__u32 flags; | 565 | 	__u32 flags; |
| 562 | 	__u32 msr; | 566 | 	__u32 msr; |
| ... | @@ -839,6 +843,7 @@ struct kvm_sev_snp_launch_start { | ... | @@ -839,6 +843,7 @@ struct kvm_sev_snp_launch_start { |
| 839 | }; | 843 | }; |
| 840 | 844 | ||
| 841 | /* Kept in sync with firmware values for simplicity. */ | 845 | /* Kept in sync with firmware values for simplicity. */ |
| 846 | #define KVM_SEV_PAGE_TYPE_INVALID		0x0 | ||
| 842 | #define KVM_SEV_SNP_PAGE_TYPE_NORMAL		0x1 | 847 | #define KVM_SEV_SNP_PAGE_TYPE_NORMAL		0x1 |
| 843 | #define KVM_SEV_SNP_PAGE_TYPE_ZERO		0x3 | 848 | #define KVM_SEV_SNP_PAGE_TYPE_ZERO		0x3 |
| 844 | #define KVM_SEV_SNP_PAGE_TYPE_UNMEASURED	0x4 | 849 | #define KVM_SEV_SNP_PAGE_TYPE_UNMEASURED	0x4 |
| ... | @@ -923,5 +928,82 @@ struct kvm_hyperv_eventfd { | ... | @@ -923,5 +928,82 @@ struct kvm_hyperv_eventfd { |
| 923 | #define KVM_X86_SEV_VM		2 | 928 | #define KVM_X86_SEV_VM		2 |
| 924 | #define KVM_X86_SEV_ES_VM	3 | 929 | #define KVM_X86_SEV_ES_VM	3 |
| 925 | #define KVM_X86_SNP_VM		4 | 930 | #define KVM_X86_SNP_VM		4 |
| 931 | #define KVM_X86_TDX_VM		5 | ||
| 932 | |||
| 933 | /* Trust Domain eXtension sub-ioctl() commands. */ | ||
| 934 | enum kvm_tdx_cmd_id { | ||
| 935 | 	KVM_TDX_CAPABILITIES = 0, | ||
| 936 | 	KVM_TDX_INIT_VM, | ||
| 937 | 	KVM_TDX_INIT_VCPU, | ||
| 938 | 	KVM_TDX_INIT_MEM_REGION, | ||
| 939 | 	KVM_TDX_FINALIZE_VM, | ||
| 940 | 	KVM_TDX_GET_CPUID, | ||
| 941 | |||
| 942 | 	KVM_TDX_CMD_NR_MAX, | ||
| 943 | }; | ||
| 944 | |||
| 945 | struct kvm_tdx_cmd { | ||
| 946 | 	/* enum kvm_tdx_cmd_id */ | ||
| 947 | 	__u32 id; | ||
| 948 | 	/* flags for sub-commend. If sub-command doesn't use this, set zero. */ | ||
| 949 | 	__u32 flags; | ||
| 950 | 	/* | ||
| 951 | 	 * data for each sub-command. An immediate or a pointer to the actual | ||
| 952 | 	 * data in process virtual address. If sub-command doesn't use it, | ||
| 953 | 	 * set zero. | ||
| 954 | 	 */ | ||
| 955 | 	__u64 data; | ||
| 956 | 	/* | ||
| 957 | 	 * Auxiliary error code. The sub-command may return TDX SEAMCALL | ||
| 958 | 	 * status code in addition to -Exxx. | ||
| 959 | 	 */ | ||
| 960 | 	__u64 hw_error; | ||
| 961 | }; | ||
| 962 | |||
| 963 | struct kvm_tdx_capabilities { | ||
| 964 | 	__u64 supported_attrs; | ||
| 965 | 	__u64 supported_xfam; | ||
| 966 | |||
| 967 | 	__u64 kernel_tdvmcallinfo_1_r11; | ||
| 968 | 	__u64 user_tdvmcallinfo_1_r11; | ||
| 969 | 	__u64 kernel_tdvmcallinfo_1_r12; | ||
| 970 | 	__u64 user_tdvmcallinfo_1_r12; | ||
| 971 | |||
| 972 | 	__u64 reserved[250]; | ||
| 973 | |||
| 974 | 	/* Configurable CPUID bits for userspace */ | ||
| 975 | 	struct kvm_cpuid2 cpuid; | ||
| 976 | }; | ||
| 977 | |||
| 978 | struct kvm_tdx_init_vm { | ||
| 979 | 	__u64 attributes; | ||
| 980 | 	__u64 xfam; | ||
| 981 | 	__u64 mrconfigid[6];	/* sha384 digest */ | ||
| 982 | 	__u64 mrowner[6];	/* sha384 digest */ | ||
| 983 | 	__u64 mrownerconfig[6];	/* sha384 digest */ | ||
| 984 | |||
| 985 | 	/* The total space for TD_PARAMS before the CPUIDs is 256 bytes */ | ||
| 986 | 	__u64 reserved[12]; | ||
| 987 | |||
| 988 | 	/* | ||
| 989 | 	 * Call KVM_TDX_INIT_VM before vcpu creation, thus before | ||
| 990 | 	 * KVM_SET_CPUID2. | ||
| 991 | 	 * This configuration supersedes KVM_SET_CPUID2s for VCPUs because the | ||
| 992 | 	 * TDX module directly virtualizes those CPUIDs without VMM. The user | ||
| 993 | 	 * space VMM, e.g. qemu, should make KVM_SET_CPUID2 consistent with | ||
| 994 | 	 * those values. If it doesn't, KVM may have wrong idea of vCPUIDs of | ||
| 995 | 	 * the guest, and KVM may wrongly emulate CPUIDs or MSRs that the TDX | ||
| 996 | 	 * module doesn't virtualize. | ||
| 997 | 	 */ | ||
| 998 | 	struct kvm_cpuid2 cpuid; | ||
| 999 | }; | ||
| 1000 | |||
| 1001 | #define KVM_TDX_MEASURE_MEMORY_REGION _BITULL(0) | ||
| 1002 | |||
| 1003 | struct kvm_tdx_init_mem_region { | ||
| 1004 | 	__u64 source_addr; | ||
| 1005 | 	__u64 gpa; | ||
| 1006 | 	__u64 nr_pages; | ||
| 1007 | }; | ||
| 926 | 1008 | ||
| 927 | #endif /* _ASM_X86_KVM_H */ | 1009 | #endif /* _ASM_X86_KVM_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/ldt.h+2-2| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | /* The size of each LDT entry. */ | 12 | /* The size of each LDT entry. */ |
| 13 | #define LDT_ENTRY_SIZE	8 | 13 | #define LDT_ENTRY_SIZE	8 |
| 14 | 14 | ||
| 15 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLER__ |
| 16 | /* | 16 | /* |
| 17 | * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS | 17 | * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS |
| 18 | * not to the default values if you still want to do syscalls. This | 18 | * not to the default values if you still want to do syscalls. This |
| ... | @@ -44,5 +44,5 @@ struct user_desc { | ... | @@ -44,5 +44,5 @@ struct user_desc { |
| 44 | #define MODIFY_LDT_CONTENTS_STACK	1 | 44 | #define MODIFY_LDT_CONTENTS_STACK	1 |
| 45 | #define MODIFY_LDT_CONTENTS_CODE	2 | 45 | #define MODIFY_LDT_CONTENTS_CODE	2 |
| 46 | 46 | ||
| 47 | #endif /* !__ASSEMBLY__ */ | 47 | #endif /* !__ASSEMBLER__ */ |
| 48 | #endif /* _ASM_X86_LDT_H */ | 48 | #endif /* _ASM_X86_LDT_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/msr.h+2-2| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | #ifndef _ASM_X86_MSR_H | 2 | #ifndef _ASM_X86_MSR_H |
| 3 | #define _ASM_X86_MSR_H | 3 | #define _ASM_X86_MSR_H |
| 4 | 4 | ||
| 5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLER__ |
| 6 | 6 | ||
| 7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
| 8 | #include <linux/ioctl.h> | 8 | #include <linux/ioctl.h> |
| ... | @@ -10,5 +10,5 @@ | ... | @@ -10,5 +10,5 @@ |
| 10 | #define X86_IOC_RDMSR_REGS	_IOWR('c', 0xA0, __u32[8]) | 10 | #define X86_IOC_RDMSR_REGS	_IOWR('c', 0xA0, __u32[8]) |
| 11 | #define X86_IOC_WRMSR_REGS	_IOWR('c', 0xA1, __u32[8]) | 11 | #define X86_IOC_WRMSR_REGS	_IOWR('c', 0xA1, __u32[8]) |
| 12 | 12 | ||
| 13 | #endif /* __ASSEMBLY__ */ | 13 | #endif /* __ASSEMBLER__ */ |
| 14 | #endif /* _ASM_X86_MSR_H */ | 14 | #endif /* _ASM_X86_MSR_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/ptrace-abi.h+3-3| ... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | ||
| 26 | #else /* __i386__ */ | 26 | #else /* __i386__ */ |
| 27 | 27 | ||
| 28 | #if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS) | 28 | #if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS) |
| 29 | /* | 29 | /* |
| 30 | * C ABI says these regs are callee-preserved. They aren't saved on kernel entry | 30 | * C ABI says these regs are callee-preserved. They aren't saved on kernel entry |
| 31 | * unless syscall needs a complete, fully filled "struct pt_regs". | 31 | * unless syscall needs a complete, fully filled "struct pt_regs". |
| ... | @@ -57,7 +57,7 @@ | ... | @@ -57,7 +57,7 @@ |
| 57 | #define EFLAGS 144 | 57 | #define EFLAGS 144 |
| 58 | #define RSP 152 | 58 | #define RSP 152 |
| 59 | #define SS 160 | 59 | #define SS 160 |
| 60 | #endif /* __ASSEMBLY__ */ | 60 | #endif /* __ASSEMBLER__ */ |
| 61 | 61 | ||
| 62 | /* top of stack page */ | 62 | /* top of stack page */ |
| 63 | #define FRAME_SIZE 168 | 63 | #define FRAME_SIZE 168 |
| ... | @@ -87,7 +87,7 @@ | ... | @@ -87,7 +87,7 @@ |
| 87 | 87 | ||
| 88 | #define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */ | 88 | #define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */ |
| 89 | 89 | ||
| 90 | #ifndef __ASSEMBLY__ | 90 | #ifndef __ASSEMBLER__ |
| 91 | #include <linux/types.h> | 91 | #include <linux/types.h> |
| 92 | #endif | 92 | #endif |
| 93 | 93 |
lib/libc/include/x86-linux-any/asm/ptrace.h+2-2| ... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
| 7 | #include <asm/processor-flags.h> | 7 | #include <asm/processor-flags.h> |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | #ifndef __ASSEMBLY__ | 10 | #ifndef __ASSEMBLER__ |
| 11 | 11 | ||
| 12 | #ifdef __i386__ | 12 | #ifdef __i386__ |
| 13 | /* this struct defines the way the registers are stored on the | 13 | /* this struct defines the way the registers are stored on the |
| ... | @@ -77,6 +77,6 @@ struct pt_regs { | ... | @@ -77,6 +77,6 @@ struct pt_regs { |
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | 79 | ||
| 80 | #endif /* !__ASSEMBLY__ */ | 80 | #endif /* !__ASSEMBLER__ */ |
| 81 | 81 | ||
| 82 | #endif /* _ASM_X86_PTRACE_H */ | 82 | #endif /* _ASM_X86_PTRACE_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/setup_data.h+14-3| ... | @@ -13,12 +13,13 @@ | ... | @@ -13,12 +13,13 @@ |
| 13 | #define SETUP_CC_BLOB			7 | 13 | #define SETUP_CC_BLOB			7 |
| 14 | #define SETUP_IMA			8 | 14 | #define SETUP_IMA			8 |
| 15 | #define SETUP_RNG_SEED			9 | 15 | #define SETUP_RNG_SEED			9 |
| 16 | #define SETUP_ENUM_MAX			SETUP_RNG_SEED | 16 | #define SETUP_KEXEC_KHO			10 |
| 17 | #define SETUP_ENUM_MAX			SETUP_KEXEC_KHO | ||
| 17 | 18 | ||
| 18 | #define SETUP_INDIRECT			(1<<31) | 19 | #define SETUP_INDIRECT			(1<<31) |
| 19 | #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT) | 20 | #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT) |
| 20 | 21 | ||
| 21 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLER__ |
| 22 | 23 | ||
| 23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 24 | 25 | ||
| ... | @@ -78,6 +79,16 @@ struct ima_setup_data { | ... | @@ -78,6 +79,16 @@ struct ima_setup_data { |
| 78 | 	__u64 size; | 79 | 	__u64 size; |
| 79 | } __attribute__((packed)); | 80 | } __attribute__((packed)); |
| 80 | 81 | ||
| 81 | #endif /* __ASSEMBLY__ */ | 82 | /* |
| 83 | * Locations of kexec handover metadata | ||
| 84 | */ | ||
| 85 | struct kho_data { | ||
| 86 | 	__u64 fdt_addr; | ||
| 87 | 	__u64 fdt_size; | ||
| 88 | 	__u64 scratch_addr; | ||
| 89 | 	__u64 scratch_size; | ||
| 90 | } __attribute__((packed)); | ||
| 91 | |||
| 92 | #endif /* __ASSEMBLER__ */ | ||
| 82 | 93 | ||
| 83 | #endif /* _ASM_X86_SETUP_DATA_H */ | 94 | #endif /* _ASM_X86_SETUP_DATA_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/signal.h+4-4| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | #ifndef _ASM_X86_SIGNAL_H | 2 | #ifndef _ASM_X86_SIGNAL_H |
| 3 | #define _ASM_X86_SIGNAL_H | 3 | #define _ASM_X86_SIGNAL_H |
| 4 | 4 | ||
| 5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLER__ |
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | 7 | ||
| 8 | 8 | ||
| ... | @@ -14,7 +14,7 @@ struct siginfo; | ... | @@ -14,7 +14,7 @@ struct siginfo; |
| 14 | #define NSIG		32 | 14 | #define NSIG		32 |
| 15 | typedef unsigned long sigset_t; | 15 | typedef unsigned long sigset_t; |
| 16 | 16 | ||
| 17 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLER__ */ |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | #define SIGHUP		 1 | 20 | #define SIGHUP		 1 |
| ... | @@ -66,7 +66,7 @@ typedef unsigned long sigset_t; | ... | @@ -66,7 +66,7 @@ typedef unsigned long sigset_t; |
| 66 | 66 | ||
| 67 | #include <asm-generic/signal-defs.h> | 67 | #include <asm-generic/signal-defs.h> |
| 68 | 68 | ||
| 69 | #ifndef __ASSEMBLY__ | 69 | #ifndef __ASSEMBLER__ |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | /* Here we must cater to libcs that poke about in kernel headers. */ | 72 | /* Here we must cater to libcs that poke about in kernel headers. */ |
| ... | @@ -102,6 +102,6 @@ typedef struct sigaltstack { | ... | @@ -102,6 +102,6 @@ typedef struct sigaltstack { |
| 102 | 	__kernel_size_t ss_size; | 102 | 	__kernel_size_t ss_size; |
| 103 | } stack_t; | 103 | } stack_t; |
| 104 | 104 | ||
| 105 | #endif /* __ASSEMBLY__ */ | 105 | #endif /* __ASSEMBLER__ */ |
| 106 | 106 | ||
| 107 | #endif /* _ASM_X86_SIGNAL_H */ | 107 | #endif /* _ASM_X86_SIGNAL_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/svm.h+4| ... | @@ -95,6 +95,8 @@ | ... | @@ -95,6 +95,8 @@ |
| 95 | #define SVM_EXIT_CR14_WRITE_TRAP		0x09e | 95 | #define SVM_EXIT_CR14_WRITE_TRAP		0x09e |
| 96 | #define SVM_EXIT_CR15_WRITE_TRAP		0x09f | 96 | #define SVM_EXIT_CR15_WRITE_TRAP		0x09f |
| 97 | #define SVM_EXIT_INVPCID 0x0a2 | 97 | #define SVM_EXIT_INVPCID 0x0a2 |
| 98 | #define SVM_EXIT_BUS_LOCK			0x0a5 | ||
| 99 | #define SVM_EXIT_IDLE_HLT 0x0a6 | ||
| 98 | #define SVM_EXIT_NPF 0x400 | 100 | #define SVM_EXIT_NPF 0x400 |
| 99 | #define SVM_EXIT_AVIC_INCOMPLETE_IPI		0x401 | 101 | #define SVM_EXIT_AVIC_INCOMPLETE_IPI		0x401 |
| 100 | #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS	0x402 | 102 | #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS	0x402 |
| ... | @@ -224,6 +226,8 @@ | ... | @@ -224,6 +226,8 @@ |
| 224 | 	{ SVM_EXIT_CR4_WRITE_TRAP,	"write_cr4_trap" }, \ | 226 | 	{ SVM_EXIT_CR4_WRITE_TRAP,	"write_cr4_trap" }, \ |
| 225 | 	{ SVM_EXIT_CR8_WRITE_TRAP,	"write_cr8_trap" }, \ | 227 | 	{ SVM_EXIT_CR8_WRITE_TRAP,	"write_cr8_trap" }, \ |
| 226 | 	{ SVM_EXIT_INVPCID, "invpcid" }, \ | 228 | 	{ SVM_EXIT_INVPCID, "invpcid" }, \ |
| 229 | 	{ SVM_EXIT_BUS_LOCK, "buslock" }, \ | ||
| 230 | 	{ SVM_EXIT_IDLE_HLT, "idle-halt" }, \ | ||
| 227 | 	{ SVM_EXIT_NPF, "npf" }, \ | 231 | 	{ SVM_EXIT_NPF, "npf" }, \ |
| 228 | 	{ SVM_EXIT_AVIC_INCOMPLETE_IPI,		"avic_incomplete_ipi" }, \ | 232 | 	{ SVM_EXIT_AVIC_INCOMPLETE_IPI,		"avic_incomplete_ipi" }, \ |
| 229 | 	{ SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \ | 233 | 	{ SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \ |
lib/libc/include/x86-linux-any/asm/unistd_32.h+3| ... | @@ -457,6 +457,9 @@ | ... | @@ -457,6 +457,9 @@ |
| 457 | #define __NR_getxattrat 464 | 457 | #define __NR_getxattrat 464 |
| 458 | #define __NR_listxattrat 465 | 458 | #define __NR_listxattrat 465 |
| 459 | #define __NR_removexattrat 466 | 459 | #define __NR_removexattrat 466 |
| 460 | #define __NR_open_tree_attr 467 | ||
| 461 | #define __NR_file_getattr 468 | ||
| 462 | #define __NR_file_setattr 469 | ||
| 460 | 463 | ||
| 461 | 464 | ||
| 462 | #endif /* _ASM_UNISTD_32_H */ | 465 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/unistd_64.h+3| ... | @@ -380,6 +380,9 @@ | ... | @@ -380,6 +380,9 @@ |
| 380 | #define __NR_getxattrat 464 | 380 | #define __NR_getxattrat 464 |
| 381 | #define __NR_listxattrat 465 | 381 | #define __NR_listxattrat 465 |
| 382 | #define __NR_removexattrat 466 | 382 | #define __NR_removexattrat 466 |
| 383 | #define __NR_open_tree_attr 467 | ||
| 384 | #define __NR_file_getattr 468 | ||
| 385 | #define __NR_file_setattr 469 | ||
| 383 | 386 | ||
| 384 | 387 | ||
| 385 | #endif /* _ASM_UNISTD_64_H */ | 388 | #endif /* _ASM_UNISTD_64_H */ |
| \ No newline at end of file | |||
lib/libc/include/x86-linux-any/asm/unistd_x32.h+3| ... | @@ -333,6 +333,9 @@ | ... | @@ -333,6 +333,9 @@ |
| 333 | #define __NR_getxattrat (__X32_SYSCALL_BIT + 464) | 333 | #define __NR_getxattrat (__X32_SYSCALL_BIT + 464) |
| 334 | #define __NR_listxattrat (__X32_SYSCALL_BIT + 465) | 334 | #define __NR_listxattrat (__X32_SYSCALL_BIT + 465) |
| 335 | #define __NR_removexattrat (__X32_SYSCALL_BIT + 466) | 335 | #define __NR_removexattrat (__X32_SYSCALL_BIT + 466) |
| 336 | #define __NR_open_tree_attr (__X32_SYSCALL_BIT + 467) | ||
| 337 | #define __NR_file_getattr (__X32_SYSCALL_BIT + 468) | ||
| 338 | #define __NR_file_setattr (__X32_SYSCALL_BIT + 469) | ||
| 336 | #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) | 339 | #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) |
| 337 | #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) | 340 | #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) |
| 338 | #define __NR_ioctl (__X32_SYSCALL_BIT + 514) | 341 | #define __NR_ioctl (__X32_SYSCALL_BIT + 514) |
lib/libc/include/x86-linux-any/asm/vmx.h+4-1| ... | @@ -34,6 +34,7 @@ | ... | @@ -34,6 +34,7 @@ |
| 34 | #define EXIT_REASON_TRIPLE_FAULT 2 | 34 | #define EXIT_REASON_TRIPLE_FAULT 2 |
| 35 | #define EXIT_REASON_INIT_SIGNAL			3 | 35 | #define EXIT_REASON_INIT_SIGNAL			3 |
| 36 | #define EXIT_REASON_SIPI_SIGNAL 4 | 36 | #define EXIT_REASON_SIPI_SIGNAL 4 |
| 37 | #define EXIT_REASON_OTHER_SMI 6 | ||
| 37 | 38 | ||
| 38 | #define EXIT_REASON_INTERRUPT_WINDOW 7 | 39 | #define EXIT_REASON_INTERRUPT_WINDOW 7 |
| 39 | #define EXIT_REASON_NMI_WINDOW 8 | 40 | #define EXIT_REASON_NMI_WINDOW 8 |
| ... | @@ -92,6 +93,7 @@ | ... | @@ -92,6 +93,7 @@ |
| 92 | #define EXIT_REASON_TPAUSE 68 | 93 | #define EXIT_REASON_TPAUSE 68 |
| 93 | #define EXIT_REASON_BUS_LOCK 74 | 94 | #define EXIT_REASON_BUS_LOCK 74 |
| 94 | #define EXIT_REASON_NOTIFY 75 | 95 | #define EXIT_REASON_NOTIFY 75 |
| 96 | #define EXIT_REASON_TDCALL 77 | ||
| 95 | 97 | ||
| 96 | #define VMX_EXIT_REASONS \ | 98 | #define VMX_EXIT_REASONS \ |
| 97 | 	{ EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \ | 99 | 	{ EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \ |
| ... | @@ -155,7 +157,8 @@ | ... | @@ -155,7 +157,8 @@ |
| 155 | 	{ EXIT_REASON_UMWAIT, "UMWAIT" }, \ | 157 | 	{ EXIT_REASON_UMWAIT, "UMWAIT" }, \ |
| 156 | 	{ EXIT_REASON_TPAUSE, "TPAUSE" }, \ | 158 | 	{ EXIT_REASON_TPAUSE, "TPAUSE" }, \ |
| 157 | 	{ EXIT_REASON_BUS_LOCK, "BUS_LOCK" }, \ | 159 | 	{ EXIT_REASON_BUS_LOCK, "BUS_LOCK" }, \ |
| 158 | 	{ EXIT_REASON_NOTIFY, "NOTIFY" } | 160 | 	{ EXIT_REASON_NOTIFY, "NOTIFY" }, \ |
| 161 | 	{ EXIT_REASON_TDCALL, "TDCALL" } | ||
| 159 | 162 | ||
| 160 | #define VMX_EXIT_REASON_FLAGS \ | 163 | #define VMX_EXIT_REASON_FLAGS \ |
| 161 | 	{ VMX_EXIT_REASONS_FAILED_VMENTRY,	"FAILED_VMENTRY" } | 164 | 	{ VMX_EXIT_REASONS_FAILED_VMENTRY,	"FAILED_VMENTRY" } |
lib/libc/include/xtensa-linux-any/asm/param.h deleted-29| ... | @@ -1,29 +0,0 @@ | ||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * include/asm-xtensa/param.h | ||
| 4 | * | ||
| 5 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 6 | * License. See the file "COPYING" in the main directory of this archive | ||
| 7 | * for more details. | ||
| 8 | * | ||
| 9 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _XTENSA_PARAM_H | ||
| 13 | #define _XTENSA_PARAM_H | ||
| 14 | |||
| 15 | # define HZ		100 | ||
| 16 | |||
| 17 | #define EXEC_PAGESIZE	4096 | ||
| 18 | |||
| 19 | #ifndef NGROUPS | ||
| 20 | #define NGROUPS		32 | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #ifndef NOGROUP | ||
| 24 | #define NOGROUP		(-1) | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #define MAXHOSTNAMELEN	64	/* max length of hostname */ | ||
| 28 | |||
| 29 | #endif /* _XTENSA_PARAM_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/xtensa-linux-any/asm/ptrace.h+1-1| ... | @@ -42,7 +42,7 @@ | ... | @@ -42,7 +42,7 @@ |
| 42 | #define PTRACE_GETFDPIC_EXEC	0 | 42 | #define PTRACE_GETFDPIC_EXEC	0 |
| 43 | #define PTRACE_GETFDPIC_INTERP	1 | 43 | #define PTRACE_GETFDPIC_INTERP	1 |
| 44 | 44 | ||
| 45 | #ifndef __ASSEMBLY__ | 45 | #ifndef __ASSEMBLER__ |
| 46 | 46 | ||
| 47 | struct user_pt_regs { | 47 | struct user_pt_regs { |
| 48 | 	__u32 pc; | 48 | 	__u32 pc; |
lib/libc/include/xtensa-linux-any/asm/signal.h+3-3| ... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
| 19 | #define _NSIG_BPW	32 | 19 | #define _NSIG_BPW	32 |
| 20 | #define _NSIG_WORDS	(_NSIG / _NSIG_BPW) | 20 | #define _NSIG_WORDS	(_NSIG / _NSIG_BPW) |
| 21 | 21 | ||
| 22 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLER__ |
| 23 | 23 | ||
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | 25 | ||
| ... | @@ -77,7 +77,7 @@ typedef struct { | ... | @@ -77,7 +77,7 @@ typedef struct { |
| 77 | #define MINSIGSTKSZ	2048 | 77 | #define MINSIGSTKSZ	2048 |
| 78 | #define SIGSTKSZ	8192 | 78 | #define SIGSTKSZ	8192 |
| 79 | 79 | ||
| 80 | #ifndef __ASSEMBLY__ | 80 | #ifndef __ASSEMBLER__ |
| 81 | 81 | ||
| 82 | #include <asm-generic/signal-defs.h> | 82 | #include <asm-generic/signal-defs.h> |
| 83 | 83 | ||
| ... | @@ -104,5 +104,5 @@ typedef struct sigaltstack { | ... | @@ -104,5 +104,5 @@ typedef struct sigaltstack { |
| 104 | 	__kernel_size_t ss_size; | 104 | 	__kernel_size_t ss_size; |
| 105 | } stack_t; | 105 | } stack_t; |
| 106 | 106 | ||
| 107 | #endif	/* __ASSEMBLY__ */ | 107 | #endif	/* __ASSEMBLER__ */ |
| 108 | #endif /* _XTENSA_SIGNAL_H */ | 108 | #endif /* _XTENSA_SIGNAL_H */ |
| \ No newline at end of file | |||
lib/libc/include/xtensa-linux-any/asm/types.h+2-2| ... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | ||
| 15 | #include <asm-generic/int-ll64.h> | 15 | #include <asm-generic/int-ll64.h> |
| 16 | 16 | ||
| 17 | #ifdef __ASSEMBLY__ | 17 | #ifdef __ASSEMBLER__ |
| 18 | # define __XTENSA_UL(x)		(x) | 18 | # define __XTENSA_UL(x)		(x) |
| 19 | # define __XTENSA_UL_CONST(x)	x | 19 | # define __XTENSA_UL_CONST(x)	x |
| 20 | #else | 20 | #else |
| ... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
| 23 | # define __XTENSA_UL_CONST(x)	___XTENSA_UL_CONST(x) | 23 | # define __XTENSA_UL_CONST(x)	___XTENSA_UL_CONST(x) |
| 24 | #endif | 24 | #endif |
| 25 | 25 | ||
| 26 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLER__ |
| 27 | 27 | ||
| 28 | #endif | 28 | #endif |
| 29 | 29 |
lib/libc/include/xtensa-linux-any/asm/unistd_32.h+3| ... | @@ -413,6 +413,9 @@ | ... | @@ -413,6 +413,9 @@ |
| 413 | #define __NR_getxattrat 464 | 413 | #define __NR_getxattrat 464 |
| 414 | #define __NR_listxattrat 465 | 414 | #define __NR_listxattrat 465 |
| 415 | #define __NR_removexattrat 466 | 415 | #define __NR_removexattrat 466 |
| 416 | #define __NR_open_tree_attr 467 | ||
| 417 | #define __NR_file_getattr 468 | ||
| 418 | #define __NR_file_setattr 469 | ||
| 416 | 419 | ||
| 417 | 420 | ||
| 418 | #endif /* _ASM_UNISTD_32_H */ | 421 | #endif /* _ASM_UNISTD_32_H */ |
| \ No newline at end of file | |||