selftests/powerpc: Check all FPRs in fpu_preempt
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Nov 2023 13:27:45 +0000 (00:27 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Dec 2023 02:29:08 +0000 (13:29 +1100)
commite5d00aaac651a69b8016d355123438387bfd37be
tree1ce836b4c94b0826e4921d4c1b2a36e84efac69a
parent9dbd5927408c4a0707de73ae9dd9306b184e8fee
selftests/powerpc: Check all FPRs in fpu_preempt

There's a selftest that checks FPRs aren't corrupted by preemption, or
just process scheduling. However it only checks the non-volatile FPRs,
meaning corruption of the volatile FPRs could go undetected.

The check_fpu function it calls is used by several other tests, so for
now add a new routine to check all the FPRs. Increase the size of the
array of FPRs to 32, and initialise them all with random values.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231128132748.1990179-2-mpe@ellerman.id.au
tools/testing/selftests/powerpc/math/fpu_asm.S
tools/testing/selftests/powerpc/math/fpu_preempt.c