[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1273483733.15998.62.camel@minggr.sh.intel.com>
Date: Mon, 10 May 2010 17:28:53 +0800
From: Lin Ming <ming.m.lin@...el.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
"eranian@...il.com" <eranian@...il.com>,
"Gary.Mohr@...l.com" <Gary.Mohr@...l.com>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>,
Paul Mackerras <paulus@...ba.org>,
"David S. Miller" <davem@...emloft.net>,
Russell King <rmk+kernel@....linux.org.uk>,
Paul Mundt <lethal@...ux-sh.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: [RFC][PATCH 8/9] perf: sparc, convert to new API pmu->init_event
perf: sparc, convert to new API pmu->init_event
Signed-off-by: Lin Ming <ming.m.lin@...el.com>
---
arch/sparc/kernel/perf_event.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index a163f55..ef7fafc 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1128,22 +1128,21 @@ static int __hw_perf_event_init(struct perf_event *event)
return 0;
}
+static int sparc_pmu_init_event(struct perf_event *event)
+{
+ int err = __hw_perf_event_init(event);
+
+ return err;
+}
+
static struct pmu pmu = {
.enable = sparc_pmu_enable,
.disable = sparc_pmu_disable,
.read = sparc_pmu_read,
.unthrottle = sparc_pmu_unthrottle,
+ .init_event = sparc_pmu_init_event,
};
-struct pmu *hw_perf_event_init(struct perf_event *event)
-{
- int err = __hw_perf_event_init(event);
-
- if (err)
- return ERR_PTR(err);
- return &pmu;
-}
-
void perf_event_print_debug(void)
{
unsigned long flags;
@@ -1264,6 +1263,8 @@ void __init init_hw_perf_events(void)
perf_max_events = 2;
register_die_notifier(&perf_event_nmi_notifier);
+
+ perf_event_register_pmu(&pmu);
}
static inline void callchain_store(struct perf_callchain_entry *entry, u64 ip)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists