summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-27 03:54:15 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-27 03:54:15 +0000
commit4cff6e802a837f7c9374ed0a82ade51a0d79035e (patch)
treeb7b91eb43a1c3a30a1a743a4c402f31a2e1a7fad /sys
parentcc7c5b2057ed95722dbc12fec9e43b0d4844a3a4 (diff)
No more old VM on amiga.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amiga/amiga/genassym.cf8
-rw-r--r--sys/arch/amiga/amiga/locore.s34
-rw-r--r--sys/arch/amiga/amiga/machdep.c71
-rw-r--r--sys/arch/amiga/amiga/mem.c10
-rw-r--r--sys/arch/amiga/amiga/pmap.c120
-rw-r--r--sys/arch/amiga/amiga/trap.c28
-rw-r--r--sys/arch/amiga/amiga/vm_machdep.c20
-rw-r--r--sys/arch/amiga/dev/sfas.c32
-rw-r--r--sys/arch/amiga/isa/cross.c4
-rw-r--r--sys/arch/amiga/isa/crossvar.h5
10 files changed, 13 insertions, 319 deletions
diff --git a/sys/arch/amiga/amiga/genassym.cf b/sys/arch/amiga/amiga/genassym.cf
index b64d5cfff93..ad2606cf8d9 100644
--- a/sys/arch/amiga/amiga/genassym.cf
+++ b/sys/arch/amiga/amiga/genassym.cf
@@ -1,5 +1,5 @@
# $NetBSD: genassym.cf,v 1.3 1997/07/16 00:01:49 is Exp $
-# $OpenBSD: genassym.cf,v 1.5 2000/05/28 03:55:21 art Exp $
+# $OpenBSD: genassym.cf,v 1.6 2001/06/27 03:54:12 art Exp $
#
# Copyright (c) 1982, 1990, 1993
# The Regents of the University of California. All rights reserved.
@@ -45,9 +45,7 @@ include <sys/user.h>
include <vm/vm.h>
-ifdef UVM
include <uvm/uvm_extern.h>
-endif
include <machine/cpu.h>
include <machine/trap.h>
@@ -111,11 +109,7 @@ define P_MD_REGS offsetof(struct proc, p_md.md_regs)
define SRUN SRUN
# interrupt/fault metering
-ifdef UVM
define UVMEXP_INTRS offsetof(struct uvmexp, intrs)
-else
-define V_INTR offsetof(struct vmmeter, v_intr)
-endif
# general constants
define UPAGES UPAGES
diff --git a/sys/arch/amiga/amiga/locore.s b/sys/arch/amiga/amiga/locore.s
index dd604cc4bb4..ad12cb9006e 100644
--- a/sys/arch/amiga/amiga/locore.s
+++ b/sys/arch/amiga/amiga/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.29 2000/06/05 11:02:55 art Exp $ */
+/* $OpenBSD: locore.s,v 1.30 2001/06/27 03:54:12 art Exp $ */
/* $NetBSD: locore.s,v 1.89 1997/07/17 16:22:54 is Exp $ */
/*
@@ -465,11 +465,7 @@ _trace:
_spurintr:
addql #1,_intrcnt+0
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra rei
#ifdef DRACO
@@ -497,11 +493,7 @@ _DraCoLev2intr:
Ldraciaend:
moveml sp@+,#0x0303
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra rei
/* XXX on the DraCo rev. 4 or later, lev 1 is vectored here. */
@@ -535,11 +527,7 @@ Ldrclockretry:
clrb a0@(9) | reset timer irq
moveml sp@+,#0x0303
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra rei
/* XXX on the DraCo, lev 1, 3, 4, 5 and 6 are vectored here by initcpu() */
@@ -556,11 +544,7 @@ Ldrintrcommon:
jbsr _intrhand | handle interrupt
addql #4,sp | pop SR
moveml sp@+,#0x0303
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra rei
#endif
@@ -575,11 +559,7 @@ _lev5intr:
#endif
moveml sp@+,d0/d1/a0/a1
addql #1,_intrcnt+20
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra rei
_lev1intr:
@@ -599,11 +579,7 @@ Lintrcommon:
jbsr _intrhand | handle interrupt
addql #4,sp | pop SR
moveml sp@+,d0-d1/a0-a1
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra rei
| Both IPL_REMAP_1 and IPL_REMAP_2 are experimental interruptsystems from
@@ -689,11 +665,7 @@ Lskipciab:
| other ciab interrupts?
Llev6done:
moveml sp@+,d0-d1/a0-a1 | restore scratch regs
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra rei | all done [can we do rte here?]
Lchkexter:
| check to see if EXTER request is really set?
@@ -748,11 +720,7 @@ Lexter:
addql #8,sp
addql #1,_intrcnt+24 | add another exter interrupt
moveml sp@+,d0-d1/a0-a1 | restore scratch regs
-#ifdef UVM
addql #1,_uvmexp+UVMEXP_INTRS
-#else
- addql #1,_cnt+V_INTR
-#endif
jra Lastchk | all done [can we do rte here?]
#endif
diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c
index 3a663dff189..9ec33b1d4d3 100644
--- a/sys/arch/amiga/amiga/machdep.c
+++ b/sys/arch/amiga/amiga/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.45 2001/06/06 21:21:12 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.46 2001/06/27 03:54:12 art Exp $ */
/* $NetBSD: machdep.c,v 1.95 1997/08/27 18:31:17 is Exp $ */
/*
@@ -85,9 +85,7 @@
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#include <machine/db_machdep.h>
#include <ddb/db_sym.h>
@@ -137,11 +135,9 @@ void fdintr __P((int));
*/
u_int16_t amiga_ttyspl = PSL_S|PSL_IPL4;
-#if defined(UVM)
vm_map_t exec_map = NULL;
vm_map_t mb_map = NULL;
vm_map_t phys_map = NULL;
-#endif
/*
* Declare these as initialized data so we can patch them.
@@ -410,21 +406,14 @@ again:
if (nswbuf > 256)
nswbuf = 256; /* sanity */
}
-#if !defined(UVM)
- valloc(swbuf, struct buf, nswbuf);
-#endif
valloc(buf, struct buf, nbuf);
/*
* End of first pass, size has been calculated so allocate memory
*/
if (firstaddr == 0) {
size = (vm_size_t)(v - firstaddr);
-#if defined(UVM)
firstaddr = (caddr_t) uvm_km_zalloc(kernel_map,
round_page(size));
-#else
- firstaddr = (caddr_t) kmem_alloc(kernel_map, round_page(size));
-#endif
if (firstaddr == 0)
panic("startup: no room for tables");
goto again;
@@ -440,21 +429,12 @@ again:
* 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("startup: cannot allocate 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,
- &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 */
bufpages = btoc(MAXBSIZE) * nbuf;
@@ -462,7 +442,6 @@ again:
base = bufpages / nbuf;
residual = bufpages % nbuf;
for (i = 0; i < nbuf; i++) {
-#if defined(UVM)
vsize_t curbufsize;
vaddr_t curbuf;
struct vm_page *pg;
@@ -491,54 +470,23 @@ again:
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);
- 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
/*
* Allocate a submap 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 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
@@ -548,12 +496,7 @@ again:
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
-#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);
@@ -1693,22 +1636,14 @@ intrhand(sr)
#ifdef REALLYDEBUG
printf("calling netintr\n");
#endif
-#if defined(UVM)
uvmexp.softs++;
-#else
- cnt.v_soft++;
-#endif
netintr();
}
if (ssir_active & SIR_CLOCK) {
#ifdef REALLYDEBUG
printf("calling softclock\n");
#endif
-#if defined(UVM)
uvmexp.softs++;
-#else
- cnt.v_soft++;
-#endif
/* XXXX softclock(&frame.f_stackadj); */
softclock();
}
@@ -1716,11 +1651,7 @@ intrhand(sr)
#ifdef REALLYDEBUG
printf("calling softcallbacks\n");
#endif
-#if defined(UVM)
uvmexp.softs++;
-#else
- cnt.v_soft++;
-#endif
call_sicallbacks();
}
}
diff --git a/sys/arch/amiga/amiga/mem.c b/sys/arch/amiga/amiga/mem.c
index a5feb2ca3ca..73f814ae719 100644
--- a/sys/arch/amiga/amiga/mem.c
+++ b/sys/arch/amiga/amiga/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.12 2001/05/05 20:56:32 art Exp $ */
+/* $OpenBSD: mem.c,v 1.13 2001/06/27 03:54:13 art Exp $ */
/* $NetBSD: mem.c,v 1.18 1997/02/02 07:17:14 thorpej Exp $ */
/*
@@ -56,9 +56,7 @@
#include <machine/cpu.h>
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
extern int kernel_reload_write(struct uio *uio);
extern u_int lowram;
@@ -160,15 +158,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/amiga/amiga/pmap.c b/sys/arch/amiga/amiga/pmap.c
index f80c5316c1c..27a1d1c1064 100644
--- a/sys/arch/amiga/amiga/pmap.c
+++ b/sys/arch/amiga/amiga/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.31 2001/06/08 08:08:41 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.32 2001/06/27 03:54:13 art Exp $ */
/* $NetBSD: pmap.c,v 1.68 1999/06/19 19:44:09 is Exp $ */
/*-
@@ -121,9 +121,7 @@
#include <sys/user.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
-#if defined(UVM)
#include <uvm/uvm.h>
-#endif
#include <machine/pte.h>
#include <machine/cpu.h>
#include <machine/vmparam.h>
@@ -277,9 +275,7 @@ vsize_t Sysptsize = VM_KERNEL_PT_PAGES;
struct pmap kernel_pmap_store;
vm_map_t pt_map;
-#if defined(UVM)
struct vm_map pt_map_store;
-#endif
vsize_t mem_size; /* memory size in bytes */
vaddr_t virtual_avail; /* VA of first avail page (after kernel bss)*/
@@ -370,10 +366,8 @@ pmap_bootstrap(firstaddr, loadaddr)
fromads = firstaddr;
toads = maxmem << PGSHIFT;
-#if defined(UVM)
uvmexp.pagesize = NBPG;
uvm_setpagesize();
-#endif
/* XXX: allow for msgbuf */
toads -= m68k_round_page(MSGBUFSIZE);
@@ -382,13 +376,8 @@ pmap_bootstrap(firstaddr, loadaddr)
* first segment of memory is always the one loadbsd found
* for loading the kernel into.
*/
-#if defined(UVM)
uvm_page_physload(atop(fromads), atop(toads),
atop(fromads), atop(toads), VM_FREELIST_DEFAULT);
-#else
- vm_page_physload(atop(fromads), atop(toads),
- atop(fromads), atop(toads));
-#endif
sp = memlist->m_seg;
esp = sp + memlist->m_nseg;
@@ -428,14 +417,9 @@ pmap_bootstrap(firstaddr, loadaddr)
if ((fromads <= z2mem_start) && (toads > z2mem_start))
toads = z2mem_start;
-#if defined(UVM)
uvm_page_physload(atop(fromads), atop(toads),
atop(fromads), atop(toads), (fromads & 0xff000000) ?
VM_FREELIST_DEFAULT : VM_FREELIST_ZORROII);
-#else
- vm_page_physload(atop(fromads), atop(toads),
- atop(fromads), atop(toads));
-#endif
physmem += (toads - fromads) / NBPG;
++i;
if (noncontig_enable == 1)
@@ -517,7 +501,6 @@ pmap_init()
* unavailable regions which we have mapped in locore.
* XXX in pmap_boostrap() ???
*/
-#if defined(UVM)
addr = (vaddr_t) amigahwaddr;
if (uvm_map(kernel_map, &addr,
ptoa(namigahwpg),
@@ -540,24 +523,6 @@ pmap_init()
bogons:
panic("pmap_init: bogons in the VM system!\n");
}
-#else
- addr = amigahwaddr;
- (void)vm_map_find(kernel_map, NULL, 0, &addr, ptoa(namigahwpg), FALSE);
- if (addr != amigahwaddr)
- panic("pmap_init: bogons in the VM system!");
-
- addr = (vaddr_t)Sysmap;
- vm_object_reference(kernel_object);
- (void)vm_map_find(kernel_map, kernel_object, addr, &addr,
- AMIGA_KPTSIZE, FALSE);
- /*
- * If this fails it is probably because the static portion of
- * the kernel page table isn't big enough and we overran the
- * page table map. XXX Need to adjust pmap_size() in amiga_init.c.
- */
- if (addr != (vaddr_t)Sysmap)
- panic("pmap_init: bogons in the VM system!");
-#endif
#ifdef DEBUG
if (pmapdebug & PDB_INIT) {
printf("pmap_init: Sysseg %p, Sysmap %p, Sysptmap %p\n",
@@ -583,11 +548,7 @@ bogons:
s += page_cnt * sizeof(char); /* attribute table */
s = round_page(s);
-#if defined(UVM)
addr = uvm_km_zalloc(kernel_map, s);
-#else
- addr = (vaddr_t)kmem_alloc(kernel_map, s);
-#endif
Segtabzero = (u_int *)addr;
pmap_extract(pmap_kernel(), addr, (paddr_t *)&Segtabzeropa);
@@ -640,7 +601,6 @@ bogons:
* Verify that space will be allocated in region for which
* we already have kernel PT pages.
*/
-#if defined(UVM)
addr = 0;
rv = uvm_map(kernel_map, &addr, s, NULL, UVM_UNKNOWN_OFFSET,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
@@ -650,24 +610,13 @@ bogons:
rv = uvm_unmap(kernel_map, addr, addr + s);
if (rv != KERN_SUCCESS)
panic("pmap_init: uvm_unmap failed");
-#else
- addr = 0;
- rv = vm_map_find(kernel_map, NULL, 0, &addr, s, TRUE);
- if (rv != KERN_SUCCESS || addr + s >= (vaddr_t)Sysmap)
- panic("pmap_init: kernel PT too small");
- vm_map_remove(kernel_map, addr, addr + s);
-#endif
/*
* Now allocate the space and link the pages together to
* form the KPT free list.
*/
-#if defined(UVM)
addr = uvm_km_zalloc(kernel_map, s);
if (addr == 0)
panic("pmap_init: cannot allocate KPT free list");
-#else
- addr = (vaddr_t)kmem_alloc(kernel_map, s);
-#endif
s = ptoa(npg);
addr2 = addr + s;
kpt_pages = &((struct kpt_page *)addr2)[npg];
@@ -687,7 +636,6 @@ bogons:
addr, addr + s);
#endif
-#if defined(UVM)
/*
* Allocate the segment table map and the page table map.
*/
@@ -706,30 +654,6 @@ bogons:
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
-#else
- /*
- * Slightly modified version of kmem_suballoc() to get page table
- * map where we want it.
- */
- addr = amiga_uptbase;
- s = AMIGA_UPTMAXSIZE / AMIGA_UPTSIZE < maxproc ?
- AMIGA_UPTMAXSIZE : maxproc * AMIGA_UPTSIZE;
- addr2 = addr + s;
- rv = vm_map_find(kernel_map, NULL, 0, &addr, s, TRUE);
- if (rv != KERN_SUCCESS)
- panic("pmap_init: cannot allocate space for PT map");
- pmap_reference(vm_map_pmap(kernel_map));
- pt_map = vm_map_create(vm_map_pmap(kernel_map), addr, addr2, TRUE);
- if (pt_map == NULL)
- panic("pmap_init: cannot create pt_map");
- rv = vm_map_submap(kernel_map, addr, addr2, pt_map);
- if (rv != KERN_SUCCESS)
- panic("pmap_init: cannot map range to pt_map");
-#ifdef DEBUG
- if (pmapdebug & PDB_INIT)
- printf("pmap_init: pt_map [%lx - %lx)\n", addr, addr2);
-#endif
-#endif /* UVM */
#if defined(M68040) || defined(M68060)
if (mmutype == MMU_68040)
@@ -776,15 +700,9 @@ pmap_alloc_pv()
int i;
if (pv_nfree == 0) {
-#if defined(UVM)
pvp = (struct pv_page *)uvm_km_zalloc(kernel_map, NBPG);
if (pvp == 0)
panic("pmap_alloc_pv: uvm_km_zalloc() failed");
-#else
- pvp = (struct pv_page *)kmem_alloc(kernel_map, NBPG);
- if (pvp == 0)
- panic("pmap_alloc_pv: kmem_alloc() failed");
-#endif
pvp->pvp_pgi.pgi_freelist = pv = &pvp->pvp_pv[1];
for (i = NPVPPG - 2; i; i--, pv++)
pv->pv_next = pv + 1;
@@ -826,11 +744,7 @@ pmap_free_pv(pv)
case NPVPPG:
pv_nfree -= NPVPPG - 1;
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
-#if defined(UVM)
uvm_km_free(kernel_map, (vaddr_t)pvp, NBPG);
-#else
- kmem_free(kernel_map, (vaddr_t)pvp, NBPG);
-#endif
break;
}
}
@@ -977,21 +891,12 @@ pmap_release(pmap)
if (pmap->pm_count != 1)
panic("pmap_release count");
#endif
-#if defined(UVM)
if (pmap->pm_ptab)
uvm_km_free_wakeup(pt_map, (vaddr_t)pmap->pm_ptab,
AMIGA_UPTSIZE);
if (pmap->pm_stab != Segtabzero)
uvm_km_free_wakeup(kernel_map, (vaddr_t)pmap->pm_stab,
AMIGA_STSIZE);
-#else
- if (pmap->pm_ptab)
- kmem_free_wakeup(pt_map, (vaddr_t)pmap->pm_ptab,
- AMIGA_UPTSIZE);
- if (pmap->pm_stab != Segtabzero)
- kmem_free_wakeup(kernel_map, (vaddr_t)pmap->pm_stab,
- AMIGA_STSIZE);
-#endif
}
/*
@@ -1248,13 +1153,8 @@ pmap_enter(pmap, va, pa, prot, wired, access_type)
* For user mapping, allocate kernel VM resources if necessary.
*/
if (pmap->pm_ptab == NULL)
-#if defined(UVM)
pmap->pm_ptab = (pt_entry_t *)
uvm_km_valloc_wait(pt_map, AMIGA_UPTSIZE);
-#else
- pmap->pm_ptab = (u_int *)
- kmem_alloc_wait(pt_map, AMIGA_UPTSIZE);
-#endif
/*
* Segment table entry not valid, we need a new PT page
@@ -2327,15 +2227,8 @@ pmap_changebit(pa, bit, setem)
* XXX don't write protect pager mappings
*/
if (bit == PG_RO) {
-#if defined(UVM)
if (va >= uvm.pager_sva && va < uvm.pager_eva)
continue;
-#else
- extern vm_offset_t pager_sva, pager_eva;
-
- if (va >= pager_sva && va < pager_eva)
- continue;
-#endif
}
pte = (int *)pmap_pte(pv->pv_pmap, va);
@@ -2393,13 +2286,8 @@ pmap_enter_ptpage(pmap, va)
*/
if (pmap->pm_stab == Segtabzero) {
/* XXX Atari uses kernel_map here: */
-#if defined(UVM)
pmap->pm_stab = (st_entry_t *)
uvm_km_zalloc(kernel_map, AMIGA_STSIZE);
-#else
- pmap->pm_stab = (u_int *)
- kmem_alloc(kernel_map, AMIGA_STSIZE);
-#endif
pmap_extract(pmap_kernel(), (vaddr_t)pmap->pm_stab,
(paddr_t *)&pmap->pm_stpa);
#if defined(M68040) || defined(M68060)
@@ -2546,7 +2434,6 @@ pmap_enter_ptpage(pmap, va)
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
printf("enter_pt: about to fault UPT pg at %lx\n", va);
#endif
-#if defined(UVM)
s = uvm_fault_wire(pt_map, va, va + PAGE_SIZE,
VM_PROT_READ|VM_PROT_WRITE);
if (s != KERN_SUCCESS) {
@@ -2554,11 +2441,6 @@ pmap_enter_ptpage(pmap, va)
"-> %d\n", va, va + PAGE_SIZE, s);
panic("pmap_enter: uvm_fault_wire failed");
}
-#else
- if (vm_fault(pt_map, va, VM_PROT_READ|VM_PROT_WRITE, FALSE)
- != KERN_SUCCESS)
- panic("pmap_enter: vm_fault failed");
-#endif
ptpa = pmap_pte_pa(pmap_pte(pmap_kernel(), va));
#if 0 /* XXXX what is this? XXXX */
/*
diff --git a/sys/arch/amiga/amiga/trap.c b/sys/arch/amiga/amiga/trap.c
index 9124c183def..af964e03866 100644
--- a/sys/arch/amiga/amiga/trap.c
+++ b/sys/arch/amiga/amiga/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.20 2001/05/05 20:56:32 art Exp $ */
+/* $OpenBSD: trap.c,v 1.21 2001/06/27 03:54:13 art Exp $ */
/* $NetBSD: trap.c,v 1.56 1997/07/16 00:01:47 is Exp $ */
/*
@@ -60,9 +60,7 @@
#include <sys/user.h>
#include <vm/pmap.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#include <machine/psl.h>
#include <machine/trap.h>
@@ -404,11 +402,7 @@ trapmmufault(type, code, v, fp, p, sticks)
printf("vm_fault(%p,%lx,%d,0)\n", map, va, ftype);
#endif
-#if defined(UVM)
rv = uvm_fault(map, va, 0, ftype);
-#else
- rv = vm_fault(map, va, ftype, FALSE);
-#endif
#ifdef DEBUG
if (mmudebug)
@@ -551,11 +545,7 @@ trap(type, code, v, frame)
p = curproc;
typ = ucode = 0;
-#if defined(UVM)
uvmexp.traps++;
-#else
- cnt.v_trap++;
-#endif
if (USERMODE(frame.f_sr)) {
type |= T_USER;
@@ -825,11 +815,7 @@ syscall(code, frame)
extern struct emul emul_sunos;
#endif
-#if defined(UVM)
uvmexp.syscalls++;
-#else
- cnt.v_syscall++;
-#endif
if (!USERMODE(frame.f_sr))
panic("syscall");
p = curproc;
@@ -1033,15 +1019,9 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
if (mmudebug)
printf("wb3: need to bring in first page\n");
#endif
-#if defined(UVM)
wb_rc = uvm_fault(wb_map,
trunc_page((vm_offset_t)wb_addr),
0, VM_PROT_READ | VM_PROT_WRITE);
-#else
- wb_rc = vm_fault(wb_map,
- trunc_page((vm_offset_t)wb_addr),
- VM_PROT_READ | VM_PROT_WRITE, FALSE);
-#endif
if (wb_rc != KERN_SUCCESS)
return (wb_rc);
@@ -1072,15 +1052,9 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
" Bringing in extra page.\n", wb);
#endif
-#if defined(UVM)
wb_rc = uvm_fault(wb_map,
trunc_page((vm_offset_t)wb_addr + wb_extra_page),
0, VM_PROT_READ | VM_PROT_WRITE);
-#else
- wb_rc = vm_fault(wb_map,
- trunc_page((vm_offset_t)wb_addr + wb_extra_page),
- VM_PROT_READ | VM_PROT_WRITE, FALSE);
-#endif
if (wb_rc != KERN_SUCCESS)
return (wb_rc);
diff --git a/sys/arch/amiga/amiga/vm_machdep.c b/sys/arch/amiga/amiga/vm_machdep.c
index e0586ed10c6..259075d7924 100644
--- a/sys/arch/amiga/amiga/vm_machdep.c
+++ b/sys/arch/amiga/amiga/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.19 2001/06/08 08:08:42 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.20 2001/06/27 03:54:13 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/05/19 10:14:50 veego Exp $ */
/*
@@ -59,9 +59,7 @@
#include <vm/vm.h>
#include <sys/user.h>
#include <vm/vm_kern.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#include <machine/pte.h>
/* XXX - Put this in some header file? */
@@ -160,11 +158,7 @@ cpu_exit(p)
{
(void)splhigh();
-#if defined(UVM)
uvmexp.swtch++;
-#else
- cnt.v_swtch++;
-#endif
switch_exit(p);
/* NOTREACHED */
}
@@ -377,11 +371,7 @@ vmapbuf(bp, len)
uva = m68k_trunc_page(bp->b_saveaddr = bp->b_data);
off = (vaddr_t)bp->b_data - uva;
len = m68k_round_page(off + len);
-#if defined(UVM)
kva = uvm_km_valloc_wait(phys_map, len);
-#else
- kva = kva = kmem_alloc_wait(phys_map, len);
-#endif
bp->b_data = (caddr_t)(kva + off);
upmap = vm_map_pmap(&bp->b_proc->p_vmspace->vm_map);
@@ -419,11 +409,7 @@ vunmapbuf(bp, len)
* pmap_remove() is unnecessary here, as kmem_free_wakeup()
* will do it for us.
*/
-#if defined(UVM)
uvm_km_free_wakeup(phys_map, kva, len);
-#else
- kmem_free_wakeup(phys_map, kva, len);
-#endif
- bp->b_data = bp->b_saveaddr;
- bp->b_saveaddr = 0;
+ bp->b_data = bp->b_saveaddr;
+ bp->b_saveaddr = 0;
}
diff --git a/sys/arch/amiga/dev/sfas.c b/sys/arch/amiga/dev/sfas.c
index 425fd06e570..d8875fa390a 100644
--- a/sys/arch/amiga/dev/sfas.c
+++ b/sys/arch/amiga/dev/sfas.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sfas.c,v 1.9 2001/05/05 21:26:35 art Exp $ */
+/* $OpenBSD: sfas.c,v 1.10 2001/06/27 03:54:13 art Exp $ */
/* $NetBSD: sfas.c,v 1.12 1996/10/13 03:07:33 christos Exp $ */
/*
@@ -232,13 +232,8 @@ sfasinitialize(dev)
dev->sc_bump_pa = (vm_offset_t)
PREP_DMA_MEM(dev->sc_bump_va);
} else {
-#if defined(UVM)
dev->sc_bump_va = (u_char *)uvm_km_zalloc(kernel_map,
dev->sc_bump_sz);
-#else
- dev->sc_bump_va = (u_char *)kmem_alloc(kernel_map,
- dev->sc_bump_sz);
-#endif
dev->sc_bump_pa = kvtop(dev->sc_bump_va);
}
@@ -262,32 +257,7 @@ sfasinitialize(dev)
* of virtual memory to which we can later map physical memory to.
*/
#ifdef SFAS_NEED_VM_PATCH
-#if defined(UVM)
dev->sc_vm_link = (u_char *)uvm_km_valloc(kernel_map, MAXPHYS + NBPG);
-#else
- vm_map_lock(kernel_map);
-
-/* Locate available space. */
- if (vm_map_findspace(kernel_map, 0, MAXPHYS+NBPG,
- (vm_offset_t *)&dev->sc_vm_link)) {
- vm_map_unlock(kernel_map);
- panic("SFAS_SCSICMD: No VM space available.");
- } else {
- int offset;
-
-/*
- * Map space to virtual memory in kernel_map. This vm will always be available
- * to us during interrupt time.
- */
- offset = (vm_offset_t)dev->sc_vm_link - VM_MIN_KERNEL_ADDRESS;
- printf(" vmlnk %p", dev->sc_vm_link);
- vm_object_reference(kernel_object);
- vm_map_insert(kernel_map, kernel_object, offset,
- (vm_offset_t)dev->sc_vm_link,
- (vm_offset_t)dev->sc_vm_link+(MAXPHYS+NBPG));
- vm_map_unlock(kernel_map);
- }
-#endif /* UVM */
dev->sc_vm_link_pages = 0;
#endif
diff --git a/sys/arch/amiga/isa/cross.c b/sys/arch/amiga/isa/cross.c
index 808db4b9d1e..f28c52dcb9f 100644
--- a/sys/arch/amiga/isa/cross.c
+++ b/sys/arch/amiga/isa/cross.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cross.c,v 1.15 2001/06/25 00:43:08 mickey Exp $ */
+/* $OpenBSD: cross.c,v 1.16 2001/06/27 03:54:13 art Exp $ */
/*
* Copyright (c) 1994, 1996 Niklas Hallqvist, Carsten Hammer
@@ -54,7 +54,7 @@
#include <amiga/isa/crossreg.h>
#include <amiga/isa/crossvar.h>
-#if defined(UVM)
+#if 1
void crossattach __P((struct device *, struct device *, void *));
int crossmatch __P((struct device *, void *, void *));
diff --git a/sys/arch/amiga/isa/crossvar.h b/sys/arch/amiga/isa/crossvar.h
index 92b4885cabf..5a725e0b9f2 100644
--- a/sys/arch/amiga/isa/crossvar.h
+++ b/sys/arch/amiga/isa/crossvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: crossvar.h,v 1.6 2000/05/28 03:28:42 art Exp $ */
+/* $OpenBSD: crossvar.h,v 1.7 2001/06/27 03:54:14 art Exp $ */
/*
* Copyright (c) 1994, 1996 Niklas Hallqvist
@@ -61,9 +61,6 @@ struct cross_softc {
u_int16_t sc_imask;
volatile u_int16_t *sc_status;
struct vm_page sc_page[CROSS_BANK_SIZE / NBPG];
-#ifndef UVM
- struct pager_struct sc_pager;
-#endif
struct amiga_bus_space sc_iot;
struct amiga_bus_space sc_memt;