aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-06-11 07:35:57 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-09 14:46:27 -0400
commit51b0fe39549a04858001922919ab355dee9bdfcf (patch)
tree024768dd0c87e890edf76e129820ea0cdf16a257 /kernel/perf_event.c
parent2aa61274efb9f532deaebc9812675a27af1994cb (diff)
perf: Deconstify struct pmu
sed -ie 's/const struct pmu\>/struct pmu/g' `git grep -l "const struct pmu\>"` Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: paulus <paulus@samba.org> Cc: stephane eranian <eranian@googlemail.com> Cc: Robert Richter <robert.richter@amd.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Lin Ming <ming.m.lin@intel.com> Cc: Yanmin <yanmin_zhang@linux.intel.com> Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com> Cc: David Miller <davem@davemloft.net> Cc: Michael Cree <mcree@orcon.net.nz> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 2d74f31220ad..fb46fd13f31f 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -75,7 +75,7 @@ static DEFINE_SPINLOCK(perf_resource_lock);
75/* 75/*
76 * Architecture provided APIs - weak aliases: 76 * Architecture provided APIs - weak aliases:
77 */ 77 */
78extern __weak const struct pmu *hw_perf_event_init(struct perf_event *event) 78extern __weak struct pmu *hw_perf_event_init(struct perf_event *event)
79{ 79{
80 return NULL; 80 return NULL;
81} 81}
@@ -691,7 +691,7 @@ group_sched_in(struct perf_event *group_event,
691 struct perf_event_context *ctx) 691 struct perf_event_context *ctx)
692{ 692{
693 struct perf_event *event, *partial_group = NULL; 693 struct perf_event *event, *partial_group = NULL;
694 const struct pmu *pmu = group_event->pmu; 694 struct pmu *pmu = group_event->pmu;
695 bool txn = false; 695 bool txn = false;
696 696
697 if (group_event->state == PERF_EVENT_STATE_OFF) 697 if (group_event->state == PERF_EVENT_STATE_OFF)
@@ -4501,7 +4501,7 @@ static int perf_swevent_int(struct perf_event *event)
4501 return 0; 4501 return 0;
4502} 4502}
4503 4503
4504static const struct pmu perf_ops_generic = { 4504static struct pmu perf_ops_generic = {
4505 .enable = perf_swevent_enable, 4505 .enable = perf_swevent_enable,
4506 .disable = perf_swevent_disable, 4506 .disable = perf_swevent_disable,
4507 .start = perf_swevent_int, 4507 .start = perf_swevent_int,
@@ -4614,7 +4614,7 @@ static void cpu_clock_perf_event_read(struct perf_event *event)
4614 cpu_clock_perf_event_update(event); 4614 cpu_clock_perf_event_update(event);
4615} 4615}
4616 4616
4617static const struct pmu perf_ops_cpu_clock = { 4617static struct pmu perf_ops_cpu_clock = {
4618 .enable = cpu_clock_perf_event_enable, 4618 .enable = cpu_clock_perf_event_enable,
4619 .disable = cpu_clock_perf_event_disable, 4619 .disable = cpu_clock_perf_event_disable,
4620 .read = cpu_clock_perf_event_read, 4620 .read = cpu_clock_perf_event_read,
@@ -4671,7 +4671,7 @@ static void task_clock_perf_event_read(struct perf_event *event)
4671 task_clock_perf_event_update(event, time); 4671 task_clock_perf_event_update(event, time);
4672} 4672}
4673 4673
4674static const struct pmu perf_ops_task_clock = { 4674static struct pmu perf_ops_task_clock = {
4675 .enable = task_clock_perf_event_enable, 4675 .enable = task_clock_perf_event_enable,
4676 .disable = task_clock_perf_event_disable, 4676 .disable = task_clock_perf_event_disable,
4677 .read = task_clock_perf_event_read, 4677 .read = task_clock_perf_event_read,
@@ -4785,7 +4785,7 @@ static int swevent_hlist_get(struct perf_event *event)
4785 4785
4786#ifdef CONFIG_EVENT_TRACING 4786#ifdef CONFIG_EVENT_TRACING
4787 4787
4788static const struct pmu perf_ops_tracepoint = { 4788static struct pmu perf_ops_tracepoint = {
4789 .enable = perf_trace_enable, 4789 .enable = perf_trace_enable,
4790 .disable = perf_trace_disable, 4790 .disable = perf_trace_disable,
4791 .start = perf_swevent_int, 4791 .start = perf_swevent_int,
@@ -4849,7 +4849,7 @@ static void tp_perf_event_destroy(struct perf_event *event)
4849 perf_trace_destroy(event); 4849 perf_trace_destroy(event);
4850} 4850}
4851 4851
4852static const struct pmu *tp_perf_event_init(struct perf_event *event) 4852static struct pmu *tp_perf_event_init(struct perf_event *event)
4853{ 4853{
4854 int err; 4854 int err;
4855 4855
@@ -4896,7 +4896,7 @@ static void perf_event_free_filter(struct perf_event *event)
4896 4896
4897#else 4897#else
4898 4898
4899static const struct pmu *tp_perf_event_init(struct perf_event *event) 4899static struct pmu *tp_perf_event_init(struct perf_event *event)
4900{ 4900{
4901 return NULL; 4901 return NULL;
4902} 4902}
@@ -4918,7 +4918,7 @@ static void bp_perf_event_destroy(struct perf_event *event)
4918 release_bp_slot(event); 4918 release_bp_slot(event);
4919} 4919}
4920 4920
4921static const struct pmu *bp_perf_event_init(struct perf_event *bp) 4921static struct pmu *bp_perf_event_init(struct perf_event *bp)
4922{ 4922{
4923 int err; 4923 int err;
4924 4924
@@ -4942,7 +4942,7 @@ void perf_bp_event(struct perf_event *bp, void *data)
4942 perf_swevent_add(bp, 1, 1, &sample, regs); 4942 perf_swevent_add(bp, 1, 1, &sample, regs);
4943} 4943}
4944#else 4944#else
4945static const struct pmu *bp_perf_event_init(struct perf_event *bp) 4945static struct pmu *bp_perf_event_init(struct perf_event *bp)
4946{ 4946{
4947 return NULL; 4947 return NULL;
4948} 4948}
@@ -4964,9 +4964,9 @@ static void sw_perf_event_destroy(struct perf_event *event)
4964 swevent_hlist_put(event); 4964 swevent_hlist_put(event);
4965} 4965}
4966 4966
4967static const struct pmu *sw_perf_event_init(struct perf_event *event) 4967static struct pmu *sw_perf_event_init(struct perf_event *event)
4968{ 4968{
4969 const struct pmu *pmu = NULL; 4969 struct pmu *pmu = NULL;
4970 u64 event_id = event->attr.config; 4970 u64 event_id = event->attr.config;
4971 4971
4972 /* 4972 /*
@@ -5028,7 +5028,7 @@ perf_event_alloc(struct perf_event_attr *attr,
5028 perf_overflow_handler_t overflow_handler, 5028 perf_overflow_handler_t overflow_handler,
5029 gfp_t gfpflags) 5029 gfp_t gfpflags)
5030{ 5030{
5031 const struct pmu *pmu; 5031 struct pmu *pmu;
5032 struct perf_event *event; 5032 struct perf_event *event;
5033 struct hw_perf_event *hwc; 5033 struct hw_perf_event *hwc;
5034 long err; 5034 long err;