summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-04-25 23:10:32 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-04-25 23:10:32 +0000
commit391a195be53d2c6e0c5ebac59bab903f10931452 (patch)
tree71a08538e91c92e79017a2e940108e485c7df26b /sys
parentb0fb1fac5b2ea0cbadcdf0fe6ab542c92cec30a4 (diff)
A fix to the dreaded isadmaattach panic which hunts people playing with
large memory machines. This time I really hope we can continue quite a bit away over the Gig.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/include/vmparam.h4
-rw-r--r--sys/uvm/uvm_page.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/i386/include/vmparam.h b/sys/arch/i386/include/vmparam.h
index 36bd525296a..4f3dc049f8c 100644
--- a/sys/arch/i386/include/vmparam.h
+++ b/sys/arch/i386/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.14 1999/10/03 21:08:16 niklas Exp $ */
+/* $OpenBSD: vmparam.h,v 1.15 2000/04/25 23:10:31 niklas Exp $ */
/* $NetBSD: vmparam.h,v 1.15 1994/10/27 04:16:34 cgd Exp $ */
/*-
@@ -145,7 +145,7 @@
#define MACHINE_NEW_NONCONTIG /* VM <=> pmap interface modifier */
#define VM_PHYSSEG_MAX 4 /* actually we could have this many segments */
-#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
+#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
#define VM_NFREELIST 2
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index c60017de35b..d6dbe2a9294 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -472,7 +472,8 @@ uvm_page_physget(paddrp)
int lcv, x;
/* pass 1: try allocating from a matching end */
-#if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST)
+#if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST) || \
+ (VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH)
for (lcv = vm_nphysseg - 1 ; lcv >= 0 ; lcv--)
#else
for (lcv = 0 ; lcv < vm_nphysseg ; lcv++)
@@ -522,7 +523,8 @@ uvm_page_physget(paddrp)
}
/* pass2: forget about matching ends, just allocate something */
-#if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST)
+#if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST) || \
+ (VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH)
for (lcv = vm_nphysseg - 1 ; lcv >= 0 ; lcv--)
#else
for (lcv = 0 ; lcv < vm_nphysseg ; lcv++)