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

MIPS: Clear Cause.BD in instruction_pointer_set

Clear Cause.BD after we use instruction_pointer_set to override
EPC.

This can prevent exception_epc check against instruction code at
new return address.
It won't be considered as "in delay slot" after epc being overridden
anyway.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Jiaxun Yang and committed by
Thomas Bogendoerfer
9d6e21dd 11ba1728

+1
+1
arch/mips/include/asm/ptrace.h
··· 60 60 unsigned long val) 61 61 { 62 62 regs->cp0_epc = val; 63 + regs->cp0_cause &= ~CAUSEF_BD; 63 64 } 64 65 65 66 /* Query offset/name of register from its name/offset */