debuggers.hg

changeset 22680:0292bec5e98d

ACPI: __init-annotate APEI code

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir@xen.org>
date Fri Dec 24 10:14:58 2010 +0000 (2010-12-24)
parents 609da2035aab
children 97779ffa76f5
files xen/drivers/acpi/apei/apei-base.c xen/drivers/acpi/apei/apei-io.c xen/drivers/acpi/apei/erst.c
line diff
     1.1 --- a/xen/drivers/acpi/apei/apei-base.c	Fri Dec 24 10:14:36 2010 +0000
     1.2 +++ b/xen/drivers/acpi/apei/apei-base.c	Fri Dec 24 10:14:58 2010 +0000
     1.3 @@ -37,6 +37,7 @@
     1.4  #include <xen/string.h>
     1.5  #include <xen/types.h>
     1.6  #include <xen/spinlock.h>
     1.7 +#include <xen/init.h>
     1.8  #include <xen/cper.h>
     1.9  #include <asm/io.h>
    1.10  #include <acpi/acpi.h>
    1.11 @@ -201,10 +202,10 @@ typedef int (*apei_exec_entry_func_t)(st
    1.12  				      struct acpi_whea_header *entry,
    1.13  				      void *data);
    1.14  
    1.15 -static int apei_exec_for_each_entry(struct apei_exec_context *ctx,
    1.16 -				    apei_exec_entry_func_t func,
    1.17 -				    void *data,
    1.18 -				    int *end)
    1.19 +static int __init apei_exec_for_each_entry(struct apei_exec_context *ctx,
    1.20 +					   apei_exec_entry_func_t func,
    1.21 +					   void *data,
    1.22 +					   int *end)
    1.23  {
    1.24  	u8 ins;
    1.25  	int i, rc;
    1.26 @@ -229,9 +230,9 @@ static int apei_exec_for_each_entry(stru
    1.27  	return 0;
    1.28  }
    1.29  
    1.30 -static int pre_map_gar_callback(struct apei_exec_context *ctx,
    1.31 -				struct acpi_whea_header *entry,
    1.32 -				void *data)
    1.33 +static int __init pre_map_gar_callback(struct apei_exec_context *ctx,
    1.34 +				       struct acpi_whea_header *entry,
    1.35 +				       void *data)
    1.36  {
    1.37  	u8 ins = entry->instruction;
    1.38  
    1.39 @@ -242,7 +243,7 @@ static int pre_map_gar_callback(struct a
    1.40  }
    1.41  
    1.42  /* Pre-map all GARs in action table. */
    1.43 -int apei_exec_pre_map_gars(struct apei_exec_context *ctx)
    1.44 +int __init apei_exec_pre_map_gars(struct apei_exec_context *ctx)
    1.45  {
    1.46  	int rc, end;
    1.47  
    1.48 @@ -258,9 +259,9 @@ int apei_exec_pre_map_gars(struct apei_e
    1.49  	return rc;
    1.50  }
    1.51  
    1.52 -static int post_unmap_gar_callback(struct apei_exec_context *ctx,
    1.53 -				   struct acpi_whea_header *entry,
    1.54 -				   void *data)
    1.55 +static int __init post_unmap_gar_callback(struct apei_exec_context *ctx,
    1.56 +					  struct acpi_whea_header *entry,
    1.57 +					  void *data)
    1.58  {
    1.59  	u8 ins = entry->instruction;
    1.60  
    1.61 @@ -271,7 +272,7 @@ static int post_unmap_gar_callback(struc
    1.62  }
    1.63  
    1.64  /* Post-unmap all GAR in action table. */
    1.65 -int apei_exec_post_unmap_gars(struct apei_exec_context *ctx)
    1.66 +int __init apei_exec_post_unmap_gars(struct apei_exec_context *ctx)
    1.67  {
    1.68  	return apei_exec_for_each_entry(ctx, post_unmap_gar_callback,
    1.69  					NULL, NULL);
     2.1 --- a/xen/drivers/acpi/apei/apei-io.c	Fri Dec 24 10:14:36 2010 +0000
     2.2 +++ b/xen/drivers/acpi/apei/apei-io.c	Fri Dec 24 10:14:58 2010 +0000
     2.3 @@ -75,7 +75,7 @@ static void __iomem *__apei_ioremap_fast
     2.4  
     2.5  static int apei_range_nr;
     2.6  
     2.7 -static void __iomem *apei_range_map(paddr_t paddr, unsigned long size)
     2.8 +static void __iomem *__init apei_range_map(paddr_t paddr, unsigned long size)
     2.9  {
    2.10  	int i, pg;
    2.11  	int start_nr, cur_nr;
    2.12 @@ -101,7 +101,7 @@ static void __iomem *apei_range_map(padd
    2.13   * whether the area is already pre-mapped, if it is, return; otherwise,
    2.14   * do the real map, and add the mapping into apei_iomaps list.
    2.15   */
    2.16 -void __iomem *apei_pre_map(paddr_t paddr, unsigned long size)
    2.17 +void __iomem *__init apei_pre_map(paddr_t paddr, unsigned long size)
    2.18  {
    2.19  	void __iomem *vaddr;
    2.20  	struct apei_iomap *map;
    2.21 @@ -139,7 +139,7 @@ void __iomem *apei_pre_map(paddr_t paddr
    2.22  /*
    2.23   * Used to post-unmap the specified IO memory area.
    2.24   */
    2.25 -static void apei_post_unmap(paddr_t paddr, unsigned long size)
    2.26 +static void __init apei_post_unmap(paddr_t paddr, unsigned long size)
    2.27  {
    2.28  	struct apei_iomap *map;
    2.29  	unsigned long flags;
    2.30 @@ -191,7 +191,7 @@ static int apei_check_gar(struct acpi_ge
    2.31  }
    2.32  
    2.33  /* Pre-map, working on GAR */
    2.34 -int apei_pre_map_gar(struct acpi_generic_address *reg)
    2.35 +int __init apei_pre_map_gar(struct acpi_generic_address *reg)
    2.36  {
    2.37  	u64 paddr;
    2.38  	void __iomem *vaddr;
    2.39 @@ -212,7 +212,7 @@ int apei_pre_map_gar(struct acpi_generic
    2.40  }
    2.41  
    2.42  /* Post-unmap, working on GAR */
    2.43 -int apei_post_unmap_gar(struct acpi_generic_address *reg)
    2.44 +int __init apei_post_unmap_gar(struct acpi_generic_address *reg)
    2.45  {
    2.46  	u64 paddr;
    2.47  	int rc;
     3.1 --- a/xen/drivers/acpi/apei/erst.c	Fri Dec 24 10:14:36 2010 +0000
     3.2 +++ b/xen/drivers/acpi/apei/erst.c	Fri Dec 24 10:14:58 2010 +0000
     3.3 @@ -713,7 +713,7 @@ int erst_clear(u64 record_id)
     3.4  	return rc;
     3.5  }
     3.6  
     3.7 -static int erst_check_table(struct acpi_table_erst *erst_tab)
     3.8 +static int __init erst_check_table(struct acpi_table_erst *erst_tab)
     3.9  {
    3.10  	if (erst_tab->header_length != sizeof(struct acpi_table_erst))
    3.11  		return -EINVAL;
    3.12 @@ -727,7 +727,7 @@ static int erst_check_table(struct acpi_
    3.13  	return 0;
    3.14  }
    3.15  
    3.16 -int erst_init(void)
    3.17 +int __init erst_init(void)
    3.18  {
    3.19  	int rc = 0;
    3.20  	acpi_status status;