diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-26 11:46:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-26 11:46:32 -0700 |
commit | 2579d019ad591043634b02d038cadcabb5eb21f8 (patch) | |
tree | 7d90c578d89dba6b3413e7fea64adcf343ec28ac | |
parent | 2800348613953b5892c196e4bfab2ae5783a519e (diff) | |
parent | 2c534c0da0a68418693e10ce1c4146e085f39518 (diff) | |
download | op-kernel-dev-2579d019ad591043634b02d038cadcabb5eb21f8.zip op-kernel-dev-2579d019ad591043634b02d038cadcabb5eb21f8.tar.gz |
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
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_cqm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_cqm.c b/arch/x86/kernel/cpu/perf_event_intel_cqm.c index 1880761..63eb68b 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_cqm.c +++ b/arch/x86/kernel/cpu/perf_event_intel_cqm.c @@ -952,6 +952,14 @@ static u64 intel_cqm_event_count(struct perf_event *event) return 0; /* + * Getting up-to-date values requires an SMP IPI which is not + * possible if we're being called in interrupt context. Return + * the cached values instead. + */ + if (unlikely(in_interrupt())) + goto out; + + /* * Notice that we don't perform the reading of an RMID * atomically, because we can't hold a spin lock across the * IPIs. |