• Paul Burton's avatar
    MIPS: atomic: Deduplicate 32b & 64b read, set, xchg, cmpxchg · 1da7bce8
    Paul Burton authored
    Remove the remaining duplication between 32b & 64b in asm/atomic.h by
    making use of an ATOMIC_OPS() macro to generate:
    
      - atomic_read()/atomic64_read()
      - atomic_set()/atomic64_set()
      - atomic_cmpxchg()/atomic64_cmpxchg()
      - atomic_xchg()/atomic64_xchg()
    
    This is consistent with the way all other functions in asm/atomic.h are
    generated, and ensures consistency between the 32b & 64b functions.
    
    Of note is that this results in the above now being static inline
    functions rather than macros.
    Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
    Cc: linux-mips@vger.kernel.org
    Cc: Huacai Chen <chenhc@lemote.com>
    Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
    Cc: linux-kernel@vger.kernel.org
    1da7bce8
atomic.h 7.89 KB