Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/powerpc/pmu: Update comment with details to understand auxv_generic_compat_pmu() utility function

auxv_generic_compat_pmu() utility function is to detect whether the
system is having generic compat PMU. The check is based on base platform
value from /proc/self/auxv. Update the comment with details on how auxv
is used to detect the platform.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250113075858.45137-5-atrajeev@linux.vnet.ibm.com

authored by

Athira Rajeev and committed by
Madhavan Srinivasan
c96b1402 9785def2

+7
+7
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c
··· 497 497 * Utility function to check for generic compat PMU 498 498 * by comparing base_platform value from auxv and real 499 499 * PVR value. 500 + * auxv_base_platform() func gives information of "base platform" 501 + * corresponding to PVR value. Incase, if the distro doesn't 502 + * support platform PVR (missing cputable support), base platform 503 + * in auxv will have a default value other than the real PVR's. 504 + * In this case, ISAv3 PMU (generic compat PMU) will be registered 505 + * in the system. auxv_generic_compat_pmu() makes use of the base 506 + * platform value from auxv to do this check. 500 507 */ 501 508 static bool auxv_generic_compat_pmu(void) 502 509 {