diff options
-rw-r--r-- | sys/arch/mvme88k/include/mmu.h | 6 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/locore_asm_routines.S | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 132 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/mem.c | 10 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/pmap.c | 37 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/trap.c | 52 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/vm_machdep.c | 16 |
7 files changed, 7 insertions, 250 deletions
diff --git a/sys/arch/mvme88k/include/mmu.h b/sys/arch/mvme88k/include/mmu.h index 3e68f895b3b..037676fbea1 100644 --- a/sys/arch/mvme88k/include/mmu.h +++ b/sys/arch/mvme88k/include/mmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mmu.h,v 1.8 2001/06/14 21:30:40 miod Exp $ */ +/* $OpenBSD: mmu.h,v 1.9 2001/06/27 04:29:19 art Exp $ */ /* * Ashura Project */ @@ -182,11 +182,7 @@ typedef union batc_template { #define LOG2_PDT_SIZE (PDT_BITS + 2) #define LOG2_PDT_TABLE_GROUP_SIZE (PAGE_SHIFT - LOG2_PDT_SIZE) #define PDT_TABLE_GROUP_SIZE (1 << LOG2_PDT_TABLE_GROUP_SIZE) -#if defined(UVM) #define PT_FREE(tbl) uvm_km_free(kernel_map, (vaddr_t)tbl, PAGE_SIZE) -#else -#define PT_FREE(tbl) kmem_free(kernel_map, (vm_offset_t)tbl, PAGE_SIZE) -#endif /* diff --git a/sys/arch/mvme88k/mvme88k/locore_asm_routines.S b/sys/arch/mvme88k/mvme88k/locore_asm_routines.S index 15c84d915e4..65d484dd338 100644 --- a/sys/arch/mvme88k/mvme88k/locore_asm_routines.S +++ b/sys/arch/mvme88k/mvme88k/locore_asm_routines.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore_asm_routines.S,v 1.14 2001/05/20 05:53:09 miod Exp $ */ +/* $OpenBSD: locore_asm_routines.S,v 1.15 2001/06/27 04:29:19 art Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -1221,7 +1221,6 @@ ENTRY(copyoutstr) /*word 0 */ /* to separate from routine below */ /*######################################################################*/ -#if defined(UVM) /* * kcopy(const void *src, void *dst, size_t len); * @@ -1548,7 +1547,6 @@ kcfault: or r2, r0, EFAULT /* return fault */ br kcdone #endif /* 0 */ -#endif /* UVM */ /* * Gcc 2 generates calls to memcpy for bcopies of unknown size. memcpy diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 8a8205e397d..57f6bba2ac5 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.41 2001/06/25 00:43:14 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.42 2001/06/27 04:29:19 art Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -96,9 +96,7 @@ #include <vm/vm_kern.h> #include <vm/vm_page.h> -#if defined(UVM) #include <uvm/uvm_extern.h> -#endif #include <mvme88k/dev/sysconreg.h> #include <mvme88k/dev/pcctworeg.h> @@ -182,13 +180,9 @@ int BugWorks = 0; */ int safepri = 0; -#if defined(UVM) vm_map_t exec_map = NULL; vm_map_t mb_map = NULL; vm_map_t phys_map = NULL; -#else -vm_map_t buffer_map; -#endif /* * iomap stuff is for managing chunks of virtual address space that @@ -197,11 +191,7 @@ vm_map_t buffer_map; * are mapped so that pa == va. XXX smurph. */ -#if defined(UVM) vaddr_t iomapbase; -#else -vm_offset_t iomapbase; -#endif struct extent *iomap_extent; vm_map_t iomap_map; @@ -477,11 +467,7 @@ cpu_startup() int sz, i; vm_size_t size; int base, residual; -#if defined(UVM) vaddr_t minaddr, maxaddr, uarea_pages; -#else - vm_offset_t minaddr, maxaddr, uarea_pages; -#endif /* * Initialize error message buffer (at end of core). @@ -506,11 +492,7 @@ cpu_startup() */ sz = (int)allocsys((caddr_t)0); -#if defined(UVM) if ((v = (caddr_t)uvm_km_zalloc(kernel_map, round_page(sz))) == 0) -#else - if ((v = (caddr_t)kmem_alloc(kernel_map, round_page(sz))) == 0) -#endif panic("startup: no room for tables"); if (allocsys(v) - v != sz) panic("startup: table size inconsistency"); @@ -519,16 +501,11 @@ cpu_startup() * Grab UADDR virtual address */ uarea_pages = UADDR; -#if defined(UVM) uvm_map(kernel_map, (vaddr_t *)&uarea_pages, USPACE, NULL, UVM_UNKNOWN_OFFSET,UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)); -#else - vm_map_find(kernel_map, vm_object_allocate(USPACE), 0, - (vm_offset_t *)&uarea_pages, USPACE, TRUE); -#endif if (uarea_pages != UADDR) { printf("uarea_pages %x: UADDR not free\n", uarea_pages); panic("bad UADDR"); @@ -551,16 +528,11 @@ cpu_startup() */ bugromva = BUGROM_START; -#if defined(UVM) uvm_map(kernel_map, (vaddr_t *)&bugromva, BUGROM_SIZE, NULL, UVM_UNKNOWN_OFFSET,UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)); -#else - vm_map_find(kernel_map, vm_object_allocate(BUGROM_SIZE), 0, - (vm_offset_t *)&bugromva, BUGROM_SIZE, TRUE); -#endif if (bugromva != BUGROM_START) { printf("bugromva %x: BUGROM not free\n", bugromva); panic("bad bugromva"); @@ -570,16 +542,11 @@ cpu_startup() * Grab the SRAM space that we hardwired in pmap_bootstrap */ sramva = SRAM_START; -#if defined(UVM) uvm_map(kernel_map, (vaddr_t *)&sramva, SRAM_SIZE, NULL, UVM_UNKNOWN_OFFSET,UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)); -#else - vm_map_find(kernel_map, vm_object_allocate(SRAM_SIZE), 0, - (vm_offset_t *)&sramva, SRAM_SIZE, TRUE); -#endif if (sramva != SRAM_START) { printf("sramva %x: SRAM not free\n", sramva); @@ -590,16 +557,11 @@ cpu_startup() * Grab the OBIO space that we hardwired in pmap_bootstrap */ obiova = OBIO_START; -#if defined(UVM) uvm_map(kernel_map, (vaddr_t *)&obiova, OBIO_SIZE, NULL, UVM_UNKNOWN_OFFSET,UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)); -#else - vm_map_find(kernel_map, vm_object_allocate(OBIO_SIZE), 0, - (vm_offset_t *)&obiova, OBIO_SIZE, TRUE); -#endif if (obiova != OBIO_START) { printf("obiova %x: OBIO not free\n", obiova); panic("bad OBIO"); @@ -612,16 +574,11 @@ cpu_startup() * Grab the UTIL space that we hardwired in pmap_bootstrap */ utilva = MVME188_UTILITY; -#if defined(UVM) uvm_map(kernel_map, (vaddr_t *)&utilva, MVME188_UTILITY_SIZE, NULL, UVM_UNKNOWN_OFFSET,UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)); -#else - vm_map_find(kernel_map, vm_object_allocate(MVME188_UTILITY_SIZE), 0, - (vm_offset_t *)&utilva, MVME188_UTILITY_SIZE, TRUE); -#endif if (utilva != MVME188_UTILITY) { printf("utilva %x: UTILITY area not free\n", utilva); panic("bad utilva"); @@ -637,21 +594,12 @@ cpu_startup() * in that they usually occupy more virtual memory than physical. */ size = MAXBSIZE * nbuf; -#if defined(UVM) if (uvm_map(kernel_map, (vaddr_t *) &buffers, round_page(size), NULL, UVM_UNKNOWN_OFFSET, UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)) != KERN_SUCCESS) panic("cpu_startup: cannot allocate VM for buffers"); minaddr = (vaddr_t)buffers; -#else - buffer_map = kmem_suballoc(kernel_map, (vm_offset_t *)&buffers, - &maxaddr, size, TRUE); - minaddr = (vm_offset_t)buffers; - if (vm_map_find(buffer_map, vm_object_allocate(size), (vm_offset_t)0, - (vm_offset_t *)&minaddr, size, FALSE) != KERN_SUCCESS) - panic("startup: cannot allocate buffers"); -#endif if ((bufpages / nbuf) >= btoc(MAXBSIZE)) { /* don't want to alloc more physical mem than needed */ @@ -661,7 +609,6 @@ cpu_startup() residual = bufpages % nbuf; for (i = 0; i < nbuf; i++) { -#if defined(UVM) vsize_t curbufsize; vaddr_t curbuf; struct vm_page *pg; @@ -686,36 +633,14 @@ cpu_startup() curbuf += PAGE_SIZE; curbufsize -= PAGE_SIZE; } -#else - vm_size_t curbufsize; - vm_offset_t curbuf; - - /* - * First <residual> buffers get (base+1) physical pages - * allocated for them. The rest get (base) physical pages. - * - * The rest of each buffer occupies virtual space, - * but has no physical memory allocated for it. - */ - curbuf = (vm_offset_t)buffers + i * MAXBSIZE; - curbufsize = PAGE_SIZE * (i < residual ? base+1 : base); - /* this faults in the required physical pages */ - 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. */ -#if defined(UVM) exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, 16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL); -#else - exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, - 16*NCARGS, TRUE); -#endif #ifdef DEBUG printf("exe_map from 0x%x to 0x%x\n", (unsigned)minaddr, (unsigned)maxaddr); @@ -724,13 +649,8 @@ cpu_startup() * Allocate map for physio. */ -#if defined(UVM) phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, FALSE, NULL); -#else - phys_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, - VM_PHYS_SIZE, TRUE); -#endif if (phys_map == NULL) { panic("cpu_startup: unable to create phys_map"); } @@ -738,13 +658,8 @@ cpu_startup() /* * Allocate map for external I/O */ -#if defined(UVM) iomap_map = uvm_km_suballoc(kernel_map, &iomapbase, &maxaddr, IOMAP_SIZE, 0, FALSE, NULL); -#else - iomap_map = kmem_suballoc(kernel_map, &iomapbase, &maxaddr, - IOMAP_SIZE, TRUE); -#endif if (iomap_map == NULL) { panic("cpu_startup: unable to create iomap_map"); } @@ -753,25 +668,15 @@ cpu_startup() if (iomap_extent == 0) panic("unable to allocate extent for iomap"); -#if defined(UVM) mb_map = uvm_km_suballoc(kernel_map, (vaddr_t *)&mbutl, &maxaddr, VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL); -#else - mb_map = kmem_suballoc(kernel_map, (vm_offset_t *)&mbutl, &maxaddr, - VM_MBUF_SIZE, FALSE); -#endif /* * Initialize timeouts */ timeout_init(); -#if defined(UVM) printf("avail mem = %ld (%ld pages)\n", ptoa(uvmexp.free), uvmexp.free); -#else - printf("avail mem = %ld (%ld pages)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count)/NBPG); -#endif printf("using %d buffers containing %d bytes of memory\n", nbuf, bufpages * PAGE_SIZE); @@ -892,9 +797,6 @@ allocsys(v) if (nswbuf > 256) nswbuf = 256; /* sanity */ } -#if !defined(UVM) - valloc(swbuf, struct buf, nswbuf); -#endif valloc(buf, struct buf, nbuf); return v; @@ -1032,13 +934,8 @@ sendsig(catcher, sig, mask, code, type, val) psp->ps_sigstk.ss_flags |= SA_ONSTACK; } else fp = (struct sigframe *)(tf->r[31] - fsize); -#if defined(UVM) if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize)) (void)uvm_grow(p, (unsigned)fp); -#else - if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize)) - (void)grow(p, (unsigned)fp); -#endif #ifdef DEBUG if ((sigdebug & SDB_FOLLOW) || @@ -1152,15 +1049,9 @@ register_t *retval; if (sigdebug & SDB_FOLLOW) printf("sigreturn: pid %d, scp %x\n", p->p_pid, scp); #endif -#if defined(UVM) if ((int)scp & 3 || uvm_useracc((caddr_t)scp, sizeof *scp, B_WRITE) == 0 || copyin((caddr_t)scp, (caddr_t)&ksc, sizeof(struct sigcontext))) return (EINVAL); -#else - if ((int)scp & 3 || useracc((caddr_t)scp, sizeof *scp, B_WRITE) == 0 || - copyin((caddr_t)scp, (caddr_t)&ksc, sizeof(struct sigcontext))) - return (EINVAL); -#endif tf = p->p_md.md_tf; scp = &ksc; @@ -1442,11 +1333,7 @@ vm_offset_t get_slave_stack(void) { vm_offset_t addr = 0; -#if defined(UVM) addr = (vm_offset_t)uvm_km_zalloc(kernel_map, INTSTACK_SIZE + 4096); -#else - addr = (vm_offset_t)kmem_alloc(kernel_map, INTSTACK_SIZE + 4096); -#endif if (addr == NULL) panic("Cannot allocate slave stack"); @@ -2047,11 +1934,7 @@ dosoftint() { if (ssir & SIR_NET) { siroff(SIR_NET); -#if defined(UVM) uvmexp.softs++; -#else - cnt.v_soft++; -#endif #define DONETISR(bit, fn) \ do { \ if (netisr & (1 << bit)) { \ @@ -2065,11 +1948,7 @@ dosoftint() if (ssir & SIR_CLOCK) { siroff(SIR_CLOCK); -#if defined(UVM) uvmexp.softs++; -#else - cnt.v_soft++; -#endif softclock(); } } @@ -2269,12 +2148,8 @@ mvme_bootstrap(void) /* startup fake console driver. It will be replaced by consinit() */ cn_tab = &bootcons; -#if defined(UVM) uvmexp.pagesize = NBPG; uvm_setpagesize(); -#else - vm_set_page_size(); -#endif first_addr = round_page(first_addr); if (!no_symbols) boothowto |= RB_KDB; @@ -2316,13 +2191,8 @@ mvme_bootstrap(void) * Tell the VM system about available physical memory. * mvme88k only has one segment. */ -#if defined(UVM) uvm_page_physload(atop(avail_start), atop(avail_end), atop(avail_start), atop(avail_end),VM_FREELIST_DEFAULT); -#else - vm_page_physload(atop(avail_start), atop(avail_end), - atop(avail_start), atop(avail_end)); -#endif /* UVM */ #endif /* MACHINE_NEW_NONCONTIG */ /* diff --git a/sys/arch/mvme88k/mvme88k/mem.c b/sys/arch/mvme88k/mvme88k/mem.c index 2e5ed3764ca..aa612bfc500 100644 --- a/sys/arch/mvme88k/mvme88k/mem.c +++ b/sys/arch/mvme88k/mvme88k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.8 2001/05/05 20:56:47 art Exp $ */ +/* $OpenBSD: mem.c,v 1.9 2001/06/27 04:29:20 art Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -54,9 +54,7 @@ #include <machine/board.h> #include <vm/vm.h> -#if defined(UVM) #include <uvm/uvm_extern.h> -#endif caddr_t zeropage; @@ -146,15 +144,9 @@ mmrw(dev, uio, flags) case 1: v = uio->uio_offset; c = min(iov->iov_len, MAXPHYS); -#if defined(UVM) if (!uvm_kernacc((caddr_t)v, c, uio->uio_rw == UIO_READ ? B_READ : B_WRITE)) return (EFAULT); -#else - if (!kernacc((caddr_t)v, c, - uio->uio_rw == UIO_READ ? B_READ : B_WRITE)) - return (EFAULT); -#endif if (v < NBPG) { #ifdef DEBUG /* diff --git a/sys/arch/mvme88k/mvme88k/pmap.c b/sys/arch/mvme88k/mvme88k/pmap.c index 0909c603e9b..f3db873124a 100644 --- a/sys/arch/mvme88k/mvme88k/pmap.c +++ b/sys/arch/mvme88k/mvme88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.30 2001/06/16 22:31:50 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.31 2001/06/27 04:29:20 art Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -58,9 +58,7 @@ #include <vm/vm.h> #include <vm/vm_kern.h> /* vm/vm_kern.h */ -#if defined(UVM) #include <uvm/uvm.h> -#endif #include <machine/asm_macro.h> #include <machine/assert.h> @@ -1412,11 +1410,7 @@ pmap_init(void) #endif s = round_page(s); -#if defined(UVM) addr = (vaddr_t)uvm_km_zalloc(kernel_map, s); -#else - addr = (vm_offset_t)kmem_alloc(kernel_map, s); -#endif pv_head_table = (pv_entry_t)addr; addr += PV_TABLE_SIZE(npages); @@ -1624,26 +1618,10 @@ pmap_pinit(pmap_t p) } #endif -#if defined(UVM) segdt = (sdt_entry_t *)uvm_km_zalloc(kernel_map, s); -#else - segdt = (sdt_entry_t *)kmem_alloc(kernel_map, s); -#endif if (segdt == NULL) panic("pmap_create: kmem_alloc failure"); -#if !defined(UVM) - /* uvm_km_zalloc gives zeroed memory */ - /* use pmap zero page to zero it out */ - addr = (vm_offset_t)segdt; - for (i=0; i<atop(s); i++) { - paddr_t pa; - - pmap_extract(kernel_pmap, addr, &pa); - pmap_zero_page(pa); - addr += PAGE_SIZE; - } -#endif /* * Initialize pointer to segment table both virtual and physical. @@ -1782,12 +1760,7 @@ pmap_free_tables(pmap_t pmap) /* * Freeing both *actual* and *shadow* segment tables */ -#if defined(UVM) uvm_km_free(kernel_map, (vm_offset_t)sdttbl, 2*SDT_SIZE); -#else - kmem_free(kernel_map, (vm_offset_t)sdttbl, 2*SDT_SIZE); -#endif - } /* pmap_free_tables() */ void @@ -2583,11 +2556,7 @@ pmap_expand(pmap_t map, vm_offset_t v) } /* XXX */ -#if defined(UVM) pdt_vaddr = uvm_km_zalloc(kernel_map, PAGE_SIZE); -#else - pdt_vaddr = kmem_alloc (kernel_map, PAGE_SIZE); -#endif pmap_extract(kernel_pmap, pdt_vaddr, &pdt_paddr); #ifdef MVME188 @@ -2608,11 +2577,7 @@ pmap_expand(pmap_t map, vm_offset_t v) */ PMAP_UNLOCK(map, spl); /* XXX */ -#if defined(UVM) uvm_km_free(kernel_map, pdt_vaddr, PAGE_SIZE); -#else - kmem_free (kernel_map, pdt_vaddr, PAGE_SIZE); -#endif #ifdef DEBUG if (pmap_con_dbg & CD_EXP) diff --git a/sys/arch/mvme88k/mvme88k/trap.c b/sys/arch/mvme88k/mvme88k/trap.c index cc53b35e162..3f4d6b7bf72 100644 --- a/sys/arch/mvme88k/mvme88k/trap.c +++ b/sys/arch/mvme88k/mvme88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.16 2001/05/05 20:56:47 art Exp $ */ +/* $OpenBSD: trap.c,v 1.17 2001/06/27 04:29:21 art Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -48,9 +48,7 @@ #include <sys/param.h> #include <vm/vm.h> #include <vm/vm_kern.h> /* kernel_map */ -#if defined(UVM) #include <uvm/uvm_extern.h> -#endif #include <sys/proc.h> #include <sys/signalvar.h> #include <sys/user.h> @@ -227,11 +225,7 @@ trap(unsigned type, struct m88100_saved_state *frame) last_trap[2] = last_trap[3]; last_trap[3] = type; } -#if defined(UVM) uvmexp.traps++; -#else - cnt.v_trap++; -#endif if ((p = curproc) == NULL) p = &proc0; @@ -419,11 +413,7 @@ trap(unsigned type, struct m88100_saved_state *frame) } if ((frame->dpfsr >> 16 & 0x7) == 0x4 /* seg fault */ || (frame->dpfsr >> 16 & 0x7) == 0x5) { /* page fault */ -#if defined(UVM) result = uvm_fault(map, va, 0, ftype); -#else - result = vm_fault(map, va, ftype, FALSE); -#endif if (result == KERN_SUCCESS) { /* * We could resolve the fault. Call @@ -507,11 +497,7 @@ outtahere: /* Call vm_fault() to resolve non-bus error faults */ if ((frame->ipfsr >> 16 & 0x7) != 0x3 && (frame->dpfsr >> 16 & 0x7) != 0x3) { -#if defined(UVM) result = uvm_fault(map, va, 0, ftype); -#else - result = vm_fault(map, va, ftype, FALSE); -#endif frame->ipfsr = frame->dpfsr = 0; } @@ -668,11 +654,7 @@ outtahere: break; case T_ASTFLT+T_USER: -#if defined(UVM) uvmexp.softs++; -#else - cnt.v_soft++; -#endif want_ast = 0; if (p->p_flag & P_OWEUPC) { p->p_flag &= ~P_OWEUPC; @@ -728,11 +710,7 @@ trap2(unsigned type, struct m88100_saved_state *frame) extern unsigned guarded_access_end; extern unsigned guarded_access_bad; -#if defined(UVM) uvmexp.traps++; -#else - cnt.v_trap++; -#endif if ((p = curproc) == NULL) p = &proc0; @@ -996,11 +974,7 @@ trap2(unsigned type, struct m88100_saved_state *frame) if (type == T_DATAFLT) { if ((frame->dsr & CMMU_DSR_SI) /* seg fault */ || (frame->dsr & CMMU_DSR_PI)) { /* page fault */ -#if defined(UVM) result = uvm_fault(map, va, 0, ftype); -#else - result = vm_fault(map, va, ftype, FALSE); -#endif if (result == KERN_SUCCESS) { return; } @@ -1008,11 +982,7 @@ trap2(unsigned type, struct m88100_saved_state *frame) } else { if ((frame->isr & CMMU_ISR_SI) /* seg fault */ || (frame->isr & CMMU_ISR_PI)) { /* page fault */ -#if defined(UVM) result = uvm_fault(map, va, 0, ftype); -#else - result = vm_fault(map, va, ftype, FALSE); -#endif if (result == KERN_SUCCESS) { return; } @@ -1057,11 +1027,7 @@ trap2(unsigned type, struct m88100_saved_state *frame) if (type == T_DATAFLT+T_USER) { if ((frame->dsr & CMMU_DSR_SI) /* seg fault */ || (frame->dsr & CMMU_DSR_PI)) { /* page fault */ -#if defined(UVM) result = uvm_fault(map, va, 0, ftype); -#else - result = vm_fault(map, va, ftype, FALSE); -#endif if (result == KERN_SUCCESS) { return; } @@ -1069,11 +1035,7 @@ trap2(unsigned type, struct m88100_saved_state *frame) } else { if ((frame->isr & CMMU_ISR_SI) /* seg fault */ || (frame->isr & CMMU_ISR_PI)) { /* page fault */ -#if defined(UVM) result = uvm_fault(map, va, 0, ftype); -#else - result = vm_fault(map, va, ftype, FALSE); -#endif if (result == KERN_SUCCESS) { return; } @@ -1204,11 +1166,7 @@ trap2(unsigned type, struct m88100_saved_state *frame) break; case T_ASTFLT+T_USER: -#if defined(UVM) uvmexp.softs++; -#else - cnt.v_soft++; -#endif want_ast = 0; if (p->p_flag & P_OWEUPC) { p->p_flag &= ~P_OWEUPC; @@ -1298,11 +1256,7 @@ syscall(register_t code, struct m88100_saved_state *tf) u_quad_t sticks; extern struct pcb *curpcb; -#if defined(UVM) uvmexp.syscalls++; -#else - cnt.v_syscall++; -#endif p = curproc; @@ -1460,11 +1414,7 @@ m197_syscall(register_t code, struct m88100_saved_state *tf) u_quad_t sticks; extern struct pcb *curpcb; -#if defined(UVM) uvmexp.syscalls++; -#else - cnt.v_syscall++; -#endif p = curproc; diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c index 2a502a4d25b..d70b495efec 100644 --- a/sys/arch/mvme88k/mvme88k/vm_machdep.c +++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.25 2001/06/08 08:09:16 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.26 2001/06/27 04:29:22 art Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. @@ -60,9 +60,7 @@ #include <vm/vm_kern.h> #include <vm/vm_map.h> -#if defined(UVM) #include <uvm/uvm_extern.h> -#endif #include <machine/cpu.h> #include <machine/cpu_number.h> @@ -183,11 +181,7 @@ cpu_exit(struct proc *p) (void) splimp(); -#if defined(UVM) uvmexp.swtch++; -#else - cnt.v_swtch++; -#endif switch_exit(p); /* NOTREACHED */ } @@ -264,11 +258,7 @@ vmapbuf(bp, len) * when the address gets a new mapping. */ -#if defined(UVM) kva = uvm_km_valloc_wait(phys_map, len); -#else - kva = kmem_alloc_wait(phys_map, len); -#endif /* * Flush the TLB for the range [kva, kva + off]. Strictly speaking, @@ -309,11 +299,7 @@ vunmapbuf(bp, len) addr = trunc_page((vaddr_t)bp->b_data); off = (vm_offset_t)bp->b_data & PGOFSET; len = round_page(off + len); -#if defined(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; } |