]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 17:02:08 +0000 (19:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 17:02:08 +0000 (19:02 +0200)
added patches:
kconfig-add-config-option-for-asm-goto-w-outputs.patch

queue-5.4/kconfig-add-config-option-for-asm-goto-w-outputs.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/kconfig-add-config-option-for-asm-goto-w-outputs.patch b/queue-5.4/kconfig-add-config-option-for-asm-goto-w-outputs.patch
new file mode 100644 (file)
index 0000000..10a3b52
--- /dev/null
@@ -0,0 +1,38 @@
+From 587f17018a2c6c414e41a312b002faaef60cf423 Mon Sep 17 00:00:00 2001
+From: Nick Desaulniers <ndesaulniers@google.com>
+Date: Fri, 14 Feb 2020 14:18:11 -0800
+Subject: Kconfig: add config option for asm goto w/ outputs
+
+From: Nick Desaulniers <ndesaulniers@google.com>
+
+commit 587f17018a2c6c414e41a312b002faaef60cf423 upstream.
+
+This allows C code to make use of compilers with support for output
+variables along the fallthrough path via preprocessor define:
+
+  CONFIG_CC_HAS_ASM_GOTO_OUTPUT
+
+[ This is not used anywhere yet, and currently released compilers don't
+  support this yet, but it's coming, and I have some local experimental
+  patches to take advantage of it when it does   - Linus ]
+
+Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ init/Kconfig |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -38,6 +38,10 @@ config CC_HAS_ASM_GOTO_TIED_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)
++config CC_HAS_ASM_GOTO_OUTPUT
++      depends on CC_HAS_ASM_GOTO
++      def_bool $(success,echo 'int foo(int x) { asm goto ("": "=r"(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)
index aac29853242facf16ab8d2c6ab61f44919704fdd..703dee174cbb92f589a7f2c355ed596602f0b4dd 100644 (file)
@@ -269,3 +269,4 @@ docs-conf.py-cope-with-removal-of-language-none-in-sphinx-5.0.0.patch
 dt-bindings-gpio-altera-correct-interrupt-cells.patch
 blk-iolatency-fix-inflight-count-imbalances-and-io-hangs-on-offline.patch
 phy-qcom-qmp-fix-reset-controller-leak-on-probe-errors.patch
+kconfig-add-config-option-for-asm-goto-w-outputs.patch