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

Thresh compare bits for a event is used to program thresh compare field
in Monitor Mode Control Register A (MMCRA: 9-18 bits for power9 and
MMCRA: 8-18 bits for power10). When scheduling events as a group, all
events in that group should match value in thresh compare bits.
Otherwise event open for the sibling events will fail.

Testcase uses event code "0x401e0" as leader and another event "0x101ec"
as sibling event, and checks for thresh compare constraint 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-32-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_cmp_test.c [new file with mode: 0644]