Skip to content

Commit 48f7ab2

Browse files
brooniewilldeacon
authored andcommitted
kselftest/arm64: Log SVCR when the SME tests barf
On failure we log the actual and expected value of the register we detect a mismatch in. For SME one obvious potential source of corruption would be if we had corrupted SVCR since changes in streaming mode will reset the register values, log the value to aid in understanding issues. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 33c1a77 commit 48f7ab2

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

tools/testing/selftests/arm64/fp/sve-test.S

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,10 @@ function barf
515515
mov x11, x1 // actual data
516516
mov x12, x2 // data size
517517

518+
#ifdef SSVE
519+
mrs x13, S3_3_C4_C2_2
520+
#endif
521+
518522
puts "Mismatch: PID="
519523
mov x0, x20
520524
bl putdec
@@ -534,6 +538,12 @@ function barf
534538
bl dumphex
535539
puts "]\n"
536540

541+
#ifdef SSVE
542+
puts "\tSVCR: "
543+
mov x0, x13
544+
bl putdecn
545+
#endif
546+
537547
mov x8, #__NR_getpid
538548
svc #0
539549
// fpsimd.c acitivty log dump hack

tools/testing/selftests/arm64/fp/za-test.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ function barf
333333
// mov w8, #__NR_exit
334334
// svc #0
335335
// end hack
336+
337+
mrs x13, S3_3_C4_C2_2
338+
336339
smstop
337340
mov x10, x0 // expected data
338341
mov x11, x1 // actual data
@@ -356,6 +359,9 @@ function barf
356359
mov x1, x12
357360
bl dumphex
358361
puts "]\n"
362+
puts "\tSVCR: "
363+
mov x0, x13
364+
bl putdecn
359365

360366
mov x8, #__NR_getpid
361367
svc #0

tools/testing/selftests/arm64/fp/zt-test.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ function barf
267267
// mov w8, #__NR_exit
268268
// svc #0
269269
// end hack
270+
271+
mrs x13, S3_3_C4_C2_2
270272
smstop
271273
mov x10, x0 // expected data
272274
mov x11, x1 // actual data
@@ -287,6 +289,9 @@ function barf
287289
mov x1, x12
288290
bl dumphex
289291
puts "]\n"
292+
puts "\tSVCR: "
293+
mov x0, x13
294+
bl putdecn
290295

291296
mov x8, #__NR_getpid
292297
svc #0

0 commit comments

Comments
 (0)