Commit 48f7ab21 authored by Mark Brown's avatar Mark Brown Committed by Will Deacon
Browse files

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: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231205-arm64-kselftest-log-svcr-v1-1-b77abd9ee7f3@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 33c1a778
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -515,6 +515,10 @@ function barf
	mov	x11, x1	// actual data
	mov	x12, x2	// data size

#ifdef SSVE
	mrs	x13, S3_3_C4_C2_2
#endif

	puts	"Mismatch: PID="
	mov	x0, x20
	bl	putdec
@@ -534,6 +538,12 @@ function barf
	bl	dumphex
	puts	"]\n"

#ifdef SSVE
	puts	"\tSVCR: "
	mov	x0, x13
	bl	putdecn
#endif

	mov	x8, #__NR_getpid
	svc	#0
// fpsimd.c acitivty log dump hack
+6 −0
Original line number Diff line number Diff line
@@ -333,6 +333,9 @@ function barf
//	mov	w8, #__NR_exit
//	svc	#0
// end hack

	mrs	x13, S3_3_C4_C2_2

	smstop
	mov	x10, x0	// expected data
	mov	x11, x1	// actual data
@@ -356,6 +359,9 @@ function barf
	mov	x1, x12
	bl	dumphex
	puts	"]\n"
	puts	"\tSVCR: "
	mov	x0, x13
	bl	putdecn

	mov	x8, #__NR_getpid
	svc	#0
+5 −0
Original line number Diff line number Diff line
@@ -267,6 +267,8 @@ function barf
//	mov	w8, #__NR_exit
//	svc	#0
// end hack

	mrs	x13, S3_3_C4_C2_2
	smstop
	mov	x10, x0	// expected data
	mov	x11, x1	// actual data
@@ -287,6 +289,9 @@ function barf
	mov	x1, x12
	bl	dumphex
	puts	"]\n"
	puts	"\tSVCR: "
	mov	x0, x13
	bl	putdecn

	mov	x8, #__NR_getpid
	svc	#0