s390/mm: make use of atomic_fetch_xor()
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 17 Mar 2023 13:51:41 +0000 (14:51 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 20 Mar 2023 10:12:49 +0000 (11:12 +0100)
commitd28d86a07dbca4b6e33032196ef4a9a7121181b4
treeadb2709f82c814ccfb3dea39f903317c1c6b77aa
parent038c5bedbc313b55f66b26fda5a7808727c2f177
s390/mm: make use of atomic_fetch_xor()

Make use of atomic_fetch_xor() instead of an atomic_cmpxchg() loop to
implement atomic_xor_bits() (aka atomic_xor_return()). This makes the C
code more readable and in addition generates better code, since for z196
and newer a single lax instruction is generated instead of a cmpxchg()
loop.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/mm/pgalloc.c