Subject: Re: [PATCH 1/3] powerpc/uaccess: Don't use "m<>" constraint with GCC 4.9

From: Segher Boessenkool <[email-masked]>
Date: Mon, 19 Oct 2020 15:10:45 -0500

On Mon, Oct 19, 2020 at 12:12:46PM +0000, Christophe Leroy wrote:
> GCC 4.9 sometimes fails to build with "m<>" constraint in
> inline assembly.

> --- a/arch/powerpc/include/asm/uaccess.h
> +++ b/arch/powerpc/include/asm/uaccess.h
> @@ -223,7 +223,7 @@ do {								\
>  		"1:	" op "%U1%X1 %0,%1	# put_user\n"	\
>  		EX_TABLE(1b, %l2)				\
>  		:						\
> -		: "r" (x), "m<>" (*addr)				\
> +		: "r" (x), "m"UPD_CONSTR (*addr)		\
>  		:						\
>  		: label)
>  
> @@ -294,7 +294,7 @@ extern long __get_user_bad(void);
>  		".previous\n"				\
>  		EX_TABLE(1b, 3b)			\
>  		: "=r" (err), "=r" (x)			\
> -		: "m<>" (*addr), "i" (-EFAULT), "0" (err))
> +		: "m"UPD_CONSTR (*addr), "i" (-EFAULT), "0" (err))

Wow, ugly!  But these are the only two places that use this, so

Acked-by: Segher Boessenkool  <[email-masked]>

I just hope that we get rid of 4.9 before we would use this a lot more ;-)

Segher