s390/setup: diag 318: refactor struct
authorCollin Walling <walling@linux.ibm.com>
Mon, 22 Jun 2020 15:46:35 +0000 (11:46 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 23 Jun 2020 07:16:48 +0000 (09:16 +0200)
The diag 318 struct introduced in include/asm/diag.h can be
reused in KVM, so let's condense the version code fields in the
diag318_info struct for easier usage and simplify it until we
can determine how the data should be formatted.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20200622154636.5499-2-walling@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/diag.h
arch/s390/kernel/setup.c

index 0036eab14391d35854a9540c5a1d64033f3eab1c..ca8f85b53a902f2368129d0008828b4ec1b7da8a 100644 (file)
@@ -298,10 +298,8 @@ struct diag26c_mac_resp {
 union diag318_info {
        unsigned long val;
        struct {
-               unsigned int cpnc : 8;
-               unsigned int cpvc_linux : 24;
-               unsigned char cpvc_distro[3];
-               unsigned char zero;
+               unsigned long cpnc : 8;
+               unsigned long cpvc : 56;
        };
 };
 
index 5853c9872dfebf7d8f328975f647eab3d2b57429..878cacfc9c3ea9b98651c14ca2da967a6ba60788 100644 (file)
@@ -1021,8 +1021,7 @@ static void __init setup_control_program_code(void)
 {
        union diag318_info diag318_info = {
                .cpnc = CPNC_LINUX,
-               .cpvc_linux = 0,
-               .cpvc_distro = {0},
+               .cpvc = 0,
        };
 
        if (!sclp.has_diag318)