From 4e489ec42142d3ebd42ebc9d59db8d2c996157c0 Mon Sep 17 00:00:00 2001 From: John Dyson Date: Thu, 28 Mar 1996 05:40:58 +0000 Subject: [PATCH] Remove a now unnecessary prototype from pmap.c. Also remove now unnecessary vm_fault's of page table pages in trap.c. --- sys/amd64/amd64/pmap.c | 4 +--- sys/amd64/amd64/trap.c | 31 +------------------------------ sys/i386/i386/pmap.c | 4 +--- sys/i386/i386/trap.c | 31 +------------------------------ sys/kern/subr_trap.c | 31 +------------------------------ 5 files changed, 5 insertions(+), 96 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index f92a1680cc87..fc238328bb78 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.81 1996/03/13 00:39:45 dyson Exp $ + * $Id: pmap.c,v 1.82 1996/03/28 04:59:34 dyson Exp $ */ /* @@ -182,8 +182,6 @@ static vm_page_t static boolean_t pmap_testbit __P((vm_offset_t pa, int bit)); static void * pmap_getpdir __P((void)); -void pmap_prefault __P((pmap_t pmap, vm_offset_t addra, - vm_map_entry_t entry, vm_object_t object)); #if defined(PMAP_DIAGNOSTIC) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index a52144e5716a..c97e50aca6c1 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.73 1996/03/02 19:37:41 peter Exp $ + * $Id: trap.c,v 1.74 1996/03/27 17:33:39 bde Exp $ */ /* @@ -523,23 +523,9 @@ trap_pfault(frame, usermode) } } - /* - * Check if page table is mapped, if not, - * fault it first - */ - v = (vm_offset_t) vtopte(va); - - /* Fault the pte only if needed: */ - if (*((int *)vtopte(v)) == 0) - (void) vm_fault(map, trunc_page(v), VM_PROT_WRITE, FALSE); - - mpte = pmap_use_pt( vm_map_pmap(map), va); - /* Fault in the user page: */ rv = vm_fault(map, va, ftype, FALSE); - pmap_unuse_pt( vm_map_pmap(map), va, mpte); - --p->p_lock; } else { /* @@ -641,24 +627,9 @@ trap_pfault(frame, usermode) } } - /* - * Check if page table is mapped, if not, - * fault it first - */ - v = (vm_offset_t) vtopte(va); - - /* Fault the pte only if needed: */ - if (*((int *)vtopte(v)) == 0) - (void) vm_fault(map, - trunc_page(v), VM_PROT_WRITE, FALSE); - - mpte = pmap_use_pt( vm_map_pmap(map), va); - /* Fault in the user page: */ rv = vm_fault(map, va, ftype, FALSE); - pmap_unuse_pt( vm_map_pmap(map), va, mpte); - --p->p_lock; } else { /* diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index f92a1680cc87..fc238328bb78 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.81 1996/03/13 00:39:45 dyson Exp $ + * $Id: pmap.c,v 1.82 1996/03/28 04:59:34 dyson Exp $ */ /* @@ -182,8 +182,6 @@ static vm_page_t static boolean_t pmap_testbit __P((vm_offset_t pa, int bit)); static void * pmap_getpdir __P((void)); -void pmap_prefault __P((pmap_t pmap, vm_offset_t addra, - vm_map_entry_t entry, vm_object_t object)); #if defined(PMAP_DIAGNOSTIC) diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index a52144e5716a..c97e50aca6c1 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.73 1996/03/02 19:37:41 peter Exp $ + * $Id: trap.c,v 1.74 1996/03/27 17:33:39 bde Exp $ */ /* @@ -523,23 +523,9 @@ trap_pfault(frame, usermode) } } - /* - * Check if page table is mapped, if not, - * fault it first - */ - v = (vm_offset_t) vtopte(va); - - /* Fault the pte only if needed: */ - if (*((int *)vtopte(v)) == 0) - (void) vm_fault(map, trunc_page(v), VM_PROT_WRITE, FALSE); - - mpte = pmap_use_pt( vm_map_pmap(map), va); - /* Fault in the user page: */ rv = vm_fault(map, va, ftype, FALSE); - pmap_unuse_pt( vm_map_pmap(map), va, mpte); - --p->p_lock; } else { /* @@ -641,24 +627,9 @@ trap_pfault(frame, usermode) } } - /* - * Check if page table is mapped, if not, - * fault it first - */ - v = (vm_offset_t) vtopte(va); - - /* Fault the pte only if needed: */ - if (*((int *)vtopte(v)) == 0) - (void) vm_fault(map, - trunc_page(v), VM_PROT_WRITE, FALSE); - - mpte = pmap_use_pt( vm_map_pmap(map), va); - /* Fault in the user page: */ rv = vm_fault(map, va, ftype, FALSE); - pmap_unuse_pt( vm_map_pmap(map), va, mpte); - --p->p_lock; } else { /* diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index a52144e5716a..c97e50aca6c1 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.73 1996/03/02 19:37:41 peter Exp $ + * $Id: trap.c,v 1.74 1996/03/27 17:33:39 bde Exp $ */ /* @@ -523,23 +523,9 @@ trap_pfault(frame, usermode) } } - /* - * Check if page table is mapped, if not, - * fault it first - */ - v = (vm_offset_t) vtopte(va); - - /* Fault the pte only if needed: */ - if (*((int *)vtopte(v)) == 0) - (void) vm_fault(map, trunc_page(v), VM_PROT_WRITE, FALSE); - - mpte = pmap_use_pt( vm_map_pmap(map), va); - /* Fault in the user page: */ rv = vm_fault(map, va, ftype, FALSE); - pmap_unuse_pt( vm_map_pmap(map), va, mpte); - --p->p_lock; } else { /* @@ -641,24 +627,9 @@ trap_pfault(frame, usermode) } } - /* - * Check if page table is mapped, if not, - * fault it first - */ - v = (vm_offset_t) vtopte(va); - - /* Fault the pte only if needed: */ - if (*((int *)vtopte(v)) == 0) - (void) vm_fault(map, - trunc_page(v), VM_PROT_WRITE, FALSE); - - mpte = pmap_use_pt( vm_map_pmap(map), va); - /* Fault in the user page: */ rv = vm_fault(map, va, ftype, FALSE); - pmap_unuse_pt( vm_map_pmap(map), va, mpte); - --p->p_lock; } else { /*