Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/uvm Pull up revision 1.28 (requested by drochner):
details: https://anonhg.NetBSD.org/src/rev/6c68f4370265
branches: netbsd-1-4
changeset: 469898:6c68f4370265
user: he <he%NetBSD.org@localhost>
date: Mon Dec 20 13:30:31 1999 +0000
description:
Pull up revision 1.28 (requested by drochner):
Allow booting of kernels which are larger than 16MB on i386.
diffstat:
sys/uvm/uvm_page.c | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diffs (55 lines):
diff -r 4208dfd9a970 -r 6c68f4370265 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Mon Dec 20 13:16:30 1999 +0000
+++ b/sys/uvm/uvm_page.c Mon Dec 20 13:30:31 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.17.2.3 1999/06/18 17:04:56 perry Exp $ */
+/* $NetBSD: uvm_page.c,v 1.17.2.4 1999/12/20 13:30:31 he Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -463,9 +463,13 @@
* => return false if out of memory.
*/
-boolean_t
-uvm_page_physget(paddrp)
+/* subroutine: try to allocate from memory chunks on the specified freelist */
+static boolean_t uvm_page_physget_freelist __P((paddr_t *, int));
+
+static boolean_t
+uvm_page_physget_freelist(paddrp, freelist)
paddr_t *paddrp;
+ int freelist;
{
int lcv, x;
@@ -480,6 +484,9 @@
if (vm_physmem[lcv].pgs)
panic("vm_page_physget: called _after_ bootstrap");
+ if (vm_physmem[lcv].free_list != freelist)
+ continue;
+
/* try from front */
if (vm_physmem[lcv].avail_start == vm_physmem[lcv].start &&
vm_physmem[lcv].avail_start < vm_physmem[lcv].avail_end) {
@@ -550,6 +557,19 @@
return (FALSE); /* whoops! */
}
+
+boolean_t
+uvm_page_physget(paddrp)
+ paddr_t *paddrp;
+{
+ int i;
+
+ /* try in the order of freelist preference */
+ for (i = 0; i < VM_NFREELIST; i++)
+ if (uvm_page_physget_freelist(paddrp, i) == TRUE)
+ return (TRUE);
+ return (FALSE);
+}
#endif /* PMAP_STEAL_MEMORY */
/*
Home |
Main Index |
Thread Index |
Old Index