diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-04-14 19:08:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-26 17:41:04 -0400 |
commit | 5f0b2976cb2b62668a076f54419c24b8ab677167 (patch) | |
tree | da8439a413adf51359728208beab5ce9f6863ce5 /arch/x86/kernel/mmconf-fam10h_64.c | |
parent | e8ee6f0ae5cd860e8e6c02807edfa3c1fa01bcb5 (diff) |
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 @@ | |||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
9 | #include <linux/dmi.h> | ||
9 | #include <asm/pci-direct.h> | 10 | #include <asm/pci-direct.h> |
10 | #include <linux/sort.h> | 11 | #include <linux/sort.h> |
11 | #include <asm/io.h> | 12 | #include <asm/io.h> |
12 | #include <asm/msr.h> | 13 | #include <asm/msr.h> |
13 | #include <asm/acpi.h> | 14 | #include <asm/acpi.h> |
14 | 15 | ||
16 | #include "../pci/pci.h" | ||
17 | |||
15 | struct pci_hostbridge_probe { | 18 | struct pci_hostbridge_probe { |
16 | u32 bus; | 19 | u32 bus; |
17 | u32 slot; | 20 | u32 slot; |
@@ -176,6 +179,9 @@ void __cpuinit fam10h_check_enable_mmcfg(void) | |||
176 | u64 val; | 179 | u64 val; |
177 | u32 address; | 180 | u32 address; |
178 | 181 | ||
182 | if (!(pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF)) | ||
183 | return; | ||
184 | |||
179 | address = MSR_FAM10H_MMIO_CONF_BASE; | 185 | address = MSR_FAM10H_MMIO_CONF_BASE; |
180 | rdmsrl(address, val); | 186 | rdmsrl(address, val); |
181 | 187 | ||
@@ -213,3 +219,25 @@ void __cpuinit fam10h_check_enable_mmcfg(void) | |||
213 | FAM10H_MMIO_CONF_ENABLE; | 219 | FAM10H_MMIO_CONF_ENABLE; |
214 | wrmsrl(address, val); | 220 | wrmsrl(address, val); |
215 | } | 221 | } |
222 | |||
223 | static int __devinit set_check_enable_amd_mmconf(const struct dmi_system_id *d) | ||
224 | { | ||
225 | pci_probe |= PCI_CHECK_ENABLE_AMD_MMCONF; | ||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static struct dmi_system_id __devinitdata mmconf_dmi_table[] = { | ||
230 | { | ||
231 | .callback = set_check_enable_amd_mmconf, | ||
232 | .ident = "Sun Microsystems Machine", | ||
233 | .matches = { | ||
234 | DMI_MATCH(DMI_SYS_VENDOR, "Sun Microsystems"), | ||
235 | }, | ||
236 | }, | ||
237 | {} | ||
238 | }; | ||
239 | |||
240 | void __init check_enable_amd_mmconf_dmi(void) | ||
241 | { | ||
242 | dmi_check_system(mmconf_dmi_table); | ||
243 | } | ||