selftests/powerpc/pmu: Add selftest for mmcr1 pmcxsel/unit/cache fields
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Fri, 10 Jun 2022 13:40:51 +0000 (19:10 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Jun 2022 22:57:42 +0000 (08:57 +1000)
commit0321f2d0ae6959f79f5b8a21b31694b54dbaa35d
tree09b7472d4553325280e8889e87419735cde225a0
parentf6380e05aa92b005ac6f38be92afbdd2a0706cff
selftests/powerpc/pmu: Add selftest for mmcr1 pmcxsel/unit/cache fields

The testcase uses event code "0x21c040" to verify the settings for
different fields in Monitor Mode Control Register 1 (MMCR1). The fields
include PMCxSEL, PMCXCOMB PMCxUNIT, cache. Checks if these fields are
translated correctly via perf interface to MMCR1

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220610134113.62991-14-atrajeev@linux.vnet.ibm.com
tools/testing/selftests/powerpc/pmu/sampling_tests/Makefile
tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr1_sel_unit_cache_test.c [new file with mode: 0644]