From: Luotao Fu <l.fu@pengutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Luotao Fu <l.fu@pengutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
RT <linux-rt-users@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: 2.6.24-rc7-rt2 [PATCH] latency tracer fix for ppc32
Date: Wed, 16 Jan 2008 13:03:07 +0100 [thread overview]
Message-ID: <20080116120307.GI5859@pengutronix.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0801151301550.26624@gandalf.stny.rr.com>
[-- Attachment #1.1: Type: text/plain, Size: 767 bytes --]
Hi Steve,
I found out that the tracer got stuck on ppc32 platforms because some early
functions call _mcount before mcount_enabled is initialized at all. I made a
patch, which marks these functions as notrace to solve this problem. With this
patch I can successfully boot up our mpc5200b platform and make latency trace.
(tested with -b switch in cyclictest). Please comment.
I made my patch against the -rt2 tree since the dummy call early_printk() in
-rt3 conflicts with our implementation of a functional early_printk(). It
should also work with -rt3 though.
cheers
Luotao Fu
--
Dipl.-Ing. Luotao Fu | Phone: +49-5121-206917-3
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de
[-- Attachment #1.2: ppc32_notrace_init_functions.diff --]
[-- Type: text/x-diff, Size: 2726 bytes --]
Subject: don't trace early init functions for ppc32
By: Luotao Fu <l.fu@pengutronix.de>
If the latency tracer is turned on in the kernel config, _mcount calls are
added automatically to every function call during compiling since -pg
compiling flag is set. _mcount() checks first the variable mcount_enabled.
(see implementation of _mcount() in arch/powerpc/kernel/entry_32.S) This will
stuck forever if _mcount is called before mcount_enabled is initialized. Hence
we mark some init functions as notrace, so that _mcount calls are not added to
these functions.
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
---
arch/powerpc/kernel/cputable.c | 4 ++--
arch/powerpc/kernel/io.c | 2 +-
arch/powerpc/kernel/setup_32.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
Index: arch/powerpc/kernel/cputable.c
===================================================================
--- arch/powerpc/kernel/cputable.c.orig
+++ arch/powerpc/kernel/cputable.c
@@ -1333,7 +1333,7 @@ static struct cpu_spec __initdata cpu_sp
static struct cpu_spec the_cpu_spec;
-struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
+notrace struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
{
struct cpu_spec *s = cpu_specs;
struct cpu_spec *t = &the_cpu_spec;
@@ -1380,7 +1380,7 @@ struct cpu_spec * __init identify_cpu(un
return NULL;
}
-void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
+notrace void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
{
struct fixup_entry {
unsigned long mask;
Index: arch/powerpc/kernel/io.c
===================================================================
--- arch/powerpc/kernel/io.c.orig
+++ arch/powerpc/kernel/io.c
@@ -120,7 +120,7 @@ EXPORT_SYMBOL(_outsl_ns);
#define IO_CHECK_ALIGN(v,a) ((((unsigned long)(v)) & ((a) - 1)) == 0)
-void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
+notrace void _memset_io(volatile void __iomem *addr, int c, unsigned long n)
{
void *p = (void __force *)addr;
u32 lc = c;
Index: arch/powerpc/kernel/setup_32.c
===================================================================
--- arch/powerpc/kernel/setup_32.c.orig
+++ arch/powerpc/kernel/setup_32.c
@@ -88,7 +88,7 @@ int ucache_bsize;
* from the address that it was linked at, so we must use RELOC/PTRRELOC
* to access static data (including strings). -- paulus
*/
-unsigned long __init early_init(unsigned long dt_ptr)
+notrace unsigned long __init early_init(unsigned long dt_ptr)
{
unsigned long offset = reloc_offset();
struct cpu_spec *spec;
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-01-16 12:03 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 18:41 2.6.24-rc7-rt2 Steven Rostedt
2008-01-14 20:02 ` 2.6.24-rc7-rt2 Mark Knecht
2008-01-14 22:16 ` 2.6.24-rc7-rt2 Mariusz Kozlowski
2008-01-14 22:30 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-15 17:10 ` 2.6.24-rc7-rt2 Mariusz Kozlowski
2008-01-17 2:07 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-17 17:11 ` 2.6.24-rc7-rt2 Mariusz Kozlowski
2008-01-17 17:25 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-17 17:57 ` 2.6.24-rc7-rt2 Mariusz Kozlowski
2008-01-15 0:37 ` 2.6.24-rc7-rt2 S.Çağlar Onur
2008-01-16 3:50 ` 2.6.24-rc7-rt2 Valdis.Kletnieks
2008-01-16 4:04 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-16 6:23 ` 2.6.24-rc7-rt2 Valdis.Kletnieks
2008-01-16 14:12 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-16 16:22 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-21 11:31 ` 2.6.24-rc7-rt2 Esben Nielsen
2008-01-21 12:49 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-27 21:51 ` 2.6.24-rc7-rt2 Esben Nielsen
2008-01-28 2:32 ` 2.6.24-rc7-rt2 Stefan Monnier
2008-01-16 13:17 ` 2.6.24-rc7-rt2 Alan Cox
2008-01-16 4:01 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-16 7:12 ` 2.6.24-rc7-rt2 S.Çağlar Onur
2008-01-16 10:11 ` 2.6.24-rc7-rt2 S.Çağlar Onur
2008-01-17 2:20 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-15 3:44 ` 2.6.24-rc7-rt2: WARNING: at include/linux/rcupreempt.h:110 rcu_enter_nohz() Mike Galbraith
2008-01-15 16:27 ` 2.6.24-rc7-rt2 Luotao Fu
2008-01-15 18:06 ` 2.6.24-rc7-rt2 Steven Rostedt
2008-01-15 20:04 ` 2.6.24-rc7-rt2 Luotao Fu
2008-01-16 12:03 ` Luotao Fu [this message]
2008-01-17 3:26 ` 2.6.24-rc7-rt2 [PATCH] latency tracer fix for ppc32 Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080116120307.GI5859@pengutronix.de \
--to=l.fu@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.