aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/acpi
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-20 05:52:15 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-20 05:52:15 -0400
commit7393423dd9b5790a3115873be355e9fc862bce8f (patch)
treefc83214602c8ce41dc06d5c8e21deada679521f7 /arch/x86/kernel/acpi
parent8df9676d6402563da91427e8d9f2da8a4598aede (diff)
parent1fca25427482387689fa27594c992a961d98768f (diff)
Merge branch 'linus' into x86/cleanups
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r--arch/x86/kernel/acpi/boot.c16
-rw-r--r--arch/x86/kernel/acpi/sleep.c4
2 files changed, 17 insertions, 3 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index d8d118935b0..f20470823d3 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -96,6 +96,8 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
96#warning ACPI uses CMPXCHG, i486 and later hardware 96#warning ACPI uses CMPXCHG, i486 and later hardware
97#endif 97#endif
98 98
99static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
100
99/* -------------------------------------------------------------------------- 101/* --------------------------------------------------------------------------
100 Boot-time Configuration 102 Boot-time Configuration
101 -------------------------------------------------------------------------- */ 103 -------------------------------------------------------------------------- */
@@ -157,6 +159,14 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
157struct acpi_mcfg_allocation *pci_mmcfg_config; 159struct acpi_mcfg_allocation *pci_mmcfg_config;
158int pci_mmcfg_config_num; 160int pci_mmcfg_config_num;
159 161
162static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg)
163{
164 if (!strcmp(mcfg->header.oem_id, "SGI"))
165 acpi_mcfg_64bit_base_addr = TRUE;
166
167 return 0;
168}
169
160int __init acpi_parse_mcfg(struct acpi_table_header *header) 170int __init acpi_parse_mcfg(struct acpi_table_header *header)
161{ 171{
162 struct acpi_table_mcfg *mcfg; 172 struct acpi_table_mcfg *mcfg;
@@ -189,8 +199,12 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
189 } 199 }
190 200
191 memcpy(pci_mmcfg_config, &mcfg[1], config_size); 201 memcpy(pci_mmcfg_config, &mcfg[1], config_size);
202
203 acpi_mcfg_oem_check(mcfg);
204
192 for (i = 0; i < pci_mmcfg_config_num; ++i) { 205 for (i = 0; i < pci_mmcfg_config_num; ++i) {
193 if (pci_mmcfg_config[i].address > 0xFFFFFFFF) { 206 if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) &&
207 !acpi_mcfg_64bit_base_addr) {
194 printk(KERN_ERR PREFIX 208 printk(KERN_ERR PREFIX
195 "MMCONFIG not in low 4GB of memory\n"); 209 "MMCONFIG not in low 4GB of memory\n");
196 kfree(pci_mmcfg_config); 210 kfree(pci_mmcfg_config);
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index fa2161d5003..426e5d91b63 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -20,7 +20,7 @@ unsigned long acpi_realmode_flags;
20/* address in low memory of the wakeup routine. */ 20/* address in low memory of the wakeup routine. */
21static unsigned long acpi_realmode; 21static unsigned long acpi_realmode;
22 22
23#ifdef CONFIG_64BIT 23#if defined(CONFIG_SMP) && defined(CONFIG_64BIT)
24static char temp_stack[10240]; 24static char temp_stack[10240];
25#endif 25#endif
26 26
@@ -86,7 +86,7 @@ int acpi_save_state_mem(void)
86#endif /* !CONFIG_64BIT */ 86#endif /* !CONFIG_64BIT */
87 87
88 header->pmode_cr0 = read_cr0(); 88 header->pmode_cr0 = read_cr0();
89 header->pmode_cr4 = read_cr4(); 89 header->pmode_cr4 = read_cr4_safe();
90 header->realmode_flags = acpi_realmode_flags; 90 header->realmode_flags = acpi_realmode_flags;
91 header->real_magic = 0x12345678; 91 header->real_magic = 0x12345678;
92 92