From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] More PCI fixes for 2.6.10-rc2
Date: Tue, 30 Nov 2004 16:10:04 -0800 [thread overview]
Message-ID: <11018598042649@kroah.com> (raw)
In-Reply-To: <11018598042987@kroah.com>
ChangeSet 1.2223.2.4, 2004/11/29 11:13:49-08:00, ak@suse.de
[PATCH] PCI: Disable mmconfig on AMD CPUs.
Disable mmconfig on AMD CPUs.
This patch fixes various problems on PCI Express boards, like the
Nforce4. They have a MCFG table in ACPI, but not all devices can be
accessed using MMCONFIG. e.g. the CPU builtin PCI devices in the A64
Northbridge can't. Linux happily uses mmconfig for all PCI devices and
that cause failures and memory corruption.
Right solution apparently is to get more information from MCFG which is
supposed to tell for which busses mmconfig is legal and for which ones
not. But that would be a much more complicated patch and I don't have
a specification of this enhanced table.
This patch just disable MMCONFIG on all AMD CPUs. This is a kludge,
but works around the problem for now.
Patch for both i386 and x86-64
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
arch/i386/pci/mmconfig.c | 7 +++++++
arch/x86_64/pci/mmconfig.c | 7 +++++++
2 files changed, 14 insertions(+)
diff -Nru a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
--- a/arch/i386/pci/mmconfig.c 2004-11-30 15:47:12 -08:00
+++ b/arch/i386/pci/mmconfig.c 2004-11-30 15:47:12 -08:00
@@ -102,6 +102,13 @@
if (!pci_mmcfg_base_addr)
goto out;
+ /* Kludge for now. Don't use mmconfig on AMD systems because
+ those have some busses where mmconfig doesn't work,
+ and we don't parse ACPI MCFG well enough to handle that.
+ Remove when proper handling is added. */
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ goto out;
+
printk(KERN_INFO "PCI: Using MMCONFIG\n");
raw_pci_ops = &pci_mmcfg;
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
diff -Nru a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c
--- a/arch/x86_64/pci/mmconfig.c 2004-11-30 15:47:12 -08:00
+++ b/arch/x86_64/pci/mmconfig.c 2004-11-30 15:47:12 -08:00
@@ -78,6 +78,13 @@
if (!pci_mmcfg_base_addr)
return 0;
+ /* Kludge for now. Don't use mmconfig on AMD systems because
+ those have some busses where mmconfig doesn't work,
+ and we don't parse ACPI MCFG well enough to handle that.
+ Remove when proper handling is added. */
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+ return 0;
+
/* RED-PEN i386 doesn't do _nocache right now */
pci_mmcfg_virt = ioremap_nocache(pci_mmcfg_base_addr, MMCONFIG_APER_SIZE);
if (!pci_mmcfg_virt) {
next prev parent reply other threads:[~2004-12-01 0:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-01 0:09 [BK PATCH] More PCI fixes for 2.6.10-rc2 Greg KH
2004-12-01 0:10 ` [PATCH] " Greg KH
2004-12-01 0:10 ` Greg KH
2004-12-01 0:10 ` Greg KH
2004-12-01 0:10 ` Greg KH [this message]
2004-12-01 0:10 ` Greg KH
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=11018598042649@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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