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

powerpc: Fix single step emulation of 32bit overflowed branches

Check truncate_if_32bit() on final write to nip.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Michael Neuling and committed by
Benjamin Herrenschmidt
70a54a4f b9ef7d6b

+1 -1
+1 -1
arch/powerpc/lib/sstep.c
··· 580 580 if (instr & 1) 581 581 regs->link = regs->nip; 582 582 if (branch_taken(instr, regs)) 583 - regs->nip = imm; 583 + regs->nip = truncate_if_32bit(regs->msr, imm); 584 584 return 1; 585 585 #ifdef CONFIG_PPC64 586 586 case 17: /* sc */