diff options
author | Richard Braun <rbraun@sceen.net> | 2014-09-05 23:15:53 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-09-05 23:15:53 +0200 |
commit | e660f1900912a5a446e51f2ab095dd46ab123802 (patch) | |
tree | a0d53d986e0c1daf664ea221b6ad83f34c4ec58a /kern/percpu.h | |
parent | eed59b8076e7668b5e0f874bd3ed28230f470bb1 (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/percpu.h')
-rw-r--r-- | kern/percpu.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kern/percpu.h b/kern/percpu.h index 3492c6d..46d33ed 100644 --- a/kern/percpu.h +++ b/kern/percpu.h @@ -101,7 +101,9 @@ void percpu_bootstrap(void); /* * Complete initialization of the percpu module. * - * Stop using the percpu section as the percpu area of the BSP. + * The BSP keeps using the percpu section, but its content is copied to a + * dedicated block of memory used as a template for subsequently added + * processors. */ void percpu_setup(void); @@ -114,4 +116,9 @@ void percpu_setup(void); */ int percpu_add(unsigned int cpu); +/* + * Release init data allocated for setup. + */ +void percpu_cleanup(void); + #endif /* _KERN_PERCPU_H */ |