]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/traps: Fix test_monitor_call() inline assembly
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 25 Feb 2025 09:53:10 +0000 (10:53 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 4 Mar 2025 16:15:18 +0000 (17:15 +0100)
commit5623bc23a1cb9f9a9470fa73b3a20321dc4c4870
treef0015e66389149439da2c99a37ce3206aefefd40
parentc3a589fd9fcbf295a7402a4b188dc9277d505f4f
s390/traps: Fix test_monitor_call() inline assembly

The test_monitor_call() inline assembly uses the xgr instruction, which
also modifies the condition code, to clear a register. However the clobber
list of the inline assembly does not specify that the condition code is
modified, which may lead to incorrect code generation.

Use the lhi instruction instead to clear the register without that the
condition code is modified. Furthermore this limits clearing to the lower
32 bits of val, since its type is int.

Fixes: 17248ea03674 ("s390: fix __EMIT_BUG() macro")
Cc: stable@vger.kernel.org
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/traps.c