diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-10-14 15:53:06 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-11-27 09:24:12 +0100 |
commit | 8a07dd02d7615d91d65d6235f7232e3f9b5d347f (patch) | |
tree | f1acb2e957d30d902b9c2849449797cb53d37e8a /arch/s390/kernel/machine_kexec.c | |
parent | ffa52d02c50ea31420dc70869c0b6b439e7cb5ef (diff) | |
download | linux-stable-8a07dd02d7615d91d65d6235f7232e3f9b5d347f.tar.gz linux-stable-8a07dd02d7615d91d65d6235f7232e3f9b5d347f.tar.bz2 linux-stable-8a07dd02d7615d91d65d6235f7232e3f9b5d347f.zip |
s390/kdump: remove code to create ELF notes in the crashed system
The s390 architecture can store the CPU registers of the crashed system
after the kdump kernel has been started and this is the preferred way.
Remove the remaining code fragments that deal with storing CPU registers
while the crashed system is still active.
Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/machine_kexec.c')
-rw-r--r-- | arch/s390/kernel/machine_kexec.c | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index fb0901ec4306..991b16819b97 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -35,43 +35,37 @@ extern const unsigned long long relocate_kernel_len; #ifdef CONFIG_CRASH_DUMP /* - * Create ELF notes for one CPU - */ -static void add_elf_notes(int cpu) -{ - struct save_area *sa = (void *) 4608 + store_prefix(); - void *ptr; - - memcpy((void *) (4608UL + sa->pref_reg), sa, sizeof(*sa)); - ptr = (u64 *) per_cpu_ptr(crash_notes, cpu); - ptr = fill_cpu_elf_notes(ptr, sa, NULL); - memset(ptr, 0, sizeof(struct elf_note)); -} - -/* * Initialize CPU ELF notes */ static void setup_regs(void) { - unsigned long sa = S390_lowcore.prefixreg_save_area + SAVE_AREA_BASE; - struct _lowcore *lc; + struct save_area *sa, *sa_0; + unsigned long prefix; int cpu, this_cpu; - /* Get lowcore pointer from store status of this CPU (absolute zero) */ - lc = (struct _lowcore *)(unsigned long)S390_lowcore.prefixreg_save_area; + /* setup_regs is called with the prefix register = 0 */ + sa_0 = (struct save_area *) SAVE_AREA_BASE; + + /* Get status of this CPU out of absolute zero */ + prefix = (unsigned long) S390_lowcore.prefixreg_save_area; + sa = (struct save_area *)(prefix + SAVE_AREA_BASE); + memcpy(sa, sa_0, sizeof(struct save_area)); + if (MACHINE_HAS_VX) { + struct _lowcore *lc = (struct _lowcore *) prefix; + save_vx_regs_safe((void *) lc->vector_save_area_addr); + } + + /* Get status of the other CPUs */ this_cpu = smp_find_processor_id(stap()); - add_elf_notes(this_cpu); for_each_online_cpu(cpu) { if (cpu == this_cpu) continue; if (smp_store_status(cpu)) continue; - add_elf_notes(cpu); + prefix = (unsigned long) S390_lowcore.prefixreg_save_area; + sa = (struct save_area *)(prefix + SAVE_AREA_BASE); + memcpy(sa, sa_0, sizeof(struct save_area)); } - if (MACHINE_HAS_VX) - save_vx_regs_safe((void *) lc->vector_save_area_addr); - /* Copy dump CPU store status info to absolute zero */ - memcpy((void *) SAVE_AREA_BASE, (void *) sa, sizeof(struct save_area)); } /* |