mirror of https://gitee.com/openkylin/linux.git
arm64: kexec: make dtb_mem always enabled
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>
This commit is contained in:
parent
3b54b74339
commit
621516789e
|
@ -90,14 +90,14 @@ static inline void crash_prepare_suspend(void) {}
|
||||||
static inline void crash_post_resume(void) {}
|
static inline void crash_post_resume(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_KEXEC_FILE
|
|
||||||
#define ARCH_HAS_KIMAGE_ARCH
|
#define ARCH_HAS_KIMAGE_ARCH
|
||||||
|
|
||||||
struct kimage_arch {
|
struct kimage_arch {
|
||||||
void *dtb;
|
void *dtb;
|
||||||
unsigned long dtb_mem;
|
phys_addr_t dtb_mem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_KEXEC_FILE
|
||||||
extern const struct kexec_file_ops kexec_image_ops;
|
extern const struct kexec_file_ops kexec_image_ops;
|
||||||
|
|
||||||
struct kimage;
|
struct kimage;
|
||||||
|
|
|
@ -203,11 +203,7 @@ void machine_kexec(struct kimage *kimage)
|
||||||
* In kexec_file case, the kernel starts directly without purgatory.
|
* In kexec_file case, the kernel starts directly without purgatory.
|
||||||
*/
|
*/
|
||||||
cpu_soft_restart(reboot_code_buffer_phys, kimage->head, kimage->start,
|
cpu_soft_restart(reboot_code_buffer_phys, kimage->head, kimage->start,
|
||||||
#ifdef CONFIG_KEXEC_FILE
|
kimage->arch.dtb_mem);
|
||||||
kimage->arch.dtb_mem);
|
|
||||||
#else
|
|
||||||
0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BUG(); /* Should never get here. */
|
BUG(); /* Should never get here. */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue