[PATCH V2 5/5] selftests/powerpc/pmu: Update comment with details to understand auxv_generic_compat_pmu() utility function
Athira Rajeev
atrajeev at linux.vnet.ibm.com
Mon Jan 13 18:58:58 AEDT 2025
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 at linux.vnet.ibm.com>
---
Changelog:
v1 -> v2
New patch added in V2
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c | 7 +++++++
1 file changed, 7 insertions(+)
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)
{
--
2.43.5
More information about the Linuxppc-dev
mailing list