diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-12-01 23:56:31 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-12-01 23:56:31 +0000 |
commit | 56517ef7807d5a41d91c70b26aa3b5846834a348 (patch) | |
tree | 2034d28453be3200f1f8af34d69be39376d12461 /sys/arch | |
parent | 628d45ae765e7f27ffaa4fb4ab651c80046c5149 (diff) |
when allocating kpdes -- allocate no less than four
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/hppa/pmap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index 14a27cc5308..475a5d8391d 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.104 2003/11/24 19:27:03 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.105 2003/12/01 23:56:30 mickey Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -540,8 +540,10 @@ pmap_bootstrap(vstart) * lazy map only needed pieces (see bus_mem_add_mapping() for refs). */ - /* takes about 16 per gig of initial kmem */ - nkpdes = (totalphysmem >> 14); + /* takes about 16 per gig of initial kmem ... */ + nkpdes = totalphysmem >> 14; + if (nkpdes < 4) + nkpdes = 4; /* ... but no less than four */ npdes = nkpdes + (totalphysmem + btoc(PDE_SIZE) - 1) / btoc(PDE_SIZE); uvm_page_physload(0, totalphysmem, atop(addr) + npdes, totalphysmem, VM_FREELIST_DEFAULT); |