diff options
Diffstat (limited to 'arch/s390/kernel/ipl.c')
-rw-r--r-- | arch/s390/kernel/ipl.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 2f6cfd460cb6..6ffcd3203215 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -1,8 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/ipl.c | ||
3 | * ipl/reipl/dump support for Linux on s390. | 2 | * ipl/reipl/dump support for Linux on s390. |
4 | * | 3 | * |
5 | * Copyright IBM Corp. 2005,2012 | 4 | * Copyright IBM Corp. 2005, 2012 |
6 | * Author(s): Michael Holzheu <holzheu@de.ibm.com> | 5 | * Author(s): Michael Holzheu <holzheu@de.ibm.com> |
7 | * Heiko Carstens <heiko.carstens@de.ibm.com> | 6 | * Heiko Carstens <heiko.carstens@de.ibm.com> |
8 | * Volker Sameske <sameske@de.ibm.com> | 7 | * Volker Sameske <sameske@de.ibm.com> |
@@ -1528,15 +1527,12 @@ static struct shutdown_action __refdata dump_action = { | |||
1528 | 1527 | ||
1529 | static void dump_reipl_run(struct shutdown_trigger *trigger) | 1528 | static void dump_reipl_run(struct shutdown_trigger *trigger) |
1530 | { | 1529 | { |
1531 | struct { | 1530 | unsigned long ipib = (unsigned long) reipl_block_actual; |
1532 | void *addr; | 1531 | unsigned int csum; |
1533 | __u32 csum; | ||
1534 | } __packed ipib; | ||
1535 | 1532 | ||
1536 | ipib.csum = csum_partial(reipl_block_actual, | 1533 | csum = csum_partial(reipl_block_actual, reipl_block_actual->hdr.len, 0); |
1537 | reipl_block_actual->hdr.len, 0); | 1534 | mem_assign_absolute(S390_lowcore.ipib, ipib); |
1538 | ipib.addr = reipl_block_actual; | 1535 | mem_assign_absolute(S390_lowcore.ipib_checksum, csum); |
1539 | memcpy_absolute(&S390_lowcore.ipib, &ipib, sizeof(ipib)); | ||
1540 | dump_run(trigger); | 1536 | dump_run(trigger); |
1541 | } | 1537 | } |
1542 | 1538 | ||
@@ -1587,7 +1583,7 @@ static struct kset *vmcmd_kset; | |||
1587 | 1583 | ||
1588 | static void vmcmd_run(struct shutdown_trigger *trigger) | 1584 | static void vmcmd_run(struct shutdown_trigger *trigger) |
1589 | { | 1585 | { |
1590 | char *cmd, *next_cmd; | 1586 | char *cmd; |
1591 | 1587 | ||
1592 | if (strcmp(trigger->name, ON_REIPL_STR) == 0) | 1588 | if (strcmp(trigger->name, ON_REIPL_STR) == 0) |
1593 | cmd = vmcmd_on_reboot; | 1589 | cmd = vmcmd_on_reboot; |
@@ -1604,15 +1600,7 @@ static void vmcmd_run(struct shutdown_trigger *trigger) | |||
1604 | 1600 | ||
1605 | if (strlen(cmd) == 0) | 1601 | if (strlen(cmd) == 0) |
1606 | return; | 1602 | return; |
1607 | do { | 1603 | __cpcmd(cmd, NULL, 0, NULL); |
1608 | next_cmd = strchr(cmd, '\n'); | ||
1609 | if (next_cmd) { | ||
1610 | next_cmd[0] = 0; | ||
1611 | next_cmd += 1; | ||
1612 | } | ||
1613 | __cpcmd(cmd, NULL, 0, NULL); | ||
1614 | cmd = next_cmd; | ||
1615 | } while (cmd != NULL); | ||
1616 | } | 1604 | } |
1617 | 1605 | ||
1618 | static int vmcmd_init(void) | 1606 | static int vmcmd_init(void) |