From: "Jan Beulich" Subject: [PATCH] linux/x86: put trap initialization code/data into cpuinit space Date: Thu, 13 Mar 2008 16:11:25 +0000 Message-ID: <47D9603D.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 Index: head-2008-03-06/arch/i386/kernel/traps-xen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 |4 in the second field. */ -static trap_info_t trap_table[] =3D { +static trap_info_t __cpuinitdata trap_table[] =3D { { 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(); } =20 -void smp_trap_init(trap_info_t *trap_ctxt) +void __cpuinit smp_trap_init(trap_info_t *trap_ctxt) { const trap_info_t *t =3D trap_table; =20 Index: head-2008-03-06/arch/x86_64/kernel/traps-xen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 |4 in the second field. */ -static trap_info_t trap_table[] =3D { +static trap_info_t __cpuinitdata trap_table[] =3D { { 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(); } =20 -void smp_trap_init(trap_info_t *trap_ctxt) +void __cpuinit smp_trap_init(trap_info_t *trap_ctxt) { const trap_info_t *t =3D trap_table; =20