|
1 |
| -From c729ea3e1f202e29a42728162d72e50b918ed5d7 Mon Sep 17 00:00:00 2001 |
| 1 | +From 8332da8a6f04ef2c1aea698cf78d96008afb58ff Mon Sep 17 00:00:00 2001 |
2 | 2 | From: Nathan Chancellor < [email protected]>
|
3 | 3 | Date: Sat, 5 Jan 2019 11:51:39 -0700
|
4 |
| -Subject: [PATCH 1/3] DO-NOT-UPSTREAM: x86: Revert two commits that break the |
| 4 | +Subject: [PATCH 1/2] DO-NOT-UPSTREAM: x86: Revert two commits that break the |
5 | 5 | build with Clang
|
6 | 6 |
|
7 | 7 | * 4a789213c9a5 ("x86 uaccess: Introduce __put_user_goto")
|
@@ -162,10 +162,10 @@ index 1954dd5552a2..fd49f32afdbc 100644
|
162 | 162 | 2.21.0
|
163 | 163 |
|
164 | 164 |
|
165 |
| -From 7f9c5b007617ef72740ae55cb58c9b0585777090 Mon Sep 17 00:00:00 2001 |
| 165 | +From e8e8b6a3501be642a50675f7441d30c6a16bc86f Mon Sep 17 00:00:00 2001 |
166 | 166 | From: Nathan Chancellor < [email protected]>
|
167 | 167 | Date: Tue, 25 Sep 2018 13:32:33 -0700
|
168 |
| -Subject: [PATCH 2/3] DO-NOT-UPSTREAM: x86: Avoid warnings/errors due to lack |
| 168 | +Subject: [PATCH 2/2] DO-NOT-UPSTREAM: x86: Avoid warnings/errors due to lack |
169 | 169 | of asm goto
|
170 | 170 |
|
171 | 171 | We don't want to see an inordinate amount of warning spam from
|
@@ -244,55 +244,3 @@ index b0103e16fc1b..d8019c714b4d 100644
|
244 | 244 | --
|
245 | 245 | 2.21.0
|
246 | 246 |
|
247 |
| - |
248 |
| -From 963483a1dc5ef3e51c6c4687b8524b94010edbad Mon Sep 17 00:00:00 2001 |
249 |
| -From: Nick Desaulniers < [email protected]> |
250 |
| -Date: Mon, 4 Mar 2019 16:12:21 -0800 |
251 |
| -Subject: [PATCH 3/3] x86/boot: clean up headers |
252 |
| - |
253 |
| -The inclusion of <linux/kernel.h> was causing issue as the definition of |
254 |
| -__arch_hweight64 from arch/x86/include/asm/arch_hweight.h eventually gets |
255 |
| -included. The definition is problematic when compiled with -m16 (all code |
256 |
| -in arch/x86/boot/ is) as the "D" inline assembly constraint is rejected |
257 |
| -by both compilers when passed an argument of type long long (regardless |
258 |
| -of signedness, anything smaller is fine). |
259 |
| - |
260 |
| -Because GCC performs inlining before semantic analysis, and |
261 |
| -__arch_hweight64 is dead in this translation unit, GCC does not report |
262 |
| -any issues at compile time. Clang does the semantic analysis in the |
263 |
| -front end, before inlining (run in the middle) can determine the code is |
264 |
| -dead. I consider this another case of PR33587, which I think we can do |
265 |
| -more work to solve. |
266 |
| - |
267 |
| -It turns out that arch/x86/boot/string.c doesn't actually need |
268 |
| -linux/kernel.h, simply linux/limits.h and linux/compiler.h. Include them, |
269 |
| -and sort the headers alphabetically. |
270 |
| - |
271 |
| -Link: https://bugs.llvm.org/show_bug.cgi?id=33587 |
272 |
| -Link: https://github.com/ClangBuiltLinux/linux/issues/347 |
273 |
| -Reviewed-by: Nathan Chancellor < [email protected]> |
274 |
| -Tested-by: Nathan Chancellor < [email protected]> |
275 |
| -Suggested-by: Stephen Rothwell < [email protected]> |
276 |
| -Signed-off-by: Nick Desaulniers < [email protected]> |
277 |
| ---- |
278 |
| - arch/x86/boot/string.c | 3 ++- |
279 |
| - 1 file changed, 2 insertions(+), 1 deletion(-) |
280 |
| - |
281 |
| -diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c |
282 |
| -index 315a67b8896b..90154df8f125 100644 |
283 |
| ---- a/arch/x86/boot/string.c |
284 |
| -+++ b/arch/x86/boot/string.c |
285 |
| -@@ -13,8 +13,9 @@ |
286 |
| - */ |
287 |
| - |
288 |
| - #include <linux/types.h> |
289 |
| --#include <linux/kernel.h> |
290 |
| -+#include <linux/compiler.h> |
291 |
| - #include <linux/errno.h> |
292 |
| -+#include <linux/limits.h> |
293 |
| - #include <asm/asm.h> |
294 |
| - #include "ctype.h" |
295 |
| - #include "string.h" |
296 |
| --- |
297 |
| -2.21.0 |
298 |
| - |
0 commit comments