summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-12-10 21:52:40 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-15 12:43:27 +0200
commitf070e81f33c7f01a70923782b5358d014712d9ef (patch)
tree8ceb5b8852c111558d394b002d71fc34bc421996 /i386
parent0b0d06c34589595cec2bea6f9b55b8e9ae51c3cf (diff)
kern/slab: directmap update
The main impact of the direct physical mapping on the kmem module is the slab size computation. The page allocator requires the allocation size to be a power-of-two above the page size since it uses the buddy memory allocation algorithm. Custom slab allocation functions are no longer needed since the only user was the kentry area, which has been removed recently. The KMEM_CACHE_NOCPUPOOL flag is also no longer needed since CPU pools, which are allocated from a kmem cache, can now always be allocated out of the direct physical mapping.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/fpu.c7
-rw-r--r--i386/i386/machine_task.c6
-rw-r--r--i386/i386/pcb.c6
-rw-r--r--i386/intel/pmap.c10
4 files changed, 20 insertions, 9 deletions
diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c
index 0f34833..476e1de 100644
--- a/i386/i386/fpu.c
+++ b/i386/i386/fpu.c
@@ -187,9 +187,10 @@ init_fpu(void)
void
fpu_module_init(void)
{
- kmem_cache_init(&ifps_cache, "i386_fpsave_state",
- sizeof(struct i386_fpsave_state), 16,
- NULL, NULL, NULL, 0);
+ kmem_cache_init (&ifps_cache,
+ "i386_fpsave_state",
+ sizeof(struct i386_fpsave_state), 16,
+ NULL, 0);
}
/*
diff --git a/i386/i386/machine_task.c b/i386/i386/machine_task.c
index 490b102..a514086 100644
--- a/i386/i386/machine_task.c
+++ b/i386/i386/machine_task.c
@@ -37,8 +37,10 @@ struct kmem_cache machine_task_iopb_cache;
void
machine_task_module_init (void)
{
- kmem_cache_init (&machine_task_iopb_cache, "i386_task_iopb", IOPB_BYTES, 0,
- NULL, NULL, NULL, 0);
+ kmem_cache_init (&machine_task_iopb_cache,
+ "i386_task_iopb",
+ IOPB_BYTES, 0,
+ NULL, 0);
}
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index 3a0eba0..4199f78 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -370,8 +370,10 @@ thread_t switch_context(
void pcb_module_init(void)
{
- kmem_cache_init(&pcb_cache, "pcb", sizeof(struct pcb), 0,
- NULL, NULL, NULL, 0);
+ kmem_cache_init (&pcb_cache,
+ "pcb",
+ sizeof(struct pcb), 0,
+ NULL, 0);
fpu_module_init();
}
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index dc9f360..102309f 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -977,9 +977,15 @@ void pmap_init(void)
* and of the physical-to-virtual entries.
*/
s = (vm_size_t) sizeof(struct pmap);
- kmem_cache_init(&pmap_cache, "pmap", s, 0, NULL, NULL, NULL, 0);
+ kmem_cache_init (&pmap_cache,
+ "pmap",
+ s, 0,
+ NULL, 0);
s = (vm_size_t) sizeof(struct pv_entry);
- kmem_cache_init(&pv_list_cache, "pv_entry", s, 0, NULL, NULL, NULL, 0);
+ kmem_cache_init (&pv_list_cache,
+ "pv_entry",
+ s, 0,
+ NULL, 0);
#if NCPUS > 1
/*