aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-26 18:23:24 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-26 18:23:24 -0400
commit08abe18af1f78ee80c3c3a5ac47c3e0ae0beadf6 (patch)
tree2be39bf8942edca1bcec735145e144a682ca9cd3 /drivers/acpi
parentf0de70f8bb56952f6e016a65a8a8d006918f5bf6 (diff)
parent0384e2959127a56d0640505d004d8dd92f9c29f5 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: drivers/net/wimax/i2400m/usb-notif.c
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/bus.c9
-rw-r--r--drivers/acpi/dock.c2
-rw-r--r--drivers/acpi/numa.c2
-rw-r--r--drivers/acpi/osl.c50
-rw-r--r--drivers/acpi/sleep.c16
5 files changed, 19 insertions, 60 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 765fd1c56cd6..bee64b73c919 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -758,8 +758,7 @@ static int __init acpi_bus_init(void)
758 acpi_status status = AE_OK; 758 acpi_status status = AE_OK;
759 extern acpi_status acpi_os_initialize1(void); 759 extern acpi_status acpi_os_initialize1(void);
760 760
761 761 acpi_os_initialize1();
762 status = acpi_os_initialize1();
763 762
764 status = 763 status =
765 acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE); 764 acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE);
@@ -769,12 +768,6 @@ static int __init acpi_bus_init(void)
769 goto error1; 768 goto error1;
770 } 769 }
771 770
772 if (ACPI_FAILURE(status)) {
773 printk(KERN_ERR PREFIX
774 "Unable to initialize ACPI OS objects\n");
775 goto error1;
776 }
777
778 /* 771 /*
779 * ACPI 2.0 requires the EC driver to be loaded and work before 772 * ACPI 2.0 requires the EC driver to be loaded and work before
780 * the EC device is found in the namespace (i.e. before acpi_initialize_objects() 773 * the EC device is found in the namespace (i.e. before acpi_initialize_objects()
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 35094f230b1e..7af7db1ba8c4 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -977,7 +977,7 @@ static int dock_add(acpi_handle handle)
977 sizeof(struct dock_station *)); 977 sizeof(struct dock_station *));
978 978
979 /* we want the dock device to send uevents */ 979 /* we want the dock device to send uevents */
980 dock_device->dev.uevent_suppress = 0; 980 dev_set_uevent_suppress(&dock_device->dev, 0);
981 981
982 if (is_dock(handle)) 982 if (is_dock(handle))
983 dock_station->flags |= DOCK_IS_DOCK; 983 dock_station->flags |= DOCK_IS_DOCK;
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index c5e292aab0e3..3a0d8ef25c75 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -277,7 +277,7 @@ int acpi_get_node(acpi_handle *handle)
277 int pxm, node = -1; 277 int pxm, node = -1;
278 278
279 pxm = acpi_get_pxm(handle); 279 pxm = acpi_get_pxm(handle);
280 if (pxm >= 0) 280 if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)
281 node = acpi_map_pxm_to_node(pxm); 281 node = acpi_map_pxm_to_node(pxm);
282 282
283 return node; 283 return node;
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b3193ec0a2ef..1e35f342957c 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1317,54 +1317,6 @@ acpi_os_validate_interface (char *interface)
1317 return AE_SUPPORT; 1317 return AE_SUPPORT;
1318} 1318}
1319 1319
1320#ifdef CONFIG_X86
1321
1322struct aml_port_desc {
1323 uint start;
1324 uint end;
1325 char* name;
1326 char warned;
1327};
1328
1329static struct aml_port_desc aml_invalid_port_list[] = {
1330 {0x20, 0x21, "PIC0", 0},
1331 {0xA0, 0xA1, "PIC1", 0},
1332 {0x4D0, 0x4D1, "ELCR", 0}
1333};
1334
1335/*
1336 * valid_aml_io_address()
1337 *
1338 * if valid, return true
1339 * else invalid, warn once, return false
1340 */
1341static bool valid_aml_io_address(uint address, uint length)
1342{
1343 int i;
1344 int entries = sizeof(aml_invalid_port_list) / sizeof(struct aml_port_desc);
1345
1346 for (i = 0; i < entries; ++i) {
1347 if ((address >= aml_invalid_port_list[i].start &&
1348 address <= aml_invalid_port_list[i].end) ||
1349 (address + length >= aml_invalid_port_list[i].start &&
1350 address + length <= aml_invalid_port_list[i].end))
1351 {
1352 if (!aml_invalid_port_list[i].warned)
1353 {
1354 printk(KERN_ERR "ACPI: Denied BIOS AML access"
1355 " to invalid port 0x%x+0x%x (%s)\n",
1356 address, length,
1357 aml_invalid_port_list[i].name);
1358 aml_invalid_port_list[i].warned = 1;
1359 }
1360 return false; /* invalid */
1361 }
1362 }
1363 return true; /* valid */
1364}
1365#else
1366static inline bool valid_aml_io_address(uint address, uint length) { return true; }
1367#endif
1368/****************************************************************************** 1320/******************************************************************************
1369 * 1321 *
1370 * FUNCTION: acpi_os_validate_address 1322 * FUNCTION: acpi_os_validate_address
@@ -1394,8 +1346,6 @@ acpi_os_validate_address (
1394 1346
1395 switch (space_id) { 1347 switch (space_id) {
1396 case ACPI_ADR_SPACE_SYSTEM_IO: 1348 case ACPI_ADR_SPACE_SYSTEM_IO:
1397 if (!valid_aml_io_address(address, length))
1398 return AE_AML_ILLEGAL_ADDRESS;
1399 case ACPI_ADR_SPACE_SYSTEM_MEMORY: 1349 case ACPI_ADR_SPACE_SYSTEM_MEMORY:
1400 /* Only interference checks against SystemIO and SytemMemory 1350 /* Only interference checks against SystemIO and SytemMemory
1401 are needed */ 1351 are needed */
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 519266654f06..00456fccfa38 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -378,6 +378,22 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
378 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"), 378 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
379 }, 379 },
380 }, 380 },
381 {
382 .callback = init_old_suspend_ordering,
383 .ident = "Asus Pundit P1-AH2 (M2N8L motherboard)",
384 .matches = {
385 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTek Computer INC."),
386 DMI_MATCH(DMI_BOARD_NAME, "M2N8L"),
387 },
388 },
389 {
390 .callback = init_set_sci_en_on_resume,
391 .ident = "Toshiba Satellite L300",
392 .matches = {
393 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
394 DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"),
395 },
396 },
381 {}, 397 {},
382}; 398};
383#endif /* CONFIG_SUSPEND */ 399#endif /* CONFIG_SUSPEND */