diff options
-rw-r--r-- | sys/arch/mvmeppc/dev/openpic.c | 7 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/bus_dma.c | 3 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/machdep.c | 68 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/pmap.c | 32 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/trap.c | 35 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/vm_machdep.c | 16 |
6 files changed, 8 insertions, 153 deletions
diff --git a/sys/arch/mvmeppc/dev/openpic.c b/sys/arch/mvmeppc/dev/openpic.c index f4e2a391e2c..df41a7cf6d2 100644 --- a/sys/arch/mvmeppc/dev/openpic.c +++ b/sys/arch/mvmeppc/dev/openpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openpic.c,v 1.1 2001/06/26 21:57:41 smurph Exp $ */ +/* $OpenBSD: openpic.c,v 1.2 2001/06/27 04:32:45 art Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -50,11 +50,9 @@ #include <sys/mbuf.h> #include <sys/socket.h> #include <sys/systm.h> -#ifdef UVM #include <vm/vm.h> #include <vm/vm_kern.h> #include <uvm/uvm.h> -#endif #include <machine/autoconf.h> #include <machine/intr.h> @@ -950,10 +948,7 @@ ext_intr_openpic() (*ih->ih_fun)(ih->ih_arg); ih = ih->ih_next; } -#ifdef UVM uvmexp.intrs++; -#else -#endif evirq[realirq].ev_count++; } diff --git a/sys/arch/mvmeppc/mvmeppc/bus_dma.c b/sys/arch/mvmeppc/mvmeppc/bus_dma.c index 2cc91cf07be..d612e5c30b8 100644 --- a/sys/arch/mvmeppc/mvmeppc/bus_dma.c +++ b/sys/arch/mvmeppc/mvmeppc/bus_dma.c @@ -52,11 +52,8 @@ #include <vm/vm.h> #include <vm/vm_kern.h> -#ifdef UVM #include <uvm/uvm.h> #include <uvm/uvm_page.h> -#else -#endif #define _POWERPC_BUS_DMA_PRIVATE #include <machine/bus.h> diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 387d81ad226..b8773e77d50 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.1 2001/06/26 21:57:54 smurph Exp $ */ +/* $OpenBSD: machdep.c,v 1.2 2001/06/27 04:32:46 art Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -134,12 +134,9 @@ int bufpages = 0; struct bat battable[16]; -#ifdef UVM -/* ??? */ vm_map_t exec_map = NULL; vm_map_t mb_map = NULL; vm_map_t phys_map = NULL; -#endif int astpending; int ppc_malloc_ok = 0; @@ -368,12 +365,8 @@ initppc(startkernel, endkernel, args) printf("vectors set.\n"); #endif -#ifdef UVM uvmexp.pagesize = 4096; uvm_setpagesize(); -#else - vm_set_page_size(); -#endif #ifdef STEVE_DEBUG printf("page size set.\n"); @@ -585,13 +578,8 @@ cpu_startup() * and then give everything true virtual addresses. */ sz = (int)allocsys((caddr_t)0); -#ifdef UVM if ((v = (caddr_t)uvm_km_zalloc(kernel_map, round_page(sz))) == 0) panic("startup: no room for tables"); -#else - if ((v = (caddr_t)kmem_alloc(kernel_map, round_page(sz))) == 0) - panic("startup: no room for tables"); -#endif if (allocsys(v) - v != sz) panic("startup: table size inconsistency"); @@ -600,7 +588,6 @@ cpu_startup() * in that they usually occupy more virtual memory than physical. */ sz = MAXBSIZE * nbuf; -#ifdef UVM if (uvm_map(kernel_map, (vaddr_t *) &buffers, round_page(sz), NULL, UVM_UNKNOWN_OFFSET, UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, @@ -609,13 +596,6 @@ cpu_startup() /* addr = (vaddr_t)buffers; */ -#else - buffer_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, sz, TRUE); - buffers = (char *)minaddr; - if (vm_map_find(buffer_map, vm_object_allocate(sz), (vm_offset_t)0, - &minaddr, sz, FALSE) != KERN_SUCCESS) - panic("startup: cannot allocate buffers"); -#endif base = bufpages / nbuf; residual = bufpages % nbuf; if (base >= MAXBSIZE) { @@ -630,7 +610,6 @@ cpu_startup() curbuf = (vm_offset_t)buffers + i * MAXBSIZE; curbufsize = PAGE_SIZE * (i < residual ? base + 1 : base); -#ifdef UVM while (curbufsize) { pg = uvm_pagealloc(NULL, 0, NULL, 0); if (pg == NULL) @@ -641,56 +620,32 @@ cpu_startup() curbuf += PAGE_SIZE; curbufsize -= PAGE_SIZE; } -#else - vm_map_pageable(buffer_map, curbuf, curbuf + curbufsize, - FALSE); - vm_map_simplify(buffer_map, curbuf); -#endif } /* * Allocate a submap for exec arguments. This map effectively * limits the number of processes exec'ing at any time. */ -#ifdef UVM exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, 16 * NCARGS, TRUE, FALSE, NULL); -#else - exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, 16 * NCARGS, - TRUE); -#endif /* * Allocate a submap for physio */ -#ifdef UVM phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, TRUE, FALSE, NULL); -#else - phys_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, - TRUE); -#endif ppc_malloc_ok = 1; -#ifdef UVM mb_map = uvm_km_suballoc(kernel_map, (vm_offset_t *)&mbutl, &maxaddr, VM_MBUF_SIZE, FALSE, FALSE, NULL); -#else - mb_map = kmem_suballoc(kernel_map, (vm_offset_t *)&mbutl, &maxaddr, - VM_MBUF_SIZE, FALSE); -#endif - + /* * Initialize timeouts. */ timeout_init(); -#ifdef UVM printf("avail mem = %d\n", ptoa(uvmexp.free)); -#else - printf("avail mem = %d\n", ptoa(cnt.v_free_count)); -#endif printf("using %d buffers containing %d bytes of memory\n", nbuf, bufpages * PAGE_SIZE); @@ -758,9 +713,6 @@ allocsys(v) if (nswbuf > 256) nswbuf = 256; } -#if !defined(UVM) - valloc(swbuf, struct buf, nswbuf); -#endif valloc(buf, struct buf, nbuf); return v; @@ -1279,11 +1231,7 @@ bus_space_unmap(t, bsh, size) off = bsh - sva; len = size+off; -#ifdef UVM uvm_km_free_wakeup(phys_map, sva, len); -#else - kmem_free_wakeup(phys_map, sva, len); -#endif #if 0 pmap_extract(pmap_kernel(), sva, &bpa); if (extent_free(devio_ex, bpa, size, EX_NOWAIT | @@ -1328,11 +1276,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) vaddr = VM_MIN_KERNEL_ADDRESS + ppc_kvm_size; } else { -#ifdef UVM vaddr = uvm_km_valloc_wait(phys_map, len); -#else - vaddr = kmem_alloc_wait(phys_map, len); -#endif } *bshp = vaddr + off; #ifdef DEBUG_BUS_MEM_ADD_MAPPING @@ -1372,11 +1316,7 @@ mapiodev(pa, len) return (void *)pa; } } -#ifdef UVM va = vaddr = uvm_km_valloc(phys_map, size); -#else - va = vaddr = kmem_alloc(phys_map, size); -#endif if (va == 0) return NULL; @@ -1405,11 +1345,7 @@ unmapiodev(kva, p_size) vaddr = trunc_page((vaddr_t)kva); -#ifdef UVM uvm_km_free_wakeup(phys_map, vaddr, size); -#else - kmem_free_wakeup(phys_map, vaddr, size); -#endif for (; size > 0; size -= NBPG) { #if 0 diff --git a/sys/arch/mvmeppc/mvmeppc/pmap.c b/sys/arch/mvmeppc/mvmeppc/pmap.c index ef298c8d6bd..35f67a6a2ff 100644 --- a/sys/arch/mvmeppc/mvmeppc/pmap.c +++ b/sys/arch/mvmeppc/mvmeppc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.1 2001/06/26 21:57:54 smurph Exp $ */ +/* $OpenBSD: pmap.c,v 1.2 2001/06/27 04:32:46 art Exp $ */ /* $NetBSD: pmap.c,v 1.1 1996/09/30 16:34:52 ws Exp $ */ /* @@ -42,9 +42,7 @@ #include <vm/vm.h> #include <vm/vm_kern.h> -#ifdef UVM #include <uvm/uvm.h> -#endif #include <machine/pcb.h> #include <machine/powerpc.h> @@ -69,10 +67,6 @@ static u_int nextavail; static struct mem_region *mem, *avail; -#ifndef UVM - extern vm_offset_t pager_sva, pager_eva; -#endif - #if 0 void dump_avail() @@ -176,13 +170,8 @@ pmap_vp_enter(pm, va, pa) if (pm == pmap_kernel()) { printf(" irk kernel allocating map?\n"); } else { -#ifdef UVM if (!(mem1 = (pmapv_t *)uvm_km_zalloc(kernel_map, NBPG))) panic("pmap_vp_enter: uvm_km_zalloc() failed"); -#else - if (!(mem1 = (pmapv_t *)kmem_alloc(kernel_map, NBPG))) - panic("pmap_vp_enter: kmem_alloc() failed"); -#endif } pm->vps[idx] = mem1; #ifdef DEBUG @@ -222,11 +211,7 @@ pmap_vp_destroy(pm) } } #endif -#ifdef UVM uvm_km_free(kernel_map, (vaddr_t)vp1, NBPG); -#else - kmem_free(kernel_map, (vm_offset_t)vp1, NBPG); -#endif pm->vps[sr] = 0; } } @@ -633,14 +618,9 @@ avail_end = npgs * NBPG; #ifdef MACHINE_NEW_NONCONTIG for (mp = avail; mp->size; mp++) { -#ifdef UVM uvm_page_physload(atop(mp->start), atop(mp->start + mp->size), atop(mp->start), atop(mp->start + mp->size), VM_FREELIST_DEFAULT); -#else - vm_page_physload(atop(mp->start), atop(mp->start + mp->size), - atop(mp->start), atop(mp->start + mp->size)); -#endif } #endif @@ -709,11 +689,7 @@ pmap_init() sz = (vm_size_t)((sizeof(struct pv_entry) + 1) * npgs); sz = round_page(sz); -#ifdef UVM addr = uvm_km_zalloc(kernel_map, sz); -#else - addr = kmem_alloc(kernel_map, sz); -#endif s = splimp(); pv = pv_table = (struct pv_entry *)addr; for (i = npgs; --i >= 0;) @@ -1610,15 +1586,9 @@ pmap_page_protect(pa, prot) while (pv->pv_idx != -1) { va = pv->pv_va; pm = pv->pv_pmap; -#ifdef UVM if ((va >=uvm.pager_sva) && (va < uvm.pager_eva)) { continue; } -#else - if (va >= pager_sva && va < pager_eva) { - continue; - } -#endif pmap_remove(pm, va, va + NBPG); } splx(s); diff --git a/sys/arch/mvmeppc/mvmeppc/trap.c b/sys/arch/mvmeppc/mvmeppc/trap.c index be257184e65..782722795b7 100644 --- a/sys/arch/mvmeppc/mvmeppc/trap.c +++ b/sys/arch/mvmeppc/mvmeppc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.1 2001/06/26 21:57:55 smurph Exp $ */ +/* $OpenBSD: trap.c,v 1.2 2001/06/27 04:32:46 art Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -43,9 +43,7 @@ #include <vm/vm.h> #include <vm/vm_kern.h> -#ifdef UVM #include <uvm/uvm_extern.h> -#endif #include <machine/cpu.h> #include <machine/frame.h> @@ -139,13 +137,8 @@ trap(frame) ftype = VM_PROT_READ | VM_PROT_WRITE; else ftype = VM_PROT_READ; -#ifdef UVM if (uvm_fault(map, trunc_page(va), 0, ftype) == KERN_SUCCESS) -#else - if (vm_fault(map, trunc_page(va), ftype, FALSE) - == KERN_SUCCESS) -#endif { return; } @@ -171,16 +164,9 @@ printf("kern dsi on addr %x iar %x\n", frame->dar, frame->srr0); vftype = VM_PROT_WRITE; } else vftype = ftype = VM_PROT_READ; -#ifdef UVM if (uvm_fault(&p->p_vmspace->vm_map, trunc_page(frame->dar), 0, ftype) - == KERN_SUCCESS) -#else - if (vm_fault(&p->p_vmspace->vm_map, - trunc_page(frame->dar), ftype, FALSE) - == KERN_SUCCESS) -#endif - { + == KERN_SUCCESS) { break; } #if 0 @@ -198,16 +184,9 @@ printf("dsi on addr %x iar %x lr %x\n", frame->dar, frame->srr0,frame->lr); int ftype; ftype = VM_PROT_READ | VM_PROT_EXECUTE; -#ifdef UVM if (uvm_fault(&p->p_vmspace->vm_map, trunc_page(frame->srr0), 0, ftype) - == KERN_SUCCESS) -#else - if (vm_fault(&p->p_vmspace->vm_map, - trunc_page(frame->srr0), ftype, FALSE) - == KERN_SUCCESS) -#endif - { + == KERN_SUCCESS) { break; } } @@ -229,11 +208,7 @@ printf("isi iar %x\n", frame->srr0); int nsys, n; register_t args[10]; -#ifdef UVM uvmexp.syscalls++; -#else - cnt.v_syscall++; -#endif nsys = p->p_emul->e_nsysent; callp = p->p_emul->e_sysent; @@ -433,11 +408,7 @@ for (i = 0; i < errnum; i++) { astpending = 0; /* we are about to do it */ -#ifdef UVM uvmexp.softs++; -#else - cnt.v_soft++; -#endif if (p->p_flag & P_OWEUPC) { p->p_flag &= ~P_OWEUPC; diff --git a/sys/arch/mvmeppc/mvmeppc/vm_machdep.c b/sys/arch/mvmeppc/mvmeppc/vm_machdep.c index ff794fe8cea..b4139e6e379 100644 --- a/sys/arch/mvmeppc/mvmeppc/vm_machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.1 2001/06/26 21:57:55 smurph Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.2 2001/06/27 04:32:46 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 1996/09/30 16:34:57 ws Exp $ */ /* @@ -42,9 +42,7 @@ #include <vm/vm.h> #include <vm/vm_kern.h> -#ifdef UVM #include <uvm/uvm_extern.h> -#endif #include <machine/pcb.h> @@ -69,11 +67,7 @@ cpu_fork(p1, p2, stack, stacksize) save_fpu(p1); *pcb = p1->p_addr->u_pcb; -#ifdef UVM pcb->pcb_pm = p2->p_vmspace->vm_map.pmap; -#else - pcb->pcb_pm = &p2->p_vmspace->vm_pmap; -#endif pmap_extract(pmap_kernel(), (vm_offset_t)pcb->pcb_pm, (paddr_t *)&pcb->pcb_pmreal); @@ -247,11 +241,7 @@ vmapbuf(bp, len) faddr = trunc_page((vaddr_t)(bp->b_saveaddr = bp->b_data)); off = (vm_offset_t)bp->b_data - faddr; len = round_page(off + len); -#ifdef UVM taddr = uvm_km_valloc_wait(phys_map, len); -#else - taddr = kmem_alloc_wait(phys_map, len); -#endif bp->b_data = (caddr_t)(taddr + off); for (; len > 0; len -= NBPG) { pmap_extract(vm_map_pmap(&bp->b_proc->p_vmspace->vm_map), faddr, &pa); @@ -279,11 +269,7 @@ vunmapbuf(bp, len) addr = trunc_page((vaddr_t)bp->b_data); off = (vm_offset_t)bp->b_data - addr; len = round_page(off + len); -#ifdef UVM uvm_km_free_wakeup(phys_map, addr, len); -#else - kmem_free_wakeup(phys_map, addr, len); -#endif bp->b_data = bp->b_saveaddr; bp->b_saveaddr = 0; } |