summaryrefslogtreecommitdiff
path: root/kern/kernel.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-09-05 23:15:53 +0200
committerRichard Braun <rbraun@sceen.net>2014-09-05 23:15:53 +0200
commite660f1900912a5a446e51f2ab095dd46ab123802 (patch)
treea0d53d986e0c1daf664ea221b6ad83f34c4ec58a /kern/kernel.c
parenteed59b8076e7668b5e0f874bd3ed28230f470bb1 (diff)
kern/percpu: fix setup of BSP percpu area
Relocating percpu data is actually tricky, for the same reason relocating memory in general is. There may be pointers to such variables which then become invalid. Instead, keep using the percpu section as the percpu area for the BSP and store the content of the percpu section in dedicated kernel virtual memory. In addition, remove the notification kludge from the x86 cpu module.
Diffstat (limited to 'kern/kernel.c')
-rw-r--r--kern/kernel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kern/kernel.c b/kern/kernel.c
index e5469079..069649de 100644
--- a/kern/kernel.c
+++ b/kern/kernel.c
@@ -19,6 +19,7 @@
#include <kern/init.h>
#include <kern/kernel.h>
#include <kern/llsync.h>
+#include <kern/percpu.h>
#include <kern/task.h>
#include <kern/thread.h>
#include <kern/work.h>
@@ -34,6 +35,7 @@ kernel_main(void)
{
assert(!cpu_intr_enabled());
+ percpu_cleanup();
cpumap_setup();
task_setup();
thread_setup();