Lines Matching +full:max +full:- +full:by +full:- +full:define

1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
4 #define _UAPI__LINUX_BTF_H__
8 #define BTF_MAGIC 0xeB9F
9 #define BTF_VERSION 1
24 /* Max # of type identifier */
25 #define BTF_MAX_TYPE 0x000fffff
26 /* Max offset into the string section */
27 #define BTF_MAX_NAME_OFFSET 0x00ffffff
28 /* Max # of struct/union/enum members or func args */
29 #define BTF_MAX_VLEN 0xffff
34 * bits 0-15: vlen (e.g. # of struct's members)
35 * bits 16-23: unused
36 * bits 24-28: kind (e.g. int, ptr, array...etc)
37 * bits 29-30: unused
38 * bit 31: kind_flag, currently used by
42 /* "size" is used by INT, ENUM, STRUCT, UNION, DATASEC and ENUM64.
45 * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
55 #define BTF_INFO_KIND(info) (((info) >> 24) & 0x1f)
56 #define BTF_INFO_VLEN(info) ((info) & 0xffff)
57 #define BTF_INFO_KFLAG(info) ((info) >> 31)
66 BTF_KIND_ENUM = 6, /* Enumeration up to 32-bit values */
79 BTF_KIND_ENUM64 = 19, /* Enumeration up to 64-bit values */
82 BTF_KIND_MAX = NR_BTF_KINDS - 1,
86 * followed by extra data.
89 /* BTF_KIND_INT is followed by a u32 and the following
92 #define BTF_INT_ENCODING(VAL) (((VAL) & 0x0f000000) >> 24)
93 #define BTF_INT_OFFSET(VAL) (((VAL) & 0x00ff0000) >> 16)
94 #define BTF_INT_BITS(VAL) ((VAL) & 0x000000ff)
97 #define BTF_INT_SIGNED (1 << 0)
98 #define BTF_INT_CHAR (1 << 1)
99 #define BTF_INT_BOOL (1 << 2)
101 /* BTF_KIND_ENUM is followed by multiple "struct btf_enum".
110 /* BTF_KIND_ARRAY is followed by one "struct btf_array" */
118 * by multiple "struct btf_member". The exact number
138 #define BTF_MEMBER_BITFIELD_SIZE(val) ((val) >> 24)
139 #define BTF_MEMBER_BIT_OFFSET(val) ((val) & 0xffffff)
141 /* BTF_KIND_FUNC_PROTO is followed by multiple "struct btf_param".
162 /* BTF_KIND_VAR is followed by a single "struct btf_var" to describe
169 /* BTF_KIND_DATASEC is followed by multiple "struct btf_var_secinfo"
171 * in-section offset as well as size.
179 /* BTF_KIND_DECL_TAG is followed by a single "struct btf_decl_tag" to describe
181 * If component_idx == -1, the tag is applied to a struct, union,
184 * or argument (0 ... vlen-1).
190 /* BTF_KIND_ENUM64 is followed by multiple "struct btf_enum64".