Commit 76962871 authored by Michael Ellerman's avatar Michael Ellerman

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: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200813013445.686464-2-mpe@ellerman.id.au
parent c0176429
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment