Messages in this thread Patch in this message | | | From | Glauber Costa <> | Subject | [PATCH 1/1] export native versions of machine_ops functions | Date | Wed, 5 Mar 2008 14:44:00 -0300 |
| |
People overriding machine_ops provided functions may want to call the native version after its pre-processing. It already happens for the smp_ops functions, so I don't see a reason for avoiding it here.
Signed-off-by: Glauber Costa <gcosta@redhat.com> --- arch/x86/kernel/reboot.c | 10 +++++----- include/asm-x86/reboot.h | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 7fd6ac4..8b577f1 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -326,7 +326,7 @@ static inline void kb_wait(void) } } -static void native_machine_emergency_restart(void) +void native_machine_emergency_restart(void) { int i; @@ -376,7 +376,7 @@ #endif } } -static void native_machine_shutdown(void) +void native_machine_shutdown(void) { /* Stop the cpus and apics */ #ifdef CONFIG_SMP @@ -420,7 +420,7 @@ #ifdef CONFIG_X86_64 #endif } -static void native_machine_restart(char *__unused) +void native_machine_restart(char *__unused) { printk("machine restart\n"); @@ -429,11 +429,11 @@ static void native_machine_restart(char machine_emergency_restart(); } -static void native_machine_halt(void) +void native_machine_halt(void) { } -static void native_machine_power_off(void) +void native_machine_power_off(void) { if (pm_power_off) { if (!reboot_force) diff --git a/include/asm-x86/reboot.h b/include/asm-x86/reboot.h index e9e3ffc..fb1bdf1 100644 --- a/include/asm-x86/reboot.h +++ b/include/asm-x86/reboot.h @@ -16,5 +16,10 @@ struct machine_ops extern struct machine_ops machine_ops; void machine_real_restart(unsigned char *code, int length); +void native_machine_emergency_restart(void); +void native_machine_shutdown(void); +void native_machine_restart(char *__unused); +void native_machine_halt(void); +void native_machine_power_off(void); #endif /* _ASM_REBOOT_H */ -- 1.4.2
| |