aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_event_perf.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-08-10 23:47:59 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-08-18 19:33:05 -0400
commit6016ee13db518ab1cd0cbf43fc2ad5712021e338 (patch)
tree317d1ed2b103db13fef6bb692a73235de41d764b /kernel/trace/trace_event_perf.c
parent7ae07ea3a48d30689ee037cb136bc21f0b37d8ae (diff)
perf, tracing: add missing __percpu markups
ftrace_event_call->perf_events, perf_trace_buf, fgraph_data->cpu_data and some local variables are percpu pointers missing __percpu markups. Add them. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <1281498479-28551-1-git-send-email-namhyung@gmail.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_event_perf.c')
-rw-r--r--kernel/trace/trace_event_perf.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
index db2eae2efcf2..92f5477a006a 100644
--- a/kernel/trace/trace_event_perf.c
+++ b/kernel/trace/trace_event_perf.c
@@ -9,7 +9,7 @@
9#include <linux/kprobes.h> 9#include <linux/kprobes.h>
10#include "trace.h" 10#include "trace.h"
11 11
12static char *perf_trace_buf[PERF_NR_CONTEXTS]; 12static char __percpu *perf_trace_buf[PERF_NR_CONTEXTS];
13 13
14/* 14/*
15 * Force it to be aligned to unsigned long to avoid misaligned accesses 15 * Force it to be aligned to unsigned long to avoid misaligned accesses
@@ -24,7 +24,7 @@ static int total_ref_count;
24static int perf_trace_event_init(struct ftrace_event_call *tp_event, 24static int perf_trace_event_init(struct ftrace_event_call *tp_event,
25 struct perf_event *p_event) 25 struct perf_event *p_event)
26{ 26{
27 struct hlist_head *list; 27 struct hlist_head __percpu *list;
28 int ret = -ENOMEM; 28 int ret = -ENOMEM;
29 int cpu; 29 int cpu;
30 30
@@ -42,11 +42,11 @@ static int perf_trace_event_init(struct ftrace_event_call *tp_event,
42 tp_event->perf_events = list; 42 tp_event->perf_events = list;
43 43
44 if (!total_ref_count) { 44 if (!total_ref_count) {
45 char *buf; 45 char __percpu *buf;
46 int i; 46 int i;
47 47
48 for (i = 0; i < PERF_NR_CONTEXTS; i++) { 48 for (i = 0; i < PERF_NR_CONTEXTS; i++) {
49 buf = (char *)alloc_percpu(perf_trace_t); 49 buf = (char __percpu *)alloc_percpu(perf_trace_t);
50 if (!buf) 50 if (!buf)
51 goto fail; 51 goto fail;
52 52
@@ -102,13 +102,14 @@ int perf_trace_init(struct perf_event *p_event)
102int perf_trace_enable(struct perf_event *p_event) 102int perf_trace_enable(struct perf_event *p_event)
103{ 103{
104 struct ftrace_event_call *tp_event = p_event->tp_event; 104 struct ftrace_event_call *tp_event = p_event->tp_event;
105 struct hlist_head __percpu *pcpu_list;
105 struct hlist_head *list; 106 struct hlist_head *list;
106 107
107 list = tp_event->perf_events; 108 pcpu_list = tp_event->perf_events;
108 if (WARN_ON_ONCE(!list)) 109 if (WARN_ON_ONCE(!pcpu_list))
109 return -EINVAL; 110 return -EINVAL;
110 111
111 list = this_cpu_ptr(list); 112 list = this_cpu_ptr(pcpu_list);
112 hlist_add_head_rcu(&p_event->hlist_entry, list); 113 hlist_add_head_rcu(&p_event->hlist_entry, list);
113 114
114 return 0; 115 return 0;