Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax Remove the vmapbuf()/vunmapbuf() routines. They...
details: https://anonhg.NetBSD.org/src/rev/dd57cf37c960
branches: trunk
changeset: 477586:dd57cf37c960
user: ragge <ragge%NetBSD.org@localhost>
date: Fri Oct 22 21:14:34 1999 +0000
description:
Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.
diffstat:
sys/arch/vax/include/param.h | 4 +--
sys/arch/vax/include/vmparam.h | 8 +----
sys/arch/vax/vax/machdep.c | 10 +------
sys/arch/vax/vax/vm_machdep.c | 62 +-----------------------------------------
4 files changed, 4 insertions(+), 80 deletions(-)
diffs (155 lines):
diff -r fe488961ee07 -r dd57cf37c960 sys/arch/vax/include/param.h
--- a/sys/arch/vax/include/param.h Fri Oct 22 21:12:20 1999 +0000
+++ b/sys/arch/vax/include/param.h Fri Oct 22 21:14:34 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.38 1999/08/05 18:48:55 thorpej Exp $ */
+/* $NetBSD: param.h,v 1.39 1999/10/22 21:14:34 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -208,10 +208,8 @@
#define spl6() splx(0x16)
#define spl7() splx(0x17)
-#if !defined(VAX410) && !defined(VAX43)
#define vmapbuf(p,q)
#define vunmapbuf(p,q)
-#endif
/* Prototype needed for delay() */
#ifndef _LOCORE
diff -r fe488961ee07 -r dd57cf37c960 sys/arch/vax/include/vmparam.h
--- a/sys/arch/vax/include/vmparam.h Fri Oct 22 21:12:20 1999 +0000
+++ b/sys/arch/vax/include/vmparam.h Fri Oct 22 21:14:34 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.26 1999/06/20 00:53:58 ragge Exp $ */
+/* $NetBSD: vmparam.h,v 1.27 1999/10/22 21:14:35 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -93,11 +93,6 @@
#endif
/*
- * Size of User Raw I/O map
- */
-#define USRIOSIZE 300
-
-/*
* The time for a process to be blocked before being very swappable.
* This is a number of seconds which the system takes as being a non-trivial
* amount of real time. You probably shouldn't change this;
@@ -157,6 +152,5 @@
/* virtual sizes (bytes) for various kernel submaps */
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
-#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
#endif
diff -r fe488961ee07 -r dd57cf37c960 sys/arch/vax/vax/machdep.c
--- a/sys/arch/vax/vax/machdep.c Fri Oct 22 21:12:20 1999 +0000
+++ b/sys/arch/vax/vax/machdep.c Fri Oct 22 21:14:34 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.87 1999/09/17 20:07:20 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.88 1999/10/22 21:14:34 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -134,7 +134,6 @@
vm_map_t exec_map = NULL;
vm_map_t mb_map = NULL;
-vm_map_t phys_map = NULL;
#ifdef DEBUG
int iospace_inited = 0;
@@ -238,13 +237,6 @@
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
-#if VAX410 || VAX43
- /*
- * Allocate a submap for physio
- */
- phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_PHYS_SIZE, 0, FALSE, NULL);
-#endif
/*
* Initialize callouts
*/
diff -r fe488961ee07 -r dd57cf37c960 sys/arch/vax/vax/vm_machdep.c
--- a/sys/arch/vax/vax/vm_machdep.c Fri Oct 22 21:12:20 1999 +0000
+++ b/sys/arch/vax/vax/vm_machdep.c Fri Oct 22 21:14:34 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.54 1999/08/01 12:07:31 ragge Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.55 1999/10/22 21:14:34 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -261,66 +261,6 @@
kvtopte((vaddr_t)p->p_addr + REDZONEADDR)->pg_v = 0;
}
-#if VAX410 || VAX43
-/*
- * Map a user I/O request into kernel virtual address space.
- * Note: the pages are already locked by uvm_vslock(), so we
- * do not need to pass an access_type to pmap_enter().
- *
- * vmapbuf()/vunmapbuf() only used on some vaxstations without
- * any busadapter with MMU.
- * XXX - This must be reworked to be effective.
- */
-void
-vmapbuf(bp, len)
- struct buf *bp;
- vm_size_t len;
-{
- vm_offset_t faddr, taddr, off, pa;
- pmap_t fmap, tmap;
-
- if ((vax_boardtype != VAX_BTYP_43) && (vax_boardtype != VAX_BTYP_410))
- return;
- faddr = trunc_page(bp->b_saveaddr = bp->b_data);
- off = (vm_offset_t)bp->b_data - faddr;
- len = round_page(off + len);
- taddr = uvm_km_valloc_wait(phys_map, len);
- bp->b_data = (caddr_t)(taddr + off);
- fmap = vm_map_pmap(&bp->b_proc->p_vmspace->vm_map);
- tmap = vm_map_pmap(phys_map);
- len = len >> VAX_PGSHIFT;
- while (len--) {
- if (pmap_extract(fmap, faddr, &pa) == FALSE)
- panic("vmapbuf: null page frame for %x", (u_int)faddr);
-
- pmap_enter(tmap, taddr, pa & ~(VAX_NBPG - 1),
- VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
- faddr += VAX_NBPG;
- taddr += VAX_NBPG;
- }
-}
-
-/*
- * Unmap a previously-mapped user I/O request.
- */
-void
-vunmapbuf(bp, len)
- struct buf *bp;
- vm_size_t len;
-{
- vm_offset_t addr, off;
-
- if ((vax_boardtype != VAX_BTYP_43) && (vax_boardtype != VAX_BTYP_410))
- return;
- addr = trunc_page(bp->b_data);
- off = (vm_offset_t)bp->b_data - addr;
- len = round_page(off + len);
- uvm_km_free_wakeup(phys_map, addr, len);
- bp->b_data = bp->b_saveaddr;
- bp->b_saveaddr = 0;
-}
-#endif
-
/*
* Map in a bunch of pages read/writeable for the kernel.
*/
Home |
Main Index |
Thread Index |
Old Index