summaryrefslogtreecommitdiff
path: root/kern/kernel.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2012-12-12 23:04:26 +0100
committerRichard Braun <rbraun@sceen.net>2012-12-12 23:04:26 +0100
commit45acb625b17ca642fa968a7ca41e0a03e8e9ccfb (patch)
tree944e86a982b2576b10dcacffb1e9439823c09bb6 /kern/kernel.c
parent51bff7b18de9329d7bd77324cc597e72173fae74 (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 'kern/kernel.c')
-rw-r--r--kern/kernel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kern/kernel.c b/kern/kernel.c
index 760f68e8..07a0f660 100644
--- a/kern/kernel.c
+++ b/kern/kernel.c
@@ -30,7 +30,7 @@ kernel_main(void)
task_setup();
thread_setup();
- /* Interrupts are enabled by this call */
+ cpu_intr_enable();
cpu_mp_setup();
thread_run();
@@ -41,7 +41,10 @@ kernel_main(void)
void __init
kernel_ap_main(void)
{
- assert(cpu_intr_enabled());
+ assert(!cpu_intr_enabled());
+
+ cpu_intr_enable();
+ cpu_ap_sync();
thread_run();