016a62
From 19b96c7f412b9b8d893ec9ebd2603565d6afa178 Mon Sep 17 00:00:00 2001
016a62
From: Thomas Huth <thuth@redhat.com>
016a62
Date: Mon, 14 Oct 2019 10:06:31 +0100
016a62
Subject: [PATCH 06/21] s390-bios: decouple cio setup from virtio
016a62
016a62
RH-Author: Thomas Huth <thuth@redhat.com>
016a62
Message-id: <20191014100645.22862-4-thuth@redhat.com>
016a62
Patchwork-id: 91776
016a62
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH v2 03/17] s390-bios: decouple cio setup from virtio
016a62
Bugzilla: 1664376
016a62
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
016a62
RH-Acked-by: David Hildenbrand <david@redhat.com>
016a62
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
016a62
016a62
From: "Jason J. Herne" <jjherne@linux.ibm.com>
016a62
016a62
Move channel i/o setup code out to a separate function. This decouples cio
016a62
setup from the virtio code path and allows us to make use of it for booting
016a62
dasd devices.
016a62
016a62
Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com>
016a62
Acked-by: Halil Pasic <pasic@linux.vnet.ibm.com>
016a62
Reviewed-by: Collin Walling <walling@linux.ibm.com>
016a62
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
016a62
Reviewed-by: Thomas Huth <thuth@redhat.com>
016a62
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
016a62
Message-Id: <1554388475-18329-3-git-send-email-jjherne@linux.ibm.com>
016a62
Signed-off-by: Thomas Huth <thuth@redhat.com>
016a62
(cherry picked from commit 87f910c142d5589ef937ac216f92c6dcddae955e)
016a62
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
016a62
---
016a62
 pc-bios/s390-ccw/main.c | 20 +++++++++++++-------
016a62
 1 file changed, 13 insertions(+), 7 deletions(-)
016a62
016a62
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
016a62
index 544851d..e82fe2c 100644
016a62
--- a/pc-bios/s390-ccw/main.c
016a62
+++ b/pc-bios/s390-ccw/main.c
016a62
@@ -99,6 +99,18 @@ static void menu_setup(void)
016a62
     }
016a62
 }
016a62
 
016a62
+/*
016a62
+ * Initialize the channel I/O subsystem so we can talk to our ipl/boot device.
016a62
+ */
016a62
+static void css_setup(void)
016a62
+{
016a62
+    /*
016a62
+     * Unconditionally enable mss support. In every sane configuration this
016a62
+     * will succeed; and even if it doesn't, stsch_err() can handle it.
016a62
+     */
016a62
+    enable_mss_facility();
016a62
+}
016a62
+
016a62
 static void virtio_setup(void)
016a62
 {
016a62
     Schib schib;
016a62
@@ -109,13 +121,6 @@ static void virtio_setup(void)
016a62
     VDev *vdev = virtio_get_device();
016a62
     QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS;
016a62
 
016a62
-    /*
016a62
-     * We unconditionally enable mss support. In every sane configuration,
016a62
-     * this will succeed; and even if it doesn't, stsch_err() can deal
016a62
-     * with the consequences.
016a62
-     */
016a62
-    enable_mss_facility();
016a62
-
016a62
     sclp_get_loadparm_ascii(loadparm_str);
016a62
     memcpy(ldp + 10, loadparm_str, LOADPARM_LEN);
016a62
     sclp_print(ldp);
016a62
@@ -168,6 +173,7 @@ static void virtio_setup(void)
016a62
 int main(void)
016a62
 {
016a62
     sclp_setup();
016a62
+    css_setup();
016a62
     virtio_setup();
016a62
 
016a62
     zipl_load(); /* no return */
016a62
-- 
016a62
1.8.3.1
016a62