diff options
Diffstat (limited to 'arch/arm/kernel/machine_kexec.c')
-rw-r--r-- | arch/arm/kernel/machine_kexec.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 8cf0996aa1a8..de2b085ad753 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -29,6 +29,7 @@ extern unsigned long kexec_boot_atags; | |||
29 | 29 | ||
30 | static atomic_t waiting_for_crash_ipi; | 30 | static atomic_t waiting_for_crash_ipi; |
31 | 31 | ||
32 | static unsigned long dt_mem; | ||
32 | /* | 33 | /* |
33 | * Provide a dummy crash_notes definition while crash dump arrives to arm. | 34 | * Provide a dummy crash_notes definition while crash dump arrives to arm. |
34 | * This prevents breakage of crash_notes attribute in kernel/ksysfs.c. | 35 | * This prevents breakage of crash_notes attribute in kernel/ksysfs.c. |
@@ -64,7 +65,7 @@ int machine_kexec_prepare(struct kimage *image) | |||
64 | return err; | 65 | return err; |
65 | 66 | ||
66 | if (be32_to_cpu(header) == OF_DT_HEADER) | 67 | if (be32_to_cpu(header) == OF_DT_HEADER) |
67 | kexec_boot_atags = current_segment->mem; | 68 | dt_mem = current_segment->mem; |
68 | } | 69 | } |
69 | return 0; | 70 | return 0; |
70 | } | 71 | } |
@@ -126,12 +127,12 @@ void machine_crash_shutdown(struct pt_regs *regs) | |||
126 | msecs--; | 127 | msecs--; |
127 | } | 128 | } |
128 | if (atomic_read(&waiting_for_crash_ipi) > 0) | 129 | if (atomic_read(&waiting_for_crash_ipi) > 0) |
129 | printk(KERN_WARNING "Non-crashing CPUs did not react to IPI\n"); | 130 | pr_warn("Non-crashing CPUs did not react to IPI\n"); |
130 | 131 | ||
131 | crash_save_cpu(regs, smp_processor_id()); | 132 | crash_save_cpu(regs, smp_processor_id()); |
132 | machine_kexec_mask_interrupts(); | 133 | machine_kexec_mask_interrupts(); |
133 | 134 | ||
134 | printk(KERN_INFO "Loading crashdump kernel...\n"); | 135 | pr_info("Loading crashdump kernel...\n"); |
135 | } | 136 | } |
136 | 137 | ||
137 | /* | 138 | /* |
@@ -163,12 +164,12 @@ void machine_kexec(struct kimage *image) | |||
163 | reboot_code_buffer = page_address(image->control_code_page); | 164 | reboot_code_buffer = page_address(image->control_code_page); |
164 | 165 | ||
165 | /* Prepare parameters for reboot_code_buffer*/ | 166 | /* Prepare parameters for reboot_code_buffer*/ |
167 | set_kernel_text_rw(); | ||
166 | kexec_start_address = image->start; | 168 | kexec_start_address = image->start; |
167 | kexec_indirection_page = page_list; | 169 | kexec_indirection_page = page_list; |
168 | kexec_mach_type = machine_arch_type; | 170 | kexec_mach_type = machine_arch_type; |
169 | if (!kexec_boot_atags) | 171 | kexec_boot_atags = dt_mem ?: image->start - KEXEC_ARM_ZIMAGE_OFFSET |
170 | kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET; | 172 | + KEXEC_ARM_ATAGS_OFFSET; |
171 | |||
172 | 173 | ||
173 | /* copy our kernel relocation code to the control code page */ | 174 | /* copy our kernel relocation code to the control code page */ |
174 | reboot_entry = fncpy(reboot_code_buffer, | 175 | reboot_entry = fncpy(reboot_code_buffer, |
@@ -177,7 +178,7 @@ void machine_kexec(struct kimage *image) | |||
177 | reboot_entry_phys = (unsigned long)reboot_entry + | 178 | reboot_entry_phys = (unsigned long)reboot_entry + |
178 | (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer); | 179 | (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer); |
179 | 180 | ||
180 | printk(KERN_INFO "Bye!\n"); | 181 | pr_info("Bye!\n"); |
181 | 182 | ||
182 | if (kexec_reinit) | 183 | if (kexec_reinit) |
183 | kexec_reinit(); | 184 | kexec_reinit(); |