linux-stable/tools/perf/arch
Kan Liang dff5463bc7 perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform
[ Upstream commit 01b28e4a58 ]

The X86 specific arch__intr_reg_mask() is to check whether the kernel
and hardware can collect XMM registers. But it doesn't work on some
hybrid platform.

Without the patch on ADL-N:

  $ perf record -I?
  available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10
  R11 R12 R13 R14 R15

The config of the test event doesn't contain the PMU information. The
kernel may fail to initialize it on the correct hybrid PMU and return
the wrong non-supported information.

Add the PMU information into the config for the hybrid platform. The
same register set is supported among different hybrid PMUs. Checking
the first available one is good enough.

With the patch on ADL-N:

  $ perf record -I?
  available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10
  R11 R12 R13 R14 R15 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 XMM9
  XMM10 XMM11 XMM12 XMM13 XMM14 XMM15

Fixes: 6466ec14aa ("perf regs x86: Add X86 specific arch__intr_reg_mask()")
Reported-by: Ammy Yi <ammy.yi@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20220518145125.1494156-1-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:57:34 +02:00
..
alpha
arc/annotate
arm perf arm: Fix off-by-one directory paths. 2021-09-27 09:32:28 -03:00
arm64 perf symbol: Remove arch__symbols__fixup_end() 2022-05-09 09:14:44 +02:00
csky perf tools: Fix arm64 build error with gcc-11 2021-02-18 16:24:43 -03:00
mips tools headers UAPI: Sync files changed by new process_mrelease syscall and the removal of some compat entry points 2021-09-10 11:45:07 -03:00
nds32
parisc
powerpc perf symbol: Remove arch__symbols__fixup_end() 2022-05-09 09:14:44 +02:00
riscv perf tools: Fix arm64 build error with gcc-11 2021-02-18 16:24:43 -03:00
s390 perf symbol: Remove arch__symbols__fixup_end() 2022-05-09 09:14:44 +02:00
sh treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sparc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
x86 perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform 2022-05-25 09:57:34 +02:00
xtensa treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Build
common.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
common.h perf env: Remove env.h from other headers where just a fwd decl is needed 2019-08-31 19:10:40 -03:00