Skip to content

Commit c3a589f

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/boot: Fix ESSA detection
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: 468a3bc ("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>
1 parent 173767c commit c3a589f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/boot/startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int cmma_test_essa(void)
8686
: [reg1] "=&d" (reg1),
8787
[reg2] "=&a" (reg2),
8888
[rc] "+&d" (rc),
89-
[tmp] "=&d" (tmp),
89+
[tmp] "+&d" (tmp),
9090
"+Q" (get_lowcore()->program_new_psw),
9191
"=Q" (old)
9292
: [psw_old] "a" (&old),

0 commit comments

Comments
 (0)