Paul Burton 40e784b4d4
MIPS: atomic: Unify 32b & 64b sub_if_positive
Unify the definitions of atomic_sub_if_positive() &
atomic64_sub_if_positive() using a macro like we do for most other
atomic functions. This allows us to share the implementation ensuring
consistency between the two. Notably this provides the appropriate
loongson3_war barriers in the atomic64_sub_if_positive() case which were
previously missing.

The code is rearranged a little to handle the !kernel_uses_llsc case
first in order to de-indent the LL/SC case & allow us not to go over 80
characters per line.

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
2019-10-07 09:42:34 -07:00
..
2019-09-22 09:30:30 -07:00
2019-09-22 09:30:30 -07:00
2019-08-09 15:46:29 -07:00
2019-08-23 14:47:21 +01:00
2019-06-08 13:09:31 -07:00
2019-06-08 13:09:31 -07:00
2019-08-23 14:47:18 +01:00
2019-06-08 13:09:31 -07:00
2019-07-23 14:33:51 -07:00