aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 11:48:20 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:24 -0500
commit77389e1263a7c9bc8040bda726e08b6501ba1c8b (patch)
tree5be703b3292b60cbdb9277ff01ef2ae5f964e0c6
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>
-rw-r--r--drivers/acpi/tables/tbxface.c30
-rw-r--r--include/acpi/actables.h2
2 files changed, 27 insertions, 5 deletions
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index 94544a60640d..9d451e8a4e46 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);
54 54
55/******************************************************************************* 55/*******************************************************************************
56 * 56 *
57 * FUNCTION: acpi_allocate_root_table
58 *
59 * PARAMETERS: initial_table_count - Size of initial_table_array, in number of
60 * struct acpi_table_desc structures
61 *
62 * RETURN: Status
63 *
64 * DESCRIPTION: Allocate a root table array. Used by i_aSL compiler and
65 * acpi_initialize_tables.
66 *
67 ******************************************************************************/
68
69acpi_status acpi_allocate_root_table(u32 initial_table_count)
70{
71
72 acpi_gbl_root_table_list.size = initial_table_count;
73 acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE;
74
75 return (acpi_tb_resize_root_table_list());
76}
77
78/*******************************************************************************
79 *
57 * FUNCTION: acpi_initialize_tables 80 * FUNCTION: acpi_initialize_tables
58 * 81 *
59 * PARAMETERS: initial_table_array - Pointer to an array of pre-allocated 82 * PARAMETERS: initial_table_array - Pointer to an array of pre-allocated
@@ -79,7 +102,7 @@ static acpi_status acpi_tb_load_namespace(void);
79 ******************************************************************************/ 102 ******************************************************************************/
80 103
81acpi_status __init 104acpi_status __init
82acpi_initialize_tables(struct acpi_table_desc *initial_table_array, 105acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
83 u32 initial_table_count, u8 allow_resize) 106 u32 initial_table_count, u8 allow_resize)
84{ 107{
85 acpi_physical_address rsdp_address; 108 acpi_physical_address rsdp_address;
@@ -92,10 +115,7 @@ acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
92 * Allocate the table array if requested 115 * Allocate the table array if requested
93 */ 116 */
94 if (!initial_table_array) { 117 if (!initial_table_array) {
95 acpi_gbl_root_table_list.size = initial_table_count; 118 status = acpi_allocate_root_table(initial_table_count);
96 acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE;
97
98 status = acpi_tb_resize_root_table_list();
99 if (ACPI_FAILURE(status)) { 119 if (ACPI_FAILURE(status)) {
100 return_ACPI_STATUS(status); 120 return_ACPI_STATUS(status);
101 } 121 }
diff --git a/include/acpi/actables.h b/include/acpi/actables.h
index 62947344b93a..99fa51a59a50 100644
--- a/include/acpi/actables.h
+++ b/include/acpi/actables.h
@@ -44,6 +44,8 @@
44#ifndef __ACTABLES_H__ 44#ifndef __ACTABLES_H__
45#define __ACTABLES_H__ 45#define __ACTABLES_H__
46 46
47acpi_status acpi_allocate_root_table(u32 initial_table_count);
48
47/* 49/*
48 * tbfadt - FADT parse/convert/validate 50 * tbfadt - FADT parse/convert/validate
49 */ 51 */