s390/processor: Use bitop functions for cpu flag helper functions
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 21 Mar 2025 12:22:15 +0000 (13:22 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 31 Mar 2025 10:20:39 +0000 (12:20 +0200)
commit3232f1c8086506c5728f46e5a0d59b860c303b8d
tree4b6c4676d61af07a6ec7f19aabe92b3949d6b7a5
parentb9be1bee2f271ed3c68e0bd3ec099951b656447b
s390/processor: Use bitop functions for cpu flag helper functions

Use bitop functions to implement cpu flag helper functions. This way
it is guaranteed that bits cannot get lost if modified in different
contexts on a cpu.

E.g. if process context is interrupted in the middle of a
read-modify-write sequence while modifying cpu flags, and within
interrupt context cpu flags are also modified, bits can get lost.

There is currently no code which is doing this, however upcoming code
could potentially run into this problem.

Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/processor.h