]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: kexec: make dtb_mem always enabled
authorPavel Tatashin <pasha.tatashin@soleen.com>
Wed, 4 Dec 2019 15:59:17 +0000 (10:59 -0500)
committerWill Deacon <will@kernel.org>
Wed, 8 Jan 2020 16:32:55 +0000 (16:32 +0000)
Currently, dtb_mem is enabled only when CONFIG_KEXEC_FILE is
enabled. This adds ugly ifdefs to c files.

Always enabled dtb_mem, when it is not used, it is NULL.
Change the dtb_mem to phys_addr_t, as it is a physical address.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/kexec.h
arch/arm64/kernel/machine_kexec.c

index 12a561a54128ced49c7c8686c4d6c045fa684c13..ad6afed690786f8e263764213b1427fccc0501d7 100644 (file)
@@ -90,14 +90,14 @@ static inline void crash_prepare_suspend(void) {}
 static inline void crash_post_resume(void) {}
 #endif
 
-#ifdef CONFIG_KEXEC_FILE
 #define ARCH_HAS_KIMAGE_ARCH
 
 struct kimage_arch {
        void *dtb;
-       unsigned long dtb_mem;
+       phys_addr_t dtb_mem;
 };
 
+#ifdef CONFIG_KEXEC_FILE
 extern const struct kexec_file_ops kexec_image_ops;
 
 struct kimage;
index 8e9c924423b4ead238f73c1db04fe81bf6979b15..ae1bad0156cdf9920f2089d0f8e335af1cd5ff2f 100644 (file)
@@ -203,11 +203,7 @@ void machine_kexec(struct kimage *kimage)
         * In kexec_file case, the kernel starts directly without purgatory.
         */
        cpu_soft_restart(reboot_code_buffer_phys, kimage->head, kimage->start,
-#ifdef CONFIG_KEXEC_FILE
-                                               kimage->arch.dtb_mem);
-#else
-                                               0);
-#endif
+                        kimage->arch.dtb_mem);
 
        BUG(); /* Should never get here. */
 }