aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/char/zcore.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c
index bbbd14e9d48..047dd92ae80 100644
--- a/drivers/s390/char/zcore.c
+++ b/drivers/s390/char/zcore.c
@@ -223,12 +223,10 @@ static int __init init_cpu_info(enum arch_id arch)
223 /* get info for boot cpu from lowcore, stored in the HSA */ 223 /* get info for boot cpu from lowcore, stored in the HSA */
224 224
225 sa = kmalloc(sizeof(*sa), GFP_KERNEL); 225 sa = kmalloc(sizeof(*sa), GFP_KERNEL);
226 if (!sa) { 226 if (!sa)
227 ERROR_MSG("kmalloc failed: %s: %i\n",__func__, __LINE__);
228 return -ENOMEM; 227 return -ENOMEM;
229 }
230 if (memcpy_hsa_kernel(sa, sys_info.sa_base, sys_info.sa_size) < 0) { 228 if (memcpy_hsa_kernel(sa, sys_info.sa_base, sys_info.sa_size) < 0) {
231 ERROR_MSG("could not copy from HSA\n"); 229 TRACE("could not copy from HSA\n");
232 kfree(sa); 230 kfree(sa);
233 return -EIO; 231 return -EIO;
234 } 232 }
@@ -511,6 +509,8 @@ static void __init set_s390x_lc_mask(union save_area *map)
511 */ 509 */
512static int __init sys_info_init(enum arch_id arch) 510static int __init sys_info_init(enum arch_id arch)
513{ 511{
512 int rc;
513
514 switch (arch) { 514 switch (arch) {
515 case ARCH_S390X: 515 case ARCH_S390X:
516 MSG("DETECTED 'S390X (64 bit) OS'\n"); 516 MSG("DETECTED 'S390X (64 bit) OS'\n");
@@ -529,10 +529,9 @@ static int __init sys_info_init(enum arch_id arch)
529 return -EINVAL; 529 return -EINVAL;
530 } 530 }
531 sys_info.arch = arch; 531 sys_info.arch = arch;
532 if (init_cpu_info(arch)) { 532 rc = init_cpu_info(arch);
533 ERROR_MSG("get cpu info failed\n"); 533 if (rc)
534 return -ENOMEM; 534 return rc;
535 }
536 sys_info.mem_size = real_memory_size; 535 sys_info.mem_size = real_memory_size;
537 536
538 return 0; 537 return 0;
@@ -544,12 +543,12 @@ static int __init check_sdias(void)
544 543
545 rc = sclp_sdias_blk_count(); 544 rc = sclp_sdias_blk_count();
546 if (rc < 0) { 545 if (rc < 0) {
547 ERROR_MSG("Could not determine HSA size\n"); 546 TRACE("Could not determine HSA size\n");
548 return rc; 547 return rc;
549 } 548 }
550 act_hsa_size = (rc - 1) * PAGE_SIZE; 549 act_hsa_size = (rc - 1) * PAGE_SIZE;
551 if (act_hsa_size < ZFCPDUMP_HSA_SIZE) { 550 if (act_hsa_size < ZFCPDUMP_HSA_SIZE) {
552 ERROR_MSG("HSA size too small: %i\n", act_hsa_size); 551 TRACE("HSA size too small: %i\n", act_hsa_size);
553 return -EINVAL; 552 return -EINVAL;
554 } 553 }
555 return 0; 554 return 0;
@@ -590,16 +589,12 @@ static int __init zcore_init(void)
590 goto fail; 589 goto fail;
591 590
592 rc = check_sdias(); 591 rc = check_sdias();
593 if (rc) { 592 if (rc)
594 ERROR_MSG("Dump initialization failed\n");
595 goto fail; 593 goto fail;
596 }
597 594
598 rc = memcpy_hsa_kernel(&arch, __LC_AR_MODE_ID, 1); 595 rc = memcpy_hsa_kernel(&arch, __LC_AR_MODE_ID, 1);
599 if (rc) { 596 if (rc)
600 ERROR_MSG("sdial memcpy for arch id failed\n");
601 goto fail; 597 goto fail;
602 }
603 598
604#ifndef __s390x__ 599#ifndef __s390x__
605 if (arch == ARCH_S390X) { 600 if (arch == ARCH_S390X) {
@@ -610,10 +605,8 @@ static int __init zcore_init(void)
610#endif 605#endif
611 606
612 rc = sys_info_init(arch); 607 rc = sys_info_init(arch);
613 if (rc) { 608 if (rc)
614 ERROR_MSG("arch init failed\n");
615 goto fail; 609 goto fail;
616 }
617 610
618 zcore_header_init(arch, &zcore_header); 611 zcore_header_init(arch, &zcore_header);
619 612