summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-06-28 04:20:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-06-28 04:20:30 +0000
commitb27faa82e26347c17aff72975081e2d9d2b40f46 (patch)
tree66bf34fae1f03dee09b788d8e2e6fa0080c1e299 /sys/arch
parent7a51be8ddeb0f2738636ebd46232ebf65355d8b6 (diff)
Move uvm_km_pages struct declaration and watermark bounds to uvm_km.h, so
that md code can peek at it, and update m68k !__HAVE_PMAP_DIRECT setup code to the recent uvm_km changes. ok thib@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/m68k/m68k/pmap_bootstrap.c17
-rw-r--r--sys/arch/mac68k/mac68k/pmap_bootstrap.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/pmap_bootstrap.c3
3 files changed, 14 insertions, 10 deletions
diff --git a/sys/arch/m68k/m68k/pmap_bootstrap.c b/sys/arch/m68k/m68k/pmap_bootstrap.c
index f76487b4d14..ea87efbaf09 100644
--- a/sys/arch/m68k/m68k/pmap_bootstrap.c
+++ b/sys/arch/m68k/m68k/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.18 2010/05/13 20:37:00 miod Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.19 2010/06/28 04:20:25 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -179,7 +179,7 @@ pmap_bootstrap(nextpa, firstpa)
* - nkmempages_max pages in kmeminit().
* - PAGER_MAP_SIZE bytes in uvm_pager_init().
* - 93.75 % of physmem anons in amap_init().
- * - 4 * uvm_km_pages_lowat pages in uvm_km_page_init().
+ * - 4 * uvm_km_pages.lowat pages in uvm_km_page_init().
*
* We'll compute this size in bytes, then round it to pages,
* then to a multiple of NPTEPG.
@@ -198,15 +198,18 @@ pmap_bootstrap(nextpa, firstpa)
#if !defined(__HAVE_PMAP_DIRECT)
{
- extern int uvm_km_pages_lowat;
-
- if ((num = RELOC(uvm_km_pages_lowat, int)) == 0) {
+ if ((num = RELOC(uvm_km_pages.lowat, int)) == 0) {
num = RELOC(physmem, int) / 256;
- if (num < 128)
+ if (num < 16)
+ num = 32;
+ else if (num < 128) {
num = 128;
+ if (num > UVM_KM_PAGES_LOWAT_MAX)
+ num = UVM_KM_PAGES_LOWAT_MAX;
+ }
}
}
- nptpages += ptoa(num);
+ nptpages += ptoa(4 * num);
#endif
nptpages = (atop(round_page(nptpages)) + NPTEPG - 1) / NPTEPG;
diff --git a/sys/arch/mac68k/mac68k/pmap_bootstrap.c b/sys/arch/mac68k/mac68k/pmap_bootstrap.c
index 7d8e974fea0..faf063c2474 100644
--- a/sys/arch/mac68k/mac68k/pmap_bootstrap.c
+++ b/sys/arch/mac68k/mac68k/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.41 2009/01/10 22:12:20 thib Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.42 2010/06/28 04:20:28 miod Exp $ */
/* $NetBSD: pmap_bootstrap.c,v 1.50 1999/04/07 06:14:33 scottr Exp $ */
/*
@@ -42,7 +42,7 @@
#include <sys/systm.h>
#include <uvm/uvm_extern.h>
-#include <uvm/uvm_pmap.h>
+#include <uvm/uvm_km.h>
#include <machine/autoconf.h>
#include <machine/cpu.h>
diff --git a/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c b/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
index 319f0a79bfb..3e3b564d102 100644
--- a/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
+++ b/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.23 2008/01/04 19:05:32 miod Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.24 2010/06/28 04:20:28 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -68,6 +68,7 @@
#include <machine/vmparam.h>
#include <uvm/uvm_extern.h>
+#include <uvm/uvm_km.h>
vaddr_t iiomapbase;
int iiomapsize;