diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2019-01-07 09:33:46 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-08 11:16:44 +0000 |
commit | e185ff92e03429142739376b6a05a5faddd773d4 (patch) | |
tree | aa76f750ad88a1e7b0c3f51e16a82d236168aea1 | |
parent | 7abac94d38579c13173abc64242e2458f4f0b855 (diff) | |
download | poky-e185ff92e03429142739376b6a05a5faddd773d4.tar.gz |
linux-libc-headers: update to v4.19
Updating the linux-libc-headers to match the latest reference
kernel in oe-core.
We addtionally add three patches (identified by Khem) to fix muslc
aarch64 build issues.
(From OE-Core rev: 11f02b7c6f9854eecd3a49ea47833c8cbffb1581)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/conf/distro/include/tcmode-default.inc | 2 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch | 41 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-arm64-sve-ptrace-Fix-SVE_PT_REGS_OFFSET-definition.patch | 43 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch | 289 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.19.bb (renamed from meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb) | 7 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/x.mbox | 174 |
6 files changed, 553 insertions, 3 deletions
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 8c99907f02..812b923fa2 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc | |||
@@ -23,7 +23,7 @@ SDKGCCVERSION ?= "${GCCVERSION}" | |||
23 | BINUVERSION ?= "2.31%" | 23 | BINUVERSION ?= "2.31%" |
24 | GDBVERSION ?= "8.2%" | 24 | GDBVERSION ?= "8.2%" |
25 | GLIBCVERSION ?= "2.28%" | 25 | GLIBCVERSION ?= "2.28%" |
26 | LINUXLIBCVERSION ?= "4.18%" | 26 | LINUXLIBCVERSION ?= "4.19%" |
27 | QEMUVERSION ?= "3.1%" | 27 | QEMUVERSION ?= "3.1%" |
28 | GOVERSION ?= "1.11%" | 28 | GOVERSION ?= "1.11%" |
29 | 29 | ||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch new file mode 100644 index 0000000000..78ebd31e66 --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 9ca6c6a510bda90954aa2532711200b89dd1df89 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dave Martin <Dave.Martin@arm.com> | ||
3 | Date: Tue, 11 Dec 2018 19:26:45 +0000 | ||
4 | Subject: [PATCH 1/3] kbuild: install_headers.sh: Strip _UAPI from | ||
5 | #if-defined() guards | ||
6 | |||
7 | install_headers.sh knows how to strip the _UAPI prefix from #ifdef/ | ||
8 | ifndef and #define directives used to guard headers against multiple | ||
9 | or inappropriate inclusion. Currently this does not work for guards | ||
10 | in the "#if defined()" style, which may be needed for non-trivial | ||
11 | cases. | ||
12 | |||
13 | This patch adds similar logic so that the _UAPI prefix is also | ||
14 | stripped from guard directives written using "#if defined()" etc. | ||
15 | |||
16 | This is not completely foolproof, but will work for simple cases of | ||
17 | using #if defined() to guard against inappropriate header inclusion. | ||
18 | |||
19 | Signed-off-by: Dave Martin <Dave.Martin@arm.com> | ||
20 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
21 | |||
22 | Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html] | ||
23 | --- | ||
24 | scripts/headers_install.sh | 1 + | ||
25 | 1 file changed, 1 insertion(+) | ||
26 | |||
27 | diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh | ||
28 | index 593f8879c641..fe1d3fc0d33a 100755 | ||
29 | --- a/scripts/headers_install.sh | ||
30 | +++ b/scripts/headers_install.sh | ||
31 | @@ -38,6 +38,7 @@ do | ||
32 | -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \ | ||
33 | -e 's/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g' \ | ||
34 | -e 's@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @' \ | ||
35 | + -e ':1;s/(#(if|elif)(.*[^A-Za-z0-9_])defined\([[:space:]]*)_UAPI/\1/;t1' \ | ||
36 | "$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1 | ||
37 | scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \ | ||
38 | > "$OUTDIR/$FILE" | ||
39 | -- | ||
40 | 2.5.0 | ||
41 | |||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-arm64-sve-ptrace-Fix-SVE_PT_REGS_OFFSET-definition.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-arm64-sve-ptrace-Fix-SVE_PT_REGS_OFFSET-definition.patch new file mode 100644 index 0000000000..462fdba2ed --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-arm64-sve-ptrace-Fix-SVE_PT_REGS_OFFSET-definition.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 0dede80d25ae2005f8af7235809fc09a7c47c62e Mon Sep 17 00:00:00 2001 | ||
2 | From: Dave Martin <Dave.Martin@arm.com> | ||
3 | Date: Tue, 11 Dec 2018 19:26:46 +0000 | ||
4 | Subject: [PATCH 2/3] arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition | ||
5 | |||
6 | SVE_PT_REGS_OFFSET is supposed to indicate the offset for skipping | ||
7 | over the ptrace NT_ARM_SVE header (struct user_sve_header) to the | ||
8 | start of the SVE register data proper. | ||
9 | |||
10 | However, currently SVE_PT_REGS_OFFSET is defined in terms of struct | ||
11 | sve_context, which is wrong: that structure describes the SVE | ||
12 | header in the signal frame, not in the ptrace regset. | ||
13 | |||
14 | This patch fixes the definition to use the ptrace header structure | ||
15 | struct user_sve_header instead. | ||
16 | |||
17 | By good fortune, the to structures are the same size anyway, so | ||
18 | there is no functional or ABI change. | ||
19 | |||
20 | Signed-off-by: Dave Martin <Dave.Martin@arm.com> | ||
21 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
22 | |||
23 | Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html] | ||
24 | --- | ||
25 | arch/arm64/include/uapi/asm/ptrace.h | 2 +- | ||
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h | ||
29 | index 98c4ce55d9c3..ad64d2c92ef5 100644 | ||
30 | --- a/arch/arm64/include/uapi/asm/ptrace.h | ||
31 | +++ b/arch/arm64/include/uapi/asm/ptrace.h | ||
32 | @@ -130,7 +130,7 @@ struct user_sve_header { | ||
33 | |||
34 | /* Offset from the start of struct user_sve_header to the register data */ | ||
35 | #define SVE_PT_REGS_OFFSET \ | ||
36 | - ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ | ||
37 | + ((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \ | ||
38 | / SVE_VQ_BYTES * SVE_VQ_BYTES) | ||
39 | |||
40 | /* | ||
41 | -- | ||
42 | 2.5.0 | ||
43 | |||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch new file mode 100644 index 0000000000..0423f0f2cc --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch | |||
@@ -0,0 +1,289 @@ | |||
1 | From 1114697c04b9699112e78dd8fc6ec849609ca1cb Mon Sep 17 00:00:00 2001 | ||
2 | From: Dave Martin <Dave.Martin@arm.com> | ||
3 | Date: Tue, 11 Dec 2018 19:26:47 +0000 | ||
4 | Subject: [PATCH 3/3] arm64/sve: Disentangle <uapi/asm/ptrace.h> from | ||
5 | <uapi/asm/sigcontext.h> | ||
6 | |||
7 | Currently, <uapi/asm/sigcontext.h> provides common definitions for | ||
8 | describing SVE context structures that are also used by the ptrace | ||
9 | definitions in <uapi/asm/ptrace.h>. | ||
10 | |||
11 | For this reason, a #include of <asm/sigcontext.h> was added in | ||
12 | ptrace.h, but it this turns out that this can interact badly with | ||
13 | userspace code that tries to include ptrace.h on top of the libc | ||
14 | headers (which may provide their own shadow definitions for | ||
15 | sigcontext.h). | ||
16 | |||
17 | To make the headers easier for userspace to consume, this patch | ||
18 | bounces the common definitions into an __SVE_* namespace and moves | ||
19 | them to a backend header <uapi/asm/sve_context.h> that can be | ||
20 | included by the other headers as appropriate. This should allow | ||
21 | ptrace.h to be used alongside libc's sigcontext.h (if any) without | ||
22 | ill effects. | ||
23 | |||
24 | This should make the situation unambiguous: <asm/sigcontext.h> is | ||
25 | the header to include for the sigframe-specific definitions, while | ||
26 | <asm/ptrace.h> is the header to include for ptrace-specific | ||
27 | definitions. | ||
28 | |||
29 | To avoid conflicting with existing usage, <asm/sigcontext.h> | ||
30 | remains the canonical way to get the common definitions for | ||
31 | SVE_VQ_MIN, sve_vq_from_vl() etc., both in userspace and in the | ||
32 | kernel: relying on these being defined as a side effect of | ||
33 | including just <asm/ptrace.h> was never intended to be safe. | ||
34 | |||
35 | Signed-off-by: Dave Martin <Dave.Martin@arm.com> | ||
36 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
37 | |||
38 | Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html] | ||
39 | --- | ||
40 | arch/arm64/include/uapi/asm/ptrace.h | 39 ++++++++++----------- | ||
41 | arch/arm64/include/uapi/asm/sigcontext.h | 56 +++++++++++++++---------------- | ||
42 | arch/arm64/include/uapi/asm/sve_context.h | 50 +++++++++++++++++++++++++++ | ||
43 | 3 files changed, 96 insertions(+), 49 deletions(-) | ||
44 | create mode 100644 arch/arm64/include/uapi/asm/sve_context.h | ||
45 | |||
46 | diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h | ||
47 | index ad64d2c92ef5..81547c3a95a3 100644 | ||
48 | --- a/arch/arm64/include/uapi/asm/ptrace.h | ||
49 | +++ b/arch/arm64/include/uapi/asm/ptrace.h | ||
50 | @@ -23,7 +23,7 @@ | ||
51 | #include <linux/types.h> | ||
52 | |||
53 | #include <asm/hwcap.h> | ||
54 | -#include <asm/sigcontext.h> | ||
55 | +#include <asm/sve_context.h> | ||
56 | |||
57 | |||
58 | /* | ||
59 | @@ -129,9 +129,9 @@ struct user_sve_header { | ||
60 | */ | ||
61 | |||
62 | /* Offset from the start of struct user_sve_header to the register data */ | ||
63 | -#define SVE_PT_REGS_OFFSET \ | ||
64 | - ((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \ | ||
65 | - / SVE_VQ_BYTES * SVE_VQ_BYTES) | ||
66 | +#define SVE_PT_REGS_OFFSET \ | ||
67 | + ((sizeof(struct user_sve_header) + (__SVE_VQ_BYTES - 1)) \ | ||
68 | + / __SVE_VQ_BYTES * __SVE_VQ_BYTES) | ||
69 | |||
70 | /* | ||
71 | * The register data content and layout depends on the value of the | ||
72 | @@ -177,39 +177,36 @@ struct user_sve_header { | ||
73 | * Additional data might be appended in the future. | ||
74 | */ | ||
75 | |||
76 | -#define SVE_PT_SVE_ZREG_SIZE(vq) SVE_SIG_ZREG_SIZE(vq) | ||
77 | -#define SVE_PT_SVE_PREG_SIZE(vq) SVE_SIG_PREG_SIZE(vq) | ||
78 | -#define SVE_PT_SVE_FFR_SIZE(vq) SVE_SIG_FFR_SIZE(vq) | ||
79 | +#define SVE_PT_SVE_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) | ||
80 | +#define SVE_PT_SVE_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) | ||
81 | +#define SVE_PT_SVE_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) | ||
82 | #define SVE_PT_SVE_FPSR_SIZE sizeof(__u32) | ||
83 | #define SVE_PT_SVE_FPCR_SIZE sizeof(__u32) | ||
84 | |||
85 | -#define __SVE_SIG_TO_PT(offset) \ | ||
86 | - ((offset) - SVE_SIG_REGS_OFFSET + SVE_PT_REGS_OFFSET) | ||
87 | - | ||
88 | #define SVE_PT_SVE_OFFSET SVE_PT_REGS_OFFSET | ||
89 | |||
90 | #define SVE_PT_SVE_ZREGS_OFFSET \ | ||
91 | - __SVE_SIG_TO_PT(SVE_SIG_ZREGS_OFFSET) | ||
92 | + (SVE_PT_REGS_OFFSET + __SVE_ZREGS_OFFSET) | ||
93 | #define SVE_PT_SVE_ZREG_OFFSET(vq, n) \ | ||
94 | - __SVE_SIG_TO_PT(SVE_SIG_ZREG_OFFSET(vq, n)) | ||
95 | + (SVE_PT_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n)) | ||
96 | #define SVE_PT_SVE_ZREGS_SIZE(vq) \ | ||
97 | - (SVE_PT_SVE_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET) | ||
98 | + (SVE_PT_SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET) | ||
99 | |||
100 | #define SVE_PT_SVE_PREGS_OFFSET(vq) \ | ||
101 | - __SVE_SIG_TO_PT(SVE_SIG_PREGS_OFFSET(vq)) | ||
102 | + (SVE_PT_REGS_OFFSET + __SVE_PREGS_OFFSET(vq)) | ||
103 | #define SVE_PT_SVE_PREG_OFFSET(vq, n) \ | ||
104 | - __SVE_SIG_TO_PT(SVE_SIG_PREG_OFFSET(vq, n)) | ||
105 | + (SVE_PT_REGS_OFFSET + __SVE_PREG_OFFSET(vq, n)) | ||
106 | #define SVE_PT_SVE_PREGS_SIZE(vq) \ | ||
107 | - (SVE_PT_SVE_PREG_OFFSET(vq, SVE_NUM_PREGS) - \ | ||
108 | + (SVE_PT_SVE_PREG_OFFSET(vq, __SVE_NUM_PREGS) - \ | ||
109 | SVE_PT_SVE_PREGS_OFFSET(vq)) | ||
110 | |||
111 | #define SVE_PT_SVE_FFR_OFFSET(vq) \ | ||
112 | - __SVE_SIG_TO_PT(SVE_SIG_FFR_OFFSET(vq)) | ||
113 | + (SVE_PT_REGS_OFFSET + __SVE_FFR_OFFSET(vq)) | ||
114 | |||
115 | #define SVE_PT_SVE_FPSR_OFFSET(vq) \ | ||
116 | ((SVE_PT_SVE_FFR_OFFSET(vq) + SVE_PT_SVE_FFR_SIZE(vq) + \ | ||
117 | - (SVE_VQ_BYTES - 1)) \ | ||
118 | - / SVE_VQ_BYTES * SVE_VQ_BYTES) | ||
119 | + (__SVE_VQ_BYTES - 1)) \ | ||
120 | + / __SVE_VQ_BYTES * __SVE_VQ_BYTES) | ||
121 | #define SVE_PT_SVE_FPCR_OFFSET(vq) \ | ||
122 | (SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE) | ||
123 | |||
124 | @@ -220,8 +217,8 @@ struct user_sve_header { | ||
125 | |||
126 | #define SVE_PT_SVE_SIZE(vq, flags) \ | ||
127 | ((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE \ | ||
128 | - - SVE_PT_SVE_OFFSET + (SVE_VQ_BYTES - 1)) \ | ||
129 | - / SVE_VQ_BYTES * SVE_VQ_BYTES) | ||
130 | + - SVE_PT_SVE_OFFSET + (__SVE_VQ_BYTES - 1)) \ | ||
131 | + / __SVE_VQ_BYTES * __SVE_VQ_BYTES) | ||
132 | |||
133 | #define SVE_PT_SIZE(vq, flags) \ | ||
134 | (((flags) & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE ? \ | ||
135 | diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h | ||
136 | index dca8f8b5168b..5f3c0cec5af9 100644 | ||
137 | --- a/arch/arm64/include/uapi/asm/sigcontext.h | ||
138 | +++ b/arch/arm64/include/uapi/asm/sigcontext.h | ||
139 | @@ -130,6 +130,8 @@ struct sve_context { | ||
140 | |||
141 | #endif /* !__ASSEMBLY__ */ | ||
142 | |||
143 | +#include <asm/sve_context.h> | ||
144 | + | ||
145 | /* | ||
146 | * The SVE architecture leaves space for future expansion of the | ||
147 | * vector length beyond its initial architectural limit of 2048 bits | ||
148 | @@ -138,21 +140,20 @@ struct sve_context { | ||
149 | * See linux/Documentation/arm64/sve.txt for a description of the VL/VQ | ||
150 | * terminology. | ||
151 | */ | ||
152 | -#define SVE_VQ_BYTES 16 /* number of bytes per quadword */ | ||
153 | +#define SVE_VQ_BYTES __SVE_VQ_BYTES /* bytes per quadword */ | ||
154 | |||
155 | -#define SVE_VQ_MIN 1 | ||
156 | -#define SVE_VQ_MAX 512 | ||
157 | +#define SVE_VQ_MIN __SVE_VQ_MIN | ||
158 | +#define SVE_VQ_MAX __SVE_VQ_MAX | ||
159 | |||
160 | -#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES) | ||
161 | -#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES) | ||
162 | +#define SVE_VL_MIN __SVE_VL_MIN | ||
163 | +#define SVE_VL_MAX __SVE_VL_MAX | ||
164 | |||
165 | -#define SVE_NUM_ZREGS 32 | ||
166 | -#define SVE_NUM_PREGS 16 | ||
167 | +#define SVE_NUM_ZREGS __SVE_NUM_ZREGS | ||
168 | +#define SVE_NUM_PREGS __SVE_NUM_PREGS | ||
169 | |||
170 | -#define sve_vl_valid(vl) \ | ||
171 | - ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX) | ||
172 | -#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES) | ||
173 | -#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES) | ||
174 | +#define sve_vl_valid(vl) __sve_vl_valid(vl) | ||
175 | +#define sve_vq_from_vl(vl) __sve_vq_from_vl(vl) | ||
176 | +#define sve_vl_from_vq(vq) __sve_vl_from_vq(vq) | ||
177 | |||
178 | /* | ||
179 | * If the SVE registers are currently live for the thread at signal delivery, | ||
180 | @@ -205,34 +206,33 @@ struct sve_context { | ||
181 | * Additional data might be appended in the future. | ||
182 | */ | ||
183 | |||
184 | -#define SVE_SIG_ZREG_SIZE(vq) ((__u32)(vq) * SVE_VQ_BYTES) | ||
185 | -#define SVE_SIG_PREG_SIZE(vq) ((__u32)(vq) * (SVE_VQ_BYTES / 8)) | ||
186 | -#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq) | ||
187 | +#define SVE_SIG_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) | ||
188 | +#define SVE_SIG_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) | ||
189 | +#define SVE_SIG_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) | ||
190 | |||
191 | #define SVE_SIG_REGS_OFFSET \ | ||
192 | - ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ | ||
193 | - / SVE_VQ_BYTES * SVE_VQ_BYTES) | ||
194 | + ((sizeof(struct sve_context) + (__SVE_VQ_BYTES - 1)) \ | ||
195 | + / __SVE_VQ_BYTES * __SVE_VQ_BYTES) | ||
196 | |||
197 | -#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET | ||
198 | +#define SVE_SIG_ZREGS_OFFSET \ | ||
199 | + (SVE_SIG_REGS_OFFSET + __SVE_ZREGS_OFFSET) | ||
200 | #define SVE_SIG_ZREG_OFFSET(vq, n) \ | ||
201 | - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n)) | ||
202 | -#define SVE_SIG_ZREGS_SIZE(vq) \ | ||
203 | - (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET) | ||
204 | + (SVE_SIG_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n)) | ||
205 | +#define SVE_SIG_ZREGS_SIZE(vq) __SVE_ZREGS_SIZE(vq) | ||
206 | |||
207 | #define SVE_SIG_PREGS_OFFSET(vq) \ | ||
208 | - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq)) | ||
209 | + (SVE_SIG_REGS_OFFSET + __SVE_PREGS_OFFSET(vq)) | ||
210 | #define SVE_SIG_PREG_OFFSET(vq, n) \ | ||
211 | - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n)) | ||
212 | -#define SVE_SIG_PREGS_SIZE(vq) \ | ||
213 | - (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq)) | ||
214 | + (SVE_SIG_REGS_OFFSET + __SVE_PREG_OFFSET(vq, n)) | ||
215 | +#define SVE_SIG_PREGS_SIZE(vq) __SVE_PREGS_SIZE(vq) | ||
216 | |||
217 | #define SVE_SIG_FFR_OFFSET(vq) \ | ||
218 | - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq)) | ||
219 | + (SVE_SIG_REGS_OFFSET + __SVE_FFR_OFFSET(vq)) | ||
220 | |||
221 | #define SVE_SIG_REGS_SIZE(vq) \ | ||
222 | - (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) | ||
223 | - | ||
224 | -#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) | ||
225 | + (__SVE_FFR_OFFSET(vq) + __SVE_FFR_SIZE(vq)) | ||
226 | |||
227 | +#define SVE_SIG_CONTEXT_SIZE(vq) \ | ||
228 | + (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) | ||
229 | |||
230 | #endif /* _UAPI__ASM_SIGCONTEXT_H */ | ||
231 | diff --git a/arch/arm64/include/uapi/asm/sve_context.h b/arch/arm64/include/uapi/asm/sve_context.h | ||
232 | new file mode 100644 | ||
233 | index 000000000000..140f14c318a5 | ||
234 | --- /dev/null | ||
235 | +++ b/arch/arm64/include/uapi/asm/sve_context.h | ||
236 | @@ -0,0 +1,50 @@ | ||
237 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
238 | +/* Copyright (C) 2017-2018 ARM Limited */ | ||
239 | + | ||
240 | +#if !defined(_UAPI__ASM_PTRACE_H) && !defined(_UAPI__ASM_SIGCONTEXT_H) | ||
241 | +#error "Do not include this header or use its definitions directly." | ||
242 | +#endif | ||
243 | + | ||
244 | +#ifndef _UAPI__ASM_SVE_CONTEXT_H | ||
245 | +#define _UAPI__ASM_SVE_CONTEXT_H | ||
246 | + | ||
247 | +#define __SVE_VQ_BYTES 16 /* number of bytes per quadword */ | ||
248 | + | ||
249 | +#define __SVE_VQ_MIN 1 | ||
250 | +#define __SVE_VQ_MAX 512 | ||
251 | + | ||
252 | +#define __SVE_VL_MIN (__SVE_VQ_MIN * __SVE_VQ_BYTES) | ||
253 | +#define __SVE_VL_MAX (__SVE_VQ_MAX * __SVE_VQ_BYTES) | ||
254 | + | ||
255 | +#define __SVE_NUM_ZREGS 32 | ||
256 | +#define __SVE_NUM_PREGS 16 | ||
257 | + | ||
258 | +#define __sve_vl_valid(vl) \ | ||
259 | + ((vl) % __SVE_VQ_BYTES == 0 && \ | ||
260 | + (vl) >= __SVE_VL_MIN && \ | ||
261 | + (vl) <= __SVE_VL_MAX) | ||
262 | + | ||
263 | +#define __sve_vq_from_vl(vl) ((vl) / __SVE_VQ_BYTES) | ||
264 | +#define __sve_vl_from_vq(vq) ((vq) * __SVE_VQ_BYTES) | ||
265 | + | ||
266 | +#define __SVE_ZREG_SIZE(vq) ((__u32)(vq) * __SVE_VQ_BYTES) | ||
267 | +#define __SVE_PREG_SIZE(vq) ((__u32)(vq) * (__SVE_VQ_BYTES / 8)) | ||
268 | +#define __SVE_FFR_SIZE(vq) __SVE_PREG_SIZE(vq) | ||
269 | + | ||
270 | +#define __SVE_ZREGS_OFFSET 0 | ||
271 | +#define __SVE_ZREG_OFFSET(vq, n) \ | ||
272 | + (__SVE_ZREGS_OFFSET + __SVE_ZREG_SIZE(vq) * (n)) | ||
273 | +#define __SVE_ZREGS_SIZE(vq) \ | ||
274 | + (__SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - __SVE_ZREGS_OFFSET) | ||
275 | + | ||
276 | +#define __SVE_PREGS_OFFSET(vq) \ | ||
277 | + (__SVE_ZREGS_OFFSET + __SVE_ZREGS_SIZE(vq)) | ||
278 | +#define __SVE_PREG_OFFSET(vq, n) \ | ||
279 | + (__SVE_PREGS_OFFSET(vq) + __SVE_PREG_SIZE(vq) * (n)) | ||
280 | +#define __SVE_PREGS_SIZE(vq) \ | ||
281 | + (__SVE_PREG_OFFSET(vq, __SVE_NUM_PREGS) - __SVE_PREGS_OFFSET(vq)) | ||
282 | + | ||
283 | +#define __SVE_FFR_OFFSET(vq) \ | ||
284 | + (__SVE_PREGS_OFFSET(vq) + __SVE_PREGS_SIZE(vq)) | ||
285 | + | ||
286 | +#endif /* ! _UAPI__ASM_SVE_CONTEXT_H */ | ||
287 | -- | ||
288 | 2.5.0 | ||
289 | |||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.19.bb index 229a0027d7..8fd427efef 100644 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.19.bb | |||
@@ -11,7 +11,10 @@ SRC_URI_append_libc-musl = "\ | |||
11 | 11 | ||
12 | SRC_URI_append = "\ | 12 | SRC_URI_append = "\ |
13 | file://0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch \ | 13 | file://0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch \ |
14 | file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \ | ||
15 | file://0002-arm64-sve-ptrace-Fix-SVE_PT_REGS_OFFSET-definition.patch \ | ||
16 | file://0003-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch \ | ||
14 | " | 17 | " |
15 | 18 | ||
16 | SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9" | 19 | SRC_URI[md5sum] = "740a90cf810c2105df8ee12e5d0bb900" |
17 | SRC_URI[sha256sum] = "19d8bcf49ef530cd4e364a45b4a22fa70714b70349c8100e7308488e26f1eaf1" | 20 | SRC_URI[sha256sum] = "0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1" |
diff --git a/meta/recipes-kernel/linux-libc-headers/x.mbox b/meta/recipes-kernel/linux-libc-headers/x.mbox new file mode 100644 index 0000000000..25e76e7595 --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/x.mbox | |||
@@ -0,0 +1,174 @@ | |||
1 | From openembedded-core-bounces@lists.openembedded.org Tue Dec 25 20:46:09 2018 | ||
2 | Delivered-To: bruce.ashfield@gmail.com | ||
3 | Received: by 2002:a2e:4c3:0:0:0:0:0 with SMTP id a64-v6csp5312962ljf; | ||
4 | Tue, 25 Dec 2018 17:46:09 -0800 (PST) | ||
5 | X-Google-Smtp-Source: ALg8bN5+ydksOT9csVRJHxYDz7K6mUppK0qIlnMBsbGWz9Sq8Fdlk64bzsaJk68T9XGeIzgSwxS9 | ||
6 | X-Received: by 2002:a63:295:: with SMTP id 143mr16751743pgc.362.1545788769434; | ||
7 | Tue, 25 Dec 2018 17:46:09 -0800 (PST) | ||
8 | ARC-Seal: i=1; a=rsa-sha256; t=1545788769; cv=none; | ||
9 | d=google.com; s=arc-20160816; | ||
10 | b=jG9fBrPvXAw8K+BjylRwE9cyo1dGTSQIXWYQAsxDXBL4sJKb/9HQ7t9CARYj48ptNC | ||
11 | PyU9C1SF8FBe8jel1WM2zKHYxcoKShkfNv92t9jrw7thhkeRGtOPIfoQXt1ma6+1MLGa | ||
12 | hdinQ5eBKdQt2AouG0A8huAMuHJfxYB9XpD5771sN0XD51Ecc8oYTYOEPmzg21EYg9EC | ||
13 | /8A+bodbKwBlIjg6x/O1ucx7W6fV5iyeyaOsJbzbPZeTdC3FqGycgSfErAkyoEJjYwAP | ||
14 | /k5PPo4vm6SU3PHJOV7a2cLbWfG6bS5K6/cxzdpXQKTGheKZOc6FFE3ptZfAwkFbVxfX | ||
15 | Siww== | ||
16 | ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; | ||
17 | h=errors-to:sender:content-transfer-encoding:mime-version | ||
18 | :list-subscribe:list-help:list-post:list-archive:list-unsubscribe | ||
19 | :list-id:precedence:subject:cc:message-id:date:to:from:delivered-to; | ||
20 | bh=L66KCbYgtwDc95aWv7eY3oTToexeHY5x8MVGyHJ/gPM=; | ||
21 | b=rrE3b6NDRkazf03I4sTmeHnGX/emKFRWJSUcjyKS2hmAS83KcWTj/WfkinO4w4TeuB | ||
22 | S7hPfsAA+DsVLI8Qz0Y2FpZp8dyCeDTDkJtPqZdlDhErV2b3weNNFqbiY4fjIlREkYO/ | ||
23 | OIg0TgyyPGu4Ekur2dkYbdGmxIGtNsdIEQwv/zROwASqQiK/jpz7M156pGCbKYiSZz1g | ||
24 | k3Bwrg+ON72xwBpMoN/x/9Ep7UXl3dvKAkgxUgPaBnPuwDW3HV+y4a3AYyiBoXRRILvm | ||
25 | NDuAEwBRysljjsAeD1fxvwtKosRKuNfQpKDwibdgcsHjywPZKykADwYvp3Yc9bdOUwry | ||
26 | A8FA== | ||
27 | ARC-Authentication-Results: i=1; mx.google.com; | ||
28 | spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org | ||
29 | Return-Path: <openembedded-core-bounces@lists.openembedded.org> | ||
30 | Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) | ||
31 | by mx.google.com with ESMTP id j35si31697173pgl.223.2018.12.25.17.46.08; | ||
32 | Tue, 25 Dec 2018 17:46:09 -0800 (PST) | ||
33 | Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; | ||
34 | Authentication-Results: mx.google.com; | ||
35 | spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org | ||
36 | Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) | ||
37 | by mail.openembedded.org (Postfix) with ESMTP id 564896BEF4; | ||
38 | Wed, 26 Dec 2018 01:45:54 +0000 (UTC) | ||
39 | X-Original-To: openembedded-core@lists.openembedded.org | ||
40 | Delivered-To: openembedded-core@lists.openembedded.org | ||
41 | Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) | ||
42 | by mail.openembedded.org (Postfix) with ESMTP id 812D86B79B | ||
43 | for <openembedded-core@lists.openembedded.org>; | ||
44 | Wed, 26 Dec 2018 01:45:45 +0000 (UTC) | ||
45 | Received: from ala-blade48.wrs.com (ala-blade48.wrs.com [147.11.105.68]) | ||
46 | by mail.windriver.com (8.15.2/8.15.1) with SMTP id wBQ1ji3b015924; | ||
47 | Tue, 25 Dec 2018 17:45:44 -0800 (PST) | ||
48 | Received: by ala-blade48.wrs.com (sSMTP sendmail emulation); | ||
49 | Tue, 25 Dec 2018 17:45:44 -0800 | ||
50 | From: He Zhe <zhe.he@windriver.com> | ||
51 | To: openembedded-core@lists.openembedded.org | ||
52 | Date: Tue, 25 Dec 2018 17:45:44 -0800 | ||
53 | Message-Id: <20181226014544.1991-1-zhe.he@windriver.com> | ||
54 | X-Mailer: git-send-email 2.11.0 | ||
55 | Cc: bruce.ashfield@windriver.com | ||
56 | Subject: [OE-core] [PATCH] linux-libc-headers: Fix build failure with fixed | ||
57 | input and output files instead of pipe | ||
58 | X-BeenThere: openembedded-core@lists.openembedded.org | ||
59 | X-Mailman-Version: 2.1.12 | ||
60 | Precedence: list | ||
61 | List-Id: Patches and discussions about the oe-core layer | ||
62 | <openembedded-core.lists.openembedded.org> | ||
63 | List-Unsubscribe: <http://lists.openembedded.org/mailman/options/openembedded-core>, | ||
64 | <mailto:openembedded-core-request@lists.openembedded.org?subject=unsubscribe> | ||
65 | List-Archive: <http://lists.openembedded.org/pipermail/openembedded-core/> | ||
66 | List-Post: <mailto:openembedded-core@lists.openembedded.org> | ||
67 | List-Help: <mailto:openembedded-core-request@lists.openembedded.org?subject=help> | ||
68 | List-Subscribe: <http://lists.openembedded.org/mailman/listinfo/openembedded-core>, | ||
69 | <mailto:openembedded-core-request@lists.openembedded.org?subject=subscribe> | ||
70 | MIME-Version: 1.0 | ||
71 | Content-Type: text/plain; charset="us-ascii" | ||
72 | Content-Transfer-Encoding: 7bit | ||
73 | Sender: openembedded-core-bounces@lists.openembedded.org | ||
74 | Errors-To: openembedded-core-bounces@lists.openembedded.org | ||
75 | Status: RO | ||
76 | X-Status: A | ||
77 | Content-Length: 4076 | ||
78 | Lines: 94 | ||
79 | |||
80 | This is an amendment for | ||
81 | 2322dc4 "linux-libc-headers: Fix build failure by using fixed temporary file instead of pipe" | ||
82 | which moves just the temporary input file from /tmp to build directory. But the | ||
83 | build directory may not in the same file system with the output file, | ||
84 | /dev/null, either and thus make it possible to trigger that bug, 67f846b, in | ||
85 | binutil v2.31. | ||
86 | |||
87 | This patch puts both the input and output files into build directory for good. | ||
88 | |||
89 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
90 | --- | ||
91 | ...fixed-input-and-output-files-instead-of-.patch} | 22 ++++++++++------------ | ||
92 | .../linux-libc-headers/linux-libc-headers_4.18.bb | 2 +- | ||
93 | 2 files changed, 11 insertions(+), 13 deletions(-) | ||
94 | rename meta/recipes-kernel/linux-libc-headers/linux-libc-headers/{0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch => 0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch} (83%) | ||
95 | |||
96 | diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch | ||
97 | similarity index 83% | ||
98 | rename from meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch | ||
99 | rename to meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch | ||
100 | index 0d8fa80939..9ba1c076e8 100644 | ||
101 | --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch | ||
102 | +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch | ||
103 | @@ -1,7 +1,7 @@ | ||
104 | -From 3bbea65e11918f8753e8006a2198b999cdb0af58 Mon Sep 17 00:00:00 2001 | ||
105 | +From 694eba7bb974f6b8bd308804cb24350150108b2b Mon Sep 17 00:00:00 2001 | ||
106 | From: He Zhe <zhe.he@windriver.com> | ||
107 | Date: Wed, 21 Nov 2018 15:12:43 +0800 | ||
108 | -Subject: [PATCH] scripts: Use fixed temporary file instead of pipe for | ||
109 | +Subject: [PATCH] scripts: Use fixed input and output files instead of pipe for | ||
110 | here-doc | ||
111 | |||
112 | There was a bug of "as" in binutils that when it checks if the input file and | ||
113 | @@ -40,31 +40,29 @@ Upstream-Status: Inappropriate [A work around for binutils v2.31] | ||
114 | |||
115 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
116 | --- | ||
117 | - scripts/gcc-goto.sh | 7 ++++++- | ||
118 | - 1 file changed, 6 insertions(+), 1 deletion(-) | ||
119 | + scripts/gcc-goto.sh | 5 ++++- | ||
120 | + 1 file changed, 4 insertions(+), 1 deletion(-) | ||
121 | |||
122 | diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh | ||
123 | -index 083c526..0aaf1b4 100755 | ||
124 | +index 083c526..8dfac55 100755 | ||
125 | --- a/scripts/gcc-goto.sh | ||
126 | +++ b/scripts/gcc-goto.sh | ||
127 | -@@ -3,7 +3,9 @@ | ||
128 | +@@ -3,7 +3,7 @@ | ||
129 | # Test for gcc 'asm goto' support | ||
130 | # Copyright (C) 2010, Jason Baron <jbaron@redhat.com> | ||
131 | |||
132 | -cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y" | ||
133 | -+TMPFILE=`mktemp -p .` | ||
134 | -+ | ||
135 | -+cat << "END" > ${TMPFILE} | ||
136 | ++cat << "END" > ./input | ||
137 | int main(void) | ||
138 | { | ||
139 | #if defined(__arm__) || defined(__aarch64__) | ||
140 | -@@ -20,3 +22,6 @@ entry: | ||
141 | +@@ -20,3 +20,6 @@ entry: | ||
142 | return 0; | ||
143 | } | ||
144 | END | ||
145 | + | ||
146 | -+$@ -x c ${TMPFILE} -c -o /dev/null && echo "y" | ||
147 | -+rm ${TMPFILE} | ||
148 | ++$@ -x c ./input -c -o ./output && echo "y" | ||
149 | ++rm ./input ./output | ||
150 | -- | ||
151 | 2.7.4 | ||
152 | |||
153 | diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb | ||
154 | index 00420aa6f7..229a0027d7 100644 | ||
155 | --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb | ||
156 | +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb | ||
157 | @@ -10,7 +10,7 @@ SRC_URI_append_libc-musl = "\ | ||
158 | " | ||
159 | |||
160 | SRC_URI_append = "\ | ||
161 | - file://0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch \ | ||
162 | + file://0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch \ | ||
163 | " | ||
164 | |||
165 | SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9" | ||
166 | -- | ||
167 | 2.11.0 | ||
168 | |||
169 | -- | ||
170 | _______________________________________________ | ||
171 | Openembedded-core mailing list | ||
172 | Openembedded-core@lists.openembedded.org | ||
173 | http://lists.openembedded.org/mailman/listinfo/openembedded-core | ||
174 | |||