lkml.org 
[lkml]   [2008]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] export native versions of machine_ops functions
Date
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


\
 
 \ /
  Last update: 2008-03-05 18:49    [W:0.807 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site