summaryrefslogtreecommitdiffstats
path: root/0001-s390-jump_label-Correct-asm-contraint.patch
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2019-02-11 06:16:56 -0800
committerLaura Abbott <labbott@redhat.com>2019-02-11 06:16:59 -0800
commit4e4f5c72ef37065767a797ee9ba6fde88c8bcbef (patch)
tree64e29a64603bbdcb17f4799ccada139789f204d5 /0001-s390-jump_label-Correct-asm-contraint.patch
parent76c7367ad0a861557a50a19be2ee32a16df22170 (diff)
downloadkernel-4e4f5c72ef37065767a797ee9ba6fde88c8bcbef.tar.gz
kernel-4e4f5c72ef37065767a797ee9ba6fde88c8bcbef.tar.xz
kernel-4e4f5c72ef37065767a797ee9ba6fde88c8bcbef.zip
Linux v5.0-rc6
Tweaks to gcc9 fixes
Diffstat (limited to '0001-s390-jump_label-Correct-asm-contraint.patch')
-rw-r--r--0001-s390-jump_label-Correct-asm-contraint.patch95
1 files changed, 54 insertions, 41 deletions
diff --git a/0001-s390-jump_label-Correct-asm-contraint.patch b/0001-s390-jump_label-Correct-asm-contraint.patch
index 37ece86d1..631fea919 100644
--- a/0001-s390-jump_label-Correct-asm-contraint.patch
+++ b/0001-s390-jump_label-Correct-asm-contraint.patch
@@ -1,50 +1,63 @@
-From dc6aae3ea5041f47d2445ba2ce086f9e8679861e Mon Sep 17 00:00:00 2001
-From: Laura Abbott <labbott@redhat.com>
-Date: Wed, 23 Jan 2019 13:50:24 +0100
+From b0b46a5b622fdbe69207675c5d50b77cb8ae43b7 Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Tue, 5 Feb 2019 13:43:49 +0100
Subject: [PATCH] s390/jump_label: Correct asm contraint
-To: Martin Schwidefsky <schwidefsky@de.ibm.com>
-To: Heiko Carstens <heiko.carstens@de.ibm.com>
-Cc: linux-s390@vger.kernel.org
-Cc: linux-kernel@vger.kernel.org
-There's a build failure with gcc9:
+On Tue, Jan 29, 2019 at 08:25:58AM +0100, Laura Abbott wrote:
+> On 1/23/19 5:24 AM, Heiko Carstens wrote:
+> >On Wed, Jan 23, 2019 at 01:55:13PM +0100, Laura Abbott wrote:
+> >>There's a build failure with gcc9:
+> >>
+> >> ./arch/s390/include/asm/jump_label.h: Assembler messages:
+> >> ./arch/s390/include/asm/jump_label.h:23: Error: bad expression
+> >> ./arch/s390/include/asm/jump_label.h:23: Error: junk at end of line, first unrecognized character is `r'
+> >> make[1]: *** [scripts/Makefile.build:277: init/main.o] Error 1
+...
+> I've had to turn off s390 in Fedora until this gets fixed :(
- ./arch/s390/include/asm/jump_label.h: Assembler messages:
- ./arch/s390/include/asm/jump_label.h:23: Error: bad expression
- ./arch/s390/include/asm/jump_label.h:23: Error: junk at end of line, first unrecognized character is `r'
- make[1]: *** [scripts/Makefile.build:277: init/main.o] Error 1
+Laura, the patch below should fix this (temporarily). If possible,
+could you give it a try? It seems to work for me.
-According to the toolchain people, the actual issue is the use of
-"X" constraint which is too permissive. Switch to using "i" instead.
+rom 4067027c2ccc8d3f1dc3bb19fe2d00da0c65bcd8 Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Tue, 5 Feb 2019 13:21:56 +0100
+Subject: [PATCH] s390: disable section anchors
-Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1668703
-Signed-off-by: Laura Abbott <labbott@redhat.com>
+Disable section anchors to allow to compile with the current gcc 9
+experimental version. The section anchors is a new feature for s390
+with gcc 9, however it breaks our current usage of the 'X' constraint
+within the asm goto construct within our jump label implementation.
+
+Fixing this seems to be non-trivial, therefore (hopefully) temporarily
+disable section anchors. We will hopefully have a better solution
+before gcc 9 is released, so that this can be removed again.
+
+Reported-by: Laura Abbott <labbott@redhat.com>
+Suggested-by: Ilya Leoshkevich <iii@linux.ibm.com>
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
- arch/s390/include/asm/jump_label.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/s390/include/asm/jump_label.h b/arch/s390/include/asm/jump_label.h
-index e2d3e6c43395..41dabfd8518d 100644
---- a/arch/s390/include/asm/jump_label.h
-+++ b/arch/s390/include/asm/jump_label.h
-@@ -22,7 +22,7 @@ static inline bool arch_static_branch(struct static_key *key, bool branch)
- ".long 0b-.,%l[label]-.\n"
- ".quad %0-.\n"
- ".popsection\n"
-- : : "X" (&((char *)key)[branch]) : : label);
-+ : : "i" (&((char *)key)[branch]) : : label);
- return false;
- label:
- return true;
-@@ -36,7 +36,7 @@ static inline bool arch_static_branch_jump(struct static_key *key, bool branch)
- ".long 0b-.,%l[label]-.\n"
- ".quad %0-.\n"
- ".popsection\n"
-- : : "X" (&((char *)key)[branch]) : : label);
-+ : : "i" (&((char *)key)[branch]) : : label);
- return false;
- label:
- return true;
+ arch/s390/Makefile | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/arch/s390/Makefile b/arch/s390/Makefile
+index e21053e5e0da..1eac75bc3a29 100644
+--- a/arch/s390/Makefile
++++ b/arch/s390/Makefile
+@@ -62,6 +62,14 @@ cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include
+ #
+ cflags-$(CONFIG_FRAME_POINTER) += -fno-optimize-sibling-calls
+
++#
++# Disable section anchors. This gcc 9 feature currently breaks the 'X'
++# constraint like it is used in the asm goto construct.
++#
++ifeq ($(call cc-option-yn,-fno-section-anchors),y)
++cflags-y += -fno-section-anchors
++endif
++
+ ifeq ($(call cc-option-yn,-mpacked-stack),y)
+ cflags-$(CONFIG_PACK_STACK) += -mpacked-stack -D__PACK_STACK
+ aflags-$(CONFIG_PACK_STACK) += -D__PACK_STACK
--
2.20.1