summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2015-06-26 12:10:49 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-06-29 10:13:11 +0200
commit1af135a1e70ee6e31b5c265c769448984d221cf2 (patch)
tree1c81a35a35f5984b5aa887d8f94ba71f5ae4bfe3
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>
-rw-r--r--arch/s390/include/asm/smp.h1
-rw-r--r--arch/s390/kernel/smp.c44
2 files changed, 22 insertions, 23 deletions
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index 409830692862..5df26b11cf47 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -55,6 +55,7 @@ static inline int smp_store_status(int cpu) { return 0; }
static inline int smp_vcpu_scheduled(int cpu) { return 1; }
static inline void smp_yield_cpu(int cpu) { }
static inline void smp_fill_possible_mask(void) { }
+static inline void smp_save_dump_cpus(void) { }
#endif /* CONFIG_SMP */
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,
memblock_free(vx_sa, PAGE_SIZE);
}
+int smp_store_status(int cpu)
+{
+ unsigned long vx_sa;
+ struct pcpu *pcpu;
+
+ pcpu = pcpu_devices + cpu;
+ if (__pcpu_sigp_relax(pcpu->address, SIGP_STOP_AND_STORE_STATUS,
+ 0, NULL) != SIGP_CC_ORDER_CODE_ACCEPTED)
+ return -EIO;
+ if (!MACHINE_HAS_VX)
+ return 0;
+ vx_sa = __pa(pcpu->lowcore->vector_save_area_addr);
+ __pcpu_sigp_relax(pcpu->address, SIGP_STORE_ADDITIONAL_STATUS,
+ vx_sa, NULL);
+ return 0;
+}
+
+#endif /* CONFIG_CRASH_DUMP */
+
/*
* Collect CPU state of the previous, crashed system.
* There are four cases:
@@ -589,6 +608,7 @@ static void __smp_store_cpu_state(struct save_area_ext *sa_ext, u16 address,
*/
void __init smp_save_dump_cpus(void)
{
+#ifdef CONFIG_CRASH_DUMP
int addr, cpu, boot_cpu_addr, max_cpu_addr;
struct save_area_ext *sa_ext;
bool is_boot_cpu;
@@ -629,30 +649,8 @@ void __init smp_save_dump_cpus(void)
}
diag308_reset();
pcpu_set_smt(0);
-}
-
-int smp_store_status(int cpu)
-{
- unsigned long vx_sa;
- struct pcpu *pcpu;
-
- pcpu = pcpu_devices + cpu;
- if (__pcpu_sigp_relax(pcpu->address, SIGP_STOP_AND_STORE_STATUS,
- 0, NULL) != SIGP_CC_ORDER_CODE_ACCEPTED)
- return -EIO;
- if (!MACHINE_HAS_VX)
- return 0;
- vx_sa = __pa(pcpu->lowcore->vector_save_area_addr);
- __pcpu_sigp_relax(pcpu->address, SIGP_STORE_ADDITIONAL_STATUS,
- vx_sa, NULL);
- return 0;
-}
-
-#else
-void smp_save_dump_cpus(void)
-{
-}
#endif /* CONFIG_CRASH_DUMP */
+}
void smp_cpu_set_polarization(int cpu, int val)
{