From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 1/2] [PATCH] allow machine_crash_shutdown to be replaced Date: Mon, 10 Mar 2008 08:16:16 +0100 Message-ID: <20080310071616.GB7428@elte.hu> References: <1204905306-15041-1-git-send-email-gcosta@redhat.com> <1204905306-15041-2-git-send-email-gcosta@redhat.com> <47D1936D.60208@qumranet.com> <47D19A94.1070804@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Avi Kivity To: Glauber Costa Return-path: Content-Disposition: inline In-Reply-To: <47D19A94.1070804@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org * Glauber Costa 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 Ingo -----------> Subject: x86: export native versions of machine_ops functions From: Glauber Costa 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 Signed-off-by: Ingo Molnar --- 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/