aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 15:20:49 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 14:55:22 -0400
commit2577046740fe6d77864128c6187c11125c2449ea (patch)
tree1d1c691dabce954915551cd06b2b138c287256dd /kernel/trace/trace.c
parent5e3ca0ec76fce92daa4eed0d02de9c79b1fe3920 (diff)
ftrace: build fix
no need to backmerge, only affects ftrace-enabled kernels. (which is not the default) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 6974b212e938..958c4d77a67b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1965,7 +1965,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
1965 static cpumask_t mask; 1965 static cpumask_t mask;
1966 static int start; 1966 static int start;
1967 unsigned long flags; 1967 unsigned long flags;
1968#ifdef CONFIG_FTRACE
1968 int ftrace_save; 1969 int ftrace_save;
1970#endif
1969 int read = 0; 1971 int read = 0;
1970 int cpu; 1972 int cpu;
1971 int len; 1973 int len;
@@ -2044,8 +2046,10 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
2044 2046
2045 cpus_clear(mask); 2047 cpus_clear(mask);
2046 local_irq_save(flags); 2048 local_irq_save(flags);
2049#ifdef CONFIG_FTRACE
2047 ftrace_save = ftrace_enabled; 2050 ftrace_save = ftrace_enabled;
2048 ftrace_enabled = 0; 2051 ftrace_enabled = 0;
2052#endif
2049 smp_wmb(); 2053 smp_wmb();
2050 for_each_possible_cpu(cpu) { 2054 for_each_possible_cpu(cpu) {
2051 data = iter->tr->data[cpu]; 2055 data = iter->tr->data[cpu];
@@ -2087,7 +2091,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
2087 data = iter->tr->data[cpu]; 2091 data = iter->tr->data[cpu];
2088 atomic_dec(&data->disabled); 2092 atomic_dec(&data->disabled);
2089 } 2093 }
2094#ifdef CONFIG_FTRACE
2090 ftrace_enabled = ftrace_save; 2095 ftrace_enabled = ftrace_save;
2096#endif
2091 local_irq_restore(flags); 2097 local_irq_restore(flags);
2092 2098
2093 /* Now copy what we have to the user */ 2099 /* Now copy what we have to the user */