Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com) | |
3 | * Licensed under the GPL | |
4 | */ | |
5 | ||
6 | #include "linux/module.h" | |
7 | #include "linux/sched.h" | |
72e55257 | 8 | #include "asm/smp.h" |
1da177e4 LT |
9 | #include "kern_util.h" |
10 | #include "kern.h" | |
11 | #include "os.h" | |
12 | #include "mode.h" | |
1da177e4 | 13 | |
5e38291d EB |
14 | void (*pm_power_off)(void); |
15 | ||
1da177e4 LT |
16 | static void kill_off_processes(void) |
17 | { | |
6aa802ce | 18 | kill_off_processes_skas(); |
1da177e4 LT |
19 | } |
20 | ||
21 | void uml_cleanup(void) | |
22 | { | |
026549d2 | 23 | kmalloc_ok = 0; |
1da177e4 | 24 | do_uml_exitcalls(); |
026549d2 | 25 | kill_off_processes(); |
1da177e4 LT |
26 | } |
27 | ||
28 | void machine_restart(char * __unused) | |
29 | { | |
026549d2 | 30 | uml_cleanup(); |
6aa802ce | 31 | reboot_skas(); |
1da177e4 LT |
32 | } |
33 | ||
1da177e4 LT |
34 | void machine_power_off(void) |
35 | { | |
026549d2 | 36 | uml_cleanup(); |
6aa802ce | 37 | halt_skas(); |
1da177e4 LT |
38 | } |
39 | ||
1da177e4 LT |
40 | void machine_halt(void) |
41 | { | |
42 | machine_power_off(); | |
43 | } |