Commit 31d50c55 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs

The new sanity check introduced by:

  26657848 ("perf/core: Verify we have a single perf_hw_context PMU")

... triggered on the AMD uncore driver.

Uncore PMUs are per node, they cannot have per-task counters. Fix it.
Reported-by: default avatarBorislav Petkov <bp@suse.de>
Reported-by: default avatarIngo Molnar <mingo@kernel.org>
Tested-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@redhat.com
Cc: alexander.shishkin@linux.intel.com
Cc: eranian@google.com
Cc: jolsa@redhat.com
Cc: linux-tip-commits@vger.kernel.org
Cc: vincent.weaver@maine.edu
Link: http://lkml.kernel.org/r/20160404140208.GA3448@twins.programming.kicks-ass.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent e465de1c
...@@ -263,6 +263,7 @@ static const struct attribute_group *amd_uncore_attr_groups[] = { ...@@ -263,6 +263,7 @@ static const struct attribute_group *amd_uncore_attr_groups[] = {
}; };
static struct pmu amd_nb_pmu = { static struct pmu amd_nb_pmu = {
.task_ctx_nr = perf_invalid_context,
.attr_groups = amd_uncore_attr_groups, .attr_groups = amd_uncore_attr_groups,
.name = "amd_nb", .name = "amd_nb",
.event_init = amd_uncore_event_init, .event_init = amd_uncore_event_init,
...@@ -274,6 +275,7 @@ static struct pmu amd_nb_pmu = { ...@@ -274,6 +275,7 @@ static struct pmu amd_nb_pmu = {
}; };
static struct pmu amd_l2_pmu = { static struct pmu amd_l2_pmu = {
.task_ctx_nr = perf_invalid_context,
.attr_groups = amd_uncore_attr_groups, .attr_groups = amd_uncore_attr_groups,
.name = "amd_l2", .name = "amd_l2",
.event_init = amd_uncore_event_init, .event_init = amd_uncore_event_init,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment