summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2025-02-18 12:11:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-27 04:30:22 -0800
commitb720facbe096a6bce980c6577ef65e3c87131766 (patch)
tree72011a1c8b5faf809b91231b947e5c049d5ad92c /arch
parent0841885c73c46c6272fb6a3f13c6a5b8c33f8644 (diff)
downloadlinux-b720facbe096a6bce980c6577ef65e3c87131766.tar.gz
linux-b720facbe096a6bce980c6577ef65e3c87131766.tar.bz2
linux-b720facbe096a6bce980c6577ef65e3c87131766.zip
s390/boot: Fix ESSA detection
commit c3a589fd9fcbf295a7402a4b188dc9277d505f4f upstream. The cmma_test_essa() inline assembly uses tmp as input and output, however tmp is specified as output only, which allows the compiler to optimize the initialization of tmp away. Therefore the ESSA detection may or may not work depending on previous contents of the register that the compiler selected for tmp. Fix this by using the correct constraint modifier. Fixes: 468a3bc2b7b9 ("s390/cmma: move parsing of cmma kernel parameter to early boot code") Cc: stable@vger.kernel.org Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/boot/startup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index c2ee0745f59e..7b69be63d5d2 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -75,7 +75,7 @@ static int cmma_test_essa(void)
: [reg1] "=&d" (reg1),
[reg2] "=&a" (reg2),
[rc] "+&d" (rc),
- [tmp] "=&d" (tmp),
+ [tmp] "+&d" (tmp),
"+Q" (get_lowcore()->program_new_psw),
"=Q" (old)
: [psw_old] "a" (&old),