Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[muen/linux.git] / arch / x86 / events / intel / core.c
index f94855000d4ed02677ae5a46a3e622bf54a5f0b2..09c26a4f139c125e000675689ebc983acd8ab91a 100644 (file)
@@ -2958,6 +2958,10 @@ static unsigned long intel_pmu_free_running_flags(struct perf_event *event)
 
        if (event->attr.use_clockid)
                flags &= ~PERF_SAMPLE_TIME;
 
        if (event->attr.use_clockid)
                flags &= ~PERF_SAMPLE_TIME;
+       if (!event->attr.exclude_kernel)
+               flags &= ~PERF_SAMPLE_REGS_USER;
+       if (event->attr.sample_regs_user & ~PEBS_REGS)
+               flags &= ~(PERF_SAMPLE_REGS_USER | PERF_SAMPLE_REGS_INTR);
        return flags;
 }
 
        return flags;
 }