[PATCH 1/1] Change IBS PMU to use perf_hw_context

From: suravee.suthikulpanit
Date: Fri Dec 14 2012 - 15:57:47 EST


From: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>

Currently, the AMD IBS PMU initialize pmu.task_ctx_nr to perf_invalid_context
which only allows IBS to be running only in system-wide mode (e.g. perf record -a).
IBS hardware is available in each core and should be per-context.
This patch modifies the task_ctx_nr to use the perf_hw_context (default) instead.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>

diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
index 6336bcb..08fa71a 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
@@ -466,8 +466,6 @@ static struct attribute *ibs_op_format_attrs[] = {

static struct perf_ibs perf_ibs_fetch = {
.pmu = {
- .task_ctx_nr = perf_invalid_context,
-
.event_init = perf_ibs_init,
.add = perf_ibs_add,
.del = perf_ibs_del,
@@ -490,8 +488,6 @@ static struct perf_ibs perf_ibs_fetch = {

static struct perf_ibs perf_ibs_op = {
.pmu = {
- .task_ctx_nr = perf_invalid_context,
-
.event_init = perf_ibs_init,
.add = perf_ibs_add,
.del = perf_ibs_del,
--
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/