Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262181AbTKIGWF (ORCPT ); Sun, 9 Nov 2003 01:22:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262192AbTKIGWE (ORCPT ); Sun, 9 Nov 2003 01:22:04 -0500 Received: from zeus.kernel.org ([204.152.189.113]:32708 "EHLO zeus.kernel.org") by vger.kernel.org with ESMTP id S262181AbTKIGWA (ORCPT ); Sun, 9 Nov 2003 01:22:00 -0500 Date: Mon, 3 Nov 2003 17:20:48 +0800 From: Geoffrey Lee To: Dave Jones , linux-kernel@vger.kernel.org Subject: Re: [patch] reproducible athlon mce fix Message-ID: <20031103092048.GB14080@anakin.wychk.org> References: <20031102055748.GA1218@anakin.wychk.org> <20031102125202.GA7992@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <20031102125202.GA7992@redhat.com> User-Agent: Mutt/1.5.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2235 Lines: 82 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=big5 Content-Disposition: inline On Sun, Nov 02, 2003 at 12:52:03PM +0000, Dave Jones wrote: > On Sun, Nov 02, 2003 at 01:57:48PM +0800, Geoffrey Lee wrote: > > > preempt_disable(); > > +#if CONFIG_MK7 > > + for (i=1; i > +#else > > for (i=0; i > +#endif > > rdmsr (MSR_IA32_MC0_STATUS+i*4, low, high); > > This needs to be a runtime check. In 2.6, a K7 can boot > a P4 kernel, and vice versa. > (Resending as it seems to have eaten my mail due to dns problems ... apologies if you get this twice.) Would checking boot_cpu_data.x86_vendor == X86_VENDOR_AMD and boot_cpu_data.x86 == 6 be sufficient? It seems to do the right thing .. Updated patch attached. - g. --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=big5 Content-Disposition: attachment; filename="mce-fix.patch" --- linux-2.6.0-test9/arch/i386/kernel/cpu/mcheck/non-fatal.c.orig 2003-11-02 13:31:43.000000000 +0800 +++ linux-2.6.0-test9/arch/i386/kernel/cpu/mcheck/non-fatal.c 2003-11-02 21:50:36.000000000 +0800 @@ -21,6 +21,7 @@ static struct timer_list mce_timer; static int timerset; +static int startbank; #define MCE_RATE 15*HZ /* timer rate is 15s */ @@ -30,7 +31,7 @@ int i; preempt_disable(); - for (i=0; i