summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/powerpc
diff options
context:
space:
mode:
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>2025-01-13 13:28:58 +0530
committerMadhavan Srinivasan <maddy@linux.ibm.com>2025-02-11 11:33:52 +0530
commitc96b1402cc8fe818b0aaaee280221a5e7b6b2242 (patch)
treeca37fdf5b2c237dec7c3f2d6199be37358209595 /tools/testing/selftests/powerpc
parent9785def2593c7c62fa3271d740eef0e1d1874ef4 (diff)
downloadlwn-c96b1402cc8fe818b0aaaee280221a5e7b6b2242.tar.gz
lwn-c96b1402cc8fe818b0aaaee280221a5e7b6b2242.zip
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
Diffstat (limited to 'tools/testing/selftests/powerpc')
-rw-r--r--tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c b/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c
index 1ba675802ee9..8a538b6182a1 100644
--- a/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c
+++ b/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c
@@ -497,6 +497,13 @@ int get_thresh_cmp_val(struct event event)
* Utility function to check for generic compat PMU
* by comparing base_platform value from auxv and real
* PVR value.
+ * auxv_base_platform() func gives information of "base platform"
+ * corresponding to PVR value. Incase, if the distro doesn't
+ * support platform PVR (missing cputable support), base platform
+ * in auxv will have a default value other than the real PVR's.
+ * In this case, ISAv3 PMU (generic compat PMU) will be registered
+ * in the system. auxv_generic_compat_pmu() makes use of the base
+ * platform value from auxv to do this check.
*/
static bool auxv_generic_compat_pmu(void)
{