From: Trammell Hudson Date: Tue, 21 Oct 2008 22:43:25 +0000 (-0500) Subject: Merge branch 'kitten' of ssh://sharedev@localhost/home/sharedev/palacios into kitten X-Git-Tag: 1.0^2~30 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=3aefb820e651c67fb0654fe1df301c8828dbb35d;hp=e05033e42323e92783e8c93d77c0e4be63761667;p=palacios-OLD.git Merge branch 'kitten' of ssh://sharedev@localhost/home/sharedev/palacios into kitten Conflicts: kitten/init/main.c --- diff --git a/kitten/arch/x86_64/kernel/interrupts.c b/kitten/arch/x86_64/kernel/interrupts.c index a62c106..7441829 100644 --- a/kitten/arch/x86_64/kernel/interrupts.c +++ b/kitten/arch/x86_64/kernel/interrupts.c @@ -10,9 +10,8 @@ #include #include -typedef void (*idtvec_handler_t)(struct pt_regs *regs, unsigned int vector); - idtvec_handler_t idtvec_table[NUM_IDT_ENTRIES]; +static DEFINE_SPINLOCK(idtvec_table_lock); extern void asm_idtvec_table(void); @@ -220,11 +219,12 @@ do_apic_spurious(struct pt_regs *regs, unsigned int vector) while (1) {} } -void __init +void set_idtvec_handler(unsigned int vector, idtvec_handler_t handler) { char namebuf[KSYM_NAME_LEN+1]; unsigned long symsize, offset; + unsigned long irqstate; ASSERT(vector < NUM_IDT_ENTRIES); @@ -235,7 +235,9 @@ set_idtvec_handler(unsigned int vector, idtvec_handler_t handler) ); } + spin_lock_irqsave(&idtvec_table_lock, irqstate); idtvec_table[vector] = handler; + spin_unlock_irqrestore(&idtvec_table_lock, irqstate); } void diff --git a/kitten/include/arch-x86_64/ptrace.h b/kitten/include/arch-x86_64/ptrace.h index e57c4f4..19f91d9 100644 --- a/kitten/include/arch-x86_64/ptrace.h +++ b/kitten/include/arch-x86_64/ptrace.h @@ -116,6 +116,10 @@ enum { EF_ID = 0x00200000, /* id */ }; +/* TODO: remove this */ +typedef void (*idtvec_handler_t)(struct pt_regs *regs, unsigned int vector); +void set_idtvec_handler(unsigned int vector, idtvec_handler_t handler); + #endif #endif diff --git a/kitten/init/main.c b/kitten/init/main.c index d56f7e1..16369d3 100644 --- a/kitten/init/main.c +++ b/kitten/init/main.c @@ -120,15 +120,14 @@ start_kernel() #ifdef CONFIG_V3VEE RunVMM(); #else - /* * Start up user-space... */ printk(KERN_INFO "Loading initial user-level task (init_task)...\n"); if ((status = create_init_task()) != 0) panic("Failed to create init_task (status=%d).", status); -#endif schedule(); /* This should not return */ +#endif BUG(); }