acpi: mark several more items __init/__initdata
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 22 Sep 2008 14:33:42 +0000 (15:33 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 22 Sep 2008 14:33:42 +0000 (15:33 +0100)
Remove unused acpi_reallocate_root_table()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/acpi/tables.c
xen/drivers/acpi/tables/tbfadt.c
xen/drivers/acpi/tables/tbinstal.c
xen/drivers/acpi/tables/tbutils.c
xen/drivers/acpi/tables/tbxface.c
xen/drivers/acpi/tables/tbxfroot.c

index 67f87e47b8f265e21f0f0e7f10ec244f12f14171..252bf9887397b32f13879c90c72b180b50b8c61e 100644 (file)
 
 #define ACPI_MAX_TABLES                128
 
-static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
-static char *mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" };
+static const char *__initdata
+mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
+static const char *__initdata
+mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" };
 
 static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES] __initdata;
 
 static int acpi_apic_instance __initdata;
 
-void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
+void __init acpi_table_print_madt_entry(struct acpi_subtable_header *header)
 {
        if (!header)
                return;
index a8815f13db60c24fb89ad0cc9fdc875bc2693272..fa10d162f40df5c18ed2fe6a09cf9169d788d13b 100644 (file)
@@ -72,7 +72,7 @@ typedef struct acpi_fadt_info {
 #define ACPI_FADT_REQUIRED          1
 #define ACPI_FADT_SEPARATE_LENGTH   2
 
-static struct acpi_fadt_info fadt_info_table[] = {
+static struct acpi_fadt_info __initdata fadt_info_table[] = {
        {"Pm1aEventBlock", ACPI_FADT_OFFSET(xpm1a_event_block),
         ACPI_FADT_OFFSET(pm1a_event_block),
         ACPI_FADT_OFFSET(pm1_event_length), ACPI_FADT_REQUIRED},
@@ -157,7 +157,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
  *
  ******************************************************************************/
 
-void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
+void __init acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
 {
        u32 length;
        struct acpi_table_header *table;
@@ -217,7 +217,7 @@ void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
  *
  ******************************************************************************/
 
-void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
+void __init acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
 {
 
        /*
@@ -278,7 +278,7 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
  *
  ******************************************************************************/
 
-static void acpi_tb_convert_fadt(void)
+static void __init acpi_tb_convert_fadt(void)
 {
        u8 pm1_register_length;
        struct acpi_generic_address *target;
@@ -393,7 +393,7 @@ static void acpi_tb_convert_fadt(void)
  *
  ******************************************************************************/
 
-static void acpi_tb_validate_fadt(void)
+static void __init acpi_tb_validate_fadt(void)
 {
        u32 *address32;
        struct acpi_generic_address *address64;
index c6b42f895189a76358005c242543d2f1e2913994..38a8a2c427365662c05bcfb7cb01ebeeb9cd4b1c 100644 (file)
@@ -41,6 +41,7 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
+#include <xen/init.h>
 #include <acpi/acpi.h>
 #include <acpi/acnamesp.h>
 #include <acpi/actables.h>
@@ -105,7 +106,7 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
  *
  ******************************************************************************/
 
-acpi_status acpi_tb_resize_root_table_list(void)
+acpi_status __init acpi_tb_resize_root_table_list(void)
 {
        struct acpi_table_desc *tables;
 
index 716c3eade91353d65f93cf32b7f496eb0ff571ba..914f1f47bac64a300fbe120888c17d8578a4c5f1 100644 (file)
@@ -149,7 +149,7 @@ u8 acpi_tb_tables_loaded(void)
  *
  ******************************************************************************/
 
-void
+void __init
 acpi_tb_print_table_header(acpi_physical_address address,
                           struct acpi_table_header *header)
 {
@@ -268,7 +268,7 @@ u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length)
  *
  ******************************************************************************/
 
-void
+void __init
 acpi_tb_install_table(acpi_physical_address address,
                      u8 flags, char *signature, acpi_native_uint table_index)
 {
index e37202a65b7630bad623c26c134792265d49fcb1..64eb1acc355aa70e5061a600c156166157051e5a 100644 (file)
@@ -65,7 +65,7 @@ ACPI_MODULE_NAME("tbxface")
  *
  ******************************************************************************/
 
-acpi_status acpi_allocate_root_table(u32 initial_table_count)
+acpi_status __init acpi_allocate_root_table(u32 initial_table_count)
 {
 
        acpi_gbl_root_table_list.size = initial_table_count;
@@ -151,56 +151,6 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
        return_ACPI_STATUS(status);
 }
 
-/*******************************************************************************
- *
- * FUNCTION:    acpi_reallocate_root_table
- *
- * PARAMETERS:  None
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Reallocate Root Table List into dynamic memory. Copies the
- *              root list from the previously provided scratch area. Should
- *              be called once dynamic memory allocation is available in the
- *              kernel
- *
- ******************************************************************************/
-acpi_status acpi_reallocate_root_table(void)
-{
-       struct acpi_table_desc *tables;
-       acpi_size new_size;
-
-       ACPI_FUNCTION_TRACE(acpi_reallocate_root_table);
-
-       /*
-        * Only reallocate the root table if the host provided a static buffer
-        * for the table array in the call to acpi_initialize_tables.
-        */
-       if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
-               return_ACPI_STATUS(AE_SUPPORT);
-       }
-
-       new_size =
-           (acpi_gbl_root_table_list.count +
-            ACPI_ROOT_TABLE_SIZE_INCREMENT) * sizeof(struct acpi_table_desc);
-
-       /* Create new array and copy the old array */
-
-       tables = ACPI_ALLOCATE_ZEROED(new_size);
-       if (!tables) {
-               return_ACPI_STATUS(AE_NO_MEMORY);
-       }
-
-       ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables, new_size);
-
-       acpi_gbl_root_table_list.size = acpi_gbl_root_table_list.count;
-       acpi_gbl_root_table_list.tables = tables;
-       acpi_gbl_root_table_list.flags =
-           ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE;
-
-       return_ACPI_STATUS(AE_OK);
-}
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_get_table
index 3b2e6c27c53587bfcda2a96cb6698137c1ad33f2..ba03bcf04a142415d7cd11fc5c937a0b2abeaf9b 100644 (file)
@@ -120,7 +120,7 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
  *
  ******************************************************************************/
 
-acpi_status acpi_find_root_pointer(acpi_native_uint * table_address)
+acpi_status __init acpi_find_root_pointer(acpi_native_uint * table_address)
 {
        u8 *table_ptr;
        u8 *mem_rover;
@@ -233,7 +233,7 @@ acpi_status acpi_find_root_pointer(acpi_native_uint * table_address)
  * DESCRIPTION: Search a block of memory for the RSDP signature
  *
  ******************************************************************************/
-static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
+static u8 *__init acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
 {
        acpi_status status;
        u8 *mem_rover;