diff options
author | Len Brown <len.brown@intel.com> | 2010-06-12 00:56:15 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-06-12 00:56:15 -0400 |
commit | d9a799d197da16fcfb1e872e82ee6cdf7fe8f7ab (patch) | |
tree | e4100a27d05d5fc9286a3bb8e7ebe5b8d9618e66 /drivers/acpi/acpica | |
parent | a48ecc771852158eb7b9ace242f0a6226a3907b7 (diff) | |
parent | b681f7d9ab4d697a214fa4428795790c3a937a89 (diff) |
Merge branch 'acpica-cherry-pick' into release
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/acconfig.h | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/acglobal.h | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/exsystem.c | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwvalid.c | 12 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsinit.c | 9 |
5 files changed, 41 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acconfig.h b/drivers/acpi/acpica/acconfig.h index 33181ad350d5..b17d8de9f6ff 100644 --- a/drivers/acpi/acpica/acconfig.h +++ b/drivers/acpi/acpica/acconfig.h | |||
@@ -119,6 +119,10 @@ | |||
119 | 119 | ||
120 | #define ACPI_MAX_LOOP_ITERATIONS 0xFFFF | 120 | #define ACPI_MAX_LOOP_ITERATIONS 0xFFFF |
121 | 121 | ||
122 | /* Maximum sleep allowed via Sleep() operator */ | ||
123 | |||
124 | #define ACPI_MAX_SLEEP 20000 /* Two seconds */ | ||
125 | |||
122 | /****************************************************************************** | 126 | /****************************************************************************** |
123 | * | 127 | * |
124 | * ACPI Specification constants (Do not change unless the specification changes) | 128 | * ACPI Specification constants (Do not change unless the specification changes) |
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 9070f1fe8f17..899d68afc3c5 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -125,6 +125,14 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE); | |||
125 | */ | 125 | */ |
126 | u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE); | 126 | u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE); |
127 | 127 | ||
128 | /* | ||
129 | * Optionally truncate I/O addresses to 16 bits. Provides compatibility | ||
130 | * with other ACPI implementations. NOTE: During ACPICA initialization, | ||
131 | * this value is set to TRUE if any Windows OSI strings have been | ||
132 | * requested by the BIOS. | ||
133 | */ | ||
134 | u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE); | ||
135 | |||
128 | /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ | 136 | /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ |
129 | 137 | ||
130 | struct acpi_table_fadt acpi_gbl_FADT; | 138 | struct acpi_table_fadt acpi_gbl_FADT; |
diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c index 6d32e09327f1..675aaa91a770 100644 --- a/drivers/acpi/acpica/exsystem.c +++ b/drivers/acpi/acpica/exsystem.c | |||
@@ -201,6 +201,14 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long) | |||
201 | 201 | ||
202 | acpi_ex_relinquish_interpreter(); | 202 | acpi_ex_relinquish_interpreter(); |
203 | 203 | ||
204 | /* | ||
205 | * For compatibility with other ACPI implementations and to prevent | ||
206 | * accidental deep sleeps, limit the sleep time to something reasonable. | ||
207 | */ | ||
208 | if (how_long > ACPI_MAX_SLEEP) { | ||
209 | how_long = ACPI_MAX_SLEEP; | ||
210 | } | ||
211 | |||
204 | acpi_os_sleep(how_long); | 212 | acpi_os_sleep(how_long); |
205 | 213 | ||
206 | /* And now we must get the interpreter again */ | 214 | /* And now we must get the interpreter again */ |
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index c10d587c1641..e1d9c777b213 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c | |||
@@ -222,6 +222,12 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width) | |||
222 | u32 one_byte; | 222 | u32 one_byte; |
223 | u32 i; | 223 | u32 i; |
224 | 224 | ||
225 | /* Truncate address to 16 bits if requested */ | ||
226 | |||
227 | if (acpi_gbl_truncate_io_addresses) { | ||
228 | address &= ACPI_UINT16_MAX; | ||
229 | } | ||
230 | |||
225 | /* Validate the entire request and perform the I/O */ | 231 | /* Validate the entire request and perform the I/O */ |
226 | 232 | ||
227 | status = acpi_hw_validate_io_request(address, width); | 233 | status = acpi_hw_validate_io_request(address, width); |
@@ -279,6 +285,12 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width) | |||
279 | acpi_status status; | 285 | acpi_status status; |
280 | u32 i; | 286 | u32 i; |
281 | 287 | ||
288 | /* Truncate address to 16 bits if requested */ | ||
289 | |||
290 | if (acpi_gbl_truncate_io_addresses) { | ||
291 | address &= ACPI_UINT16_MAX; | ||
292 | } | ||
293 | |||
282 | /* Validate the entire request and perform the I/O */ | 294 | /* Validate the entire request and perform the I/O */ |
283 | 295 | ||
284 | status = acpi_hw_validate_io_request(address, width); | 296 | status = acpi_hw_validate_io_request(address, width); |
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c index 9bd6f050f299..4e5272c313e0 100644 --- a/drivers/acpi/acpica/nsinit.c +++ b/drivers/acpi/acpica/nsinit.c | |||
@@ -193,6 +193,15 @@ acpi_status acpi_ns_initialize_devices(void) | |||
193 | acpi_ns_init_one_device, NULL, &info, | 193 | acpi_ns_init_one_device, NULL, &info, |
194 | NULL); | 194 | NULL); |
195 | 195 | ||
196 | /* | ||
197 | * Any _OSI requests should be completed by now. If the BIOS has | ||
198 | * requested any Windows OSI strings, we will always truncate | ||
199 | * I/O addresses to 16 bits -- for Windows compatibility. | ||
200 | */ | ||
201 | if (acpi_gbl_osi_data >= ACPI_OSI_WIN_2000) { | ||
202 | acpi_gbl_truncate_io_addresses = TRUE; | ||
203 | } | ||
204 | |||
196 | ACPI_FREE(info.evaluate_info); | 205 | ACPI_FREE(info.evaluate_info); |
197 | if (ACPI_FAILURE(status)) { | 206 | if (ACPI_FAILURE(status)) { |
198 | goto error_exit; | 207 | goto error_exit; |