summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-04-23 09:28:00 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-04-23 09:28:00 +0000
commit50640ab12b82c614a71a8bd1d71eb8c7ded5233c (patch)
tree0f1fd90321f30299655ca5daec2d6de5c9bc22ac
parent2df04d2aeb7a6057fe4de4cf19fdf7a33e0b591a (diff)
Clean up an obsolete allocator.
miod@ ok
-rw-r--r--sys/kern/subr_pool.c23
-rw-r--r--sys/sys/pool.h3
2 files changed, 2 insertions, 24 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index 15b812ecdaf..1e21bd95e6a 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.50 2007/04/12 21:47:45 miod Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.51 2007/04/23 09:27:59 art Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -1944,17 +1944,11 @@ sysctl_dopool(int *name, u_int namelen, char *where, size_t *sizep)
*
* Each pool has a backend allocator that handles allocation, deallocation
*/
-void *pool_page_alloc_kmem(struct pool *, int);
-void pool_page_free_kmem(struct pool *, void *);
void *pool_page_alloc_oldnointr(struct pool *, int);
void pool_page_free_oldnointr(struct pool *, void *);
void *pool_page_alloc(struct pool *, int);
void pool_page_free(struct pool *, void *);
-/* old default allocator, interrupt safe */
-struct pool_allocator pool_allocator_kmem = {
- pool_page_alloc_kmem, pool_page_free_kmem, 0,
-};
/* previous nointr. handles large allocations safely */
struct pool_allocator pool_allocator_oldnointr = {
pool_page_alloc_oldnointr, pool_page_free_oldnointr, 0,
@@ -2032,21 +2026,6 @@ pool_page_free(struct pool *pp, void *v)
}
void *
-pool_page_alloc_kmem(struct pool *pp, int flags)
-{
- boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE;
-
- return ((void *)uvm_km_alloc_poolpage1(kmem_map, NULL, waitok));
-}
-
-void
-pool_page_free_kmem(struct pool *pp, void *v)
-{
-
- uvm_km_free_poolpage1(kmem_map, (vaddr_t)v);
-}
-
-void *
pool_page_alloc_oldnointr(struct pool *pp, int flags)
{
boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE;
diff --git a/sys/sys/pool.h b/sys/sys/pool.h
index 4fae0941981..db2b629b4df 100644
--- a/sys/sys/pool.h
+++ b/sys/sys/pool.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pool.h,v 1.21 2007/03/21 17:57:40 pedro Exp $ */
+/* $OpenBSD: pool.h,v 1.22 2007/04/23 09:27:59 art Exp $ */
/* $NetBSD: pool.h,v 1.27 2001/06/06 22:00:17 rafal Exp $ */
/*-
@@ -191,7 +191,6 @@ extern struct pool_allocator pool_allocator_oldnointr;
/* interrupt safe (name preserved for compat) new default allocator */
extern struct pool_allocator pool_allocator_nointr;
/* previous interrupt safe allocator, allocates from kmem */
-extern struct pool_allocator pool_allocator_kmem;
void pool_init(struct pool *, size_t, u_int, u_int, int,
const char *, struct pool_allocator *);