Skip to content

Commit e468e39

Browse files
acpibobrafaeljw
authored andcommitted
ACPICA: Add new ACPI 6.4 semantics for LoadTable() operator
ACPICA commit b32dde35e26a63a85d78d4dc0a7260b61e626ac1 DDB_HANDLE is gone, now LoadTable() returns a pass/fail integer. Link: acpica/acpica@b32dde35 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 39ea1bb commit e468e39

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

drivers/acpi/acpica/exconfig.c

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,21 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
8787
struct acpi_namespace_node *parent_node;
8888
struct acpi_namespace_node *start_node;
8989
struct acpi_namespace_node *parameter_node = NULL;
90+
union acpi_operand_object *return_obj;
9091
union acpi_operand_object *ddb_handle;
9192
u32 table_index;
9293

9394
ACPI_FUNCTION_TRACE(ex_load_table_op);
9495

96+
/* Create the return object */
97+
98+
return_obj = acpi_ut_create_integer_object((u64)0);
99+
if (!return_obj) {
100+
return_ACPI_STATUS(AE_NO_MEMORY);
101+
}
102+
103+
*return_desc = return_obj;
104+
95105
/* Find the ACPI table in the RSDT/XSDT */
96106

97107
acpi_ex_exit_interpreter();
@@ -106,12 +116,6 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
106116

107117
/* Table not found, return an Integer=0 and AE_OK */
108118

109-
ddb_handle = acpi_ut_create_integer_object((u64) 0);
110-
if (!ddb_handle) {
111-
return_ACPI_STATUS(AE_NO_MEMORY);
112-
}
113-
114-
*return_desc = ddb_handle;
115119
return_ACPI_STATUS(AE_OK);
116120
}
117121

@@ -198,7 +202,13 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
198202
}
199203
}
200204

201-
*return_desc = ddb_handle;
205+
/* Remove the reference to ddb_handle created by acpi_ex_add_table above */
206+
207+
acpi_ut_remove_reference(ddb_handle);
208+
209+
/* Return -1 (non-zero) indicates success */
210+
211+
return_obj->integer.value = 0xFFFFFFFFFFFFFFFF;
202212
return_ACPI_STATUS(status);
203213
}
204214

0 commit comments

Comments
 (0)