Skip to content

Commit 2579d01

Browse files
committed
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Thomas Gleixner: "A single fix for the intel cqm perf facility to prevent IPIs from interrupt context" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/cqm: Return cached counter value from IRQ context
2 parents 2800348 + 2c534c0 commit 2579d01

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/x86/kernel/cpu/perf_event_intel_cqm.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,14 @@ static u64 intel_cqm_event_count(struct perf_event *event)
951951
if (!cqm_group_leader(event))
952952
return 0;
953953

954+
/*
955+
* Getting up-to-date values requires an SMP IPI which is not
956+
* possible if we're being called in interrupt context. Return
957+
* the cached values instead.
958+
*/
959+
if (unlikely(in_interrupt()))
960+
goto out;
961+
954962
/*
955963
* Notice that we don't perform the reading of an RMID
956964
* atomically, because we can't hold a spin lock across the

0 commit comments

Comments
 (0)