summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2004-05-27 21:04:07 +0000
committertedu <tedu@openbsd.org>2004-05-27 21:04:07 +0000
commite319007e154b0b93e47f399df6d6f55195eff9eb (patch)
tree5ccaa3a63b123bc33fe9c512247e51c969426187
parentsync (diff)
downloadwireguard-openbsd-e319007e154b0b93e47f399df6d6f55195eff9eb.tar.xz
wireguard-openbsd-e319007e154b0b93e47f399df6d6f55195eff9eb.zip
hppa pmap needs to use old pool allocator for now.
i know the fix, but it's not here yet. ok mickey
-rw-r--r--sys/arch/hppa/hppa/pmap.c32
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;