From xemacs-m  Sat Aug 16 19:35:24 1997
Received: from GS213.SP.CS.CMU.EDU (GS213.SP.CS.CMU.EDU [128.2.209.183])
	by xemacs.org (8.8.5/8.8.5) with SMTP id TAA06623
	for <xemacs-beta@xemacs.org>; Sat, 16 Aug 1997 19:35:23 -0500 (CDT)
Received: by GS213.SP.CS.CMU.EDU (AIX 3.2/UCB 5.64/4.03)
          id AA22366; Sat, 16 Aug 1997 20:35:22 -0400
Date: Sat, 16 Aug 1997 20:35:22 -0400
Message-Id: <9708170035.AA22366@GS213.SP.CS.CMU.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Darrell Kindred <dkindred@cmu.edu>
To: "Karl M. Hegbloom" <karlheg@inetarena.com>
Cc: XEmacs BETA <xemacs-beta@xemacs.org>
Subject: Re: assertion failed, file extents.c, line 845, foundp
Organization: Carnegie Mellon University School of Computer Science
In-Reply-To: <87en7uwku5.fsf@bittersweet.inetarena.com>
References: <199708131917.MAA06735@bittersweet.inetarena.com>
	<QQdcmg23246.199708132333@crystal.WonderWorks.COM>
	<9708160500.AA13424@GS213.SP.CS.CMU.EDU>
	<87en7uwku5.fsf@bittersweet.inetarena.com>
X-Mailer: VM 6.22 under 19.15 XEmacs Lucid

Karl M. Hegbloom writes:
 >  I've just verified the correctness of Darrell's theory.  It fails
 > immediately with the kernel compiled for 586, but succeeds forever
 > with in compiled for 386.
 > 
 >  Do you know if the same bug is in the K6 CPU's?  I'm thinking about
 > buying one.  Should I get an Intel instead?

I don't know whether the K6 has the same bug.  If someone
has one, I'd be interested in finding out.

By the way, if you'd prefer to build your kernel for
Pentium, I think the attached patch is sufficient to work
around the bug.

- Darrell

--- include/asm-i386/pgtable.h.dk-orig	Sat Aug 16 20:31:02 1997
+++ include/asm-i386/pgtable.h	Sat Aug 16 20:33:13 1997
@@ -42,7 +42,9 @@
 #define __flush_tlb() \
 do { unsigned long tmpreg; __asm__ __volatile__("movl %%cr3,%0\n\tmovl %0,%%cr3":"=r" (tmpreg) : :"memory"); } while (0)
 
-#ifdef CONFIG_M386
+#define AMD_K5_BUG_WORKAROUND 1
+
+#if defined(CONFIG_M386) || defined(AMD_K5_BUG_WORKAROUND)
 #define __flush_tlb_one(addr) flush_tlb()
 #else
 #define __flush_tlb_one(addr) \

