diff options
author | Laura Abbott <labbott@redhat.com> | 2019-01-23 14:00:25 +0100 |
---|---|---|
committer | Laura Abbott <labbott@redhat.com> | 2019-01-23 14:00:49 +0100 |
commit | a20edb31c79ea67d4b2bba37d736059d2f9e40bb (patch) | |
tree | 25999b20898d30dde702e55dc2af230c940fe356 | |
parent | 0713adcf68f9b8f6c959417fee24740e6ad7f254 (diff) | |
download | kernel-a20edb31c79ea67d4b2bba37d736059d2f9e40bb.tar.gz kernel-a20edb31c79ea67d4b2bba37d736059d2f9e40bb.tar.xz kernel-a20edb31c79ea67d4b2bba37d736059d2f9e40bb.zip |
gcc9 fixes
-rw-r--r-- | 0001-Correct-warning-with-gcc9.patch | 35 | ||||
-rw-r--r-- | 0001-s390-jump_label-Correct-asm-contraint.patch | 50 | ||||
-rw-r--r-- | kernel.spec | 5 |
3 files changed, 90 insertions, 0 deletions
diff --git a/0001-Correct-warning-with-gcc9.patch b/0001-Correct-warning-with-gcc9.patch new file mode 100644 index 000000000..9a5e94230 --- /dev/null +++ b/0001-Correct-warning-with-gcc9.patch @@ -0,0 +1,35 @@ +From 0de1315ee843713bafb9a59bc040a024f688c62a Mon Sep 17 00:00:00 2001 +From: Laura Abbott <labbott@redhat.com> +Date: Wed, 23 Jan 2019 13:56:47 +0100 +Subject: [PATCH] Correct warning with gcc9 + +Suggested from Arnd + +Signed-off-by: Laura Abbott <labbott@redhat.com> +--- + include/linux/module.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/linux/module.h b/include/linux/module.h +index 8fa38d3e7538..f2a24b59cca4 100644 +--- a/include/linux/module.h ++++ b/include/linux/module.h +@@ -129,13 +129,13 @@ extern void cleanup_module(void); + #define module_init(initfn) \ + static inline initcall_t __maybe_unused __inittest(void) \ + { return initfn; } \ +- int init_module(void) __attribute__((alias(#initfn))); ++ int init_module(void) __attribute__((cold, alias(#initfn))); + + /* This is only required if you want to be unloadable. */ + #define module_exit(exitfn) \ + static inline exitcall_t __maybe_unused __exittest(void) \ + { return exitfn; } \ +- void cleanup_module(void) __attribute__((alias(#exitfn))); ++ void cleanup_module(void) __attribute__((cold, alias(#exitfn))); + + #endif + +-- +2.20.1 + diff --git a/0001-s390-jump_label-Correct-asm-contraint.patch b/0001-s390-jump_label-Correct-asm-contraint.patch new file mode 100644 index 000000000..37ece86d1 --- /dev/null +++ b/0001-s390-jump_label-Correct-asm-contraint.patch @@ -0,0 +1,50 @@ +From dc6aae3ea5041f47d2445ba2ce086f9e8679861e Mon Sep 17 00:00:00 2001 +From: Laura Abbott <labbott@redhat.com> +Date: Wed, 23 Jan 2019 13:50:24 +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: + + ./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 + +According to the toolchain people, the actual issue is the use of +"X" constraint which is too permissive. Switch to using "i" instead. + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1668703 +Signed-off-by: Laura Abbott <labbott@redhat.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; +-- +2.20.1 + diff --git a/kernel.spec b/kernel.spec index ad143b242..76fdf35a5 100644 --- a/kernel.spec +++ b/kernel.spec @@ -601,6 +601,11 @@ Patch501: input-rmi4-remove-the-need-for-artifical-IRQ.patch # https://patchwork.kernel.org/patch/10752253/ Patch504: efi-use-32-bit-alignment-for-efi_guid_t.patch +# gcc9 fixes +Patch505: 0001-Correct-warning-with-gcc9.patch +Patch506: 0001-s390-jump_label-Correct-asm-contraint.patch + + # END OF PATCH DEFINITIONS %endif |