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

Segher Boessenkool segher at kernel.crashing.org
Thu Dec 1 00:09:20 EST 2011


> +#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.


Segher



More information about the Linuxppc-dev mailing list