From 5364d6833486d90338a17aae5151e8feb45688b5 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 10 Dec 2014 21:52:40 +0100 Subject: 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. --- kern/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/thread.c') diff --git a/kern/thread.c b/kern/thread.c index 8676132..9c82af5 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -223,7 +223,7 @@ void stack_privilege( void thread_init(void) { kmem_cache_init(&thread_cache, "thread", sizeof(struct thread), 0, - NULL, NULL, NULL, 0); + NULL, 0); /* * Kernel stacks should be naturally aligned, so that it @@ -232,7 +232,7 @@ void thread_init(void) */ kmem_cache_init(&stack_cache, "stack", KERNEL_STACK_SIZE, KERNEL_STACK_SIZE, - NULL, NULL, NULL, 0); + NULL, 0); /* * Fill in a template thread for fast initialization. -- cgit v1.2.3