diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2017-12-08 08:45:57 -0800 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2018-01-03 00:31:27 -0800 |
commit | af1be2e21203867cb958aaceed5366e2e24b88e8 (patch) | |
tree | 668d1bc1b3051597af4d316b20ab7da9d6cb4fce /arch | |
parent | f5a16b93e6291ba1f65f55647cb4cd8d75ed1b35 (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/kernel/traps.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arc/kernel/traps.c b/arch/arc/kernel/traps.c index 004f4e4a4c10..133a4dae41fe 100644 --- a/arch/arc/kernel/traps.c +++ b/arch/arc/kernel/traps.c @@ -161,3 +161,11 @@ void do_insterror_or_kprobe(unsigned long address, struct pt_regs *regs) insterror_is_error(address, regs); } + +/* + * abort() call generated by older gcc for __builtin_trap() + */ +void abort(void) +{ + __asm__ __volatile__("trap_s 5\n"); +} |