selftests/powerpc/pmu: Add interface test for bhrb disable field
authorKajol Jain <kjain@linux.ibm.com>
Fri, 10 Jun 2022 13:40:46 +0000 (19:10 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Jun 2022 13:57:56 +0000 (23:57 +1000)
commit84cc4e66d90f6624f821df381073813dd502f657
tree30680530265acae998d8be0775fce846b72c700c
parent014fb4a3ae746276f4320f7010d03157485051cb
selftests/powerpc/pmu: Add interface test for bhrb disable field

The testcase uses "instructions" event to generate the
samples and fetch Monitor Mode Control Register A (MMCRA)
when overflow. Branch History Rolling Buffer(bhrb) disable bit
is part of MMCRA which need to be verified by perf interface.
Testcase checks if the bhrb disable bit of MMCRA register is
programmed correctly via perf interface for ISA v3.1 platform
Also make get_mmcra_ifm return type as u64.

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-9-atrajeev@linux.vnet.ibm.com
tools/testing/selftests/powerpc/pmu/sampling_tests/Makefile
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h
tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_bhrb_disable_test.c [new file with mode: 0644]