aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 21:20:49 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 20:55:22 +0200
commit2577046740fe6d77864128c6187c11125c2449ea (patch)
tree1d1c691dabce954915551cd06b2b138c287256dd
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>
-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 6974b212e93..958c4d77a67 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1965,7 +1965,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
static cpumask_t mask;
static int start;
unsigned long flags;
+#ifdef CONFIG_FTRACE
int ftrace_save;
+#endif
int read = 0;
int cpu;
int len;
@@ -2044,8 +2046,10 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
cpus_clear(mask);
local_irq_save(flags);
+#ifdef CONFIG_FTRACE
ftrace_save = ftrace_enabled;
ftrace_enabled = 0;
+#endif
smp_wmb();
for_each_possible_cpu(cpu) {
data = iter->tr->data[cpu];
@@ -2087,7 +2091,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
data = iter->tr->data[cpu];
atomic_dec(&data->disabled);
}
+#ifdef CONFIG_FTRACE
ftrace_enabled = ftrace_save;
+#endif
local_irq_restore(flags);
/* Now copy what we have to the user */