selftests/powerpc: Add a test of counting larx/stcx
authorMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Apr 2020 11:44:10 +0000 (21:44 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 15 May 2020 01:58:55 +0000 (11:58 +1000)
commit7481cad4747303442209bc5dba2f56c3afcea07d
treee5b1152ce40d931a33a608a80a1083d94a23d4d3
parent24ac99e97fa7b8f0db9b48413a76def9cf73295c
selftests/powerpc: Add a test of counting larx/stcx

This is based on the count_instructions test.

However this one also counts the number of failed stcx's, and in
conjunction with knowing the size of the stcx loop, can calculate the
total number of instructions executed even in the face of
non-deterministic stcx failures.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200426114410.3917383-1-mpe@ellerman.id.au
tools/testing/selftests/powerpc/pmu/.gitignore
tools/testing/selftests/powerpc/pmu/Makefile
tools/testing/selftests/powerpc/pmu/count_stcx_fail.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/loop.S