forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/tools/testing/selftests/powerpc/math/vmx_syscall.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 a syscall (fork).
106 */
....@@ -53,9 +49,14 @@
5349 * Setup an environment with much context switching
5450 */
5551 pid_t pid2;
56
- pid_t pid = fork();
52
+ pid_t pid;
5753 int ret;
5854 int child_ret;
55
+
56
+ // vcmpequd used in vmx_asm.S is v2.07
57
+ SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
58
+
59
+ pid = fork();
5960 FAIL_IF(pid == -1);
6061
6162 pid2 = fork();