summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2020-08-13 03:34:44 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2020-09-08 14:23:46 +0200
commit769628710c33b18ede837bb488e1d24084b35592 (patch)
tree15523d1d53f126850e56e2ab4fbcafdda1d806c1 /tools/testing/selftests
parentselftests/powerpc: Fix TM tests when CPU 0 is offline (diff)
downloadlinux-769628710c33b18ede837bb488e1d24084b35592.tar.xz
linux-769628710c33b18ede837bb488e1d24084b35592.zip
selftests/powerpc: Don't use setaffinity in tm-tmspr
This test tries to set affinity to CPUs that don't exist, especially if the set of online CPUs doesn't start at 0. But there's no real reason for it to use setaffinity in the first place, it's just trying to create lots of threads to cause contention. So drop the setaffinity entirely. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200813013445.686464-2-mpe@ellerman.id.au
Diffstat (limited to 'tools/testing/selftests')
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-tmspr.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/testing/selftests/powerpc/tm/tm-tmspr.c b/tools/testing/selftests/powerpc/tm/tm-tmspr.c
index 17becf3dcee4..2ff329e2fca9 100644
--- a/tools/testing/selftests/powerpc/tm/tm-tmspr.c
+++ b/tools/testing/selftests/powerpc/tm/tm-tmspr.c
@@ -38,14 +38,8 @@ int passed = 1;
void tfiar_tfhar(void *in)
{
- int i, cpu;
unsigned long tfhar, tfhar_rd, tfiar, tfiar_rd;
- cpu_set_t cpuset;
-
- CPU_ZERO(&cpuset);
- cpu = (unsigned long)in >> 1;
- CPU_SET(cpu, &cpuset);
- sched_setaffinity(0, sizeof(cpuset), &cpuset);
+ int i;
/* TFIAR: Last bit has to be high so userspace can read register */
tfiar = ((unsigned long)in) + 1;