Skip to content

Commit bd67557

Browse files
vineetgarcgregkh
authored andcommitted
ARC: handle gcc generated __builtin_trap for older compiler
commit af1be2e 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 <[email protected]> Signed-off-by: Vineet Gupta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 074d0aa commit bd67557

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/arc/kernel/traps.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,11 @@ void do_insterror_or_kprobe(unsigned long address, struct pt_regs *regs)
155155

156156
insterror_is_error(address, regs);
157157
}
158+
159+
/*
160+
* abort() call generated by older gcc for __builtin_trap()
161+
*/
162+
void abort(void)
163+
{
164+
__asm__ __volatile__("trap_s 5\n");
165+
}

0 commit comments

Comments
 (0)