Skip to content
Commit 5299edbf authored by Sandipan Das's avatar Sandipan Das Committed by Greg Kroah-Hartman
Browse files

selftests/powerpc: Fix online CPU selection

[ Upstream commit dfa03fff ]

The size of the CPU affinity mask must be large enough for
systems with a very large number of CPUs. Otherwise, tests
which try to determine the first online CPU by calling
sched_getaffinity() will fail. This makes sure that the size
of the allocated affinity mask is dependent on the number of
CPUs as reported by get_nprocs_conf().

Fixes: 3752e453

 ("selftests/powerpc: Add tests of PMU EBBs")
Reported-by: default avatarShirisha Ganta <shiganta@in.ibm.com>
Signed-off-by: default avatarSandipan Das <sandipan@linux.ibm.com>
Reviewed-by: default avatarKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a408c4b8e9a23bb39b539417a21eb0ff47bb5127.1596084858.git.sandipan@linux.ibm.com
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 54127513
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