WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] ACPI: __init-annotate APEI code

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] ACPI: __init-annotate APEI code
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 23 Dec 2010 13:13:23 +0000
Delivery-date: Thu, 23 Dec 2010 05:14:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-12-23.orig/xen/drivers/acpi/apei/apei-base.c
+++ 2010-12-23/xen/drivers/acpi/apei/apei-base.c
@@ -37,6 +37,7 @@
 #include <xen/string.h>
 #include <xen/types.h>
 #include <xen/spinlock.h>
+#include <xen/init.h>
 #include <xen/cper.h>
 #include <asm/io.h>
 #include <acpi/acpi.h>
@@ -201,10 +202,10 @@ typedef int (*apei_exec_entry_func_t)(st
                                      struct acpi_whea_header *entry,
                                      void *data);
 
-static int apei_exec_for_each_entry(struct apei_exec_context *ctx,
-                                   apei_exec_entry_func_t func,
-                                   void *data,
-                                   int *end)
+static int __init apei_exec_for_each_entry(struct apei_exec_context *ctx,
+                                          apei_exec_entry_func_t func,
+                                          void *data,
+                                          int *end)
 {
        u8 ins;
        int i, rc;
@@ -229,9 +230,9 @@ static int apei_exec_for_each_entry(stru
        return 0;
 }
 
-static int pre_map_gar_callback(struct apei_exec_context *ctx,
-                               struct acpi_whea_header *entry,
-                               void *data)
+static int __init pre_map_gar_callback(struct apei_exec_context *ctx,
+                                      struct acpi_whea_header *entry,
+                                      void *data)
 {
        u8 ins = entry->instruction;
 
@@ -242,7 +243,7 @@ static int pre_map_gar_callback(struct a
 }
 
 /* Pre-map all GARs in action table. */
-int apei_exec_pre_map_gars(struct apei_exec_context *ctx)
+int __init apei_exec_pre_map_gars(struct apei_exec_context *ctx)
 {
        int rc, end;
 
@@ -258,9 +259,9 @@ int apei_exec_pre_map_gars(struct apei_e
        return rc;
 }
 
-static int post_unmap_gar_callback(struct apei_exec_context *ctx,
-                                  struct acpi_whea_header *entry,
-                                  void *data)
+static int __init post_unmap_gar_callback(struct apei_exec_context *ctx,
+                                         struct acpi_whea_header *entry,
+                                         void *data)
 {
        u8 ins = entry->instruction;
 
@@ -271,7 +272,7 @@ static int post_unmap_gar_callback(struc
 }
 
 /* Post-unmap all GAR in action table. */
-int apei_exec_post_unmap_gars(struct apei_exec_context *ctx)
+int __init apei_exec_post_unmap_gars(struct apei_exec_context *ctx)
 {
        return apei_exec_for_each_entry(ctx, post_unmap_gar_callback,
                                        NULL, NULL);
--- 2010-12-23.orig/xen/drivers/acpi/apei/apei-io.c
+++ 2010-12-23/xen/drivers/acpi/apei/apei-io.c
@@ -75,7 +75,7 @@ static void __iomem *__apei_ioremap_fast
 
 static int apei_range_nr;
 
-static void __iomem *apei_range_map(paddr_t paddr, unsigned long size)
+static void __iomem *__init apei_range_map(paddr_t paddr, unsigned long size)
 {
        int i, pg;
        int start_nr, cur_nr;
@@ -101,7 +101,7 @@ static void __iomem *apei_range_map(padd
  * whether the area is already pre-mapped, if it is, return; otherwise,
  * do the real map, and add the mapping into apei_iomaps list.
  */
-void __iomem *apei_pre_map(paddr_t paddr, unsigned long size)
+void __iomem *__init apei_pre_map(paddr_t paddr, unsigned long size)
 {
        void __iomem *vaddr;
        struct apei_iomap *map;
@@ -139,7 +139,7 @@ void __iomem *apei_pre_map(paddr_t paddr
 /*
  * Used to post-unmap the specified IO memory area.
  */
-static void apei_post_unmap(paddr_t paddr, unsigned long size)
+static void __init apei_post_unmap(paddr_t paddr, unsigned long size)
 {
        struct apei_iomap *map;
        unsigned long flags;
@@ -191,7 +191,7 @@ static int apei_check_gar(struct acpi_ge
 }
 
 /* Pre-map, working on GAR */
-int apei_pre_map_gar(struct acpi_generic_address *reg)
+int __init apei_pre_map_gar(struct acpi_generic_address *reg)
 {
        u64 paddr;
        void __iomem *vaddr;
@@ -212,7 +212,7 @@ int apei_pre_map_gar(struct acpi_generic
 }
 
 /* Post-unmap, working on GAR */
-int apei_post_unmap_gar(struct acpi_generic_address *reg)
+int __init apei_post_unmap_gar(struct acpi_generic_address *reg)
 {
        u64 paddr;
        int rc;
--- 2010-12-23.orig/xen/drivers/acpi/apei/erst.c
+++ 2010-12-23/xen/drivers/acpi/apei/erst.c
@@ -713,7 +713,7 @@ int erst_clear(u64 record_id)
        return rc;
 }
 
-static int erst_check_table(struct acpi_table_erst *erst_tab)
+static int __init erst_check_table(struct acpi_table_erst *erst_tab)
 {
        if (erst_tab->header_length != sizeof(struct acpi_table_erst))
                return -EINVAL;
@@ -727,7 +727,7 @@ static int erst_check_table(struct acpi_
        return 0;
 }
 
-int erst_init(void)
+int __init erst_init(void)
 {
        int rc = 0;
        acpi_status status;


Attachment: acpi-apei-init.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ACPI: __init-annotate APEI code, Jan Beulich <=