aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r--arch/arm/kernel/process.c61
1 files changed, 35 insertions, 26 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 7df6e1aaa323..17c38dbf2f3c 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -28,6 +28,7 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/cpu.h> 29#include <linux/cpu.h>
30#include <linux/elfcore.h> 30#include <linux/elfcore.h>
31#include <linux/pm.h>
31 32
32#include <asm/leds.h> 33#include <asm/leds.h>
33#include <asm/processor.h> 34#include <asm/processor.h>
@@ -71,8 +72,36 @@ static int __init hlt_setup(char *__unused)
71__setup("nohlt", nohlt_setup); 72__setup("nohlt", nohlt_setup);
72__setup("hlt", hlt_setup); 73__setup("hlt", hlt_setup);
73 74
75void arm_machine_restart(char mode)
76{
77 /*
78 * Clean and disable cache, and turn off interrupts
79 */
80 cpu_proc_fin();
81
82 /*
83 * Tell the mm system that we are going to reboot -
84 * we may need it to insert some 1:1 mappings so that
85 * soft boot works.
86 */
87 setup_mm_for_reboot(mode);
88
89 /*
90 * Now call the architecture specific reboot code.
91 */
92 arch_reset(mode);
93
94 /*
95 * Whoops - the architecture was unable to reboot.
96 * Tell the user!
97 */
98 mdelay(1000);
99 printk("Reboot failed -- System halted\n");
100 while (1);
101}
102
74/* 103/*
75 * The following aren't currently used. 104 * Function pointers to optional machine specific functions
76 */ 105 */
77void (*pm_idle)(void); 106void (*pm_idle)(void);
78EXPORT_SYMBOL(pm_idle); 107EXPORT_SYMBOL(pm_idle);
@@ -80,6 +109,10 @@ EXPORT_SYMBOL(pm_idle);
80void (*pm_power_off)(void); 109void (*pm_power_off)(void);
81EXPORT_SYMBOL(pm_power_off); 110EXPORT_SYMBOL(pm_power_off);
82 111
112void (*arm_pm_restart)(char str) = arm_machine_restart;
113EXPORT_SYMBOL_GPL(arm_pm_restart);
114
115
83/* 116/*
84 * This is our default idle handler. We need to disable 117 * This is our default idle handler. We need to disable
85 * interrupts here to ensure we don't miss a wakeup call. 118 * interrupts here to ensure we don't miss a wakeup call.
@@ -151,33 +184,9 @@ void machine_power_off(void)
151 pm_power_off(); 184 pm_power_off();
152} 185}
153 186
154
155void machine_restart(char * __unused) 187void machine_restart(char * __unused)
156{ 188{
157 /* 189 arm_pm_restart(reboot_mode);
158 * Clean and disable cache, and turn off interrupts
159 */
160 cpu_proc_fin();
161
162 /*
163 * Tell the mm system that we are going to reboot -
164 * we may need it to insert some 1:1 mappings so that
165 * soft boot works.
166 */
167 setup_mm_for_reboot(reboot_mode);
168
169 /*
170 * Now call the architecture specific reboot code.
171 */
172 arch_reset(reboot_mode);
173
174 /*
175 * Whoops - the architecture was unable to reboot.
176 * Tell the user!
177 */
178 mdelay(1000);
179 printk("Reboot failed -- System halted\n");
180 while (1);
181} 190}
182 191
183void __show_regs(struct pt_regs *regs) 192void __show_regs(struct pt_regs *regs)