summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/perf_event.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-09-23 08:02:09 +0200
committerIngo Molnar <mingo@elte.hu>2010-09-23 08:02:09 +0200
commitd0303d71c2fb9bcb90a8d48e6462c78c86f70ce6 (patch)
tree2aa6702ee7c153d909a820ae9fda14d35877e59e /arch/sparc/kernel/perf_event.c
parent90edf27fb89241917e91155bfdcc7c8e5a587222 (diff)
parentc79bd89282136a4516e842fa542d6abf902ddeac (diff)
Merge branch 'linus' into perf/core
Conflicts: arch/sparc/kernel/perf_event.c Merge reason: Resolve the conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
-rw-r--r--arch/sparc/kernel/perf_event.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index f9a706759364..0d6deb55a2ae 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1076,13 +1076,24 @@ static int sparc_pmu_event_init(struct perf_event *event)
break;
case PERF_TYPE_RAW:
- return -EOPNOTSUPP;
+ pmap = NULL;
+ break;
default:
return -ENOENT;
}
+ if (pmap) {
+ hwc->event_base = perf_event_encode(pmap);
+ } else {
+ /*
+ * User gives us "(encoding << 16) | pic_mask" for
+ * PERF_TYPE_RAW events.
+ */
+ hwc->event_base = attr->config;
+ }
+
/* We save the enable bits in the config_base. */
hwc->config_base = sparc_pmu->irq_bit;
if (!attr->exclude_user)
@@ -1092,8 +1103,6 @@ static int sparc_pmu_event_init(struct perf_event *event)
if (!attr->exclude_hv)
hwc->config_base |= sparc_pmu->hv_bit;
- hwc->event_base = perf_event_encode(pmap);
-
n = 0;
if (event->group_leader != event) {
n = collect_events(event->group_leader,