(2014/11/01 1:01), Steven Rostedt wrote:
> On Fri, 31 Oct 2014 14:19:03 +0900
> Masami Hiramatsu <[email protected]> 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.

Indeed, if the trampoline buffer is not re-used (and it seems so),
we don't need to care about it.

OK, I've reviewed that :).

Thank you,

> 
> -- Steve
> 
> 
>>
>> Thank you,
>>
>>> +
>>> +   /* ALLOC_TRAMP flags lets us know we created it */
>>> +   ops->flags |= FTRACE_OPS_FL_ALLOC_TRAMP;
>>> +
>>> +   return (unsigned long)trampoline;
>>> +}
>>
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: [email protected]


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to