From 45acb625b17ca642fa968a7ca41e0a03e8e9ccfb Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 12 Dec 2012 23:04:26 +0100 Subject: Simplify requirements on interrupts during initialization Don't involve the pmap module directly, as there could be others. Make the cpu module completely responsible for synchronizing all processors on kernel entry so that interrupts can be explicitely enabled there. --- arch/x86/machine/cpu.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'arch/x86/machine/cpu.h') diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h index 674892ad..66376e3a 100644 --- a/arch/x86/machine/cpu.h +++ b/arch/x86/machine/cpu.h @@ -436,18 +436,25 @@ void cpu_mp_register_lapic(unsigned int apic_id, int is_bsp); /* * Probe application processors and start them. - * - * This function enables interrupts. */ void cpu_mp_setup(void); /* * CPU initialization on APs. - * - * This function enables interrupts. */ void cpu_ap_setup(void); +/* + * Synchronize processors on kernel entry. + * + * Wait for all processors to reach a proper state when entering the kernel, + * so that memory allocations can proceed and thread scheduling started. + * + * Once this function returns, cpu_count can be used reliably to know if there + * are more than one processors, and how many. + */ +void cpu_ap_sync(void); + #endif /* __ASSEMBLER__ */ #endif /* _X86_CPU_H */ -- cgit v1.2.3