[an error occurred while processing this directive]
|
|
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0811181220530.15003@gandalf.stny.rr.com>
Date: Tue, 18 Nov 2008 12:21:19 -0500 (EST)
From: Steven Rostedt <rostedt@...dmis.org>
To: Heiko Carstens <heiko.carstens@...ibm.com>
cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: ftrace: preemptoff selftest not working
On Tue, 18 Nov 2008, Heiko Carstens wrote:
> >
> > we can drop it in selected initcalls just fine. Its only role is
> > old-style init functions racing with other async contexts of
> > themselves.
>
> Something like below works fine for me...
>
> Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>
Acked-by: Steven Rostedt <srostedt@...hat.com>
-- Steve
> ---
>
> kernel/trace/trace.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> Index: linux-2.6/kernel/trace/trace.c
> ===================================================================
> --- linux-2.6.orig/kernel/trace/trace.c
> +++ linux-2.6/kernel/trace/trace.c
> @@ -482,6 +482,13 @@ int register_tracer(struct tracer *type)
> }
>
> #ifdef CONFIG_FTRACE_STARTUP_TEST
> + /*
> + * When this gets called we hold the BKL which means that preemption
> + * is disabled. Various trace selftests however need to disable
> + * and enable preemption for successful tests. So we drop the BKL here
> + * and grab it after the tests again.
> + */
> + unlock_kernel();
> if (type->selftest) {
> struct tracer *saved_tracer = current_trace;
> struct trace_array *tr = &global_trace;
> @@ -515,6 +522,7 @@ int register_tracer(struct tracer *type)
> }
> printk(KERN_CONT "PASSED\n");
> }
> + lock_kernel();
> #endif
>
> type->next = trace_types;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists