mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
kselftest/arm64: Don't write to P0 in irritator on SME only systems
Commit3e360ef0c0("kselftest/arm64: Corrupt P0 in the irritator when testing SSVE") added corruption of P0 to the sve-test case in order to ensure that the predicate registers were covered as part of the corruption. On SME only systems this results in an illegal instruction since signal handlers are run out of streaming mode and the predicate registers do not exist out of streaming mode without SVE. Switch to entering and exiting streaming mode in the irritator, this will reset all relevant registers to 0 if they somehow weren't already by the signal entry. Fixes:3e360ef0c0("kselftest/arm64: Corrupt P0 in the irritator when testing SSVE") Reported-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
21e37da120
commit
2b989c411a
|
|
@ -298,15 +298,20 @@ function irritator_handler
|
|||
add x0, x0, #1
|
||||
str x0, [x2, #ucontext_regs + 8 * 23]
|
||||
|
||||
#ifndef SSVE
|
||||
// Corrupt some random Z-regs
|
||||
movi v0.8b, #1
|
||||
movi v9.16b, #2
|
||||
movi v31.8b, #3
|
||||
// And P0
|
||||
ptrue p0.d
|
||||
#ifndef SSVE
|
||||
// And FFR
|
||||
wrffr p15.b
|
||||
#else
|
||||
// Enter and exit streaming mode, will reset all of the V, Z, P
|
||||
// and FFR registers that the system has.
|
||||
smstart_sm
|
||||
smstop
|
||||
#endif
|
||||
|
||||
ret
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user