powerpc/perf: Fix thresholding counter data for unknown type
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Sun, 9 Dec 2018 09:18:15 +0000 (14:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:06 +0000 (19:46 +0100)
commite1fe3f1e1c03bbbe5d558bd2105846526b5f54f8
tree5677844d39e78780f6918d5cf9acad6e3d516098
parent1938b4a9d294d20cba521350b8b56d3f4ab28210
powerpc/perf: Fix thresholding counter data for unknown type

[ Upstream commit 17cfccc91545682513541924245abb876d296063 ]

MMCRA[34:36] and MMCRA[38:44] expose the thresholding counter value.
Thresholding counter can be used to count latency cycles such as
load miss to reload. But threshold counter value is not relevant
when the sampled instruction type is unknown or reserved. Patch to
fix the thresholding counter value to zero when sampled instruction
type is unknown or reserved.

Fixes: 170a315f41c6('powerpc/perf: Support to export MMCRA[TEC*] field to userspace')
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/perf/isa207-common.c