]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: kdump: Set correct value to kexec_indirection_page variable
authorYang Wei <Wei.Yang@windriver.com>
Thu, 31 Jul 2014 11:42:29 +0000 (19:42 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 25 Aug 2014 14:33:44 +0000 (16:33 +0200)
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>
arch/mips/kernel/machine_kexec.c

index 992e18474da5da89f1ff4b878dbbc8e8db47e919..50980bf3983ef3654d4f24c1dbf95e4576d0c3a8 100644 (file)
@@ -71,8 +71,12 @@ machine_kexec(struct kimage *image)
        kexec_start_address =
                (unsigned long) phys_to_virt(image->start);
 
-       kexec_indirection_page =
-               (unsigned long) phys_to_virt(image->head & PAGE_MASK);
+       if (image->type == KEXEC_TYPE_DEFAULT) {
+               kexec_indirection_page =
+                       (unsigned long) phys_to_virt(image->head & PAGE_MASK);
+       } else {
+               kexec_indirection_page = (unsigned long)&image->head;
+       }
 
        memcpy((void*)reboot_code_buffer, relocate_new_kernel,
               relocate_new_kernel_size);