From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: [PATCH] Clean up mach_reboot_fixups Date: Wed, 28 Mar 2007 13:11:49 -0700 Message-ID: <460ACC05.4020401@goop.org> References: <46099709.2000304@goop.org> <200703282143.53037.ak@suse.de> <460AC665.2090705@goop.org> <200703282154.04245.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200703282154.04245.ak@suse.de> Sender: linux-kernel-owner@vger.kernel.org To: Andi Kleen Cc: Jeremy Fitzhardinge , Virtualization Mailing List , Stephane Eranian , Andrew Morton , Ingo Molnar , Jan Beulich , Linux Kernel Mailing List List-Id: virtualization@lists.linuxfoundation.org Two cleanups: - reboot_fixups.h is entirely i386-dependent, so put it in asm-i386 - use a weak version rather than ifdeffery [ Andi - the machine_ops probably depends on this, but only in a minor context-clash way. ] Signed-off-by: Jeremy Fitzhardinge Cc: Jaya Kumar --- arch/i386/kernel/reboot.c | 6 +++++- arch/i386/kernel/reboot_fixups.c | 2 +- include/asm-i386/reboot_fixups.h | 6 ++++++ include/linux/reboot_fixups.h | 10 ---------- 4 files changed, 12 insertions(+), 12 deletions(-) =================================================================== --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c @@ -17,7 +17,7 @@ #include #include #include "mach_reboot.h" -#include +#include /* * Power off function, if any @@ -314,6 +314,10 @@ void machine_shutdown(void) #ifdef CONFIG_X86_IO_APIC disable_IO_APIC(); #endif +} + +void __attribute__((weak)) mach_reboot_fixups(void) +{ } void machine_emergency_restart(void) =================================================================== --- a/arch/i386/kernel/reboot_fixups.c +++ b/arch/i386/kernel/reboot_fixups.c @@ -10,7 +10,7 @@ #include #include -#include +#include static void cs5530a_warm_reset(struct pci_dev *dev) { =================================================================== --- /dev/null +++ b/include/asm-i386/reboot_fixups.h @@ -0,0 +1,6 @@ +#ifndef _LINUX_REBOOT_FIXUPS_H +#define _LINUX_REBOOT_FIXUPS_H + +extern void mach_reboot_fixups(void); + +#endif /* _LINUX_REBOOT_FIXUPS_H */ =================================================================== --- a/include/linux/reboot_fixups.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _LINUX_REBOOT_FIXUPS_H -#define _LINUX_REBOOT_FIXUPS_H - -#ifdef CONFIG_X86_REBOOTFIXUPS -extern void mach_reboot_fixups(void); -#else -#define mach_reboot_fixups() ((void)(0)) -#endif - -#endif /* _LINUX_REBOOT_FIXUPS_H */