]> Git Repo - linux.git/commitdiff
perf/x86: Enable raw event access to Intel offcore events
authorPeter Zijlstra <[email protected]>
Mon, 14 Nov 2011 09:03:25 +0000 (10:03 +0100)
committerIngo Molnar <[email protected]>
Mon, 14 Nov 2011 12:03:44 +0000 (13:03 +0100)
Now that the core offcore support is fixed up (thanks Stephane) and we
have sane generic events utilizing them, re-enable the raw access to
the feature as well.

Note that it doesn't matter if you use event 0x1b7 or 0x1bb to specify
an offcore event, either one works and neither guarantees you'll end
up on a particular offcore MSR.

Based on original patch from: Vince Weaver <[email protected]>.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Vince Weaver <[email protected]>.
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/cpu/perf_event.c

index ff0e8d4987507d55b65289b023af1ee6478806da..2bda212a0010ca561e8f34a9d56c2502b47ff70b 100644 (file)
@@ -312,12 +312,8 @@ int x86_setup_perfctr(struct perf_event *event)
                        return -EOPNOTSUPP;
        }
 
-       /*
-        * Do not allow config1 (extended registers) to propagate,
-        * there's no sane user-space generalization yet:
-        */
        if (attr->type == PERF_TYPE_RAW)
-               return 0;
+               return x86_pmu_extra_regs(event->attr.config, event);
 
        if (attr->type == PERF_TYPE_HW_CACHE)
                return set_ext_hw_attr(hwc, event);
This page took 0.058497 seconds and 4 git commands to generate.