diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-02-15 04:11:12 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-02-15 04:11:12 +0000 |
commit | 2adb3517ae934717f9b049709bed6e8e5f8a6f17 (patch) | |
tree | 775f0e7ec268a9ee2d6ee50b30cd639ea04570b7 /sys/arch/powerpc | |
parent | c8b00c03932cfab5b77c51e6c4ff391005c70c9f (diff) |
approaching UVM support for powerpc, initialize all of the buffer
entries, not just the first entry of each buffer.
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/powerpc/machdep.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c index 6264727eff8..13bbc868842 100644 --- a/sys/arch/powerpc/powerpc/machdep.c +++ b/sys/arch/powerpc/powerpc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.52 2001/02/12 06:26:30 drahn Exp $ */ +/* $OpenBSD: machdep.c,v 1.53 2001/02/15 04:11:11 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -507,12 +507,16 @@ cpu_startup() curbuf = (vm_offset_t)buffers + i * MAXBSIZE; curbufsize = CLBYTES * (i < residual ? base + 1 : base); #ifdef UVM - pg = uvm_pagealloc(NULL, 0, NULL, 0); - if (pg == NULL) - panic("cpu_startup: not enough memory for" - " buffer cache"); - pmap_kenter_pa(curbuf, VM_PAGE_TO_PHYS(pg), - VM_PROT_READ|VM_PROT_WRITE); + while (curbufsize) { + pg = uvm_pagealloc(NULL, 0, NULL, 0); + if (pg == NULL) + panic("cpu_startup: not enough memory for" + " buffer cache"); + pmap_kenter_pa(curbuf, VM_PAGE_TO_PHYS(pg), + VM_PROT_READ|VM_PROT_WRITE); + curbuf += PAGE_SIZE; + curbufsize -= PAGE_SIZE; + } #else vm_map_pageable(buffer_map, curbuf, curbuf + curbufsize, FALSE); |