From 412689ca44b8c6a37cae8ad7ace8d2e266536794 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 27 Nov 2022 18:05:50 -0500 Subject: [PATCH] Fixes for 5.15 Signed-off-by: Sasha Levin --- ...-cc_has_asm_goto_tied_output-test-wi.patch | 50 +++++++++++++++++++ .../nios2-add-force-for-vmlinuz.gz.patch | 37 ++++++++++++++ queue-5.15/series | 2 + 3 files changed, 89 insertions(+) create mode 100644 queue-5.15/init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch create mode 100644 queue-5.15/nios2-add-force-for-vmlinuz.gz.patch diff --git a/queue-5.15/init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch b/queue-5.15/init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch new file mode 100644 index 00000000000..63e89dc3704 --- /dev/null +++ b/queue-5.15/init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch @@ -0,0 +1,50 @@ +From 7eb3aa9a64588db9916828277805729d3896ed52 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 15 Nov 2022 12:01:58 +0100 +Subject: init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alexandre Belloni + +[ Upstream commit 534bd70374d646f17e2cebe0e6e4cdd478ce4f0c ] + +When using dash as /bin/sh, the CC_HAS_ASM_GOTO_TIED_OUTPUT test fails +with a syntax error which is not the one we are looking for: + +: In function ‘foo’: +:1:29: warning: missing terminating " character +:1:29: error: missing terminating " character +:2:5: error: expected ‘:’ before ‘+’ token +:2:7: warning: missing terminating " character +:2:7: error: missing terminating " character +:2:5: error: expected declaration or statement at end of input + +Removing '\n' solves this. + +Fixes: 1aa0e8b144b6 ("Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug") +Signed-off-by: Alexandre Belloni +Reviewed-by: Sean Christopherson +Signed-off-by: Masahiro Yamada +Signed-off-by: Sasha Levin +--- + init/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/init/Kconfig b/init/Kconfig +index d19ed66aba3b..a4144393717b 100644 +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -80,7 +80,7 @@ config CC_HAS_ASM_GOTO_OUTPUT + config CC_HAS_ASM_GOTO_TIED_OUTPUT + depends on CC_HAS_ASM_GOTO_OUTPUT + # Detect buggy gcc and clang, fixed in gcc-11 clang-14. +- def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .\n": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null) ++ def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null) + + config TOOLS_SUPPORT_RELR + def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh) +-- +2.35.1 + diff --git a/queue-5.15/nios2-add-force-for-vmlinuz.gz.patch b/queue-5.15/nios2-add-force-for-vmlinuz.gz.patch new file mode 100644 index 00000000000..daaf5b29d29 --- /dev/null +++ b/queue-5.15/nios2-add-force-for-vmlinuz.gz.patch @@ -0,0 +1,37 @@ +From 3e8a2e10a9d6c82b71225ba3b3df83abbce95525 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 23 Nov 2022 19:20:53 -0800 +Subject: nios2: add FORCE for vmlinuz.gz + +From: Randy Dunlap + +[ Upstream commit 869e4ae4cd2a23d625aaa14ae62dbebf768cb77d ] + +Add FORCE to placate a warning from make: + +arch/nios2/boot/Makefile:24: FORCE prerequisite is missing + +Fixes: 2fc8483fdcde ("nios2: Build infrastructure") +Signed-off-by: Randy Dunlap +Reviewed-by: Masahiro Yamada +Signed-off-by: Sasha Levin +--- + arch/nios2/boot/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/nios2/boot/Makefile b/arch/nios2/boot/Makefile +index 37dfc7e584bc..0b704c1f379f 100644 +--- a/arch/nios2/boot/Makefile ++++ b/arch/nios2/boot/Makefile +@@ -20,7 +20,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE + $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE + $(call if_changed,gzip) + +-$(obj)/vmImage: $(obj)/vmlinux.gz ++$(obj)/vmImage: $(obj)/vmlinux.gz FORCE + $(call if_changed,uimage) + @$(kecho) 'Kernel: $@ is ready' + +-- +2.35.1 + diff --git a/queue-5.15/series b/queue-5.15/series index 7d510668908..508ce4c2525 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -132,3 +132,5 @@ octeontx2-af-fix-reference-count-issue-in-rvu_sdp_in.patch net-thunderx-fix-the-acpi-memory-leak.patch s390-crashdump-fix-tod-programmable-field-size.patch lib-vdso-use-grep-e-instead-of-egrep.patch +init-kconfig-fix-cc_has_asm_goto_tied_output-test-wi.patch +nios2-add-force-for-vmlinuz.gz.patch -- 2.47.3