diff options
Diffstat (limited to 'arch/s390/kernel/machine_kexec.c')
-rw-r--r-- | arch/s390/kernel/machine_kexec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 719e27b2cf22..4685337fa7c6 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/elf.h> | 25 | #include <asm/elf.h> |
26 | #include <asm/asm-offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | #include <asm/os_info.h> | 27 | #include <asm/os_info.h> |
28 | #include <asm/switch_to.h> | ||
28 | 29 | ||
29 | typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long); | 30 | typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long); |
30 | 31 | ||
@@ -43,7 +44,7 @@ static void add_elf_notes(int cpu) | |||
43 | 44 | ||
44 | memcpy((void *) (4608UL + sa->pref_reg), sa, sizeof(*sa)); | 45 | memcpy((void *) (4608UL + sa->pref_reg), sa, sizeof(*sa)); |
45 | ptr = (u64 *) per_cpu_ptr(crash_notes, cpu); | 46 | ptr = (u64 *) per_cpu_ptr(crash_notes, cpu); |
46 | ptr = fill_cpu_elf_notes(ptr, sa); | 47 | ptr = fill_cpu_elf_notes(ptr, sa, NULL); |
47 | memset(ptr, 0, sizeof(struct elf_note)); | 48 | memset(ptr, 0, sizeof(struct elf_note)); |
48 | } | 49 | } |
49 | 50 | ||
@@ -53,8 +54,11 @@ static void add_elf_notes(int cpu) | |||
53 | static void setup_regs(void) | 54 | static void setup_regs(void) |
54 | { | 55 | { |
55 | unsigned long sa = S390_lowcore.prefixreg_save_area + SAVE_AREA_BASE; | 56 | unsigned long sa = S390_lowcore.prefixreg_save_area + SAVE_AREA_BASE; |
57 | struct _lowcore *lc; | ||
56 | int cpu, this_cpu; | 58 | int cpu, this_cpu; |
57 | 59 | ||
60 | /* Get lowcore pointer from store status of this CPU (absolute zero) */ | ||
61 | lc = (struct _lowcore *)(unsigned long)S390_lowcore.prefixreg_save_area; | ||
58 | this_cpu = smp_find_processor_id(stap()); | 62 | this_cpu = smp_find_processor_id(stap()); |
59 | add_elf_notes(this_cpu); | 63 | add_elf_notes(this_cpu); |
60 | for_each_online_cpu(cpu) { | 64 | for_each_online_cpu(cpu) { |
@@ -64,6 +68,8 @@ static void setup_regs(void) | |||
64 | continue; | 68 | continue; |
65 | add_elf_notes(cpu); | 69 | add_elf_notes(cpu); |
66 | } | 70 | } |
71 | if (MACHINE_HAS_VX) | ||
72 | save_vx_regs_safe((void *) lc->vector_save_area_addr); | ||
67 | /* Copy dump CPU store status info to absolute zero */ | 73 | /* Copy dump CPU store status info to absolute zero */ |
68 | memcpy((void *) SAVE_AREA_BASE, (void *) sa, sizeof(struct save_area)); | 74 | memcpy((void *) SAVE_AREA_BASE, (void *) sa, sizeof(struct save_area)); |
69 | } | 75 | } |