perf/x86/intel/cqm: Return cached counter value from IRQ context
[deliverable/linux.git] / arch / x86 / kernel / cpu / perf_event_intel_cqm.c
index 188076161c1be51afe135d6289b8ce0e96952bf3..63eb68b73589bcbbc21f9c526193adca0de2e52d 100644 (file)
@@ -951,6 +951,14 @@ static u64 intel_cqm_event_count(struct perf_event *event)
        if (!cqm_group_leader(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
This page took 0.029427 seconds and 5 git commands to generate.