Skip to content

Commit

Permalink
ACPICA: acpiexec/acpinames: Support very large number of ACPI tables
Browse files Browse the repository at this point in the history
ACPICA commit ca3bd4c5cdc39a9009280032adbbc20f34e94c47

Fix a couple of issues with >40 ACPI tables.
Return exit error for acpinames to enable use with BIOS builds.

The new exported function is used by acpinames. For Linux kernel, this
change is a no-op.

Link: https://github.com/acpica/acpica/commit/ca3bd4c5
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Aug 25, 2015
1 parent 17dd4dc commit 93cdafa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
5 changes: 5 additions & 0 deletions drivers/acpi/acpica/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,9 @@ acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address);

u8 acpi_is_valid_signature(char *signature);

/*
* tbxfload
*/
acpi_status acpi_tb_load_namespace(void);

#endif /* __ACTABLES_H__ */
17 changes: 12 additions & 5 deletions drivers/acpi/acpica/tbxfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME("tbxfload")

/* Local prototypes */
static acpi_status acpi_tb_load_namespace(void);

/*******************************************************************************
*
* FUNCTION: acpi_load_tables
Expand All @@ -65,7 +62,6 @@ static acpi_status acpi_tb_load_namespace(void);
* DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
*
******************************************************************************/

acpi_status __init acpi_load_tables(void)
{
acpi_status status;
Expand All @@ -75,6 +71,13 @@ acpi_status __init acpi_load_tables(void)
/* Load the namespace from the tables */

status = acpi_tb_load_namespace();

/* Don't let single failures abort the load */

if (status == AE_CTRL_TERMINATE) {
status = AE_OK;
}

if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"While loading namespace from ACPI tables"));
Expand All @@ -97,7 +100,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_load_tables)
* the RSDT/XSDT.
*
******************************************************************************/
static acpi_status acpi_tb_load_namespace(void)
acpi_status acpi_tb_load_namespace(void)
{
acpi_status status;
u32 i;
Expand Down Expand Up @@ -214,6 +217,10 @@ static acpi_status acpi_tb_load_namespace(void)
ACPI_ERROR((AE_INFO,
"%u ACPI AML tables successfully acquired and loaded, %u failed",
tables_loaded, tables_failed));

/* Indicate at least one failure */

status = AE_CTRL_TERMINATE;
}

unlock_and_exit:
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/utfileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ acpi_ut_read_table_from_file(char *filename, struct acpi_table_header ** table)
/* Get the entire file */

fprintf(stderr,
"Reading ACPI table from file %10s - Length %.8u (0x%06X)\n",
"Reading ACPI table from file %12s - Length %.8u (0x%06X)\n",
filename, file_size, file_size);

status = acpi_ut_read_table(file, table, &table_length);
Expand Down

0 comments on commit 93cdafa

Please sign in to comment.