]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_sel...
authorKajol Jain <kjain@linux.ibm.com>
Fri, 10 Jun 2022 13:41:12 +0000 (19:11 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Jun 2022 22:57:45 +0000 (08:57 +1000)
commit2a25e041d473edd33e4240e433fec86b625c192f
tree9986894947dfd3e4678d5389358ba539b8bba477
parent38b3c9eb1679232aab060c6b2fe371c6e4448a42
selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_sel field

Thresh select bits in the event code is used to program thresh_sel field
in Monitor Mode Control Register A (MMCRA: 45-47). When scheduling
events as a group, all events in that group should match value in these
bits. Otherwise event open for the sibling events will fail.

Testcase uses event code PM_MRK_INST_CMPL (0x401e0) as leader and
another event PM_THRESH_MET (0x101ec) as sibling event, and checks if
group constraint checks for thresh_sel field added correctly via perf
interface.

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-35-atrajeev@linux.vnet.ibm.com
tools/testing/selftests/powerpc/pmu/event_code_tests/Makefile
tools/testing/selftests/powerpc/pmu/event_code_tests/group_constraint_thresh_sel_test.c [new file with mode: 0644]