Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit a00c36a

Browse files
Merge pull request #140 from nathanchance/x86-patch-update
patches: linux/linux-next: x86_64: Drop headers patch
2 parents 05aaecf + a41b004 commit a00c36a

File tree

1 file changed

+4
-56
lines changed

1 file changed

+4
-56
lines changed

patches/linux/x86_64/x86-series.patch

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From c729ea3e1f202e29a42728162d72e50b918ed5d7 Mon Sep 17 00:00:00 2001
1+
From 8332da8a6f04ef2c1aea698cf78d96008afb58ff Mon Sep 17 00:00:00 2001
22
From: Nathan Chancellor <[email protected]>
33
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
55
build with Clang
66

77
* 4a789213c9a5 ("x86 uaccess: Introduce __put_user_goto")
@@ -162,10 +162,10 @@ index 1954dd5552a2..fd49f32afdbc 100644
162162
2.21.0
163163

164164

165-
From 7f9c5b007617ef72740ae55cb58c9b0585777090 Mon Sep 17 00:00:00 2001
165+
From e8e8b6a3501be642a50675f7441d30c6a16bc86f Mon Sep 17 00:00:00 2001
166166
From: Nathan Chancellor <[email protected]>
167167
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
169169
of asm goto
170170

171171
We don't want to see an inordinate amount of warning spam from
@@ -244,55 +244,3 @@ index b0103e16fc1b..d8019c714b4d 100644
244244
--
245245
2.21.0
246246

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

Comments
 (0)