* [PATCH]fix warning in porting lockless mce from x86_64 to i386
@ 2005-04-28 2:24 Guo, Racing
2005-04-28 2:40 ` Zwane Mwaikambo
0 siblings, 1 reply; 2+ messages in thread
From: Guo, Racing @ 2005-04-28 2:24 UTC (permalink / raw)
To: Andrew Morton, Andi Kleen; +Cc: Yu, Luming, linux-kernel
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>
---
mce.c | 14 +++++++-------
mce.h | 1 +
2 files changed, 8 insertions(+), 7 deletions(-)
diff -rNu
linux-2.6.11.6-move-files-mce/arch/i386/kernel/cpu/mcheck/mce.c
linux-2.6.11.6-move-files-mce-fix/arch/i386/kernel/cpu/mcheck/mce.c
--- linux-2.6.11.6-move-files-mce/arch/i386/kernel/cpu/mcheck/mce.c
2005-04-27 13:58:33.000000000 +0800
+++ linux-2.6.11.6-move-files-mce-fix/arch/i386/kernel/cpu/mcheck/mce.c
2005-04-28 10:02:09.386327560 +0800
@@ -56,7 +56,12 @@
/* 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 @@
/*
* 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 -rNu
linux-2.6.11.6-move-files-mce/arch/i386/kernel/cpu/mcheck/mce.h
linux-2.6.11.6-move-files-mce-fix/arch/i386/kernel/cpu/mcheck/mce.h
--- linux-2.6.11.6-move-files-mce/arch/i386/kernel/cpu/mcheck/mce.h
2005-04-12 17:29:57.000000000 +0800
+++ linux-2.6.11.6-move-files-mce-fix/arch/i386/kernel/cpu/mcheck/mce.h
2005-04-28 10:02:09.386327560 +0800
@@ -68,6 +68,7 @@
#define MCE_EXTENDED_BANK 128
#define MCE_THERMAL_BANK MCE_EXTENDED_BANK + 0
+void __init 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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH]fix warning in porting lockless mce from x86_64 to i386
2005-04-28 2:24 [PATCH]fix warning in porting lockless mce from x86_64 to i386 Guo, Racing
@ 2005-04-28 2:40 ` Zwane Mwaikambo
0 siblings, 0 replies; 2+ messages in thread
From: Zwane Mwaikambo @ 2005-04-28 2:40 UTC (permalink / raw)
To: Guo, Racing; +Cc: Andrew Morton, Andi Kleen, Yu, Luming, linux-kernel
On Thu, 28 Apr 2005, Guo, Racing wrote:
> 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
Hmm i think i may have missed the original patch, could you send it to me?
Thanks,
Zwane
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-28 2:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-28 2:24 [PATCH]fix warning in porting lockless mce from x86_64 to i386 Guo, Racing
2005-04-28 2:40 ` Zwane Mwaikambo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).