]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc/pmu: Add mask/shift bits for extracting threshold compare field
authorKajol Jain <kjain@linux.ibm.com>
Fri, 10 Jun 2022 13:40:39 +0000 (19:10 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Jun 2022 13:56:37 +0000 (23:56 +1000)
commit3f22205a474f1c6c5afb626b44c90825f2739eb5
treed881f73fba854197c84ce60565482c2010efccdf
parentec6f8abe55447808f3a11239856d960a49dc807a
selftests/powerpc/pmu: Add mask/shift bits for extracting threshold compare field

In power10, threshold compare field is not part of the raw event code
and provided via event attribute config1. Hence add the mask and shift
bits based on event attribute config1, to extract the threshold compare
value for power10

Also add a new function called get_thresh_cmp_val to compute and return
the threshold compare field for a given platform, since incase of
power10, threshold compare value provided is decimal.

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-2-atrajeev@linux.vnet.ibm.com
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h