From ff81896d6f21cfd03e168b175a6bce110fb73983 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <410c2f0190f74c35505beda6ff3f2da7819f8bac.1164352285.git.len.brown@intel.com> References: <410c2f0190f74c35505beda6ff3f2da7819f8bac.1164352285.git.len.brown@intel.com> From: Robert Moore Date: Tue, 14 Nov 2006 20:05:34 +0300 Subject: [PATCH 30/65] ACPICA: re-factor table init routines for benefit of iASL Reply-To: Len Brown Organization: Intel Open Source Technology Center Required new table init interface since iASL does not use RSDP/XSDT. Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- drivers/acpi/tables/tbxface.c | 30 +++++++++++++++++++++++++----- include/acpi/actables.h | 2 ++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 3540fe6..c5009f5 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c @@ -54,6 +54,29 @@ static acpi_status acpi_tb_load_namespac /******************************************************************************* * + * FUNCTION: acpi_allocate_root_table + * + * PARAMETERS: initial_table_count - Size of initial_table_array, in number of + * struct acpi_table_desc structures + * + * RETURN: Status + * + * DESCRIPTION: Allocate a root table array. Used by i_aSL compiler and + * acpi_initialize_tables. + * + ******************************************************************************/ + +acpi_status acpi_allocate_root_table(u32 initial_table_count) +{ + + acpi_gbl_root_table_list.size = initial_table_count; + acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE; + + return (acpi_tb_resize_root_table_list()); +} + +/******************************************************************************* + * * FUNCTION: acpi_initialize_tables * * PARAMETERS: initial_table_array - Pointer to an array of pre-allocated @@ -79,7 +102,7 @@ static acpi_status acpi_tb_load_namespac ******************************************************************************/ acpi_status -acpi_initialize_tables(struct acpi_table_desc *initial_table_array, +acpi_initialize_tables(struct acpi_table_desc * initial_table_array, u32 initial_table_count, u8 allow_resize) { acpi_physical_address rsdp_address; @@ -92,10 +115,7 @@ acpi_initialize_tables(struct acpi_table * Allocate the table array if requested */ if (!initial_table_array) { - acpi_gbl_root_table_list.size = initial_table_count; - acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE; - - status = acpi_tb_resize_root_table_list(); + status = acpi_allocate_root_table(initial_table_count); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } diff --git a/include/acpi/actables.h b/include/acpi/actables.h index 6294734..99fa51a 100644 --- a/include/acpi/actables.h +++ b/include/acpi/actables.h @@ -44,6 +44,8 @@ #ifndef __ACTABLES_H__ #define __ACTABLES_H__ +acpi_status acpi_allocate_root_table(u32 initial_table_count); + /* * tbfadt - FADT parse/convert/validate */ -- 1.4.4.1