summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 19:48:20 +0300
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:24 -0500
commit77389e1263a7c9bc8040bda726e08b6501ba1c8b (patch)
tree5be703b3292b60cbdb9277ff01ef2ae5f964e0c6 /drivers/acpi/tables
parent694b0b2092bce3f4610626b04158a6f3a95058e6 (diff)
ACPICA: re-factor table init routines for benefit of iASL
Required new table init interface since iASL does not use RSDP/XSDT. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables')
-rw-r--r--drivers/acpi/tables/tbxface.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index 94544a60640..9d451e8a4e4 100644
--- a/drivers/acpi/tables/tbxface.c
+++ b/drivers/acpi/tables/tbxface.c
@@ -54,6 +54,29 @@ static acpi_status acpi_tb_load_namespace(void);
/*******************************************************************************
*
+ * 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_namespace(void);
******************************************************************************/
acpi_status __init
-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_desc *initial_table_array,
* 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);
}