aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2011-06-06 07:35:46 -0400
committerWill Deacon <will.deacon@arm.com>2011-12-12 11:07:36 -0500
commit3bdc3484e8f2b1b219ad0397d81ce4601fbaf76d (patch)
treec4a6acfa097a93ddf7698012375e5fbe7cd86c1d
parent02b73e2e9c288cbbb6ec96bef628cf08e29824c4 (diff)
ARM: kexec: use soft_restart for branching to the reboot buffer
Now that there is a common way to reset the machine, let's use it instead of reinventing the wheel in the kexec backend. Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm/kernel/machine_kexec.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index 29620b632ed9..764bd456d84f 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -12,12 +12,11 @@
12#include <asm/mmu_context.h> 12#include <asm/mmu_context.h>
13#include <asm/cacheflush.h> 13#include <asm/cacheflush.h>
14#include <asm/mach-types.h> 14#include <asm/mach-types.h>
15#include <asm/system.h>
15 16
16extern const unsigned char relocate_new_kernel[]; 17extern const unsigned char relocate_new_kernel[];
17extern const unsigned int relocate_new_kernel_size; 18extern const unsigned int relocate_new_kernel_size;
18 19
19extern void setup_mm_for_reboot(void);
20
21extern unsigned long kexec_start_address; 20extern unsigned long kexec_start_address;
22extern unsigned long kexec_indirection_page; 21extern unsigned long kexec_indirection_page;
23extern unsigned long kexec_mach_type; 22extern unsigned long kexec_mach_type;
@@ -111,14 +110,6 @@ void machine_kexec(struct kimage *image)
111 110
112 if (kexec_reinit) 111 if (kexec_reinit)
113 kexec_reinit(); 112 kexec_reinit();
114 local_irq_disable(); 113
115 local_fiq_disable(); 114 soft_restart(reboot_code_buffer_phys);
116 setup_mm_for_reboot();
117 flush_cache_all();
118 outer_flush_all();
119 outer_disable();
120 cpu_proc_fin();
121 outer_inv_all();
122 flush_cache_all();
123 cpu_reset(reboot_code_buffer_phys);
124} 115}