ACPICA: re-factor table init routines for benefit of iASL
authorBob Moore <robert.moore@intel.com>
Fri, 2 Feb 2007 16:48:20 +0000 (19:48 +0300)
committerLen Brown <len.brown@intel.com>
Sat, 3 Feb 2007 02:14:24 +0000 (21:14 -0500)
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>
drivers/acpi/tables/tbxface.c
include/acpi/actables.h

index 94544a60640dd276f5302353bbc2bf8a39abfec5..9d451e8a4e46eb30674edec1b9d7a65c739fc17d 100644 (file)
@@ -52,6 +52,29 @@ ACPI_MODULE_NAME("tbxface")
 /* Local prototypes */
 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
@@ -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);
                }
index 62947344b93a5ceed10f756a3178d2cd791f0722..99fa51a59a50fdb6d304ff2fcf9492cc1c13f161 100644 (file)
@@ -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
  */