ia64/xen-unstable

changeset 18530:ae29cd95ba7d

acpi: mark several more items __init/__initdata

Remove unused acpi_reallocate_root_table()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Sep 22 15:33:42 2008 +0100 (2008-09-22)
parents d8a2d117225c
children 81483e49c74c
files 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
line diff
     1.1 --- a/xen/drivers/acpi/tables.c	Mon Sep 22 15:24:03 2008 +0100
     1.2 +++ b/xen/drivers/acpi/tables.c	Mon Sep 22 15:33:42 2008 +0100
     1.3 @@ -36,14 +36,16 @@
     1.4  
     1.5  #define ACPI_MAX_TABLES		128
     1.6  
     1.7 -static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
     1.8 -static char *mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" };
     1.9 +static const char *__initdata
    1.10 +mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" };
    1.11 +static const char *__initdata
    1.12 +mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" };
    1.13  
    1.14  static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES] __initdata;
    1.15  
    1.16  static int acpi_apic_instance __initdata;
    1.17  
    1.18 -void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
    1.19 +void __init acpi_table_print_madt_entry(struct acpi_subtable_header *header)
    1.20  {
    1.21  	if (!header)
    1.22  		return;
     2.1 --- a/xen/drivers/acpi/tables/tbfadt.c	Mon Sep 22 15:24:03 2008 +0100
     2.2 +++ b/xen/drivers/acpi/tables/tbfadt.c	Mon Sep 22 15:33:42 2008 +0100
     2.3 @@ -72,7 +72,7 @@ typedef struct acpi_fadt_info {
     2.4  #define ACPI_FADT_REQUIRED          1
     2.5  #define ACPI_FADT_SEPARATE_LENGTH   2
     2.6  
     2.7 -static struct acpi_fadt_info fadt_info_table[] = {
     2.8 +static struct acpi_fadt_info __initdata fadt_info_table[] = {
     2.9  	{"Pm1aEventBlock", ACPI_FADT_OFFSET(xpm1a_event_block),
    2.10  	 ACPI_FADT_OFFSET(pm1a_event_block),
    2.11  	 ACPI_FADT_OFFSET(pm1_event_length), ACPI_FADT_REQUIRED},
    2.12 @@ -157,7 +157,7 @@ acpi_tb_init_generic_address(struct acpi
    2.13   *
    2.14   ******************************************************************************/
    2.15  
    2.16 -void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
    2.17 +void __init acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
    2.18  {
    2.19  	u32 length;
    2.20  	struct acpi_table_header *table;
    2.21 @@ -217,7 +217,7 @@ void acpi_tb_parse_fadt(acpi_native_uint
    2.22   *
    2.23   ******************************************************************************/
    2.24  
    2.25 -void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
    2.26 +void __init acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
    2.27  {
    2.28  
    2.29  	/*
    2.30 @@ -278,7 +278,7 @@ void acpi_tb_create_local_fadt(struct ac
    2.31   *
    2.32   ******************************************************************************/
    2.33  
    2.34 -static void acpi_tb_convert_fadt(void)
    2.35 +static void __init acpi_tb_convert_fadt(void)
    2.36  {
    2.37  	u8 pm1_register_length;
    2.38  	struct acpi_generic_address *target;
    2.39 @@ -393,7 +393,7 @@ static void acpi_tb_convert_fadt(void)
    2.40   *
    2.41   ******************************************************************************/
    2.42  
    2.43 -static void acpi_tb_validate_fadt(void)
    2.44 +static void __init acpi_tb_validate_fadt(void)
    2.45  {
    2.46  	u32 *address32;
    2.47  	struct acpi_generic_address *address64;
     3.1 --- a/xen/drivers/acpi/tables/tbinstal.c	Mon Sep 22 15:24:03 2008 +0100
     3.2 +++ b/xen/drivers/acpi/tables/tbinstal.c	Mon Sep 22 15:33:42 2008 +0100
     3.3 @@ -41,6 +41,7 @@
     3.4   * POSSIBILITY OF SUCH DAMAGES.
     3.5   */
     3.6  
     3.7 +#include <xen/init.h>
     3.8  #include <acpi/acpi.h>
     3.9  #include <acpi/acnamesp.h>
    3.10  #include <acpi/actables.h>
    3.11 @@ -105,7 +106,7 @@ acpi_status acpi_tb_verify_table(struct 
    3.12   *
    3.13   ******************************************************************************/
    3.14  
    3.15 -acpi_status acpi_tb_resize_root_table_list(void)
    3.16 +acpi_status __init acpi_tb_resize_root_table_list(void)
    3.17  {
    3.18  	struct acpi_table_desc *tables;
    3.19  
     4.1 --- a/xen/drivers/acpi/tables/tbutils.c	Mon Sep 22 15:24:03 2008 +0100
     4.2 +++ b/xen/drivers/acpi/tables/tbutils.c	Mon Sep 22 15:33:42 2008 +0100
     4.3 @@ -149,7 +149,7 @@ u8 acpi_tb_tables_loaded(void)
     4.4   *
     4.5   ******************************************************************************/
     4.6  
     4.7 -void
     4.8 +void __init
     4.9  acpi_tb_print_table_header(acpi_physical_address address,
    4.10  			   struct acpi_table_header *header)
    4.11  {
    4.12 @@ -268,7 +268,7 @@ u8 acpi_tb_checksum(u8 * buffer, acpi_na
    4.13   *
    4.14   ******************************************************************************/
    4.15  
    4.16 -void
    4.17 +void __init
    4.18  acpi_tb_install_table(acpi_physical_address address,
    4.19  		      u8 flags, char *signature, acpi_native_uint table_index)
    4.20  {
     5.1 --- a/xen/drivers/acpi/tables/tbxface.c	Mon Sep 22 15:24:03 2008 +0100
     5.2 +++ b/xen/drivers/acpi/tables/tbxface.c	Mon Sep 22 15:33:42 2008 +0100
     5.3 @@ -65,7 +65,7 @@ ACPI_MODULE_NAME("tbxface")
     5.4   *
     5.5   ******************************************************************************/
     5.6  
     5.7 -acpi_status acpi_allocate_root_table(u32 initial_table_count)
     5.8 +acpi_status __init acpi_allocate_root_table(u32 initial_table_count)
     5.9  {
    5.10  
    5.11  	acpi_gbl_root_table_list.size = initial_table_count;
    5.12 @@ -153,56 +153,6 @@ acpi_initialize_tables(struct acpi_table
    5.13  
    5.14  /*******************************************************************************
    5.15   *
    5.16 - * FUNCTION:    acpi_reallocate_root_table
    5.17 - *
    5.18 - * PARAMETERS:  None
    5.19 - *
    5.20 - * RETURN:      Status
    5.21 - *
    5.22 - * DESCRIPTION: Reallocate Root Table List into dynamic memory. Copies the
    5.23 - *              root list from the previously provided scratch area. Should
    5.24 - *              be called once dynamic memory allocation is available in the
    5.25 - *              kernel
    5.26 - *
    5.27 - ******************************************************************************/
    5.28 -acpi_status acpi_reallocate_root_table(void)
    5.29 -{
    5.30 -	struct acpi_table_desc *tables;
    5.31 -	acpi_size new_size;
    5.32 -
    5.33 -	ACPI_FUNCTION_TRACE(acpi_reallocate_root_table);
    5.34 -
    5.35 -	/*
    5.36 -	 * Only reallocate the root table if the host provided a static buffer
    5.37 -	 * for the table array in the call to acpi_initialize_tables.
    5.38 -	 */
    5.39 -	if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
    5.40 -		return_ACPI_STATUS(AE_SUPPORT);
    5.41 -	}
    5.42 -
    5.43 -	new_size =
    5.44 -	    (acpi_gbl_root_table_list.count +
    5.45 -	     ACPI_ROOT_TABLE_SIZE_INCREMENT) * sizeof(struct acpi_table_desc);
    5.46 -
    5.47 -	/* Create new array and copy the old array */
    5.48 -
    5.49 -	tables = ACPI_ALLOCATE_ZEROED(new_size);
    5.50 -	if (!tables) {
    5.51 -		return_ACPI_STATUS(AE_NO_MEMORY);
    5.52 -	}
    5.53 -
    5.54 -	ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables, new_size);
    5.55 -
    5.56 -	acpi_gbl_root_table_list.size = acpi_gbl_root_table_list.count;
    5.57 -	acpi_gbl_root_table_list.tables = tables;
    5.58 -	acpi_gbl_root_table_list.flags =
    5.59 -	    ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE;
    5.60 -
    5.61 -	return_ACPI_STATUS(AE_OK);
    5.62 -}
    5.63 -
    5.64 -/*******************************************************************************
    5.65 - *
    5.66   * FUNCTION:    acpi_get_table
    5.67   *
    5.68   * PARAMETERS:  Signature           - ACPI signature of needed table
     6.1 --- a/xen/drivers/acpi/tables/tbxfroot.c	Mon Sep 22 15:24:03 2008 +0100
     6.2 +++ b/xen/drivers/acpi/tables/tbxfroot.c	Mon Sep 22 15:33:42 2008 +0100
     6.3 @@ -120,7 +120,7 @@ static acpi_status acpi_tb_validate_rsdp
     6.4   *
     6.5   ******************************************************************************/
     6.6  
     6.7 -acpi_status acpi_find_root_pointer(acpi_native_uint * table_address)
     6.8 +acpi_status __init acpi_find_root_pointer(acpi_native_uint * table_address)
     6.9  {
    6.10  	u8 *table_ptr;
    6.11  	u8 *mem_rover;
    6.12 @@ -233,7 +233,7 @@ acpi_status acpi_find_root_pointer(acpi_
    6.13   * DESCRIPTION: Search a block of memory for the RSDP signature
    6.14   *
    6.15   ******************************************************************************/
    6.16 -static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
    6.17 +static u8 *__init acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
    6.18  {
    6.19  	acpi_status status;
    6.20  	u8 *mem_rover;