OpenCloudOS-Kernel/arch/x86/events/intel
Like Xu 488e13a489 perf/x86/lbr: Remove cpuc->lbr_xsave allocation from atomic context
If the kernel is compiled with the CONFIG_LOCKDEP option, the conditional
might_sleep_if() deep in kmem_cache_alloc() will generate the following
trace, and potentially cause a deadlock when another LBR event is added:

  [] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:196
  [] Call Trace:
  []  kmem_cache_alloc+0x36/0x250
  []  intel_pmu_lbr_add+0x152/0x170
  []  x86_pmu_add+0x83/0xd0

Make it symmetric with the release_lbr_buffers() call and mirror the
existing DS buffers.

Fixes: c085fb8774 ("perf/x86/intel/lbr: Support XSAVES for arch LBR read")
Signed-off-by: Like Xu <like.xu@linux.intel.com>
[peterz: simplified]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lkml.kernel.org/r/20210430052247.3079672-2-like.xu@linux.intel.com
2021-05-18 12:53:47 +02:00
..
Makefile perf/x86/intel/uncore: Parse uncore discovery tables 2021-04-02 10:04:54 +02:00
bts.c x86: Fix various typos in comments, take #2 2021-03-21 23:50:28 +01:00
core.c perf/x86: Avoid touching LBR_TOS MSR for Arch LBR 2021-05-18 12:53:47 +02:00
cstate.c perf/x86/cstate: Add Alder Lake CPU support 2021-04-19 20:03:29 +02:00
ds.c Perf events changes in this cycle were: 2021-04-28 13:03:44 -07:00
knc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lbr.c perf/x86/lbr: Remove cpuc->lbr_xsave allocation from atomic context 2021-05-18 12:53:47 +02:00
p4.c Perf events changes in this cycle were: 2021-04-28 13:03:44 -07:00
p6.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
pt.c x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
pt.h perf/x86/intel/pt: Prevent redundant WRMSRs 2019-11-13 11:06:18 +01:00
uncore.c perf/x86/intel/uncore: Add Alder Lake support 2021-04-19 20:03:29 +02:00
uncore.h perf/x86/intel/uncore: Add Alder Lake support 2021-04-19 20:03:29 +02:00
uncore_discovery.c perf/x86/intel/uncore: Generic support for the MMIO type of uncore blocks 2021-04-02 10:04:55 +02:00
uncore_discovery.h perf/x86/intel/uncore: Generic support for the MMIO type of uncore blocks 2021-04-02 10:04:55 +02:00
uncore_nhmex.c perf/x86/intel/uncore: Correct fixed counter index check for NHM 2018-05-31 12:36:28 +02:00
uncore_snb.c perf/x86/intel/uncore: Add Alder Lake support 2021-04-19 20:03:29 +02:00
uncore_snbep.c Perf events changes in this cycle were: 2021-04-28 13:03:44 -07:00