1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Made pmap_kenter "TLB safe". ...and then removed all the pmap_updates that

are no longer needed because of this.
This commit is contained in:
David Greenman 1994-08-07 14:53:27 +00:00
parent a481f20029
commit 8339815ff9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1896
7 changed files with 23 additions and 23 deletions

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.29 1994/08/06 10:25:36 davidg Exp $
* $Id: pmap.c,v 1.30 1994/08/07 13:10:19 davidg Exp $
*/
/*
@ -695,7 +695,6 @@ pmap_alloc_pv_entry()
* let the kernel see it
*/
pmap_kenter(pvva, VM_PAGE_TO_PHYS(m));
tlbflush();
entry = (pv_entry_t) pvva;
/*
@ -1345,9 +1344,17 @@ pmap_kenter(va, pa)
register vm_offset_t pa;
{
register pt_entry_t *pte;
int wasvalid = 0;
pte = vtopte(va);
if (*pte)
wasvalid++;
*pte = (pt_entry_t) ( (int) (pa | PG_RW | PG_V | PG_W));
if (wasvalid)
tlbflush();
}
/*

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.24 1994/08/06 10:25:37 davidg Exp $
* $Id: vm_machdep.c,v 1.25 1994/08/07 03:31:52 davidg Exp $
*/
#include "npx.h"
@ -243,7 +243,6 @@ int count;
pa = vm_bounce_page_find(1);
pmap_kenter(kva + i * NBPG, pa);
}
pmap_update();
return kva;
}
@ -356,7 +355,6 @@ vm_bounce_alloc(bp)
* if we are writing, the copy the data into the page
*/
if ((bp->b_flags & B_READ) == 0) {
pmap_update();
bcopy((caddr_t) va, (caddr_t) kva + (NBPG * i), NBPG);
}
} else {
@ -367,7 +365,6 @@ vm_bounce_alloc(bp)
}
va += NBPG;
}
pmap_update();
/*
* flag the buffer as being bounced
@ -677,7 +674,6 @@ pagemove(from, to, size)
to += PAGE_SIZE;
size -= PAGE_SIZE;
}
pmap_update();
}
/*
@ -761,7 +757,6 @@ vmapbuf(bp)
addr += PAGE_SIZE;
kva += PAGE_SIZE;
}
pmap_update();
}
/*

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.29 1994/08/06 10:25:36 davidg Exp $
* $Id: pmap.c,v 1.30 1994/08/07 13:10:19 davidg Exp $
*/
/*
@ -695,7 +695,6 @@ pmap_alloc_pv_entry()
* let the kernel see it
*/
pmap_kenter(pvva, VM_PAGE_TO_PHYS(m));
tlbflush();
entry = (pv_entry_t) pvva;
/*
@ -1345,9 +1344,17 @@ pmap_kenter(va, pa)
register vm_offset_t pa;
{
register pt_entry_t *pte;
int wasvalid = 0;
pte = vtopte(va);
if (*pte)
wasvalid++;
*pte = (pt_entry_t) ( (int) (pa | PG_RW | PG_V | PG_W));
if (wasvalid)
tlbflush();
}
/*

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.24 1994/08/06 10:25:37 davidg Exp $
* $Id: vm_machdep.c,v 1.25 1994/08/07 03:31:52 davidg Exp $
*/
#include "npx.h"
@ -243,7 +243,6 @@ int count;
pa = vm_bounce_page_find(1);
pmap_kenter(kva + i * NBPG, pa);
}
pmap_update();
return kva;
}
@ -356,7 +355,6 @@ vm_bounce_alloc(bp)
* if we are writing, the copy the data into the page
*/
if ((bp->b_flags & B_READ) == 0) {
pmap_update();
bcopy((caddr_t) va, (caddr_t) kva + (NBPG * i), NBPG);
}
} else {
@ -367,7 +365,6 @@ vm_bounce_alloc(bp)
}
va += NBPG;
}
pmap_update();
/*
* flag the buffer as being bounced
@ -677,7 +674,6 @@ pagemove(from, to, size)
to += PAGE_SIZE;
size -= PAGE_SIZE;
}
pmap_update();
}
/*
@ -761,7 +757,6 @@ vmapbuf(bp)
addr += PAGE_SIZE;
kva += PAGE_SIZE;
}
pmap_update();
}
/*

View File

@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: vfs_bio.c,v 1.5 1994/08/04 19:43:13 davidg Exp $
* $Id: vfs_bio.c,v 1.6 1994/08/06 09:15:28 davidg Exp $
*/
#include <sys/param.h>
@ -692,7 +692,6 @@ vm_hold_load_pages(vm_offset_t froma, vm_offset_t toa) {
vm_page_wire(p);
pmap_kenter( pg, VM_PAGE_TO_PHYS(p));
}
pmap_update();
}
void
@ -707,7 +706,6 @@ vm_hold_free_pages(vm_offset_t froma, vm_offset_t toa) {
pmap_kremove( pg);
vm_page_free(p);
}
pmap_update();
}
void

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_kern.c,v 1.4 1994/08/06 09:15:38 davidg Exp $
* $Id: vm_kern.c,v 1.5 1994/08/07 13:10:39 davidg Exp $
*/
/*
@ -373,7 +373,6 @@ kmem_malloc(map, size, canwait)
vm_object_unlock(kmem_object);
pmap_kenter( addr + i, VM_PAGE_TO_PHYS(m));
}
pmap_update();
vm_map_unlock(map);
vm_map_simplify(map, addr);

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_pager.c,v 1.4 1994/08/06 09:15:40 davidg Exp $
* $Id: vm_pager.c,v 1.5 1994/08/07 13:10:42 davidg Exp $
*/
/*
@ -281,7 +281,6 @@ vm_pager_map_page(m)
kva = kmem_alloc_wait(pager_map, PAGE_SIZE);
pmap_kenter(kva, VM_PAGE_TO_PHYS(m));
pmap_update();
return(kva);
}