Commit 391712d7 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'acpica'

Merge ACPICA changes for 6.3-rc1:

 - Drop port I/O validation for some regions to avoid AML failures due
   to rejections of legitimate port I/O writes (Mario Limonciello).

 - Constify acpi_get_handle() pathname argument to allow its callers to
   pass conts pathnames to it (Sakari Ailus).

 - Prevent acpi_ns_simple_repair() from crashing in some cases when
   AE_AML_NO_RETURN_VALUE should be returned (Daniil Tatianin).

 - Fix typo in CDAT DSMAS struct definition (Lukas Wunner).

* acpica:
  ACPICA: Fix typo in CDAT DSMAS struct definition
  ACPICA: nsrepair: handle cases without a return value correctly
  ACPICA: Constify pathname argument for acpi_get_handle()
  ACPICA: Drop port I/O validation for some regions
parents fda7be20 5a9e358f
...@@ -23,8 +23,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width); ...@@ -23,8 +23,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width);
* *
* The table is used to implement the Microsoft port access rules that * The table is used to implement the Microsoft port access rules that
* first appeared in Windows XP. Some ports are always illegal, and some * first appeared in Windows XP. Some ports are always illegal, and some
* ports are only illegal if the BIOS calls _OSI with a win_XP string or * ports are only illegal if the BIOS calls _OSI with nothing newer than
* later (meaning that the BIOS itelf is post-XP.) * the specific _OSI strings.
* *
* This provides ACPICA with the desired port protections and * This provides ACPICA with the desired port protections and
* Microsoft compatibility. * Microsoft compatibility.
...@@ -145,7 +145,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) ...@@ -145,7 +145,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
/* Port illegality may depend on the _OSI calls made by the BIOS */ /* Port illegality may depend on the _OSI calls made by the BIOS */
if (acpi_gbl_osi_data >= port_info->osi_dependency) { if (port_info->osi_dependency == ACPI_ALWAYS_ILLEGAL ||
acpi_gbl_osi_data == port_info->osi_dependency) {
ACPI_DEBUG_PRINT((ACPI_DB_VALUES, ACPI_DEBUG_PRINT((ACPI_DB_VALUES,
"Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n", "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n",
ACPI_FORMAT_UINT64(address), ACPI_FORMAT_UINT64(address),
......
...@@ -181,8 +181,9 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info, ...@@ -181,8 +181,9 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
* Try to fix if there was no return object. Warning if failed to fix. * Try to fix if there was no return object. Warning if failed to fix.
*/ */
if (!return_object) { if (!return_object) {
if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) { if (expected_btypes) {
if (package_index != ACPI_NOT_PACKAGE_ELEMENT) { if (!(expected_btypes & ACPI_RTYPE_NONE) &&
package_index != ACPI_NOT_PACKAGE_ELEMENT) {
ACPI_WARN_PREDEFINED((AE_INFO, ACPI_WARN_PREDEFINED((AE_INFO,
info->full_pathname, info->full_pathname,
ACPI_WARN_ALWAYS, ACPI_WARN_ALWAYS,
...@@ -196,14 +197,15 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info, ...@@ -196,14 +197,15 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
return (AE_OK); /* Repair was successful */ return (AE_OK); /* Repair was successful */
} }
} else { }
if (expected_btypes != ACPI_RTYPE_NONE) {
ACPI_WARN_PREDEFINED((AE_INFO, ACPI_WARN_PREDEFINED((AE_INFO,
info->full_pathname, info->full_pathname,
ACPI_WARN_ALWAYS, ACPI_WARN_ALWAYS,
"Missing expected return value")); "Missing expected return value"));
return (AE_AML_NO_RETURN_VALUE);
} }
return (AE_AML_NO_RETURN_VALUE);
} }
} }
......
...@@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest, ...@@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
acpi_status acpi_status
acpi_get_handle(acpi_handle parent, acpi_get_handle(acpi_handle parent,
acpi_string pathname, acpi_handle *ret_handle) const char *pathname, acpi_handle *ret_handle)
{ {
acpi_status status; acpi_status status;
struct acpi_namespace_node *node = NULL; struct acpi_namespace_node *node = NULL;
......
...@@ -526,7 +526,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status ...@@ -526,7 +526,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
struct acpi_buffer *ret_path_ptr)) struct acpi_buffer *ret_path_ptr))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_handle(acpi_handle parent, acpi_get_handle(acpi_handle parent,
acpi_string pathname, const char *pathname,
acpi_handle *ret_handle)) acpi_handle *ret_handle))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_attach_data(acpi_handle object, acpi_attach_data(acpi_handle object,
......
...@@ -344,7 +344,7 @@ enum acpi_cdat_type { ...@@ -344,7 +344,7 @@ enum acpi_cdat_type {
/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */ /* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
struct acpi_cadt_dsmas { struct acpi_cdat_dsmas {
u8 dsmad_handle; u8 dsmad_handle;
u8 flags; u8 flags;
u16 reserved; u16 reserved;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment