Commit 1817de2f authored by Ravi Bangoria's avatar Ravi Bangoria Committed by Michael Ellerman

powerpc/sstep: Cover new VSX instructions under CONFIG_VSX

Recently added Power10 prefixed VSX instruction are included
unconditionally in the kernel. If they are executed on a
machine without VSX support, it might create issues. Fix that.
Also fix one mnemonics spelling mistake in comment.

Fixes: 50b80a12 ("powerpc sstep: Add support for prefixed load/stores")
Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201011050908.72173-3-ravi.bangoria@linux.ibm.com
parent ef6879f8
...@@ -2757,6 +2757,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, ...@@ -2757,6 +2757,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
case 41: /* plwa */ case 41: /* plwa */
op->type = MKOP(LOAD, PREFIXED | SIGNEXT, 4); op->type = MKOP(LOAD, PREFIXED | SIGNEXT, 4);
break; break;
#ifdef CONFIG_VSX
case 42: /* plxsd */ case 42: /* plxsd */
op->reg = rd + 32; op->reg = rd + 32;
op->type = MKOP(LOAD_VSX, PREFIXED, 8); op->type = MKOP(LOAD_VSX, PREFIXED, 8);
...@@ -2797,13 +2798,14 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, ...@@ -2797,13 +2798,14 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
op->element_size = 16; op->element_size = 16;
op->vsx_flags = VSX_CHECK_VEC; op->vsx_flags = VSX_CHECK_VEC;
break; break;
#endif /* CONFIG_VSX */
case 56: /* plq */ case 56: /* plq */
op->type = MKOP(LOAD, PREFIXED, 16); op->type = MKOP(LOAD, PREFIXED, 16);
break; break;
case 57: /* pld */ case 57: /* pld */
op->type = MKOP(LOAD, PREFIXED, 8); op->type = MKOP(LOAD, PREFIXED, 8);
break; break;
case 60: /* stq */ case 60: /* pstq */
op->type = MKOP(STORE, PREFIXED, 16); op->type = MKOP(STORE, PREFIXED, 16);
break; break;
case 61: /* pstd */ case 61: /* pstd */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment