public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] export native versions of machine_ops functions
@ 2008-03-05 17:44 Glauber Costa
  2008-03-06 10:55 ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Glauber Costa @ 2008-03-05 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, glommer, mingo, tglx, Glauber Costa

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-06 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05 17:44 [PATCH 1/1] export native versions of machine_ops functions Glauber Costa
2008-03-06 10:55 ` Ingo Molnar
2008-03-06 11:49   ` Glauber Costa
2008-03-06 12:13     ` Ingo Molnar
2008-03-06 12:15       ` Avi Kivity
2008-03-06 12:28         ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox