mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: davej@codemonkey.org.uk
To: torvalds@transmeta.com, alan@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Tighten up serverworks workaround.
Date: Wed, 26 Feb 2003 13:49:00 GMT	[thread overview]
Message-ID: <200302261349.h1QDn06X002823@deviant.impure.org.uk> (raw)

Aparently on rev6 of the LE and above, this workaround
isn't needed. Lets give it a try, and see what happens.

    Dave

diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/kernel/cpu/mtrr/main.c linux-2.5/arch/i386/kernel/cpu/mtrr/main.c
--- bk-linus/arch/i386/kernel/cpu/mtrr/main.c	2003-02-25 13:10:08.000000000 -0100
+++ linux-2.5/arch/i386/kernel/cpu/mtrr/main.c	2003-02-24 16:36:06.000000000 -0100
@@ -75,20 +75,24 @@ void set_mtrr_ops(struct mtrr_ops * ops)
 static int have_wrcomb(void)
 {
 	struct pci_dev *dev = NULL;
-
-	/* WTF is this?
-	 * Someone, please shoot me.
-	 */
-
-	/* ServerWorks LE chipsets have problems with write-combining 
-	   Don't allow it and leave room for other chipsets to be tagged */
+	u8 rev;
 
 	if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) != NULL) {
 		if ((dev->vendor == PCI_VENDOR_ID_SERVERWORKS) &&
 		    (dev->device == PCI_DEVICE_ID_SERVERWORKS_LE)) {
-			printk(KERN_INFO
-			       "mtrr: Serverworks LE detected. Write-combining disabled.\n");
-			return 0;
+
+			/* ServerWorks LE chipsets have problems with write-combining 
+			   Don't allow it and leave room for other chipsets to be tagged.
+			   Rumour has it that rev6 and above are ok. */
+			pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev);  
+			if (rev > 5) {
+				printk ("mtrr: Serverworks LE rev %d detected. Earlier versions of this chipset had mtrr bugs\n", rev);
+				printk ("mtrr: Please send mail to linux-kernel@vger.kernel.org if this seems stable.\n");
+				return 1;
+			} else {
+				printk(KERN_INFO "mtrr: Serverworks LE detected. Write-combining disabled.\n");
+				return 0;
+			}
 		}
 	}
 	return (mtrr_if->have_wrcomb ? mtrr_if->have_wrcomb() : 0);

             reply	other threads:[~2003-02-26 13:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 13:49 davej [this message]
2003-02-26 16:27 ` Alan Cox
2003-02-26 16:29   ` Dave Jones
2003-02-26 16:36     ` Alan Cox
2003-02-26 17:27       ` Kimball Brown
2003-02-26 18:03         ` Alan Cox
2003-02-26 18:47           ` Jonathan Lundell
2003-02-27 12:14             ` Ingo Oeser
2003-03-03  9:03           ` Mike A. Harris
2003-03-03 10:45           ` Stephan von Krawczynski
2003-03-03 12:02             ` Alan Cox
2003-03-03 12:46               ` Stephan von Krawczynski
2003-03-03 14:42                 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200302261349.h1QDn06X002823@deviant.impure.org.uk \
    --to=davej@codemonkey.org.uk \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®