selftests/powerpc/pmu: Add selftest for group constraint for unit and pmc field in p9
authorKajol Jain <kjain@linux.ibm.com>
Fri, 10 Jun 2022 13:41:10 +0000 (19:11 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Jun 2022 22:57:45 +0000 (08:57 +1000)
commit142c9bd1ff215f364a5d683a9dd0b7c413397185
tree7063986d2d9b1246a1556429e7b2e5d704cfafee
parent8eaca8c4b4ed9a2058e4f232d56b5973191fec37
selftests/powerpc/pmu: Add selftest for group constraint for unit and pmc field in p9

Unit and pmu bits in the event code is used to program unit and pmc
fields in Monitor Mode Control Register 1 (MMCR1). For power9 platform,
incase unit field value is within 6 to 9, one of the event in the group
should use PMC4. Otherwise event_open should fail for that group.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220610134113.62991-33-atrajeev@linux.vnet.ibm.com
tools/testing/selftests/powerpc/pmu/event_code_tests/Makefile
tools/testing/selftests/powerpc/pmu/event_code_tests/group_constraint_unit_test.c [new file with mode: 0644]