diff options
-rw-r--r-- | sys/arch/alpha/alpha/vm_machdep.c | 44 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/vm_machdep.c | 46 | ||||
-rw-r--r-- | sys/arch/arm/arm/vm_machdep.c | 36 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/vm_machdep.c | 36 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/vm_machdep.c | 25 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/vm_machdep.c | 25 | ||||
-rw-r--r-- | sys/arch/i386/i386/vm_machdep.c | 40 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/pmap.c | 3 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/vm_machdep.c | 34 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/vm_machdep.c | 36 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/vm_machdep.c | 35 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/vm_machdep.c | 35 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/vm_machdep.c | 22 | ||||
-rw-r--r-- | sys/arch/sh/sh/vm_machdep.c | 36 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/vm_machdep.c | 30 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/vm_machdep.c | 27 | ||||
-rw-r--r-- | sys/arch/vax/vax/vm_machdep.c | 25 | ||||
-rw-r--r-- | sys/uvm/uvm_extern.h | 3 |
18 files changed, 18 insertions, 520 deletions
diff --git a/sys/arch/alpha/alpha/vm_machdep.c b/sys/arch/alpha/alpha/vm_machdep.c index 6c28027bbc7..44ba5e3f1a1 100644 --- a/sys/arch/alpha/alpha/vm_machdep.c +++ b/sys/arch/alpha/alpha/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.32 2006/11/29 12:26:11 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.33 2007/05/27 20:59:24 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.55 2000/03/29 03:49:48 simonb Exp $ */ /* @@ -236,48 +236,6 @@ cpu_fork(p1, p2, stack, stacksize, func, arg) } /* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to have valid page table pages. - * - * Note that since all kernel page table pages are pre-allocated - * and mapped in, we can use the Virtual Page Table. - */ -void -pagemove(from, to, size) - register caddr_t from, to; - size_t size; -{ - long fidx, tidx; - ssize_t todo; - -#ifdef DIAGNOSTIC - if ((size & PAGE_MASK) != 0) - panic("pagemove"); -#endif - - todo = size; /* if testing > 0, need sign... */ - while (todo > 0) { - fidx = VPT_INDEX(from); - tidx = VPT_INDEX(to); - - VPT[tidx] = VPT[fidx]; - VPT[fidx] = 0; - - ALPHA_TBIS((vaddr_t)from); - ALPHA_TBIS((vaddr_t)to); - -#if defined(MULTIPROCESSOR) && 0 - pmap_tlb_shootdown(pmap_kernel(), (vaddr_t)from, PG_ASM); - pmap_tlb_shootdown(pmap_kernel(), (vaddr_t)to, PG_ASM); -#endif - - todo -= PAGE_SIZE; - from += PAGE_SIZE; - to += PAGE_SIZE; - } -} - -/* * 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(). diff --git a/sys/arch/amd64/amd64/vm_machdep.c b/sys/arch/amd64/amd64/vm_machdep.c index 1d0932858b7..7cb5179c909 100644 --- a/sys/arch/amd64/amd64/vm_machdep.c +++ b/sys/arch/amd64/amd64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.9 2007/05/25 16:22:11 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.10 2007/05/27 20:59:25 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 2003/04/26 18:39:33 fvdl Exp $ */ /*- @@ -253,50 +253,6 @@ setredzone(struct proc *p) #endif } - -/* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap. - */ -void -pagemove(caddr_t from, caddr_t to, size_t size) -{ - pt_entry_t *fpte, *tpte, ofpte, otpte; - vaddr_t fsva, tsva, feva, teva; - -#ifdef DIAGNOSTIC - if ((size & PAGE_MASK) != 0) - panic("pagemove"); -#endif - - fsva = (vaddr_t)from; - tsva = (vaddr_t)to; - feva = fsva + size; - teva = tsva + size; - - fpte = kvtopte((vaddr_t)from); - tpte = kvtopte((vaddr_t)to); -#ifdef LARGEPAGES - /* XXX For now... */ - if (*fpte & PG_PS) - panic("pagemove: fpte PG_PS"); - if (*tpte & PG_PS) - panic("pagemove: tpte PG_PS"); -#endif - while (size > 0) { - otpte = *tpte; - ofpte = *fpte; - *tpte++ = *fpte; - *fpte++ = 0; - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_tlb_shootrange(pmap_kernel(), fsva, feva); - pmap_tlb_shootrange(pmap_kernel(), tsva, teva); - pmap_tlb_shootwait(); -} - /* * Map a user I/O request into kernel virtual address space. * Note: the pages are already locked by uvm_vslock(), so we diff --git a/sys/arch/arm/arm/vm_machdep.c b/sys/arch/arm/arm/vm_machdep.c index d7713ff83c4..d5e109dc121 100644 --- a/sys/arch/arm/arm/vm_machdep.c +++ b/sys/arch/arm/arm/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.5 2006/11/29 12:26:13 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.6 2007/05/27 20:59:25 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.31 2004/01/04 11:33:29 jdolecek Exp $ */ /* @@ -225,40 +225,6 @@ cpu_exit(struct proc *p) } /* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap, - * and size must be a multiple of PAGE_SIZE. - */ - -void -pagemove(from, to, size) - caddr_t from, to; - size_t size; -{ - paddr_t pa; - boolean_t rv; - - if (size % PAGE_SIZE) - panic("pagemove: size=%08lx", (u_long) size); - - while (size > 0) { - rv = pmap_extract(pmap_kernel(), (vaddr_t) from, &pa); -#ifdef DEBUG - if (rv == FALSE) - panic("pagemove 2"); - if (pmap_extract(pmap_kernel(), (vaddr_t) to, NULL) == TRUE) - panic("pagemove 3"); -#endif - pmap_kremove((vaddr_t) from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t) to, pa, VM_PROT_READ|VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - -/* * 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(). diff --git a/sys/arch/hp300/hp300/vm_machdep.c b/sys/arch/hp300/hp300/vm_machdep.c index e17f3e3be58..a23b64964ed 100644 --- a/sys/arch/hp300/hp300/vm_machdep.c +++ b/sys/arch/hp300/hp300/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.42 2007/03/13 19:38:19 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.43 2007/05/27 20:59:25 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.60 2001/07/06 05:53:35 chs Exp $ */ /* @@ -198,40 +198,6 @@ cpu_coredump(p, vp, cred, chdr) } /* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap, - * and size must be a multiple of PAGE_SIZE. - */ -void -pagemove(from, to, size) - caddr_t from, to; - size_t size; -{ - paddr_t pa; - boolean_t rv; - -#ifdef DEBUG - if ((size & PAGE_MASK) != 0) - panic("pagemove"); -#endif - while (size > 0) { - rv = pmap_extract(pmap_kernel(), (vaddr_t)from, &pa); -#ifdef DEBUG - if (rv == FALSE) - panic("pagemove 2"); - if (pmap_extract(pmap_kernel(), (vaddr_t)to, NULL) == TRUE) - panic("pagemove 3"); -#endif - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ | VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - -/* * 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(). diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c index 018725193cc..9f8add12123 100644 --- a/sys/arch/hppa/hppa/vm_machdep.c +++ b/sys/arch/hppa/hppa/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.58 2006/11/29 12:47:49 mickey Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.59 2007/05/27 20:59:25 miod Exp $ */ /* * Copyright (c) 1999-2004 Michael Shalayeff @@ -90,29 +90,6 @@ cpu_coredump(p, vp, cred, core) return error; } -/* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap. - */ -void -pagemove(from, to, size) - register caddr_t from, to; - size_t size; -{ - paddr_t pa; - - while (size > 0) { - if (pmap_extract(pmap_kernel(), (vaddr_t)from, &pa) == FALSE) - panic("pagemove"); - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, UVM_PROT_RW); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - void cpu_fork(p1, p2, stack, stacksize, func, arg) struct proc *p1, *p2; diff --git a/sys/arch/hppa64/hppa64/vm_machdep.c b/sys/arch/hppa64/hppa64/vm_machdep.c index 828f4e6e9b7..722ca373f86 100644 --- a/sys/arch/hppa64/hppa64/vm_machdep.c +++ b/sys/arch/hppa64/hppa64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.4 2006/11/29 12:57:45 mickey Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.5 2007/05/27 20:59:25 miod Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -81,29 +81,6 @@ cpu_coredump(p, vp, cred, core) return error; } -/* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap. - */ -void -pagemove(from, to, size) - register caddr_t from, to; - size_t size; -{ - paddr_t pa; - - while (size > 0) { - if (pmap_extract(pmap_kernel(), (vaddr_t)from, &pa) == FALSE) - panic("pagemove"); - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, UVM_PROT_RW); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - void cpu_fork(p1, p2, stack, stacksize, func, arg) struct proc *p1, *p2; diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c index 10fb4b1aef2..4f969a96aaa 100644 --- a/sys/arch/i386/i386/vm_machdep.c +++ b/sys/arch/i386/i386/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.51 2007/05/25 15:55:26 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.52 2007/05/27 20:59:25 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.61 1996/05/03 19:42:35 christos Exp $ */ /*- @@ -212,44 +212,6 @@ cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, } /* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap. - */ -void -pagemove(caddr_t from, caddr_t to, size_t size) -{ - pt_entry_t *fpte, *tpte; - pt_entry_t ofpte, otpte; - vaddr_t fsva, tsva, feva, teva; - -#ifdef DIAGNOSTIC - if ((size & PAGE_MASK) != 0) - panic("pagemove"); -#endif - - fsva = (vaddr_t)from; - tsva = (vaddr_t)to; - feva = fsva + size; - teva = tsva + size; - - fpte = kvtopte((vaddr_t)from); - tpte = kvtopte((vaddr_t)to); - while (size > 0) { - ofpte = *fpte; - otpte = *tpte; - *tpte++ = *fpte; - *fpte++ = 0; - - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_tlb_shootrange(pmap_kernel(), fsva, feva); - pmap_tlb_shootrange(pmap_kernel(), tsva, teva); - pmap_tlb_shootwait(); -} - -/* * Convert kernel VA to physical address */ int diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c index d30dc25c789..52067fb0772 100644 --- a/sys/arch/m88k/m88k/pmap.c +++ b/sys/arch/m88k/m88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.30 2007/03/21 19:32:29 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.31 2007/05/27 20:59:25 miod Exp $ */ /* * Copyright (c) 2001-2004, Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -105,7 +105,6 @@ extern vaddr_t last_addr; #define CD_CBIT 0x0040000 /* pmap_changebit */ #define CD_TBIT 0x0080000 /* pmap_testbit */ #define CD_USBIT 0x0100000 /* pmap_unsetbit */ -#define CD_PGMV 0x0200000 /* pagemove */ #define CD_ALL 0x0FFFFFC int pmap_con_dbg = 0; diff --git a/sys/arch/m88k/m88k/vm_machdep.c b/sys/arch/m88k/m88k/vm_machdep.c index c1097825621..55a683f81b5 100644 --- a/sys/arch/m88k/m88k/vm_machdep.c +++ b/sys/arch/m88k/m88k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.13 2006/06/23 13:46:05 mickey Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.14 2007/05/27 20:59:25 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. @@ -275,35 +275,3 @@ vunmapbuf(bp, len) bp->b_data = bp->b_saveaddr; bp->b_saveaddr = 0; } - -/* - * Move pages from one kernel virtual address to another. - */ -void -pagemove(from, to, size) - caddr_t from, to; - size_t size; -{ - paddr_t pa; - boolean_t rv; - -#ifdef DEBUG - if ((size & PAGE_MASK) != 0) - panic("pagemove"); -#endif - while (size > 0) { - rv = pmap_extract(pmap_kernel(), (vaddr_t)from, &pa); -#ifdef DEBUG - if (rv == FALSE) - panic("pagemove 2"); - if (pmap_extract(pmap_kernel(), (vaddr_t)to, NULL) == TRUE) - panic("pagemove 3"); -#endif - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} diff --git a/sys/arch/mac68k/mac68k/vm_machdep.c b/sys/arch/mac68k/mac68k/vm_machdep.c index 0417139e6b6..00bb0bce0d7 100644 --- a/sys/arch/mac68k/mac68k/vm_machdep.c +++ b/sys/arch/mac68k/mac68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.38 2007/03/13 19:38:23 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.39 2007/05/27 20:59:25 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.29 1998/07/28 18:34:55 thorpej Exp $ */ /* @@ -197,40 +197,6 @@ cpu_coredump(p, vp, cred, chdr) } /* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap, - * and size must be a multiple of PAGE_SIZE. - */ -void -pagemove(from, to, size) - caddr_t from, to; - size_t size; -{ - paddr_t pa; - boolean_t rv; - -#ifdef DEBUG - if ((size & PAGE_MASK) != 0) - panic("pagemove"); -#endif - while (size > 0) { - rv = pmap_extract(pmap_kernel(), (vaddr_t)from, &pa); -#ifdef DEBUG - if (rv == FALSE) - panic("pagemove 2"); - if (pmap_extract(pmap_kernel(), (vaddr_t)to, NULL) == TRUE) - panic("pagemove 3"); -#endif - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ | VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - -/* * Map an IO request into kernel virtual address space. * * XXX we allocate KVA space by using kmem_alloc_wait which we know diff --git a/sys/arch/mips64/mips64/vm_machdep.c b/sys/arch/mips64/mips64/vm_machdep.c index e074e3873d8..5ec0a987262 100644 --- a/sys/arch/mips64/mips64/vm_machdep.c +++ b/sys/arch/mips64/mips64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.11 2007/05/09 19:21:49 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.12 2007/05/27 20:59:25 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -179,45 +179,12 @@ cpu_coredump(p, vp, cred, chdr) return error; } -/* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap, - * and size must be a multiple of CLSIZE. - */ -void -pagemove(from, to, size) - caddr_t from, to; - size_t size; -{ - pt_entry_t *fpte, *tpte; - - if (size % PAGE_SIZE) - panic("pagemove"); - fpte = kvtopte(from); - tpte = kvtopte(to); - if (((vaddr_t)from & CpuCacheAliasMask) != ((vaddr_t)to & CpuCacheAliasMask)) { - Mips_HitSyncDCache((vaddr_t)from, size); - } - while (size > 0) { - tlb_flush_addr((vaddr_t)from); - tlb_update((vaddr_t)to, fpte->pt_entry); - *tpte++ = *fpte; - fpte->pt_entry = PG_NV | PG_G; - fpte++; - size -= NBPG; - from += NBPG; - to += NBPG; - } -} - extern vm_map_t phys_map; /* * Map an user IO request into kernel virtual address space. */ -#define trunc_page_align(x) ((vaddr_t)(x) & ~(CpuCacheAliasMask | PAGE_SIZE)) - void vmapbuf(bp, len) struct buf *bp; diff --git a/sys/arch/mvme68k/mvme68k/vm_machdep.c b/sys/arch/mvme68k/mvme68k/vm_machdep.c index 140a5229e67..88283ddd84b 100644 --- a/sys/arch/mvme68k/mvme68k/vm_machdep.c +++ b/sys/arch/mvme68k/mvme68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.43 2007/03/13 19:38:23 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.44 2007/05/27 20:59:25 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -192,39 +192,6 @@ cpu_coredump(p, vp, cred, chdr) } /* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap. - */ -void -pagemove(from, to, size) - caddr_t from, to; - size_t size; -{ - paddr_t pa; - boolean_t rv; - -#ifdef DEBUG - if ((size & PAGE_MASK) != 0) - panic("pagemove"); -#endif - while (size > 0) { - rv = pmap_extract(pmap_kernel(), (vaddr_t)from, &pa); -#ifdef DEBUG - if (rv == FALSE) - panic("pagemove 2"); - if (pmap_extract(pmap_kernel(), (vaddr_t)to, NULL) == TRUE) - panic("pagemove 3"); -#endif - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - -/* * Convert kernel VA to physical address */ paddr_t diff --git a/sys/arch/powerpc/powerpc/vm_machdep.c b/sys/arch/powerpc/powerpc/vm_machdep.c index 78cf2d0c1e0..41f91463e8c 100644 --- a/sys/arch/powerpc/powerpc/vm_machdep.c +++ b/sys/arch/powerpc/powerpc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.42 2007/03/20 20:59:53 kettenis Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.43 2007/05/27 20:59:26 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 1996/09/30 16:34:57 ws Exp $ */ /* @@ -127,26 +127,6 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, size_t stacksize, } /* - * Move pages from one kernel virtual address to another. - */ -void -pagemove(caddr_t from, caddr_t to, size_t size) -{ - vaddr_t va; - paddr_t pa; - - for (va = (vaddr_t)from; size > 0; size -= NBPG) { - pmap_extract(pmap_kernel(), va, &pa); - pmap_kremove(va, NBPG); - pmap_kenter_pa((vaddr_t)to, pa, - VM_PROT_READ | VM_PROT_WRITE ); - va += NBPG; - to += NBPG; - } - pmap_update(pmap_kernel()); -} - -/* * cpu_exit is called as the last action during exit. * We release the address space and machine-dependent resources, * including the memory for the user structure and kernel stack. diff --git a/sys/arch/sh/sh/vm_machdep.c b/sys/arch/sh/sh/vm_machdep.c index db0441c37a5..a5b332decf4 100644 --- a/sys/arch/sh/sh/vm_machdep.c +++ b/sys/arch/sh/sh/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.8 2007/03/02 06:11:54 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.9 2007/05/27 20:59:26 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.53 2006/08/31 16:49:21 matt Exp $ */ /* @@ -304,40 +304,6 @@ cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, } /* - * Move pages from one kernel virtual address to another. - * Both addresses are assumed to reside in the Sysmap, - * and size must be a multiple of PAGE_SIZE. - */ - -void -pagemove(caddr_t from, caddr_t to, size_t size) -{ - paddr_t pa; - boolean_t rv; - -#ifdef DEBUG - if (size % PAGE_SIZE) - panic("pagemove: size=%08lx", (u_long) size); -#endif - - while (size > 0) { - rv = pmap_extract(pmap_kernel(), (vaddr_t) from, &pa); -#ifdef DEBUG - if (rv == FALSE) - panic("pagemove 2"); - if (pmap_extract(pmap_kernel(), (vaddr_t) to, NULL) == TRUE) - panic("pagemove 3"); -#endif - pmap_kremove((vaddr_t) from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t) to, pa, VM_PROT_READ|VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - -/* * Map an IO request into kernel virtual address space. * All requests are (re)mapped into kernel VA space via the phys_map * (a name with only slightly more meaning than "kernel_map") diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c index 2679fd1367b..a71f30adb97 100644 --- a/sys/arch/sparc/sparc/vm_machdep.c +++ b/sys/arch/sparc/sparc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.47 2006/01/20 23:27:25 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.48 2007/05/27 20:59:26 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */ /* @@ -70,34 +70,6 @@ #include <sparc/sparc/cpuvar.h> /* - * Move pages from one kernel virtual address to another. - */ -void -pagemove(from, to, size) - register caddr_t from, to; - size_t size; -{ - paddr_t pa; - -#ifdef DEBUG - if ((size & PAGE_MASK) != 0 || - ((vaddr_t)from & PAGE_MASK) != 0 || - ((vaddr_t)to & PAGE_MASK) != 0) - panic("pagemove 1"); -#endif - while (size > 0) { - if (pmap_extract(pmap_kernel(), (vaddr_t)from, &pa) == FALSE) - panic("pagemove 2"); - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - -/* * Wrapper for dvma_mapin() in kernel space, * so drivers need not include VM goo to get at kernel_map. */ diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c index 179a731392c..f60192b2be8 100644 --- a/sys/arch/sparc64/sparc64/vm_machdep.c +++ b/sys/arch/sparc64/sparc64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.13 2006/05/29 20:01:32 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.14 2007/05/27 20:59:26 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */ /* @@ -70,31 +70,6 @@ #include <sparc64/sparc64/cache.h> /* - * Move pages from one kernel virtual address to another. - */ -void -pagemove(from, to, size) - register caddr_t from, to; - size_t size; -{ - paddr_t pa; - - if (size & PGOFSET || (long)from & PGOFSET || (long)to & PGOFSET) - panic("pagemove 1"); - - while (size > 0) { - if (pmap_extract(pmap_kernel(), (vaddr_t)from, &pa) == FALSE) - panic("pagemove 2"); - pmap_kremove((vaddr_t)from, PAGE_SIZE); - pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE); - from += PAGE_SIZE; - to += PAGE_SIZE; - size -= PAGE_SIZE; - } - pmap_update(pmap_kernel()); -} - -/* * 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(). diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c index d6e1ac404f1..545f2ccbf76 100644 --- a/sys/arch/vax/vax/vm_machdep.c +++ b/sys/arch/vax/vax/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.32 2006/11/29 12:26:14 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.33 2007/05/27 20:59:26 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.67 2000/06/29 07:14:34 mrg Exp $ */ /* @@ -58,29 +58,6 @@ #include <sys/syscallargs.h> -volatile int whichqs; - -/* - * pagemove - moves pages at virtual address from to virtual address to, - * block moved of size size. Using fast insn bcopy for pte move. - */ -void -pagemove(from, to, size) - caddr_t from, to; - size_t size; -{ - pt_entry_t *fpte, *tpte; - int stor; - - fpte = kvtopte(from); - tpte = kvtopte(to); - - stor = (size >> VAX_PGSHIFT) * sizeof(pt_entry_t); - bcopy(fpte, tpte, stor); - bzero(fpte, stor); - mtpr(0, PR_TBIA); -} - /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb and trap frame, making the child ready to run. diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index 7f95afa4f6f..ee53e56b96d 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.65 2007/04/11 12:51:51 miod Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.66 2007/05/27 20:59:26 miod Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -444,7 +444,6 @@ struct core; /* vm_machdep.c */ void vmapbuf(struct buf *, vsize_t); void vunmapbuf(struct buf *, vsize_t); -void pagemove(caddr_t, caddr_t, size_t); void cpu_fork(struct proc *, struct proc *, void *, size_t, void (*)(void *), void *); |