forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/tools/testing/selftests/powerpc/math/vmx_preempt.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2015, Cyril Bur, IBM Corp.
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version
7
- * 2 of the License, or (at your option) any later version.
84 *
95 * This test attempts to see if the VMX registers change across preemption.
106 * Two things should be noted here a) The check_vmx function in asm only checks
....@@ -61,6 +57,9 @@
6157 int i, rc, threads;
6258 pthread_t *tids;
6359
60
+ // vcmpequd used in vmx_asm.S is v2.07
61
+ SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
62
+
6463 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR;
6564 tids = malloc(threads * sizeof(pthread_t));
6665 FAIL_IF(!tids);