Skip to content
Snippets Groups Projects
Commit b720facb authored by Heiko Carstens's avatar Heiko Carstens Committed by Greg Kroah-Hartman
Browse files

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: 468a3bc2 ("s390/cmma: move parsing of cmma kernel parameter to early boot code")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0841885c
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ static int cmma_test_essa(void) ...@@ -75,7 +75,7 @@ static int cmma_test_essa(void)
: [reg1] "=&d" (reg1), : [reg1] "=&d" (reg1),
[reg2] "=&a" (reg2), [reg2] "=&a" (reg2),
[rc] "+&d" (rc), [rc] "+&d" (rc),
[tmp] "=&d" (tmp), [tmp] "+&d" (tmp),
"+Q" (get_lowcore()->program_new_psw), "+Q" (get_lowcore()->program_new_psw),
"=Q" (old) "=Q" (old)
: [psw_old] "a" (&old), : [psw_old] "a" (&old),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment