]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jul 2019 16:23:40 +0000 (18:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jul 2019 16:23:40 +0000 (18:23 +0200)
added patches:
arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch

queue-4.9/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch b/queue-4.9/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch
new file mode 100644 (file)
index 0000000..7d694b1
--- /dev/null
@@ -0,0 +1,37 @@
+From af1be2e21203867cb958aaceed5366e2e24b88e8 Mon Sep 17 00:00:00 2001
+From: Vineet Gupta <vgupta@synopsys.com>
+Date: Fri, 8 Dec 2017 08:45:57 -0800
+Subject: ARC: handle gcc generated __builtin_trap for older compiler
+
+From: Vineet Gupta <vgupta@synopsys.com>
+
+commit af1be2e21203867cb958aaceed5366e2e24b88e8 upstream.
+
+ARC gcc prior to GNU 2018.03 release didn't have a target specific
+__builtin_trap() implementation, generating default abort() call.
+
+Implement the abort() call - emulating what newer gcc does for the same,
+as suggested by Arnd.
+
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arc/kernel/traps.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/arc/kernel/traps.c
++++ b/arch/arc/kernel/traps.c
+@@ -155,3 +155,11 @@ void do_insterror_or_kprobe(unsigned lon
+       insterror_is_error(address, regs);
+ }
++
++/*
++ * abort() call generated by older gcc for __builtin_trap()
++ */
++void abort(void)
++{
++      __asm__ __volatile__("trap_s  5\n");
++}
index e22bdc7939ddddbc1cfd37f35da984894164abd2..f0eafb2c80394dcc30eb5e39fb5e9c6b81a2eca7 100644 (file)
@@ -78,6 +78,7 @@ mips-netlogic-xlr-remove-erroneous-check-in-nlm_fmn_.patch
 mfd-omap-usb-tll-fix-register-offsets.patch
 arc-fix-allnoconfig-build-warning.patch
 bug.h-work-around-gcc-pr82365-in-bug.patch
+arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch
 drm-i915-dmc-protect-against-reading-random-memory.patch
 mips-workaround-gcc-__builtin_unreachable-reordering.patch
 ptrace-fix-ptracer_cred-handling-for-ptrace_traceme.patch