powerpc: emulate_step() tests for load/store instructions
authorRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Tue, 14 Feb 2017 09:16:43 +0000 (14:46 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 3 Mar 2017 00:24:50 +0000 (11:24 +1100)
commit4ceae137bdab2232e57b2e6fd5631a22a0160938
tree3a8d481102d8e79646e31875d378aac46898f2f4
parente148bd17f48bd17fca2f4f089ec879fa6e47e34c
powerpc: emulate_step() tests for load/store instructions

Add new selftest that test emulate_step for Normal, Floating Point,
Vector and Vector Scalar - load/store instructions. Test should run
at boot time if CONFIG_KPROBES_SANITY_TEST and CONFIG_PPC64 is set.

Sample log:

  emulate_step_test: ld             : PASS
  emulate_step_test: lwz            : PASS
  emulate_step_test: lwzx           : PASS
  emulate_step_test: std            : PASS
  emulate_step_test: ldarx / stdcx. : PASS
  emulate_step_test: lfsx           : PASS
  emulate_step_test: stfsx          : PASS
  emulate_step_test: lfdx           : PASS
  emulate_step_test: stfdx          : PASS
  emulate_step_test: lvx            : PASS
  emulate_step_test: stvx           : PASS
  emulate_step_test: lxvd2x         : PASS
  emulate_step_test: stxvd2x        : PASS

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
[mpe: Drop start/complete lines, make it all __init]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/lib/Makefile
arch/powerpc/lib/test_emulate_step.c [new file with mode: 0644]