[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux/x86: put trap initialization code/data into cpuinit space



As usual, written and tested on 2.6.25-rc5 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-03-06/arch/i386/kernel/traps-xen.c
===================================================================
--- head-2008-03-06.orig/arch/i386/kernel/traps-xen.c   2008-03-06 
10:52:57.000000000 +0100
+++ head-2008-03-06/arch/i386/kernel/traps-xen.c        2008-03-03 
15:24:49.000000000 +0100
@@ -1180,7 +1180,7 @@ asmlinkage void math_emulate(long arg)
  * NB. All these are "trap gates" (i.e. events_mask isn't set) except
  * for those that specify <dpl>|4 in the second field.
  */
-static trap_info_t trap_table[] = {
+static trap_info_t __cpuinitdata trap_table[] = {
        {  0, 0, __KERNEL_CS, (unsigned long)divide_error               },
        {  1, 0|4, __KERNEL_CS, (unsigned long)debug                    },
        {  3, 3|4, __KERNEL_CS, (unsigned long)int3                     },
@@ -1236,7 +1236,7 @@ void __init trap_init(void)
        cpu_init();
 }
 
-void smp_trap_init(trap_info_t *trap_ctxt)
+void __cpuinit smp_trap_init(trap_info_t *trap_ctxt)
 {
        const trap_info_t *t = trap_table;
 
Index: head-2008-03-06/arch/x86_64/kernel/traps-xen.c
===================================================================
--- head-2008-03-06.orig/arch/x86_64/kernel/traps-xen.c 2008-03-03 
14:54:20.000000000 +0100
+++ head-2008-03-06/arch/x86_64/kernel/traps-xen.c      2008-03-03 
15:24:49.000000000 +0100
@@ -1195,7 +1195,7 @@ EXPORT_SYMBOL_GPL(math_state_restore);
  * NB. All these are "interrupt gates" (i.e. events_mask is set) because we
  * specify <dpl>|4 in the second field.
  */
-static trap_info_t trap_table[] = {
+static trap_info_t __cpuinitdata trap_table[] = {
         {  0, 0|4, __KERNEL_CS, (unsigned long)divide_error               },
         {  1, 0|4, __KERNEL_CS, (unsigned long)debug                      },
         {  3, 3|4, __KERNEL_CS, (unsigned long)int3                       },
@@ -1236,7 +1236,7 @@ void __init trap_init(void)
        cpu_init();
 }
 
-void smp_trap_init(trap_info_t *trap_ctxt)
+void __cpuinit smp_trap_init(trap_info_t *trap_ctxt)
 {
        const trap_info_t *t = trap_table;
 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.