aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorYang Wei <Wei.Yang@windriver.com>2014-07-31 07:42:29 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-08-25 10:33:44 -0400
commit91ffaa27834b69dc23dfe14a0358f1c70d2938e2 (patch)
tree7785fa535deb4b2541e30b7012ac97617e015b78 /arch/mips/kernel/machine_kexec.c
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff)
MIPS: kdump: Set correct value to kexec_indirection_page variable
Since there is not indirection page in crash type, so the vaule of the head field of kimage structure is not equal to the address of indirection page but IND_DONE. so we have to set kexec_indirection_page variable to the address of the head field of image structure. [ralf@linux-mips.org: Don't add pointless empty line, fix trailing whitespace damage.] Signed-off-by: Yang Wei <Wei.Yang@windriver.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/7499/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/machine_kexec.c')
-rw-r--r--arch/mips/kernel/machine_kexec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 992e18474da5..50980bf3983e 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -71,8 +71,12 @@ machine_kexec(struct kimage *image)
71 kexec_start_address = 71 kexec_start_address =
72 (unsigned long) phys_to_virt(image->start); 72 (unsigned long) phys_to_virt(image->start);
73 73
74 kexec_indirection_page = 74 if (image->type == KEXEC_TYPE_DEFAULT) {
75 (unsigned long) phys_to_virt(image->head & PAGE_MASK); 75 kexec_indirection_page =
76 (unsigned long) phys_to_virt(image->head & PAGE_MASK);
77 } else {
78 kexec_indirection_page = (unsigned long)&image->head;
79 }
76 80
77 memcpy((void*)reboot_code_buffer, relocate_new_kernel, 81 memcpy((void*)reboot_code_buffer, relocate_new_kernel,
78 relocate_new_kernel_size); 82 relocate_new_kernel_size);