X-Git-Url: https://git.codelabs.ch/?p=muen%2Flinux.git;a=blobdiff_plain;f=arch%2Fx86%2Fevents%2Fintel%2Fcore.c;h=09c26a4f139c125e000675689ebc983acd8ab91a;hp=f94855000d4ed02677ae5a46a3e622bf54a5f0b2;hb=580e3d552ddf06537c7f36d1bfab04761489db9c;hpb=4a31b424ac0656d1bb17520ee861144fe7a19664 diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index f94855000d4e..09c26a4f139c 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -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.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; }