diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2011-10-30 10:16:40 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 10:16:42 -0400 |
commit | 60a0c68df2632feaa4a986af084650d1165d89c5 (patch) | |
tree | f55907defeab43de02a5a3127c8d5a694a21b3a2 /arch/s390/kernel/smp.c | |
parent | 7f0bf656c66e4292e965c95fd9de55c72b6578bb (diff) |
[S390] kdump backend code
This patch provides the architecture specific part of the s390 kdump
support.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index e4572601e91e..e3f51dfa5cad 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/timex.h> | 38 | #include <linux/timex.h> |
39 | #include <linux/bootmem.h> | 39 | #include <linux/bootmem.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/crash_dump.h> | ||
41 | #include <asm/asm-offsets.h> | 42 | #include <asm/asm-offsets.h> |
42 | #include <asm/ipl.h> | 43 | #include <asm/ipl.h> |
43 | #include <asm/setup.h> | 44 | #include <asm/setup.h> |
@@ -304,11 +305,13 @@ void smp_ctl_clear_bit(int cr, int bit) | |||
304 | } | 305 | } |
305 | EXPORT_SYMBOL(smp_ctl_clear_bit); | 306 | EXPORT_SYMBOL(smp_ctl_clear_bit); |
306 | 307 | ||
307 | #ifdef CONFIG_ZFCPDUMP | 308 | #if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_CRASH_DUMP) |
308 | 309 | ||
309 | static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) | 310 | static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) |
310 | { | 311 | { |
311 | if (ipl_info.type != IPL_TYPE_FCP_DUMP) | 312 | if (ipl_info.type != IPL_TYPE_FCP_DUMP && !OLDMEM_BASE) |
313 | return; | ||
314 | if (is_kdump_kernel()) | ||
312 | return; | 315 | return; |
313 | if (cpu >= NR_CPUS) { | 316 | if (cpu >= NR_CPUS) { |
314 | pr_warning("CPU %i exceeds the maximum %i and is excluded from " | 317 | pr_warning("CPU %i exceeds the maximum %i and is excluded from " |
@@ -426,6 +429,18 @@ static void __init smp_detect_cpus(void) | |||
426 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 429 | info = kmalloc(sizeof(*info), GFP_KERNEL); |
427 | if (!info) | 430 | if (!info) |
428 | panic("smp_detect_cpus failed to allocate memory\n"); | 431 | panic("smp_detect_cpus failed to allocate memory\n"); |
432 | #ifdef CONFIG_CRASH_DUMP | ||
433 | if (OLDMEM_BASE && !is_kdump_kernel()) { | ||
434 | struct save_area *save_area; | ||
435 | |||
436 | save_area = kmalloc(sizeof(*save_area), GFP_KERNEL); | ||
437 | if (!save_area) | ||
438 | panic("could not allocate memory for save area\n"); | ||
439 | copy_oldmem_page(1, (void *) save_area, sizeof(*save_area), | ||
440 | 0x200, 0); | ||
441 | zfcpdump_save_areas[0] = save_area; | ||
442 | } | ||
443 | #endif | ||
429 | /* Use sigp detection algorithm if sclp doesn't work. */ | 444 | /* Use sigp detection algorithm if sclp doesn't work. */ |
430 | if (sclp_get_cpu_info(info)) { | 445 | if (sclp_get_cpu_info(info)) { |
431 | smp_use_sigp_detection = 1; | 446 | smp_use_sigp_detection = 1; |