lkml.org 
[lkml]   [2014]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [for-next][PATCH 1/4] ftrace/x86: Add dynamic allocated trampoline for ftrace_ops
On Fri, 31 Oct 2014 14:19:03 +0900
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:


> > + /* Load the contents of ptr into the callback parameter */
> > + offset = (unsigned long)ptr;
> > + offset -= (unsigned long)trampoline + op_offset + OP_REF_SIZE;
> > +
> > + op_ptr.offset = offset;
> > +
> > + /* put in the new offset to the ftrace_ops */
> > + memcpy(trampoline + op_offset, &op_ptr, OP_REF_SIZE);
>
> Would we better call flush_icache_range here?

Do we need to? We just allocated memory to execute. It shouldn't be in
any CPU cache on the machine.

-- Steve


>
> Thank you,
>
> > +
> > + /* ALLOC_TRAMP flags lets us know we created it */
> > + ops->flags |= FTRACE_OPS_FL_ALLOC_TRAMP;
> > +
> > + return (unsigned long)trampoline;
> > +}
>
>



\
 
 \ /
  Last update: 2014-10-31 17:21    [W:1.545 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site