arm64: kdump: no need to mark crashkernel pages manually PG_reserved
[linux-2.6-microblaze.git] / arch / arm64 / kernel / machine_kexec.c
index 922add8..66b5d69 100644 (file)
@@ -212,9 +212,17 @@ void machine_kexec(struct kimage *kimage)
         * uses physical addressing to relocate the new image to its final
         * position and transfers control to the image entry point when the
         * relocation is complete.
+        * In kexec case, kimage->start points to purgatory assuming that
+        * kernel entry and dtb address are embedded in purgatory by
+        * userspace (kexec-tools).
+        * In kexec_file case, the kernel starts directly without purgatory.
         */
-
-       cpu_soft_restart(reboot_code_buffer_phys, kimage->head, kimage->start, 0);
+       cpu_soft_restart(reboot_code_buffer_phys, kimage->head, kimage->start,
+#ifdef CONFIG_KEXEC_FILE
+                                               kimage->arch.dtb_mem);
+#else
+                                               0);
+#endif
 
        BUG(); /* Should never get here. */
 }
@@ -313,7 +321,7 @@ void crash_post_resume(void)
  * but does not hold any data of loaded kernel image.
  *
  * Note that all the pages in crash dump kernel memory have been initially
- * marked as Reserved in kexec_reserve_crashkres_pages().
+ * marked as Reserved as memory was allocated via memblock_reserve().
  *
  * In hibernation, the pages which are Reserved and yet "nosave" are excluded
  * from the hibernation iamge. crash_is_nosave() does thich check for crash
@@ -353,7 +361,6 @@ void crash_free_reserved_phys_range(unsigned long begin, unsigned long end)
 
        for (addr = begin; addr < end; addr += PAGE_SIZE) {
                page = phys_to_page(addr);
-               ClearPageReserved(page);
                free_reserved_page(page);
        }
 }