powerpc/ftrace: Fix constraint to be early clobber
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 15 May 2009 04:33:54 +0000 (04:33 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 18 May 2009 05:19:05 +0000 (15:19 +1000)
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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/ftrace.c

index 5b078ee391fcb7dcbe4d012d2081104ca1e070fb..2d182f119d1ddd28bc185b9c56d2bdbbdcfab560 100644 (file)
@@ -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"
        );
This page took 0.024965 seconds and 5 git commands to generate.