• Will Deacon's avatar
    arm64: atomics: Use K constraint when toolchain appears to support it · 03adcbd9
    Will Deacon authored
    The 'K' constraint is a documented AArch64 machine constraint supported
    by GCC for matching integer constants that can be used with a 32-bit
    logical instruction. Unfortunately, some released compilers erroneously
    accept the immediate '4294967295' for this constraint, which is later
    refused by GAS at assembly time. This had led us to avoid the use of
    the 'K' constraint altogether.
    
    Instead, detect whether the compiler is up to the job when building the
    kernel and pass the 'K' constraint to our 32-bit atomic macros when it
    appears to be supported.
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    03adcbd9
atomic_ll_sc.h 10.5 KB