]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2012 21:58:09 +0000 (14:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2012 21:58:09 +0000 (14:58 -0700)
added patches:
tracing-change-cpu-ring-buffer-state-from-tracing_cpumask.patch

queue-3.0/series
queue-3.0/tracing-change-cpu-ring-buffer-state-from-tracing_cpumask.patch [new file with mode: 0644]

index 711f1da37118d0ef305122011adca36496aea672..3e3b129f9ab670ff6fe4cc14ec0c0301dfdee0ae 100644 (file)
@@ -52,3 +52,4 @@ usb-option-add-mediatek-product-ids.patch
 pci-ehci-fix-crash-during-suspend-on-asus-computers.patch
 xhci-avoid-dead-ports-when-config_usb_xhci_hcd-n.patch
 ipheth-add-support-for-ipad.patch
+tracing-change-cpu-ring-buffer-state-from-tracing_cpumask.patch
diff --git a/queue-3.0/tracing-change-cpu-ring-buffer-state-from-tracing_cpumask.patch b/queue-3.0/tracing-change-cpu-ring-buffer-state-from-tracing_cpumask.patch
new file mode 100644 (file)
index 0000000..d9cd10a
--- /dev/null
@@ -0,0 +1,53 @@
+From 71babb2705e2203a64c27ede13ae3508a0d2c16c Mon Sep 17 00:00:00 2001
+From: Vaibhav Nagarnaik <vnagarnaik@google.com>
+Date: Thu, 3 May 2012 18:59:52 -0700
+Subject: tracing: change CPU ring buffer state from tracing_cpumask
+
+From: Vaibhav Nagarnaik <vnagarnaik@google.com>
+
+commit 71babb2705e2203a64c27ede13ae3508a0d2c16c upstream.
+
+According to Documentation/trace/ftrace.txt:
+
+tracing_cpumask:
+
+        This is a mask that lets the user only trace
+        on specified CPUS. The format is a hex string
+        representing the CPUS.
+
+The tracing_cpumask currently doesn't affect the tracing state of
+per-CPU ring buffers.
+
+This patch enables/disables CPU recording as its corresponding bit in
+tracing_cpumask is set/unset.
+
+Link: http://lkml.kernel.org/r/1336096792-25373-3-git-send-email-vnagarnaik@google.com
+
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Laurent Chavey <chavey@google.com>
+Cc: Justin Teravest <teravest@google.com>
+Cc: David Sharp <dhsharp@google.com>
+Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/trace.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -2432,10 +2432,12 @@ tracing_cpumask_write(struct file *filp,
+               if (cpumask_test_cpu(cpu, tracing_cpumask) &&
+                               !cpumask_test_cpu(cpu, tracing_cpumask_new)) {
+                       atomic_inc(&global_trace.data[cpu]->disabled);
++                      ring_buffer_record_disable_cpu(global_trace.buffer, cpu);
+               }
+               if (!cpumask_test_cpu(cpu, tracing_cpumask) &&
+                               cpumask_test_cpu(cpu, tracing_cpumask_new)) {
+                       atomic_dec(&global_trace.data[cpu]->disabled);
++                      ring_buffer_record_enable_cpu(global_trace.buffer, cpu);
+               }
+       }
+       arch_spin_unlock(&ftrace_max_lock);