ia64/xen-unstable

changeset 2996:bfe070fe1dee

bitkeeper revision 1.1159.1.423 (419a4b1eF-m6DjqBFFvhQQg8V-VsqQ)

Initialize trap tables on additional cpus.
author cl349@freefall.cl.cam.ac.uk
date Tue Nov 16 18:46:54 2004 +0000 (2004-11-16)
parents b3bd8fd6c418
children 4f01ffe63f2d
files linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c
line diff
     1.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c	Tue Nov 16 18:46:00 2004 +0000
     1.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c	Tue Nov 16 18:46:54 2004 +0000
     1.3 @@ -835,6 +835,7 @@ static int __init do_boot_cpu(int apicid
     1.4  	extern void startup_32_smp(void);
     1.5  	extern void hypervisor_callback(void);
     1.6  	extern void failsafe_callback(void);
     1.7 +	extern int smp_trap_init(trap_info_t *);
     1.8  	int i;
     1.9  
    1.10  	cpu = ++cpucount;
    1.11 @@ -894,7 +895,7 @@ static int __init do_boot_cpu(int apicid
    1.12  		ctxt.trap_ctxt[i].vector = i;
    1.13  		ctxt.trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
    1.14  	}
    1.15 -	ctxt.fast_trap_idx = 0;
    1.16 +	ctxt.fast_trap_idx = smp_trap_init(ctxt.trap_ctxt);
    1.17  
    1.18  	/* No LDT. */
    1.19  	ctxt.ldt_ents = 0;
     2.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c	Tue Nov 16 18:46:00 2004 +0000
     2.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c	Tue Nov 16 18:46:54 2004 +0000
     2.3 @@ -1073,6 +1073,18 @@ void __init trap_init(void)
     2.4  	cpu_init();
     2.5  }
     2.6  
     2.7 +int smp_trap_init(trap_info_t *trap_ctxt)
     2.8 +{
     2.9 +	trap_info_t *t = trap_table;
    2.10 +
    2.11 +	for (t = trap_table; t->address; t++) {
    2.12 +		trap_ctxt[t->vector].flags = t->flags;
    2.13 +		trap_ctxt[t->vector].cs = t->cs;
    2.14 +		trap_ctxt[t->vector].address = t->address;
    2.15 +	}
    2.16 +	return SYSCALL_VECTOR;
    2.17 +}
    2.18 +
    2.19  
    2.20  /*
    2.21   * install_safe_pf_handler / install_normal_pf_handler: