From 93833bb0fe0d1e87112a944d0ae0288ba695fa51 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. --- ipc/ipc_init.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'ipc/ipc_init.c') diff --git a/ipc/ipc_init.c b/ipc/ipc_init.c index 2c58a6e..b7483d4 100644 --- a/ipc/ipc_init.c +++ b/ipc/ipc_init.c @@ -72,17 +72,25 @@ ipc_bootstrap(void) ipc_port_timestamp_lock_init(); ipc_port_timestamp_data = 0; - kmem_cache_init(&ipc_space_cache, "ipc_space", - sizeof(struct ipc_space), 0, NULL, NULL, NULL, 0); - - kmem_cache_init(&ipc_entry_cache, "ipc_entry", - sizeof(struct ipc_entry), 0, NULL, NULL, NULL, 0); - - kmem_cache_init(&ipc_object_caches[IOT_PORT], "ipc_port", - sizeof(struct ipc_port), 0, NULL, NULL, NULL, 0); - - kmem_cache_init(&ipc_object_caches[IOT_PORT_SET], "ipc_pset", - sizeof(struct ipc_pset), 0, NULL, NULL, NULL, 0); + kmem_cache_init (&ipc_space_cache, + "ipc_space", + sizeof(struct ipc_space), 0, + NULL, 0); + + kmem_cache_init (&ipc_entry_cache, + "ipc_entry", + sizeof(struct ipc_entry), 0, + NULL, 0); + + kmem_cache_init (&ipc_object_caches[IOT_PORT], + "ipc_port", + sizeof(struct ipc_port), 0, + NULL, 0); + + kmem_cache_init (&ipc_object_caches[IOT_PORT_SET], + "ipc_pset", + sizeof(struct ipc_pset), 0, + NULL, 0); /* create special spaces */ -- cgit v1.2.3