On 04/14/2015 07:58 PM, Linus Torvalds wrote:
On Tue, Apr 14, 2015 at 2:25 AM, Martin Liška <mliska@xxxxxxx> wrote:
Remove comments related to GCC 4.x branch and workaround for
asm_volatile_goto which is fixed in GCC 5 release.
How sure are you that it is *really* fixed? Because it wasn't, last we saw.
It was originally claimed to be fixed in 4.8.2, but that turned out to
be wrong. See commit 5631b8fba640 ("compiler/gcc4+: Remove inaccurate
comment about 'asm goto' miscompiles"), and
https://lkml.org/lkml/2014/2/12/817
which shows that the bugzilla you reference is at the very least
unreliable. Apparently the gcc test-case didn't catch all the
problems.
IOW, just leave the workaround. It has no actual cost, and the gcc bug
wasn't obviously fully fixed. There are apparently very few users of
"asm goto" (probably partly because of the limitations of it,
particularly the "no outputs").
Linus
Hello Linus.
Agree with you that a bit more defensive approach is reasonable, mainly because
of the actual cost.
Thus, I send updated version of the patch which just removes unrelated GCC 4.x branch
comments.
Thanks,
Martin
>From 9db00c78af98a26685d3e0034d26962167441070 Mon Sep 17 00:00:00 2001
From: mliska <mliska@xxxxxxx>
Date: Wed, 15 Apr 2015 10:55:14 +0200
Subject: [PATCH 1/2] compiler/gcc5: Remove comments related to GCC 4.x branch.
Signed-off-by: Martin Liska <mliska@xxxxxxx>
---
include/linux/compiler-gcc5.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
index efee493..abb03b8 100644
--- a/include/linux/compiler-gcc5.h
+++ b/include/linux/compiler-gcc5.h
@@ -12,10 +12,6 @@
like BUG(), printk(), panic() etc. [but let's keep them for now for
older compilers]
- Early snapshots of gcc 4.3 don't support this and we can't detect this
- in the preprocessor, but we can live with this because they're unreleased.
- Maketime probing would be overkill here.
-
gcc also has a __attribute__((__hot__)) to move hot functions into
a special section, but I don't see any sense in this right now in
the kernel context */
@@ -32,10 +28,6 @@
* Mark a position in code as unreachable. This can be used to
* suppress control flow warnings after asm blocks that transfer
* control elsewhere.
- *
- * Early snapshots of gcc 4.5 don't support this and we can't detect
- * this in the preprocessor, but we can live with this because they're
- * unreleased. Really, we need to have autoconf for the kernel.
*/
#define unreachable() __builtin_unreachable()
--
2.1.4