* [PATCH] powerpc/ftrace: fix constraint to be early clobber
@ 2009-05-15 14:33 Steven Rostedt
2009-05-15 22:27 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2009-05-15 14:33 UTC (permalink / raw)
To: LKML, linuxppc-dev; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
After upgrading my distcc boxes from gcc 4.2.2 to 4.4.0, the function
graph tracer broke. This was discovered on my x86 boxes.
The issue is that gcc used the same register for an output as it did for
an input in an asm statement. I first thought this was a bug in gcc and
reported it. I was notified that gcc was correct and that the output had
to be flagged as an "early clobber".
I noticed that powerpc had the same issue and this patch fixes it.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 70e2a73..68fd74e 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -594,7 +594,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
PPC_LONG "2b,4b\n"
".previous"
- : [old] "=r" (old), [faulted] "=r" (faulted)
+ : [old] "=&r" (old), [faulted] "=r" (faulted)
: [parent] "r" (parent), [return_hooker] "r" (return_hooker)
: "memory"
);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/ftrace: fix constraint to be early clobber
2009-05-15 14:33 [PATCH] powerpc/ftrace: fix constraint to be early clobber Steven Rostedt
@ 2009-05-15 22:27 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2009-05-15 22:27 UTC (permalink / raw)
To: Steven Rostedt
Cc: linuxppc-dev, Ingo Molnar, LKML, Andrew Morton, Frederic Weisbecker
On Fri, 2009-05-15 at 10:33 -0400, Steven Rostedt wrote:
> After upgrading my distcc boxes from gcc 4.2.2 to 4.4.0, the function
> graph tracer broke. This was discovered on my x86 boxes.
>
> The issue is that gcc used the same register for an output as it did for
> an input in an asm statement. I first thought this was a bug in gcc and
> reported it. I was notified that gcc was correct and that the output had
> to be flagged as an "early clobber".
>
> I noticed that powerpc had the same issue and this patch fixes it.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Ack. You merge this or I do ?
Cheers,
Ben.
> diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
> index 70e2a73..68fd74e 100644
> --- a/arch/powerpc/kernel/ftrace.c
> +++ b/arch/powerpc/kernel/ftrace.c
> @@ -594,7 +594,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
> PPC_LONG "2b,4b\n"
> ".previous"
>
> - : [old] "=r" (old), [faulted] "=r" (faulted)
> + : [old] "=&r" (old), [faulted] "=r" (faulted)
> : [parent] "r" (parent), [return_hooker] "r" (return_hooker)
> : "memory"
> );
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-15 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-15 14:33 [PATCH] powerpc/ftrace: fix constraint to be early clobber Steven Rostedt
2009-05-15 22:27 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).