diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-05-27 21:04:08 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-05-27 21:04:08 +0000 |
commit | b1fd1a5b274631ff6c66d76aeef329f5bd115c70 (patch) | |
tree | c509d794af45fb2cf59dd15e8fec2c0b24977397 /sys/arch/hppa | |
parent | 4f0d04bfefc97aeb784efede15dcfda5ed88741c (diff) |
hppa pmap needs to use old pool allocator for now.
i know the fix, but it's not here yet.
ok mickey
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/hppa/pmap.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index 46c9586aab6..035817fc8fe 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.110 2004/04/21 22:17:55 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.111 2004/05/27 21:04:07 tedu Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -99,6 +99,34 @@ int pmap_initialized; u_int hppa_prot[8]; +/* + * workaround until the uvm_km_getpage can be used this early. + */ +void *hppa_pool_page_alloc(struct pool *, int); +void hppa_pool_page_free(struct pool *, void *); + +void * +hppa_pool_page_alloc(struct pool *pp, int flags) +{ + boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE; + + return ((void *)uvm_km_alloc_poolpage1(kmem_map, uvmexp.kmem_object, + waitok)); +} + +void +hppa_pool_page_free(struct pool *pp, void *v) +{ + + uvm_km_free_poolpage1(kmem_map, (vaddr_t)v); +} + +struct pool_allocator hppa_pool_allocator = { + hppa_pool_page_alloc, hppa_pool_page_free, 0, +}; + + + #define pmap_sid(pmap, va) \ (((va & 0xc0000000) != 0xc0000000)? pmap->pmap_space : HPPA_SID_KERNEL) @@ -588,7 +616,7 @@ pmap_init() pool_init(&pmap_pmap_pool, sizeof(struct pmap), 0, 0, 0, "pmappl", &pool_allocator_nointr); pool_init(&pmap_pv_pool, sizeof(struct pv_entry), 0, 0, 0, "pmappv", - &pool_allocator_nointr); + &hppa_pool_allocator); pmap_initialized = 1; |