lkml.org 
[lkml]   [2010]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 06/13] jump label v9: move ftrace_dyn_arch_init to common code
From
Date
On Wed, 2010-06-09 at 17:39 -0400, Jason Baron wrote:
> Move Steve's code for finding the best 5-byte no-op from ftrace.c to alternative.c.
> The idea is that other consumers (in this case jump label) want to make use of
> that code. I've created a global: 'char ideal_nop[5]', that is setup during
> setup_arch that can be used.
>
> Signed-off-by: Jason Baron <jbaron@redhat.com>

> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 0d88ce9..1a1cc47 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -2749,20 +2749,9 @@ extern unsigned long __stop_mcount_loc[];
>
> void __init ftrace_init(void)
> {
> - unsigned long count, addr, flags;
> + unsigned long count;
> int ret;
>
> - /* Keep the ftrace pointer to the stub */
> - addr = (unsigned long)ftrace_stub;
> -
> - local_irq_save(flags);
> - ftrace_dyn_arch_init(&addr);
> - local_irq_restore(flags);
> -
> - /* ftrace_dyn_arch_init places the return code in addr */
> - if (addr)
> - goto failed;
> -
> count = __stop_mcount_loc - __start_mcount_loc;
>
> ret = ftrace_dyn_table_alloc(count);

Um, you just removed the ftrace arch specific setup call for dynamic
ftrace. Although, I'm thinking this may not be needed since all archs
currently have just a stub. With the exception of ARM which seems to
call a "ftrace_mcount_set()" that git grep can not find.

Thus, if you remove this, then remove it from all archs.

-- Steve




\
 
 \ /
  Last update: 2010-06-19 05:27    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site