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

powerpc/sstep: Fix darn emulation

Commit 8813ff49607e ("powerpc/sstep: Check instruction validity
against ISA version before emulation") introduced a proper way to skip
unknown instructions. This makes sure that the same is used for the
darn instruction when the range selection bits have a reserved value.

Fixes: a23987ef267a ("powerpc: sstep: Add support for darn instruction")
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210204080744.135785-2-sandipan@linux.ibm.com

authored by

Sandipan Das and committed by
Michael Ellerman
22b89ba1 bbda4b6c

+1 -1
+1 -1
arch/powerpc/lib/sstep.c
··· 1916 1916 goto compute_done; 1917 1917 } 1918 1918 1919 - return -1; 1919 + goto unknown_opcode; 1920 1920 #ifdef __powerpc64__ 1921 1921 case 777: /* modsd */ 1922 1922 if (!cpu_has_feature(CPU_FTR_ARCH_300))