diff options
author | Richard Braun <rbraun@sceen.net> | 2012-12-12 23:04:26 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2012-12-12 23:04:26 +0100 |
commit | 45acb625b17ca642fa968a7ca41e0a03e8e9ccfb (patch) | |
tree | 944e86a982b2576b10dcacffb1e9439823c09bb6 /arch/x86/machine/cpu.h | |
parent | 51bff7b18de9329d7bd77324cc597e72173fae74 (diff) |
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.
Diffstat (limited to 'arch/x86/machine/cpu.h')
-rw-r--r-- | arch/x86/machine/cpu.h | 15 |
1 files changed, 11 insertions, 4 deletions
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 */ |