diff mbox series

[5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c

Message ID 20200715094045.381984-6-frankja@linux.ibm.com
State New
Headers show
Series pc-bios: s390x: Cleanup part 2 | expand

Commit Message

Janosch Frank July 15, 2020, 9:40 a.m. UTC
Let's replace some more constant offsets with references into the
lowcore for better readability.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 pc-bios/s390-ccw/dasd-ipl.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
index 0543334ed4..9ab9a0fa12 100644
--- a/pc-bios/s390-ccw/dasd-ipl.c
+++ b/pc-bios/s390-ccw/dasd-ipl.c
@@ -120,8 +120,8 @@  static void run_readipl(SubChannelId schid, uint16_t cutype)
  */
 static void check_ipl1(void)
 {
-    Ccw0 *ccwread = (Ccw0 *)0x08;
-    Ccw0 *ccwtic = (Ccw0 *)0x10;
+    Ccw0 *ccwread = (Ccw0 *) &lowcore->ccw1;
+    Ccw0 *ccwtic = (Ccw0 *) &lowcore->ccw2;
 
     if (ccwread->cmd_code != CCW_CMD_DASD_READ ||
         ccwtic->cmd_code != CCW_CMD_TIC) {
@@ -143,15 +143,15 @@  static void check_ipl2(uint32_t ipl2_addr)
 
 static uint32_t read_ipl2_addr(void)
 {
-    Ccw0 *ccwtic = (Ccw0 *)0x10;
+    Ccw0 *ccwtic = (Ccw0 *)&lowcore->ccw2;
 
     return ccwtic->cda;
 }
 
 static void ipl1_fixup(void)
 {
-    Ccw0 *ccwSeek = (Ccw0 *) 0x08;
-    Ccw0 *ccwSearchID = (Ccw0 *) 0x10;
+    Ccw0 *ccwSeek = (Ccw0 *) &lowcore->ccw1;
+    Ccw0 *ccwSearchID = (Ccw0 *) &lowcore->ccw2;
     Ccw0 *ccwSearchTic = (Ccw0 *) 0x18;
     Ccw0 *ccwRead = (Ccw0 *) 0x20;
     CcwSeekData *seekData = (CcwSeekData *) 0x30;