aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-09 14:55:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-09 14:55:14 -0500
commita3a798c88a14b35e5d4ca30716dbc9eb9a1ddfe2 (patch)
tree393969a0f1405237483c8c29b904690f2bb90559 /arch
parentefcb3cf7f00c3c424db012380a8a974c2676a3c8 (diff)
parentd97c0defba25a959a990f6d4759f43075540832e (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (94 commits) ACPICA: hide private headers ACPICA: create acpica/ directory ACPI: fix build warning ACPI : Use RSDT instead of XSDT by adding boot option of "acpi=rsdt" ACPI: Avoid array address overflow when _CST MWAIT hint bits are set fujitsu-laptop: Simplify SBLL/SBL2 backlight handling fujitsu-laptop: Add BL power, LED control and radio state information ACPICA: delete utcache.c ACPICA: delete acdisasm.h ACPICA: Update version to 20081204. ACPICA: FADT: Update error msgs for consistency ACPICA: FADT: set acpi_gbl_use_default_register_widths to TRUE by default ACPICA: FADT parsing changes and fixes ACPICA: Add ACPI_MUTEX_TYPE configuration option ACPICA: Fixes for various ACPI data tables ACPICA: Restructure includes into public/private ACPI: remove private acpica headers from driver files ACPI: reboot.c: use new acpi_reset interface ACPICA: New: acpi_reset interface - write to reset register ACPICA: Move all public H/W interfaces to new hwxface ...
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/include/asm/acpi-ext.h1
-rw-r--r--arch/ia64/include/asm/sn/acpi.h2
-rw-r--r--arch/ia64/kernel/acpi.c1
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c103
-rw-r--r--arch/ia64/sn/kernel/io_common.c5
-rw-r--r--arch/x86/kernel/acpi/boot.c17
-rw-r--r--arch/x86/kernel/acpi/cstate.c4
-rw-r--r--arch/x86/kernel/acpi/sleep.c2
-rw-r--r--arch/x86/kernel/e820.c21
9 files changed, 101 insertions, 55 deletions
diff --git a/arch/ia64/include/asm/acpi-ext.h b/arch/ia64/include/asm/acpi-ext.h
index 734d137dda6e..7f8362b379eb 100644
--- a/arch/ia64/include/asm/acpi-ext.h
+++ b/arch/ia64/include/asm/acpi-ext.h
@@ -14,7 +14,6 @@
14#define _ASM_IA64_ACPI_EXT_H 14#define _ASM_IA64_ACPI_EXT_H
15 15
16#include <linux/types.h> 16#include <linux/types.h>
17#include <acpi/actypes.h>
18 17
19extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length); 18extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length);
20 19
diff --git a/arch/ia64/include/asm/sn/acpi.h b/arch/ia64/include/asm/sn/acpi.h
index 9ce2801cbd57..fd480db25565 100644
--- a/arch/ia64/include/asm/sn/acpi.h
+++ b/arch/ia64/include/asm/sn/acpi.h
@@ -9,8 +9,6 @@
9#ifndef _ASM_IA64_SN_ACPI_H 9#ifndef _ASM_IA64_SN_ACPI_H
10#define _ASM_IA64_SN_ACPI_H 10#define _ASM_IA64_SN_ACPI_H
11 11
12#include "acpi/acglobal.h"
13
14extern int sn_acpi_rev; 12extern int sn_acpi_rev;
15#define SN_ACPI_BASE_SUPPORT() (sn_acpi_rev >= 0x20101) 13#define SN_ACPI_BASE_SUPPORT() (sn_acpi_rev >= 0x20101)
16 14
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 0553648b7595..d541671caf4a 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -65,6 +65,7 @@ EXPORT_SYMBOL(pm_idle);
65void (*pm_power_off) (void); 65void (*pm_power_off) (void);
66EXPORT_SYMBOL(pm_power_off); 66EXPORT_SYMBOL(pm_power_off);
67 67
68u32 acpi_rsdt_forced;
68unsigned int acpi_cpei_override; 69unsigned int acpi_cpei_override;
69unsigned int acpi_cpei_phys_cpuid; 70unsigned int acpi_cpei_phys_cpuid;
70 71
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index bc610a6c7851..c5a214026a77 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -13,7 +13,6 @@
13#include <asm/sn/sn_sal.h> 13#include <asm/sn/sn_sal.h>
14#include "xtalk/hubdev.h" 14#include "xtalk/hubdev.h"
15#include <linux/acpi.h> 15#include <linux/acpi.h>
16#include <acpi/acnamesp.h>
17 16
18 17
19/* 18/*
@@ -64,6 +63,7 @@ static acpi_status __init
64sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret) 63sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
65{ 64{
66 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 65 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
66 struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
67 u64 addr; 67 u64 addr;
68 struct hubdev_info *hubdev; 68 struct hubdev_info *hubdev;
69 struct hubdev_info *hubdev_ptr; 69 struct hubdev_info *hubdev_ptr;
@@ -77,11 +77,12 @@ sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
77 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, 77 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
78 &sn_uuid, &buffer); 78 &sn_uuid, &buffer);
79 if (ACPI_FAILURE(status)) { 79 if (ACPI_FAILURE(status)) {
80 acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
80 printk(KERN_ERR 81 printk(KERN_ERR
81 "sn_acpi_hubdev_init: acpi_get_vendor_resource() " 82 "sn_acpi_hubdev_init: acpi_get_vendor_resource() "
82 "(0x%x) failed for: ", status); 83 "(0x%x) failed for: %s\n", status,
83 acpi_ns_print_node_pathname(handle, NULL); 84 (char *)name_buffer.pointer);
84 printk("\n"); 85 kfree(name_buffer.pointer);
85 return AE_OK; /* Continue walking namespace */ 86 return AE_OK; /* Continue walking namespace */
86 } 87 }
87 88
@@ -89,11 +90,12 @@ sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
89 vendor = &resource->data.vendor_typed; 90 vendor = &resource->data.vendor_typed;
90 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != 91 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
91 sizeof(struct hubdev_info *)) { 92 sizeof(struct hubdev_info *)) {
93 acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
92 printk(KERN_ERR 94 printk(KERN_ERR
93 "sn_acpi_hubdev_init: Invalid vendor data length: %d for: ", 95 "sn_acpi_hubdev_init: Invalid vendor data length: "
94 vendor->byte_length); 96 "%d for: %s\n",
95 acpi_ns_print_node_pathname(handle, NULL); 97 vendor->byte_length, (char *)name_buffer.pointer);
96 printk("\n"); 98 kfree(name_buffer.pointer);
97 goto exit; 99 goto exit;
98 } 100 }
99 101
@@ -120,6 +122,7 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
120{ 122{
121 u64 addr; 123 u64 addr;
122 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 124 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
125 struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
123 acpi_handle handle; 126 acpi_handle handle;
124 struct pcibus_bussoft *prom_bussoft_ptr; 127 struct pcibus_bussoft *prom_bussoft_ptr;
125 struct acpi_resource *resource; 128 struct acpi_resource *resource;
@@ -131,11 +134,11 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
131 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, 134 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
132 &sn_uuid, &buffer); 135 &sn_uuid, &buffer);
133 if (ACPI_FAILURE(status)) { 136 if (ACPI_FAILURE(status)) {
137 acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
134 printk(KERN_ERR "%s: " 138 printk(KERN_ERR "%s: "
135 "acpi_get_vendor_resource() failed (0x%x) for: ", 139 "acpi_get_vendor_resource() failed (0x%x) for: %s\n",
136 __func__, status); 140 __func__, status, (char *)name_buffer.pointer);
137 acpi_ns_print_node_pathname(handle, NULL); 141 kfree(name_buffer.pointer);
138 printk("\n");
139 return NULL; 142 return NULL;
140 } 143 }
141 resource = buffer.pointer; 144 resource = buffer.pointer;
@@ -168,6 +171,7 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
168{ 171{
169 u64 addr; 172 u64 addr;
170 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 173 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
174 struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
171 struct sn_irq_info *irq_info, *irq_info_prom; 175 struct sn_irq_info *irq_info, *irq_info_prom;
172 struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr; 176 struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr;
173 struct acpi_resource *resource; 177 struct acpi_resource *resource;
@@ -182,11 +186,11 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
182 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, 186 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
183 &sn_uuid, &buffer); 187 &sn_uuid, &buffer);
184 if (ACPI_FAILURE(status)) { 188 if (ACPI_FAILURE(status)) {
189 acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
185 printk(KERN_ERR 190 printk(KERN_ERR
186 "%s: acpi_get_vendor_resource() failed (0x%x) for: ", 191 "%s: acpi_get_vendor_resource() failed (0x%x) for: %s\n",
187 __func__, status); 192 __func__, status, (char *)name_buffer.pointer);
188 acpi_ns_print_node_pathname(handle, NULL); 193 kfree(name_buffer.pointer);
189 printk("\n");
190 return 1; 194 return 1;
191 } 195 }
192 196
@@ -194,11 +198,12 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
194 vendor = &resource->data.vendor_typed; 198 vendor = &resource->data.vendor_typed;
195 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != 199 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
196 sizeof(struct pci_devdev_info *)) { 200 sizeof(struct pci_devdev_info *)) {
201 acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
197 printk(KERN_ERR 202 printk(KERN_ERR
198 "%s: Invalid vendor data length: %d for: ", 203 "%s: Invalid vendor data length: %d for: %s\n",
199 __func__, vendor->byte_length); 204 __func__, vendor->byte_length,
200 acpi_ns_print_node_pathname(handle, NULL); 205 (char *)name_buffer.pointer);
201 printk("\n"); 206 kfree(name_buffer.pointer);
202 ret = 1; 207 ret = 1;
203 goto exit; 208 goto exit;
204 } 209 }
@@ -239,6 +244,9 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
239 acpi_handle parent; 244 acpi_handle parent;
240 int slot; 245 int slot;
241 acpi_status status; 246 acpi_status status;
247 struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
248
249 acpi_get_name(device_handle, ACPI_FULL_PATHNAME, &name_buffer);
242 250
243 /* 251 /*
244 * Do an upward search to find the root bus device, and 252 * Do an upward search to find the root bus device, and
@@ -249,9 +257,8 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
249 status = acpi_get_parent(child, &parent); 257 status = acpi_get_parent(child, &parent);
250 if (ACPI_FAILURE(status)) { 258 if (ACPI_FAILURE(status)) {
251 printk(KERN_ERR "%s: acpi_get_parent() failed " 259 printk(KERN_ERR "%s: acpi_get_parent() failed "
252 "(0x%x) for: ", __func__, status); 260 "(0x%x) for: %s\n", __func__, status,
253 acpi_ns_print_node_pathname(child, NULL); 261 (char *)name_buffer.pointer);
254 printk("\n");
255 panic("%s: Unable to find host devfn\n", __func__); 262 panic("%s: Unable to find host devfn\n", __func__);
256 } 263 }
257 if (parent == rootbus_handle) 264 if (parent == rootbus_handle)
@@ -259,22 +266,20 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
259 child = parent; 266 child = parent;
260 } 267 }
261 if (!child) { 268 if (!child) {
262 printk(KERN_ERR "%s: Unable to find root bus for: ", 269 printk(KERN_ERR "%s: Unable to find root bus for: %s\n",
263 __func__); 270 __func__, (char *)name_buffer.pointer);
264 acpi_ns_print_node_pathname(device_handle, NULL);
265 printk("\n");
266 BUG(); 271 BUG();
267 } 272 }
268 273
269 status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr); 274 status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr);
270 if (ACPI_FAILURE(status)) { 275 if (ACPI_FAILURE(status)) {
271 printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ", 276 printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: %s\n",
272 __func__, status); 277 __func__, status, (char *)name_buffer.pointer);
273 acpi_ns_print_node_pathname(child, NULL);
274 printk("\n");
275 panic("%s: Unable to find host devfn\n", __func__); 278 panic("%s: Unable to find host devfn\n", __func__);
276 } 279 }
277 280
281 kfree(name_buffer.pointer);
282
278 slot = (adr >> 16) & 0xffff; 283 slot = (adr >> 16) & 0xffff;
279 function = adr & 0xffff; 284 function = adr & 0xffff;
280 devfn = PCI_DEVFN(slot, function); 285 devfn = PCI_DEVFN(slot, function);
@@ -300,27 +305,28 @@ find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
300 int function; 305 int function;
301 int slot; 306 int slot;
302 struct sn_pcidev_match *info = context; 307 struct sn_pcidev_match *info = context;
308 struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
303 309
304 status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, 310 status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
305 &adr); 311 &adr);
306 if (ACPI_SUCCESS(status)) { 312 if (ACPI_SUCCESS(status)) {
307 status = acpi_get_parent(handle, &parent); 313 status = acpi_get_parent(handle, &parent);
308 if (ACPI_FAILURE(status)) { 314 if (ACPI_FAILURE(status)) {
315 acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
309 printk(KERN_ERR 316 printk(KERN_ERR
310 "%s: acpi_get_parent() failed (0x%x) for: ", 317 "%s: acpi_get_parent() failed (0x%x) for: %s\n",
311 __func__, status); 318 __func__, status, (char *)name_buffer.pointer);
312 acpi_ns_print_node_pathname(handle, NULL); 319 kfree(name_buffer.pointer);
313 printk("\n");
314 return AE_OK; 320 return AE_OK;
315 } 321 }
316 status = acpi_evaluate_integer(parent, METHOD_NAME__BBN, 322 status = acpi_evaluate_integer(parent, METHOD_NAME__BBN,
317 NULL, &bbn); 323 NULL, &bbn);
318 if (ACPI_FAILURE(status)) { 324 if (ACPI_FAILURE(status)) {
325 acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
319 printk(KERN_ERR 326 printk(KERN_ERR
320 "%s: Failed to find _BBN in parent of: ", 327 "%s: Failed to find _BBN in parent of: %s\n",
321 __func__); 328 __func__, (char *)name_buffer.pointer);
322 acpi_ns_print_node_pathname(handle, NULL); 329 kfree(name_buffer.pointer);
323 printk("\n");
324 return AE_OK; 330 return AE_OK;
325 } 331 }
326 332
@@ -350,24 +356,27 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
350 acpi_handle rootbus_handle; 356 acpi_handle rootbus_handle;
351 unsigned long long segment; 357 unsigned long long segment;
352 acpi_status status; 358 acpi_status status;
359 struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
353 360
354 rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle; 361 rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
355 status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL, 362 status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL,
356 &segment); 363 &segment);
357 if (ACPI_SUCCESS(status)) { 364 if (ACPI_SUCCESS(status)) {
358 if (segment != pci_domain_nr(dev)) { 365 if (segment != pci_domain_nr(dev)) {
366 acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME,
367 &name_buffer);
359 printk(KERN_ERR 368 printk(KERN_ERR
360 "%s: Segment number mismatch, 0x%llx vs 0x%x for: ", 369 "%s: Segment number mismatch, 0x%llx vs 0x%x for: %s\n",
361 __func__, segment, pci_domain_nr(dev)); 370 __func__, segment, pci_domain_nr(dev),
362 acpi_ns_print_node_pathname(rootbus_handle, NULL); 371 (char *)name_buffer.pointer);
363 printk("\n"); 372 kfree(name_buffer.pointer);
364 return 1; 373 return 1;
365 } 374 }
366 } else { 375 } else {
367 printk(KERN_ERR "%s: Unable to get __SEG from: ", 376 acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME, &name_buffer);
368 __func__); 377 printk(KERN_ERR "%s: Unable to get __SEG from: %s\n",
369 acpi_ns_print_node_pathname(rootbus_handle, NULL); 378 __func__, (char *)name_buffer.pointer);
370 printk("\n"); 379 kfree(name_buffer.pointer);
371 return 1; 380 return 1;
372 } 381 }
373 382
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index 8a924a5661dd..0d4ffa4da1da 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -26,7 +26,6 @@
26#include <linux/acpi.h> 26#include <linux/acpi.h>
27#include <asm/sn/sn2/sn_hwperf.h> 27#include <asm/sn/sn2/sn_hwperf.h>
28#include <asm/sn/acpi.h> 28#include <asm/sn/acpi.h>
29#include "acpi/acglobal.h"
30 29
31extern void sn_init_cpei_timer(void); 30extern void sn_init_cpei_timer(void);
32extern void register_sn_procfs(void); 31extern void register_sn_procfs(void);
@@ -473,7 +472,7 @@ sn_io_early_init(void)
473 { 472 {
474 struct acpi_table_header *header = NULL; 473 struct acpi_table_header *header = NULL;
475 474
476 acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); 475 acpi_get_table(ACPI_SIG_DSDT, 1, &header);
477 BUG_ON(header == NULL); 476 BUG_ON(header == NULL);
478 sn_acpi_rev = header->oem_revision; 477 sn_acpi_rev = header->oem_revision;
479 } 478 }
@@ -505,7 +504,7 @@ sn_io_early_init(void)
505 504
506 { 505 {
507 struct acpi_table_header *header; 506 struct acpi_table_header *header;
508 (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); 507 (void)acpi_get_table(ACPI_SIG_DSDT, 1, &header);
509 printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", 508 printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n",
510 header->oem_revision); 509 header->oem_revision);
511 } 510 }
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 29dc0c89d4af..d37593c2f438 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -47,7 +47,7 @@
47#endif 47#endif
48 48
49static int __initdata acpi_force = 0; 49static int __initdata acpi_force = 0;
50 50u32 acpi_rsdt_forced;
51#ifdef CONFIG_ACPI 51#ifdef CONFIG_ACPI
52int acpi_disabled = 0; 52int acpi_disabled = 0;
53#else 53#else
@@ -1374,6 +1374,17 @@ static void __init acpi_process_madt(void)
1374 "Invalid BIOS MADT, disabling ACPI\n"); 1374 "Invalid BIOS MADT, disabling ACPI\n");
1375 disable_acpi(); 1375 disable_acpi();
1376 } 1376 }
1377 } else {
1378 /*
1379 * ACPI found no MADT, and so ACPI wants UP PIC mode.
1380 * In the event an MPS table was found, forget it.
1381 * Boot with "acpi=off" to use MPS on such a system.
1382 */
1383 if (smp_found_config) {
1384 printk(KERN_WARNING PREFIX
1385 "No APIC-table, disabling MPS\n");
1386 smp_found_config = 0;
1387 }
1377 } 1388 }
1378 1389
1379 /* 1390 /*
@@ -1809,6 +1820,10 @@ static int __init parse_acpi(char *arg)
1809 disable_acpi(); 1820 disable_acpi();
1810 acpi_ht = 1; 1821 acpi_ht = 1;
1811 } 1822 }
1823 /* acpi=rsdt use RSDT instead of XSDT */
1824 else if (strcmp(arg, "rsdt") == 0) {
1825 acpi_rsdt_forced = 1;
1826 }
1812 /* "acpi=noirq" disables ACPI interrupt routing */ 1827 /* "acpi=noirq" disables ACPI interrupt routing */
1813 else if (strcmp(arg, "noirq") == 0) { 1828 else if (strcmp(arg, "noirq") == 0) {
1814 acpi_noirq_set(); 1829 acpi_noirq_set();
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index c2502eb9aa83..a4805b3b4095 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */
56static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; 56static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
57 57
58#define MWAIT_SUBSTATE_MASK (0xf) 58#define MWAIT_SUBSTATE_MASK (0xf)
59#define MWAIT_CSTATE_MASK (0xf)
59#define MWAIT_SUBSTATE_SIZE (4) 60#define MWAIT_SUBSTATE_SIZE (4)
60 61
61#define CPUID_MWAIT_LEAF (5) 62#define CPUID_MWAIT_LEAF (5)
@@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
98 cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx); 99 cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
99 100
100 /* Check whether this particular cx_type (in CST) is supported or not */ 101 /* Check whether this particular cx_type (in CST) is supported or not */
101 cstate_type = (cx->address >> MWAIT_SUBSTATE_SIZE) + 1; 102 cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) &
103 MWAIT_CSTATE_MASK) + 1;
102 edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE); 104 edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE);
103 num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK; 105 num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;
104 106
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 806b4e9051b4..707c1f6f95fa 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -159,6 +159,8 @@ static int __init acpi_sleep_setup(char *str)
159#endif 159#endif
160 if (strncmp(str, "old_ordering", 12) == 0) 160 if (strncmp(str, "old_ordering", 12) == 0)
161 acpi_old_suspend_ordering(); 161 acpi_old_suspend_ordering();
162 if (strncmp(str, "s4_nonvs", 8) == 0)
163 acpi_s4_no_nvs();
162 str = strchr(str, ','); 164 str = strchr(str, ',');
163 if (str != NULL) 165 if (str != NULL)
164 str += strspn(str, ", \t"); 166 str += strspn(str, ", \t");
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 65a13943e098..e85826829cf2 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -665,6 +665,27 @@ void __init e820_mark_nosave_regions(unsigned long limit_pfn)
665} 665}
666#endif 666#endif
667 667
668#ifdef CONFIG_HIBERNATION
669/**
670 * Mark ACPI NVS memory region, so that we can save/restore it during
671 * hibernation and the subsequent resume.
672 */
673static int __init e820_mark_nvs_memory(void)
674{
675 int i;
676
677 for (i = 0; i < e820.nr_map; i++) {
678 struct e820entry *ei = &e820.map[i];
679
680 if (ei->type == E820_NVS)
681 hibernate_nvs_register(ei->addr, ei->size);
682 }
683
684 return 0;
685}
686core_initcall(e820_mark_nvs_memory);
687#endif
688
668/* 689/*
669 * Early reserved memory areas. 690 * Early reserved memory areas.
670 */ 691 */