aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/reset.c')
-rw-r--r--arch/mips/kernel/reset.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
index 07fc5244aed4..7c746d3458e7 100644
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
@@ -11,6 +11,7 @@
11#include <linux/pm.h> 11#include <linux/pm.h>
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/reboot.h> 13#include <linux/reboot.h>
14#include <linux/delay.h>
14 15
15#include <asm/reboot.h> 16#include <asm/reboot.h>
16 17
@@ -29,16 +30,40 @@ void machine_restart(char *command)
29{ 30{
30 if (_machine_restart) 31 if (_machine_restart)
31 _machine_restart(command); 32 _machine_restart(command);
33
34#ifdef CONFIG_SMP
35 preempt_disable();
36 smp_send_stop();
37#endif
38 do_kernel_restart(command);
39 mdelay(1000);
40 pr_emerg("Reboot failed -- System halted\n");
41 local_irq_disable();
42 while (1);
32} 43}
33 44
34void machine_halt(void) 45void machine_halt(void)
35{ 46{
36 if (_machine_halt) 47 if (_machine_halt)
37 _machine_halt(); 48 _machine_halt();
49
50#ifdef CONFIG_SMP
51 preempt_disable();
52 smp_send_stop();
53#endif
54 local_irq_disable();
55 while (1);
38} 56}
39 57
40void machine_power_off(void) 58void machine_power_off(void)
41{ 59{
42 if (pm_power_off) 60 if (pm_power_off)
43 pm_power_off(); 61 pm_power_off();
62
63#ifdef CONFIG_SMP
64 preempt_disable();
65 smp_send_stop();
66#endif
67 local_irq_disable();
68 while (1);
44} 69}