aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2015-06-26 06:10:49 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-06-29 04:13:11 -0400
commit1af135a1e70ee6e31b5c265c769448984d221cf2 (patch)
tree1c81a35a35f5984b5aa887d8f94ba71f5ae4bfe3 /arch/s390/kernel
parent1592a8e456436024b6c662f423ce672e672169bb (diff)
s390/kdump: fix compile for !SMP
Fix this compile error: arch/s390/kernel/setup.c:875:2: error: implicit declaration of function 'smp_save_dump_cpus' Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/smp.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 24ad89df7e5f..6f54c175f5c9 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -560,6 +560,25 @@ static void __smp_store_cpu_state(struct save_area_ext *sa_ext, u16 address,
560 memblock_free(vx_sa, PAGE_SIZE); 560 memblock_free(vx_sa, PAGE_SIZE);
561} 561}
562 562
563int smp_store_status(int cpu)
564{
565 unsigned long vx_sa;
566 struct pcpu *pcpu;
567
568 pcpu = pcpu_devices + cpu;
569 if (__pcpu_sigp_relax(pcpu->address, SIGP_STOP_AND_STORE_STATUS,
570 0, NULL) != SIGP_CC_ORDER_CODE_ACCEPTED)
571 return -EIO;
572 if (!MACHINE_HAS_VX)
573 return 0;
574 vx_sa = __pa(pcpu->lowcore->vector_save_area_addr);
575 __pcpu_sigp_relax(pcpu->address, SIGP_STORE_ADDITIONAL_STATUS,
576 vx_sa, NULL);
577 return 0;
578}
579
580#endif /* CONFIG_CRASH_DUMP */
581
563/* 582/*
564 * Collect CPU state of the previous, crashed system. 583 * Collect CPU state of the previous, crashed system.
565 * There are four cases: 584 * There are four cases:
@@ -589,6 +608,7 @@ static void __smp_store_cpu_state(struct save_area_ext *sa_ext, u16 address,
589 */ 608 */
590void __init smp_save_dump_cpus(void) 609void __init smp_save_dump_cpus(void)
591{ 610{
611#ifdef CONFIG_CRASH_DUMP
592 int addr, cpu, boot_cpu_addr, max_cpu_addr; 612 int addr, cpu, boot_cpu_addr, max_cpu_addr;
593 struct save_area_ext *sa_ext; 613 struct save_area_ext *sa_ext;
594 bool is_boot_cpu; 614 bool is_boot_cpu;
@@ -629,30 +649,8 @@ void __init smp_save_dump_cpus(void)
629 } 649 }
630 diag308_reset(); 650 diag308_reset();
631 pcpu_set_smt(0); 651 pcpu_set_smt(0);
632}
633
634int smp_store_status(int cpu)
635{
636 unsigned long vx_sa;
637 struct pcpu *pcpu;
638
639 pcpu = pcpu_devices + cpu;
640 if (__pcpu_sigp_relax(pcpu->address, SIGP_STOP_AND_STORE_STATUS,
641 0, NULL) != SIGP_CC_ORDER_CODE_ACCEPTED)
642 return -EIO;
643 if (!MACHINE_HAS_VX)
644 return 0;
645 vx_sa = __pa(pcpu->lowcore->vector_save_area_addr);
646 __pcpu_sigp_relax(pcpu->address, SIGP_STORE_ADDITIONAL_STATUS,
647 vx_sa, NULL);
648 return 0;
649}
650
651#else
652void smp_save_dump_cpus(void)
653{
654}
655#endif /* CONFIG_CRASH_DUMP */ 652#endif /* CONFIG_CRASH_DUMP */
653}
656 654
657void smp_cpu_set_polarization(int cpu, int val) 655void smp_cpu_set_polarization(int cpu, int val)
658{ 656{