forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/tools/testing/selftests/powerpc/tm/tm-tmspr.c
....@@ -1,6 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2015, Michael Neuling, IBM Corp.
3
- * Licensed under GPLv2.
44 *
55 * Original: Michael Neuling 3/4/2014
66 * Modified: Rashmica Gupta 8/12/2015
....@@ -21,7 +21,6 @@
2121 * (a) begin transaction
2222 * (b) abort transaction
2323 * (c) check TEXASR to see if FS has been corrupted
24
- *
2524 */
2625
2726 #define _GNU_SOURCE
....@@ -34,19 +33,13 @@
3433 #include "utils.h"
3534 #include "tm.h"
3635
37
-int num_loops = 10000;
36
+int num_loops = 1000000;
3837 int passed = 1;
3938
4039 void tfiar_tfhar(void *in)
4140 {
42
- int i, cpu;
4341 unsigned long tfhar, tfhar_rd, tfiar, tfiar_rd;
44
- cpu_set_t cpuset;
45
-
46
- CPU_ZERO(&cpuset);
47
- cpu = (unsigned long)in >> 1;
48
- CPU_SET(cpu, &cpuset);
49
- sched_setaffinity(0, sizeof(cpuset), &cpuset);
42
+ int i;
5043
5144 /* TFIAR: Last bit has to be high so userspace can read register */
5245 tfiar = ((unsigned long)in) + 1;