[PATCH 5/6] powerpc/boot: Add mfdcrx

Tony Breeds tony at bakeyournoodle.com
Thu Dec 1 10:30:27 EST 2011


On Wed, Nov 30, 2011 at 02:09:20PM +0100, Segher Boessenkool wrote:
> >+#define mfdcrx(rn) \
> >+	({	\
> >+		unsigned long rval; \
> >+		asm volatile("mfdcrx %0,%1" : "=r"(rval) : "g"(rn)); \
> >+		rval; \
> >+	})
> 
> "g" is never correct on PowerPC, you want "r" here.  You can write
> this as a static inline btw, you only need the #define stuff when
> there is an "i" constraint involved.

Okay I'll change it to "i", mostly I used a #define to match the style
of m[tf]dcr.  To be honnest I didn't know about the issue with "i"
constraints and static inlines.

Yours Tony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20111201/c8f6d96a/attachment.pgp>


More information about the Linuxppc-dev mailing list