aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-headers/add-btf-float-uapi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/linux-headers/add-btf-float-uapi.patch')
-rw-r--r--main/linux-headers/add-btf-float-uapi.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/main/linux-headers/add-btf-float-uapi.patch b/main/linux-headers/add-btf-float-uapi.patch
new file mode 100644
index 00000000000..ba2cb008dd3
--- /dev/null
+++ b/main/linux-headers/add-btf-float-uapi.patch
@@ -0,0 +1,38 @@
+From 473899d4f7c8c563d5c4e03bd52dc8dd18ba583a Mon Sep 17 00:00:00 2001
+From: Ilya Leoshkevich <iii@linux.ibm.com>
+Date: Fri, 26 Feb 2021 21:22:47 +0100
+Subject: [PATCH] bpf: Add BTF_KIND_FLOAT to uapi
+
+Add a new kind value and expand the kind bitfield.
+
+Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
+Signed-off-by: Alexei Starovoitov <ast@kernel.org>
+Acked-by: Yonghong Song <yhs@fb.com>
+Link: https://lore.kernel.org/bpf/20210226202256.116518-2-iii@linux.ibm.com
+---
+ include/uapi/linux/btf.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/include/uapi/linux/btf.h b/include/uapi/linux/btf.h
+index 5a667107..d27b1708 100644
+--- a/include/uapi/linux/btf.h
++++ b/include/uapi/linux/btf.h
+@@ -52,7 +52,7 @@ struct btf_type {
+ };
+ };
+
+-#define BTF_INFO_KIND(info) (((info) >> 24) & 0x0f)
++#define BTF_INFO_KIND(info) (((info) >> 24) & 0x1f)
+ #define BTF_INFO_VLEN(info) ((info) & 0xffff)
+ #define BTF_INFO_KFLAG(info) ((info) >> 31)
+
+@@ -72,7 +72,8 @@ struct btf_type {
+ #define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
+ #define BTF_KIND_VAR 14 /* Variable */
+ #define BTF_KIND_DATASEC 15 /* Section */
+-#define BTF_KIND_MAX BTF_KIND_DATASEC
++#define BTF_KIND_FLOAT 16 /* Floating point */
++#define BTF_KIND_MAX BTF_KIND_FLOAT
+ #define NR_BTF_KINDS (BTF_KIND_MAX + 1)
+
+ /* For some specific BTF_KIND, "struct btf_type" is immediately