powerpc/perf: Fix Threshold Event Counter Multiplier width for P10
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Tue, 15 Dec 2020 08:56:18 +0000 (03:56 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Dec 2020 11:50:04 +0000 (22:50 +1100)
commitef0e3b650f8ddc54bb70868852f50642ee3ae765
tree892a0952d86faa63082d135b8b51d3891421128c
parent2198d4934ee8b81341a84c9ec8bb25b4b0d02522
powerpc/perf: Fix Threshold Event Counter Multiplier width for P10

Threshold Event Counter Multiplier (TECM) is part of Monitor Mode
Control Register A (MMCRA). This field along with Threshold Event
Counter Exponent (TECE) is used to get threshould counter value.
In Power10, this is a 8bit field, so patch fixes the
current code to modify the MMCRA[TECM] extraction macro to
handle this change. ISA v3.1 says this is a 7 bit field but
POWER10 it's actually 8 bits which will hopefully be fixed
in ISA v3.1 update.

Fixes: 170a315f41c6 ("powerpc/perf: Support to export MMCRA[TEC*] field to userspace")
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1608022578-1532-1-git-send-email-atrajeev@linux.vnet.ibm.com
arch/powerpc/perf/isa207-common.c
arch/powerpc/perf/isa207-common.h