aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2016-09-07 02:06:47 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-09-09 20:43:02 -0400
commit955f485dc40cdee265a85ad4af378f2a2cfaf11b (patch)
tree522e7d6f986a26f37d4682c3f501a941dead9923
parent4e0b26d3910cd69db27c4af0954f6499b8eef038 (diff)
ACPICA: Update return value for intenal _OSI method
ACPICA commit 82101009c7c04845edb3495e66a274a613758bca Instead of 0xFFFFFFFF, _OSI is now defined to return "Ones". This is for compatibility with Windows. The ACPI spec will be updated to reflect this. Link: https://github.com/acpica/acpica/commit/82101009 Reported-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/utosi.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c
index 3f5fed670271..f0484b058c44 100644
--- a/drivers/acpi/acpica/utosi.c
+++ b/drivers/acpi/acpica/utosi.c
@@ -390,11 +390,22 @@ struct acpi_interface_info *acpi_ut_get_interface(acpi_string interface_name)
390 * PARAMETERS: walk_state - Current walk state 390 * PARAMETERS: walk_state - Current walk state
391 * 391 *
392 * RETURN: Status 392 * RETURN: Status
393 * Integer: TRUE (0) if input string is matched
394 * FALSE (-1) if string is not matched
393 * 395 *
394 * DESCRIPTION: Implementation of the _OSI predefined control method. When 396 * DESCRIPTION: Implementation of the _OSI predefined control method. When
395 * an invocation of _OSI is encountered in the system AML, 397 * an invocation of _OSI is encountered in the system AML,
396 * control is transferred to this function. 398 * control is transferred to this function.
397 * 399 *
400 * (August 2016)
401 * Note: _OSI is now defined to return "Ones" to indicate a match, for
402 * compatibility with other ACPI implementations. On a 32-bit DSDT, Ones
403 * is 0xFFFFFFFF. On a 64-bit DSDT, Ones is 0xFFFFFFFFFFFFFFFF
404 * (ACPI_UINT64_MAX).
405 *
406 * This function always returns ACPI_UINT64_MAX for TRUE, and later code
407 * will truncate this to 32 bits if necessary.
408 *
398 ******************************************************************************/ 409 ******************************************************************************/
399 410
400acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) 411acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
@@ -404,7 +415,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
404 struct acpi_interface_info *interface_info; 415 struct acpi_interface_info *interface_info;
405 acpi_interface_handler interface_handler; 416 acpi_interface_handler interface_handler;
406 acpi_status status; 417 acpi_status status;
407 u32 return_value; 418 u64 return_value;
408 419
409 ACPI_FUNCTION_TRACE(ut_osi_implementation); 420 ACPI_FUNCTION_TRACE(ut_osi_implementation);
410 421
@@ -444,7 +455,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
444 acpi_gbl_osi_data = interface_info->value; 455 acpi_gbl_osi_data = interface_info->value;
445 } 456 }
446 457
447 return_value = ACPI_UINT32_MAX; 458 return_value = ACPI_UINT64_MAX;
448 } 459 }
449 460
450 acpi_os_release_mutex(acpi_gbl_osi_mutex); 461 acpi_os_release_mutex(acpi_gbl_osi_mutex);
@@ -456,9 +467,10 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
456 */ 467 */
457 interface_handler = acpi_gbl_interface_handler; 468 interface_handler = acpi_gbl_interface_handler;
458 if (interface_handler) { 469 if (interface_handler) {
459 return_value = 470 if (interface_handler
460 interface_handler(string_desc->string.pointer, 471 (string_desc->string.pointer, (u32)return_value)) {
461 return_value); 472 return_value = ACPI_UINT64_MAX;
473 }
462 } 474 }
463 475
464 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO, 476 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO,