]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit45a566416ce8dfae10135e89ddf3db4e46f1a0a2
tree3a8d481102d8e79646e31875d378aac46898f2f4
parentba0eecfc502d6e862f0845929119f309e47e2fb1
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]