Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARC: handle gcc generated __builtin_trap for older compiler

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>

+8
+8
arch/arc/kernel/traps.c
··· 161 161 162 162 insterror_is_error(address, regs); 163 163 } 164 + 165 + /* 166 + * abort() call generated by older gcc for __builtin_trap() 167 + */ 168 + void abort(void) 169 + { 170 + __asm__ __volatile__("trap_s 5\n"); 171 + }