From: "Guo, Racing" <racing.guo@intel.com>

Fix warning in porting lockless mce from x86_64 to i386
1. fix warning in set_bit
2. declare mcheck_init function
3. change to "fastcall" before do_machine_check

Signed-off-by: Guo, Racing <racing.guo@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 arch/i386/kernel/cpu/mcheck/mce.c |   14 +++++++-------
 arch/i386/kernel/cpu/mcheck/mce.h |    1 +
 2 files changed, 8 insertions(+), 7 deletions(-)

diff -puN arch/i386/kernel/cpu/mcheck/mce.c~x86-port-lockless-mce-implementation-fix arch/i386/kernel/cpu/mcheck/mce.c
--- 25/arch/i386/kernel/cpu/mcheck/mce.c~x86-port-lockless-mce-implementation-fix	2005-04-27 19:30:29.344105112 -0700
+++ 25-akpm/arch/i386/kernel/cpu/mcheck/mce.c	2005-04-27 19:30:29.349104352 -0700
@@ -56,7 +56,12 @@ void mce_log(struct mce *mce)
 		/* When the buffer fills up discard new entries. Assume
 		   that the earlier errors are the more interesting. */
 		if (entry >= MCE_LOG_LEN) {
-			set_bit(MCE_OVERFLOW, &mcelog.flags);
+			/* cast &mcelog.flags to (unsigned long *) in order
+			   to prevent compiler warning. It is OK to cast
+			   (unsigned *) to (unsigned long *) in set_bit on
+			   little-endian machine
+			 */
+			set_bit(MCE_OVERFLOW, (unsigned long *)&mcelog.flags);
 			return;
 		}
 		/* Old left over entry. Skip. */
@@ -131,12 +136,7 @@ static int mce_available(struct cpuinfo_
 /*
  * The actual machine check handler
  */
-#ifdef CONFIG_X86_64
-asmlinkage
-#else
-fastcall
-#endif
-void do_machine_check(struct pt_regs * regs, long error_code)
+fastcall void do_machine_check(struct pt_regs * regs, long error_code)
 {
 	struct mce m, panicm;
 	int nowayout = (tolerant < 1);
diff -puN arch/i386/kernel/cpu/mcheck/mce.h~x86-port-lockless-mce-implementation-fix arch/i386/kernel/cpu/mcheck/mce.h
--- 25/arch/i386/kernel/cpu/mcheck/mce.h~x86-port-lockless-mce-implementation-fix	2005-04-27 19:30:29.345104960 -0700
+++ 25-akpm/arch/i386/kernel/cpu/mcheck/mce.h	2005-04-27 19:30:29.349104352 -0700
@@ -68,6 +68,7 @@ struct mce_log {
 #define MCE_EXTENDED_BANK	128
 #define MCE_THERMAL_BANK	MCE_EXTENDED_BANK + 0
 
+void mcheck_init(struct cpuinfo_x86 *c);
 void mce_log(struct mce *m);
 #ifdef CONFIG_X86_MCE_INTEL
 void mce_intel_feature_init(struct cpuinfo_x86 *c);
_