aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-01-22 14:20:18 -0500
committerOlof Johansson <olof@lixom.net>2013-01-22 14:20:29 -0500
commit51edce0ccee090ea762a3014510e7870d25c49df (patch)
treeb960c6e50a318cb3a737f31323fe50246a87a0f3 /kernel/trace
parentb2555b877bf9faf7045ae362ca051590e79167cf (diff)
parent7662a9c60fee25d7234da4be6d8eab2b2ac88448 (diff)
Merge tag 'omap-for-v3.8-rc4/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren: Minimal omap fixes for the -rc series: - A build fix for recently merged omap DRM changes - Regression fixes from the common clock framework conversion for omap4 audio and omap2 reboot - Regression fix for pandaboard WLAN control UART muxing caused by u-boot only muxing essential pins nowadays - Timer iteration fix for CONFIG_OF_DYNAMIC - A section mismatch fix for ocp2scp init * tag 'omap-for-v3.8-rc4/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (306 commits) ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport ARM: OMAP2+: DT node Timer iteration fix ARM: OMAP2+: Fix section warning for omap_init_ocp2scp() ARM: OMAP2+: fix build break for omapdrm ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function calls ARM: OMAP4: hwmod_data: Correct IDLEMODE for McPDM ARM: OMAP4: clock data: Lock ABE DPLL on all revisions + Linux 3.8-rc4 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index e5125677efa0..3c13e46d7d24 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2899,6 +2899,8 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf,
2899 if (copy_from_user(&buf, ubuf, cnt)) 2899 if (copy_from_user(&buf, ubuf, cnt))
2900 return -EFAULT; 2900 return -EFAULT;
2901 2901
2902 buf[cnt] = 0;
2903
2902 trace_set_options(buf); 2904 trace_set_options(buf);
2903 2905
2904 *ppos += cnt; 2906 *ppos += cnt;
@@ -3452,7 +3454,7 @@ static int tracing_wait_pipe(struct file *filp)
3452 return -EINTR; 3454 return -EINTR;
3453 3455
3454 /* 3456 /*
3455 * We block until we read something and tracing is enabled. 3457 * We block until we read something and tracing is disabled.
3456 * We still block if tracing is disabled, but we have never 3458 * We still block if tracing is disabled, but we have never
3457 * read anything. This allows a user to cat this file, and 3459 * read anything. This allows a user to cat this file, and
3458 * then enable tracing. But after we have read something, 3460 * then enable tracing. But after we have read something,
@@ -3460,7 +3462,7 @@ static int tracing_wait_pipe(struct file *filp)
3460 * 3462 *
3461 * iter->pos will be 0 if we haven't read anything. 3463 * iter->pos will be 0 if we haven't read anything.
3462 */ 3464 */
3463 if (tracing_is_enabled() && iter->pos) 3465 if (!tracing_is_enabled() && iter->pos)
3464 break; 3466 break;
3465 } 3467 }
3466 3468
@@ -4815,10 +4817,17 @@ rb_simple_write(struct file *filp, const char __user *ubuf,
4815 return ret; 4817 return ret;
4816 4818
4817 if (buffer) { 4819 if (buffer) {
4818 if (val) 4820 mutex_lock(&trace_types_lock);
4821 if (val) {
4819 ring_buffer_record_on(buffer); 4822 ring_buffer_record_on(buffer);
4820 else 4823 if (current_trace->start)
4824 current_trace->start(tr);
4825 } else {
4821 ring_buffer_record_off(buffer); 4826 ring_buffer_record_off(buffer);
4827 if (current_trace->stop)
4828 current_trace->stop(tr);
4829 }
4830 mutex_unlock(&trace_types_lock);
4822 } 4831 }
4823 4832
4824 (*ppos)++; 4833 (*ppos)++;