linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Athlon bug stomper. Pls apply.
@ 2001-09-18 14:51 VDA
  2001-09-18 15:43 ` Alan Cox
                   ` (3 more replies)
  0 siblings, 4 replies; 69+ messages in thread
From: VDA @ 2001-09-18 14:51 UTC (permalink / raw)
  To: linux-kernel

Hi Linus, Alan,

Since we don't have any negative feedback on Athlon bug
stomper, I think patch could be applied to
arch/i386/kernel/pci-pc.c in mainline kernel.
Diffed against 4.2.9.
BTW, there are similar fixup routines in drivers/pci/quirks.c
Why two .c files for hw related fixes?
-- 
Best regards, VDA
mailto:VDA@port.imtp.ilyichevsk.odessa.ua
http://port.imtp.ilyichevsk.odessa.ua/vda/

--- pci-pc.c.orig       Sun Aug 12 15:54:07 2001
+++ pci-pc.c    Tue Sep 18 16:45:21 2001
@@ -948,6 +948,26 @@
        d->irq = 9;
 }
 
+/* Fixes some oopses on Athlon optimized
+ * fast_copy_page when it uses 'movntq's
+ * instead of 'movq's on Athlon/Duron optimized kernels. 
+ * Bit 7 at offset 0x55 seems to be responsible:
+ * > Device 0 Offset 55 - Debug (RW)
+ * >   Bits 7-0: Reserved (do not program). default = 0
+ * ABIT KT7A 3R BIOS: 0x89 (oopses)
+ * ABIT KT7A YH BIOS: 0x00 (works)
+ */
+static void __init pci_fixup_athlon_bug(struct pci_dev *d)
+{
+       u8 v;
+        pci_read_config_byte(d, 0x55, &v);
+        if(v & 0x80) {
+                printk(KERN_NOTICE "Stomping on Athlon bug.\n");
+                v &= 0x7f; /* clear bit 55.7 */
+                pci_write_config_byte(d, 0x55, v);
+        }
+}
+
 struct pci_fixup pcibios_fixups[] = {
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_INTEL,    PCI_DEVICE_ID_INTEL_82451NX,    pci_fixup_i450nx },
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_INTEL,    PCI_DEVICE_ID_INTEL_82454GX,    pci_fixup_i450gx },
@@ -961,6 +981,7 @@
 /* Our bus code shouldnt need this fixup any more. Delete once verified */
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_COMPAQ,   PCI_DEVICE_ID_COMPAQ_6010,      pci_fixup_compaq },
 #endif 
+       { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_8363_0,       pci_fixup_athlon_bug },
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_UMC,      PCI_DEVICE_ID_UMC_UM8886BF,     pci_fixup_umc_ide },
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_SI,       PCI_DEVICE_ID_SI_5513,          pci_fixup_ide_trash },
        { PCI_FIXUP_HEADER,     PCI_ANY_ID,             PCI_ANY_ID,                     pci_fixup_ide_bases },



^ permalink raw reply	[flat|nested] 69+ messages in thread
* Re: [PATCH] Athlon bug stomper. Pls apply.
@ 2001-09-19 21:15 Petr Vandrovec
  2001-09-19 19:21 ` Arjan van de Ven
  2001-09-19 20:52 ` Vojtech Pavlik
  0 siblings, 2 replies; 69+ messages in thread
From: Petr Vandrovec @ 2001-09-19 21:15 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel

On 19 Sep 01 at 19:55, Arjan van de Ven wrote:
> 
> Ok but that part is simple:
> 
> run
> 
> http://www.fenrus.demon.nl/athlon.c

Small question - is it OK that 'faster_copy' is faster than
'even_faster'? By only few percents, but... It is dual cpu Tyan,
with two AMD MP 1.2MHz, with 1022:700C AMD hostbridge. I'll
check KT133 at home if I'll remember...
                                        Thanks,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

Athlon test program $Id: fast.c,v 1.6 2000/09/23 09:05:45 arjan Exp $ 
clear_page() tests 
clear_page function 'warm up run'    took 13967 cycles per page
clear_page function '2.4 non MMX'    took 9298 cycles per page
clear_page function '2.4 MMX fallback'   took 9284 cycles per page
clear_page function '2.4 MMX version'    took 8508 cycles per page
clear_page function 'faster_clear_page'  took 4016 cycles per page
clear_page function 'even_faster_clear'  took 3916 cycles per page

copy_page() tests 
copy_page function 'warm up run'     took 15118 cycles per page
copy_page function '2.4 non MMX'     took 17002 cycles per page
copy_page function '2.4 MMX fallback'    took 16978 cycles per page
copy_page function '2.4 MMX version'     took 15163 cycles per page
copy_page function 'faster_copy'     took 8569 cycles per page
copy_page function 'even_faster'     took 8805 cycles per page

^ permalink raw reply	[flat|nested] 69+ messages in thread
* RE: [PATCH] Athlon bug stomper. Pls apply.
@ 2001-09-19 23:33 Leif Sawyer
  0 siblings, 0 replies; 69+ messages in thread
From: Leif Sawyer @ 2001-09-19 23:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Eric W. Biederman, Arjan van de Ven, Petr Vandrovec, Dan Hollis,
	John Alvord

Dan Hollis continues the line with..
> On Wed, 19 Sep 2001, John Alvord wrote:
> > >Until we have a straight answer what the hell this bit 
> does, its a very
> > >bad idea to put it into *production kernel*.
> > Of course the BIOS versions made exactly that change...
> 
> 1) We dont know if all "fixed" BIOS versions do it
> 2) We dont know if all motherboards do it
> 3) We dont have enough data points to determine if this is a 
> "real fix" yet.
> 4) We dont know if they do it under all circumstances
>    (eg do they read SPD and set it in some situations and not others)
>    It may even be CPU rev specific.
> 
> IMHO its *FAR* too premature to be rolling this into 
> production kernels
> based on the scant evidence we have so far.
> 

You all realize that this ranting about 'not for production kernels' is
a waste of time and bandwidth, right?

Make it a compile time option.  Simple, Elegant, and you can
choose to try it or not.  

Of course, now that this can of worms is open, the debate will
range on whether it's default is Enabled or Disabled.

Sheesh.

(i'd enclose an updated patch, but I deleted the original posting.)

^ permalink raw reply	[flat|nested] 69+ messages in thread
* Re: [PATCH] Athlon bug stomper. Pls apply.
@ 2001-09-20 13:08 Petr Vandrovec
  0 siblings, 0 replies; 69+ messages in thread
From: Petr Vandrovec @ 2001-09-20 13:08 UTC (permalink / raw)
  To: Dan Hollis; +Cc: Arjan van de Ven, linux-kernel, ebiederm

On 19 Sep 01 at 15:13, Dan Hollis wrote:
> On 19 Sep 2001, Eric W. Biederman wrote:
> > Of course VIA looking at what they have done and what that bit is
> > supposed to be is easiest as they have the schemantics of those
> > chips.  But there is not reason to be limited to just that approach.

Well, I want to add some confusion into this thread...
 
> We definitely need more data points too. So far we dont have any athlon.c
> data for kt133a with the bit on and off, only kt133.

... I have at home Asus A7V (with KT133, non A), it has register 0x55
set to 0x89 and I thought that it works fine. I modified athlon.c
so that it fills buffer with random data on start, and then it compares
results of copy_page. And after about 10th run with 0x89 promise
driver told me that func:13 (not 14...) is not supported and all HDDs
became inaccessible. After reboot portion of /usr/include/bits (and 
few other) was overwritten with 0xFF... I was not able to recreate 
this problem after that crash (but I did not tried too hard, as I have
important data on my hdds, and all hdds attached to promise were
affected, not only one which was 'active' before crash (I was doing
compilation & logged outputs on secondary master, but primary master
was corrupted...)

After fsck, reinstalling libc6-dev and apache-doc, I started playing
with 0x55 bits and found that bits 0x80 and 0x01 have no effect on
performance, but CLEARING bit 0x08 increases my motherboard performace
by 1% (I'm getting very consistent results, they vary around +-10 cycles,
with 12200 cycles with 0x08 and 12060 with 0x00 in register 0x55).

So I personally will apply this patch even on my KT133... And just
for completness, kernel 2.4.9-ac10 (with AMD opts), Athlon 1GHz, two
singlesided 128MB DIMMs, interleaving enabled (disabling slows down
K7 copy page system by 4%).
                                            Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2001-09-25 19:43 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-18 14:51 [PATCH] Athlon bug stomper. Pls apply VDA
2001-09-18 15:43 ` Alan Cox
2001-09-20  4:56   ` Albert D. Cahalan
2001-09-18 17:45 ` Jeff Garzik
2001-09-18 21:39 ` Liakakis Kostas
2001-09-19 13:08   ` Re[2]: " VDA
2001-09-19 13:41     ` Liakakis Kostas
2001-09-19 13:47       ` Thomas Langås
2001-09-19 14:31         ` Liakakis Kostas
2001-09-19 14:43           ` Stefan Smietanowski
2001-09-19 14:55           ` Re[2]: " Jan Niehusmann
2001-09-19 14:57             ` Liakakis Kostas
2001-09-19 18:12               ` Alan Cox
2001-09-19 21:18                 ` Re[2]: [PATCH] VIA " Aaron Tiensivu
2001-09-19 23:04                   ` Roberto Jung Drebes
2001-09-19 23:41                     ` Nicholas Knight
2001-09-19 16:00             ` Re[2]: [PATCH] Athlon " Linus Torvalds
2001-09-19 17:15               ` safemode
2001-09-19 18:22                 ` Stefan Smietanowski
2001-09-19 23:41                 ` Re[2]: " Nicholas Knight
2001-09-20 15:10                   ` Marek Mentel
2001-09-19 18:43               ` Dan Hollis
2001-09-19 18:55                 ` Arjan van de Ven
2001-09-19 19:00                   ` Roberto Jung Drebes
2001-09-19 19:17                     ` Arjan van de Ven
2001-09-19 20:16                     ` Dan Hollis
2001-09-19 19:50                   ` Ignacio Vazquez-Abrams
2001-09-19 20:01                     ` Ignacio Vazquez-Abrams
2001-09-19 20:40                       ` Ignacio Vazquez-Abrams
2001-09-19 21:43                         ` safemode
2001-09-19 22:22                           ` Brad Pepers
2001-09-19 22:28                             ` Erno Kuusela
2001-09-19 20:36                   ` Vojtech Pavlik
2001-09-19 20:57                     ` Dan Hollis
2001-09-19 21:29                       ` Vojtech Pavlik
2001-09-19 23:23                   ` Luigi Genoni
2001-09-19 18:58                 ` Re[2]: " Roberto Jung Drebes
2001-09-19 20:35                 ` Athlon bug stomper: perf. results brian
2001-09-19 20:30                   ` Dan Hollis
2001-09-19 22:14                     ` brian
2001-09-19 22:08                       ` Dan Hollis
2001-09-19 20:36                 ` [PATCH] Athlon bug stomper. Pls apply Simen Thoresen
2001-09-19 20:37                   ` Dan Hollis
2001-09-19 20:51                     ` Simen Thoresen
2001-09-19 23:00                       ` Roberto Jung Drebes
2001-09-20  9:03                 ` VDA
2001-09-21  0:46                 ` Re[2]: " Pavel Machek
2001-09-20  0:19               ` Nicholas Knight
2001-09-20  1:27                 ` Stefan Smietanowski
2001-09-20  9:54                 ` Re[2]: " Liakakis Kostas
2001-09-19 23:04             ` Luigi Genoni
2001-09-19 14:05       ` Tom Diehl
2001-09-23 23:33 ` Jan Niehusmann
2001-09-24 15:44   ` bill davidsen
2001-09-19 21:15 Petr Vandrovec
2001-09-19 19:21 ` Arjan van de Ven
2001-09-19 19:51   ` Dan Hollis
2001-09-19 19:59     ` Arjan van de Ven
2001-09-19 21:44     ` Eric W. Biederman
2001-09-19 22:13       ` Dan Hollis
2001-09-19 22:49         ` John Alvord
2001-09-19 23:14           ` Dan Hollis
2001-09-19 23:32             ` Daniel T. Chen
2001-09-19 22:55         ` Roberto Jung Drebes
2001-09-21 17:22     ` bill davidsen
2001-09-21 19:13       ` Dan Hollis
2001-09-19 20:52 ` Vojtech Pavlik
2001-09-19 23:33 Leif Sawyer
2001-09-20 13:08 Petr Vandrovec

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).