diff options
Diffstat (limited to 'arch/x86/kernel/reboot.c')
-rw-r--r-- | arch/x86/kernel/reboot.c | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 5818dc28167..7fd6ac43e4a 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -326,7 +326,7 @@ static inline void kb_wait(void) | |||
326 | } | 326 | } |
327 | } | 327 | } |
328 | 328 | ||
329 | void machine_emergency_restart(void) | 329 | static void native_machine_emergency_restart(void) |
330 | { | 330 | { |
331 | int i; | 331 | int i; |
332 | 332 | ||
@@ -376,7 +376,7 @@ void machine_emergency_restart(void) | |||
376 | } | 376 | } |
377 | } | 377 | } |
378 | 378 | ||
379 | void machine_shutdown(void) | 379 | static void native_machine_shutdown(void) |
380 | { | 380 | { |
381 | /* Stop the cpus and apics */ | 381 | /* Stop the cpus and apics */ |
382 | #ifdef CONFIG_SMP | 382 | #ifdef CONFIG_SMP |
@@ -420,7 +420,7 @@ void machine_shutdown(void) | |||
420 | #endif | 420 | #endif |
421 | } | 421 | } |
422 | 422 | ||
423 | void machine_restart(char *__unused) | 423 | static void native_machine_restart(char *__unused) |
424 | { | 424 | { |
425 | printk("machine restart\n"); | 425 | printk("machine restart\n"); |
426 | 426 | ||
@@ -429,11 +429,11 @@ void machine_restart(char *__unused) | |||
429 | machine_emergency_restart(); | 429 | machine_emergency_restart(); |
430 | } | 430 | } |
431 | 431 | ||
432 | void machine_halt(void) | 432 | static void native_machine_halt(void) |
433 | { | 433 | { |
434 | } | 434 | } |
435 | 435 | ||
436 | void machine_power_off(void) | 436 | static void native_machine_power_off(void) |
437 | { | 437 | { |
438 | if (pm_power_off) { | 438 | if (pm_power_off) { |
439 | if (!reboot_force) | 439 | if (!reboot_force) |
@@ -443,9 +443,35 @@ void machine_power_off(void) | |||
443 | } | 443 | } |
444 | 444 | ||
445 | struct machine_ops machine_ops = { | 445 | struct machine_ops machine_ops = { |
446 | .power_off = machine_power_off, | 446 | .power_off = native_machine_power_off, |
447 | .shutdown = machine_shutdown, | 447 | .shutdown = native_machine_shutdown, |
448 | .emergency_restart = machine_emergency_restart, | 448 | .emergency_restart = native_machine_emergency_restart, |
449 | .restart = machine_restart, | 449 | .restart = native_machine_restart, |
450 | .halt = machine_halt | 450 | .halt = native_machine_halt |
451 | }; | 451 | }; |
452 | |||
453 | void machine_power_off(void) | ||
454 | { | ||
455 | machine_ops.power_off(); | ||
456 | } | ||
457 | |||
458 | void machine_shutdown(void) | ||
459 | { | ||
460 | machine_ops.shutdown(); | ||
461 | } | ||
462 | |||
463 | void machine_emergency_restart(void) | ||
464 | { | ||
465 | machine_ops.emergency_restart(); | ||
466 | } | ||
467 | |||
468 | void machine_restart(char *cmd) | ||
469 | { | ||
470 | machine_ops.restart(cmd); | ||
471 | } | ||
472 | |||
473 | void machine_halt(void) | ||
474 | { | ||
475 | machine_ops.halt(); | ||
476 | } | ||
477 | |||