perf/x86/intel: Fix ICL/SPR INST_RETIRED.PREC_DIST encodings
authorStephane Eranian <eranian@google.com>
Thu, 14 Oct 2021 00:12:14 +0000 (17:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:21 +0000 (19:16 +0100)
commitec6ceae80a4280b8626501f50b2bbfbaaf4098e7
tree610e8f9473405353d36d5906db426bed1e906e97
parentd0f6689591df3c75d90b74d3548091ae69d0c56d
perf/x86/intel: Fix ICL/SPR INST_RETIRED.PREC_DIST encodings

[ Upstream commit 2de71ee153efa93099d2ab864acffeec70a8dcd5 ]

This patch fixes the encoding for INST_RETIRED.PREC_DIST as published by Intel
(download.01.org/perfmon/) for Icelake. The official encoding
is event code 0x00 umask 0x1, a change from Skylake where it was code 0xc0
umask 0x1.

With this patch applied it is possible to run:
$ perf record -a -e cpu/event=0x00,umask=0x1/pp .....

Whereas before this would fail.

To avoid problems with tools which may use the old code, we maintain the old
encoding for Icelake.

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20211014001214.2680534-1-eranian@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/events/intel/core.c
arch/x86/events/intel/ds.c