]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
MIPS: atomic: Deduplicate 32b & 64b read, set, xchg, cmpxchg
authorPaul Burton <paul.burton@mips.com>
Tue, 1 Oct 2019 21:53:24 +0000 (21:53 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 7 Oct 2019 16:42:36 +0000 (09:42 -0700)
commit1da7bce8591d58bf2a442b0324659af7390401c2
tree08dffcb248f3d595cc978b8b2fac39db31a0db2d
parent40e784b4d4bc31dee5f1db6a20287777d3aaa4dc
MIPS: atomic: Deduplicate 32b & 64b read, set, xchg, cmpxchg

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: Paul 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
arch/mips/include/asm/atomic.h