summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-11-12 04:14:04 +0000
committerpeter <peter@FreeBSD.org>2001-11-12 04:14:04 +0000
commit90e0e4c0ee739bb97e25cb6e1b840445ea016490 (patch)
tree2da41b32e733249ca0c4bb0c7ef570462a49c8a4 /sys
parent0342a3ec0245d9d056ea7e976193f3ff6fa1354b (diff)
downloadFreeBSD-src-90e0e4c0ee739bb97e25cb6e1b840445ea016490.zip
FreeBSD-src-90e0e4c0ee739bb97e25cb6e1b840445ea016490.tar.gz
Remove #if 0'ed code that was replaced by vm_ksubmap_init() and GC'ed
on other platforms.
Diffstat (limited to 'sys')
-rw-r--r--sys/ia64/ia64/machdep.c126
1 files changed, 0 insertions, 126 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 522d17e..c59fd6f 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -208,132 +208,6 @@ cpu_startup(dummy)
vm_ksubmap_init(&kmi);
-#if 0
- /*
- * Calculate callout wheel size
- */
- for (callwheelsize = 1, callwheelbits = 0;
- callwheelsize < ncallout;
- callwheelsize <<= 1, ++callwheelbits)
- ;
- callwheelmask = callwheelsize - 1;
-
- /*
- * Allocate space for system data structures.
- * The first available kernel virtual address is in "v".
- * As pages of kernel virtual memory are allocated, "v" is incremented.
- * As pages of memory are allocated and cleared,
- * "firstaddr" is incremented.
- * An index into the kernel page table corresponding to the
- * virtual memory address maintained in "v" is kept in "mapaddr".
- */
-
- /*
- * Make two passes. The first pass calculates how much memory is
- * needed and allocates it. The second pass assigns virtual
- * addresses to the various data structures.
- */
- firstaddr = 0;
-again:
- v = (caddr_t)firstaddr;
-
-#define valloc(name, type, num) \
- (name) = (type *)v; v = (caddr_t)((name)+(num))
-#define valloclim(name, type, num, lim) \
- (name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
-
- valloc(callout, struct callout, ncallout);
- valloc(callwheel, struct callout_tailq, callwheelsize);
-
- /*
- * Discount the physical memory larger than the size of kernel_map
- * to avoid eating up all of KVA space.
- */
- if (kernel_map->first_free == NULL) {
- printf("Warning: no free entries in kernel_map.\n");
- physmem_est = physmem;
- } else
- physmem_est = min(physmem, btoc(kernel_map->max_offset -
- kernel_map->min_offset));
-
- /*
- * The nominal buffer size (and minimum KVA allocation) is BKVASIZE.
- * For the first 64MB of ram nominally allocate sufficient buffers to
- * cover 1/4 of our ram. Beyond the first 64MB allocate additional
- * buffers to cover 1/20 of our ram over 64MB. When auto-sizing
- * the buffer cache we limit the eventual kva reservation to
- * maxbcache bytes.
- */
-
- if (nbuf == 0) {
- int 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 (maxbcache && nbuf > maxbcache / BKVASIZE)
- nbuf = maxbcache / BKVASIZE;
- }
- nswbuf = max(min(nbuf/4, 64), 16);
-
- valloc(swbuf, struct buf, nswbuf);
- valloc(buf, struct buf, nbuf);
- v = bufhashinit(v);
-
- /*
- * End of first pass, size has been calculated so allocate memory
- */
- if (firstaddr == 0) {
- size = (vm_size_t)(v - firstaddr);
- firstaddr = (vm_offset_t)kmem_alloc(kernel_map, round_page(size));
- if (firstaddr == 0)
- panic("startup: no room for tables");
- goto again;
- }
-
- /*
- * End of second pass, addresses have been assigned
- */
- if ((vm_size_t)(v - firstaddr) != 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))));
-
- /*
- * Finally, allocate mbuf pool.
- * XXX: Mbuf system machine-specific initializations should
- * go here, if anywhere.
- */
-
- /*
- * Initialize callouts
- */
- 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
-
#if defined(USERCONFIG)
#if defined(USERCONFIG_BOOT)
if (1)
OpenPOWER on IntegriCloud