forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/tools/testing/selftests/powerpc/ptrace/ptrace-tar.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Ptrace test for TAR, PPR, DSCR registers
34 *
45 * Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117 #include "ptrace.h"
128 #include "ptrace-tar.h"
....@@ -82,6 +78,9 @@
8278 pid_t pid;
8379 int ret, status;
8480
81
+ // TAR was added in v2.07
82
+ SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
83
+
8584 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 3, 0777|IPC_CREAT);
8685 pid = fork();
8786 if (pid < 0) {