[PATCH kvm-unit-tests 2/2] s390x: diag288: Improve readability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use a more descriptive name instead of the magic number 424 (address of
restart new PSW in the lowcore).

In addition, add a comment to make it more obvious what the ASM snippet
does.

Signed-off-by: Nico Boehr <nrb@xxxxxxxxxxxxx>
---
 s390x/diag288.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/s390x/diag288.c b/s390x/diag288.c
index da7b06c365bf..a2c263e38338 100644
--- a/s390x/diag288.c
+++ b/s390x/diag288.c
@@ -94,12 +94,15 @@ static void test_bite(void)
 	/* Arm watchdog */
 	lc->restart_new_psw.mask = extract_psw_mask() & ~PSW_MASK_EXT;
 	diag288(CODE_INIT, 15, ACTION_RESTART);
+	/* Wait for restart interruption */
 	asm volatile("		larl	0, 1f\n"
-		     "		stg	0, 424\n"
+		     "		stg	0, %[restart_new_psw]\n"
 		     "0:	nop\n"
 		     "		j	0b\n"
 		     "1:"
-		     : : : "0");
+		     :
+		     : [restart_new_psw] "T" (lc->restart_new_psw.addr)
+		     : "0");
 	report_pass("restart");
 }
 
-- 
2.31.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux