diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-03-29 15:56:48 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-03-29 15:56:48 +0200 |
commit | feecb81732d8f271440d907beb082425e109f877 (patch) | |
tree | af55ca33d43cf3b3c2b82e9860df7d01be061a0f /tools/testing/selftests/arm64/fp/sve-test.S | |
parent | MAINTAINERS: Add myself as futex reviewer (diff) | |
parent | Linux 5.12-rc5 (diff) | |
download | wireguard-linux-feecb81732d8f271440d907beb082425e109f877.tar.xz wireguard-linux-feecb81732d8f271440d907beb082425e109f877.zip |
Merge tag 'v5.12-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/testing/selftests/arm64/fp/sve-test.S')
-rw-r--r-- | tools/testing/selftests/arm64/fp/sve-test.S | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index 9210691aa998..e3e08d9c7020 100644 --- a/tools/testing/selftests/arm64/fp/sve-test.S +++ b/tools/testing/selftests/arm64/fp/sve-test.S @@ -284,16 +284,28 @@ endfunction // Set up test pattern in the FFR // x0: pid // x2: generation +// +// We need to generate a canonical FFR value, which consists of a number of +// low "1" bits, followed by a number of zeros. This gives us 17 unique values +// per 16 bits of FFR, so we create a 4 bit signature out of the PID and +// generation, and use that as the initial number of ones in the pattern. +// We fill the upper lanes of FFR with zeros. // Beware: corrupts P0. function setup_ffr mov x4, x30 - bl pattern + and w0, w0, #0x3 + bfi w0, w2, #2, #2 + mov w1, #1 + lsl w1, w1, w0 + sub w1, w1, #1 + ldr x0, =ffrref - ldr x1, =scratch - rdvl x2, #1 - lsr x2, x2, #3 - bl memcpy + strh w1, [x0], 2 + rdvl x1, #1 + lsr x1, x1, #3 + sub x1, x1, #2 + bl memclr mov x0, #0 ldr x1, =ffrref |