]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Fix matrix multiply assist test
authorRashmica Gupta <rashmica@linux.ibm.com>
Fri, 17 Jun 2022 04:39:35 +0000 (14:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 28 Jul 2022 06:22:15 +0000 (16:22 +1000)
commit78074497811ef988476395990532787f7f9f80f8
tree687dc9bb87d88ea70771ed1c054666bd71597e27
parent470d6e417244b11ee037931c9fa113a4d0e19aa5
selftests/powerpc: Fix matrix multiply assist test

The ISA states: "when ACC[i] contains defined data, the contents of VSRs
4×i to 4×i+3 are undefined until either a VSX Move From ACC instruction
is used to copy the contents of ACC[i] to VSRs 4×i to 4×i+3 or some other
instruction directly writes to one of these VSRs." We aren't doing this.

This test only works on Power10 because the hardware implementation
happens to map ACC0 to VSRs 0-3, but will fail on any other implementation
that doesn't do this. So add xxmfacc between writing to the accumulator
and accessing the VSRs.

Fixes: 13635a92e0d9 ("selftests/powerpc: Add matrix multiply assist (MMA) test")
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220617043935.428083-1-rashmica@linux.ibm.com
tools/testing/selftests/powerpc/math/mma.S