diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2001-08-23 01:34:35 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2001-08-23 01:34:35 +0000 |
| commit | 60e562536f8138ed5c425bbb8cfca08d21f0163f (patch) | |
| tree | 2ec0e1d8d8fd90d328ee182c11e0513574769887 /sys | |
| parent | 748e7247a189fb5562236ec49a92f759fd2d8db2 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/pc98/i386/machdep.c | 10 | ||||
| -rw-r--r-- | sys/pc98/pc98/machdep.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index c983c7c6c1962..c388482ce8e0e 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -232,7 +232,7 @@ cpu_startup(dummy) vm_size_t size = 0; int firstaddr; vm_offset_t minaddr; - int physmem_est; + int physmem_est; /* in pages */ /* * Good {morning,afternoon,evening,night}. @@ -304,8 +304,10 @@ again: if (kernel_map->first_free == NULL) { printf("Warning: no free entries in kernel_map.\n"); physmem_est = physmem; - } else - physmem_est = min(physmem, kernel_map->max_offset - kernel_map->min_offset); + } else { + physmem_est = min(physmem, btoc(kernel_map->max_offset - + kernel_map->min_offset)); + } /* * The nominal buffer size (and minimum KVA allocation) is BKVASIZE. @@ -326,7 +328,7 @@ again: if (physmem_est > 16384) nbuf += (physmem_est - 16384) * 2 / (factor * 5); - if (maxbcache && nbuf > physmem_est / BKVASIZE) + if (maxbcache && nbuf > maxbcache / BKVASIZE) nbuf = maxbcache / BKVASIZE; } diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index c983c7c6c1962..c388482ce8e0e 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -232,7 +232,7 @@ cpu_startup(dummy) vm_size_t size = 0; int firstaddr; vm_offset_t minaddr; - int physmem_est; + int physmem_est; /* in pages */ /* * Good {morning,afternoon,evening,night}. @@ -304,8 +304,10 @@ again: if (kernel_map->first_free == NULL) { printf("Warning: no free entries in kernel_map.\n"); physmem_est = physmem; - } else - physmem_est = min(physmem, kernel_map->max_offset - kernel_map->min_offset); + } else { + physmem_est = min(physmem, btoc(kernel_map->max_offset - + kernel_map->min_offset)); + } /* * The nominal buffer size (and minimum KVA allocation) is BKVASIZE. @@ -326,7 +328,7 @@ again: if (physmem_est > 16384) nbuf += (physmem_est - 16384) * 2 / (factor * 5); - if (maxbcache && nbuf > physmem_est / BKVASIZE) + if (maxbcache && nbuf > maxbcache / BKVASIZE) nbuf = maxbcache / BKVASIZE; } |
