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-28 15:48:04 +0200
commit5364d6833486d90338a17aae5151e8feb45688b5 (patch)
tree5b9d26faa7046aa28f8eebed086b0e26fc7f5696 /i386
parent367abcb6571d15ac313cb0d191acbe61db8b38b6 (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 cf7a736..3978303 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
/*