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

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

diff --git a/queue-4.4/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch b/queue-4.4/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 1ff0e7d06a6ec54dd8e926f6dba2237b365af8a9..d716e1378810d64f7e0a5cf22f486aef17afd22d 100644 (file)
@@ -67,3 +67,4 @@ alsa-usb-audio-fix-sign-unintended-sign-extension-on-left-shifts.patch
 lib-mpi-fix-karactx-leak-in-mpi_powm.patch
 btrfs-ensure-replaced-device-doesn-t-have-pending-chunk-allocation.patch
 tty-rocket-fix-incorrect-forward-declaration-of-rp_i.patch
+arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch