Re: [PATCH 06/10] powerpc: remove GCC version check for UPD_CONSTR

From: Michael Ellerman
Date: Sat Sep 11 2021 - 06:44:12 EST


Nathan Chancellor <nathan@xxxxxxxxxx> writes:
> On 9/10/2021 4:40 PM, Nick Desaulniers wrote:
>> Now that GCC 5.1 is the minimum supported version, we can drop this
>> workaround for older versions of GCC. This adversely affected clang,
>> too.
>>
>> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
>> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
>> Cc: Paul Mackerras <paulus@xxxxxxxxx>
>> Cc: Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx>
>> Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
>> Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
>> Signed-off-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
>> ---
>> arch/powerpc/include/asm/asm-const.h | 10 ----------
>> 1 file changed, 10 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/asm-const.h b/arch/powerpc/include/asm/asm-const.h
>> index 0ce2368bd20f..dbfa5e1e3198 100644
>> --- a/arch/powerpc/include/asm/asm-const.h
>> +++ b/arch/powerpc/include/asm/asm-const.h
>> @@ -12,16 +12,6 @@
>> # define ASM_CONST(x) __ASM_CONST(x)
>> #endif
>>
>> -/*
>> - * Inline assembly memory constraint
>> - *
>> - * GCC 4.9 doesn't properly handle pre update memory constraint "m<>"
>> - *
>> - */
>> -#if defined(GCC_VERSION) && GCC_VERSION < 50000
>> -#define UPD_CONSTR ""
>> -#else
>> #define UPD_CONSTR "<>"
>> -#endif
>
> The only reason this exists is because of commit 592bbe9c505d
> ("powerpc/uaccess: Don't use "m<>" constraint with GCC 4.9"). It is
> probably just worth sinking "<>" into all of the callsites and removing
> UPD_CONSTR.

Yeah that would be great if you're doing a v2. Or we can do it as a
follow-up.

cheers