Skip to content

Commit a23816f

Browse files
collinwallingborntraeger
authored andcommitted
s390/setup: diag 318: refactor struct
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 <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Reviewed-by: Janosch Frank <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Borntraeger <[email protected]>
1 parent b3a9e3b commit a23816f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

arch/s390/include/asm/diag.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,8 @@ struct diag26c_mac_resp {
298298
union diag318_info {
299299
unsigned long val;
300300
struct {
301-
unsigned int cpnc : 8;
302-
unsigned int cpvc_linux : 24;
303-
unsigned char cpvc_distro[3];
304-
unsigned char zero;
301+
unsigned long cpnc : 8;
302+
unsigned long cpvc : 56;
305303
};
306304
};
307305

arch/s390/kernel/setup.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,8 +1021,7 @@ static void __init setup_control_program_code(void)
10211021
{
10221022
union diag318_info diag318_info = {
10231023
.cpnc = CPNC_LINUX,
1024-
.cpvc_linux = 0,
1025-
.cpvc_distro = {0},
1024+
.cpvc = 0,
10261025
};
10271026

10281027
if (!sclp.has_diag318)

0 commit comments

Comments
 (0)