diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-02-15 15:14:19 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-02-15 15:14:19 +0100 |
commit | 391712d7536ddba783b10ed4e67447970c3827ae (patch) | |
tree | 92671d90158da2f6921cd19da680a859e0476aa1 /drivers | |
parent | fda7be2068973195343d14c1f760adcd481455c9 (diff) | |
parent | 5a9e358f1d1f5a2c2dfd8055b0e9e44d58a54a49 (diff) | |
download | linux-391712d7536ddba783b10ed4e67447970c3827ae.tar.gz linux-391712d7536ddba783b10ed4e67447970c3827ae.tar.bz2 linux-391712d7536ddba783b10ed4e67447970c3827ae.zip |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpica/hwvalid.c | 7 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsrepair.c | 12 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsxfname.c | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index 915b26448d2c..0d392e7b0747 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c @@ -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 * 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 - * later (meaning that the BIOS itelf is post-XP.) + * ports are only illegal if the BIOS calls _OSI with nothing newer than + * the specific _OSI strings. * * This provides ACPICA with the desired port protections and * Microsoft compatibility. @@ -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 */ - 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, "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n", ACPI_FORMAT_UINT64(address), diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c index 367fcd201f96..ec512e06a48e 100644 --- a/drivers/acpi/acpica/nsrepair.c +++ b/drivers/acpi/acpica/nsrepair.c @@ -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. */ if (!return_object) { - if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) { - if (package_index != ACPI_NOT_PACKAGE_ELEMENT) { + if (expected_btypes) { + if (!(expected_btypes & ACPI_RTYPE_NONE) && + package_index != ACPI_NOT_PACKAGE_ELEMENT) { ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, ACPI_WARN_ALWAYS, @@ -196,14 +197,15 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info, if (ACPI_SUCCESS(status)) { return (AE_OK); /* Repair was successful */ } - } else { + } + + if (expected_btypes != ACPI_RTYPE_NONE) { ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, ACPI_WARN_ALWAYS, "Missing expected return value")); + return (AE_AML_NO_RETURN_VALUE); } - - return (AE_AML_NO_RETURN_VALUE); } } diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c index b2cfdfef3194..a0592d15dd37 100644 --- a/drivers/acpi/acpica/nsxfname.c +++ b/drivers/acpi/acpica/nsxfname.c @@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest, acpi_status acpi_get_handle(acpi_handle parent, - acpi_string pathname, acpi_handle *ret_handle) + const char *pathname, acpi_handle *ret_handle) { acpi_status status; struct acpi_namespace_node *node = NULL; |