diff options
Diffstat (limited to 'arch/i386/kernel/reboot.c')
-rw-r--r-- | arch/i386/kernel/reboot.c | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index 8b5ff6e15412..14b4de2882be 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/desc.h> | 18 | #include <asm/desc.h> |
19 | #include "mach_reboot.h" | 19 | #include "mach_reboot.h" |
20 | #include <asm/reboot_fixups.h> | 20 | #include <asm/reboot_fixups.h> |
21 | #include <asm/reboot.h> | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Power off function, if any | 24 | * Power off function, if any |
@@ -280,7 +281,7 @@ void machine_real_restart(unsigned char *code, int length) | |||
280 | EXPORT_SYMBOL(machine_real_restart); | 281 | EXPORT_SYMBOL(machine_real_restart); |
281 | #endif | 282 | #endif |
282 | 283 | ||
283 | void machine_shutdown(void) | 284 | static void native_machine_shutdown(void) |
284 | { | 285 | { |
285 | #ifdef CONFIG_SMP | 286 | #ifdef CONFIG_SMP |
286 | int reboot_cpu_id; | 287 | int reboot_cpu_id; |
@@ -320,7 +321,7 @@ void __attribute__((weak)) mach_reboot_fixups(void) | |||
320 | { | 321 | { |
321 | } | 322 | } |
322 | 323 | ||
323 | void machine_emergency_restart(void) | 324 | static void native_machine_emergency_restart(void) |
324 | { | 325 | { |
325 | if (!reboot_thru_bios) { | 326 | if (!reboot_thru_bios) { |
326 | if (efi_enabled) { | 327 | if (efi_enabled) { |
@@ -344,17 +345,17 @@ void machine_emergency_restart(void) | |||
344 | machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); | 345 | machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); |
345 | } | 346 | } |
346 | 347 | ||
347 | void machine_restart(char * __unused) | 348 | static void native_machine_restart(char * __unused) |
348 | { | 349 | { |
349 | machine_shutdown(); | 350 | machine_shutdown(); |
350 | machine_emergency_restart(); | 351 | machine_emergency_restart(); |
351 | } | 352 | } |
352 | 353 | ||
353 | void machine_halt(void) | 354 | static void native_machine_halt(void) |
354 | { | 355 | { |
355 | } | 356 | } |
356 | 357 | ||
357 | void machine_power_off(void) | 358 | static void native_machine_power_off(void) |
358 | { | 359 | { |
359 | if (pm_power_off) { | 360 | if (pm_power_off) { |
360 | machine_shutdown(); | 361 | machine_shutdown(); |
@@ -363,3 +364,35 @@ void machine_power_off(void) | |||
363 | } | 364 | } |
364 | 365 | ||
365 | 366 | ||
367 | struct machine_ops machine_ops = { | ||
368 | .power_off = native_machine_power_off, | ||
369 | .shutdown = native_machine_shutdown, | ||
370 | .emergency_restart = native_machine_emergency_restart, | ||
371 | .restart = native_machine_restart, | ||
372 | .halt = native_machine_halt, | ||
373 | }; | ||
374 | |||
375 | void machine_power_off(void) | ||
376 | { | ||
377 | machine_ops.power_off(); | ||
378 | } | ||
379 | |||
380 | void machine_shutdown(void) | ||
381 | { | ||
382 | machine_ops.shutdown(); | ||
383 | } | ||
384 | |||
385 | void machine_emergency_restart(void) | ||
386 | { | ||
387 | machine_ops.emergency_restart(); | ||
388 | } | ||
389 | |||
390 | void machine_restart(char *cmd) | ||
391 | { | ||
392 | machine_ops.restart(cmd); | ||
393 | } | ||
394 | |||
395 | void machine_halt(void) | ||
396 | { | ||
397 | machine_ops.halt(); | ||
398 | } | ||