lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/6] stm class: ftrace: use different channel accroding to CPU
On Sun, 26 Jul 2020 10:59:31 +0800
Tingwei Zhang <tingwei@codeaurora.org> wrote:

> --- a/drivers/hwtracing/stm/ftrace.c
> +++ b/drivers/hwtracing/stm/ftrace.c
> @@ -37,8 +37,9 @@ static void notrace
> stm_ftrace_write(struct trace_export *export, const void *buf, unsigned int len)
> {
> struct stm_ftrace *stm = container_of(export, struct stm_ftrace, ftrace);
> + unsigned int cpu = smp_processor_id();

Probably should add a comment to the above stating that this is called
from the tracing system with preemption disabled.

Other than my two comments:

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve


>
> - stm_source_write(&stm->data, STM_FTRACE_CHAN, buf, len);
> + stm_source_write(&stm->data, STM_FTRACE_CHAN + cpu, buf, len);
> }
>
> static int stm_ftrace_link(struct stm_source_data *data)

\
 
 \ /
  Last update: 2020-07-27 21:09    [W:2.819 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site