ACPICA: Tables: Move an iasl specific table function to iasl source file.

ACPICA commit 6eb364d790dd103bd4990f808e0095a421c437cb

acpi_tb_store_table() implements a logic that is only correct to iasl. So it
won't be used by any other utilities except iasl. This function is
complained by the kernel users as an unused function. The best choice to
stop releasing it to the Linux kernel should be moving it to adisasm.c.

ACPI table manager can use both struct acpi_table_desc (direct referencing)
and table index (indirect referencing) as the descriptor to the table, so
acpi_tb_get_next_root_index() is extended to return both of them to allow
maximum usability from the callers. NOTE that indirect referencing is a
design result to meet the boot stage static allocation requirement for the
table descriptors.

This is a linuxized acpi_tb_store_table() removing result, there should be
no functional changes introduced to the Linux kernel by this patch except
the additonal kernel unused argument for acpi_tb_get_next_root_index()
(renamed to acpi_tb_get_next_root_index()). This argument is used in the
ACPICA upstream.

Link: https://github.com/acpica/acpica/commit/6eb364d7
Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Lv Zheng
2015-04-13 11:49:30 +08:00
کامیت شده توسط Rafael J. Wysocki
والد 9bd4ce36dc
کامیت 76cffa79bd
3فایلهای تغییر یافته به همراه20 افزوده شده و 48 حذف شده

مشاهده پرونده

@@ -356,7 +356,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
/* Add the table to the global root table list */
status = acpi_tb_get_next_root_index(&i);
status = acpi_tb_get_next_table_descriptor(&i, NULL);
if (ACPI_FAILURE(status)) {
goto release_and_exit;
}
@@ -455,43 +455,6 @@ finish_override:
acpi_tb_release_temp_table(&new_table_desc);
}
/*******************************************************************************
*
* FUNCTION: acpi_tb_store_table
*
* PARAMETERS: address - Table address
* table - Table header
* length - Table length
* flags - Install flags
* table_index - Where the table index is returned
*
* RETURN: Status and table index.
*
* DESCRIPTION: Add an ACPI table to the global table list
*
******************************************************************************/
acpi_status
acpi_tb_store_table(acpi_physical_address address,
struct acpi_table_header * table,
u32 length, u8 flags, u32 *table_index)
{
acpi_status status;
struct acpi_table_desc *table_desc;
status = acpi_tb_get_next_root_index(table_index);
if (ACPI_FAILURE(status)) {
return (status);
}
/* Initialize added table */
table_desc = &acpi_gbl_root_table_list.tables[*table_index];
acpi_tb_init_table_descriptor(table_desc, address, flags, table);
table_desc->pointer = table;
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_tb_uninstall_table