* Glauber Costa <[EMAIL PROTECTED]> wrote:

> It'd be kvm.git with the machine_ops non-static functions patch. 
> However, as it turned out, we only used one of the functions, instead 
> of all of them. If ingo prefers, we can revert that patch, and come up 
> with a new one that just exposes the function we're actually using. I 
> can then route it through kvm.git entirely, instead of x86.

yeah, please do it minimally. I've pulled the patch below from x86.git, 
you've got my Acked-by for the smaller one as well:

 Acked-by: Ingo Molnar <[EMAIL PROTECTED]>

        Ingo

----------->
Subject: x86: export native versions of machine_ops functions
From: Glauber Costa <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 arch/x86/kernel/reboot.c |   10 +++++-----
 include/asm-x86/reboot.h |    5 +++++
 2 files changed, 10 insertions(+), 5 deletions(-)

Index: linux-x86.q/arch/x86/kernel/reboot.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/reboot.c
+++ linux-x86.q/arch/x86/kernel/reboot.c
@@ -330,7 +330,7 @@ void __attribute__((weak)) mach_reboot_f
 {
 }
 
-static void native_machine_emergency_restart(void)
+void native_machine_emergency_restart(void)
 {
        int i;
 
@@ -382,7 +382,7 @@ static void native_machine_emergency_res
        }
 }
 
-static void native_machine_shutdown(void)
+void native_machine_shutdown(void)
 {
        /* Stop the cpus and apics */
 #ifdef CONFIG_SMP
@@ -438,7 +438,7 @@ static void native_machine_shutdown(void
 #endif
 }
 
-static void native_machine_restart(char *__unused)
+void native_machine_restart(char *__unused)
 {
        printk("machine restart\n");
 
@@ -447,11 +447,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)
Index: linux-x86.q/include/asm-x86/reboot.h
===================================================================
--- linux-x86.q.orig/include/asm-x86/reboot.h
+++ linux-x86.q/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 */

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to