File tree Expand file tree Collapse file tree 5 files changed +43
-10
lines changed
tools/testing/selftests/arm64 Expand file tree Collapse file tree 5 files changed +43
-10
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,12 @@ static int write_clone_read(void)
254
254
putnum(++tests_run); \
255
255
putstr(" " #name "\n");
256
256
257
+ #define skip_test (name ) \
258
+ tests_skipped++; \
259
+ putstr("ok "); \
260
+ putnum(++tests_run); \
261
+ putstr(" # SKIP " #name "\n");
262
+
257
263
int main (int argc , char * * argv )
258
264
{
259
265
int ret , i ;
@@ -283,13 +289,11 @@ int main(int argc, char **argv)
283
289
} else {
284
290
putstr ("# SME support not present\n" );
285
291
286
- for (i = 0 ; i < EXPECTED_TESTS ; i ++ ) {
287
- putstr ("ok " );
288
- putnum (i );
289
- putstr (" skipped, TPIDR2 not supported\n" );
290
- }
291
-
292
- tests_skipped += EXPECTED_TESTS ;
292
+ skip_test (default_value );
293
+ skip_test (write_read );
294
+ skip_test (write_sleep_read );
295
+ skip_test (write_fork_read );
296
+ skip_test (write_clone_read );
293
297
}
294
298
295
299
print_summary ();
Original file line number Diff line number Diff line change @@ -515,6 +515,10 @@ function barf
515
515
mov x11 , x1 // actual data
516
516
mov x12 , x2 // data size
517
517
518
+ #ifdef SSVE
519
+ mrs x13 , S3_3_C4_C2_2
520
+ #endif
521
+
518
522
puts "Mismatch: PID="
519
523
mov x0 , x20
520
524
bl putdec
@@ -534,6 +538,12 @@ function barf
534
538
bl dumphex
535
539
puts "]\n"
536
540
541
+ #ifdef SSVE
542
+ puts "\tSVCR: "
543
+ mov x0 , x13
544
+ bl putdecn
545
+ #endif
546
+
537
547
mov x8 , #__NR_getpid
538
548
svc # 0
539
549
// fpsimd.c acitivty log dump hack
Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ static struct vec_data vec_data[] = {
66
66
},
67
67
};
68
68
69
+ static bool vec_type_supported (struct vec_data * data )
70
+ {
71
+ return getauxval (data -> hwcap_type ) & data -> hwcap ;
72
+ }
73
+
69
74
static int stdio_read_integer (FILE * f , const char * what , int * val )
70
75
{
71
76
int n = 0 ;
@@ -564,8 +569,11 @@ static void prctl_set_all_vqs(struct vec_data *data)
564
569
return ;
565
570
}
566
571
567
- for (i = 0 ; i < ARRAY_SIZE (vec_data ); i ++ )
572
+ for (i = 0 ; i < ARRAY_SIZE (vec_data ); i ++ ) {
573
+ if (!vec_type_supported (& vec_data [i ]))
574
+ continue ;
568
575
orig_vls [i ] = vec_data [i ].rdvl ();
576
+ }
569
577
570
578
for (vq = SVE_VQ_MIN ; vq <= SVE_VQ_MAX ; vq ++ ) {
571
579
vl = sve_vl_from_vq (vq );
@@ -594,7 +602,7 @@ static void prctl_set_all_vqs(struct vec_data *data)
594
602
if (& vec_data [i ] == data )
595
603
continue ;
596
604
597
- if (!( getauxval ( vec_data [ i ]. hwcap_type ) & vec_data [i ]. hwcap ))
605
+ if (!vec_type_supported ( & vec_data [i ]))
598
606
continue ;
599
607
600
608
if (vec_data [i ].rdvl () != orig_vls [i ]) {
@@ -765,7 +773,7 @@ int main(void)
765
773
struct vec_data * data = & vec_data [i ];
766
774
unsigned long supported ;
767
775
768
- supported = getauxval (data -> hwcap_type ) & data -> hwcap ;
776
+ supported = vec_type_supported (data ) ;
769
777
if (!supported )
770
778
all_supported = false;
771
779
Original file line number Diff line number Diff line change @@ -333,6 +333,9 @@ function barf
333
333
// mov w8 , #__NR_exit
334
334
// svc # 0
335
335
// end hack
336
+
337
+ mrs x13 , S3_3_C4_C2_2
338
+
336
339
smstop
337
340
mov x10 , x0 // expected data
338
341
mov x11 , x1 // actual data
@@ -356,6 +359,9 @@ function barf
356
359
mov x1 , x12
357
360
bl dumphex
358
361
puts "]\n"
362
+ puts "\tSVCR: "
363
+ mov x0 , x13
364
+ bl putdecn
359
365
360
366
mov x8 , #__NR_getpid
361
367
svc # 0
Original file line number Diff line number Diff line change @@ -267,6 +267,8 @@ function barf
267
267
// mov w8 , #__NR_exit
268
268
// svc # 0
269
269
// end hack
270
+
271
+ mrs x13 , S3_3_C4_C2_2
270
272
smstop
271
273
mov x10 , x0 // expected data
272
274
mov x11 , x1 // actual data
@@ -287,6 +289,9 @@ function barf
287
289
mov x1 , x12
288
290
bl dumphex
289
291
puts "]\n"
292
+ puts "\tSVCR: "
293
+ mov x0 , x13
294
+ bl putdecn
290
295
291
296
mov x8 , #__NR_getpid
292
297
svc # 0
You can’t perform that action at this time.
0 commit comments