aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorRussell King2014-12-05 16:30:54 +0000
committerRussell King2014-12-05 16:30:54 +0000
commite9f2d6d66037cdf97487491e04053f411abc5d16 (patch)
tree123cec080d17fb74a2531d8cc7ad1cf44bbad9ec /arch/arm/kernel/machine_kexec.c
parentfbe4dd088f449cbae586aa8af51d271297c75f9f (diff)
parent06e944b8e5fc4bec83f102f98c1ee4f972f5f072 (diff)
Merge branch 'devel-stable' into for-next
Diffstat (limited to 'arch/arm/kernel/machine_kexec.c')
-rw-r--r--arch/arm/kernel/machine_kexec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index 4f75192f2ef9..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;
static atomic_t waiting_for_crash_ipi;
+static unsigned long dt_mem;
/*
* Provide a dummy crash_notes definition while crash dump arrives to arm.
* This prevents breakage of crash_notes attribute in kernel/ksysfs.c.
@@ -64,7 +65,7 @@ int machine_kexec_prepare(struct kimage *image)
return err;
if (be32_to_cpu(header) == OF_DT_HEADER)
- kexec_boot_atags = current_segment->mem;
+ dt_mem = current_segment->mem;
}
return 0;
}
@@ -163,12 +164,12 @@ void machine_kexec(struct kimage *image)
reboot_code_buffer = page_address(image->control_code_page);
/* Prepare parameters for reboot_code_buffer*/
+ set_kernel_text_rw();
kexec_start_address = image->start;
kexec_indirection_page = page_list;
kexec_mach_type = machine_arch_type;
- if (!kexec_boot_atags)
- kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;
-
+ kexec_boot_atags = dt_mem ?: image->start - KEXEC_ARM_ZIMAGE_OFFSET
+ + KEXEC_ARM_ATAGS_OFFSET;
/* copy our kernel relocation code to the control code page */
reboot_entry = fncpy(reboot_code_buffer,