Skip to content

Commit 391712d

Browse files
committed
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
2 parents fda7be2 + 5a9e358 commit 391712d

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

drivers/acpi/acpica/hwvalid.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width);
2323
*
2424
* The table is used to implement the Microsoft port access rules that
2525
* first appeared in Windows XP. Some ports are always illegal, and some
26-
* ports are only illegal if the BIOS calls _OSI with a win_XP string or
27-
* later (meaning that the BIOS itelf is post-XP.)
26+
* ports are only illegal if the BIOS calls _OSI with nothing newer than
27+
* the specific _OSI strings.
2828
*
2929
* This provides ACPICA with the desired port protections and
3030
* Microsoft compatibility.
@@ -145,7 +145,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
145145

146146
/* Port illegality may depend on the _OSI calls made by the BIOS */
147147

148-
if (acpi_gbl_osi_data >= port_info->osi_dependency) {
148+
if (port_info->osi_dependency == ACPI_ALWAYS_ILLEGAL ||
149+
acpi_gbl_osi_data == port_info->osi_dependency) {
149150
ACPI_DEBUG_PRINT((ACPI_DB_VALUES,
150151
"Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n",
151152
ACPI_FORMAT_UINT64(address),

drivers/acpi/acpica/nsrepair.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
181181
* Try to fix if there was no return object. Warning if failed to fix.
182182
*/
183183
if (!return_object) {
184-
if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) {
185-
if (package_index != ACPI_NOT_PACKAGE_ELEMENT) {
184+
if (expected_btypes) {
185+
if (!(expected_btypes & ACPI_RTYPE_NONE) &&
186+
package_index != ACPI_NOT_PACKAGE_ELEMENT) {
186187
ACPI_WARN_PREDEFINED((AE_INFO,
187188
info->full_pathname,
188189
ACPI_WARN_ALWAYS,
@@ -196,14 +197,15 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
196197
if (ACPI_SUCCESS(status)) {
197198
return (AE_OK); /* Repair was successful */
198199
}
199-
} else {
200+
}
201+
202+
if (expected_btypes != ACPI_RTYPE_NONE) {
200203
ACPI_WARN_PREDEFINED((AE_INFO,
201204
info->full_pathname,
202205
ACPI_WARN_ALWAYS,
203206
"Missing expected return value"));
207+
return (AE_AML_NO_RETURN_VALUE);
204208
}
205-
206-
return (AE_AML_NO_RETURN_VALUE);
207209
}
208210
}
209211

drivers/acpi/acpica/nsxfname.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
4444

4545
acpi_status
4646
acpi_get_handle(acpi_handle parent,
47-
acpi_string pathname, acpi_handle *ret_handle)
47+
const char *pathname, acpi_handle *ret_handle)
4848
{
4949
acpi_status status;
5050
struct acpi_namespace_node *node = NULL;

include/acpi/acpixf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
526526
struct acpi_buffer *ret_path_ptr))
527527
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
528528
acpi_get_handle(acpi_handle parent,
529-
acpi_string pathname,
529+
const char *pathname,
530530
acpi_handle *ret_handle))
531531
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
532532
acpi_attach_data(acpi_handle object,

include/acpi/actbl1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ enum acpi_cdat_type {
344344

345345
/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
346346

347-
struct acpi_cadt_dsmas {
347+
struct acpi_cdat_dsmas {
348348
u8 dsmad_handle;
349349
u8 flags;
350350
u16 reserved;

0 commit comments

Comments
 (0)