selftests/powerpc: Allow bind_to_cpu() to automatically pick CPU
authorBenjamin Gray <bgray@linux.ibm.com>
Thu, 6 Apr 2023 04:33:16 +0000 (14:33 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2023 03:21:45 +0000 (13:21 +1000)
commit6ff4dc25483f3f49d1db48af28d4c485fc77bd21
tree5ec89621d6a955f58ca9d88b33ef0cf001ddaaed
parentc97b2fc6627e1c26a3a84633e135322918a1e592
selftests/powerpc: Allow bind_to_cpu() to automatically pick CPU

All current users of bind_to_cpu() don't care _which_ CPU they get, just
that they are bound to a single free one. So alter the interface to

1. Accept a BIND_CPU_ANY value that tells it to automatically
   pick a CPU
2. Return the picked CPU

And convert all these users to bind_to_cpu(BIND_CPU_ANY).

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230406043320.125138-4-bgray@linux.ibm.com
tools/testing/selftests/powerpc/include/utils.h
tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c
tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c
tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c
tools/testing/selftests/powerpc/pmu/ebb/multi_ebb_procs_test.c
tools/testing/selftests/powerpc/pmu/lib.c
tools/testing/selftests/powerpc/utils.c