summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch
new file mode 100644
index 00000000..eb84795a
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch
@@ -0,0 +1,56 @@
1From 04098d77869c04c5bf703846783cb89b4297b2bb Mon Sep 17 00:00:00 2001
2From: Vaibhav Nagarnaik <vnagarnaik@google.com>
3Date: Thu, 3 May 2012 18:59:52 -0700
4Subject: [PATCH 23/49] tracing: change CPU ring buffer state from
5 tracing_cpumask
6
7commit 71babb2705e2203a64c27ede13ae3508a0d2c16c upstream.
8
9According to Documentation/trace/ftrace.txt:
10
11tracing_cpumask:
12
13 This is a mask that lets the user only trace
14 on specified CPUS. The format is a hex string
15 representing the CPUS.
16
17The tracing_cpumask currently doesn't affect the tracing state of
18per-CPU ring buffers.
19
20This patch enables/disables CPU recording as its corresponding bit in
21tracing_cpumask is set/unset.
22
23Link: http://lkml.kernel.org/r/1336096792-25373-3-git-send-email-vnagarnaik@google.com
24
25Cc: Frederic Weisbecker <fweisbec@gmail.com>
26Cc: Ingo Molnar <mingo@redhat.com>
27Cc: Laurent Chavey <chavey@google.com>
28Cc: Justin Teravest <teravest@google.com>
29Cc: David Sharp <dhsharp@google.com>
30Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
31Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 kernel/trace/trace.c | 2 ++
35 1 file changed, 2 insertions(+)
36
37diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
38index 7e4edd3..5638104 100644
39--- a/kernel/trace/trace.c
40+++ b/kernel/trace/trace.c
41@@ -2541,10 +2541,12 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf,
42 if (cpumask_test_cpu(cpu, tracing_cpumask) &&
43 !cpumask_test_cpu(cpu, tracing_cpumask_new)) {
44 atomic_inc(&global_trace.data[cpu]->disabled);
45+ ring_buffer_record_disable_cpu(global_trace.buffer, cpu);
46 }
47 if (!cpumask_test_cpu(cpu, tracing_cpumask) &&
48 cpumask_test_cpu(cpu, tracing_cpumask_new)) {
49 atomic_dec(&global_trace.data[cpu]->disabled);
50+ ring_buffer_record_enable_cpu(global_trace.buffer, cpu);
51 }
52 }
53 arch_spin_unlock(&ftrace_max_lock);
54--
551.7.10
56