]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/powerpc/pmu: Update comment with details to understand auxv_generic_compat_...
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Mon, 13 Jan 2025 07:58:58 +0000 (13:28 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Tue, 11 Feb 2025 06:03:52 +0000 (11:33 +0530)
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
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c

index 1ba675802ee9ad2654745cae1b6dcb422467e00a..8a538b6182a16f2905e3671035c0f16fcbeb7bb0 100644 (file)
@@ -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)
 {