kernel.h: drop inclusion in bitmap.h
[linux-2.6-microblaze.git] / include / linux / btf.h
index 7fabf14..3bac66e 100644 (file)
@@ -9,6 +9,7 @@
 #include <uapi/linux/bpf.h>
 
 #define BTF_TYPE_EMIT(type) ((void)(type *)0)
+#define BTF_TYPE_EMIT_ENUM(enum_val) ((void)enum_val)
 
 struct btf;
 struct btf_member;
@@ -109,6 +110,7 @@ const struct btf_type *btf_type_resolve_func_ptr(const struct btf *btf,
 const struct btf_type *
 btf_resolve_size(const struct btf *btf, const struct btf_type *type,
                 u32 *type_size);
+const char *btf_type_str(const struct btf_type *t);
 
 #define for_each_member(i, struct_type, member)                        \
        for (i = 0, member = btf_type_member(struct_type);      \
@@ -140,6 +142,11 @@ static inline bool btf_type_is_enum(const struct btf_type *t)
        return BTF_INFO_KIND(t->info) == BTF_KIND_ENUM;
 }
 
+static inline bool btf_type_is_scalar(const struct btf_type *t)
+{
+       return btf_type_is_int(t) || btf_type_is_enum(t);
+}
+
 static inline bool btf_type_is_typedef(const struct btf_type *t)
 {
        return BTF_INFO_KIND(t->info) == BTF_KIND_TYPEDEF;