From f070e81f33c7f01a70923782b5358d014712d9ef 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. --- device/dev_pager.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'device/dev_pager.c') diff --git a/device/dev_pager.c b/device/dev_pager.c index 815473a..0ffcdf5 100644 --- a/device/dev_pager.c +++ b/device/dev_pager.c @@ -172,8 +172,10 @@ void dev_pager_hash_init(void) vm_size_t size; size = sizeof(struct dev_pager_entry); - kmem_cache_init(&dev_pager_hash_cache, "dev_pager_entry", size, 0, - NULL, NULL, NULL, 0); + kmem_cache_init (&dev_pager_hash_cache, + "dev_pager_entry", + size, 0, + NULL, 0); for (i = 0; i < DEV_PAGER_HASH_COUNT; i++) queue_init(&dev_pager_hashtable[i]); simple_lock_init(&dev_pager_hash_lock); @@ -704,8 +706,10 @@ void device_pager_init(void) * Initialize cache of paging structures. */ size = sizeof(struct dev_pager); - kmem_cache_init(&dev_pager_cache, "dev_pager", size, 0, - NULL, NULL, NULL, 0); + kmem_cache_init (&dev_pager_cache, + "dev_pager", + size, 0, + NULL, 0); /* * Initialize the name port hashing stuff. -- cgit v1.2.3