diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-04-14 16:08:25 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-26 23:41:04 +0200 |
commit | 5f0b2976cb2b62668a076f54419c24b8ab677167 (patch) | |
tree | da8439a413adf51359728208beab5ce9f6863ce5 /arch/x86/kernel/mmconf-fam10h_64.c | |
parent | e8ee6f0ae5cd860e8e6c02807edfa3c1fa01bcb5 (diff) | |
download | linux-5f0b2976cb2b62668a076f54419c24b8ab677167.tar.bz2 |
x86: add pci=check_enable_amd_mmconf and dmi check
so will disable that feature by default, and only enable that via
pci=check_enable_amd_mmconf or for system match with dmi table.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/mmconf-fam10h_64.c')
-rw-r--r-- | arch/x86/kernel/mmconf-fam10h_64.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/x86/kernel/mmconf-fam10h_64.c b/arch/x86/kernel/mmconf-fam10h_64.c index 37897920ec65..edc5fbfe85c0 100644 --- a/arch/x86/kernel/mmconf-fam10h_64.c +++ b/arch/x86/kernel/mmconf-fam10h_64.c @@ -6,12 +6,15 @@ #include <linux/mm.h> #include <linux/string.h> #include <linux/pci.h> +#include <linux/dmi.h> #include <asm/pci-direct.h> #include <linux/sort.h> #include <asm/io.h> #include <asm/msr.h> #include <asm/acpi.h> +#include "../pci/pci.h" + struct pci_hostbridge_probe { u32 bus; u32 slot; @@ -176,6 +179,9 @@ void __cpuinit fam10h_check_enable_mmcfg(void) u64 val; u32 address; + if (!(pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF)) + return; + address = MSR_FAM10H_MMIO_CONF_BASE; rdmsrl(address, val); @@ -213,3 +219,25 @@ void __cpuinit fam10h_check_enable_mmcfg(void) FAM10H_MMIO_CONF_ENABLE; wrmsrl(address, val); } + +static int __devinit set_check_enable_amd_mmconf(const struct dmi_system_id *d) +{ + pci_probe |= PCI_CHECK_ENABLE_AMD_MMCONF; + return 0; +} + +static struct dmi_system_id __devinitdata mmconf_dmi_table[] = { + { + .callback = set_check_enable_amd_mmconf, + .ident = "Sun Microsystems Machine", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sun Microsystems"), + }, + }, + {} +}; + +void __init check_enable_amd_mmconf_dmi(void) +{ + dmi_check_system(mmconf_dmi_table); +} |