summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-09-04 08:42:35 +0000
committerpeter <peter@FreeBSD.org>2001-09-04 08:42:35 +0000
commit16c92cf0c3846d3d9884886ece826a1ce88374f3 (patch)
tree14dd50fbae6ad43906dcb878c68cdb3fb18bf189 /sys/sparc64
parent119d201aabfc4e86f6217363578198cf5c825e01 (diff)
downloadFreeBSD-src-16c92cf0c3846d3d9884886ece826a1ce88374f3.zip
FreeBSD-src-16c92cf0c3846d3d9884886ece826a1ce88374f3.tar.gz
Zap #if 0'ed map init code that got moved to the MI area.
Convert the powerpc tree to use the common code.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/machdep.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 910654d..ba8cb5f 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -166,93 +166,6 @@ cpu_startup(void *arg)
#endif
vm_ksubmap_init(&kmi);
-#if 0
- /*
- * XXX make most of this MI and move to sys/kern.
- */
-
- /*
- * Calculate callout wheel size.
- */
- for (callwheelsize = 1, callwheelbits = 0; callwheelsize < ncallout;
- callwheelsize <<= 1, ++callwheelbits)
- ;
- callwheelmask = callwheelsize - 1;
-
- size = 0;
- va = 0;
-again:
- p = (caddr_t)va;
-
-#define valloc(name, type, num) \
- (name) = (type *)p; p = (caddr_t)((name) + (num))
-
- valloc(callout, struct callout, ncallout);
- valloc(callwheel, struct callout_tailq, callwheelsize);
-
- 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);
-
- if (nbuf == 0) {
- factor = 4 * BKVASIZE / PAGE_SIZE;
- nbuf = 50;
- if (physmem_est > 1024)
- nbuf += min((physmem_est - 1024) / factor,
- 16384 / factor);
- if (physmem_est > 16384)
- nbuf += (physmem_est - 16384) * 2 / (factor * 5);
- }
-
- if (nbuf > (kernel_map->max_offset - kernel_map->min_offset) /
- (BKVASIZE * 2)) {
- nbuf = (kernel_map->max_offset - kernel_map->min_offset) /
- (BKVASIZE * 2);
- printf("Warning: nbufs capped at %d\n", nbuf);
- }
-
- nswbuf = max(min(nbuf/4, 256), 16);
-
- valloc(swbuf, struct buf, nswbuf);
- valloc(buf, struct buf, nbuf);
- p = bufhashinit(p);
-
- if (va == 0) {
- size = (vm_size_t)(p - va);
- if ((va = kmem_alloc(kernel_map, round_page(size))) == 0)
- panic("startup: no room for tables");
- goto again;
- }
-
- if ((vm_size_t)(p - va) != size)
- panic("startup: table size inconsistency");
-
- clean_map = kmem_suballoc(kernel_map, &clean_sva, &clean_eva,
- (nbuf*BKVASIZE) + (nswbuf*MAXPHYS) + pager_map_size);
- buffer_map = kmem_suballoc(clean_map, &buffer_sva, &buffer_eva,
- (nbuf*BKVASIZE));
- buffer_map->system_map = 1;
- pager_map = kmem_suballoc(clean_map, &pager_sva, &pager_eva,
- (nswbuf*MAXPHYS) + pager_map_size);
- pager_map->system_map = 1;
- exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr,
- (16*(ARG_MAX+(PAGE_SIZE*3))));
-
- SLIST_INIT(&callfree);
- for (i = 0; i < ncallout; i++) {
- callout_init(&callout[i], 0);
- callout[i].c_flags = CALLOUT_LOCAL_ALLOC;
- SLIST_INSERT_HEAD(&callfree, &callout[i], c_links.sle);
- }
-
- for (i = 0; i < callwheelsize; i++)
- TAILQ_INIT(&callwheel[i]);
-
- mtx_init(&callout_lock, "callout", MTX_SPIN | MTX_RECURSE);
-#endif
bufinit();
vm_pager_bufferinit();
OpenPOWER on IntegriCloud