diff options
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r-- | arch/arm/kernel/process.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 3d0c6fb74ae4..eeb3e16c6046 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -57,7 +57,7 @@ static const char *isa_modes[] = { | |||
57 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" | 57 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" |
58 | }; | 58 | }; |
59 | 59 | ||
60 | extern void setup_mm_for_reboot(char mode); | 60 | extern void setup_mm_for_reboot(void); |
61 | 61 | ||
62 | static volatile int hlt_counter; | 62 | static volatile int hlt_counter; |
63 | 63 | ||
@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused) | |||
92 | __setup("nohlt", nohlt_setup); | 92 | __setup("nohlt", nohlt_setup); |
93 | __setup("hlt", hlt_setup); | 93 | __setup("hlt", hlt_setup); |
94 | 94 | ||
95 | void arm_machine_restart(char mode, const char *cmd) | 95 | void soft_restart(unsigned long addr) |
96 | { | 96 | { |
97 | /* Disable interrupts first */ | 97 | /* Disable interrupts first */ |
98 | local_irq_disable(); | 98 | local_irq_disable(); |
@@ -103,7 +103,7 @@ void arm_machine_restart(char mode, const char *cmd) | |||
103 | * we may need it to insert some 1:1 mappings so that | 103 | * we may need it to insert some 1:1 mappings so that |
104 | * soft boot works. | 104 | * soft boot works. |
105 | */ | 105 | */ |
106 | setup_mm_for_reboot(mode); | 106 | setup_mm_for_reboot(); |
107 | 107 | ||
108 | /* Clean and invalidate caches */ | 108 | /* Clean and invalidate caches */ |
109 | flush_cache_all(); | 109 | flush_cache_all(); |
@@ -114,18 +114,17 @@ void arm_machine_restart(char mode, const char *cmd) | |||
114 | /* Push out any further dirty data, and ensure cache is empty */ | 114 | /* Push out any further dirty data, and ensure cache is empty */ |
115 | flush_cache_all(); | 115 | flush_cache_all(); |
116 | 116 | ||
117 | /* | 117 | cpu_reset(addr); |
118 | * Now call the architecture specific reboot code. | 118 | } |
119 | */ | ||
120 | arch_reset(mode, cmd); | ||
121 | 119 | ||
122 | /* | 120 | void arm_machine_restart(char mode, const char *cmd) |
123 | * Whoops - the architecture was unable to reboot. | 121 | { |
124 | * Tell the user! | 122 | /* Disable interrupts first */ |
125 | */ | 123 | local_irq_disable(); |
126 | mdelay(1000); | 124 | local_fiq_disable(); |
127 | printk("Reboot failed -- System halted\n"); | 125 | |
128 | while (1); | 126 | /* Call the architecture specific reboot code. */ |
127 | arch_reset(mode, cmd); | ||
129 | } | 128 | } |
130 | 129 | ||
131 | /* | 130 | /* |
@@ -253,7 +252,15 @@ void machine_power_off(void) | |||
253 | void machine_restart(char *cmd) | 252 | void machine_restart(char *cmd) |
254 | { | 253 | { |
255 | machine_shutdown(); | 254 | machine_shutdown(); |
255 | |||
256 | arm_pm_restart(reboot_mode, cmd); | 256 | arm_pm_restart(reboot_mode, cmd); |
257 | |||
258 | /* Give a grace period for failure to restart of 1s */ | ||
259 | mdelay(1000); | ||
260 | |||
261 | /* Whoops - the platform was unable to reboot. Tell the user! */ | ||
262 | printk("Reboot failed -- System halted\n"); | ||
263 | while (1); | ||
257 | } | 264 | } |
258 | 265 | ||
259 | void __show_regs(struct pt_regs *regs) | 266 | void __show_regs(struct pt_regs *regs) |