Re: More LTTng patches

Mathieu Desnoyers <[email protected]>
Newsgroups gmane.linux.kernel.tracing
Message-ID <20061120182553.GD7328@Krystal>
* Sergei Shtylyov ([email protected]) wrote:
> Hello.
> 
> Mathieu Desnoyers wrote:
> 
> >>Source: MontaVista Software, Inc.
> >>MR: 20036
> >>Type: Defect Fix
> >>Disposition: needs submitting to LTTng community
> >>Signed-off-by: Mark A. Greer <[email protected]>
> >>Description:
> >>   Apparently, gcc 4.2 has tighter constrainst for the 'i' asm operands
> >>   than previous gcc versions.  This patch changes a 'i' to a 'g' which
> >>   is a more relaxed constraint.
> 
> >>Index: linux-2.6.18/include/asm-powerpc/marker.h
> >>===================================================================
> >>--- linux-2.6.18.orig/include/asm-powerpc/marker.h
> >>+++ linux-2.6.18/include/asm-powerpc/marker.h
> >>@@ -40,7 +40,7 @@ struct __mark_marker {
> >>					"0:\n\t" \
> >>					"li %0,0;\n\t" \
> >>				: "=r" (condition) \
> >>-				: "i" (&__mark_c_##name)); \
> >>+				: "g" (&__mark_c_##name)); \
> >>		__mark_check_format(format, ## args); \
> >>		if (unlikely(condition)) { \
> >>			preempt_disable(); \
> 
> >I will also change it for asm-generic and asm-i386. I hope to find some
> >consistency in the way asm operands are treated across architectures.
> 
>    It looks like that issue got fixed in gcc 4.2:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27528
> 
>    The bad part is that when compiled with fixed gcc, the kernel receives 
> SIGSEGV and dies on bootup... "i" works again now. :-/
> 

Aargh...

I will commit a revert in the next release :

#       modified: include/asm-generic/marker.h
#       modified: include/asm-powerpc/marker.h

Will take a "i" operand.

asm-i386 takes a "m" operand (and uses it).

asm-ppc == asm-powerpc for this matter.

other architectures are currently using asm-generic, with the "i" operand. It is
never used inside the assembly.

Mathieu


OpenPGP public key:              http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint:     8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.